@halcyonlabs/app 0.47.0-halcyon.558 → 0.47.0-halcyon.563

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 (943) hide show
  1. package/app/dist/assets/AddMachineDialog-MpmbbsKE.js +1 -0
  2. package/app/dist/assets/AddMachineDialog-MpmbbsKE.js.br +0 -0
  3. package/app/dist/assets/AddMachineDialog-MpmbbsKE.js.gz +0 -0
  4. package/app/dist/assets/AppCommandShortcutHint-C7zjPYh-.js +1 -0
  5. package/app/dist/assets/AppFileExternalNavigationDispatcher-7iuCxJeq.js +1 -0
  6. package/app/dist/assets/AppFileExternalNavigationDispatcher-7iuCxJeq.js.br +0 -0
  7. package/app/dist/assets/AppFileExternalNavigationDispatcher-7iuCxJeq.js.gz +0 -0
  8. package/app/dist/assets/AppToasterView-BvFBKhI6.js +1 -0
  9. package/app/dist/assets/BrowserTabDeck-DI0pVIe_.js +1 -0
  10. package/app/dist/assets/BrowserTabDeck-DI0pVIe_.js.br +0 -0
  11. package/app/dist/assets/BrowserTabDeck-DI0pVIe_.js.gz +0 -0
  12. package/app/dist/assets/CommandPaletteBody-B-2FMSX1.js +1 -0
  13. package/app/dist/assets/CommandPaletteBody-B-2FMSX1.js.br +0 -0
  14. package/app/dist/assets/CommandPaletteBody-B-2FMSX1.js.gz +0 -0
  15. package/app/dist/assets/DiffHost-BUAsAwGT.js +1 -0
  16. package/app/dist/assets/DiffHost-BUAsAwGT.js.br +0 -0
  17. package/app/dist/assets/DiffHost-BUAsAwGT.js.gz +0 -0
  18. package/app/dist/assets/ExperimentalFileLinkMenu-BiOVug3R.js +1 -0
  19. package/app/dist/assets/ExperimentalFileLinkMenu-BiOVug3R.js.br +0 -0
  20. package/app/dist/assets/ExperimentalFileLinkMenu-BiOVug3R.js.gz +0 -0
  21. package/app/dist/assets/FilePreview-Cy5cU2AW.js +3 -0
  22. package/app/dist/assets/FilePreview-Cy5cU2AW.js.br +0 -0
  23. package/app/dist/assets/FilePreview-Cy5cU2AW.js.gz +0 -0
  24. package/app/dist/assets/GitDiffCardHeader-C_5Ct3x8.js +1 -0
  25. package/app/dist/assets/GitDiffCardHeader-C_5Ct3x8.js.br +0 -0
  26. package/app/dist/assets/GitDiffCardHeader-C_5Ct3x8.js.gz +0 -0
  27. package/app/dist/assets/InlineMessageEditorFrame-CxaDRely.js +1 -0
  28. package/app/dist/assets/InlineMessageEditorFrame-CxaDRely.js.br +0 -0
  29. package/app/dist/assets/InlineMessageEditorFrame-CxaDRely.js.gz +0 -0
  30. package/app/dist/assets/MachineLabel-3r8SWEvU.js +1 -0
  31. package/app/dist/assets/MachineLabel-3r8SWEvU.js.br +0 -0
  32. package/app/dist/assets/MachineLabel-3r8SWEvU.js.gz +0 -0
  33. package/app/dist/assets/MachineRenameDialog-CwgyUx_1.js +1 -0
  34. package/app/dist/assets/MachineRenameDialog-CwgyUx_1.js.br +0 -0
  35. package/app/dist/assets/MachineRenameDialog-CwgyUx_1.js.gz +0 -0
  36. package/app/dist/assets/MachineSettingsView-fCON9WVX.js +1 -0
  37. package/app/dist/assets/MachineSettingsView-fCON9WVX.js.br +0 -0
  38. package/app/dist/assets/MachineSettingsView-fCON9WVX.js.gz +0 -0
  39. package/app/dist/assets/MicrophonePreferences-DbMM6NPA.js +1 -0
  40. package/app/dist/assets/MicrophonePreferences-DbMM6NPA.js.br +0 -0
  41. package/app/dist/assets/MicrophonePreferences-DbMM6NPA.js.gz +0 -0
  42. package/app/dist/assets/ModelReasoningMenu-DtrvvNem.js +1 -0
  43. package/app/dist/assets/ModelReasoningMenu-DtrvvNem.js.br +0 -0
  44. package/app/dist/assets/ModelReasoningMenu-DtrvvNem.js.gz +0 -0
  45. package/app/dist/assets/MoonletDiff-DPgQrCgO.js +1 -0
  46. package/app/dist/assets/MoonletDiff-DPgQrCgO.js.br +0 -0
  47. package/app/dist/assets/MoonletDiff-DPgQrCgO.js.gz +0 -0
  48. package/app/dist/assets/MoonletDiffSplit-Bmty80ES.js +2 -0
  49. package/app/dist/assets/MoonletDiffSplit-Bmty80ES.js.br +0 -0
  50. package/app/dist/assets/MoonletDiffSplit-Bmty80ES.js.gz +0 -0
  51. package/app/dist/assets/MoonletSourceCode-bjrwLRi7.js +2 -0
  52. package/app/dist/assets/MoonletSourceCode-bjrwLRi7.js.br +0 -0
  53. package/app/dist/assets/MoonletSourceCode-bjrwLRi7.js.gz +0 -0
  54. package/app/dist/assets/NewTabPage-Zkjae6mX.js +2 -0
  55. package/app/dist/assets/NewTabPage-Zkjae6mX.js.br +0 -0
  56. package/app/dist/assets/NewTabPage-Zkjae6mX.js.gz +0 -0
  57. package/app/dist/assets/NewThreadComposer-Cf6lm6su.js +1 -0
  58. package/app/dist/assets/NewThreadComposer-Cf6lm6su.js.br +0 -0
  59. package/app/dist/assets/NewThreadComposer-Cf6lm6su.js.gz +0 -0
  60. package/app/dist/assets/OnboardingFlow-CD9uu71q.js +1 -0
  61. package/app/dist/assets/OnboardingFlow-CD9uu71q.js.br +0 -0
  62. package/app/dist/assets/OnboardingFlow-CD9uu71q.js.gz +0 -0
  63. package/app/dist/assets/OptionPicker-COuYgOjP.js +1 -0
  64. package/app/dist/assets/OptionPicker-COuYgOjP.js.br +0 -0
  65. package/app/dist/assets/OptionPicker-COuYgOjP.js.gz +0 -0
  66. package/app/dist/assets/PaletteShell-Bsxuqi8N.js +1 -0
  67. package/app/dist/assets/PaletteShell-Bsxuqi8N.js.br +0 -0
  68. package/app/dist/assets/PaletteShell-Bsxuqi8N.js.gz +0 -0
  69. package/app/dist/assets/PaneMaximizeButton-B1j9J89i.js +1 -0
  70. package/app/dist/assets/PaneMaximizeButton-B1j9J89i.js.br +0 -0
  71. package/app/dist/assets/PaneMaximizeButton-B1j9J89i.js.gz +0 -0
  72. package/app/dist/assets/PierreLineSelectionActions-BX8ROJ3g.js +1 -0
  73. package/app/dist/assets/PierreLineSelectionActions-BX8ROJ3g.js.br +0 -0
  74. package/app/dist/assets/PierreLineSelectionActions-BX8ROJ3g.js.gz +0 -0
  75. package/app/dist/assets/PluginPanelRightPanelHost-BmzsXRmY.js +1 -0
  76. package/app/dist/assets/PluginPanelRightPanelHost-BmzsXRmY.js.br +0 -0
  77. package/app/dist/assets/PluginPanelRightPanelHost-BmzsXRmY.js.gz +0 -0
  78. package/app/dist/assets/PluginSettingsSections-BJmTquNk.js +2 -0
  79. package/app/dist/assets/PluginSettingsSections-BJmTquNk.js.br +0 -0
  80. package/app/dist/assets/PluginSettingsSections-BJmTquNk.js.gz +0 -0
  81. package/app/dist/assets/PluginThreadChat-BvCIR9u3.js +1 -0
  82. package/app/dist/assets/PluginThreadChat-BvCIR9u3.js.br +0 -0
  83. package/app/dist/assets/PluginThreadChat-BvCIR9u3.js.gz +0 -0
  84. package/app/dist/assets/ProjectDetailSettingsView-BH4dbASE.js +1 -0
  85. package/app/dist/assets/ProjectDetailSettingsView-BH4dbASE.js.br +0 -0
  86. package/app/dist/assets/ProjectDetailSettingsView-BH4dbASE.js.gz +0 -0
  87. package/app/dist/assets/ProjectMachineSetupDialog-DJLubqQU.js +1 -0
  88. package/app/dist/assets/ProjectMachineSetupDialog-DJLubqQU.js.br +0 -0
  89. package/app/dist/assets/ProjectMachineSetupDialog-DJLubqQU.js.gz +0 -0
  90. package/app/dist/assets/ProjectsSettingsSection-BTkI5YAx.js +3 -0
  91. package/app/dist/assets/ProjectsSettingsSection-BTkI5YAx.js.br +0 -0
  92. package/app/dist/assets/ProjectsSettingsSection-BTkI5YAx.js.gz +0 -0
  93. package/app/dist/assets/QueuedMessagesList-B8byrxEr.js +3 -0
  94. package/app/dist/assets/QueuedMessagesList-B8byrxEr.js.br +0 -0
  95. package/app/dist/assets/QueuedMessagesList-B8byrxEr.js.gz +0 -0
  96. package/app/dist/assets/RemotePathBrowser-CX9Gq9wN.js +1 -0
  97. package/app/dist/assets/RemotePathBrowser-CX9Gq9wN.js.br +0 -0
  98. package/app/dist/assets/RemotePathBrowser-CX9Gq9wN.js.gz +0 -0
  99. package/app/dist/assets/RootComposeView-2q7ow4Cd.js +1 -0
  100. package/app/dist/assets/RootComposeView-2q7ow4Cd.js.br +0 -0
  101. package/app/dist/assets/RootComposeView-2q7ow4Cd.js.gz +0 -0
  102. package/app/dist/assets/SecondaryPanelLayout-CEXeF4OU.js +1 -0
  103. package/app/dist/assets/SecondaryPanelLayout-CEXeF4OU.js.br +0 -0
  104. package/app/dist/assets/SecondaryPanelLayout-CEXeF4OU.js.gz +0 -0
  105. package/app/dist/assets/ServerMoveOverlayView-Dnbk_nZ2.js +1 -0
  106. package/app/dist/assets/ServerMoveOverlayView-Dnbk_nZ2.js.br +0 -0
  107. package/app/dist/assets/ServerMoveOverlayView-Dnbk_nZ2.js.gz +0 -0
  108. package/app/dist/assets/SettingsSidebar-B7b9IGOg.js +1 -0
  109. package/app/dist/assets/SettingsSidebar-B7b9IGOg.js.br +0 -0
  110. package/app/dist/assets/SettingsSidebar-B7b9IGOg.js.gz +0 -0
  111. package/app/dist/assets/SettingsView-BbnRadVc.js +7 -0
  112. package/app/dist/assets/SettingsView-BbnRadVc.js.br +0 -0
  113. package/app/dist/assets/SettingsView-BbnRadVc.js.gz +0 -0
  114. package/app/dist/assets/SidebarFooterCustomize-BbT7dzkj.js +1 -0
  115. package/app/dist/assets/SidebarFooterCustomize-BbT7dzkj.js.br +0 -0
  116. package/app/dist/assets/SidebarFooterCustomize-BbT7dzkj.js.gz +0 -0
  117. package/app/dist/assets/SidebarVisibilityCustomize-CvxPrZ6k.js +1 -0
  118. package/app/dist/assets/SidebarVisibilityCustomize-CvxPrZ6k.js.br +0 -0
  119. package/app/dist/assets/SidebarVisibilityCustomize-CvxPrZ6k.js.gz +0 -0
  120. package/app/dist/assets/SourceCodeHost-WsTehOqN.js +2 -0
  121. package/app/dist/assets/SourceCodeHost-WsTehOqN.js.br +0 -0
  122. package/app/dist/assets/SourceCodeHost-WsTehOqN.js.gz +0 -0
  123. package/app/dist/assets/SplitWorkspaceRoute-DLg6tHEC.js +2 -0
  124. package/app/dist/assets/SplitWorkspaceRoute-DLg6tHEC.js.br +0 -0
  125. package/app/dist/assets/SplitWorkspaceRoute-DLg6tHEC.js.gz +0 -0
  126. package/app/dist/assets/TerminalOutputBlock-BhQiLoWb.js +4 -0
  127. package/app/dist/assets/TerminalOutputBlock-BhQiLoWb.js.br +0 -0
  128. package/app/dist/assets/TerminalOutputBlock-BhQiLoWb.js.gz +0 -0
  129. package/app/dist/assets/ThreadActionsMenu-EZw3AEqd.js +1 -0
  130. package/app/dist/assets/ThreadActionsMenu-EZw3AEqd.js.br +0 -0
  131. package/app/dist/assets/ThreadActionsMenu-EZw3AEqd.js.gz +0 -0
  132. package/app/dist/assets/ThreadDetailView-gnBYQJyq.js +6 -0
  133. package/app/dist/assets/ThreadDetailView-gnBYQJyq.js.br +0 -0
  134. package/app/dist/assets/ThreadDetailView-gnBYQJyq.js.gz +0 -0
  135. package/app/dist/assets/ThreadSearchPaletteMode-CrT5P_kz.js +1 -0
  136. package/app/dist/assets/ThreadSearchPaletteMode-CrT5P_kz.js.br +0 -0
  137. package/app/dist/assets/ThreadSearchPaletteMode-CrT5P_kz.js.gz +0 -0
  138. package/app/dist/assets/ThreadSecondaryPanel-Xl9HRFDU.js +1 -0
  139. package/app/dist/assets/ThreadSecondaryPanel-Xl9HRFDU.js.br +0 -0
  140. package/app/dist/assets/ThreadSecondaryPanel-Xl9HRFDU.js.gz +0 -0
  141. package/app/dist/assets/ThreadSecondaryPanelTabContent-C8TFrF21.js +3 -0
  142. package/app/dist/assets/ThreadSecondaryPanelTabContent-C8TFrF21.js.br +0 -0
  143. package/app/dist/assets/ThreadSecondaryPanelTabContent-C8TFrF21.js.gz +0 -0
  144. package/app/dist/assets/ThreadStatusGlyph-CcgjxAfS.js +1 -0
  145. package/app/dist/assets/ThreadStatusGlyph-CcgjxAfS.js.br +0 -0
  146. package/app/dist/assets/ThreadStatusGlyph-CcgjxAfS.js.gz +0 -0
  147. package/app/dist/assets/ThreadTerminalPanel-DsvsjQ-D.js +1 -0
  148. package/app/dist/assets/ThreadTerminalPanel-DsvsjQ-D.js.br +0 -0
  149. package/app/dist/assets/ThreadTerminalPanel-DsvsjQ-D.js.gz +0 -0
  150. package/app/dist/assets/ThreadTerminalView-BnbcBFJ2.js +1 -0
  151. package/app/dist/assets/ThreadTerminalView-BnbcBFJ2.js.br +0 -0
  152. package/app/dist/assets/ThreadTerminalView-BnbcBFJ2.js.gz +0 -0
  153. package/app/dist/assets/ThreadTimelineNavigationContext-C3-SLWZ5.js +2 -0
  154. package/app/dist/assets/ThreadTimelineNavigationContext-C3-SLWZ5.js.br +0 -0
  155. package/app/dist/assets/ThreadTimelineNavigationContext-C3-SLWZ5.js.gz +0 -0
  156. package/app/dist/assets/ThreadUnarchiveButton-C9R80LhI.js +1 -0
  157. package/app/dist/assets/TimelineDetailScroll-C_MyhnL3.js +1 -0
  158. package/app/dist/assets/TimelineDetailScroll-C_MyhnL3.js.br +0 -0
  159. package/app/dist/assets/TimelineDetailScroll-C_MyhnL3.js.gz +0 -0
  160. package/app/dist/assets/TimelineFileDiffBlock-5vb2du0c.js +6 -0
  161. package/app/dist/assets/TimelineFileDiffBlock-5vb2du0c.js.br +0 -0
  162. package/app/dist/assets/TimelineFileDiffBlock-5vb2du0c.js.gz +0 -0
  163. package/app/dist/assets/TimelineSelectionMenu-DfdN6Ngc.js +22 -0
  164. package/app/dist/assets/TimelineSelectionMenu-DfdN6Ngc.js.br +0 -0
  165. package/app/dist/assets/TimelineSelectionMenu-DfdN6Ngc.js.gz +0 -0
  166. package/app/dist/assets/ToolsView-DQ30q8SU.js +4 -0
  167. package/app/dist/assets/ToolsView-DQ30q8SU.js.br +0 -0
  168. package/app/dist/assets/ToolsView-DQ30q8SU.js.gz +0 -0
  169. package/app/dist/assets/ToolsViewSplits-Baj0H7bw.js +2 -0
  170. package/app/dist/assets/ToolsViewSplits-Baj0H7bw.js.br +0 -0
  171. package/app/dist/assets/ToolsViewSplits-Baj0H7bw.js.gz +0 -0
  172. package/app/dist/assets/WaveformVisualizer-BD93SVDE.js +1 -0
  173. package/app/dist/assets/WaveformVisualizer-BD93SVDE.js.br +0 -0
  174. package/app/dist/assets/WaveformVisualizer-BD93SVDE.js.gz +0 -0
  175. package/app/dist/assets/absolute-file-path-BTqPWT1d.js +1 -0
  176. package/app/dist/assets/app-fixed-tab-navigation-BFNHFiVE.js +1 -0
  177. package/app/dist/assets/app-fixed-tab-navigation-BFNHFiVE.js.br +0 -0
  178. package/app/dist/assets/app-fixed-tab-navigation-BFNHFiVE.js.gz +0 -0
  179. package/app/dist/assets/audio-input-device-preference-BKx2st3G.js +1 -0
  180. package/app/dist/assets/audio-input-device-preference-BKx2st3G.js.br +0 -0
  181. package/app/dist/assets/audio-input-device-preference-BKx2st3G.js.gz +0 -0
  182. package/app/dist/assets/bottom-anchored-scroll-body-qsMbxmh_.js +1 -0
  183. package/app/dist/assets/bottom-anchored-scroll-body-qsMbxmh_.js.br +0 -0
  184. package/app/dist/assets/bottom-anchored-scroll-body-qsMbxmh_.js.gz +0 -0
  185. package/app/dist/assets/browser-url-DzbAd45A.js +1 -0
  186. package/app/dist/assets/browser-url-DzbAd45A.js.br +0 -0
  187. package/app/dist/assets/browser-url-DzbAd45A.js.gz +0 -0
  188. package/app/dist/assets/checkbox-BR8PiOkh.js +1 -0
  189. package/app/dist/assets/checkbox-BR8PiOkh.js.br +0 -0
  190. package/app/dist/assets/checkbox-BR8PiOkh.js.gz +0 -0
  191. package/app/dist/assets/code-loading-skeletons-kAn_Dql6.js +1 -0
  192. package/app/dist/assets/code-loading-skeletons-kAn_Dql6.js.br +0 -0
  193. package/app/dist/assets/code-loading-skeletons-kAn_Dql6.js.gz +0 -0
  194. package/app/dist/assets/code-rendering-DzjneiF5.js +1 -0
  195. package/app/dist/assets/code-theme-registration-DYIZVclA.js +1 -0
  196. package/app/dist/assets/detail-card-DJKEzf0a.js +1 -0
  197. package/app/dist/assets/detail-card-DJKEzf0a.js.br +0 -0
  198. package/app/dist/assets/detail-card-DJKEzf0a.js.gz +0 -0
  199. package/app/dist/assets/diff-stats-tally-DMh2WZPq.js +1 -0
  200. package/app/dist/assets/diff-stats-tally-DMh2WZPq.js.br +0 -0
  201. package/app/dist/assets/diff-stats-tally-DMh2WZPq.js.gz +0 -0
  202. package/app/dist/assets/dist-DOz2GbNP.js +1 -0
  203. package/app/dist/assets/dist-DOz2GbNP.js.br +0 -0
  204. package/app/dist/assets/dist-DOz2GbNP.js.gz +0 -0
  205. package/app/dist/assets/environment-mutations-osrKWXnp.js +1 -0
  206. package/app/dist/assets/environment-mutations-osrKWXnp.js.br +0 -0
  207. package/app/dist/assets/environment-mutations-osrKWXnp.js.gz +0 -0
  208. package/app/dist/assets/environment-workspace-display-eMF1RRUL.js +4 -0
  209. package/app/dist/assets/environment-workspace-display-eMF1RRUL.js.br +0 -0
  210. package/app/dist/assets/environment-workspace-display-eMF1RRUL.js.gz +0 -0
  211. package/app/dist/assets/event-code-block-CYcnOQCW.js +2 -0
  212. package/app/dist/assets/event-code-block-CYcnOQCW.js.br +0 -0
  213. package/app/dist/assets/event-code-block-CYcnOQCW.js.gz +0 -0
  214. package/app/dist/assets/expandable-text-VFXs5Ta3.js +1 -0
  215. package/app/dist/assets/expandable-text-VFXs5Ta3.js.br +0 -0
  216. package/app/dist/assets/expandable-text-VFXs5Ta3.js.gz +0 -0
  217. package/app/dist/assets/file-opener-preference-hoP95XEl.js +1 -0
  218. package/app/dist/assets/file-path-link-BwUZ49AA.js +1 -0
  219. package/app/dist/assets/file-path-link-BwUZ49AA.js.br +0 -0
  220. package/app/dist/assets/file-path-link-BwUZ49AA.js.gz +0 -0
  221. package/app/dist/assets/host-mutations-Da-c1bQb.js +1 -0
  222. package/app/dist/assets/host-mutations-Da-c1bQb.js.br +0 -0
  223. package/app/dist/assets/host-mutations-Da-c1bQb.js.gz +0 -0
  224. package/app/dist/assets/icon-extended-JRhR4VmE.js +1 -0
  225. package/app/dist/assets/icon-extended-JRhR4VmE.js.br +0 -0
  226. package/app/dist/assets/icon-extended-JRhR4VmE.js.gz +0 -0
  227. package/app/dist/assets/image-lightbox-BjXlPoxp.js +1 -0
  228. package/app/dist/assets/image-lightbox-BjXlPoxp.js.br +0 -0
  229. package/app/dist/assets/image-lightbox-BjXlPoxp.js.gz +0 -0
  230. package/app/dist/assets/index-7memi5ix.css +2 -0
  231. package/app/dist/assets/index-7memi5ix.css.br +0 -0
  232. package/app/dist/assets/index-7memi5ix.css.gz +0 -0
  233. package/app/dist/assets/index-miJf0-mc.js +395 -0
  234. package/app/dist/assets/index-miJf0-mc.js.br +0 -0
  235. package/app/dist/assets/index-miJf0-mc.js.gz +0 -0
  236. package/app/dist/assets/inline-rename-editor-VGNdrqFV.js +1 -0
  237. package/app/dist/assets/inline-rename-editor-VGNdrqFV.js.br +0 -0
  238. package/app/dist/assets/inline-rename-editor-VGNdrqFV.js.gz +0 -0
  239. package/app/dist/assets/launcherRow-CCEqWhEC.js +1 -0
  240. package/app/dist/assets/launcherRow-CCEqWhEC.js.br +0 -0
  241. package/app/dist/assets/launcherRow-CCEqWhEC.js.gz +0 -0
  242. package/app/dist/assets/localhost-link-rewrite-description-DKQydzzB.js +1 -0
  243. package/app/dist/assets/localhost-link-rewrite-description-DKQydzzB.js.br +0 -0
  244. package/app/dist/assets/localhost-link-rewrite-description-DKQydzzB.js.gz +0 -0
  245. package/app/dist/assets/machine-provider-queries-B4LtwicH.js +1 -0
  246. package/app/dist/assets/machine-server-access-Bx64IAre.js +1 -0
  247. package/app/dist/assets/markdown-file-image-routing-CFJQ7ixy.js +1 -0
  248. package/app/dist/assets/markdown-html-7GhEbEXf.js +1 -0
  249. package/app/dist/assets/markdown-html-7GhEbEXf.js.br +0 -0
  250. package/app/dist/assets/markdown-html-7GhEbEXf.js.gz +0 -0
  251. package/app/dist/assets/markdown-local-file-link-vLzD6FSY.js +2 -0
  252. package/app/dist/assets/markdown-local-file-link-vLzD6FSY.js.br +0 -0
  253. package/app/dist/assets/markdown-local-file-link-vLzD6FSY.js.gz +0 -0
  254. package/app/dist/assets/markdown-preview-BFRWATVY.js +38 -0
  255. package/app/dist/assets/markdown-preview-BFRWATVY.js.br +0 -0
  256. package/app/dist/assets/markdown-preview-BFRWATVY.js.gz +0 -0
  257. package/app/dist/assets/markdown-prompt-mentions-DZlDejXy.js +18 -0
  258. package/app/dist/assets/markdown-prompt-mentions-DZlDejXy.js.br +0 -0
  259. package/app/dist/assets/markdown-prompt-mentions-DZlDejXy.js.gz +0 -0
  260. package/app/dist/assets/model-load-error-message-C3EzABRM.js +1 -0
  261. package/app/dist/assets/model-load-error-message-C3EzABRM.js.br +0 -0
  262. package/app/dist/assets/model-load-error-message-C3EzABRM.js.gz +0 -0
  263. package/app/dist/assets/onboarding-telemetry-GApdi-1l.js +1 -0
  264. package/app/dist/assets/open-in-editor-button-Y_u-D0k2.js +1 -0
  265. package/app/dist/assets/open-in-editor-button-Y_u-D0k2.js.br +0 -0
  266. package/app/dist/assets/open-in-editor-button-Y_u-D0k2.js.gz +0 -0
  267. package/app/dist/assets/page-shell-BYbdkEb3.js +1 -0
  268. package/app/dist/assets/page-shell-BYbdkEb3.js.br +0 -0
  269. package/app/dist/assets/page-shell-BYbdkEb3.js.gz +0 -0
  270. package/app/dist/assets/pierre-worker-pool-BnSz5nfD.js +1 -0
  271. package/app/dist/assets/pierre-worker-pool-BnSz5nfD.js.br +0 -0
  272. package/app/dist/assets/pierre-worker-pool-BnSz5nfD.js.gz +0 -0
  273. package/app/dist/assets/plugin-detail-navigation-aTJpGH_F.js +1 -0
  274. package/app/dist/assets/plugin-detail-navigation-aTJpGH_F.js.br +0 -0
  275. package/app/dist/assets/plugin-detail-navigation-aTJpGH_F.js.gz +0 -0
  276. package/app/dist/assets/plugin-frontend-lDyYvhh3.js +4 -0
  277. package/app/dist/assets/plugin-frontend-lDyYvhh3.js.br +0 -0
  278. package/app/dist/assets/plugin-frontend-lDyYvhh3.js.gz +0 -0
  279. package/app/dist/assets/plugin-ui-C7eqgcqi.js +1 -0
  280. package/app/dist/assets/plugin-ui-C7eqgcqi.js.br +0 -0
  281. package/app/dist/assets/plugin-ui-C7eqgcqi.js.gz +0 -0
  282. package/app/dist/assets/project-default-execution-options-query-CWWq7bUV.js +1 -0
  283. package/app/dist/assets/queued-editor-typeahead-layout-DlhXYAxL.js +1 -0
  284. package/app/dist/assets/queued-editor-typeahead-layout-DlhXYAxL.js.br +0 -0
  285. package/app/dist/assets/queued-editor-typeahead-layout-DlhXYAxL.js.gz +0 -0
  286. package/app/dist/assets/queued-messages-layout-BBbOx6wW.js +3 -0
  287. package/app/dist/assets/queued-messages-layout-BBbOx6wW.js.br +0 -0
  288. package/app/dist/assets/queued-messages-layout-BBbOx6wW.js.gz +0 -0
  289. package/app/dist/assets/resource-list-CGtfzqUn.js +1 -0
  290. package/app/dist/assets/resource-list-CGtfzqUn.js.br +0 -0
  291. package/app/dist/assets/resource-list-CGtfzqUn.js.gz +0 -0
  292. package/app/dist/assets/root-compose-create-preference-DmF3fXg9.js +1 -0
  293. package/app/dist/assets/save-file-B2t-Bzj_.js +1 -0
  294. package/app/dist/assets/settings-nav-DEFhfJnQ.js +1 -0
  295. package/app/dist/assets/settings-nav-DEFhfJnQ.js.br +0 -0
  296. package/app/dist/assets/settings-nav-DEFhfJnQ.js.gz +0 -0
  297. package/app/dist/assets/settings-sections-ClCE1nN2.js +1 -0
  298. package/app/dist/assets/settings-sections-ClCE1nN2.js.br +0 -0
  299. package/app/dist/assets/settings-sections-ClCE1nN2.js.gz +0 -0
  300. package/app/dist/assets/shortcut-pill-BDbQywS5.js +1 -0
  301. package/app/dist/assets/sidebarTouchSensor-B2OqZZvs.js +1 -0
  302. package/app/dist/assets/sidebarTouchSensor-B2OqZZvs.js.br +0 -0
  303. package/app/dist/assets/sidebarTouchSensor-B2OqZZvs.js.gz +0 -0
  304. package/app/dist/assets/switch-Dd_I2Qsh.js +1 -0
  305. package/app/dist/assets/switch-Dd_I2Qsh.js.br +0 -0
  306. package/app/dist/assets/switch-Dd_I2Qsh.js.gz +0 -0
  307. package/app/dist/assets/textarea-DkG-OV6q.js +1 -0
  308. package/app/dist/assets/thread-event-parser-B6fN4N3n.js +1 -0
  309. package/app/dist/assets/thread-event-parser-B6fN4N3n.js.br +0 -0
  310. package/app/dist/assets/thread-event-parser-B6fN4N3n.js.gz +0 -0
  311. package/app/dist/assets/thread-panel-queries-C-XPYPcy.js +1 -0
  312. package/app/dist/assets/thread-panel-queries-C-XPYPcy.js.br +0 -0
  313. package/app/dist/assets/thread-panel-queries-C-XPYPcy.js.gz +0 -0
  314. package/app/dist/assets/thread-runtime-mutations-KJF8Qc-M.js +3 -0
  315. package/app/dist/assets/thread-runtime-mutations-KJF8Qc-M.js.br +0 -0
  316. package/app/dist/assets/thread-runtime-mutations-KJF8Qc-M.js.gz +0 -0
  317. package/app/dist/assets/thread-terminal-queries-B292g1eF.js +1 -0
  318. package/app/dist/assets/thread-terminal-queries-B292g1eF.js.br +0 -0
  319. package/app/dist/assets/thread-terminal-queries-B292g1eF.js.gz +0 -0
  320. package/app/dist/assets/threadRecentItems-C35igPO3.js +1 -0
  321. package/app/dist/assets/threadRecentItems-C35igPO3.js.br +0 -0
  322. package/app/dist/assets/threadRecentItems-C35igPO3.js.gz +0 -0
  323. package/app/dist/assets/threadWorkspaceOpenPath-BGyvH-pt.js +1 -0
  324. package/app/dist/assets/threadWorkspaceOpenPath-BGyvH-pt.js.br +0 -0
  325. package/app/dist/assets/threadWorkspaceOpenPath-BGyvH-pt.js.gz +0 -0
  326. package/app/dist/assets/title-bar-scroll-fade-wqWIokA4.js +1 -0
  327. package/app/dist/assets/title-bar-scroll-fade-wqWIokA4.js.br +0 -0
  328. package/app/dist/assets/title-bar-scroll-fade-wqWIokA4.js.gz +0 -0
  329. package/app/dist/assets/truncate-start-CKaHTcTC.js +1 -0
  330. package/app/dist/assets/use-hover-popover-Dnr_95zm.js +1 -0
  331. package/app/dist/assets/use-hover-popover-Dnr_95zm.js.br +0 -0
  332. package/app/dist/assets/use-hover-popover-Dnr_95zm.js.gz +0 -0
  333. package/app/dist/assets/useElementWidth-BASRxwD-.js +1 -0
  334. package/app/dist/assets/useElementWidth-BASRxwD-.js.br +0 -0
  335. package/app/dist/assets/useElementWidth-BASRxwD-.js.gz +0 -0
  336. package/app/dist/assets/useLocalOpenTargets-CsL8C0eF.js +1 -0
  337. package/app/dist/assets/useLocalOpenTargets-CsL8C0eF.js.br +0 -0
  338. package/app/dist/assets/useLocalOpenTargets-CsL8C0eF.js.gz +0 -0
  339. package/app/dist/assets/usePanelResizeSnap-CqCTAjdg.js +1 -0
  340. package/app/dist/assets/usePanelResizeSnap-CqCTAjdg.js.br +0 -0
  341. package/app/dist/assets/usePanelResizeSnap-CqCTAjdg.js.gz +0 -0
  342. package/app/dist/assets/usePanelTerminals-CqLfiRz6.js +1 -0
  343. package/app/dist/assets/usePanelTerminals-CqLfiRz6.js.br +0 -0
  344. package/app/dist/assets/usePanelTerminals-CqLfiRz6.js.gz +0 -0
  345. package/app/dist/assets/usePathSuggestions-CIn_MvCa.js +1 -0
  346. package/app/dist/assets/usePathSuggestions-CIn_MvCa.js.br +0 -0
  347. package/app/dist/assets/usePathSuggestions-CIn_MvCa.js.gz +0 -0
  348. package/app/dist/assets/useResolvedLiveFileTarget-CvjfYOSC.js +1 -0
  349. package/app/dist/assets/useResolvedLiveFileTarget-CvjfYOSC.js.br +0 -0
  350. package/app/dist/assets/useResolvedLiveFileTarget-CvjfYOSC.js.gz +0 -0
  351. package/app/dist/assets/useThreadTerminalController-tqqKdycc.js +1 -0
  352. package/app/dist/assets/useThreadTerminalController-tqqKdycc.js.br +0 -0
  353. package/app/dist/assets/useThreadTerminalController-tqqKdycc.js.gz +0 -0
  354. package/app/dist/assets/workspace-change-summary-BoPPVa7I.js +1 -0
  355. package/app/dist/assets/workspace-change-summary-BoPPVa7I.js.br +0 -0
  356. package/app/dist/assets/workspace-change-summary-BoPPVa7I.js.gz +0 -0
  357. package/app/dist/assets/workspace-checkout-display-W_I481Zp.js +32 -0
  358. package/app/dist/assets/workspace-checkout-display-W_I481Zp.js.br +0 -0
  359. package/app/dist/assets/workspace-checkout-display-W_I481Zp.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 +167 -18
  364. package/dist/bb-host-daemon.js +1 -1
  365. package/dist/bb-server.js +1 -1
  366. package/dist/bb.js +1 -1
  367. package/dist/index.d.ts +31 -31
  368. package/dist/index.js +3 -3
  369. package/dist/moonlet.js +1 -1
  370. package/host-daemon/dist/bb +2 -2
  371. package/host-daemon/dist/daemon-bundle.mjs +1 -1
  372. package/host-daemon/dist/moonlet +2 -2
  373. package/host-daemon/dist/moonlet-chunks/browser-7QZ77DDF.js +6 -0
  374. package/host-daemon/dist/moonlet-chunks/chunk-2WJ5OBYD.js +2 -0
  375. package/host-daemon/dist/moonlet-chunks/chunk-5UAU5YR6.js +2 -0
  376. package/host-daemon/dist/moonlet-chunks/chunk-DRBLPD5X.js +2 -0
  377. package/host-daemon/dist/moonlet-chunks/chunk-G2EBNO4B.js +6 -0
  378. package/host-daemon/dist/moonlet-chunks/chunk-OQHL63X3.js +2 -0
  379. package/host-daemon/dist/moonlet-chunks/chunk-PIKEBPA7.js +2 -0
  380. package/host-daemon/dist/moonlet-chunks/chunk-QBGPSYUS.js +139 -0
  381. package/host-daemon/dist/moonlet-chunks/chunk-QNWA6AJP.js +2 -0
  382. package/host-daemon/dist/moonlet-chunks/chunk-RECOR6RS.js +2 -0
  383. package/host-daemon/dist/moonlet-chunks/chunk-XRZDOFNW.js +2287 -0
  384. package/host-daemon/dist/moonlet-chunks/client-4F6NQSZY.js +2 -0
  385. package/host-daemon/dist/moonlet-chunks/commander-errors-VN24V6EN.js +3 -0
  386. package/host-daemon/dist/moonlet-chunks/context-env-77VYBPJB.js +2 -0
  387. package/host-daemon/dist/moonlet-chunks/context-hints-3ZFPLCNA.js +2 -0
  388. package/host-daemon/dist/moonlet-chunks/diagnostics-I7Y3HF7A.js +3 -0
  389. package/host-daemon/dist/moonlet-chunks/environment-KF2RMUNH.js +2 -0
  390. package/host-daemon/dist/moonlet-chunks/file-PLT6H4LO.js +3 -0
  391. package/host-daemon/dist/moonlet-chunks/guide-LQH44WBG.js +4 -0
  392. package/host-daemon/dist/moonlet-chunks/machine-JIFBFMR4.js +2 -0
  393. package/host-daemon/dist/moonlet-chunks/marketplace-4JHVVELE.js +2 -0
  394. package/host-daemon/dist/moonlet-chunks/permissions-Q2PTENOY.js +2 -0
  395. package/host-daemon/dist/moonlet-chunks/plugin-KJXBKWTM.js +2633 -0
  396. package/host-daemon/dist/moonlet-chunks/plugin-cli-proxy-F6VBLUIC.js +2 -0
  397. package/host-daemon/dist/moonlet-chunks/project-OPUQHGFZ.js +2 -0
  398. package/host-daemon/dist/moonlet-chunks/prompt-history-OD7GGW5U.js +2 -0
  399. package/host-daemon/dist/moonlet-chunks/provider-BYQAHQIW.js +2 -0
  400. package/host-daemon/dist/moonlet-chunks/schedule-FRINGIID.js +2 -0
  401. package/host-daemon/dist/moonlet-chunks/server-6OSUSDSN.js +8 -0
  402. package/host-daemon/dist/moonlet-chunks/settings-MZIKVKK2.js +4 -0
  403. package/host-daemon/dist/moonlet-chunks/skill-NBCY2BRD.js +5 -0
  404. package/host-daemon/dist/moonlet-chunks/status-A3O5G6PY.js +2 -0
  405. package/host-daemon/dist/moonlet-chunks/terminal-L3ORACZ2.js +3 -0
  406. package/host-daemon/dist/moonlet-chunks/theme-SMCJWS4A.js +2 -0
  407. package/host-daemon/dist/moonlet-chunks/thread-E4QOKPVU.js +29 -0
  408. package/host-daemon/dist/moonlet-chunks/updates-EDT44ENA.js +2 -0
  409. package/host-daemon/dist/moonlet-chunks/voice-BLMJ2GVF.js +2 -0
  410. package/package.json +2 -2
  411. package/server/dist/builtin-plugins/account-pool/dist/app.js +2 -2
  412. package/server/dist/builtin-plugins/agent-annotations/dist/app.js +3 -3
  413. package/server/dist/builtin-plugins/agent-board/dist/app.js +2 -2
  414. package/server/dist/builtin-plugins/ask-user-question/dist/app.js +2 -2
  415. package/server/dist/builtin-plugins/automations/dist/app.js +1 -1
  416. package/server/dist/builtin-plugins/bb-account/dist/app.js +2 -2
  417. package/server/dist/builtin-plugins/bb-guide/dist/app.js +1 -1
  418. package/server/dist/builtin-plugins/bb-guide/skills/bb-cli/SKILL.md +2 -0
  419. package/server/dist/builtin-plugins/bb-guide/skills/bb-cli/references/app-view.md +28 -0
  420. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/backend-cli-agents.md +1 -1
  421. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/backend-foundation.md +1 -1
  422. package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/frontend-api-index.md +4 -0
  423. package/server/dist/builtin-plugins/browser-automation/dist/app.js +1 -1
  424. package/server/dist/builtin-plugins/composer/dist/app.js +6 -6
  425. package/server/dist/builtin-plugins/concurrency-limit/dist/app.js +1 -1
  426. package/server/dist/builtin-plugins/connect/dist/app.js +5 -5
  427. package/server/dist/builtin-plugins/connect/dist/server.js +1 -1
  428. package/server/dist/builtin-plugins/connect/skills/share-server-links/SKILL.md +1 -1
  429. package/server/dist/builtin-plugins/connect-next/dist/app.js +2 -2
  430. package/server/dist/builtin-plugins/docs/dist/app.js +10 -10
  431. package/server/dist/builtin-plugins/documents/dist/package.json +1 -0
  432. package/server/dist/builtin-plugins/documents/dist/server.js +8 -0
  433. package/server/dist/builtin-plugins/documents/dist/server.meta.json +11 -0
  434. package/server/dist/builtin-plugins/documents/package.json +41 -0
  435. package/server/dist/builtin-plugins/documents/skills/design-documents/SKILL.md +56 -0
  436. package/server/dist/builtin-plugins/documents/skills/design-documents/references/diagram-kit.md +75 -0
  437. package/server/dist/builtin-plugins/documents/skills/documents/SKILL.md +113 -0
  438. package/server/dist/builtin-plugins/drafts/dist/app.js +1 -1
  439. package/server/dist/builtin-plugins/environment-git-worktree/dist/app.js +1 -1
  440. package/server/dist/builtin-plugins/environment-modal-sandbox/dist/app.js +3 -3
  441. package/server/dist/builtin-plugins/environment-project-checkout/dist/app.js +1 -1
  442. package/server/dist/builtin-plugins/github/dist/app.css +1 -1
  443. package/server/dist/builtin-plugins/github/dist/app.js +2 -2
  444. package/server/dist/builtin-plugins/github/package.json +5 -2
  445. package/server/dist/builtin-plugins/github/skills/github-change/SKILL.md +305 -0
  446. package/server/dist/builtin-plugins/github/skills/github-change/pre-push.d.mts +10 -0
  447. package/server/dist/builtin-plugins/github/skills/github-change/pre-push.mjs +256 -0
  448. package/server/dist/builtin-plugins/github/skills/github-change/references/branches.md +75 -0
  449. package/server/dist/builtin-plugins/github/skills/github-change/references/merging.md +119 -0
  450. package/server/dist/builtin-plugins/github-pr-status/dist/app.js +2 -2
  451. package/server/dist/builtin-plugins/inline-vis/dist/app.js +2 -2
  452. package/server/dist/builtin-plugins/keep-awake/dist/app.js +1 -1
  453. package/server/dist/builtin-plugins/library/dist/app.js +2 -2
  454. package/server/dist/builtin-plugins/library/package.json +4 -1
  455. package/server/dist/builtin-plugins/mail/dist/package.json +1 -0
  456. package/server/dist/builtin-plugins/mail/dist/server.js +8 -0
  457. package/server/dist/builtin-plugins/mail/dist/server.meta.json +11 -0
  458. package/server/dist/builtin-plugins/mail/package.json +40 -0
  459. package/server/dist/builtin-plugins/mail/skills/mail/SKILL.md +293 -0
  460. package/server/dist/builtin-plugins/marketplace.json +76 -19
  461. package/server/dist/builtin-plugins/memory/dist/app.js +1 -1
  462. package/server/dist/builtin-plugins/monaco-editor/dist/app.js +1 -1
  463. package/server/dist/builtin-plugins/navigation/dist/app.js +1 -1
  464. package/server/dist/builtin-plugins/notify-feed/dist/app.js +2 -2
  465. package/server/dist/builtin-plugins/orbit/dist/app.css +1 -1
  466. package/server/dist/builtin-plugins/orbit/dist/app.js +8 -8
  467. package/server/dist/builtin-plugins/orbit/dist/assets/assets/orbit-guidance/manifest.json +2 -66
  468. package/server/dist/builtin-plugins/orbit/dist/assets/assets/orbit-guidance/starter/plugins/orbit/back/CLAUDE.md +3 -3
  469. package/server/dist/builtin-plugins/orbit/dist/assets/assets/orbit-guidance/starter/plugins/orbit/front/CLAUDE.md +4 -4
  470. package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/config/policy.toml +0 -7
  471. package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/fixed-runner/linux-x64/manifest.json +4 -4
  472. package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/revision +1 -1
  473. package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/source.json +1 -1
  474. package/server/dist/builtin-plugins/orbit/dist/assets/plugins/moonlet/back/CLAUDE.md +3 -3
  475. package/server/dist/builtin-plugins/orbit/dist/assets/plugins/moonlet/front/CLAUDE.md +4 -4
  476. package/server/dist/builtin-plugins/orbit/dist/assets/plugins/moonlet/front/platform.md +189 -0
  477. package/server/dist/builtin-plugins/orbit/dist/server.js +374 -371
  478. package/server/dist/builtin-plugins/orbit/package.json +0 -4
  479. package/server/dist/builtin-plugins/pdf-preview/dist/app.js +1 -1
  480. package/server/dist/builtin-plugins/plugin-api-docs/dist/app.js +2 -2
  481. package/server/dist/builtin-plugins/plugin-api-docs/dist/server.js +2 -2
  482. package/server/dist/builtin-plugins/plugin-api-tester/dist/app.js +1 -1
  483. package/server/dist/builtin-plugins/prompt-library/dist/app.js +2 -2
  484. package/server/dist/builtin-plugins/provider-acp/dist/app.js +1 -1
  485. package/server/dist/builtin-plugins/provider-codex/dist/app.js +2 -2
  486. package/server/dist/builtin-plugins/provider-codex/dist/host.js +1 -1
  487. package/server/dist/builtin-plugins/provider-codex/dist/host.meta.json +1 -1
  488. package/server/dist/builtin-plugins/provider-pi/dist/app.js +2 -2
  489. package/server/dist/builtin-plugins/provider-usage/dist/app.js +2 -2
  490. package/server/dist/builtin-plugins/push-notifications/dist/app.js +2 -2
  491. package/server/dist/builtin-plugins/routines/dist/package.json +1 -0
  492. package/server/dist/builtin-plugins/routines/dist/server.js +8 -0
  493. package/server/dist/builtin-plugins/routines/dist/server.meta.json +11 -0
  494. package/server/dist/builtin-plugins/routines/package.json +39 -0
  495. package/server/dist/builtin-plugins/routines/skills/keeping-tasks/SKILL.md +72 -0
  496. package/server/dist/builtin-plugins/scheduled-send/dist/app.js +1 -1
  497. package/server/dist/builtin-plugins/secrets/dist/app.js +2 -2
  498. package/server/dist/builtin-plugins/side-chat/dist/app.js +1 -1
  499. package/server/dist/builtin-plugins/storage-retention/dist/app.js +1 -1
  500. package/server/dist/builtin-plugins/tasks/dist/app.js +10 -10
  501. package/server/dist/builtin-plugins/theme-preview/dist/app.js +2 -2
  502. package/server/dist/builtin-plugins/thread-list/dist/app.js +24 -24
  503. package/server/dist/builtin-plugins/workflows/dist/app.js +1 -1
  504. package/server/dist/builtin-skills/bb-cli/SKILL.md +2 -0
  505. package/server/dist/builtin-skills/bb-cli/references/app-view.md +28 -0
  506. package/server/dist/builtin-skills/bb-plugin-authoring/references/backend-cli-agents.md +1 -1
  507. package/server/dist/builtin-skills/bb-plugin-authoring/references/backend-foundation.md +1 -1
  508. package/server/dist/builtin-skills/bb-plugin-authoring/references/frontend-api-index.md +4 -0
  509. package/server/dist/start-server.js +28 -10
  510. package/app/dist/assets/AddMachineDialog-Dl8vfB3H.js +0 -1
  511. package/app/dist/assets/AddMachineDialog-Dl8vfB3H.js.br +0 -0
  512. package/app/dist/assets/AddMachineDialog-Dl8vfB3H.js.gz +0 -0
  513. package/app/dist/assets/AppCommandShortcutHint-BhFLlQh3.js +0 -1
  514. package/app/dist/assets/AppFileExternalNavigationDispatcher-CfCHrwiS.js +0 -1
  515. package/app/dist/assets/AppFileExternalNavigationDispatcher-CfCHrwiS.js.br +0 -0
  516. package/app/dist/assets/AppFileExternalNavigationDispatcher-CfCHrwiS.js.gz +0 -0
  517. package/app/dist/assets/AppToasterView-UPI3OjKE.js +0 -1
  518. package/app/dist/assets/BrowserTabDeck-DKncfMoc.js +0 -1
  519. package/app/dist/assets/BrowserTabDeck-DKncfMoc.js.br +0 -0
  520. package/app/dist/assets/BrowserTabDeck-DKncfMoc.js.gz +0 -0
  521. package/app/dist/assets/CommandPaletteBody-ChJuBDjf.js +0 -1
  522. package/app/dist/assets/CommandPaletteBody-ChJuBDjf.js.br +0 -0
  523. package/app/dist/assets/CommandPaletteBody-ChJuBDjf.js.gz +0 -0
  524. package/app/dist/assets/DiffHost-gcv-k5V7.js +0 -1
  525. package/app/dist/assets/DiffHost-gcv-k5V7.js.br +0 -0
  526. package/app/dist/assets/DiffHost-gcv-k5V7.js.gz +0 -0
  527. package/app/dist/assets/ExperimentalFileLinkMenu-Bke92TNL.js +0 -1
  528. package/app/dist/assets/ExperimentalFileLinkMenu-Bke92TNL.js.br +0 -0
  529. package/app/dist/assets/ExperimentalFileLinkMenu-Bke92TNL.js.gz +0 -0
  530. package/app/dist/assets/FilePreview-BKzPfdDx.js +0 -3
  531. package/app/dist/assets/FilePreview-BKzPfdDx.js.br +0 -0
  532. package/app/dist/assets/FilePreview-BKzPfdDx.js.gz +0 -0
  533. package/app/dist/assets/GitDiffCardHeader-CarkHl-t.js +0 -1
  534. package/app/dist/assets/GitDiffCardHeader-CarkHl-t.js.br +0 -0
  535. package/app/dist/assets/GitDiffCardHeader-CarkHl-t.js.gz +0 -0
  536. package/app/dist/assets/InlineMessageEditorFrame-Ch-iUel6.js +0 -1
  537. package/app/dist/assets/InlineMessageEditorFrame-Ch-iUel6.js.br +0 -0
  538. package/app/dist/assets/InlineMessageEditorFrame-Ch-iUel6.js.gz +0 -0
  539. package/app/dist/assets/MachineLabel-3EnPA0Jk.js +0 -1
  540. package/app/dist/assets/MachineLabel-3EnPA0Jk.js.br +0 -0
  541. package/app/dist/assets/MachineLabel-3EnPA0Jk.js.gz +0 -0
  542. package/app/dist/assets/MachineRenameDialog-DfKwQWDo.js +0 -1
  543. package/app/dist/assets/MachineRenameDialog-DfKwQWDo.js.br +0 -0
  544. package/app/dist/assets/MachineRenameDialog-DfKwQWDo.js.gz +0 -0
  545. package/app/dist/assets/MachineSettingsView-B-JviHGd.js +0 -1
  546. package/app/dist/assets/MachineSettingsView-B-JviHGd.js.br +0 -0
  547. package/app/dist/assets/MachineSettingsView-B-JviHGd.js.gz +0 -0
  548. package/app/dist/assets/MicrophonePreferences-C4TuV1t-.js +0 -1
  549. package/app/dist/assets/MicrophonePreferences-C4TuV1t-.js.br +0 -0
  550. package/app/dist/assets/MicrophonePreferences-C4TuV1t-.js.gz +0 -0
  551. package/app/dist/assets/ModelReasoningMenu-DSwQ3Kvc.js +0 -1
  552. package/app/dist/assets/ModelReasoningMenu-DSwQ3Kvc.js.br +0 -0
  553. package/app/dist/assets/ModelReasoningMenu-DSwQ3Kvc.js.gz +0 -0
  554. package/app/dist/assets/MoonletDiff-DClfUMx9.js +0 -1
  555. package/app/dist/assets/MoonletDiff-DClfUMx9.js.br +0 -0
  556. package/app/dist/assets/MoonletDiff-DClfUMx9.js.gz +0 -0
  557. package/app/dist/assets/MoonletDiffSplit-C575qQ7n.js +0 -2
  558. package/app/dist/assets/MoonletDiffSplit-C575qQ7n.js.br +0 -0
  559. package/app/dist/assets/MoonletDiffSplit-C575qQ7n.js.gz +0 -0
  560. package/app/dist/assets/MoonletSourceCode--hcpwNF3.js +0 -2
  561. package/app/dist/assets/MoonletSourceCode--hcpwNF3.js.br +0 -0
  562. package/app/dist/assets/MoonletSourceCode--hcpwNF3.js.gz +0 -0
  563. package/app/dist/assets/NewTabPage-BXEN2bDs.js +0 -2
  564. package/app/dist/assets/NewTabPage-BXEN2bDs.js.br +0 -0
  565. package/app/dist/assets/NewTabPage-BXEN2bDs.js.gz +0 -0
  566. package/app/dist/assets/NewThreadComposer-B8TSRV1z.js +0 -1
  567. package/app/dist/assets/NewThreadComposer-B8TSRV1z.js.br +0 -0
  568. package/app/dist/assets/NewThreadComposer-B8TSRV1z.js.gz +0 -0
  569. package/app/dist/assets/OnboardingFlow-QYADCI2S.js +0 -1
  570. package/app/dist/assets/OnboardingFlow-QYADCI2S.js.br +0 -0
  571. package/app/dist/assets/OnboardingFlow-QYADCI2S.js.gz +0 -0
  572. package/app/dist/assets/OptionPicker-oKb3VLcx.js +0 -1
  573. package/app/dist/assets/OptionPicker-oKb3VLcx.js.br +0 -0
  574. package/app/dist/assets/OptionPicker-oKb3VLcx.js.gz +0 -0
  575. package/app/dist/assets/PaletteShell-ZC-7Bc-v.js +0 -1
  576. package/app/dist/assets/PaletteShell-ZC-7Bc-v.js.br +0 -0
  577. package/app/dist/assets/PaletteShell-ZC-7Bc-v.js.gz +0 -0
  578. package/app/dist/assets/PaneMaximizeButton-C6iV44zC.js +0 -1
  579. package/app/dist/assets/PaneMaximizeButton-C6iV44zC.js.br +0 -0
  580. package/app/dist/assets/PaneMaximizeButton-C6iV44zC.js.gz +0 -0
  581. package/app/dist/assets/PierreLineSelectionActions-Bo81aKX6.js +0 -1
  582. package/app/dist/assets/PierreLineSelectionActions-Bo81aKX6.js.br +0 -0
  583. package/app/dist/assets/PierreLineSelectionActions-Bo81aKX6.js.gz +0 -0
  584. package/app/dist/assets/PluginPanelRightPanelHost-ueqHfSCN.js +0 -1
  585. package/app/dist/assets/PluginPanelRightPanelHost-ueqHfSCN.js.br +0 -0
  586. package/app/dist/assets/PluginPanelRightPanelHost-ueqHfSCN.js.gz +0 -0
  587. package/app/dist/assets/PluginSettingsSections-D3RDsVGz.js +0 -2
  588. package/app/dist/assets/PluginSettingsSections-D3RDsVGz.js.br +0 -0
  589. package/app/dist/assets/PluginSettingsSections-D3RDsVGz.js.gz +0 -0
  590. package/app/dist/assets/PluginThreadChat-CvGDjSf-.js +0 -1
  591. package/app/dist/assets/PluginThreadChat-CvGDjSf-.js.br +0 -0
  592. package/app/dist/assets/PluginThreadChat-CvGDjSf-.js.gz +0 -0
  593. package/app/dist/assets/ProjectDetailSettingsView-B_VAoK3G.js +0 -1
  594. package/app/dist/assets/ProjectDetailSettingsView-B_VAoK3G.js.br +0 -0
  595. package/app/dist/assets/ProjectDetailSettingsView-B_VAoK3G.js.gz +0 -0
  596. package/app/dist/assets/ProjectMachineSetupDialog-DUQ6HBpw.js +0 -1
  597. package/app/dist/assets/ProjectMachineSetupDialog-DUQ6HBpw.js.br +0 -0
  598. package/app/dist/assets/ProjectMachineSetupDialog-DUQ6HBpw.js.gz +0 -0
  599. package/app/dist/assets/ProjectsSettingsSection-DeZshh1R.js +0 -3
  600. package/app/dist/assets/ProjectsSettingsSection-DeZshh1R.js.br +0 -0
  601. package/app/dist/assets/ProjectsSettingsSection-DeZshh1R.js.gz +0 -0
  602. package/app/dist/assets/QueuedMessagesList-j0n_jD6E.js +0 -3
  603. package/app/dist/assets/QueuedMessagesList-j0n_jD6E.js.br +0 -0
  604. package/app/dist/assets/QueuedMessagesList-j0n_jD6E.js.gz +0 -0
  605. package/app/dist/assets/RemotePathBrowser-Dq_ALdsP.js +0 -1
  606. package/app/dist/assets/RemotePathBrowser-Dq_ALdsP.js.br +0 -0
  607. package/app/dist/assets/RemotePathBrowser-Dq_ALdsP.js.gz +0 -0
  608. package/app/dist/assets/RootComposeView-CvrGTSeD.js +0 -1
  609. package/app/dist/assets/RootComposeView-CvrGTSeD.js.br +0 -0
  610. package/app/dist/assets/RootComposeView-CvrGTSeD.js.gz +0 -0
  611. package/app/dist/assets/SecondaryPanelLayout-ByRj6_ga.js +0 -1
  612. package/app/dist/assets/SecondaryPanelLayout-ByRj6_ga.js.br +0 -0
  613. package/app/dist/assets/SecondaryPanelLayout-ByRj6_ga.js.gz +0 -0
  614. package/app/dist/assets/ServerMoveOverlayView-ZFUyt3mo.js +0 -1
  615. package/app/dist/assets/ServerMoveOverlayView-ZFUyt3mo.js.br +0 -0
  616. package/app/dist/assets/ServerMoveOverlayView-ZFUyt3mo.js.gz +0 -0
  617. package/app/dist/assets/SettingsSidebar-CC0US3fx.js +0 -1
  618. package/app/dist/assets/SettingsSidebar-CC0US3fx.js.br +0 -0
  619. package/app/dist/assets/SettingsSidebar-CC0US3fx.js.gz +0 -0
  620. package/app/dist/assets/SettingsView-D-REJxcf.js +0 -7
  621. package/app/dist/assets/SettingsView-D-REJxcf.js.br +0 -0
  622. package/app/dist/assets/SettingsView-D-REJxcf.js.gz +0 -0
  623. package/app/dist/assets/SidebarFooterCustomize-C3eq-A5i.js +0 -1
  624. package/app/dist/assets/SidebarFooterCustomize-C3eq-A5i.js.br +0 -0
  625. package/app/dist/assets/SidebarFooterCustomize-C3eq-A5i.js.gz +0 -0
  626. package/app/dist/assets/SidebarVisibilityCustomize-Cx39KCKy.js +0 -1
  627. package/app/dist/assets/SidebarVisibilityCustomize-Cx39KCKy.js.br +0 -0
  628. package/app/dist/assets/SidebarVisibilityCustomize-Cx39KCKy.js.gz +0 -0
  629. package/app/dist/assets/SourceCodeHost-BJQ1cKDn.js +0 -2
  630. package/app/dist/assets/SourceCodeHost-BJQ1cKDn.js.br +0 -0
  631. package/app/dist/assets/SourceCodeHost-BJQ1cKDn.js.gz +0 -0
  632. package/app/dist/assets/SplitWorkspaceRoute-Banzf-Tm.js +0 -2
  633. package/app/dist/assets/SplitWorkspaceRoute-Banzf-Tm.js.br +0 -0
  634. package/app/dist/assets/SplitWorkspaceRoute-Banzf-Tm.js.gz +0 -0
  635. package/app/dist/assets/TerminalOutputBlock-D0VM9Jws.js +0 -4
  636. package/app/dist/assets/TerminalOutputBlock-D0VM9Jws.js.br +0 -0
  637. package/app/dist/assets/TerminalOutputBlock-D0VM9Jws.js.gz +0 -0
  638. package/app/dist/assets/ThreadActionsMenu-Be41ilky.js +0 -1
  639. package/app/dist/assets/ThreadActionsMenu-Be41ilky.js.br +0 -0
  640. package/app/dist/assets/ThreadActionsMenu-Be41ilky.js.gz +0 -0
  641. package/app/dist/assets/ThreadDetailView-lmuuS2LT.js +0 -6
  642. package/app/dist/assets/ThreadDetailView-lmuuS2LT.js.br +0 -0
  643. package/app/dist/assets/ThreadDetailView-lmuuS2LT.js.gz +0 -0
  644. package/app/dist/assets/ThreadSearchPaletteMode-B7_3e0JW.js +0 -1
  645. package/app/dist/assets/ThreadSearchPaletteMode-B7_3e0JW.js.br +0 -0
  646. package/app/dist/assets/ThreadSearchPaletteMode-B7_3e0JW.js.gz +0 -0
  647. package/app/dist/assets/ThreadSecondaryPanel-B5Xo3sGS.js +0 -1
  648. package/app/dist/assets/ThreadSecondaryPanel-B5Xo3sGS.js.br +0 -0
  649. package/app/dist/assets/ThreadSecondaryPanel-B5Xo3sGS.js.gz +0 -0
  650. package/app/dist/assets/ThreadSecondaryPanelTabContent-CpUiBu7w.js +0 -3
  651. package/app/dist/assets/ThreadSecondaryPanelTabContent-CpUiBu7w.js.br +0 -0
  652. package/app/dist/assets/ThreadSecondaryPanelTabContent-CpUiBu7w.js.gz +0 -0
  653. package/app/dist/assets/ThreadStatusGlyph-CAMnlhDc.js +0 -1
  654. package/app/dist/assets/ThreadStatusGlyph-CAMnlhDc.js.br +0 -0
  655. package/app/dist/assets/ThreadStatusGlyph-CAMnlhDc.js.gz +0 -0
  656. package/app/dist/assets/ThreadTerminalPanel-C0WfJ4UH.js +0 -1
  657. package/app/dist/assets/ThreadTerminalPanel-C0WfJ4UH.js.br +0 -0
  658. package/app/dist/assets/ThreadTerminalPanel-C0WfJ4UH.js.gz +0 -0
  659. package/app/dist/assets/ThreadTerminalView-BDXbzj5v.js +0 -1
  660. package/app/dist/assets/ThreadTerminalView-BDXbzj5v.js.br +0 -0
  661. package/app/dist/assets/ThreadTerminalView-BDXbzj5v.js.gz +0 -0
  662. package/app/dist/assets/ThreadTimelineNavigationContext-Cri1DRo3.js +0 -2
  663. package/app/dist/assets/ThreadTimelineNavigationContext-Cri1DRo3.js.br +0 -0
  664. package/app/dist/assets/ThreadTimelineNavigationContext-Cri1DRo3.js.gz +0 -0
  665. package/app/dist/assets/ThreadUnarchiveButton-5W-phNp8.js +0 -1
  666. package/app/dist/assets/TimelineDetailScroll-LJaplQS2.js +0 -1
  667. package/app/dist/assets/TimelineDetailScroll-LJaplQS2.js.br +0 -0
  668. package/app/dist/assets/TimelineDetailScroll-LJaplQS2.js.gz +0 -0
  669. package/app/dist/assets/TimelineFileDiffBlock-BU6wqBKY.js +0 -6
  670. package/app/dist/assets/TimelineFileDiffBlock-BU6wqBKY.js.br +0 -0
  671. package/app/dist/assets/TimelineFileDiffBlock-BU6wqBKY.js.gz +0 -0
  672. package/app/dist/assets/TimelineSelectionMenu-BYrBCuAP.js +0 -22
  673. package/app/dist/assets/TimelineSelectionMenu-BYrBCuAP.js.br +0 -0
  674. package/app/dist/assets/TimelineSelectionMenu-BYrBCuAP.js.gz +0 -0
  675. package/app/dist/assets/ToolsView-CmGCBiPN.js +0 -4
  676. package/app/dist/assets/ToolsView-CmGCBiPN.js.br +0 -0
  677. package/app/dist/assets/ToolsView-CmGCBiPN.js.gz +0 -0
  678. package/app/dist/assets/ToolsViewSplits-DPtcX0yf.js +0 -2
  679. package/app/dist/assets/ToolsViewSplits-DPtcX0yf.js.br +0 -0
  680. package/app/dist/assets/ToolsViewSplits-DPtcX0yf.js.gz +0 -0
  681. package/app/dist/assets/WaveformVisualizer-D0MXqbd0.js +0 -1
  682. package/app/dist/assets/WaveformVisualizer-D0MXqbd0.js.br +0 -0
  683. package/app/dist/assets/WaveformVisualizer-D0MXqbd0.js.gz +0 -0
  684. package/app/dist/assets/absolute-file-path-vyy0zcO-.js +0 -1
  685. package/app/dist/assets/app-fixed-tab-navigation-DeiQd_XC.js +0 -1
  686. package/app/dist/assets/app-fixed-tab-navigation-DeiQd_XC.js.br +0 -0
  687. package/app/dist/assets/app-fixed-tab-navigation-DeiQd_XC.js.gz +0 -0
  688. package/app/dist/assets/audio-input-device-preference-yVid2XSp.js +0 -1
  689. package/app/dist/assets/audio-input-device-preference-yVid2XSp.js.br +0 -0
  690. package/app/dist/assets/audio-input-device-preference-yVid2XSp.js.gz +0 -0
  691. package/app/dist/assets/bottom-anchored-scroll-body-WeoJdyai.js +0 -1
  692. package/app/dist/assets/bottom-anchored-scroll-body-WeoJdyai.js.br +0 -0
  693. package/app/dist/assets/bottom-anchored-scroll-body-WeoJdyai.js.gz +0 -0
  694. package/app/dist/assets/browser-url-DqJM-zuw.js +0 -1
  695. package/app/dist/assets/browser-url-DqJM-zuw.js.br +0 -0
  696. package/app/dist/assets/browser-url-DqJM-zuw.js.gz +0 -0
  697. package/app/dist/assets/checkbox-gAzWRp2N.js +0 -1
  698. package/app/dist/assets/checkbox-gAzWRp2N.js.br +0 -0
  699. package/app/dist/assets/checkbox-gAzWRp2N.js.gz +0 -0
  700. package/app/dist/assets/code-loading-skeletons-Do9Lt5lG.js +0 -1
  701. package/app/dist/assets/code-loading-skeletons-Do9Lt5lG.js.br +0 -0
  702. package/app/dist/assets/code-loading-skeletons-Do9Lt5lG.js.gz +0 -0
  703. package/app/dist/assets/code-rendering-CB_Tjea9.js +0 -1
  704. package/app/dist/assets/code-theme-registration-DM0p4sbe.js +0 -1
  705. package/app/dist/assets/detail-card-CMFvKeTK.js +0 -1
  706. package/app/dist/assets/detail-card-CMFvKeTK.js.br +0 -0
  707. package/app/dist/assets/detail-card-CMFvKeTK.js.gz +0 -0
  708. package/app/dist/assets/diff-stats-tally-Dw-rOnAz.js +0 -1
  709. package/app/dist/assets/diff-stats-tally-Dw-rOnAz.js.br +0 -0
  710. package/app/dist/assets/diff-stats-tally-Dw-rOnAz.js.gz +0 -0
  711. package/app/dist/assets/dist-DCtgdX7b.js +0 -1
  712. package/app/dist/assets/environment-mutations-BC36c0bL.js +0 -1
  713. package/app/dist/assets/environment-mutations-BC36c0bL.js.br +0 -0
  714. package/app/dist/assets/environment-mutations-BC36c0bL.js.gz +0 -0
  715. package/app/dist/assets/environment-workspace-display-tAlPIvWD.js +0 -4
  716. package/app/dist/assets/environment-workspace-display-tAlPIvWD.js.br +0 -0
  717. package/app/dist/assets/environment-workspace-display-tAlPIvWD.js.gz +0 -0
  718. package/app/dist/assets/event-code-block-Cq92iOUc.js +0 -2
  719. package/app/dist/assets/event-code-block-Cq92iOUc.js.br +0 -0
  720. package/app/dist/assets/event-code-block-Cq92iOUc.js.gz +0 -0
  721. package/app/dist/assets/expandable-text-C_MF8fBq.js +0 -1
  722. package/app/dist/assets/expandable-text-C_MF8fBq.js.br +0 -0
  723. package/app/dist/assets/expandable-text-C_MF8fBq.js.gz +0 -0
  724. package/app/dist/assets/file-opener-preference-hnm9qMyH.js +0 -1
  725. package/app/dist/assets/file-path-link-Sd9c_QhD.js +0 -1
  726. package/app/dist/assets/file-path-link-Sd9c_QhD.js.br +0 -0
  727. package/app/dist/assets/file-path-link-Sd9c_QhD.js.gz +0 -0
  728. package/app/dist/assets/host-mutations-BQ2yoafK.js +0 -1
  729. package/app/dist/assets/host-mutations-BQ2yoafK.js.br +0 -0
  730. package/app/dist/assets/host-mutations-BQ2yoafK.js.gz +0 -0
  731. package/app/dist/assets/icon-extended-CJqNtXV6.js +0 -1
  732. package/app/dist/assets/icon-extended-CJqNtXV6.js.br +0 -0
  733. package/app/dist/assets/icon-extended-CJqNtXV6.js.gz +0 -0
  734. package/app/dist/assets/image-lightbox-cOHx3P0_.js +0 -1
  735. package/app/dist/assets/image-lightbox-cOHx3P0_.js.br +0 -0
  736. package/app/dist/assets/image-lightbox-cOHx3P0_.js.gz +0 -0
  737. package/app/dist/assets/index-CzIxoAdt.css +0 -2
  738. package/app/dist/assets/index-CzIxoAdt.css.br +0 -0
  739. package/app/dist/assets/index-CzIxoAdt.css.gz +0 -0
  740. package/app/dist/assets/index-DywQft6v.js +0 -395
  741. package/app/dist/assets/index-DywQft6v.js.br +0 -0
  742. package/app/dist/assets/index-DywQft6v.js.gz +0 -0
  743. package/app/dist/assets/inline-rename-editor-C31x_Vii.js +0 -1
  744. package/app/dist/assets/inline-rename-editor-C31x_Vii.js.br +0 -0
  745. package/app/dist/assets/inline-rename-editor-C31x_Vii.js.gz +0 -0
  746. package/app/dist/assets/launcherRow-CIRel7pU.js +0 -1
  747. package/app/dist/assets/launcherRow-CIRel7pU.js.br +0 -0
  748. package/app/dist/assets/launcherRow-CIRel7pU.js.gz +0 -0
  749. package/app/dist/assets/localhost-link-rewrite-description-CUL3J1m3.js +0 -1
  750. package/app/dist/assets/localhost-link-rewrite-description-CUL3J1m3.js.br +0 -0
  751. package/app/dist/assets/localhost-link-rewrite-description-CUL3J1m3.js.gz +0 -0
  752. package/app/dist/assets/machine-provider-queries-BOkOiLWW.js +0 -1
  753. package/app/dist/assets/machine-server-access-A6roSDGI.js +0 -1
  754. package/app/dist/assets/markdown-file-image-routing-DKeTvtto.js +0 -1
  755. package/app/dist/assets/markdown-html-Dh624lue.js +0 -1
  756. package/app/dist/assets/markdown-html-Dh624lue.js.br +0 -0
  757. package/app/dist/assets/markdown-html-Dh624lue.js.gz +0 -0
  758. package/app/dist/assets/markdown-local-file-link-Dg8ceT9_.js +0 -2
  759. package/app/dist/assets/markdown-local-file-link-Dg8ceT9_.js.br +0 -0
  760. package/app/dist/assets/markdown-local-file-link-Dg8ceT9_.js.gz +0 -0
  761. package/app/dist/assets/markdown-preview-B_5tpLZD.js +0 -38
  762. package/app/dist/assets/markdown-preview-B_5tpLZD.js.br +0 -0
  763. package/app/dist/assets/markdown-preview-B_5tpLZD.js.gz +0 -0
  764. package/app/dist/assets/markdown-prompt-mentions-DlCJ2vLH.js +0 -18
  765. package/app/dist/assets/markdown-prompt-mentions-DlCJ2vLH.js.br +0 -0
  766. package/app/dist/assets/markdown-prompt-mentions-DlCJ2vLH.js.gz +0 -0
  767. package/app/dist/assets/model-load-error-message-BPX61r0F.js +0 -1
  768. package/app/dist/assets/model-load-error-message-BPX61r0F.js.br +0 -0
  769. package/app/dist/assets/model-load-error-message-BPX61r0F.js.gz +0 -0
  770. package/app/dist/assets/onboarding-telemetry-BntFNLE-.js +0 -1
  771. package/app/dist/assets/open-in-editor-button-C0h4mK8C.js +0 -1
  772. package/app/dist/assets/open-in-editor-button-C0h4mK8C.js.br +0 -0
  773. package/app/dist/assets/open-in-editor-button-C0h4mK8C.js.gz +0 -0
  774. package/app/dist/assets/page-shell-B0egfwsE.js +0 -1
  775. package/app/dist/assets/page-shell-B0egfwsE.js.br +0 -0
  776. package/app/dist/assets/page-shell-B0egfwsE.js.gz +0 -0
  777. package/app/dist/assets/pierre-worker-pool-BdGvR7YL.js +0 -1
  778. package/app/dist/assets/pierre-worker-pool-BdGvR7YL.js.br +0 -0
  779. package/app/dist/assets/pierre-worker-pool-BdGvR7YL.js.gz +0 -0
  780. package/app/dist/assets/plugin-detail-navigation-D0AE4TJn.js +0 -1
  781. package/app/dist/assets/plugin-detail-navigation-D0AE4TJn.js.br +0 -0
  782. package/app/dist/assets/plugin-detail-navigation-D0AE4TJn.js.gz +0 -0
  783. package/app/dist/assets/plugin-frontend-DKOgBmRL.js +0 -4
  784. package/app/dist/assets/plugin-frontend-DKOgBmRL.js.br +0 -0
  785. package/app/dist/assets/plugin-frontend-DKOgBmRL.js.gz +0 -0
  786. package/app/dist/assets/plugin-ui-DiDJqXuP.js +0 -1
  787. package/app/dist/assets/plugin-ui-DiDJqXuP.js.br +0 -0
  788. package/app/dist/assets/plugin-ui-DiDJqXuP.js.gz +0 -0
  789. package/app/dist/assets/project-default-execution-options-query-zaw3eT2-.js +0 -1
  790. package/app/dist/assets/queued-editor-typeahead-layout-ChMEPGKt.js +0 -1
  791. package/app/dist/assets/queued-editor-typeahead-layout-ChMEPGKt.js.br +0 -0
  792. package/app/dist/assets/queued-editor-typeahead-layout-ChMEPGKt.js.gz +0 -0
  793. package/app/dist/assets/queued-messages-layout-CeyDFKjJ.js +0 -3
  794. package/app/dist/assets/queued-messages-layout-CeyDFKjJ.js.br +0 -0
  795. package/app/dist/assets/queued-messages-layout-CeyDFKjJ.js.gz +0 -0
  796. package/app/dist/assets/resource-list-6yRWH764.js +0 -1
  797. package/app/dist/assets/resource-list-6yRWH764.js.br +0 -0
  798. package/app/dist/assets/resource-list-6yRWH764.js.gz +0 -0
  799. package/app/dist/assets/root-compose-create-preference-b3fDEyGq.js +0 -1
  800. package/app/dist/assets/save-file-CF0WD8j8.js +0 -1
  801. package/app/dist/assets/settings-nav-fTeAdnH2.js +0 -1
  802. package/app/dist/assets/settings-nav-fTeAdnH2.js.br +0 -0
  803. package/app/dist/assets/settings-nav-fTeAdnH2.js.gz +0 -0
  804. package/app/dist/assets/settings-sections-DB6IyfQZ.js +0 -1
  805. package/app/dist/assets/settings-sections-DB6IyfQZ.js.br +0 -0
  806. package/app/dist/assets/settings-sections-DB6IyfQZ.js.gz +0 -0
  807. package/app/dist/assets/shortcut-pill-B0Fr2xZw.js +0 -1
  808. package/app/dist/assets/sidebarTouchSensor-G_R1oWWG.js +0 -1
  809. package/app/dist/assets/sidebarTouchSensor-G_R1oWWG.js.br +0 -0
  810. package/app/dist/assets/sidebarTouchSensor-G_R1oWWG.js.gz +0 -0
  811. package/app/dist/assets/switch-v_wPVM2e.js +0 -1
  812. package/app/dist/assets/switch-v_wPVM2e.js.br +0 -0
  813. package/app/dist/assets/switch-v_wPVM2e.js.gz +0 -0
  814. package/app/dist/assets/textarea-DPrKn2q6.js +0 -1
  815. package/app/dist/assets/thread-event-parser-YM6WZVUV.js +0 -1
  816. package/app/dist/assets/thread-event-parser-YM6WZVUV.js.br +0 -0
  817. package/app/dist/assets/thread-event-parser-YM6WZVUV.js.gz +0 -0
  818. package/app/dist/assets/thread-panel-queries-DlUrWgwt.js +0 -1
  819. package/app/dist/assets/thread-panel-queries-DlUrWgwt.js.br +0 -0
  820. package/app/dist/assets/thread-panel-queries-DlUrWgwt.js.gz +0 -0
  821. package/app/dist/assets/thread-runtime-mutations-CJ3s2CYc.js +0 -3
  822. package/app/dist/assets/thread-runtime-mutations-CJ3s2CYc.js.br +0 -0
  823. package/app/dist/assets/thread-runtime-mutations-CJ3s2CYc.js.gz +0 -0
  824. package/app/dist/assets/thread-terminal-queries-BsHgLadt.js +0 -1
  825. package/app/dist/assets/thread-terminal-queries-BsHgLadt.js.br +0 -0
  826. package/app/dist/assets/thread-terminal-queries-BsHgLadt.js.gz +0 -0
  827. package/app/dist/assets/threadRecentItems-DgLGunWi.js +0 -1
  828. package/app/dist/assets/threadRecentItems-DgLGunWi.js.br +0 -0
  829. package/app/dist/assets/threadRecentItems-DgLGunWi.js.gz +0 -0
  830. package/app/dist/assets/threadWorkspaceOpenPath-Bl4F81KG.js +0 -1
  831. package/app/dist/assets/threadWorkspaceOpenPath-Bl4F81KG.js.br +0 -0
  832. package/app/dist/assets/threadWorkspaceOpenPath-Bl4F81KG.js.gz +0 -0
  833. package/app/dist/assets/title-bar-scroll-fade-B1YDRwat.js +0 -1
  834. package/app/dist/assets/title-bar-scroll-fade-B1YDRwat.js.br +0 -0
  835. package/app/dist/assets/title-bar-scroll-fade-B1YDRwat.js.gz +0 -0
  836. package/app/dist/assets/truncate-start-CT5HZf-R.js +0 -1
  837. package/app/dist/assets/use-hover-popover-2p3pWP30.js +0 -1
  838. package/app/dist/assets/use-hover-popover-2p3pWP30.js.br +0 -0
  839. package/app/dist/assets/use-hover-popover-2p3pWP30.js.gz +0 -0
  840. package/app/dist/assets/useElementWidth-iT98f6Zb.js +0 -1
  841. package/app/dist/assets/useElementWidth-iT98f6Zb.js.br +0 -0
  842. package/app/dist/assets/useElementWidth-iT98f6Zb.js.gz +0 -0
  843. package/app/dist/assets/useLocalOpenTargets-B6JV6Z84.js +0 -1
  844. package/app/dist/assets/useLocalOpenTargets-B6JV6Z84.js.br +0 -0
  845. package/app/dist/assets/useLocalOpenTargets-B6JV6Z84.js.gz +0 -0
  846. package/app/dist/assets/usePanelResizeSnap-Co2GXK2o.js +0 -1
  847. package/app/dist/assets/usePanelResizeSnap-Co2GXK2o.js.br +0 -0
  848. package/app/dist/assets/usePanelResizeSnap-Co2GXK2o.js.gz +0 -0
  849. package/app/dist/assets/usePanelTerminals-8oxH_SxL.js +0 -1
  850. package/app/dist/assets/usePanelTerminals-8oxH_SxL.js.br +0 -0
  851. package/app/dist/assets/usePanelTerminals-8oxH_SxL.js.gz +0 -0
  852. package/app/dist/assets/usePathSuggestions-D-zzNn__.js +0 -1
  853. package/app/dist/assets/usePathSuggestions-D-zzNn__.js.br +0 -0
  854. package/app/dist/assets/usePathSuggestions-D-zzNn__.js.gz +0 -0
  855. package/app/dist/assets/useResolvedLiveFileTarget-CmmJ7rHg.js +0 -1
  856. package/app/dist/assets/useResolvedLiveFileTarget-CmmJ7rHg.js.br +0 -0
  857. package/app/dist/assets/useResolvedLiveFileTarget-CmmJ7rHg.js.gz +0 -0
  858. package/app/dist/assets/useThreadTerminalController-DftqNRIT.js +0 -1
  859. package/app/dist/assets/useThreadTerminalController-DftqNRIT.js.br +0 -0
  860. package/app/dist/assets/useThreadTerminalController-DftqNRIT.js.gz +0 -0
  861. package/app/dist/assets/workspace-change-summary-C4d9ieR5.js +0 -1
  862. package/app/dist/assets/workspace-change-summary-C4d9ieR5.js.br +0 -0
  863. package/app/dist/assets/workspace-change-summary-C4d9ieR5.js.gz +0 -0
  864. package/app/dist/assets/workspace-checkout-display-Cr4XvonY.js +0 -32
  865. package/app/dist/assets/workspace-checkout-display-Cr4XvonY.js.br +0 -0
  866. package/app/dist/assets/workspace-checkout-display-Cr4XvonY.js.gz +0 -0
  867. package/host-daemon/dist/moonlet-chunks/browser-5AZUJQVJ.js +0 -6
  868. package/host-daemon/dist/moonlet-chunks/chunk-2CKXUSBW.js +0 -2
  869. package/host-daemon/dist/moonlet-chunks/chunk-2ZTIK2UK.js +0 -2
  870. package/host-daemon/dist/moonlet-chunks/chunk-DGL5FDTR.js +0 -6
  871. package/host-daemon/dist/moonlet-chunks/chunk-L6I6UOYB.js +0 -139
  872. package/host-daemon/dist/moonlet-chunks/chunk-MOVWZSV4.js +0 -2
  873. package/host-daemon/dist/moonlet-chunks/chunk-QOGVPOUT.js +0 -2
  874. package/host-daemon/dist/moonlet-chunks/chunk-RVIIUBDW.js +0 -2
  875. package/host-daemon/dist/moonlet-chunks/chunk-TIBWSFKS.js +0 -2287
  876. package/host-daemon/dist/moonlet-chunks/chunk-UHU4D6XQ.js +0 -2
  877. package/host-daemon/dist/moonlet-chunks/chunk-Y2K4D5II.js +0 -2
  878. package/host-daemon/dist/moonlet-chunks/client-LNJ2JOTI.js +0 -2
  879. package/host-daemon/dist/moonlet-chunks/commander-errors-PU2T46TK.js +0 -3
  880. package/host-daemon/dist/moonlet-chunks/context-env-432QODV4.js +0 -2
  881. package/host-daemon/dist/moonlet-chunks/context-hints-7TZOLMQC.js +0 -2
  882. package/host-daemon/dist/moonlet-chunks/diagnostics-LN5I72DR.js +0 -3
  883. package/host-daemon/dist/moonlet-chunks/environment-FDC3FJ2Z.js +0 -2
  884. package/host-daemon/dist/moonlet-chunks/file-UALFZZV6.js +0 -3
  885. package/host-daemon/dist/moonlet-chunks/guide-XMNOZ5FH.js +0 -4
  886. package/host-daemon/dist/moonlet-chunks/machine-YKQAUSQD.js +0 -2
  887. package/host-daemon/dist/moonlet-chunks/marketplace-TQELJJSK.js +0 -2
  888. package/host-daemon/dist/moonlet-chunks/permissions-EMANTGMV.js +0 -2
  889. package/host-daemon/dist/moonlet-chunks/plugin-UYXEGEBA.js +0 -2633
  890. package/host-daemon/dist/moonlet-chunks/plugin-cli-proxy-JZ2VXAB3.js +0 -2
  891. package/host-daemon/dist/moonlet-chunks/project-LEPUJ5GJ.js +0 -2
  892. package/host-daemon/dist/moonlet-chunks/prompt-history-CIIRCES5.js +0 -2
  893. package/host-daemon/dist/moonlet-chunks/provider-74ZZFAWS.js +0 -2
  894. package/host-daemon/dist/moonlet-chunks/schedule-O22F5ETG.js +0 -2
  895. package/host-daemon/dist/moonlet-chunks/server-GLIUHNZT.js +0 -8
  896. package/host-daemon/dist/moonlet-chunks/settings-VE4BYSAL.js +0 -4
  897. package/host-daemon/dist/moonlet-chunks/skill-5NOG5DIJ.js +0 -5
  898. package/host-daemon/dist/moonlet-chunks/status-TCDGABFU.js +0 -2
  899. package/host-daemon/dist/moonlet-chunks/terminal-ETZ34UY7.js +0 -3
  900. package/host-daemon/dist/moonlet-chunks/theme-IMTQJSB6.js +0 -2
  901. package/host-daemon/dist/moonlet-chunks/thread-J5KNTGDI.js +0 -29
  902. package/host-daemon/dist/moonlet-chunks/updates-TGGOKXLK.js +0 -2
  903. package/host-daemon/dist/moonlet-chunks/voice-NDPSN3LM.js +0 -2
  904. package/server/dist/builtin-plugins/orbit/dist/assets/assets/orbit-guidance/skills/design-documents/SKILL.md +0 -56
  905. package/server/dist/builtin-plugins/orbit/dist/assets/assets/orbit-guidance/skills/design-documents/references/diagram-kit.md +0 -75
  906. package/server/dist/builtin-plugins/orbit/dist/assets/assets/orbit-guidance/skills/tasks/SKILL.md +0 -93
  907. package/server/dist/builtin-plugins/orbit/dist/assets/assets/orbit-guidance/starter/plugins/orbit/skills/documents/SKILL.md +0 -113
  908. package/server/dist/builtin-plugins/orbit/dist/assets/assets/orbit-guidance/starter/plugins/orbit/skills/github-change/SKILL.md +0 -408
  909. package/server/dist/builtin-plugins/orbit/dist/assets/assets/orbit-guidance/starter/plugins/orbit/skills/github-change/references/branches.md +0 -132
  910. package/server/dist/builtin-plugins/orbit/dist/assets/assets/orbit-guidance/starter/plugins/orbit/skills/github-change/references/merging.md +0 -140
  911. package/server/dist/builtin-plugins/orbit/dist/assets/assets/orbit-guidance/starter/plugins/orbit/skills/github-change/references/work-queue.md +0 -99
  912. package/server/dist/builtin-plugins/orbit/dist/assets/assets/orbit-guidance/starter/plugins/orbit/skills/mail/SKILL.md +0 -292
  913. package/server/dist/builtin-plugins/orbit/dist/assets/assets/orbit-guidance/starter/plugins/orbit/skills/messages/SKILL.md +0 -62
  914. package/server/dist/builtin-plugins/orbit/dist/assets/assets/orbit-guidance/starter/plugins/orbit/skills/owner-changes/SKILL.md +0 -70
  915. package/server/dist/builtin-plugins/orbit/dist/assets/assets/orbit-guidance/starter/plugins/orbit/skills/station-build/SKILL.md +0 -119
  916. package/server/dist/builtin-plugins/orbit/dist/assets/assets/orbit-guidance/starter/plugins/orbit/skills/thread-replies/SKILL.md +0 -47
  917. package/server/dist/builtin-plugins/orbit/dist/assets/assets/orbit-guidance/starter/plugins/orbit/skills/userland/SKILL.md +0 -268
  918. package/server/dist/builtin-plugins/orbit/dist/assets/assets/orbit-guidance/starter/plugins/orbit/skills/welcome/SKILL.md +0 -39
  919. package/server/dist/builtin-plugins/orbit/skills/before-after/SKILL.md +0 -54
  920. package/server/dist/builtin-plugins/orbit/skills/documents/SKILL.md +0 -113
  921. package/server/dist/builtin-plugins/orbit/skills/documents/page-template.html +0 -226
  922. package/server/dist/builtin-plugins/orbit/skills/github-change/SKILL.md +0 -412
  923. package/server/dist/builtin-plugins/orbit/skills/github-change/declare-outputs.d.mts +0 -2
  924. package/server/dist/builtin-plugins/orbit/skills/github-change/declare-outputs.mjs +0 -61
  925. package/server/dist/builtin-plugins/orbit/skills/github-change/pre-push.d.mts +0 -27
  926. package/server/dist/builtin-plugins/orbit/skills/github-change/pre-push.mjs +0 -790
  927. package/server/dist/builtin-plugins/orbit/skills/github-change/references/branches.md +0 -132
  928. package/server/dist/builtin-plugins/orbit/skills/github-change/references/merging.md +0 -138
  929. package/server/dist/builtin-plugins/orbit/skills/github-change/references/reviewing.md +0 -37
  930. package/server/dist/builtin-plugins/orbit/skills/github-change/references/work-queue.md +0 -68
  931. package/server/dist/builtin-plugins/orbit/skills/mail/SKILL.md +0 -292
  932. package/server/dist/builtin-plugins/orbit/skills/messages/SKILL.md +0 -62
  933. package/server/dist/builtin-plugins/orbit/skills/owner-changes/SKILL.md +0 -66
  934. package/server/dist/builtin-plugins/orbit/skills/station-build/SKILL.md +0 -126
  935. package/server/dist/builtin-plugins/orbit/skills/thread-replies/SKILL.md +0 -60
  936. package/server/dist/builtin-plugins/orbit/skills/userland/SKILL.md +0 -268
  937. package/server/dist/builtin-plugins/orbit/skills/welcome/SKILL.md +0 -39
  938. /package/server/dist/builtin-plugins/{orbit/dist/assets/assets/orbit-guidance/starter/plugins/orbit → documents}/skills/before-after/SKILL.md +0 -0
  939. /package/server/dist/builtin-plugins/{orbit → documents}/skills/before-after/before-after.mjs +0 -0
  940. /package/server/dist/builtin-plugins/{orbit/dist/assets/assets/orbit-guidance/skills/design-documents/references → documents/skills/design-documents/assets}/example-design.html +0 -0
  941. /package/server/dist/builtin-plugins/{orbit/dist/assets/assets/orbit-guidance/starter/plugins/orbit → documents}/skills/documents/page-template.html +0 -0
  942. /package/server/dist/builtin-plugins/{orbit/dist/assets/assets/orbit-guidance/starter/plugins/orbit → github}/skills/github-change/references/reviewing.md +0 -0
  943. /package/server/dist/builtin-plugins/{orbit/dist/assets/assets/orbit-guidance/starter/orbit → library}/skills/dossier/SKILL.md +0 -0
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,jr as n,kr as r,qr as i,ri as a}from"./boot-vendor-CKEhulXz.js";import{Di as o,Dm as s,Fa as c,Qi as l,So as u,Th as d,To as f,Ud as p,Uo as m,Xi as h,Yo as g,bo as _,h as v,kh as y,na as b,wo as x,xo as S,ym as C}from"./index-miJf0-mc.js";import{n as w}from"./index.browser-usHDzq3C.js";import{t as T}from"./OptionPicker-COuYgOjP.js";import{s as E}from"./dist-DOz2GbNP.js";import{n as D,r as O}from"./machine-server-access-Bx64IAre.js";var k=r(),A=e(t(),1),j=e(a(),1);function M(e){try{return new URL(e)}catch{return null}}function N(){let e=m(),t=v(),n=e.data?.generalSettings,r=e.data?.serverAccess,i=n?.machineServerUrl??``,[a,s]=(0,A.useState)(null),[c,l]=(0,A.useState)(null),u=!n,d=r?.defaultProviderId??`direct`,[f,p]=(0,A.useState)(null);(0,A.useEffect)(()=>{f===d&&p(null)},[d,f]);let h=f??d;return{access:r,disabled:u,draft:a,error:c,effective:r?.providers.find(e=>e.id===h),configurationMessage:D(r,h),saving:t.isPending,selected:h,value:i,editDraft:e=>{s(e),l(null)},selectProvider:e=>{!n||e===h||(p(e),t.mutate({defaultMachineAccess:e},{onError:()=>p(null)}))},commitUrl:async()=>{if(!n||a===null)return;let e=a.trim();if(e){let t=M(e);if(t===null||![`http:`,`https:`].includes(t.protocol)||t.username||t.password){l(`Enter a valid HTTP or HTTPS URL without credentials`);return}if(o(e)){l(`Other machines cannot reach localhost. Use a domain or shared-network address.`);return}}try{await t.mutateAsync({machineServerUrl:e||null})}catch(e){l(g({error:e,fallbackMessage:`Couldn't save the address.`}));return}s(null),l(null)}}}function P(e){let t=(0,k.c)(7),{children:n,title:r}=e,i=r===void 0?`Machine access`:r,a=N(),o;t[0]!==n||t[1]!==a?(o=n?.(a.selected===`direct`?null:a.effective?.pluginId??null),t[0]=n,t[1]=a,t[2]=o):o=t[2];let s;return t[3]!==a||t[4]!==o||t[5]!==i?(s=(0,j.jsx)(F,{machineAccess:a,title:i,children:o}),t[3]=a,t[4]=o,t[5]=i,t[6]=s):s=t[6],s}function F(e){let t=(0,k.c)(12),{machineAccess:n,children:r,title:i}=e,a=i===void 0?`Machine access`:i,o;t[0]===a?o=t[1]:(o=(0,j.jsx)(`h2`,{className:`text-sm font-semibold`,children:a}),t[0]=a,t[1]=o);let s;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,j.jsx)(`p`,{className:`mt-1 text-xs text-subtle-foreground`,children:`Choose how your devices reach this Moonlet server.`}),t[2]=s):s=t[2];let c;t[3]===o?c=t[4]:(c=(0,j.jsxs)(`div`,{children:[o,s]}),t[3]=o,t[4]=c);let l;t[5]!==r||t[6]!==n?(l=(0,j.jsx)(`div`,{className:`overflow-hidden rounded-lg border border-border bg-card`,children:(0,j.jsx)(`div`,{className:`px-4 py-3`,children:n.access===void 0?(0,j.jsxs)(`p`,{role:`status`,className:`flex h-8 items-center gap-2 text-xs text-subtle-foreground`,children:[(0,j.jsx)(d,{name:`Spinner`,className:`size-3.5 animate-spin`}),`Loading connection settings…`]}):(0,j.jsxs)(j.Fragment,{children:[n.selected!==`direct`&&n.effective?(0,j.jsx)(V,{machineAccess:n,methodPicker:(0,j.jsx)(R,{machineAccess:n,align:`start`})}):(0,j.jsxs)(`div`,{className:`space-y-3`,children:[(0,j.jsx)(`div`,{className:`flex`,children:(0,j.jsx)(R,{machineAccess:n,align:`start`})}),(0,j.jsx)(B,{machineAccess:n})]}),r]})})}),t[5]=r,t[6]=n,t[7]=l):l=t[7];let u;return t[8]!==c||t[9]!==l||t[10]!==a?(u=(0,j.jsxs)(`section`,{"aria-label":a,className:`space-y-3`,children:[c,l]}),t[8]=c,t[9]=l,t[10]=a,t[11]=u):u=t[11],u}function I(e){let t=(0,k.c)(3),{onNavigate:n}=e,r=N(),i;return t[0]!==r||t[1]!==n?(i=(0,j.jsx)(L,{machineAccess:r,onNavigate:n}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i}function L(e){let t=(0,k.c)(9),{machineAccess:n,onNavigate:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,j.jsx)(`span`,{className:`text-sm font-normal text-foreground`,children:`Connection method`}),t[0]=i):i=t[0];let a;t[1]===n?a=t[2]:(a=(0,j.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[i,(0,j.jsx)(R,{machineAccess:n})]}),t[1]=n,t[2]=a);let o;t[3]!==n||t[4]!==r?(o=(0,j.jsx)(B,{machineAccess:n,onNavigate:r}),t[3]=n,t[4]=r,t[5]=o):o=t[5];let s;return t[6]!==a||t[7]!==o?(s=(0,j.jsxs)(`div`,{className:`space-y-3`,children:[a,o]}),t[6]=a,t[7]=o,t[8]=s):s=t[8],s}function R(e){let t=(0,k.c)(15),{machineAccess:n,align:r}=e,i=r===void 0?`end`:r,{access:a,disabled:o,selected:s}=n,c;t[0]!==a||t[1]!==n.effective?(c=a&&!n.effective?{label:`Unavailable method`}:void 0,t[0]=a,t[1]=n.effective,t[2]=c):c=t[2];let l=i===`start`?`-ml-1`:void 0,u;t[3]===a?.providers?u=t[4]:(u=a?.providers??[],t[3]=a?.providers,t[4]=u);let d;t[5]===u?d=t[6]:(d=u.map(z),t[5]=u,t[6]=d);let f;return t[7]!==i||t[8]!==o||t[9]!==n.selectProvider||t[10]!==s||t[11]!==c||t[12]!==l||t[13]!==d?(f=(0,j.jsx)(T,{modal:!1,label:`Connection method`,value:s,displayOverride:c,disabled:o,showChevronWhenDisabled:!0,align:i,className:l,options:d,onChange:n.selectProvider}),t[7]=i,t[8]=o,t[9]=n.selectProvider,t[10]=s,t[11]=c,t[12]=l,t[13]=d,t[14]=f):f=t[14],f}function z(e){return{value:e.id,label:e.displayName,description:e.description}}function B(e){let t=(0,k.c)(21),{machineAccess:n,onNavigate:r}=e,{access:i,disabled:a,draft:o,effective:s,error:c,saving:l,selected:u,value:d}=n,f;t[0]!==s||t[1]!==n||t[2]!==r||t[3]!==u?(f=u!==`direct`&&s!==void 0&&(0,j.jsx)(V,{machineAccess:n,onNavigate:r}),t[0]=s,t[1]=n,t[2]=r,t[3]=u,t[4]=f):f=t[4];let p;t[5]!==s||t[6]!==u?(p=u!==`direct`&&s===void 0&&(0,j.jsx)(`p`,{className:`text-xs text-subtle-foreground`,children:`This connection method is not installed. Choose another method above.`}),t[5]=s,t[6]=u,t[7]=p):p=t[7];let m;t[8]!==i?.effectiveUrl||t[9]!==a||t[10]!==o||t[11]!==c||t[12]!==n||t[13]!==l||t[14]!==u||t[15]!==d?(m=u===`direct`&&(0,j.jsxs)(E,{label:`Server address`,description:`Use your own domain or an address on a shared network. Your devices must be able to reach this address; localhost won’t work.`,controlPlacement:`below`,children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsx)(b,{className:`min-w-0 flex-1 basis-48`,"aria-label":`Server address`,"aria-invalid":c!==null,value:o??d,placeholder:i?.effectiveUrl??`https://moonlet.example.com`,disabled:a,onChange:e=>n.editDraft(e.target.value),onKeyDown:e=>{e.key===`Enter`&&n.commitUrl()}}),(0,j.jsx)(y,{variant:`outline`,className:`h-9 max-md:pointer-coarse:h-10`,disabled:a||o===null||o.trim()===d,onClick:()=>void n.commitUrl(),children:l?`Saving…`:`Save`})]}),c!==null&&(0,j.jsx)(`p`,{role:`alert`,className:`mt-2 text-xs text-destructive-text`,children:c})]}),t[8]=i?.effectiveUrl,t[9]=a,t[10]=o,t[11]=c,t[12]=n,t[13]=l,t[14]=u,t[15]=d,t[16]=m):m=t[16];let h;return t[17]!==f||t[18]!==p||t[19]!==m?(h=(0,j.jsxs)(j.Fragment,{children:[f,p,m]}),t[17]=f,t[18]=p,t[19]=m,t[20]=h):h=t[20],h}function V(e){let t=(0,k.c)(22),{machineAccess:r,onNavigate:i,methodPicker:a}=e,{effective:o,configurationMessage:s}=r;if(!o)return null;let c=s===null,l=o.availability?.status===`setup-required`&&o.pluginId!==null,u=l?`flex flex-col items-start gap-2`:`flex min-h-7 items-center justify-between gap-3`,f;t[0]!==s||t[1]!==o.description||t[2]!==l?(f=l&&(0,j.jsxs)(`p`,{className:`max-w-xl text-xs text-subtle-foreground`,children:[o.description,` `,s]}),t[0]=s,t[1]=o.description,t[2]=l,t[3]=f):f=t[3];let p;t[4]!==o.displayName||t[5]!==o.pluginId||t[6]!==i||t[7]!==l?(p=o.pluginId!==null&&(0,j.jsx)(y,{variant:l?`default`:`link`,size:`sm`,className:l?`shrink-0`:`h-7 shrink-0 px-3 font-normal text-subtle-foreground/75 no-underline hover:text-subtle-foreground hover:no-underline`,asChild:!0,children:(0,j.jsx)(n,{onClick:i,to:C({pluginId:o.pluginId}),children:l?(0,j.jsxs)(j.Fragment,{children:[`Set up `,o.displayName,(0,j.jsx)(d,{name:`ArrowRight`})]}):`Manage`})}),t[4]=o.displayName,t[5]=o.pluginId,t[6]=i,t[7]=l,t[8]=p):p=t[8];let m;t[9]!==a||t[10]!==u||t[11]!==f||t[12]!==p?(m=(0,j.jsxs)(`div`,{className:u,children:[a,f,p]}),t[9]=a,t[10]=u,t[11]=f,t[12]=p,t[13]=m):m=t[13];let h;t[14]!==s||t[15]!==o.availability||t[16]!==c||t[17]!==l?(h=!l&&(0,j.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-3 gap-y-1 text-xs`,children:[(0,j.jsxs)(`p`,{className:`inline-flex shrink-0 items-center gap-1.5 font-medium`,children:[c?(0,j.jsx)(`span`,{className:`size-1.5 shrink-0 rounded-full bg-success`,"aria-hidden":`true`}):null,c?`Ready`:`Unavailable`]}),(0,j.jsx)(`p`,{className:`min-w-0 break-words text-subtle-foreground [overflow-wrap:anywhere]`,children:s??(o.availability?.status===`available`?o.availability.serverUrl:null)??`Ready to connect devices.`})]}),t[14]=s,t[15]=o.availability,t[16]=c,t[17]=l,t[18]=h):h=t[18];let g;return t[19]!==m||t[20]!==h?(g=(0,j.jsxs)(`div`,{className:`space-y-0`,children:[m,h]}),t[19]=m,t[20]=h,t[21]=g):g=t[21],g}var H=`manual`;function U(e){let t=(0,k.c)(12),{open:n,onOpenChange:r}=e,i=h(),a;t[0]!==i||t[1]!==r?(a=e=>{e||i.refetch(),r(e)},t[0]=i,t[1]=r,t[2]=a):a=t[2];let o=a,s;t[3]!==o||t[4]!==n?(s=n&&(0,j.jsx)(W,{onOpenChange:o}),t[3]=o,t[4]=n,t[5]=s):s=t[5];let c;t[6]===s?c=t[7]:(c=(0,j.jsx)(S,{className:`max-h-[calc(100dvh-2rem)] overflow-y-auto`,children:s}),t[6]=s,t[7]=c);let l;return t[8]!==o||t[9]!==n||t[10]!==c?(l=(0,j.jsx)(_,{open:n,onOpenChange:o,modal:!1,children:c}),t[8]=o,t[9]=n,t[10]=c,t[11]=l):l=t[11],l}function W(e){let t=(0,k.c)(13),{onOpenChange:n}=e,r=m(),i=h();if(!O(r.data?.serverAccess)){let e;t[0]===r?e=t[1]:(e=r.isPending?{status:`checking`}:r.isError?{status:`failed`,onRetry:()=>void r.refetch()}:{status:`blocked`},t[0]=r,t[1]=e);let i;t[2]===n?i=t[3]:(i=(0,j.jsx)(I,{onNavigate:()=>n(!1)}),t[2]=n,t[3]=i);let a;return t[4]!==e||t[5]!==i?(a=(0,j.jsx)(K,{state:e,children:i}),t[4]=e,t[5]=i,t[6]=a):a=t[6],a}let a=r.data?.primaryHostId??null,o;t[7]!==i.data||t[8]!==a?(o=i.data?.find(e=>e.id===a)?.name??null,t[7]=i.data,t[8]=a,t[9]=o):o=t[9];let s=o,c;return t[10]!==n||t[11]!==s?(c=(0,j.jsx)(q,{serverMachineName:s,onOpenChange:n}),t[10]=n,t[11]=s,t[12]=c):c=t[12],c}function G(e){return e===null?`The new machine will connect to your Moonlet server. Keep the server machine on so the new machine can keep working.`:`The new machine will connect to the Moonlet server on ${e}. Keep that computer on so the new machine can keep working.`}function K(e){let t=(0,k.c)(7),{state:n,children:r}=e;if(n.status===`checking`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(f,{className:`sr-only`,children:`Add a machine`}),(0,j.jsx)(`p`,{role:`status`,className:`text-sm text-subtle-foreground`,children:`Checking machine access…`})]}),t[0]=e):e=t[0],e}if(n.status===`failed`){let e;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,j.jsxs)(x,{children:[(0,j.jsx)(f,{children:`Add a machine`}),(0,j.jsx)(u,{className:`text-destructive-text`,children:`Couldn’t check whether machines can reach this server.`})]}),t[1]=e):e=t[1];let r;return t[2]===n.onRetry?r=t[3]:(r=(0,j.jsxs)(j.Fragment,{children:[e,(0,j.jsx)(`div`,{className:`flex justify-end`,children:(0,j.jsx)(y,{variant:`outline`,size:`sm`,onClick:n.onRetry,children:`Try again`})})]}),t[2]=n.onRetry,t[3]=r),r}let i;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,j.jsxs)(x,{children:[(0,j.jsx)(f,{children:`Set up machine access`}),(0,j.jsx)(u,{children:`A new machine has to reach this server over the network. Choose the address it should use.`})]}),t[4]=i):i=t[4];let a;return t[5]===r?a=t[6]:(a=(0,j.jsxs)(j.Fragment,{children:[i,r]}),t[5]=r,t[6]=a),a}function q({serverMachineName:e,onOpenChange:t}){let n=(0,A.useRef)(null),r=(0,A.useRef)(null),a=(0,A.useRef)(new Set),o=(0,A.useRef)(0),[s,c]=(0,A.useState)(null),[l,u]=(0,A.useState)(null);(0,A.useEffect)(()=>()=>{o.current+=1,n.current?.abort(),r.current=null;for(let e of a.current)p.hosts.delete({hostId:e}).catch(()=>void 0);a.current.clear()},[]);let d=i({meta:{showErrorToast:!1},mutationFn:async e=>{let t=o.current;if(e.replaceLaunch){n.current?.abort(),n.current=null;let e=[...a.current];a.current.clear(),await Promise.all(e.map(e=>p.hosts.delete({hostId:e}))),r.current=null}c(null);let i=new AbortController;n.current=i,r.current??=w();try{let e=await p.hosts.experimental_create({key:r.current,machineProviderId:H,inputs:null,wait:!1,signal:i.signal});if(a.current.add(e.id),t!==o.current)throw a.current.delete(e.id),await p.hosts.delete({hostId:e.id}),Error(`Machine setup closed`);let n=null;for(;e.lifecycle.phase===`creating`;){i.signal.throwIfAborted();let t=await p.hosts.experimental_getEnrollmentCommand({hostId:e.id,signal:i.signal});if(t!==null)n=t,c({value:t.command,windowsValue:t.windowsCommand,expiresAt:t.expiresAt,unavailable:!1});else if(n!==null){let e=n;c(t=>t?.unavailable?t:{value:e.command,windowsValue:e.windowsCommand,expiresAt:e.expiresAt,unavailable:!0})}await new Promise(e=>setTimeout(e,1e3)),i.signal.throwIfAborted(),e=await p.hosts.get({hostId:e.id,signal:i.signal})}if(r.current=null,a.current.delete(e.id),e.lifecycle.phase!==`active`)throw Error(e.lifecycle.message??`Machine setup cancelled`);return e}finally{n.current===i&&(n.current=null)}},onSuccess:e=>{r.current=null,u(e)}}),f=d.mutate;return(0,A.useEffect)(()=>{f({replaceLaunch:!1})},[f]),(0,j.jsx)(J,{command:s,connectedHost:l,serverMachineName:e,errorMessage:d.isError?g({error:d.error,fallbackMessage:`Couldn't prepare an enrollment command.`}):null,onRetry:()=>d.mutate({replaceLaunch:!1}),onRegenerate:()=>d.mutate({replaceLaunch:!0}),onOpenMachine:()=>t(!1)})}function J(e){let t=(0,k.c)(24),{command:r,connectedHost:i,serverMachineName:a,errorMessage:o,onRetry:c,onRegenerate:p,onOpenMachine:m}=e,h;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,j.jsx)(f,{children:`Add a machine`}),t[0]=h):h=t[0];let g=o===null?void 0:`text-destructive-text`,_=o??`Run this command on the machine you want to add. It installs Moonlet and keeps the machine connected to this server.`,v;t[1]!==g||t[2]!==_?(v=(0,j.jsxs)(x,{children:[h,(0,j.jsx)(u,{className:g,children:_})]}),t[1]=g,t[2]=_,t[3]=v):v=t[3];let b;t[4]!==o||t[5]!==c?(b=o===null?null:(0,j.jsx)(`div`,{className:`flex justify-end`,children:(0,j.jsx)(y,{variant:`outline`,size:`sm`,onClick:c,children:`Try again`})}),t[4]=o,t[5]=c,t[6]=b):b=t[6];let S;t[7]!==r||t[8]!==p?(S=r===null?null:(0,j.jsx)(Z,{command:r.value,windowsCommand:r.windowsValue,expiresAt:r.expiresAt,unavailable:r.unavailable,onRegenerate:p},r.value),t[7]=r,t[8]=p,t[9]=S):S=t[9];let C;t[10]!==r||t[11]!==i||t[12]!==o||t[13]!==m?(C=o===null?(0,j.jsx)(`div`,{className:`flex items-center gap-2.5 rounded-md bg-muted/40 px-3 py-2.5`,children:i===null?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(d,{name:`Spinner`,className:`size-4 shrink-0 animate-spin text-muted-foreground`}),(0,j.jsx)(`span`,{role:`status`,className:`text-sm text-muted-foreground`,children:r===null?`Preparing an enrollment command…`:`Waiting for the machine to connect…`})]}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(l,{connected:!0}),(0,j.jsxs)(`span`,{role:`status`,className:`min-w-0 flex-1 truncate text-sm text-foreground`,children:[i.name,` connected`]}),(0,j.jsx)(y,{asChild:!0,size:`sm`,variant:`ghost`,className:`h-7 shrink-0 px-2 text-xs`,children:(0,j.jsxs)(n,{to:s(i.id),onClick:m,children:[`Open machine`,(0,j.jsx)(d,{name:`ArrowRight`})]})})]})}):null,t[10]=r,t[11]=i,t[12]=o,t[13]=m,t[14]=C):C=t[14];let w;t[15]!==o||t[16]!==a?(w=o===null?(0,j.jsx)(`p`,{className:`text-xs text-subtle-foreground`,children:G(a)}):null,t[15]=o,t[16]=a,t[17]=w):w=t[17];let T;return t[18]!==v||t[19]!==b||t[20]!==S||t[21]!==C||t[22]!==w?(T=(0,j.jsxs)(j.Fragment,{children:[v,b,S,C,w]}),t[18]=v,t[19]=b,t[20]=S,t[21]=C,t[22]=w,t[23]=T):T=t[23],T}function Y(e){let t=Math.max(0,Math.floor(e/1e3));return`${Math.floor(t/60)}:${(t%60).toString().padStart(2,`0`)}`}var X=[{id:`posix`,label:`macOS or Linux`},{id:`windows`,label:`Windows`}];function Z(e){let t=(0,k.c)(34),{command:n,windowsCommand:r,expiresAt:i,unavailable:a,onRegenerate:o}=e,s=a===void 0?!1:a,[l,u]=(0,A.useState)(`posix`),d=l===`windows`?r:n,f;t[0]===d?f=t[1]:(f={text:d},t[0]=d,t[1]=f);let{copied:p,copy:m}=c(f),h;t[2]===i?h=t[3]:(h=()=>i-Date.now(),t[2]=i,t[3]=h);let[g,_]=(0,A.useState)(h),v,b;t[4]===i?(v=t[5],b=t[6]):(v=()=>{let e=setInterval(()=>_(i-Date.now()),1e3);return()=>clearInterval(e)},b=[i],t[4]=i,t[5]=v,t[6]=b),(0,A.useEffect)(v,b);let x=g<=0,S;t[7]===l?S=t[8]:(S=X.map(e=>(0,j.jsx)(y,{type:`button`,size:`sm`,variant:l===e.id?`secondary`:`ghost`,"aria-pressed":l===e.id,className:`h-6 px-2 text-xs`,onClick:()=>u(e.id),children:e.label},e.id)),t[7]=l,t[8]=S);let C;t[9]===l?C=t[10]:(C=l===`windows`?(0,j.jsx)(`span`,{className:`ml-auto text-xs text-subtle-foreground`,children:`Run in PowerShell`}):null,t[9]=l,t[10]=C);let w;t[11]!==S||t[12]!==C?(w=(0,j.jsxs)(`div`,{role:`group`,"aria-label":`Machine operating system`,className:`flex items-center gap-1 border-b border-border px-2 py-1.5`,children:[S,C]}),t[11]=S,t[12]=C,t[13]=w):w=t[13];let T;t[14]===d?T=t[15]:(T=(0,j.jsx)(`pre`,{className:`overflow-x-auto whitespace-pre-wrap break-all p-3 font-mono text-xs text-foreground`,children:d}),t[14]=d,t[15]=T);let E;t[16]!==x||t[17]!==o||t[18]!==g||t[19]!==s?(E=s?(0,j.jsx)(`span`,{role:`status`,className:`text-xs text-subtle-foreground`,children:`Command used`}):x?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`span`,{role:`status`,className:`text-xs text-subtle-foreground`,children:`Command expired`}),(0,j.jsx)(y,{type:`button`,size:`sm`,variant:`ghost`,className:`h-7 px-2 text-xs`,onClick:o,children:`Generate a new command`})]}):(0,j.jsxs)(`span`,{role:`status`,className:`text-xs tabular-nums text-subtle-foreground`,children:[`Command expires in `,Y(g)]}),t[16]=x,t[17]=o,t[18]=g,t[19]=s,t[20]=E):E=t[20];let D=x||s,O;t[21]===m?O=t[22]:(O=()=>void m(),t[21]=m,t[22]=O);let M=p?`Copied`:`Copy`,N;t[23]!==D||t[24]!==O||t[25]!==M?(N=(0,j.jsx)(y,{type:`button`,size:`sm`,variant:`outline`,className:`ml-auto h-7 px-2.5 text-xs`,disabled:D,onClick:O,children:M}),t[23]=D,t[24]=O,t[25]=M,t[26]=N):N=t[26];let P;t[27]!==E||t[28]!==N?(P=(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 border-t border-border px-3 py-2`,children:[E,N]}),t[27]=E,t[28]=N,t[29]=P):P=t[29];let F;return t[30]!==P||t[31]!==w||t[32]!==T?(F=(0,j.jsxs)(`div`,{className:`overflow-hidden rounded-md border border-border bg-muted/30`,children:[w,T,P]}),t[30]=P,t[31]=w,t[32]=T,t[33]=F):F=t[33],F}export{Z as n,P as r,U as t};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{kr as t,ri as n}from"./boot-vendor-CKEhulXz.js";import{do as r}from"./index-miJf0-mc.js";import{t as i}from"./shortcut-pill-BDbQywS5.js";var a=t(),o=e(n(),1);function s(e){let t=(0,a.c)(3),{shortcut:n,className:s}=e;if(!r()||!n)return null;let c;return t[0]!==s||t[1]!==n?(c=(0,o.jsx)(i,{shortcut:n,className:s}),t[0]=s,t[1]=n,t[2]=c):c=t[2],c}export{s as t};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,kr as n}from"./boot-vendor-CKEhulXz.js";import{Hn as r,Sh as i}from"./index-miJf0-mc.js";import{t as a}from"./useLocalOpenTargets-CsL8C0eF.js";import{t as o}from"./useResolvedLiveFileTarget-CvjfYOSC.js";var s=n(),c=e(t(),1);function l(e){let t=(0,s.c)(20),{intent:n,onSettled:l}=e,u=(0,c.useRef)(!1),d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d={enabled:!0},t[0]=d):d=t[0];let f=o(n.target,d),p=f.status===`available`,m;t[1]!==f.openContext||t[2]!==f.status?(m=f.status===`available`?{openContext:f.openContext}:{},t[1]=f.openContext,t[2]=f.status,t[3]=m):m=t[3];let h;t[4]!==p||t[5]!==m?(h={enabled:p,...m},t[4]=p,t[5]=m,t[6]=h):h=t[6];let{isLoading:g,openPathInPreferredFileTarget:_}=a(h),v;t[7]!==g||t[8]!==n.location||t[9]!==l||t[10]!==_||t[11]!==f.absolutePath||t[12]!==f.status?(v=()=>{if(u.current||f.status===`loading`||g)return;if(u.current=!0,l(),f.status===`unavailable`){i.error(`Failed to open file externally`,{description:`The file target is not available on its declared host.`});return}let e=r(n.location);_({columnNumber:e.columnNumber,lineNumber:e.lineNumber,path:f.absolutePath})},t[7]=g,t[8]=n.location,t[9]=l,t[10]=_,t[11]=f.absolutePath,t[12]=f.status,t[13]=v):v=t[13];let y;return t[14]!==g||t[15]!==n.location||t[16]!==l||t[17]!==_||t[18]!==f?(y=[n.location,g,_,l,f],t[14]=g,t[15]=n.location,t[16]=l,t[17]=_,t[18]=f,t[19]=y):y=t[19],(0,c.useEffect)(v,y),null}export{l as AppFileExternalNavigationDispatcher};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,kr as n,ri as r}from"./boot-vendor-CKEhulXz.js";import{B as i,Ch as a,Tp as o,_a as s}from"./index-miJf0-mc.js";import{r as c,t as l}from"./dist-5xeFhhwk.js";var u=n(),d=e(t(),1),f=e(r(),1),p={top:`calc(env(safe-area-inset-top) + var(--bb-app-chrome-row-height) + 16px)`},m=[`top`,`left`,`right`];function h(){let e=(0,u.c)(8),t=i(),n=o(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[],e[0]=r):r=e[0],(0,d.useEffect)(g,r);let a;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(a={zIndex:s.toast},e[1]=a):a=e[1];let c=n?`top-center`:`bottom-right`,h=n?p:void 0,_=n?p:void 0,v=n?m:void 0,y;return e[2]!==c||e[3]!==h||e[4]!==_||e[5]!==v||e[6]!==t?(y=(0,f.jsx)(l,{theme:t,style:a,position:c,offset:h,mobileOffset:_,swipeDirections:v}),e[2]=c,e[3]=h,e[4]=_,e[5]=v,e[6]=t,e[7]=y):y=e[7],y}function g(){a(c)}export{h as AppToasterView};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Cr as t,Et as n,St as r,bt as i,dr as a,hi as o,kr as s,ri as c,t as l,vr as u,yr as d}from"./boot-vendor-CKEhulXz.js";import{Ao as f,Bf as p,Di as m,En as h,Im as g,Nh as _,Pa as v,Pr as y,Qp as b,Sp as x,Th as S,Tp as C,Ud as w,bc as T,br as E,co as D,cp as O,fp as k,ho as A,ja as j,kh as M,ld as N,lp as ee,mt as P,oo as F,tt as I,vr as L,vv as R,xr as z,zf as te,zm as B}from"./index-miJf0-mc.js";import{n as V,r as H,t as U}from"./browser-url-DzbAd45A.js";import{r as ne}from"./panelChromeClasses-BubpnwAb.js";import{a as W,i as G,n as K,r as re}from"./launcherRow-CCEqWhEC.js";var q=e(o(),1),J=s(),ie=`bb.thread.browserHistory`,ae=`1`,oe=24,Y=a(d({url:t().min(1),title:t().min(1).nullable(),visitedAt:u().int().nonnegative()}).strict()),se=[],ce=N({parse:(e,t)=>{if(e===null)return t;try{let n=Y.safeParse(JSON.parse(e));return n.success?n.data:t}catch{return t}},serialize:e=>JSON.stringify(e)});function le(e){return`${ie}-${encodeURIComponent(e.trim())}-${ae}`}var ue=n(se),de=l(e=>i(le(e),se,ce,{getOnInit:!0}));function fe(e){return e!=null&&e.trim().length>0}function pe(e){let t=(0,J.c)(10),n;t[0]===e?n=t[1]:(n=fe(e)?de(e):ue,t[0]=e,t[1]=n);let[i,a]=r(n),o;t[2]===a?o=t[3]:(o=e=>{let{url:t,title:n}=e;t.length!==0&&a(e=>[{url:t,title:n,visitedAt:Date.now()},...e.filter(e=>e.url!==t)].slice(0,oe))},t[2]=a,t[3]=o);let s=o,c;t[4]===a?c=t[5]:(c=()=>{a(se)},t[4]=a,t[5]=c);let l=c,u;return t[6]!==l||t[7]!==i||t[8]!==s?(u={entries:i,recordVisit:s,clear:l},t[6]=l,t[7]=i,t[8]=s,t[9]=u):u=t[9],u}var X=e(c(),1);function me(e){return e===null?null:`${e.activeMatchOrdinal}/${e.matches}`}function Z(e){let t=(0,J.c)(9),{icon:n,label:r,disabled:i,onClick:a,shortcut:o}=e,s=o?`${r} (${o.label})`:r,c=o?.ariaKeyshortcuts,l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=_(`flex shrink-0 items-center justify-center transition-colors hover:bg-state-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-40`,k,I),t[0]=l):l=t[0];let u;t[1]===n?u=t[2]:(u=(0,X.jsx)(S,{name:n,"aria-hidden":!0}),t[1]=n,t[2]=u);let d;return t[3]!==s||t[4]!==i||t[5]!==a||t[6]!==c||t[7]!==u?(d=(0,X.jsx)(`button`,{type:`button`,onClick:a,disabled:i,"aria-label":s,"aria-keyshortcuts":c,className:l,children:u}),t[3]=s,t[4]=i,t[5]=a,t[6]=c,t[7]=u,t[8]=d):d=t[8],d}function he(e){let t=(0,J.c)(36),{inputRef:n,query:r,matches:i,onQueryChange:a,onFindNext:o,onFindPrevious:s,onClose:c,shortcut:l}=e,u;t[0]===i?u=t[1]:(u=me(i),t[0]=i,t[1]=u);let d=u,f=i!==null&&i.matches>0,p=i!==null&&i.matches===0,m;t[2]!==c||t[3]!==o||t[4]!==s?(m=e=>{if(!e.nativeEvent.isComposing){if(e.key===`Enter`){e.preventDefault(),e.shiftKey?s():o();return}e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),c())}},t[2]=c,t[3]=o,t[4]=s,t[5]=m):m=t[5];let h=m,v;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(v=_(`flex h-9 shrink-0 items-center gap-1 border-b border-border/70 py-1 pl-2 pr-2`,ne),t[6]=v):v=t[6];let y;t[7]===a?y=t[8]:(y=e=>a(e.target.value),t[7]=a,t[8]=y);let b=l?`Find in page (${l.label})`:`Find in page`,S=l?.ariaKeyshortcuts,C;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(C=_(`min-w-0 flex-1 bg-transparent text-foreground outline-none placeholder:text-muted-foreground`,x),t[9]=C):C=t[9];let w;t[10]!==h||t[11]!==n||t[12]!==r||t[13]!==y||t[14]!==b||t[15]!==S?(w=(0,X.jsx)(`input`,{ref:n,type:`text`,value:r,onChange:y,onKeyDown:h,placeholder:`Find in page`,"aria-label":b,"aria-keyshortcuts":S,autoComplete:`off`,spellCheck:!1,maxLength:g,className:C}),t[10]=h,t[11]=n,t[12]=r,t[13]=y,t[14]=b,t[15]=S,t[16]=w):w=t[16];let T;t[17]!==d||t[18]!==p?(T=d===null?null:(0,X.jsx)(`span`,{"data-testid":`browser-find-match-count`,"aria-live":`polite`,className:_(`shrink-0 tabular-nums`,p?`text-destructive`:`text-muted-foreground`,x),children:d}),t[17]=d,t[18]=p,t[19]=T):T=t[19];let E;t[20]!==w||t[21]!==T?(E=(0,X.jsxs)(`div`,{className:`flex h-7 min-w-0 flex-1 items-center gap-2 rounded-md border border-border/70 bg-background/70 px-2`,children:[w,T]}),t[20]=w,t[21]=T,t[22]=E):E=t[22];let D=!f,O;t[23]!==s||t[24]!==D?(O=(0,X.jsx)(Z,{icon:`ChevronUp`,label:`Previous match`,disabled:D,onClick:s}),t[23]=s,t[24]=D,t[25]=O):O=t[25];let k=!f,A;t[26]!==o||t[27]!==k?(A=(0,X.jsx)(Z,{icon:`ChevronDown`,label:`Next match`,disabled:k,onClick:o}),t[26]=o,t[27]=k,t[28]=A):A=t[28];let j;t[29]===c?j=t[30]:(j=(0,X.jsx)(Z,{icon:`X`,label:`Close find bar`,onClick:c}),t[29]=c,t[30]=j);let M;return t[31]!==E||t[32]!==O||t[33]!==A||t[34]!==j?(M=(0,X.jsxs)(`div`,{"data-testid":`browser-find-bar`,role:`search`,"aria-label":`Find in page`,className:v,children:[E,O,A,j]}),t[31]=E,t[32]=O,t[33]=A,t[34]=j,t[35]=M):M=t[35],M}function ge(e){let t=(0,J.c)(17),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({onFocus:r,onBlur:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=(0,q.useRef)(null),o=(0,q.useRef)(!1),s,c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{let e=()=>{o.current=!0,a.current=null},t=()=>{o.current=!1};return window.addEventListener(`blur`,e),window.addEventListener(`keydown`,t,!0),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`keydown`,t,!0)}},c=[],t[4]=s,t[5]=c):(s=t[4],c=t[5]),(0,q.useEffect)(s,c);let l,u,d;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=e=>{a.current=e.button===0&&(o.current||document.activeElement!==e.currentTarget)?{x:e.clientX,y:e.clientY}:null,o.current=!1},u=e=>{let t=a.current;t!==null&&Math.hypot(e.clientX-t.x,e.clientY-t.y)>4&&(a.current=null)},d=e=>{a.current!==null&&(a.current=null,e.preventDefault(),e.currentTarget.select())},t[6]=l,t[7]=u,t[8]=d):(l=t[6],u=t[7],d=t[8]);let f;t[9]===r?f=t[10]:(f=e=>{a.current===null&&!o.current&&e.currentTarget.select(),r?.(e)},t[9]=r,t[10]=f);let p;t[11]===n?p=t[12]:(p=e=>{a.current=null,n?.(e)},t[11]=n,t[12]=p);let m;return t[13]!==i||t[14]!==f||t[15]!==p?(m=(0,X.jsx)(`input`,{type:`text`,placeholder:`Enter a URL`,autoComplete:`off`,spellCheck:!1,...i,onMouseDown:l,onMouseMove:u,onMouseUp:d,onFocus:f,onBlur:p}),t[13]=i,t[14]=f,t[15]=p,t[16]=m):m=t[16],m}function _e(e){let t=(0,J.c)(27),{entry:n,now:r,onNavigate:i}=e,a;t[0]===n.url?a=t[1]:(a=U(n.url),t[0]=n.url,t[1]=a);let o=a,s;t[2]===n.title?s=t[3]:(s=n.title?.trim(),t[2]=n.title,t[3]=s);let c=s,l=c&&c.length>0?c:o,u;t[4]!==n.visitedAt||t[5]!==r?(u=j({timestamp:n.visitedAt,now:r}),t[4]=n.visitedAt,t[5]=r,t[6]=u):u=t[6];let d=u,f;t[7]!==n.url||t[8]!==i?(f=()=>i(n.url),t[7]=n.url,t[8]=i,t[9]=f):f=t[9];let p=n.url,m;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(m=_(K,`hover:bg-state-hover`),t[10]=m):m=t[10];let h;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,X.jsx)(`span`,{className:re,children:(0,X.jsx)(S,{name:`Browser`,className:O,"aria-hidden":!0})}),t[11]=h):h=t[11];let g;t[12]===l?g=t[13]:(g=(0,X.jsx)(`span`,{className:`truncate text-foreground`,children:l}),t[12]=l,t[13]=g);let v;t[14]!==o||t[15]!==l?(v=l===o?null:(0,X.jsx)(`span`,{className:`truncate font-mono text-muted-foreground [flex-shrink:9999]`,children:o}),t[14]=o,t[15]=l,t[16]=v):v=t[16];let y;t[17]!==g||t[18]!==v?(y=(0,X.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-center gap-1.5`,children:[g,v]}),t[17]=g,t[18]=v,t[19]=y):y=t[19];let b;t[20]===d?b=t[21]:(b=(0,X.jsx)(G,{idle:d,isActive:!1}),t[20]=d,t[21]=b);let x;return t[22]!==n.url||t[23]!==y||t[24]!==b||t[25]!==f?(x=(0,X.jsxs)(`button`,{type:`button`,onClick:f,title:p,className:m,children:[h,y,b]}),t[22]=n.url,t[23]=y,t[24]=b,t[25]=f,t[26]=x):x=t[26],x}function ve(e){let t=(0,J.c)(17),{onNavigateInput:n,recent:r,onClearRecent:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=Date.now(),t[0]=a):a=t[0];let o=a;if(r.length===0)return null;let s=r.length,c;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(c=_(`rounded text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,x),t[1]=c):c=t[1];let l;t[2]===i?l=t[3]:(l=(0,X.jsx)(`button`,{type:`button`,onClick:i,"aria-label":`Clear recently visited`,className:c,children:`Clear`}),t[2]=i,t[3]=l);let u;t[4]!==r.length||t[5]!==l?(u=(0,X.jsx)(W,{label:`Recently visited`,count:s,action:l}),t[4]=r.length,t[5]=l,t[6]=u):u=t[6];let d;if(t[7]!==n||t[8]!==r){let e;t[10]===n?e=t[11]:(e=e=>(0,X.jsx)(`li`,{children:(0,X.jsx)(_e,{entry:e,now:o,onNavigate:n})},e.url),t[10]=n,t[11]=e),d=r.map(e),t[7]=n,t[8]=r,t[9]=d}else d=t[9];let f;t[12]===d?f=t[13]:(f=(0,X.jsx)(`ul`,{"aria-label":`Recently visited`,className:`flex flex-col gap-px`,children:d}),t[12]=d,t[13]=f);let p;return t[14]!==u||t[15]!==f?(p=(0,X.jsx)(`div`,{className:`flex h-full flex-col overflow-y-auto px-4 pb-6 pt-8`,children:(0,X.jsx)(`div`,{className:`mx-auto flex w-full max-w-xl flex-col gap-6`,children:(0,X.jsxs)(`section`,{children:[u,f]})})}),t[14]=u,t[15]=f,t[16]=p):p=t[16],p}function ye({desktopBrowser:e,pluginId:t,tabId:n}){let r=e?.evaluate,i=e?.onPageMessage;return r===void 0||i===void 0?null:{async evaluate(e,i){let a=await r({tabId:n,expression:e,world:i?.world??`isolated`,channel:t});if(!a.ok)throw Error(a.error);return a.value},onMessage(e){return i(r=>{r.tabId===n&&r.channel===t&&e(r.data)})}}}function be(e){let t=(0,J.c)(18),{slot:n,threadId:r,tabId:i,url:a,isCompactViewport:o}=e,s;t[0]!==n.pluginId||t[1]!==i?(s=ye({desktopBrowser:te(),pluginId:n.pluginId,tabId:i}),t[0]=n.pluginId,t[1]=i,t[2]=s):s=t[2];let c=s,l=n.component,u=`${r}/${i}`,d;t[3]!==l||t[4]!==o||t[5]!==c||t[6]!==i||t[7]!==r||t[8]!==a?(d=(0,X.jsx)(l,{threadId:r,tabId:i,url:a,isCompactViewport:o,experimental_page:c}),t[3]=l,t[4]=o,t[5]=c,t[6]=i,t[7]=r,t[8]=a,t[9]=d):d=t[9];let f;t[10]!==n.title||t[11]!==d?(f=(0,X.jsx)(`span`,{role:`group`,"aria-label":n.title,className:`flex shrink-0 items-center`,children:d}),t[10]=n.title,t[11]=d,t[12]=f):f=t[12];let p;return t[13]!==n.id||t[14]!==n.pluginId||t[15]!==u||t[16]!==f?(p=(0,X.jsx)(y,{pluginId:n.pluginId,slotKind:`browserToolbarAction`,slotId:n.id,instanceId:u,crashFallback:null,children:f}),t[13]=n.id,t[14]=n.pluginId,t[15]=u,t[16]=f,t[17]=p):p=t[17],p}function xe(e){let t=(0,J.c)(11),{threadId:n,tabId:r,url:i,isCompactViewport:a}=e,{browserToolbarActions:o}=b();if(o.length===0)return null;let s;if(t[0]!==o||t[1]!==a||t[2]!==r||t[3]!==n||t[4]!==i){let e;t[6]!==a||t[7]!==r||t[8]!==n||t[9]!==i?(e=e=>(0,X.jsx)(be,{slot:e,threadId:n,tabId:r,url:i,isCompactViewport:a},`${e.pluginId}/${e.id}/${e.generation}/${n}/${r}`),t[6]=a,t[7]=r,t[8]=n,t[9]=i,t[10]=e):e=t[10],s=o.map(e),t[0]=o,t[1]=a,t[2]=r,t[3]=n,t[4]=i,t[5]=s}else s=t[5];return s}var Se={x:0,y:0,width:0,height:0};function Ce(e){return{x:Math.round(e.left),y:Math.round(e.top),width:Math.round(e.width),height:Math.round(e.height)}}function we(){return{width:window.innerWidth,height:window.innerHeight}}function Te(e){return B({bounds:Ce(e.element.getBoundingClientRect()),viewport:we()})}function Ee(e){return e===`flex-grow`||e===`flex-basis`}function De(e){return e.a.x===e.b.x&&e.a.y===e.b.y&&e.a.width===e.b.width&&e.a.height===e.b.height}function Oe(e){return m(e.url)?`Server not reachable`:e.errorText.includes(`ERR_BLOCKED_BY_CLIENT`)?`Page blocked`:`Page unavailable`}function ke(e){let t=(0,J.c)(48),{addressDraft:n,isEditing:r,state:i,currentUrl:a,addressInputRef:o,onAddressChange:s,onAddressFocus:c,onAddressBlur:l,onAddressKeyDown:u,onSubmit:d,onBack:f,onForward:p,onReloadOrStop:m,onOpenExternal:h,locationShortcut:g,reloadShortcut:v,pluginActions:y}=e,b=i?.isLoading??!1,C;t[0]===a?C=t[1]:(C=V(a),t[0]=a,t[1]=C);let w=C,T=r?n:a,E,D;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(E=_(`relative h-11 shrink-0 overflow-hidden focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring max-md:pointer-coarse:h-[52px]`,ne),D=_(`absolute inset-x-0 top-0 flex h-11 translate-y-0 items-center gap-1 py-1.5 pl-2 pr-4 opacity-100 max-md:pointer-coarse:h-[52px]`),t[2]=E,t[3]=D):(E=t[2],D=t[3]);let O=!(i?.canGoBack??!1),k;t[4]!==f||t[5]!==O?(k=(0,X.jsx)(Z,{icon:`ChevronLeft`,label:`Go back`,disabled:O,onClick:f}),t[4]=f,t[5]=O,t[6]=k):k=t[6];let A=!(i?.canGoForward??!1),j;t[7]!==p||t[8]!==A?(j=(0,X.jsx)(Z,{icon:`ChevronRight`,label:`Go forward`,disabled:A,onClick:p}),t[7]=p,t[8]=A,t[9]=j):j=t[9];let M=b?`X`:`RotateCcw`,N=b?`Stop loading`:`Reload`,P=b?null:v,F;t[10]!==m||t[11]!==P||t[12]!==M||t[13]!==N?(F=(0,X.jsx)(Z,{icon:M,label:N,shortcut:P,onClick:m}),t[10]=m,t[11]=P,t[12]=M,t[13]=N,t[14]=F):F=t[14];let I;t[15]===w?I=t[16]:(I=w===`secure`?(0,X.jsx)(S,{name:`Lock`,className:_(ee,`text-success`),"aria-label":`Secure connection`}):w===`insecure`?(0,X.jsx)(S,{name:`AlertTriangle`,className:_(ee,`text-warning`),"aria-label":`Connection not secure`}):(0,X.jsx)(S,{name:`Search`,className:_(ee,`text-muted-foreground`),"aria-hidden":!0}),t[15]=w,t[16]=I);let L;t[17]===s?L=t[18]:(L=e=>s(e.target.value),t[17]=s,t[18]=L);let R=g?`Address and search bar (${g.label})`:`Address and search bar`,z=g?.ariaKeyshortcuts,te;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(te=_(`min-w-0 flex-1 bg-transparent font-mono text-foreground outline-none placeholder:font-sans placeholder:text-muted-foreground`,x),t[19]=te):te=t[19];let B;t[20]!==o||t[21]!==T||t[22]!==l||t[23]!==c||t[24]!==u||t[25]!==L||t[26]!==R||t[27]!==z?(B=(0,X.jsx)(ge,{ref:o,value:T,onChange:L,onFocus:c,onBlur:l,onKeyDown:u,"aria-label":R,"aria-keyshortcuts":z,className:te}),t[20]=o,t[21]=T,t[22]=l,t[23]=c,t[24]=u,t[25]=L,t[26]=R,t[27]=z,t[28]=B):B=t[28];let H;t[29]!==I||t[30]!==B?(H=(0,X.jsxs)(`div`,{className:`flex h-8 items-center gap-2 rounded-full border border-border/70 bg-background/70 px-3 max-md:pointer-coarse:h-10`,children:[I,B]}),t[29]=I,t[30]=B,t[31]=H):H=t[31];let U;t[32]!==d||t[33]!==H?(U=(0,X.jsx)(`form`,{onSubmit:d,className:`min-w-0 flex-1`,children:H}),t[32]=d,t[33]=H,t[34]=U):U=t[34];let W=a.length===0,G;t[35]!==h||t[36]!==W?(G=(0,X.jsx)(Z,{icon:`ExternalLink`,label:`Open in external browser`,disabled:W,onClick:h}),t[35]=h,t[36]=W,t[37]=G):G=t[37];let K;t[38]===b?K=t[39]:(K=b?(0,X.jsx)(`span`,{className:`absolute inset-x-0 bottom-0 h-0.5 overflow-hidden`,children:(0,X.jsx)(`span`,{className:`block h-full w-1/3 animate-pulse bg-ring/70 motion-reduce:animate-none`})}):null,t[38]=b,t[39]=K);let re;return t[40]!==y||t[41]!==F||t[42]!==U||t[43]!==G||t[44]!==K||t[45]!==k||t[46]!==j?(re=(0,X.jsx)(`div`,{role:`region`,"aria-label":`Browser navigation`,tabIndex:-1,className:E,children:(0,X.jsxs)(`div`,{className:D,children:[k,j,F,U,y,G,K]})}),t[40]=y,t[41]=F,t[42]=U,t[43]=G,t[44]=K,t[45]=k,t[46]=j,t[47]=re):re=t[47],re}function Ae(){let e=(0,J.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,X.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-3 px-6 text-center`,children:[(0,X.jsx)(`span`,{className:`flex size-11 items-center justify-center rounded-lg border border-border bg-card text-muted-foreground`,children:(0,X.jsx)(S,{name:`Globe`,className:`size-6`,"aria-hidden":!0})}),(0,X.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:`Browser tabs need the desktop app`}),(0,X.jsx)(`p`,{className:_(`max-w-xs text-muted-foreground`,x),children:`The in-app web browser runs in the Moonlet desktop app. Open this thread there to browse the web.`})]}),e[0]=t):t=e[0],t}function je(e){let t=(0,J.c)(32),{errorText:n,onOpenExternal:r,onRetry:i,url:a}=e,o;t[0]===a?o=t[1]:(o=U(a),t[0]=a,t[1]=o);let s=o,c;t[2]!==n||t[3]!==a?(c=Oe({errorText:n,url:a}),t[2]=n,t[3]=a,t[4]=c):c=t[4];let l=c,u;t[5]!==s||t[6]!==a?(u=m(a)?`The browser could not reach ${s||`this local server`}. Start the server, then reload.`:`The browser could not load this page. Try reloading or opening it externally.`,t[5]=s,t[6]=a,t[7]=u):u=t[7];let d=u,f;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,X.jsx)(`span`,{className:`flex size-11 items-center justify-center rounded-lg border border-border bg-surface-recessed text-muted-foreground`,children:(0,X.jsx)(S,{name:`Globe`,className:`size-6`,"aria-hidden":!0})}),t[8]=f):f=t[8];let p;t[9]===l?p=t[10]:(p=(0,X.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:l}),t[9]=l,t[10]=p);let h;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(h=_(`mt-1 text-muted-foreground`,x),t[11]=h):h=t[11];let g;t[12]===d?g=t[13]:(g=(0,X.jsx)(`p`,{className:h,children:d}),t[12]=d,t[13]=g);let v;t[14]!==p||t[15]!==g?(v=(0,X.jsxs)(`div`,{children:[p,g]}),t[14]=p,t[15]=g,t[16]=v):v=t[16];let y;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,X.jsx)(S,{name:`RotateCcw`,className:`size-3.5`,"aria-hidden":!0}),t[17]=y):y=t[17];let b;t[18]===i?b=t[19]:(b=(0,X.jsxs)(`button`,{type:`button`,onClick:i,className:`inline-flex h-8 items-center gap-1.5 rounded-md border border-border bg-background px-2.5 text-xs font-medium text-foreground transition-colors hover:bg-state-hover`,children:[y,`Reload`]}),t[18]=i,t[19]=b);let C;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,X.jsx)(S,{name:`ExternalLink`,className:`size-3.5`,"aria-hidden":!0}),t[20]=C):C=t[20];let w;t[21]===r?w=t[22]:(w=(0,X.jsxs)(`button`,{type:`button`,onClick:r,className:`inline-flex h-8 items-center gap-1.5 rounded-md px-2.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-state-hover hover:text-foreground`,children:[C,`Open externally`]}),t[21]=r,t[22]=w);let T;t[23]!==b||t[24]!==w?(T=(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center justify-center gap-2 pt-1`,children:[b,w]}),t[23]=b,t[24]=w,t[25]=T):T=t[25];let E;t[26]===n?E=t[27]:(E=(0,X.jsx)(`p`,{className:`max-w-full truncate pt-1 font-mono text-[11px] text-subtle-foreground`,children:n}),t[26]=n,t[27]=E);let D;return t[28]!==T||t[29]!==E||t[30]!==v?(D=(0,X.jsx)(`div`,{className:`flex h-full flex-col items-center justify-center px-6 text-center`,children:(0,X.jsxs)(`div`,{className:`flex w-full max-w-sm flex-col items-center gap-3`,children:[f,v,T,E]})}),t[28]=T,t[29]=E,t[30]=v,t[31]=D):D=t[31],D}function Me({tabId:e,desktopTarget:t,existingOnly:n,initialUrl:r,addressFocusRequest:i,onAddressFocusRequestConsumed:a,canShowNativeBrowserView:o,canHandleBrowserCommands:s=o,onNativeFocus:c,visibilityCoordinator:l,environmentId:u,threadId:d,onUpdate:m,onOpenInNewTab:_}){let v=D(`browser.focusLocation`),y=D(`browser.reload`),b=D(`browser.find`),x=(0,q.useMemo)(()=>te(),[]),S=(0,q.useRef)(null),w=(0,q.useRef)(null),O=(0,q.useRef)(null),k=T(),j=C(),{entries:M,recordVisit:N,clear:ee}=pe(d),[P,I]=(0,q.useState)(null),[L,B]=(0,q.useState)(null);(0,q.useEffect)(()=>{let t=!0,n=!1;B(null);let r=n=>{t&&n.tabId===e&&n.threadId===d&&B(n.control)},i=x?.onControl?.(t=>{t.tabId!==e||t.threadId!==d||(n=!0,r(t))});return x?.getControl?.(e).then(e=>{e!==null&&!n&&r(e)}).catch(()=>void 0),()=>{t=!1,i?.()}},[x,e,d]);let[V,U]=(0,q.useState)(r),[ne,W]=(0,q.useState)(r),[G,K]=(0,q.useState)(!1),[re,J]=(0,q.useState)(!1),[ie,ae]=(0,q.useState)(!1),oe=(0,q.useRef)(!1);oe.current=ie;let[Y,se]=(0,q.useState)(``),[ce,le]=(0,q.useState)(null),[ue,de]=(0,q.useState)(null),fe=(0,q.useRef)(m),me=(0,q.useRef)(N);fe.current=m,me.current=N;let Z=(0,q.useRef)(r),ge=(0,q.useRef)(n),_e=(0,q.useRef)(t),[ye,be]=(0,q.useState)(null),Ce=ye!==null&&ye.environmentId===u&&ye.tabId===e&&ye.threadId===d,we=V.length>0,Oe=x?.focus!==void 0&&x.onFocus!==void 0&&x.setVisibleWithoutFocus!==void 0,Me=P?.errorText??null,Ne=Me!==null&&we,Pe=f(),Fe=(0,q.useRef)(null),Ie=(0,q.useCallback)(()=>{let e=S.current;return e===null?null:Te({element:e})},[]),Le=(0,q.useCallback)(t=>{x!==null&&(Fe.current=t,x.setBounds({tabId:e,bounds:t}))},[x,e]),Re=(0,q.useCallback)(({force:e})=>{let t=Ie();if(t===null)return;let n=Fe.current;!e&&n!==null&&De({a:n,b:t})||Le(t)},[Ie,Le]),ze=(0,q.useCallback)(()=>{Re({force:!0})},[Re]),Q=(0,q.useCallback)(()=>{Re({force:!1})},[Re]),Be=(0,q.useCallback)(()=>{let e=Ie();return Fe.current=e,e??Se},[Ie]);(0,q.useEffect)(()=>{if(x===null)return;let t=Be(),n=Z.current;E({environmentId:u,tabId:e,threadId:d});let r=_e.current,i=ge.current===!0&&(r===void 0||!z(e,r));x.attach({tabId:e,threadId:d,...i?{existingOnly:!0}:{},url:n,bounds:t,visible:!1}),be({environmentId:u,tabId:e,threadId:d});let a=null,o=x.onState(t=>{t.tabId===e&&(a!==null&&(a.url!==t.url||t.isLoading&&!a.isLoading)&&le(null),a=t,I(t),U(t.url),fe.current({tabId:e,url:t.url,title:t.title}),!t.isLoading&&t.url.length>0&&me.current({url:t.url,title:t.title}))}),s=x.onSnapshot?.(t=>{t.tabId===e&&de(t.dataUrl)}),c=x.onFindResult?.(t=>{t.tabId===e&&le({activeMatchOrdinal:t.activeMatchOrdinal,matches:t.matches})});return()=>{o(),s?.(),c?.(),oe.current&&x.stopFindInPage?.({tabId:e,action:`clearSelection`}),l?.release(e)}},[x,u,Be,l,e,d]),(0,q.useEffect)(()=>{let e=S.current;if(e===null||x===null)return;let t=new ResizeObserver(()=>{Q()});return t.observe(e),()=>{t.disconnect()}},[x,Q]),(0,q.useEffect)(()=>{if(x===null)return;let e=e=>{Ee(e.propertyName)&&Q()};return window.addEventListener(h,Q),window.addEventListener(`resize`,Q),document.addEventListener(`transitionend`,e,!0),document.addEventListener(`transitioncancel`,e,!0),()=>{window.removeEventListener(h,Q),window.removeEventListener(`resize`,Q),document.removeEventListener(`transitionend`,e,!0),document.removeEventListener(`transitioncancel`,e,!0)}},[x,Q]);let Ve=o&&(s||Oe)&&we&&!Ne&&Ce&&!Pe;(0,q.useLayoutEffect)(()=>{if(l!==null){if(Ve)return l.show(e,ze,{focus:!1}),()=>{l.hide(e)};l.hide(e)}},[l,e,Ve,ze]),(0,q.useLayoutEffect)(()=>{if(re){if(!o||!s||Ne||Pe){J(!1);return}Ve&&(J(!1),x?.focus?.(e))}},[re,o,s,Ne,Pe,Ve,x,e]),(0,q.useEffect)(()=>{if(!(x?.onFocus===void 0||c===void 0))return x.onFocus(t=>{t===e&&c()})},[x,c,e]),(0,q.useEffect)(()=>{if(i===null||i.tabId!==e)return;if(k){a?.(i);return}W(V),K(!0),w.current?.focus({preventScroll:!0});let t=requestAnimationFrame(()=>{w.current?.focus({preventScroll:!0}),a?.(i)});return()=>cancelAnimationFrame(t)},[i,V,k,a,e]);let He=(0,q.useCallback)(t=>{let n=H(t);n!==null&&(U(n),K(!1),w.current?.blur(),x?.navigate({tabId:e,url:n}),J(!0))},[x,e]),Ue=(0,q.useCallback)(e=>{e.preventDefault(),He(ne)},[ne,He]),We=(0,q.useCallback)(e=>{if(e.nativeEvent.isComposing)return;if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),W(V);let t=e.currentTarget;window.requestAnimationFrame(()=>{document.activeElement===t&&t.select()});return}if(_===null||e.key!==`Enter`||e.shiftKey||e.ctrlKey||!(R(A())?e.metaKey&&!e.altKey:e.altKey&&!e.metaKey))return;e.preventDefault();let t=H(ne);t!==null&&(W(V),K(!1),w.current?.blur(),_(t))},[ne,V,_]),Ge=(0,q.useCallback)(()=>{W(V),K(!0)},[V]),Ke=(0,q.useCallback)(()=>{if(P?.isLoading??!1){x?.stop(e);return}x?.reload(e)},[x,P?.isLoading,e]);F(`browser.focusLocation`,(0,q.useCallback)(()=>!s||x===null?!1:(W(V),K(!0),w.current?.focus({preventScroll:!0}),window.requestAnimationFrame(()=>{w.current?.focus({preventScroll:!0}),w.current?.select()}),!0),[s,V,x]),100);let qe=o&&x!==null&&x.findInPage!==void 0&&we,$=(0,q.useCallback)(t=>{x?.findInPage?.({tabId:e,...t})},[x,e]),Je=(0,q.useCallback)(()=>{x?.stopFindInPage?.({tabId:e,action:`clearSelection`}),le(null)},[x,e]),Ye=(0,q.useCallback)(()=>{O.current?.focus({preventScroll:!0}),window.requestAnimationFrame(()=>{O.current?.focus({preventScroll:!0}),O.current?.select()})},[]),Xe=(0,q.useCallback)(e=>{let t=e.slice(0,g);if(se(t),t.length===0){Je();return}$({text:t,forward:!0,newSession:!0})},[Je,$]),Ze=(0,q.useCallback)(()=>{Y.length!==0&&$({text:Y,forward:!0,newSession:!1})},[Y,$]),Qe=(0,q.useCallback)(()=>{Y.length!==0&&$({text:Y,forward:!1,newSession:!1})},[Y,$]),$e=(0,q.useCallback)(()=>{ae(!1),Je()},[Je]);F(`browser.find`,(0,q.useCallback)(()=>qe?(ae(!0),Y.length>0&&$({text:Y,forward:!0,newSession:!0}),Ye(),!0):!1,[qe,Y,Ye,$]),100),(0,q.useEffect)(()=>{ie&&!qe&&(ae(!1),Je())},[qe,Je,ie]),F(`browser.reload`,()=>!s||x===null||!we?!1:(x.reload(e),!0),100);let et=(0,q.useCallback)(()=>{p()?.openExternalUrl(V)},[V]);return x===null?(0,X.jsx)(Ae,{}):(0,X.jsxs)(`div`,{"data-app-browser":!0,className:`flex h-full min-h-0 flex-col`,children:[(0,X.jsx)(ke,{addressDraft:ne,isEditing:G,state:P,currentUrl:V,addressInputRef:w,onAddressChange:W,onAddressFocus:Ge,onAddressBlur:()=>K(!1),onAddressKeyDown:We,onSubmit:Ue,onBack:()=>{x.goBack(e)},onForward:()=>{x.goForward(e)},onReloadOrStop:Ke,onOpenExternal:et,locationShortcut:v,reloadShortcut:y,pluginActions:(0,X.jsx)(xe,{threadId:d,tabId:e,url:V,isCompactViewport:j})}),L===null?null:(0,X.jsxs)(`div`,{role:`status`,className:`flex shrink-0 items-center gap-3 border-b border-border bg-surface-recessed px-3 py-2 text-xs`,children:[(0,X.jsxs)(`span`,{className:`min-w-0 flex-1 truncate`,children:[L.controllerLabel,` is controlling this tab`]}),(0,X.jsx)(`button`,{type:`button`,className:`rounded px-2 py-1 hover:bg-state-hover`,onClick:()=>x.releaseControl?.(e),children:`Stop`}),(0,X.jsx)(`button`,{type:`button`,className:`rounded px-2 py-1 hover:bg-state-hover`,onClick:()=>{x.releaseControl?.(e),x.focus?.(e)},children:`Take over`})]}),ie?(0,X.jsx)(he,{inputRef:O,query:Y,matches:ce,onQueryChange:Xe,onFindNext:Ze,onFindPrevious:Qe,onClose:$e,shortcut:b}):null,(0,X.jsxs)(`div`,{ref:S,className:`relative min-h-0 flex-1`,children:[Ne?(0,X.jsx)(je,{errorText:Me,onOpenExternal:et,onRetry:Ke,url:V}):we&&!Pe?null:(0,X.jsx)(ve,{onNavigateInput:He,recent:M,onClearRecent:ee}),we&&ue!==null?(0,X.jsx)(`img`,{src:ue,alt:``,draggable:!1,className:`absolute inset-0 size-full`}):null]})]})}function Ne(e,t){return t===null?null:e.find(e=>e.id===t)??null}var Pe=4,Fe=32,Ie=2e3;function Le(e){return Math.min(250*2**(e-1),Ie)}function Re(e,t){if(e===void 0)return`open`;if(t.status===`pending`)return`pending`;let n=t.target;return n===null||n.hostId!==e.hostId?`unavailable`:n.instanceId===e.instanceId?`attach`:`check-saved-window`}function ze(e){let t=(0,J.c)(40),{browserTabs:n,activeBrowserTabId:r,addressFocusRequest:i,onAddressFocusRequestConsumed:a,environmentId:o,canShowNativeBrowserView:s,canHandleBrowserCommands:c,onNativeFocus:l,threadId:u,onUpdate:d,onOpenInNewTab:f}=e,p=i===void 0?null:i,m=c===void 0?s:c,h;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(h=te(),t[0]=h):h=t[0];let g=h,_;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(_=g===null?null:L(g),t[1]=_):_=t[1];let v=_,y=Ne(n,r),b=y?.desktopTarget,x=b?.hostId,S;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>g?.getTarget===void 0?{status:`ready`,target:null}:{status:`pending`},t[2]=S):S=t[2];let[C,T]=(0,q.useState)(S),[E,D]=(0,q.useState)(0),O=b===void 0?null:`${y?.id}:${E}:${b.hostId}:${b.instanceId}:${b.generation}`,[k,A]=(0,q.useState)(null),j;t[3]!==O||t[4]!==A?(j=()=>{let e=g?.getTarget?.bind(g);if(e===void 0)return;let t=!0,n=0,r,i=()=>{e().catch(Be).then(e=>{if(t){if(e!==null){T({status:`ready`,target:e});return}if(n+=1,n>=Pe&&T({status:`ready`,target:null}),n>=Fe){A(O);return}r=setTimeout(i,Le(n))}})};return i(),()=>{t=!1,clearTimeout(r)}},t[3]=O,t[4]=A,t[5]=j):j=t[5],(0,q.useEffect)(j,[g,x,b?.instanceId,b?.generation,O]);let M=Re(b,C),N=M===`check-saved-window`?O:null,[ee,P]=(0,q.useState)(null),F=b?.instanceId,I;t[6]!==O||t[7]!==F||t[8]!==N||t[9]!==A||t[10]!==x?(I=()=>{if(N===null||x===void 0||F===void 0)return;let e=!0,t=0,n,r=()=>{w.experimental_desktopBrowsers.listInstances({hostId:x}).then(t=>{let{instances:n}=t;e&&P({key:N,status:n.some(e=>e.instanceId===F)?`live`:`gone`})},()=>{if(e){if(t+=1,t>=Pe&&P({key:N,status:`unknown`}),t>=Fe){A(O);return}n=setTimeout(r,Le(t))}})};return r(),()=>{e=!1,clearTimeout(n)}},t[6]=O,t[7]=F,t[8]=N,t[9]=A,t[10]=x,t[11]=I):I=t[11];let R;if(t[12]!==O||t[13]!==F||t[14]!==N||t[15]!==x?(R=[N,x,F,O],t[12]=O,t[13]=F,t[14]=N,t[15]=x,t[16]=R):R=t[16],(0,q.useEffect)(I,R),y===null)return null;let z=ee?.key===N?ee.status:null,B=O!==null&&k===O;if(M===`pending`||M===`check-saved-window`&&z===null){let e;return t[17]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsx)(`div`,{className:`flex min-h-0 flex-1 bg-sidebar`}),t[17]=e):e=t[17],e}if(M===`unavailable`||M===`check-saved-window`&&z!==`gone`){let e;t[18]!==B||t[19]!==z||t[20]!==D?(e=B||z===`live`?()=>D(Q):null,t[18]=B,t[19]=z,t[20]=D,t[21]=e):e=t[21];let n=g===null?`desktop-required`:z===`live`?`other-window`:C.status===`ready`&&C.target!==null&&C.target.hostId!==b?.hostId?`other-computer`:B?`unreachable`:`reconnecting`,r;return t[22]!==y.url||t[23]!==n||t[24]!==e?(r=(0,X.jsx)(He,{url:y.url,onRetry:e,reason:n}),t[22]=y.url,t[23]=n,t[24]=e,t[25]=r):r=t[25],r}let V=M===`attach`?!0:void 0,H=p?.tabId===y.id?p:null,U;return t[26]!==y.id||t[27]!==y.url||t[28]!==m||t[29]!==s||t[30]!==o||t[31]!==a||t[32]!==l||t[33]!==f||t[34]!==d||t[35]!==H||t[36]!==V||t[37]!==b||t[38]!==u?(U=(0,X.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col bg-sidebar`,children:(0,X.jsx)(Me,{tabId:y.id,desktopTarget:b,existingOnly:V,initialUrl:y.url,addressFocusRequest:H,onAddressFocusRequestConsumed:a,canShowNativeBrowserView:s,canHandleBrowserCommands:m,onNativeFocus:l,visibilityCoordinator:v,environmentId:o,threadId:u,onUpdate:d,onOpenInNewTab:f},y.id)}),t[26]=y.id,t[27]=y.url,t[28]=m,t[29]=s,t[30]=o,t[31]=a,t[32]=l,t[33]=f,t[34]=d,t[35]=H,t[36]=V,t[37]=b,t[38]=u,t[39]=U):U=t[39],U}function Q(e){return e+1}function Be(){return null}var Ve={"desktop-required":{title:`Browser tabs need the desktop app`,body:`This tab is open in the Moonlet desktop app.`},"other-window":{title:`This tab is open in another Moonlet window`,body:`Switch to that window to keep browsing.`},"other-computer":{title:`This tab is open on another computer`,body:`It was opened in Moonlet on a different computer.`},reconnecting:{title:`Reconnecting to this tab`,body:`The tab opens again as soon as Moonlet reconnects.`},unreachable:{title:`Can't reach this tab`,body:`Moonlet couldn't reconnect. Try again in a moment.`}};function He(e){let t=(0,J.c)(24),{url:n,reason:r,onRetry:i}=e,a=Ve[r],o;t[0]===n?o=t[1]:(o=URL.canParse(n)?new URL(n):null,t[0]=n,t[1]=o);let s=o,c=s?.protocol===`https:`||s?.protocol===`http:`,l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,X.jsx)(`span`,{className:`flex size-11 items-center justify-center rounded-lg border border-border bg-card text-muted-foreground`,children:(0,X.jsx)(S,{name:`Globe`,className:`size-6`,"aria-hidden":!0})}),t[2]=l):l=t[2];let u;t[3]===a.title?u=t[4]:(u=(0,X.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:a.title}),t[3]=a.title,t[4]=u);let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=_(`max-w-xs text-muted-foreground`,x),t[5]=d):d=t[5];let f;t[6]===a.body?f=t[7]:(f=(0,X.jsx)(`p`,{className:d,children:a.body}),t[6]=a.body,t[7]=f);let p;t[8]===n?p=t[9]:(p=n.length>0?(0,X.jsx)(`p`,{className:_(`max-w-full truncate font-mono text-muted-foreground select-text`,x),title:n,children:n}):null,t[8]=n,t[9]=p);let m;t[10]===i?m=t[11]:(m=i===null?null:(0,X.jsxs)(M,{type:`button`,variant:`outline`,size:`sm`,onClick:i,children:[(0,X.jsx)(S,{name:`RotateCcw`,"aria-hidden":!0}),`Try again`]}),t[10]=i,t[11]=m);let h;t[12]!==c||t[13]!==i||t[14]!==n?(h=n.length>0?(0,X.jsxs)(X.Fragment,{children:[c?(0,X.jsxs)(M,{type:`button`,variant:i===null?`outline`:`ghost`,size:`sm`,onClick:()=>P(n),children:[(0,X.jsx)(S,{name:`ExternalLink`,"aria-hidden":!0}),`Open in browser`]}):null,(0,X.jsxs)(M,{type:`button`,variant:`ghost`,size:`sm`,onClick:()=>{v(n,{successMessage:`Link copied`})},children:[(0,X.jsx)(S,{name:`Copy`,"aria-hidden":!0}),`Copy link`]})]}):null,t[12]=c,t[13]=i,t[14]=n,t[15]=h):h=t[15];let g;t[16]!==m||t[17]!==h?(g=(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center justify-center gap-2`,children:[m,h]}),t[16]=m,t[17]=h,t[18]=g):g=t[18];let y;return t[19]!==u||t[20]!==f||t[21]!==p||t[22]!==g?(y=(0,X.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col items-center justify-center gap-3 bg-sidebar px-6 text-center`,children:[l,u,f,p,g]}),t[19]=u,t[20]=f,t[21]=p,t[22]=g,t[23]=y):y=t[23],y}export{ze as BrowserTabDeck};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Br as t,hi as n,kr as r,ri as i}from"./boot-vendor-CKEhulXz.js";import{Nh as a,Qp as o,Tp as s,Za as c,ro as l,xm as u,ym as d}from"./index-miJf0-mc.js";import{i as f,n as p,r as m,t as h}from"./PaletteShell-Bsxuqi8N.js";import{r as g}from"./settings-sections-ClCE1nN2.js";import{r as _,t as v}from"./settings-nav-DEFhfJnQ.js";var y=e(n(),1),b=r();function x(){let e=typeof window>`u`?void 0:window.bbDesktop;return e?.getServerChoices&&e.onServerChoicesChange&&e.selectServer?{list:e.getServerChoices.bind(e),subscribe:e.onServerChoicesChange.bind(e),select:e.selectServer.bind(e)}:null}function ee(){let e=(0,b.c)(7),[t]=(0,y.useState)(x),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[],e[0]=n):n=e[0];let[r,i]=(0,y.useState)(n),a,o;e[1]===t?(a=e[2],o=e[3]):(a=()=>{if(t===null)return;let e=!1,n=!1,r=t.subscribe(t=>{n=!0,e||i(t)});return t.list().then(t=>{!e&&!n&&i(t)}).catch(S),()=>{e=!0,r()}},o=[t],e[1]=t,e[2]=a,e[3]=o),(0,y.useEffect)(a,o);let s=t?.select,c;return e[4]!==r||e[5]!==s?(c={choices:r,select:s},e[4]=r,e[5]=s,e[6]=c):c=e[6],c}function S(){}var te=[`Threads`,`Actions`,`Settings`,`Plugins`];function ne(e){return[...e.sections.map(t=>({id:`settings:${t.id}`,bucket:`Settings`,group:`Settings`,title:`${t.label} settings`,shortcut:null,run:()=>e.navigate(g(t.id))})),...e.pluginEntries.map(t=>({id:`settings:plugin:${t.id}`,bucket:`Settings`,group:`Plugin settings`,title:`${t.label} settings`,shortcut:null,run:()=>e.navigate(d({pluginId:t.id}))}))]}function re(e){return e.panels.map(t=>({id:`plugin-page:${t.pluginId}/${t.id}`,bucket:`Plugins`,group:`Plugin pages`,title:t.title,shortcut:null,run:()=>e.navigate(u({pluginId:t.pluginId,path:t.path}))}))}var C=e(i(),1),ie=l(`thread.search`);function ae(e){let n=(0,b.c)(60),{actions:r,installedPlugins:i,recents:a,query:l,onQueryChange:u,onChoose:d}=e,m=t(),g=s(),x=(0,y.useId)(),S=(0,y.useId)(),[ae,w]=(0,y.useState)(0),T=o(),de=v(T.fileOpeners),E;n[0]!==i||n[1]!==T.settingsSections?(E=_({installedPlugins:i,settingsSections:T.settingsSections}),n[0]=i,n[1]=T.settingsSections,n[2]=E):E=n[2];let fe=E,D;n[3]===m?D=n[4]:(D=e=>void m(e),n[3]=m,n[4]=D);let O;n[5]!==fe||n[6]!==de||n[7]!==D?(O=ne({navigate:D,pluginEntries:fe,sections:de}),n[5]=fe,n[6]=de,n[7]=D,n[8]=O):O=n[8];let k=O,A;n[9]===m?A=n[10]:(A=e=>void m(e),n[9]=m,n[10]=A);let j;n[11]!==T.navPanels||n[12]!==A?(j=re({navigate:A,panels:T.navPanels}),n[11]=T.navPanels,n[12]=A,n[13]=j):j=n[13];let pe=j,{choices:me,select:M}=ee(),N;n[14]!==me||n[15]!==M?(N=M===void 0?[]:me.filter(le).map(e=>({id:`server:${e.id}`,title:`Switch to ${e.name}`,bucket:`Actions`,group:`Servers`,shortcut:null,run:()=>M(e.id)})),n[14]=me,n[15]=M,n[16]=N):N=n[16];let he=N,P;n[17]!==r||n[18]!==pe||n[19]!==he||n[20]!==k?(P=[...r,...k,...pe,...he],n[17]=r,n[18]=pe,n[19]=he,n[20]=k,n[21]=P):P=n[21];let ge=P,F;n[22]===l?F=n[23]:(F=l.startsWith(`>`)?l.slice(1):l,n[22]=l,n[23]=F);let I=F,L;n[24]!==ge||n[25]!==I||n[26]!==a?(L=f({actions:ge,query:I,recentIds:a}),n[24]=ge,n[25]=I,n[26]=a,n[27]=L):L=n[27];let R=L,z;n[28]===I?z=n[29]:(z=I.trim(),n[28]=I,n[29]=z);let B=z===``,V;if(n[30]!==R){let e=te.map(e=>({bucket:e,entries:R.filter(t=>t.action.bucket===e)})).filter(ce);V=e.map((t,n)=>({...t,startIndex:e.slice(0,n).reduce(se,0)})),n[30]=R,n[31]=V}else V=n[31];let H=V,U;n[32]!==B||n[33]!==R||n[34]!==H?(U=B?H.flatMap(oe):R,n[32]=B,n[33]=R,n[34]=H,n[35]=U):U=n[35];let W=U,G=W.length===0?-1:Math.min(ae,W.length-1),K=(0,y.useRef)(null),q=(0,y.useRef)(!1),J;n[36]===Symbol.for(`react.memo_cache_sentinel`)?(J=()=>{q.current&&(q.current=!1,K.current?.querySelector(`[aria-selected="true"]`)?.scrollIntoView({block:`nearest`}))},n[36]=J):J=n[36];let Y;n[37]===G?Y=n[38]:(Y=[G],n[37]=G,n[38]=Y),(0,y.useEffect)(J,Y);let X;n[39]!==G||n[40]!==d||n[41]!==W?(X=e=>{if(!e.nativeEvent.isComposing&&W.length!==0){if(e.key===`ArrowDown`){e.preventDefault(),q.current=!0,w(e=>e+1>=W.length?0:e+1);return}if(e.key===`ArrowUp`){e.preventDefault(),q.current=!0,w(e=>e<=0?W.length-1:e-1);return}if(e.key===`Home`){e.preventDefault(),q.current=!0,w(0);return}if(e.key===`End`){e.preventDefault(),q.current=!0,w(W.length-1);return}if(e.key===`Enter`){let t=W[G];if(t===void 0)return;e.preventDefault(),d(t.action)}}},n[39]=G,n[40]=d,n[41]=W,n[42]=X):X=n[42];let _e=X,ve=G===-1?void 0:`${S}-${G}`,Z;n[43]===u?Z=n[44]:(Z=e=>{u(e),w(0),K.current!==null&&(K.current.scrollTop=0)},n[43]=u,n[44]=Z);let Q;n[45]!==G||n[46]!==g||n[47]!==B||n[48]!==d||n[49]!==S||n[50]!==H||n[51]!==W?(Q=!B&&W.length===0?(0,C.jsx)(`p`,{className:`px-3 py-4 text-center text-sm text-muted-foreground`,children:`No matching commands`}):B?H.map(e=>{let t=`${S}-${e.bucket.toLowerCase()}-label`;return(0,C.jsxs)(`div`,{role:`group`,"aria-labelledby":t,"data-palette-bucket":e.bucket,children:[(0,C.jsx)(`div`,{id:t,className:h,children:e.bucket}),e.entries.map((t,n)=>{let r=e.startIndex+n;return(0,C.jsx)(ue,{entry:t,id:`${S}-${r}`,isActive:r===G,isDrillIn:t.action.id===ie,showShortcut:!g,onActivate:()=>{w(r)},onSelect:()=>d(t.action)},t.action.id)})]},e.bucket)}):W.map((e,t)=>(0,C.jsx)(ue,{entry:e,id:`${S}-${t}`,isActive:t===G,isDrillIn:e.action.id===ie,showShortcut:!g,onActivate:()=>{w(t)},onSelect:()=>d(e.action)},e.action.id)),n[45]=G,n[46]=g,n[47]=B,n[48]=d,n[49]=S,n[50]=H,n[51]=W,n[52]=Q):Q=n[52];let $;return n[53]!==_e||n[54]!==x||n[55]!==l||n[56]!==ve||n[57]!==Z||n[58]!==Q?($=(0,C.jsx)(p,{activeDescendantId:ve,inputDescription:c.description,inputLabel:c.label,listId:x,listLabel:`Commands`,listRef:K,onInputChange:Z,onInputKeyDown:_e,placeholder:c.placeholder,value:l,children:Q}),n[53]=_e,n[54]=x,n[55]=l,n[56]=ve,n[57]=Z,n[58]=Q,n[59]=$):$=n[59],$}function oe(e){return e.entries}function se(e,t){return e+t.entries.length}function ce(e){return e.entries.length>0}function le(e){return!e.active}function ue(e){let t=(0,b.c)(19),{entry:n,id:r,isActive:i,isDrillIn:o,showShortcut:s,onActivate:c,onSelect:l}=e,u=n.action.group===`Browser`||n.action.id.startsWith(`plugin:`)?n.action.group:null,d=o?`${n.action.title}…`:n.action.title,f=s?n.action.shortcut:null,p=u!==null||f!==null||o,h=o?`drill-in`:`terminal`,g=i&&`bg-state-hover text-foreground`,_;t[0]===g?_=t[1]:(_=a(`flex min-h-8 w-full min-w-0 cursor-pointer items-center gap-3 rounded-md px-2 py-1.5 text-left text-sm outline-none`,g),t[0]=g,t[1]=_);let v;t[2]!==n.positions||t[3]!==d?(v=(0,C.jsx)(`span`,{className:`min-w-0 truncate`,children:(0,C.jsx)(w,{title:d,positions:n.positions})}),t[2]=n.positions,t[3]=d,t[4]=v):v=t[4];let y;t[5]!==p||t[6]!==o||t[7]!==u||t[8]!==f?(y=p?(0,C.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-2`,children:[u===null?null:(0,C.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:u}),f===null?null:(0,C.jsx)(m,{children:f.label}),o?(0,C.jsx)(`span`,{className:`sr-only`,children:`Opens a search view`}):null]}):null,t[5]=p,t[6]=o,t[7]=u,t[8]=f,t[9]=y):y=t[9];let x;return t[10]!==r||t[11]!==i||t[12]!==c||t[13]!==l||t[14]!==h||t[15]!==_||t[16]!==v||t[17]!==y?(x=(0,C.jsxs)(`div`,{id:r,role:`option`,"aria-selected":i,"data-palette-action-kind":h,className:_,onPointerMove:c,onClick:l,children:[v,y]}),t[10]=r,t[11]=i,t[12]=c,t[13]=l,t[14]=h,t[15]=_,t[16]=v,t[17]=y,t[18]=x):x=t[18],x}function w(e){let t=(0,b.c)(9),{title:n,positions:r}=e;if(r.length===0){let e;return t[0]===n?e=t[1]:(e=(0,C.jsx)(C.Fragment,{children:n}),t[0]=n,t[1]=e),e}let i;t[2]===r?i=t[3]:(i=new Set(r),t[2]=r,t[3]=i);let a=i,o;t[4]===n?o=t[5]:(o=[...n],t[4]=n,t[5]=o);let s;return t[6]!==a||t[7]!==o?(s=(0,C.jsx)(C.Fragment,{children:o.map((e,t)=>a.has(t)?(0,C.jsx)(`span`,{className:`font-semibold text-foreground`,children:e},t):(0,C.jsx)(`span`,{children:e},t))}),t[6]=a,t[7]=o,t[8]=s):s=t[8],s}export{ae as CommandPaletteBody};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{kr as t,ri as n}from"./boot-vendor-CKEhulXz.js";import{Q as r}from"./index-miJf0-mc.js";import{r as i}from"./git-diff-patch-text-SHpUxhZL.js";import{t as a}from"./MoonletDiffSplit-Bmty80ES.js";import{a as o,n as s,t as c}from"./code-rendering-DzjneiF5.js";var l=t(),u=e(n(),1),d=`diffRenderer`;function f(e){let t=(0,l.c)(25),{file:n,patchText:f,fullFileContents:p,view:m,overflow:h,showLineNumbers:g,className:_,onSelectionAddToChat:v}=e,y=m===void 0?s:m,b=h===void 0?c:h,x=g===void 0?!0:g,S=o(),C=S.kind===`plugin`,w;t[0]!==n||t[1]!==C||t[2]!==f?(w=C?f??i(n):``,t[0]=n,t[1]=C,t[2]=f,t[3]=w):w=t[3];let T=w,E;t[4]!==_||t[5]!==n||t[6]!==p||t[7]!==v||t[8]!==b||t[9]!==f||t[10]!==x||t[11]!==y?(E=(0,u.jsx)(a,{file:n,patchText:f,fullFileContents:p,view:y,overflow:b,showLineNumbers:x,className:_,onSelectionAddToChat:v}),t[4]=_,t[5]=n,t[6]=p,t[7]=v,t[8]=b,t[9]=f,t[10]=x,t[11]=y,t[12]=E):E=t[12];let D=E,O;t[13]!==_||t[14]!==n.name||t[15]!==p||t[16]!==b||t[17]!==T||t[18]!==x||t[19]!==y?(O=(e,t)=>(0,u.jsx)(`div`,{className:_,children:(0,u.jsx)(e.component,{patch:T,path:n.name,view:y,overflow:b,showLineNumbers:x,experimental_fullFileContents:p,Original:t})}),t[13]=_,t[14]=n.name,t[15]=p,t[16]=b,t[17]=T,t[18]=x,t[19]=y,t[20]=O):O=t[20];let k;return t[21]!==D||t[22]!==S||t[23]!==O?(k=(0,u.jsx)(r,{replacement:S,original:D,slotKind:d,children:O}),t[21]=D,t[22]=S,t[23]=O,t[24]=k):k=t[24],k}export{f as t};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{kr as t,ri as n}from"./boot-vendor-CKEhulXz.js";import{Bi as r,Hi as i,Hn as a,Jn as o,Pa as s,Qp as c,Ri as l,Un as u,Vi as d,zi as f}from"./index-miJf0-mc.js";import{t as p}from"./useLocalOpenTargets-CsL8C0eF.js";import{t as m}from"./useResolvedLiveFileTarget-CvjfYOSC.js";var h=t(),g=e(n(),1);function _(e){let t=u(e),n=t.lastIndexOf(`.`);return n>0&&n<t.length-1?t.slice(n+1).toLowerCase():null}function v(e){let t=(0,h.c)(40),{intent:n}=e,v=o(),y;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(y={enabled:!0},t[0]=y):y=t[0];let b=m(n.target,y),x=b.status===`available`,S;t[1]!==b.openContext||t[2]!==b.status?(S=b.status===`available`?{openContext:b.openContext}:{},t[1]=b.openContext,t[2]=b.status,t[3]=S):S=t[3];let C;t[4]!==x||t[5]!==S?(C={enabled:x,...S},t[4]=x,t[5]=S,t[6]=C):C=t[6];let w=p(C),{fileOpeners:T}=c(),E,D,O,k;if(t[7]!==T||t[8]!==n||t[9]!==w||t[10]!==v||t[11]!==b.absolutePath||t[12]!==b.status){let e=_(n.target.path),o=e===null?[]:T.filter(t=>t.extensions.includes(e)),s=a(n.location);t[17]!==n||t[18]!==v?(E=(0,g.jsx)(l,{onSelect:()=>v.openFilePreview(n),children:`Open preview`}),t[17]=n,t[18]=v,t[19]=E):E=t[19],D=o.length>0?(0,g.jsxs)(r,{children:[(0,g.jsx)(i,{children:`Open with`}),(0,g.jsxs)(d,{className:`min-w-52`,children:[(0,g.jsx)(l,{onSelect:()=>v.openFilePreview({...n,viewer:`builtin`}),children:`Moonlet preview`}),o.map(e=>(0,g.jsx)(l,{onSelect:()=>v.openFilePreview({...n,viewer:{pluginId:e.pluginId,openerId:e.id}}),children:e.title},`${e.pluginId}:${e.id}`))]})]}):null;let c=b.status!==`available`||w.isLoading||!w.canOpenPreferredFileTarget,u;t[20]!==n||t[21]!==v?(u=()=>v.openFileExternally(n),t[20]=n,t[21]=v,t[22]=u):u=t[22],t[23]!==u||t[24]!==c?(O=(0,g.jsx)(l,{disabled:c,onSelect:u,children:`Open externally`}),t[23]=u,t[24]=c,t[25]=O):O=t[25],k=b.status===`available`&&w.fileOpenTargets.length>0?(0,g.jsxs)(r,{children:[(0,g.jsx)(i,{children:`Open in`}),(0,g.jsx)(d,{className:`min-w-52`,children:w.fileOpenTargets.map(e=>(0,g.jsx)(l,{onSelect:()=>{w.openPathInFileTarget({columnNumber:s.columnNumber,lineNumber:s.lineNumber,path:b.absolutePath,rememberTarget:!1,targetId:e.id})},children:e.label},e.id))})]}):null,t[7]=T,t[8]=n,t[9]=w,t[10]=v,t[11]=b.absolutePath,t[12]=b.status,t[13]=E,t[14]=D,t[15]=O,t[16]=k}else E=t[13],D=t[14],O=t[15],k=t[16];let A;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,g.jsx)(f,{}),t[26]=A):A=t[26];let j;t[27]!==n.target.path||t[28]!==b.absolutePath||t[29]!==b.status?(j=(0,g.jsx)(l,{onSelect:()=>{s(b.status===`available`?b.absolutePath:n.target.path,{successMessage:`File path copied`,errorMessage:`Failed to copy file path`})},children:`Copy file path`}),t[27]=n.target.path,t[28]=b.absolutePath,t[29]=b.status,t[30]=j):j=t[30];let M;t[31]===n.target.path?M=t[32]:(M=(0,g.jsx)(l,{onSelect:()=>{s(u(n.target.path),{successMessage:`File name copied`,errorMessage:`Failed to copy file name`})},children:`Copy file name`}),t[31]=n.target.path,t[32]=M);let N;return t[33]!==j||t[34]!==M||t[35]!==E||t[36]!==D||t[37]!==O||t[38]!==k?(N=(0,g.jsxs)(g.Fragment,{children:[E,D,O,k,A,j,M]}),t[33]=j,t[34]=M,t[35]=E,t[36]=D,t[37]=O,t[38]=k,t[39]=N):N=t[39],N}export{v as ExperimentalFileLinkMenu};
@@ -0,0 +1,3 @@
1
+ import{o as e,r as t}from"./rolldown-runtime-BM3Ffeng.js";import{hi as n,kr as r,ri as i}from"./boot-vendor-CKEhulXz.js";import{$f as a,Mn as o,Nh as s,Pa as c,Qf as l,Sp as u,Th as d,Tp as f,Yt as p,Zf as m,aa as h,bc as g,ca as _,co as v,ep as y,ia as b,kh as x,la as S,lp as C,mt as w,pa as T,ra as E,sa as D,ta as O}from"./index-miJf0-mc.js";import{n as k}from"./code-loading-skeletons-kAn_Dql6.js";import{a as A,i as j,o as M,r as N,t as P}from"./TimelineSelectionMenu-DfdN6Ngc.js";import{t as F}from"./esm-CUQGeFi6.js";import{a as I,n as ee,r as te,t as ne}from"./useElementWidth-BASRxwD-.js";import{n as L}from"./save-file-B2t-Bzj_.js";import{t as re}from"./AppCommandShortcutHint-C7zjPYh-.js";import{n as R,r as z}from"./image-lightbox-BjXlPoxp.js";import{h as ie,m as ae,t as B}from"./markdown-preview-BFRWATVY.js";import{n as V}from"./SourceCodeHost-WsTehOqN.js";import{t as oe}from"./open-in-editor-button-Y_u-D0k2.js";var H=r(),U=e(n(),1),W=(0,U.createContext)(null),G=e(i(),1);function K(e,t){return t===null||!(e.target instanceof Node)?!1:t.contains(e.target)}function q(e,t){let{commonAncestorContainer:n}=e;return!!(t.contains(n)||typeof e.intersectsNode==`function`&&(()=>{try{return e.intersectsNode(t)}catch{return!1}})())}function J(e,t){let n=e.cloneRange();return t.contains(e.startContainer)||n.setStart(t,0),t.contains(e.endContainer)||n.setEnd(t,t.childNodes.length),M(n,t,`markdown`).text}function Y({anchor:e,markdown:t,node:n,pointerStartedInNode:r}){if(n===null||typeof window>`u`)return null;let i=window.getSelection();if(i===null||i.rangeCount===0||i.isCollapsed)return null;let a=i.toString().trim();if(a.length===0)return null;let o=i.getRangeAt(0);if(!r&&!q(o,n))return null;let s=e??null,c=j(o)??(s===null?n.getBoundingClientRect():new DOMRect(s.point.x,s.point.y,0,0)),l={text:t?J(o,n):a,rect:c};return s!==null&&(l.anchorPoint=s.point,l.anchorSide=s.side),l}function X(e){let t=(0,H.c)(22),{children:n,markdown:r,onSelectionAddToChat:i}=e,a=r===void 0?!1:r,o=(0,U.useRef)(null),s=(0,U.useRef)(!1),c=(0,U.useRef)(null),l=(0,U.useRef)(!1),u=(0,U.useRef)(null),d=g(),[f,p]=(0,U.useState)(null),m=!d,h;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(h=()=>{p(null)},t[0]=h):h=t[0];let _=h,v;t[1]===a?v=t[2]:(v=e=>{p(Y({anchor:e,markdown:a,node:o.current,pointerStartedInNode:s.current}))},t[1]=a,t[2]=v);let y=v,b,x;t[3]!==m||t[4]!==y?(b=()=>{if(!m||typeof window>`u`)return;let e=null,t=()=>{e!==null&&(window.cancelAnimationFrame(e),e=null)},n=n=>{let r=n===void 0?null:n;t(),e=window.requestAnimationFrame(()=>{e=null,y(r)})},r=e=>{t(),s.current=K(e,o.current),c.current=s.current?N(e):null,l.current=!0},i=e=>{let t=s.current&&c.current!==null?A(c.current,e):null;t!==null&&(u.current=t),l.current=!1,c.current=null,n(t??u.current)},a=()=>{l.current=!1,c.current=null,n(u.current)},d=()=>{l.current||n(u.current)};return document.addEventListener(`pointerdown`,r),document.addEventListener(`pointerup`,i),document.addEventListener(`pointercancel`,a),document.addEventListener(`mouseup`,i),document.addEventListener(`selectionchange`,d),document.addEventListener(`keyup`,d),()=>{t(),document.removeEventListener(`pointerdown`,r),document.removeEventListener(`pointerup`,i),document.removeEventListener(`pointercancel`,a),document.removeEventListener(`mouseup`,i),document.removeEventListener(`selectionchange`,d),document.removeEventListener(`keyup`,d)}},x=[m,y],t[3]=m,t[4]=y,t[5]=b,t[6]=x):(b=t[5],x=t[6]),(0,U.useEffect)(b,x);let S,C;t[7]===a?(S=t[8],C=t[9]):(S=()=>{if(!a)return;let e=e=>{let t=o.current,n=window.getSelection();if(e.defaultPrevented||e.clipboardData===null||t===null||n===null||n.isCollapsed||n.rangeCount!==1)return;let r=n.getRangeAt(0);if(!t.contains(r.startContainer)||!t.contains(r.endContainer))return;let i=M(r,t,`text`);i.text&&(e.clipboardData.setData(`text/plain`,i.text),e.clipboardData.setData(`text/html`,i.html),e.preventDefault())};return document.addEventListener(`copy`,e),()=>document.removeEventListener(`copy`,e)},C=[a],t[7]=a,t[8]=S,t[9]=C),(0,U.useEffect)(S,C);let w;t[10]===i?w=t[11]:(w=e=>{i?.(e),p(null)},t[10]=i,t[11]=w);let T=w,E;t[12]===n?E=t[13]:(E=(0,G.jsx)(`div`,{ref:o,className:`contents`,children:n}),t[12]=n,t[13]=E);let D;t[14]!==T||t[15]!==m||t[16]!==i||t[17]!==f?(D=m?(0,G.jsx)(P,{selection:f,onAddToChat:i===void 0?void 0:T,onDismiss:_}):null,t[14]=T,t[15]=m,t[16]=i,t[17]=f,t[18]=D):D=t[18];let O;return t[19]!==D||t[20]!==E?(O=(0,G.jsxs)(G.Fragment,{children:[E,D]}),t[19]=D,t[20]=E,t[21]=O):O=t[21],O}var Z=new Set([`avif`,`bmp`,`gif`,`ico`,`jpeg`,`jpg`,`png`,`webp`]),Q=(0,U.createContext)(null);function se(e){if(e.tab.kind!==`workspace-file-preview`&&e.tab.kind!==`host-file-preview`&&e.tab.kind!==`thread-storage-file-preview`&&e.tab.kind!==`attachment-file-preview`)return!1;let t=e.tab.path.split(`.`).pop()?.toLowerCase();return t!==void 0&&Z.has(t)}function ce(e){let t=(0,H.c)(33),{activeTabId:n,children:r,tabs:i}=e,[a,o]=(0,U.useState)(null),[s,c]=(0,U.useState)(!1),[l,u]=(0,U.useState)(le),d;t[0]===i?d=t[1]:(d=i.filter(se),t[0]=i,t[1]=d);let f=d,p;t[2]!==f||t[3]!==l?(p=e=>{let t=f[e];t!==void 0&&(o(l.get(t.tab.id)??null),t.onSelect())},t[2]=f,t[3]=l,t[4]=p):p=t[4];let m=p,h;t[5]!==n||t[6]!==f||t[7]!==m?(h=e=>{let t=f.findIndex(e=>e.tab.id===n);t===-1||f.length<=1||m(z({currentIndex:t,direction:e,itemCount:f.length}))},t[5]=n,t[6]=f,t[7]=m,t[8]=h):h=t[8];let g=h,_;t[9]===n?_=t[10]:(_=e=>{o(e),n!==null&&u(t=>t.get(n)?.src===e.src?t:new Map(t).set(n,e))},t[9]=n,t[10]=_);let v=_,y;t[11]===v?y=t[12]:(y=e=>{v(e),c(!0)},t[11]=v,t[12]=y);let b;t[13]!==s||t[14]!==y||t[15]!==v?(b={isOpen:s,open:y,update:v},t[13]=s,t[14]=y,t[15]=v,t[16]=b):b=t[16];let x=b,S=a?.alt??`Image preview`,C=s?a?.src??null:null,w=a?.alt??`Image preview`,T=f.length>1,E,D;t[17]===g?(E=t[18],D=t[19]):(E=()=>g(`previous`),D=()=>g(`next`),t[17]=g,t[18]=E,t[19]=D);let O;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(O=()=>c(!1),t[20]=O):O=t[20];let k;t[21]!==s||t[22]!==T||t[23]!==E||t[24]!==D||t[25]!==S||t[26]!==C||t[27]!==w?(k=(0,G.jsx)(R,{imageAlt:S,imageSrc:C,isOpen:s,title:w,hasMultipleImages:T,onPrevious:E,onNext:D,onClose:O}),t[21]=s,t[22]=T,t[23]=E,t[24]=D,t[25]=S,t[26]=C,t[27]=w,t[28]=k):k=t[28];let A;return t[29]!==r||t[30]!==k||t[31]!==x?(A=(0,G.jsxs)(Q.Provider,{value:x,children:[r,k]}),t[29]=r,t[30]=k,t[31]=x,t[32]=A):A=t[32],A}function le(){return new Map}function ue(){return(0,U.useContext)(Q)}var de=t({FilePreview:()=>je,buildCsvPreviewData:()=>ke,getCsvTruncationNote:()=>Ae}),fe=100,pe=500,me=29,he=8,ge={width:`100%`,height:`100%`,border:0},_e=160,$=`h-5 w-5 rounded-sm p-0 [&_[data-icon-root]]:size-3 max-md:pointer-coarse:h-9 max-md:pointer-coarse:w-9 max-md:pointer-coarse:[&_[data-icon-root]]:size-5`,ve=`h-5 rounded-sm px-2 text-muted-foreground max-md:pointer-coarse:h-9`;function ye(e){return e.kind===`html`?e.iframe.url:null}function be(e){return typeof window>`u`?e:new URL(e,window.location.href).toString()}function xe(e){return e.kind===`html`?`html`:e.kind===`ready`?e.textPreviewKind:null}function Se(e){switch(e){case`csv`:return`CSV view mode`;case`html`:return`HTML view mode`;case`markdown`:return`Markdown view mode`}}function Ce(e){return e===`csv`?`Copy CSV`:e===`markdown`?`Copy markdown`:e===`html`?`Copy HTML source`:`Copy file contents`}function we(e){return e.kind===`html`||e.kind===`ready`?e.lineRange:null}function Te(e){return e.kind===`html`||e.kind===`ready`?e.file.contents:null}function Ee({lineRange:e,toggleKind:t}){return t===`csv`||t===`html`||t===`markdown`||e===null?`preview`:`source`}function De(e,t){return e.kind===`html`?t===`source`:e.kind===`ready`?e.textPreviewKind===null||t===`source`:!1}function Oe(e,t){let n=[],r=[],i=``,a=!1,o=!1,s=!1;for(let c=0;c<e.length;c+=1){let l=e[c];if(s=!1,a){l===`"`?e[c+1]===`"`?(i+=`"`,c+=1):a=!1:i+=l;continue}if(l===`"`&&i.length===0){a=!0,o=!0;continue}if(l===`,`){r.push(i),i=``,o=!1;continue}if(l===`
2
+ `||l===`\r`){if(r.push(i),n.push(r),r=[],i=``,o=!1,s=!0,l===`\r`&&e[c+1]===`
3
+ `&&(c+=1),n.length>=t)return{rows:n,truncatedRows:c+1<e.length};continue}i+=l}return(i.length>0||r.length>0||o||!s)&&(r.push(i),n.push(r)),{rows:n,truncatedRows:!1}}function ke(e){let{rows:t,truncatedRows:n}=Oe(e,pe+1),r=t.reduce((e,t)=>Math.max(e,t.length),0);return{columnCount:Math.min(r,fe),rows:t,truncatedColumns:r>fe,truncatedRows:n}}function Ae(e,t){let n=[];return e.truncatedRows&&n.push(`${t.toLocaleString()} rows`),e.truncatedColumns&&n.push(`${e.columnCount.toLocaleString()} columns`),n.length===0?null:`Showing the first ${n.join(` and `)}.`}function je(e){let t=(0,H.c)(61),{download:n,state:r,path:i,copyPath:a,headerMode:o,onSelectionAddToChat:c,onOpenInEditor:l,onRefresh:u,isRefreshing:d,markdownLinkRouting:f,statusLabel:p}=e,m=n===void 0?null:n,h=a===void 0?null:a,g=o===void 0?`file`:o,_=d===void 0?!1:d,v=p===void 0?null:p,y=r.kind===`html`?r.iframe:null,b;t[0]!==y?.url||t[1]!==r.file||t[2]!==r.kind?(b=JSON.stringify([r.kind,y?.url,r.kind===`html`?r.file.cacheKey:null]),t[0]=y?.url,t[1]=r.file,t[2]=r.kind,t[3]=b):b=t[3];let x=b,S;t[4]===x?S=t[5]:(S={key:x,status:`loading`},t[4]=x,t[5]=S);let[C,w]=(0,U.useState)(S);C.key!==x&&w({key:x,status:`loading`});let T=C.key===x?C.status:`loading`,E;t[6]!==x||t[7]!==T||t[8]!==y?(E=y===null?null:(0,G.jsx)(Ve,{...y,loadState:T,onLoadStateChange:e=>w(t=>t.key===x?{key:x,status:e}:t)},x),t[6]=x,t[7]=T,t[8]=y,t[9]=E):E=t[9];let D=E,O,k,A,j,M,N;t[10]===r?(O=t[11],k=t[12],A=t[13],j=t[14],M=t[15],N=t[16]):(N=xe(r),k=we(r),A=Te(r),O=ye(r),M=U.useState,j=Ee({lineRange:k,toggleKind:N}),t[10]=r,t[11]=O,t[12]=k,t[13]=A,t[14]=j,t[15]=M,t[16]=N);let[P,F]=M(j),[I,te]=(0,U.useState)(ae),ne;t[17]!==k||t[18]!==N?(ne=()=>{F(Ee({lineRange:k,toggleKind:N}))},t[17]=k,t[18]=N,t[19]=ne):ne=t[19];let L;t[20]!==k||t[21]!==i||t[22]!==N?(L=[k,i,N],t[20]=k,t[21]=i,t[22]=N,t[23]=L):L=t[23],(0,U.useEffect)(ne,L);let re=r.kind===`html`&&P===`preview`,R=N===null?`preview`:P,z;t[24]!==R||t[25]!==r?(z=De(r,R),t[24]=R,t[25]=r,t[26]=z):z=t[26];let ie=z,B=ie,V=r.kind===`ready`&&r.textPreviewKind===`markdown`&&R===`preview`,oe=r.kind===`ready`&&r.textPreviewKind===`csv`&&R===`preview`,W=re||oe||ie||V,K;t[27]!==W||t[28]!==V?(K=W?s(`@container/page flex h-full min-h-0 flex-col`,V&&`overflow-y-auto`):`@container/page min-h-full`,t[27]=W,t[28]=V,t[29]=K):K=t[29];let q=V?``:void 0,J;t[30]!==h||t[31]!==m||t[32]!==O||t[33]!==g||t[34]!==T||t[35]!==_||t[36]!==I||t[37]!==l||t[38]!==u||t[39]!==i||t[40]!==A||t[41]!==B||t[42]!==r.kind||t[43]!==v||t[44]!==N||t[45]!==re||t[46]!==P?(J=g===`file`?(0,G.jsx)(Ne,{download:m,previewIcon:(0,G.jsx)(Be,{loading:r.kind===`loading`||_||re&&T===`loading`},i),path:i,copyPath:h,rawContents:A,externalUrl:O,onOpenInEditor:l,onRefresh:u,isRefreshing:_,statusLabel:v,toggleKind:N,showLineOverflowToggle:B,lineOverflowMode:I,onLineOverflowModeChange:te,viewMode:P,onViewModeChange:F}):null,t[30]=h,t[31]=m,t[32]=O,t[33]=g,t[34]=T,t[35]=_,t[36]=I,t[37]=l,t[38]=u,t[39]=i,t[40]=A,t[41]=B,t[42]=r.kind,t[43]=v,t[44]=N,t[45]=re,t[46]=P,t[47]=J):J=t[47];let Y;t[48]!==R||t[49]!==D||t[50]!==I||t[51]!==f||t[52]!==c||t[53]!==i||t[54]!==r?(Y=(0,G.jsx)(Me,{iframePreview:D,state:r,path:i,lineOverflowMode:I,viewMode:R,markdownLinkRouting:f,onSelectionAddToChat:c}),t[48]=R,t[49]=D,t[50]=I,t[51]=f,t[52]=c,t[53]=i,t[54]=r,t[55]=Y):Y=t[55];let X;return t[56]!==K||t[57]!==q||t[58]!==J||t[59]!==Y?(X=(0,G.jsxs)(`div`,{className:K,"data-file-preview-scroll-container":q,style:ee,children:[J,Y]}),t[56]=K,t[57]=q,t[58]=J,t[59]=Y,t[60]=X):X=t[60],X}function Me(e){let t=(0,H.c)(32),{iframePreview:n,state:r,path:i,lineOverflowMode:a,viewMode:o,markdownLinkRouting:s,onSelectionAddToChat:c}=e;if(r.kind===`loading`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(k,{}),t[0]=e):e=t[0],e}if(r.kind===`empty`){let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(Ue,{message:`Empty file.`}),t[1]=e):e=t[1],e}if(r.kind===`not-found`){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(Ue,{message:`File not found.`,role:`alert`}),t[2]=e):e=t[2],e}if(r.kind===`error`){let e=r.message??`Failed to load file`,n;return t[3]===e?n=t[4]:(n=(0,G.jsx)(Ue,{message:e,role:`alert`}),t[3]=e,t[4]=n),n}if(r.kind===`unsupported`){let e;return t[5]===r.file?e=t[6]:(e=(0,G.jsx)(He,{file:r.file}),t[5]=r.file,t[6]=e),e}if(r.kind===`image`){let e;return t[7]!==i||t[8]!==r.url?(e=(0,G.jsx)(Re,{url:r.url,alt:i}),t[7]=i,t[8]=r.url,t[9]=e):e=t[9],e}if(r.kind===`video`){let e;return t[10]!==i||t[11]!==r.url?(e=(0,G.jsx)(ze,{url:r.url,title:i}),t[10]=i,t[11]=r.url,t[12]=e):e=t[12],e}if(r.kind===`html`){let e;return t[13]!==n||t[14]!==a||t[15]!==c||t[16]!==r||t[17]!==o?(e=(0,G.jsx)(Fe,{iframePreview:n,lineOverflowMode:a,onSelectionAddToChat:c,state:r,viewMode:o}),t[13]=n,t[14]=a,t[15]=c,t[16]=r,t[17]=o,t[18]=e):e=t[18],e}if(r.textPreviewKind===`csv`&&o===`preview`){let e;return t[19]!==c||t[20]!==r.file?(e=(0,G.jsx)(Le,{file:r.file,onSelectionAddToChat:c}),t[19]=c,t[20]=r.file,t[21]=e):e=t[21],e}if(r.textPreviewKind===`markdown`&&o===`preview`){let e;return t[22]!==s||t[23]!==c||t[24]!==r.file?(e=(0,G.jsx)(Ie,{file:r.file,markdownLinkRouting:s,onSelectionAddToChat:c}),t[22]=s,t[23]=c,t[24]=r.file,t[25]=e):e=t[25],e}let l=r.lineRange??null,u;return t[26]!==a||t[27]!==c||t[28]!==i||t[29]!==r.file||t[30]!==l?(u=(0,G.jsx)(We,{file:r.file,lineOverflowMode:a,lineRange:l,onSelectionAddToChat:c,path:i}),t[26]=a,t[27]=c,t[28]=i,t[29]=r.file,t[30]=l,t[31]=u):u=t[31],u}function Ne(e){let t=(0,H.c)(45),{download:n,previewIcon:r,path:i,copyPath:o,rawContents:g,externalUrl:C,onOpenInEditor:O,onRefresh:k,isRefreshing:A,statusLabel:j,toggleKind:M,showLineOverflowToggle:N,lineOverflowMode:P,onLineOverflowModeChange:F,viewMode:ee,onViewModeChange:R}=e,z=v(`workspace.openPreferred`),{ref:ae,width:B}=ne(),V=f(),U=B>0?B<560:V,W=N||M!==null,K;t[0]===M?K=t[1]:(K=Ce(M),t[0]=M,t[1]=K);let q=K,J;t[2]!==o||t[3]!==i?(J=(0,G.jsx)(I,{path:i,copyPath:o}),t[2]=o,t[3]=i,t[4]=J):J=t[4];let Y;t[5]===j?Y=t[6]:(Y=j===null?null:(0,G.jsxs)(`span`,{className:s(`shrink-0 leading-5 text-muted-foreground`,u),children:[`(`,j,`)`]}),t[5]=j,t[6]=Y);let X;t[7]!==q||t[8]!==n||t[9]!==C||t[10]!==U||t[11]!==A||t[12]!==O||t[13]!==k||t[14]!==z||t[15]!==i||t[16]!==g?(X=U?null:(0,G.jsxs)(a,{delayDuration:300,children:[k?(0,G.jsxs)(m,{children:[(0,G.jsx)(y,{asChild:!0,children:(0,G.jsx)(x,{type:`button`,variant:`ghost`,size:`icon`,className:s($,`shrink-0 text-muted-foreground hover:bg-state-hover hover:text-foreground`),onClick:k,disabled:A,"aria-label":A?`Refreshing file`:`Refresh file`,children:(0,G.jsx)(d,{name:`RotateCcw`,"aria-hidden":!0})})}),(0,G.jsx)(l,{side:`bottom`,children:A?`Refreshing file`:`Refresh file`})]}):null,n===null?null:(0,G.jsxs)(m,{children:[(0,G.jsx)(y,{asChild:!0,children:(0,G.jsx)(x,{type:`button`,variant:`ghost`,size:`icon`,className:$,onClick:()=>void L(n),"aria-label":`Download`,children:(0,G.jsx)(d,{name:`Download`,"aria-hidden":!0})})}),(0,G.jsx)(l,{side:`bottom`,children:`Download`})]}),g===null?null:(0,G.jsxs)(m,{children:[(0,G.jsx)(y,{asChild:!0,children:(0,G.jsx)(p,{text:g,label:q,className:s($,`shrink-0 rounded-md hover:bg-state-hover hover:text-foreground`)})}),(0,G.jsx)(l,{side:`bottom`,children:q})]}),C===null?null:(0,G.jsxs)(m,{children:[(0,G.jsx)(y,{asChild:!0,children:(0,G.jsx)(x,{type:`button`,variant:`ghost`,size:`icon`,className:s($,`shrink-0 text-muted-foreground hover:bg-state-hover hover:text-foreground`),onClick:()=>{w(be(C))},"aria-label":`Open in external browser`,children:(0,G.jsx)(d,{name:`Globe`,"aria-hidden":!0})})}),(0,G.jsx)(l,{side:`bottom`,children:`Open in external browser`})]}),O?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(m,{children:[(0,G.jsx)(y,{asChild:!0,children:(0,G.jsx)(oe,{onClick:()=>O(i),className:$,label:z?`Open in editor (${z.label})`:`Open in editor`,"aria-keyshortcuts":z?.ariaKeyshortcuts})}),(0,G.jsx)(l,{side:`bottom`,children:z?`Open in editor (${z.label})`:`Open in editor`})]}),(0,G.jsx)(re,{shortcut:z})]}):null]}),t[7]=q,t[8]=n,t[9]=C,t[10]=U,t[11]=A,t[12]=O,t[13]=k,t[14]=z,t[15]=i,t[16]=g,t[17]=X):X=t[17];let Z;t[18]!==r||t[19]!==J||t[20]!==Y||t[21]!==X?(Z=(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-1.5`,children:[r,J,Y,X]}),t[18]=r,t[19]=J,t[20]=Y,t[21]=X,t[22]=Z):Z=t[22];let Q;t[23]!==q||t[24]!==o||t[25]!==n||t[26]!==C||t[27]!==U||t[28]!==A||t[29]!==P||t[30]!==F||t[31]!==O||t[32]!==k||t[33]!==R||t[34]!==i||t[35]!==g||t[36]!==W||t[37]!==N||t[38]!==M||t[39]!==ee?(Q=W||U?(0,G.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-1`,children:[(0,G.jsx)(Pe,{showLineOverflowToggle:N&&!U,lineOverflowMode:P,onLineOverflowModeChange:F}),M===null?null:(0,G.jsxs)(`div`,{className:`inline-flex shrink-0 items-center gap-0.5 rounded-md border border-border p-0.5`,role:`tablist`,"aria-label":Se(M),children:[(0,G.jsx)(x,{type:`button`,variant:`ghost`,size:`sm`,className:s(ve,u),onClick:()=>R(`preview`),"aria-pressed":ee===`preview`,children:`Preview`}),(0,G.jsx)(x,{type:`button`,variant:`ghost`,size:`sm`,className:s(ve,u),onClick:()=>R(`source`),"aria-pressed":ee===`source`,children:`Raw`})]}),U?(0,G.jsxs)(E,{modal:!1,children:[(0,G.jsx)(T,{asChild:!0,children:(0,G.jsx)(x,{variant:`ghost`,size:`icon`,className:s($,`shrink-0 max-md:pointer-coarse:size-10`),"aria-label":`File actions`,children:(0,G.jsx)(d,{name:`MoreHorizontal`,"aria-hidden":!0})})}),(0,G.jsxs)(h,{align:`end`,mobileTitle:`File actions`,className:`max-md:pointer-coarse:[&_[role=menuitem]]:min-h-11 max-md:pointer-coarse:[&_[role=menuitem]]:text-sm max-md:pointer-coarse:[&_[role=menuitemcheckbox]]:min-h-11 max-md:pointer-coarse:[&_[role=menuitemcheckbox]]:text-sm`,children:[(0,G.jsx)(_,{className:`max-w-80 break-all font-mono`,children:i}),(0,G.jsx)(S,{}),(0,G.jsxs)(D,{onSelect:()=>{c(o??i,{successMessage:`File path copied`,errorMessage:`Failed to copy file path`})},children:[(0,G.jsx)(d,{name:`Copy`,"aria-hidden":!0}),` Copy file path`]}),g===null?null:(0,G.jsxs)(D,{onSelect:()=>{c(g,{successMessage:`Copied to clipboard`,errorMessage:`Failed to copy file contents`})},children:[(0,G.jsx)(d,{name:`Copy`,"aria-hidden":!0}),` `,q]}),n===null?null:(0,G.jsxs)(D,{onSelect:()=>void L(n),children:[(0,G.jsx)(d,{name:`Download`,"aria-hidden":!0}),` Download`]}),k?(0,G.jsxs)(D,{disabled:A,onSelect:k,children:[(0,G.jsx)(d,{name:`RotateCcw`,"aria-hidden":!0}),` `,A?`Refreshing file`:`Refresh file`]}):null,C===null?null:(0,G.jsxs)(D,{onSelect:()=>w(be(C)),children:[(0,G.jsx)(d,{name:`Globe`,"aria-hidden":!0}),` Open in external browser`]}),O?(0,G.jsxs)(D,{onSelect:()=>O(i),children:[(0,G.jsx)(d,{name:`ExternalLink`,"aria-hidden":!0}),` Open in editor`]}):null,N?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(S,{}),(0,G.jsxs)(b,{className:`gap-2 [&>[data-icon-root]]:size-4 [&>[data-icon-root]]:shrink-0`,checked:P===`wrap`,onCheckedChange:e=>F(e?`wrap`:`scroll`),children:[(0,G.jsx)(d,{name:`TextWrap`,"aria-hidden":!0}),ie]})]}):null]})]}):null]}):null,t[23]=q,t[24]=o,t[25]=n,t[26]=C,t[27]=U,t[28]=A,t[29]=P,t[30]=F,t[31]=O,t[32]=k,t[33]=R,t[34]=i,t[35]=g,t[36]=W,t[37]=N,t[38]=M,t[39]=ee,t[40]=Q):Q=t[40];let se;return t[41]!==ae||t[42]!==Z||t[43]!==Q?(se=(0,G.jsxs)(te,{headerRef:ae,children:[Z,Q]}),t[41]=ae,t[42]=Z,t[43]=Q,t[44]=se):se=t[44],se}function Pe(e){let t=(0,H.c)(11),{showLineOverflowToggle:n,lineOverflowMode:r,onLineOverflowModeChange:i}=e;if(!n)return null;let o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=s($,`text-muted-foreground`),t[0]=o):o=t[0];let c=r===`wrap`,u;t[1]!==r||t[2]!==i?(u=()=>{i(r===`wrap`?`scroll`:`wrap`)},t[1]=r,t[2]=i,t[3]=u):u=t[3];let f;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,G.jsx)(d,{name:`TextWrap`}),t[4]=f):f=t[4];let p;t[5]!==c||t[6]!==u?(p=(0,G.jsx)(y,{asChild:!0,children:(0,G.jsx)(x,{type:`button`,variant:`ghost`,size:`icon`,className:o,"aria-label":ie,"aria-pressed":c,onClick:u,children:f})}),t[5]=c,t[6]=u,t[7]=p):p=t[7];let h;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,G.jsx)(l,{side:`bottom`,children:ie}),t[8]=h):h=t[8];let g;return t[9]===p?g=t[10]:(g=(0,G.jsx)(a,{delayDuration:300,children:(0,G.jsxs)(m,{children:[p,h]})}),t[9]=p,t[10]=g),g}function Fe(e){let t=(0,H.c)(16),{iframePreview:n,lineOverflowMode:r,onSelectionAddToChat:i,state:a,viewMode:o}=e,s=o===`preview`,c=s?`contents`:`hidden`,l=s?void 0:!0,u;t[0]!==n||t[1]!==c||t[2]!==l?(u=(0,G.jsx)(`div`,{className:c,"aria-hidden":l,children:n}),t[0]=n,t[1]=c,t[2]=l,t[3]=u):u=t[3];let d=s?`hidden`:`contents`,f=s?!0:void 0,p;t[4]!==r||t[5]!==i||t[6]!==a.file||t[7]!==a.lineRange?(p=(0,G.jsx)(We,{file:a.file,lineOverflowMode:r,lineRange:a.lineRange,onSelectionAddToChat:i,path:a.file.name}),t[4]=r,t[5]=i,t[6]=a.file,t[7]=a.lineRange,t[8]=p):p=t[8];let m;t[9]!==d||t[10]!==f||t[11]!==p?(m=(0,G.jsx)(`div`,{className:d,"aria-hidden":f,children:p}),t[9]=d,t[10]=f,t[11]=p,t[12]=m):m=t[12];let h;return t[13]!==u||t[14]!==m?(h=(0,G.jsxs)(G.Fragment,{children:[u,m]}),t[13]=u,t[14]=m,t[15]=h):h=t[15],h}function Ie(e){let t=(0,H.c)(12),{file:n,onSelectionAddToChat:r,markdownLinkRouting:i}=e,a=(0,U.useRef)(null),o=(0,U.useContext)(W),s;t[0]===o?s=t[1]:(s=()=>{let e=a.current?.closest(`[data-file-preview-scroll-container]`);if(!e||!o)return;e.scrollTop=o.scrollTop;let t=()=>{o.scrollTop=e.scrollTop};return e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)},t[0]=o,t[1]=s);let c;t[2]!==n.contents||t[3]!==n.name||t[4]!==o?(c=[o,n.name,n.contents],t[2]=n.contents,t[3]=n.name,t[4]=o,t[5]=c):c=t[5],(0,U.useLayoutEffect)(s,c);let l;t[6]!==n.contents||t[7]!==i?(l=(0,G.jsx)(`div`,{ref:a,className:`flex-auto bg-background px-4 py-4`,children:(0,G.jsx)(B,{allowHtml:!0,content:n.contents,linkRouting:i})}),t[6]=n.contents,t[7]=i,t[8]=l):l=t[8];let u;return t[9]!==r||t[10]!==l?(u=(0,G.jsx)(X,{markdown:!0,onSelectionAddToChat:r,children:l}),t[9]=r,t[10]=l,t[11]=u):u=t[11],u}function Le({file:e,onSelectionAddToChat:t}){let n=(0,U.useMemo)(()=>ke(e.contents),[e.contents]),r=n.rows[0]??[],i=n.rows.slice(1),a=Array.from({length:n.columnCount},(e,t)=>({index:t,label:r[t]??``})),o=`max(100%, ${3+a.length*18}rem)`,s=Ae(n,i.length),c=(0,U.useRef)(null),l=F({count:i.length,getScrollElement:()=>c.current,estimateSize:()=>me,overscan:he}),u=l.getVirtualItems(),d=l.getTotalSize(),f=u[0],p=u[u.length-1],m=f?.start??0,h=p===void 0?d:d-p.end;return(0,G.jsx)(X,{onSelectionAddToChat:t,children:(0,G.jsxs)(`div`,{className:`flex min-h-0 flex-auto flex-col bg-surface-raised px-4 py-4`,children:[(0,G.jsx)(`div`,{ref:c,className:`persistent-scrollbar min-h-0 overflow-auto overscroll-contain rounded-md border border-border bg-background`,children:(0,G.jsxs)(`table`,{className:`min-w-full table-fixed border-separate border-spacing-0 font-mono text-xs leading-5`,"aria-label":`${e.name} CSV preview`,style:{width:o},children:[(0,G.jsxs)(`colgroup`,{children:[(0,G.jsx)(`col`,{className:`w-12`}),a.map(e=>(0,G.jsx)(`col`,{className:`w-72`},e.index))]}),(0,G.jsx)(`thead`,{children:(0,G.jsxs)(`tr`,{children:[(0,G.jsx)(`th`,{scope:`col`,className:`sticky left-0 top-0 z-30 w-12 min-w-12 border-b border-r border-border bg-surface-recessed-solid px-2 py-1 text-right font-medium text-muted-foreground`,children:`#`}),a.map(e=>(0,G.jsx)(`th`,{scope:`col`,className:`sticky top-0 z-20 w-72 max-w-72 border-b border-r border-border bg-surface-recessed-solid px-2 py-1 text-left font-medium text-foreground`,title:e.label,children:(0,G.jsx)(`span`,{className:`block max-w-full truncate`,children:e.label||`Column ${e.index+1}`})},e.index))]})}),(0,G.jsxs)(`tbody`,{children:[m>0?(0,G.jsx)(`tr`,{"aria-hidden":!0,style:{height:m},children:(0,G.jsx)(`td`,{colSpan:a.length+1,className:`p-0`})}):null,u.map(e=>{let t=e.index,n=i[t]??[];return(0,G.jsxs)(`tr`,{"data-index":t,ref:l.measureElement,children:[(0,G.jsx)(`th`,{scope:`row`,className:`sticky left-0 z-10 w-12 min-w-12 border-b border-r border-border bg-surface-recessed-solid px-2 py-1 text-right font-medium text-muted-foreground`,children:t+2}),a.map(e=>{let t=n[e.index]??``;return(0,G.jsx)(`td`,{className:`w-72 max-w-72 overflow-hidden border-b border-r border-border px-2 py-1 align-top text-foreground`,title:t,children:(0,G.jsx)(`span`,{className:`block max-w-full truncate`,children:t})},e.index)})]},e.key)}),h>0?(0,G.jsx)(`tr`,{"aria-hidden":!0,style:{height:h},children:(0,G.jsx)(`td`,{colSpan:a.length+1,className:`p-0`})}):null]})]})}),s===null?null:(0,G.jsx)(`p`,{className:`mt-2 shrink-0 text-xs leading-5 text-muted-foreground`,children:s})]})})}function Re(e){let t=(0,H.c)(24),{url:n,alt:r}=e,[i,a]=(0,U.useState)(!1),o=ue(),s,c;t[0]!==r||t[1]!==o||t[2]!==n?(s=()=>{o?.isOpen&&o.update({alt:r,src:n})},c=[r,o,n],t[0]=r,t[1]=o,t[2]=n,t[3]=s,t[4]=c):(s=t[3],c=t[4]),(0,U.useLayoutEffect)(s,c);let l=`Open ${r} in full screen preview`,u;t[5]!==r||t[6]!==o||t[7]!==n?(u=()=>{if(o){o.open({alt:r,src:n});return}a(!0)},t[5]=r,t[6]=o,t[7]=n,t[8]=u):u=t[8];let d;t[9]!==r||t[10]!==n?(d=(0,G.jsx)(`img`,{src:n,alt:r,className:`mx-auto block h-auto max-w-full`}),t[9]=r,t[10]=n,t[11]=d):d=t[11];let f;t[12]!==l||t[13]!==u||t[14]!==d?(f=(0,G.jsx)(`button`,{type:`button`,className:`block w-full cursor-zoom-in`,"aria-label":l,onClick:u,children:d}),t[12]=l,t[13]=u,t[14]=d,t[15]=f):f=t[15];let p;t[16]!==r||t[17]!==o||t[18]!==i||t[19]!==n?(p=o===null?(0,G.jsx)(R,{title:r,imageSrc:i?n:null,imageAlt:r,onClose:()=>a(!1)}):null,t[16]=r,t[17]=o,t[18]=i,t[19]=n,t[20]=p):p=t[20];let m;return t[21]!==f||t[22]!==p?(m=(0,G.jsxs)(`div`,{className:`pt-4`,children:[f,p]}),t[21]=f,t[22]=p,t[23]=m):m=t[23],m}function ze(e){let t=(0,H.c)(3),{url:n,title:r}=e,i;return t[0]!==r||t[1]!==n?(i=(0,G.jsx)(`div`,{className:`pt-4`,children:(0,G.jsx)(`video`,{src:n,title:r,className:`block max-h-[34rem] w-full bg-black`,controls:!0,preload:`metadata`})}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i}function Be(e){let t=(0,H.c)(14),{loading:n}=e,[r,i]=(0,U.useState)(!1),a,o;t[0]===n?(a=t[1],o=t[2]):(a=()=>{if(!n){i(!1);return}let e=window.setTimeout(()=>i(!0),_e);return()=>window.clearTimeout(e)},o=[n],t[0]=n,t[1]=a,t[2]=o),(0,U.useEffect)(a,o);let c=n&&r,l;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=s(`flex items-center justify-center text-subtle-foreground`,C),t[3]=l):l=t[3];let u=c?`Spinner`:`File`,f=c&&`animate-spin motion-reduce:animate-none`,p;t[4]===f?p=t[5]:(p=s(`size-full`,f),t[4]=f,t[5]=p);let m;t[6]!==u||t[7]!==p?(m=(0,G.jsx)(d,{name:u,className:p,"aria-hidden":!0}),t[6]=u,t[7]=p,t[8]=m):m=t[8];let h;t[9]===c?h=t[10]:(h=c?(0,G.jsx)(`span`,{role:`status`,className:`sr-only`,children:`Loading preview…`}):null,t[9]=c,t[10]=h);let g;return t[11]!==m||t[12]!==h?(g=(0,G.jsxs)(`span`,{className:l,children:[m,h]}),t[11]=m,t[12]=h,t[13]=g):g=t[13],g}function Ve(e){let t=(0,H.c)(10),{sandbox:n,title:r,url:i,loadState:a,onLoadStateChange:o}=e;if(a===`error`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden`,children:(0,G.jsx)(Ue,{message:`Failed to load HTML preview.`,role:`alert`})}),t[0]=e):e=t[0],e}let s,c;t[1]===o?(s=t[2],c=t[3]):(s=()=>o(`loaded`),c=()=>o(`error`),t[1]=o,t[2]=s,t[3]=c);let l;return t[4]!==n||t[5]!==s||t[6]!==c||t[7]!==r||t[8]!==i?(l=(0,G.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden`,children:(0,G.jsx)(`iframe`,{title:r,src:i,sandbox:n,style:ge,onLoad:s,onError:c})}),t[4]=n,t[5]=s,t[6]=c,t[7]=r,t[8]=i,t[9]=l):l=t[9],l}function He(e){let t=(0,H.c)(24),{file:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,G.jsx)(`div`,{className:`flex size-12 items-center justify-center rounded-lg bg-surface-raised text-muted-foreground`,children:(0,G.jsx)(d,{name:`File`,className:`size-6`,"aria-hidden":!0})}),t[0]=r):r=t[0];let i;t[1]===n.name?i=t[2]:(i=(0,G.jsx)(`p`,{className:`truncate text-sm font-medium text-foreground`,children:n.name}),t[1]=n.name,t[2]=i);let a=n.mimeType,s;t[3]===n.sizeBytes?s=t[4]:(s=o(n.sizeBytes),t[3]=n.sizeBytes,t[4]=s);let c=`${a} · ${s}`,l;t[5]===c?l=t[6]:(l=(0,G.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:c}),t[5]=c,t[6]=l);let u;t[7]!==i||t[8]!==l?(u=(0,G.jsxs)(`div`,{className:`flex max-w-full min-w-0 flex-col gap-1`,children:[i,l]}),t[7]=i,t[8]=l,t[9]=u):u=t[9];let f=n.reason===`too-large`?`This file is too large to preview.`:`This file type can't be previewed.`,p;t[10]===f?p=t[11]:(p=(0,G.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:f}),t[10]=f,t[11]=p);let m;t[12]!==n.name||t[13]!==n.url?(m=e=>{e.preventDefault(),L({url:n.url,fileName:n.name})},t[12]=n.name,t[13]=n.url,t[14]=m):m=t[14];let h;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,G.jsx)(d,{name:`Download`,"aria-hidden":!0}),t[15]=h):h=t[15];let g;t[16]!==n.name||t[17]!==n.url||t[18]!==m?(g=(0,G.jsx)(x,{asChild:!0,variant:`outline`,size:`sm`,children:(0,G.jsxs)(`a`,{href:n.url,download:n.name,onClick:m,children:[h,`Download`]})}),t[16]=n.name,t[17]=n.url,t[18]=m,t[19]=g):g=t[19];let _;return t[20]!==g||t[21]!==u||t[22]!==p?(_=(0,G.jsxs)(`div`,{className:`flex flex-col items-center gap-4 px-6 py-12 text-center`,children:[r,u,p,g]}),t[20]=g,t[21]=u,t[22]=p,t[23]=_):_=t[23],_}function Ue(e){let t=(0,H.c)(3),{message:n,role:r}=e,i;return t[0]!==n||t[1]!==r?(i=(0,G.jsx)(O,{role:r,className:`mx-4 mt-4 rounded-lg`,children:n}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i}function We(e){let t=(0,H.c)(9),{file:n,lineOverflowMode:r,lineRange:i,onSelectionAddToChat:a,path:o}=e,s;t[0]===i?s=t[1]:(s=i===null?null:{start:i.startLineNumber,end:i.endLineNumber},t[0]=i,t[1]=s);let c=s,l=n.cacheKey??n.name,u;return t[2]!==n.contents||t[3]!==c||t[4]!==r||t[5]!==a||t[6]!==o||t[7]!==l?(u=(0,G.jsx)(V,{content:n.contents,path:o,cacheKey:l,overflow:r,highlightedLines:c,scrollToHighlightedLines:!0,onSelectionAddToChat:a}),t[2]=n.contents,t[3]=c,t[4]=r,t[5]=a,t[6]=o,t[7]=l,t[8]=u):u=t[8],u}export{W as i,de as n,ce as r,je as t};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,kr as n,ri as r}from"./boot-vendor-CKEhulXz.js";import{Mn as i,Nh as a,Th as o,Yt as s,bc as c,kh as l}from"./index-miJf0-mc.js";import{t as u}from"./code-loading-skeletons-kAn_Dql6.js";import{f as d,l as f,o as p,u as m}from"./git-diff-patch-text-SHpUxhZL.js";import{t as h}from"./truncate-start-CKaHTcTC.js";import{n as g,r as _,t as v}from"./image-lightbox-BjXlPoxp.js";import{a as y}from"./absolute-file-path-BTqPWT1d.js";import{n as b}from"./diff-stats-tally-DMh2WZPq.js";import{t as x}from"./open-in-editor-button-Y_u-D0k2.js";import{n as S,t as C}from"./file-path-link-BwUZ49AA.js";import{t as w}from"./DiffHost-BUAsAwGT.js";var T=n(),E=e(t(),1),D=e(r(),1),O={contain:`layout paint style`,contentVisibility:`auto`,containIntrinsicSize:`0 600px`};function k(e){return e===`modified`||e===`renamed`||e===`copied`}function ee(e){if(typeof window.requestIdleCallback==`function`){let t=window.requestIdleCallback(e,{timeout:2e3});return()=>window.cancelIdleCallback(t)}let t=window.setTimeout(e,200);return()=>window.clearTimeout(t)}function A(e,t,n){let r=d(e.name)??e.name,i=d(e.prevName)??r,a=t===`added`?{kind:`empty`,path:r}:{kind:`request`,path:t===`renamed`?i:r,side:`old`},o=t===`deleted`?{kind:`empty`,path:r}:{kind:`request`,path:r,side:`new`},s=e.hunks.map(e=>`${e.hunkSpecs??``}:${e.additionStart}:${e.additionCount}:${e.deletionStart}:${e.deletionCount}`).join(`|`);return{identity:[t,j(a),j(o),s,n??``,e.deletionLines.join(``),e.additionLines.join(``)].join(`:`),old:a,new:o}}function j(e){return e.kind===`empty`?`empty:${e.path}`:`request:${e.side}:${e.path}`}function te(e,t){return e.kind===`empty`?Promise.resolve({kind:`text`,file:{name:e.path,contents:``}}):t(e.path,e.side)}function M(e,t){return{old:{path:e.name,content:e.contents},new:{path:t.name,content:t.contents}}}function N(e,t){return e.hunks.length===0&&e.type!==`rename-pure`&&t!==void 0&&f(e.name)}function P(e,t){return e.type!==`rename-pure`&&t!==void 0&&m(e)}function F(e){let t=e.trim();return t.length===0?null:`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`}function I(e){let t=(0,T.c)(75),{fileDiff:n,changeKind:r,onRequestFileContents:i,patchText:a,renderBeforeVisible:o}=e,s=r===`deleted`,l;t[0]!==n||t[1]!==i?(l=N(n,i),t[0]=n,t[1]=i,t[2]=l):l=t[2];let u=l,d;t[3]!==n||t[4]!==i?(d=P(n,i),t[3]=n,t[4]=i,t[5]=d):d=t[5];let f=d,m;t[6]===n?m=t[7]:(m=p(n),t[6]=n,t[7]=m);let h=m,g;t[8]!==r||t[9]!==n||t[10]!==a?(g=A(n,r,a),t[8]=r,t[9]=n,t[10]=a,t[11]=g):g=t[11];let _=g,v;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(v={initialIsIntersecting:!1,rootMargin:`200px`},t[12]=v):v=t[12];let{ref:y,isIntersecting:b}=S(v),x=(0,E.useRef)(i),C;t[13]===i?C=t[14]:(C=()=>{x.current=i},t[13]=i,t[14]=C),(0,E.useEffect)(C);let w;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(w={status:`idle`},t[15]=w):w=t[15];let[D,O]=(0,E.useState)(w),j=(0,E.useRef)(`idle`),[I,z]=(0,E.useState)(o),[B,V]=(0,E.useState)(!1),[U,W]=(0,E.useState)(0),[G,re]=(0,E.useState)(!1),K=c(),q;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(q=()=>{j.current=`idle`,O({status:`idle`}),V(!1),W(0),re(!1)},t[16]=q):q=t[16];let J;t[17]!==_.identity||t[18]!==u||t[19]!==f?(J=[_.identity,u,f],t[17]=_.identity,t[18]=u,t[19]=f,t[20]=J):J=t[20],(0,E.useEffect)(q,J);let Y,X;t[21]===b?(Y=t[22],X=t[23]):(Y=()=>{b&&z(!0)},X=[b],t[21]=b,t[22]=Y,t[23]=X),(0,E.useEffect)(Y,X);let ie=s&&!u&&!f&&!B,Z=I&&!ie,ae=u||f,oe;t[24]!==r||t[25]!==n||t[26]!==ae||t[27]!==i||t[28]!==a?(oe=!ae&&i!==void 0&&a!==void 0&&n.hunks.length>0&&k(r),t[24]=r,t[25]=n,t[26]=ae,t[27]=i,t[28]=a,t[29]=oe):oe=t[29];let Q=oe,$=Z&&(ae||Q&&U>0),se,ce;t[30]!==Q||t[31]!==U||t[32]!==K||t[33]!==Z?(se=()=>{if(!(K||!Z||!Q||U>0))return ee(()=>{W(L)})},ce=[Q,U,K,Z],t[30]=Q,t[31]=U,t[32]=K,t[33]=Z,t[34]=se,t[35]=ce):(se=t[34],ce=t[35]),(0,E.useEffect)(se,ce);let le;t[36]!==_.new||t[37]!==_.old||t[38]!==f||t[39]!==$?(le=()=>{if(!$||j.current!==`idle`)return;let e=x.current;if(!e)return;let t=!1;return j.current=`loading`,O({status:`loading`}),Promise.all([te(_.old,e),te(_.new,e)]).then(e=>{let[n,r]=e;if(t)return;let i=n?.kind===`image`?n:null,a=r?.kind===`image`?r:null;if(i!==null||a!==null){j.current=`ready-image`,O({status:`ready-image`,oldImageUrl:i?.dataUrl??null,newImageUrl:a?.dataUrl??null,oldSizeBytes:i?.sizeBytes??null,newSizeBytes:a?.sizeBytes??null});return}if(n?.kind!==`text`||r?.kind!==`text`){j.current=`unavailable`,O({status:`unavailable`});return}let o=M(n.file,r.file);if(f){j.current=`ready-svg`,O({status:`ready-svg`,fullFileContents:o,oldImageUrl:F(n.file.contents),newImageUrl:F(r.file.contents)});return}j.current=`ready`,O({status:`ready`,fullFileContents:o})}).catch(()=>{t||(j.current=`error`,O({status:`error`}))}),()=>{t=!0,j.current===`loading`&&(j.current=`idle`)}},t[36]=_.new,t[37]=_.old,t[38]=f,t[39]=$,t[40]=le):le=t[40];let ue;t[41]!==U||t[42]!==_||t[43]!==n||t[44]!==f||t[45]!==a||t[46]!==$?(ue=[U,_,n,f,a,$],t[41]=U,t[42]=_,t[43]=n,t[44]=f,t[45]=a,t[46]=$,t[47]=ue):ue=t[47],(0,E.useEffect)(le,ue);let de;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(de=()=>{j.current===`error`&&(j.current=`idle`,O({status:`idle`})),re(!0),W(ne)},t[48]=de):de=t[48];let fe=de,pe=U>0,me=!K,he;t[49]!==Q||t[50]!==D.status||t[51]!==G||t[52]!==pe||t[53]!==me?(he=R({canExpandContext:Q,contextRequested:pe,enrichmentStatus:D.status,isPrefetchedAutomatically:me,isRequestedByUser:G}),t[49]=Q,t[50]=D.status,t[51]=G,t[52]=pe,t[53]=me,t[54]=he):he=t[54];let ge=he,_e;t[55]===ge?_e=t[56]:(_e={status:ge,request:fe},t[55]=ge,t[56]=_e);let ve=_e,ye=D.status===`ready`||D.status===`ready-svg`?D.fullFileContents:null,be;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(be=()=>{V(!0),z(!0)},t[57]=be):be=t[57];let xe=be,Se;t[58]!==r||t[59]!==D||t[60]!==u?(Se=u&&D.status===`ready-image`?H(D,r):null,t[58]=r,t[59]=D,t[60]=u,t[61]=Se):Se=t[61];let Ce=Se,we;return t[62]!==y||t[63]!==ve||t[64]!==D||t[65]!==n||t[66]!==h||t[67]!==ye||t[68]!==Ce||t[69]!==u||t[70]!==f||t[71]!==a||t[72]!==ie||t[73]!==Z?(we={bodySentinelRef:y,enrichment:D,fileDiff:n,fileDiffLabel:h,isImageCard:u,isSvgPreviewCard:f,shouldGateDeletedDiff:ie,shouldRenderDiffView:Z,loadDeletedDiff:xe,imageSizeStat:Ce,contextExpansion:ve,fullFileContents:ye,patchText:a},t[62]=y,t[63]=ve,t[64]=D,t[65]=n,t[66]=h,t[67]=ye,t[68]=Ce,t[69]=u,t[70]=f,t[71]=a,t[72]=ie,t[73]=Z,t[74]=we):we=t[74],we}function ne(e){return e+1}function L(e){return e===0?1:e}function R({canExpandContext:e,contextRequested:t,enrichmentStatus:n,isPrefetchedAutomatically:r,isRequestedByUser:i}){if(!e)return`unavailable`;let a=i?`loading`:`prefetching`;switch(n){case`idle`:return t?a:r?`prefetching`:`idle`;case`loading`:return a;case`ready`:return`ready`;case`error`:return`error`;case`ready-image`:case`ready-svg`:case`unavailable`:return`unavailable`;default:return n}}function z(e,t){let n=e!==null&&t!==null,r=[];return e!==null&&r.push({url:e,caption:n?`Old`:null}),t!==null&&r.push({url:t,caption:n?`New`:null}),r}function B(e,t){return t.caption===null?e:`${e} (${t.caption.toLowerCase()})`}function V(e){return e.status!==`ready-image`&&e.status!==`ready-svg`?null:{oldImageUrl:e.oldImageUrl,newImageUrl:e.newImageUrl}}function H(e,t){let n=t===`deleted`?null:e.newSizeBytes,r=t===`added`?null:e.oldSizeBytes;return n===null&&r===null?null:{addedBytes:n,removedBytes:r}}function U(e){let t=(0,T.c)(32),{preview:n,fileDiffLabel:r,fitToFrame:i}=e,a=i===void 0?!1:i,[o,s]=(0,E.useState)(null),c,l,u,d,f,p,m,h;if(t[0]!==o||t[1]!==r||t[2]!==a||t[3]!==n.newImageUrl||t[4]!==n.oldImageUrl){h=Symbol.for(`react.early_return_sentinel`);bb0:{if(l=z(n.oldImageUrl,n.newImageUrl),l.length===0){let e;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,D.jsx)(`div`,{className:`px-3 py-3 text-xs text-muted-foreground`,children:`No preview available for this image.`}),t[13]=e):e=t[13],h=e;break bb0}let e=o===null?void 0:l[o];u=e=>{s(t=>t===null?null:_({currentIndex:t,direction:e,itemCount:l.length}))};let i;t[14]!==r||t[15]!==a?(i=(e,t)=>(0,D.jsxs)(`figure`,{className:`min-w-0 max-w-full`,children:[(0,D.jsx)(`button`,{type:`button`,className:a?`flex h-64 w-full cursor-zoom-in items-center justify-center rounded-md border border-border bg-surface-recessed p-3`:`block max-w-full cursor-zoom-in`,onClick:()=>s(t),children:(0,D.jsx)(`img`,{src:e.url,alt:B(r,e),style:v,className:a?`block h-full w-full object-contain`:`block max-h-80 max-w-full rounded-md border border-border object-contain`})}),e.caption===null?null:(0,D.jsx)(`figcaption`,{className:`mt-1 text-xs text-muted-foreground`,children:e.caption})]},e.url),t[14]=r,t[15]=a,t[16]=i):i=t[16],m=(0,D.jsx)(`div`,{className:`@container/diff-preview min-w-0`,children:(0,D.jsx)(`div`,{className:a?l.length>1?`grid grid-cols-1 gap-3 px-3 py-3 @min-[32rem]/diff-preview:grid-cols-2`:`grid grid-cols-1 gap-3 px-3 py-3`:`flex flex-col items-start gap-3 px-3 py-3 @min-[32rem]/diff-preview:flex-row`,children:l.map(i)})}),c=g,d=`${r} image preview`,f=e?.url??null,p=e?B(r,e):r}t[0]=o,t[1]=r,t[2]=a,t[3]=n.newImageUrl,t[4]=n.oldImageUrl,t[5]=c,t[6]=l,t[7]=u,t[8]=d,t[9]=f,t[10]=p,t[11]=m,t[12]=h}else c=t[5],l=t[6],u=t[7],d=t[8],f=t[9],p=t[10],m=t[11],h=t[12];if(h!==Symbol.for(`react.early_return_sentinel`))return h;let y=l.length>1,b,x;t[17]===u?(b=t[18],x=t[19]):(b=()=>u(`previous`),x=()=>u(`next`),t[17]=u,t[18]=b,t[19]=x);let S;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>s(null),t[20]=S):S=t[20];let C;t[21]!==c||t[22]!==d||t[23]!==f||t[24]!==p||t[25]!==y||t[26]!==b||t[27]!==x?(C=(0,D.jsx)(c,{title:d,imageSrc:f,imageAlt:p,hasMultipleImages:y,onPrevious:b,onNext:x,onClose:S}),t[21]=c,t[22]=d,t[23]=f,t[24]=p,t[25]=y,t[26]=b,t[27]=x,t[28]=C):C=t[28];let w;return t[29]!==C||t[30]!==m?(w=(0,D.jsxs)(D.Fragment,{children:[m,C]}),t[29]=C,t[30]=m,t[31]=w):w=t[31],w}function W(e){let t=(0,T.c)(8),{enrichment:n,fileDiffLabel:r,fitToFrame:i}=e,a=i===void 0?!1:i;if(n.status===`idle`||n.status===`loading`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,D.jsx)(u,{}),t[0]=e):e=t[0],e}let o;t[1]===n?o=t[2]:(o=V(n),t[1]=n,t[2]=o);let s=o;if(s===null){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,D.jsx)(`div`,{className:`px-3 py-3 text-xs text-muted-foreground`,children:`No preview available for this image.`}),t[3]=e):e=t[3],e}let c;return t[4]!==r||t[5]!==a||t[6]!==s?(c=(0,D.jsx)(U,{preview:s,fileDiffLabel:r,fitToFrame:a}),t[4]=r,t[5]=a,t[6]=s,t[7]=c):c=t[7],c}function G(e){let t=(0,T.c)(9),{displayMode:n,enrichment:r,fileDiff:i,fileDiffLabel:a,patchText:o,fullFileContents:s,presentation:c,onSelectionAddToChat:l}=e,u;return t[0]!==n||t[1]!==r||t[2]!==i||t[3]!==a||t[4]!==s||t[5]!==l||t[6]!==o||t[7]!==c?(u=n===`preview`?(0,D.jsx)(W,{enrichment:r,fileDiffLabel:a,fitToFrame:!0}):(0,D.jsx)(w,{file:i,patchText:o,fullFileContents:s,...c,onSelectionAddToChat:l}),t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=s,t[5]=l,t[6]=o,t[7]=c,t[8]=u):u=t[8],u}function re(e){let t=(0,T.c)(19),{state:n,presentation:r,svgDisplayMode:i,reservesCollapseGutter:a,onSelectionAddToChat:o}=e,{bodySentinelRef:s,enrichment:c,fileDiff:d,fileDiffLabel:f,isImageCard:p,isSvgPreviewCard:m,shouldGateDeletedDiff:h,shouldRenderDiffView:g,loadDeletedDiff:_,contextExpansion:v,fullFileContents:y,patchText:b}=n,x;t[0]!==v||t[1]!==c||t[2]!==d||t[3]!==f||t[4]!==y||t[5]!==p||t[6]!==m||t[7]!==_||t[8]!==o||t[9]!==b||t[10]!==r||t[11]!==a||t[12]!==h||t[13]!==g||t[14]!==i?(x=h?(0,D.jsxs)(`div`,{className:`flex items-center py-3 pl-2 pr-3 text-xs text-muted-foreground`,children:[a?(0,D.jsx)(`span`,{"aria-hidden":!0,className:`w-8 shrink-0`}):null,(0,D.jsxs)(`span`,{className:`pl-[1ch]`,children:[(0,D.jsx)(`span`,{children:`This file was deleted.`}),` `,(0,D.jsx)(l,{type:`button`,variant:`link`,size:`sm`,className:`h-auto p-0 text-xs underline underline-offset-4 hover:underline`,onClick:_,children:`Load diff`})]})]}):g?p?(0,D.jsx)(W,{enrichment:c,fileDiffLabel:f}):m?(0,D.jsx)(G,{displayMode:i,enrichment:c,fileDiff:d,fileDiffLabel:f,patchText:b,fullFileContents:y,presentation:r,onSelectionAddToChat:o}):(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(w,{file:d,patchText:b,fullFileContents:y,...r,onSelectionAddToChat:o}),(0,D.jsx)(K,{contextExpansion:v,reservesCollapseGutter:a})]}):(0,D.jsx)(u,{}),t[0]=v,t[1]=c,t[2]=d,t[3]=f,t[4]=y,t[5]=p,t[6]=m,t[7]=_,t[8]=o,t[9]=b,t[10]=r,t[11]=a,t[12]=h,t[13]=g,t[14]=i,t[15]=x):x=t[15];let S;return t[16]!==s||t[17]!==x?(S=(0,D.jsx)(`div`,{ref:s,className:`overflow-hidden rounded-b-lg bg-background`,style:O,children:x}),t[16]=s,t[17]=x,t[18]=S):S=t[18],S}function K(e){let t=(0,T.c)(8),{contextExpansion:n,reservesCollapseGutter:r}=e,{status:i,request:a}=n;if(i===`unavailable`||i===`ready`||i===`prefetching`)return null;let o;t[0]===r?o=t[1]:(o=r?(0,D.jsx)(`span`,{"aria-hidden":!0,className:`w-8 shrink-0`}):null,t[0]=r,t[1]=o);let s;t[2]!==a||t[3]!==i?(s=(0,D.jsx)(`span`,{className:`pl-[1ch]`,children:i===`loading`?(0,D.jsx)(`span`,{role:`status`,children:`Loading context…`}):(0,D.jsxs)(D.Fragment,{children:[i===`error`?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`span`,{className:`text-destructive`,children:`Couldn't load surrounding context.`}),` `]}):null,(0,D.jsx)(l,{type:`button`,variant:`link`,size:`sm`,className:`h-auto p-0 text-xs underline underline-offset-4 hover:underline`,onClick:a,children:i===`error`?`Retry`:`Expand context`})]})}),t[2]=a,t[3]=i,t[4]=s):s=t[4];let c;return t[5]!==o||t[6]!==s?(c=(0,D.jsxs)(`div`,{className:`flex items-center py-2 pl-2 pr-3 text-xs text-muted-foreground`,children:[o,s]}),t[5]=o,t[6]=s,t[7]=c):c=t[7],c}function q(e){let t=(0,T.c)(7),{stat:n}=e,r;t[0]===n.addedBytes?r=t[1]:(r=n.addedBytes===null?null:(0,D.jsx)(`span`,{className:`text-diff-added`,children:`+${i(n.addedBytes)}`}),t[0]=n.addedBytes,t[1]=r);let a;t[2]===n.removedBytes?a=t[3]:(a=n.removedBytes===null?null:(0,D.jsx)(`span`,{className:`text-diff-removed`,children:`-${i(n.removedBytes)}`}),t[2]=n.removedBytes,t[3]=a);let o;return t[4]!==r||t[5]!==a?(o=(0,D.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1 whitespace-nowrap text-xs tabular-nums`,children:[r,a]}),t[4]=r,t[5]=a,t[6]=o):o=t[6],o}function J(e){let t=(0,T.c)(5),{fileLabel:n,isRaw:r,onToggle:i}=e,a=r?`Show image preview for ${n}`:`Show raw SVG diff for ${n}`,s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,D.jsx)(o,{name:`Code`,"aria-hidden":!0,className:`size-3.5`}),t[0]=s):s=t[0];let c;return t[1]!==r||t[2]!==a||t[3]!==i?(c=(0,D.jsx)(`button`,{type:`button`,className:`inline-flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground hover:bg-state-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring aria-pressed:bg-state-active aria-pressed:text-foreground`,onClick:i,"aria-label":a,"aria-pressed":r,children:s}),t[1]=r,t[2]=a,t[3]=i,t[4]=c):c=t[4],c}function Y(e,t){return e.changeKind!==`renamed`&&e.changeKind!==`copied`?null:t&&t!==e.path?{from:t,to:e.path}:null}function X(e){let t=(0,T.c)(53),{model:n,previousPath:r,filePathRoot:i,onOpenFileInEditor:c,onOpenFilePreview:l,isCollapsed:u,onToggleCollapsed:d,hasChanges:f,statSlot:p,actionSlot:m}=e,g=n.changeKind===`added`,_=n.changeKind===`deleted`,v=_?0:n.insertions,S=g?0:n.deletions,w=g||_,E;t[0]!==n||t[1]!==r?(E=Y(n,r),t[0]=n,t[1]=r,t[2]=E):E=t[2];let O=E,k=n.openablePath,ee;t[3]!==i||t[4]!==k?(ee=k?y({path:k,rootPath:i}):null,t[3]=i,t[4]=k,t[5]=ee):ee=t[5];let A=ee,j=!!k,te=u!==void 0&&d!==void 0,M;t[6]!==f||t[7]!==u||t[8]!==n.label||t[9]!==d||t[10]!==te?(M=te?(0,D.jsx)(`button`,{type:`button`,className:a(`inline-flex w-8 shrink-0 items-center justify-center text-muted-foreground transition-colors`,f?`hover:text-foreground`:`cursor-not-allowed opacity-40`),onClick:f?d:void 0,disabled:!f,"aria-label":f?`${u?`Expand`:`Collapse`} ${n.label}`:`${n.label} has no changes to expand`,"aria-expanded":f?!u:void 0,children:(0,D.jsx)(o,{name:`ChevronRight`,className:a(`size-3.5 shrink-0 transition-transform duration-150`,f&&!u&&`rotate-90`)})}):null,t[6]=f,t[7]=u,t[8]=n.label,t[9]=d,t[10]=te,t[11]=M):M=t[11];let N;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(N=a(`flex min-w-0 items-center gap-1.5`,`pl-[1ch]`),t[12]=N):N=t[12];let P;t[13]===O?P=t[14]:(P=O?(0,D.jsx)(h,{className:`min-w-0 font-mono text-xs leading-5 text-muted-foreground`,title:O.from,children:O.from}):null,t[13]=O,t[14]=P);let F;t[15]===O?F=t[16]:(F=O?(0,D.jsx)(o,{name:`ArrowRight`,"aria-hidden":`true`,className:`size-3 shrink-0 text-subtle-foreground`}):null,t[15]=O,t[16]=F);let I=k??n.path,ne=O?O.to:n.label,L;t[17]!==j||t[18]!==l||t[19]!==k?(L=j&&k&&l?()=>l(k):void 0,t[17]=j,t[18]=l,t[19]=k,t[20]=L):L=t[20];let R;t[21]!==I||t[22]!==ne||t[23]!==L?(R=(0,D.jsx)(C,{path:I,displayName:ne,onClick:L,className:`font-mono font-medium text-foreground`}),t[21]=I,t[22]=ne,t[23]=L,t[24]=R):R=t[24];let z;t[25]!==A||t[26]!==n.label?(z=A?(0,D.jsx)(s,{text:A,label:`Copy path for ${n.label}`,className:`rounded-md hover:bg-state-hover`}):null,t[25]=A,t[26]=n.label,t[27]=z):z=t[27];let B;t[28]!==j||t[29]!==n.label||t[30]!==c||t[31]!==k?(B=j&&k&&c?(0,D.jsx)(x,{onClick:()=>c(k),label:`Open ${n.label} in editor`}):null,t[28]=j,t[29]=n.label,t[30]=c,t[31]=k,t[32]=B):B=t[32];let V;t[33]!==R||t[34]!==z||t[35]!==B||t[36]!==P||t[37]!==F?(V=(0,D.jsxs)(`span`,{className:N,children:[P,F,R,z,B]}),t[33]=R,t[34]=z,t[35]=B,t[36]=P,t[37]=F,t[38]=V):V=t[38];let H;t[39]!==V||t[40]!==M?(H=(0,D.jsxs)(`span`,{className:`flex min-w-0 grow basis-48 items-center`,children:[M,V]}),t[39]=V,t[40]=M,t[41]=H):H=t[41];let U;t[42]!==S||t[43]!==v||t[44]!==w||t[45]!==p?(U=p??(0,D.jsx)(b,{insertions:v,deletions:S,hideZero:w,className:`text-xs`}),t[42]=S,t[43]=v,t[44]=w,t[45]=p,t[46]=U):U=t[46];let W;t[47]!==m||t[48]!==U?(W=(0,D.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-2`,children:[U,m]}),t[47]=m,t[48]=U,t[49]=W):W=t[49];let G;return t[50]!==H||t[51]!==W?(G=(0,D.jsxs)(`div`,{className:`flex w-full min-w-0 flex-wrap items-center justify-between gap-x-2 gap-y-1`,children:[H,W]}),t[50]=H,t[51]=W,t[52]=G):G=t[52],G}var ie=`rounded-lg bg-background py-1.5 pl-2 pr-3 text-xs font-medium text-foreground`;function Z({stickyHeader:e,isBodyHidden:t,isStuck:n,showStuckHeaderEdge:r=!0}){return a(ie,e&&`sticky z-30`,e&&`top-0`,!t&&`rounded-b-none`,n&&`rounded-t-none`,n&&r&&`shadow-[inset_0_1px_0_var(--border)]`)}export{re as a,I as c,Z as i,q as n,U as o,J as r,H as s,X as t};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,kr as n,ri as r}from"./boot-vendor-CKEhulXz.js";import{Nh as i,Th as a,kh as o}from"./index-miJf0-mc.js";import{o as s}from"./queued-editor-typeahead-layout-DlhXYAxL.js";var c=n(),l=e(t(),1),u=e(r(),1),d=`bg-background shadow-xs`,f=`cursor-pointer text-muted-foreground transition-colors hover:bg-state-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-60`,p=i(`inline-flex items-center whitespace-nowrap rounded border border-border px-1.5 py-0.5 text-xs`,d,f);i(`text-xs`,f,`focus-visible:z-10`);var m=(0,l.forwardRef)(function(e,t){let n=(0,c.c)(11),r,a,o;n[0]===e?(r=n[1],a=n[2],o=n[3]):({className:r,type:o,...a}=e,n[0]=e,n[1]=r,n[2]=a,n[3]=o);let s=o===void 0?`button`:o,l;n[4]===r?l=n[5]:(l=i(p,r),n[4]=r,n[5]=l);let d;return n[6]!==a||n[7]!==t||n[8]!==l||n[9]!==s?(d=(0,u.jsx)(`button`,{ref:t,type:s,className:l,...a}),n[6]=a,n[7]=t,n[8]=l,n[9]=s,n[10]=d):d=n[10],d}),h=`relative bg-surface-raised-solid before:pointer-events-none before:absolute before:inset-y-0 before:right-full before:w-4 before:bg-gradient-to-r before:from-transparent before:to-surface-raised-solid before:content-['']`;function g(e){let t=(0,c.c)(4),{children:n,hideInCompact:r,hideInTiny:i}=e,a=r===void 0?!1:r,o=i===void 0?!0:i,s=a?``:void 0,l=o?``:void 0,d;return t[0]!==n||t[1]!==s||t[2]!==l?(d=(0,u.jsx)(`div`,{className:`ml-auto flex shrink-0 items-center gap-1.5 pr-2 text-xs text-muted-foreground`,"data-promptbox-hide-compact":s,"data-promptbox-hide-tiny":l,children:n}),t[0]=n,t[1]=s,t[2]=l,t[3]=d):d=t[3],d}function _(e){let t=(0,c.c)(27),{cancelLabel:n,children:r,label:l,onCancel:d,variant:f}=e,p=f===void 0?`embedded`:f,m=p===`cap`?`h-8 px-3`:`mb-1.5 pl-1`,h;t[0]===m?h=t[1]:(h=i(`flex min-h-7 items-center gap-1.5 text-xs text-subtle-foreground`,m),t[0]=m,t[1]=h);let g;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,u.jsx)(a,{name:`Edit`,className:`size-3.5 shrink-0`,"aria-hidden":!0}),t[2]=g):g=t[2];let _=p===`cap`&&`font-medium`,v;t[3]===_?v=t[4]:(v=i(`shrink-0`,_),t[3]=_,t[4]=v);let y;t[5]!==l||t[6]!==v?(y=(0,u.jsx)(`span`,{className:v,children:l}),t[5]=l,t[6]=v,t[7]=y):y=t[7];let b;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,u.jsx)(a,{name:`X`,className:`size-3`,"aria-hidden":!0}),t[8]=b):b=t[8];let x;t[9]!==n||t[10]!==d?(x=(0,u.jsx)(o,{type:`button`,size:`icon`,variant:`ghost`,className:`ml-auto size-6 shrink-0 text-subtle-foreground`,onClick:d,"aria-label":n,children:b}),t[9]=n,t[10]=d,t[11]=x):x=t[11];let S;t[12]!==h||t[13]!==y||t[14]!==x?(S=(0,u.jsxs)(`div`,{className:h,children:[g,y,x]}),t[12]=h,t[13]=y,t[14]=x,t[15]=S):S=t[15];let C=S;if(p===`cap`){let e;t[16]!==C||t[17]!==l?(e=(0,u.jsx)(s,{ariaLabel:l,className:`relative z-10 -mb-5 rounded-xl rounded-b-none border-b-0 bg-surface-raised-solid pb-3 shadow-lift`,children:C}),t[16]=C,t[17]=l,t[18]=e):e=t[18];let n;t[19]===r?n=t[20]:(n=(0,u.jsx)(`div`,{className:`relative z-20`,children:r}),t[19]=r,t[20]=n);let i;return t[21]!==e||t[22]!==n?(i=(0,u.jsxs)(`div`,{className:`relative z-20 space-y-2`,"data-inline-message-editor-frame":`cap`,children:[e,n]}),t[21]=e,t[22]=n,t[23]=i):i=t[23],i}let w;return t[24]!==r||t[25]!==C?(w=(0,u.jsxs)(`div`,{className:`relative z-20`,"data-inline-message-editor-frame":`embedded`,children:[C,r]}),t[24]=r,t[25]=C,t[26]=w):w=t[26],w}export{m as i,g as n,h as r,_ as t};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{kr as t,ri as n}from"./boot-vendor-CKEhulXz.js";import{$t as r,Nh as i,Th as a}from"./index-miJf0-mc.js";var o=t(),s=e(n(),1);function c(e){let t=(0,o.c)(3),{provider:n,className:i}=e,a;return t[0]!==i||t[1]!==n?(a=(0,s.jsx)(r,{providerKind:`machine`,provider:n,fallback:`Zap`,className:i}),t[0]=i,t[1]=n,t[2]=a):a=t[2],a}function l(e,t){return e.type!==`ephemeral`||e.machineProviderId===null?null:t?.id===e.machineProviderId?t:{id:e.machineProviderId,displayName:e.machineProviderId,icon:`ComputerCloud`,logoUrl:null}}function u(e){let t=(0,o.c)(12),{host:n,machineProvider:r,className:u}=e,d;t[0]!==n||t[1]!==r?(d=l(n,r),t[0]=n,t[1]=r,t[2]=d):d=t[2];let f=d;if(f===null){let e;t[3]===u?e=t[4]:(e=i(`size-3.5 shrink-0`,u),t[3]=u,t[4]=e);let n;return t[5]===e?n=t[6]:(n=(0,s.jsx)(a,{name:`Laptop`,className:e,"aria-hidden":!0}),t[5]=e,t[6]=n),n}let p;t[7]===u?p=t[8]:(p=i(`size-3.5 shrink-0`,u),t[7]=u,t[8]=p);let m;return t[9]!==f||t[10]!==p?(m=(0,s.jsx)(c,{provider:f,className:p}),t[9]=f,t[10]=p,t[11]=m):m=t[11],m}function d(e){let t=(0,o.c)(15),{host:n,machineProvider:r,className:a,iconClassName:c,nameClassName:l}=e,d;t[0]===a?d=t[1]:(d=i(`inline-flex min-w-0 items-center gap-1.5`,a),t[0]=a,t[1]=d);let f;t[2]!==n||t[3]!==c||t[4]!==r?(f=(0,s.jsx)(u,{host:n,machineProvider:r,className:c}),t[2]=n,t[3]=c,t[4]=r,t[5]=f):f=t[5];let p;t[6]===l?p=t[7]:(p=i(`min-w-0 truncate`,l),t[6]=l,t[7]=p);let m;t[8]!==n.name||t[9]!==p?(m=(0,s.jsx)(`span`,{className:p,children:n.name}),t[8]=n.name,t[9]=p,t[10]=m):m=t[10];let h;return t[11]!==d||t[12]!==f||t[13]!==m?(h=(0,s.jsxs)(`span`,{className:d,children:[f,m]}),t[11]=d,t[12]=f,t[13]=m,t[14]=h):h=t[14],h}export{d as n,u as t};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Qr as t,hi as n,kr as r,ni as i,qr as a,ri as o}from"./boot-vendor-CKEhulXz.js";import{Co as s,D as c,Kr as l,Nh as u,Qi as d,So as f,St as p,T as m,Th as h,To as g,Ud as _,Wr as v,Xi as y,Yo as b,_ as x,b as S,bo as C,ec as w,h_ as T,ja as E,kh as D,lc as O,na as k,wo as A,x as j,xo as M,y as N}from"./index-miJf0-mc.js";import{o as P}from"./dist-DOz2GbNP.js";import{n as F}from"./AddMachineDialog-MpmbbsKE.js";import{t as I}from"./checkbox-BR8PiOkh.js";import{t as L}from"./update-state-CuYJKY13.js";import{n as R,t as z}from"./host-mutations-Da-c1bQb.js";var B=r(),V=()=>[`machine-inventory`];function H({queryClient:e}){return e.invalidateQueries({queryKey:V()})}var U=e(o(),1),ee=[{role:`workloads`,title:`Workloads`,description:`Default place for new work.`},{role:`request`,title:`On request`,description:`Only work you ask for, in a folder listed under Access.`},{role:`none`,title:`None`,description:`Your moonlet starts nothing here.`}];function te(e){let n=(0,B.c)(32),{hostId:r}=e,o;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={includeCreating:!0},n[0]=o):o=n[0];let s=y(o),c=i(),l;n[1]===Symbol.for(`react.memo_cache_sentinel`)?(l={queryKey:V(),queryFn:re,refetchInterval:5e3},n[1]=l):l=n[1];let u=t(l),d;n[2]===c?d=n[3]:(d={mutationFn:ne,onSuccess:async()=>{await H({queryClient:c})}},n[2]=c,n[3]=d);let f=a(d);if(u.isError){let e;return n[4]===u.error.message?e=n[5]:(e=(0,U.jsxs)(`p`,{role:`alert`,children:[`Could not load machine roles: `,u.error.message]}),n[4]=u.error.message,n[5]=e),e}if(!u.data){let e;return n[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,U.jsx)(`p`,{children:`Loading roles…`}),n[6]=e):e=n[6],e}let p;if(n[7]!==r||n[8]!==s||n[9]!==u.data.roles||n[10]!==f){let e;n[12]===r?e=n[13]:(e=e=>r===void 0||e.hostId===r,n[12]=r,n[13]=e);let t;n[14]!==s||n[15]!==f?(t=e=>(0,U.jsxs)(`fieldset`,{className:`space-y-2`,children:[(0,U.jsx)(`legend`,{className:`text-sm font-medium`,children:s.data?.find(t=>t.id===e.hostId)?.name??e.hostId}),ee.map(t=>(0,U.jsxs)(`label`,{className:`flex items-start gap-3 rounded-md border border-border p-3 text-sm`,children:[(0,U.jsx)(`input`,{type:`radio`,name:`role-${e.hostId}`,checked:e.role===t.role,disabled:f.isPending||e.isServer&&t.role!==`none`||t.role===`workloads`&&!e.supportsWorkloads,onChange:()=>f.mutate({hostId:e.hostId,role:t.role})}),(0,U.jsxs)(`span`,{children:[(0,U.jsx)(`span`,{className:`block font-medium`,children:t.title}),(0,U.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:t.description})]})]},t.role)),!e.isServer&&!e.supportsWorkloads?(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Workloads needs a machine already prepared for isolated work.`}):null,e.isServer?(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`This machine runs the server, so it can only be None. Your moonlet and the server never share a machine.`}):null]},e.hostId),n[14]=s,n[15]=f,n[16]=t):t=n[16],p=u.data.roles.filter(e).map(t),n[7]=r,n[8]=s,n[9]=u.data.roles,n[10]=f,n[11]=p}else p=n[11];let m;n[17]!==f.error||n[18]!==f.isError?(m=f.isError?(0,U.jsx)(`p`,{role:`alert`,children:f.error.message}):null,n[17]=f.error,n[18]=f.isError,n[19]=m):m=n[19];let h;if(n[20]!==r||n[21]!==s||n[22]!==u.data.records){let e;n[24]===r?e=n[25]:(e=e=>r===void 0||e.hostId===r,n[24]=r,n[25]=e);let t;n[26]===s?t=n[27]:(t=e=>(0,U.jsx)(ie,{record:e,machineName:e=>s.data?.find(t=>t.id===e)?.name??e},`${e.kind}:${e.name}`),n[26]=s,n[27]=t),h=u.data.records.filter(e).map(t),n[20]=r,n[21]=s,n[22]=u.data.records,n[23]=h}else h=n[23];let g;return n[28]!==p||n[29]!==m||n[30]!==h?(g=(0,U.jsx)(P,{title:`Role`,description:`What your moonlet may start on each machine.`,children:(0,U.jsxs)(`div`,{className:`space-y-6 p-4`,children:[p,m,h]})}),n[28]=p,n[29]=m,n[30]=h,n[31]=g):g=n[31],g}function ne(e){let{hostId:t,role:n}=e;return _.hosts.experimental_setRole({hostId:t,role:n})}function re(){return _.hosts.experimental_inventory()}function ie(e){let t=(0,B.c)(13),{record:n,machineName:r}=e,i;if(t[0]!==r||t[1]!==n.hostId||t[2]!==n.managedFrom||t[3]!==n.name||t[4]!==n.record){let e=[{title:`Connection`,fields:[[`gate`,`Gate`],[`tunnel`,`Tunnel`]]},{title:`Hardware and accounts`,fields:[[`os`,`System`],[`driver`,`Virtual machine`],[`admin_user`,`Administrator`],[`desktop_user`,`Desktop user`],[`cpus`,`CPU cores`],[`memory_gb`,`Memory (GB)`],[`disk_gb`,`Disk (GB)`],[`hypervisor`,`Host`],[`server`,`Host record`],[`region`,`Region`],[`profile`,`Cloud profile`],[`instance_type`,`Instance type`]]},{title:`Installed`,fields:Object.entries(n.record).filter(q).sort(K).map(W)},{title:`Other saved settings`,fields:[[`orbit_thread`,`Conversation machine`],[`mail`,`Mail`],[`events`,`Event rules`]]}],a=ae,o;t[6]===n.name?o=t[7]:(o=(0,U.jsx)(`h3`,{className:`text-sm font-medium`,children:n.name}),t[6]=n.name,t[7]=o);let s;t[8]===n.hostId?s=t[9]:(s=n.hostId===null?(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Offline or not enrolled. Its saved settings stay here.`}):null,t[8]=n.hostId,t[9]=s);let c;t[10]!==r||t[11]!==n.managedFrom?(c=n.managedFrom?(0,U.jsxs)(`div`,{className:`text-sm`,children:[(0,U.jsx)(`h4`,{className:`font-medium`,children:`Managed from`}),(0,U.jsx)(`p`,{children:r(n.managedFrom)})]}):null,t[10]=r,t[11]=n.managedFrom,t[12]=c):c=t[12],i=(0,U.jsxs)(`section`,{className:`space-y-4 border-t border-border pt-4`,children:[o,s,c,e.map(e=>{let t=e.fields.filter(e=>{let[t]=e;return n.record[t]!==void 0});return t.length>0?(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:`text-sm font-medium`,children:e.title}),(0,U.jsx)(`dl`,{className:`divide-y divide-border text-sm`,children:t.map(e=>{let[t,r]=e;return(0,U.jsxs)(`div`,{className:`flex flex-wrap justify-between gap-2 py-2`,children:[(0,U.jsx)(`dt`,{children:r}),(0,U.jsx)(`dd`,{className:`break-all text-xs`,children:a(n.record[t])})]},t)})})]},e.title):null})]}),t[0]=r,t[1]=n.hostId,t[2]=n.managedFrom,t[3]=n.name,t[4]=n.record,t[5]=i}else i=t[5];return i}function ae(e){return typeof e==`boolean`?e?`On`:`Off`:typeof e==`string`?e===`macos`?`macOS`:e===`linux`?`Linux`:e:JSON.stringify(e)}function W(e){let[t]=e;return[t,t===`vms`?`Virtual machines`:t.replace(/_/g,` `).replace(/^./,G)]}function G(e){return e.toUpperCase()}function K(e,t){let[n]=e,[r]=t;return n.localeCompare(r)}function q(e){let[t,n]=e;return typeof n==`boolean`&&![`orbit_thread`,`mail`].includes(t)}function J(e){return e.phase===`removing`&&e.teardown?.status===`failed`?`Cleanup failed`:e.phase===`suspending`?`Pausing`:e.phase===`suspended`?`Paused`:e.phase===`resuming`?`Resuming`:e.phase===`removing`?`Removing`:null}function oe(e){return J(e.lifecycle)===`Cleanup failed`?`failed`:e.lifecycle.phase===`removing`||e.lifecycle.phase===`suspending`||e.lifecycle.phase===`resuming`||e.status===`connected`&&e.delivery?.state===`stalled`?`attention`:e.status===`connected`?`online`:`offline`}function se({host:e,now:t}){let n=[],r=J(e.lifecycle);return n.push(r??(e.status===`connected`?e.delivery?.state===`stalled`?`Delivery stalled`:`Online`:`Offline`)),e.lifecycle.message===null?e.status!==`connected`&&e.lastSeenAt!==null&&n.push(`last seen ${E({timestamp:e.lastSeenAt,now:t})}`):n.push(e.lifecycle.message),n.join(` · `)}function ce(e){return e.status!==`connected`&&e.lifecycle.phase===`active`}function le(e){return e.status!==`connected`&&e.lifecycle.phase===`removing`&&e.lifecycle.teardown?.status===`failed`}var ue=5;function Y(e){return e?`The server machine can't be removed. Move the server to another machine first.`:`The server machine can't be removed.`}function X(e){return e.type===`ephemeral`?`The compute and its saved snapshots are deleted. Its environments remain as read-only history.`:e.machineProviderId===null?`Project checkouts stay on its disk, but its environments become read-only history and it cannot run new work until paired again.`:`The provider cleans up resources it owns. Its environments remain as read-only history.`}function de(e){let t=(0,B.c)(14),{hostId:n}=e,r;t[0]===n?r=t[1]:(r={hostId:n,limit:ue},t[0]=n,t[1]=r);let i=O(r);if(i.data===void 0||i.data.total===0)return null;let{threads:a,total:o}=i.data,s=o-a.length,c=o===1?`1 unarchived thread on this machine:`:`${o} unarchived threads on this machine:`,l;t[2]===c?l=t[3]:(l=(0,U.jsx)(`p`,{children:c}),t[2]=c,t[3]=l);let u;t[4]===a?u=t[5]:(u=a.map(fe),t[4]=a,t[5]=u);let d;t[6]===u?d=t[7]:(d=(0,U.jsx)(`ul`,{className:`list-disc space-y-0.5 pl-5 text-foreground marker:text-subtle-foreground`,children:u}),t[6]=u,t[7]=d);let f;t[8]===s?f=t[9]:(f=s>0?(0,U.jsxs)(`p`,{children:[`and `,s,` more`]}):null,t[8]=s,t[9]=f);let p;return t[10]!==l||t[11]!==d||t[12]!==f?(p=(0,U.jsxs)(`div`,{className:`space-y-1 text-sm text-muted-foreground`,children:[l,d,f]}),t[10]=l,t[11]=d,t[12]=f,t[13]=p):p=t[13],p}function fe(e){return(0,U.jsx)(`li`,{children:(0,U.jsx)(`span`,{className:`block truncate`,children:w(e)})},e.id)}function pe(e){let t=(0,B.c)(15),{target:n,onOpenChange:r,onRemoved:i}=e,a=R(),o;t[0]===n?o=t[1]:(o=n!==null&&le(n),t[0]=n,t[1]=o);let c=o,u=n!==null,d;t[2]!==r||t[3]!==a?(d=e=>{!e&&!a.isPending&&(a.reset(),r(!1))},t[2]=r,t[3]=a,t[4]=d):d=t[4];let p;t[5]!==c||t[6]!==r||t[7]!==i||t[8]!==a||t[9]!==n?(p=n===null?null:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(A,{children:[(0,U.jsxs)(g,{children:[`Remove `,n.name,`?`]}),(0,U.jsx)(f,{children:c?(0,U.jsxs)(U.Fragment,{children:[`Cleanup failed and `,n.name,` is not connected. Removing it now skips environment cleanup on the machine: files and worktrees left on its disk are not deleted, and its environments become read-only history. The machine provider's removal still runs. Use this only if the machine is gone or will not come back.`]}):(0,U.jsxs)(U.Fragment,{children:[`This revokes `,n.name,`'s access to this server.`,` `,X(n)]})})]}),(0,U.jsx)(de,{hostId:n.id}),a.isError?(0,U.jsx)(`p`,{className:`text-sm text-destructive`,role:`alert`,children:b({error:a.error,fallbackMessage:`Couldn't remove ${n.name}.`})}):null,(0,U.jsx)(s,{children:(0,U.jsx)(D,{type:`button`,variant:`destructive`,disabled:a.isPending,onClick:()=>a.mutate({hostId:n.id,force:c},{onSuccess:()=>{r(!1),i?.(n)}}),children:c?`Remove anyway`:`Remove machine`})})]}),t[5]=c,t[6]=r,t[7]=i,t[8]=a,t[9]=n,t[10]=p):p=t[10];let m;return t[11]!==u||t[12]!==d||t[13]!==p?(m=(0,U.jsx)(l,{open:u,onOpenChange:d,children:p}),t[11]=u,t[12]=d,t[13]=p,t[14]=m):m=t[14],m}function Z(e,t){return t?.supportsSuspend&&e.lifecycle.phase===`active`?{icon:`Pause`,label:`Suspend`,kind:`suspend`}:t?.supportsSuspend&&e.lifecycle.phase===`suspended`?{icon:`Play`,label:`Resume`,kind:`resume`}:e.lifecycle.phase===`removing`&&e.lifecycle.teardown?.status===`failed`?{icon:`RotateCcw`,label:`Retry cleanup`,kind:`retry-cleanup`}:null}function me(e){let t=(0,B.c)(10),{host:n,machineProvider:r,pending:i,onSuspend:a,onResume:o,onRetryCleanup:s}=e,c;t[0]!==n||t[1]!==r?(c=Z(n,r),t[0]=n,t[1]=r,t[2]=c):c=t[2];let l=c;if(l===null)return null;let u=l.kind===`suspend`?a:l.kind===`resume`?o:s,d;t[3]===l.icon?d=t[4]:(d=(0,U.jsx)(h,{name:l.icon,className:`size-3.5`,"aria-hidden":!0}),t[3]=l.icon,t[4]=d);let f;return t[5]!==l.label||t[6]!==u||t[7]!==i||t[8]!==d?(f=(0,U.jsxs)(D,{type:`button`,variant:`outline`,size:`sm`,disabled:i,onClick:u,children:[d,l.label]}),t[5]=l.label,t[6]=u,t[7]=i,t[8]=d,t[9]=f):f=t[9],f}function he(e){let t=[{id:`rename`,label:`Rename`,icon:`Edit`,onSelect:e.onRename}];ce(e.host)&&t.push({id:`reconnect`,label:`Reconnect`,icon:`RotateCcw`,onSelect:e.onReconnect});let n=e.onRetryUpdate;n!==void 0&&p(e.host)&&t.push({id:`retry-update`,label:e.retryUpdatePending??!1?`Retrying update…`:`Retry update`,icon:L,disabled:e.retryUpdatePending??!1,onSelect:n});let r=Z(e.host,e.machineProvider),i=r===null?void 0:r.kind===`suspend`?e.onSuspend:r.kind===`resume`?e.onResume:e.onRetryCleanup;r!==null&&i!==void 0&&t.push({id:`lifecycle`,label:r.label,icon:r.icon,disabled:e.lifecycleActionPending??!1,onSelect:i}),e.canMoveServerHere&&t.push({id:`move-server`,label:`Move server here`,icon:`MoveTo`,onSelect:e.onMoveServerHere});let a=e.onRemove;return a!==void 0&&t.push({id:`remove`,label:`Remove machine`,icon:`Trash2`,tone:`destructive`,...e.isPrimary?{disabled:!0,disabledReason:Y(e.serverMoveEnabled??!1)}:{},onSelect:a}),t}var Q=e(n(),1);function ge(e){let t=(0,B.c)(35),{target:n,onOpenChange:r}=e,i=z(),a=n?.id??null,{mutate:o,reset:s}=i,c,l;t[0]!==a||t[1]!==o||t[2]!==s?(c=()=>{if(a===null){s();return}o(a)},l=[a,o,s],t[0]=a,t[1]=o,t[2]=s,t[3]=c,t[4]=l):(c=t[3],l=t[4]),(0,Q.useEffect)(c,l);let u=i.data??null,p=n!==null&&n.status===`connected`,m;t[5]!==i.error||t[6]!==i.isError?(m=i.isError?b({error:i.error,fallbackMessage:`Couldn't prepare a reconnect command.`}):null,t[5]=i.error,t[6]=i.isError,t[7]=m):m=t[7];let _=m,v=n!==null,y;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,U.jsx)(g,{children:`Reconnect machine`}),t[8]=y):y=t[8];let x=_===null?void 0:`text-destructive-text`,S=_??`Run this command on ${n?.name??`the machine`} to bring it back online. It keeps the machine's projects, environments and history.`,w;t[9]!==x||t[10]!==S?(w=(0,U.jsxs)(A,{children:[y,(0,U.jsx)(f,{className:x,children:S})]}),t[9]=x,t[10]=S,t[11]=w):w=t[11];let T;t[12]!==_||t[13]!==a||t[14]!==o?(T=_===null?null:(0,U.jsx)(`div`,{className:`flex justify-end`,children:(0,U.jsx)(D,{variant:`outline`,size:`sm`,onClick:()=>{a!==null&&o(a)},children:`Try again`})}),t[12]=_,t[13]=a,t[14]=o,t[15]=T):T=t[15];let E;t[16]!==a||t[17]!==o||t[18]!==u?(E=u===null?null:(0,U.jsx)(F,{command:u.command,windowsCommand:u.windowsCommand,expiresAt:u.expiresAt,onRegenerate:()=>{a!==null&&o(a)}},u.command),t[16]=a,t[17]=o,t[18]=u,t[19]=E):E=t[19];let O;t[20]!==_||t[21]!==r||t[22]!==u||t[23]!==p||t[24]!==n?.name?(O=_===null?(0,U.jsx)(`div`,{className:`flex items-center gap-2.5 rounded-md bg-muted/40 px-3 py-2.5`,children:p?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(d,{connected:!0}),(0,U.jsxs)(`span`,{role:`status`,className:`min-w-0 flex-1 truncate text-sm text-foreground`,children:[n?.name,` reconnected`]}),(0,U.jsx)(D,{size:`sm`,variant:`ghost`,className:`h-7 shrink-0 px-2 text-xs`,onClick:()=>r(!1),children:`Done`})]}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(h,{name:`Spinner`,className:`size-4 shrink-0 animate-spin text-muted-foreground`}),(0,U.jsx)(`span`,{role:`status`,className:`text-sm text-muted-foreground`,children:u===null?`Preparing a reconnect command…`:`Waiting for the machine to reconnect…`})]})}):null,t[20]=_,t[21]=r,t[22]=u,t[23]=p,t[24]=n?.name,t[25]=O):O=t[25];let k;t[26]!==E||t[27]!==O||t[28]!==w||t[29]!==T?(k=(0,U.jsxs)(M,{className:`max-h-[calc(100dvh-2rem)] overflow-y-auto`,onInteractOutside:_e,children:[w,T,E,O]}),t[26]=E,t[27]=O,t[28]=w,t[29]=T,t[30]=k):k=t[30];let j;return t[31]!==r||t[32]!==k||t[33]!==v?(j=(0,U.jsx)(C,{open:v,onOpenChange:r,children:k}),t[31]=r,t[32]=k,t[33]=v,t[34]=j):j=t[34],j}function _e(e){return e.preventDefault()}var ve={blocker:{heading:`Fix before moving`,icon:`AlertCircle`,iconClassName:`text-destructive-text`},warning:{heading:`Before you move`,icon:`AlertTriangle`,iconClassName:`text-warning-text`},info:{heading:`Good to know`,icon:`Info`,iconClassName:`text-muted-foreground`}};function ye(e){let t=(0,B.c)(17),{target:n,onOpenChange:r}=e,i=c(),a;t[0]!==r||t[1]!==i?(a=()=>{i.isPending||(i.reset(),r(!1))},t[0]=r,t[1]=i,t[2]=a):a=t[2];let o=a,s=n!==null,l;t[3]===o?l=t[4]:(l=e=>{e||o()},t[3]=o,t[4]=l);let u;t[5]!==o||t[6]!==r||t[7]!==i||t[8]!==n?(u=n===null?null:(0,U.jsx)(be,{target:n,startMove:i,onCancel:o,onStarted:()=>r(!1)},n.id),t[5]=o,t[6]=r,t[7]=i,t[8]=n,t[9]=u):u=t[9];let d;t[10]!==i.isPending||t[11]!==u?(d=(0,U.jsx)(M,{className:`max-h-[calc(100dvh-2rem)] overflow-y-auto`,hideCloseButton:i.isPending,children:u}),t[10]=i.isPending,t[11]=u,t[12]=d):d=t[12];let f;return t[13]!==s||t[14]!==l||t[15]!==d?(f=(0,U.jsx)(C,{open:s,onOpenChange:l,children:d}),t[13]=s,t[14]=l,t[15]=d,t[16]=f):f=t[16],f}function be(e){let t=(0,B.c)(48),{target:n,startMove:r,onCancel:i,onStarted:a}=e,o=m(),[s,c]=(0,Q.useState)(null),[l,u]=(0,Q.useState)(null),[d,f]=(0,Q.useState)(``),[p,h]=(0,Q.useState)(!1),g=o.mutate,_=n.id,v,y;t[0]!==g||t[1]!==_?(v=()=>{g({targetHostId:_,serverUrl:null},{onSuccess:e=>{c(e),u(null),e.requiresServerUrl&&e.serverUrl!==null&&f(e.serverUrl)}})},y=[g,_],t[0]=g,t[1]=_,t[2]=v,t[3]=y):(v=t[2],y=t[3]),(0,Q.useEffect)(v,y);let x=s?.requiresServerUrl===!0||l!==null,C;t[4]!==d||t[5]!==o||t[6]!==s?.existingTargetServerData?.path||t[7]!==x||t[8]!==r||t[9]!==_?(C=()=>{let e=d.trim(),t=x&&e.length>0?e:null;r.reset(),o.mutate({targetHostId:_,serverUrl:t},{onSuccess:e=>{e.existingTargetServerData?.path!==s?.existingTargetServerData?.path&&h(!1),c(e),u(t)}})},t[4]=d,t[5]=o,t[6]=s?.existingTargetServerData?.path,t[7]=x,t[8]=r,t[9]=_,t[10]=C):C=t[10];let w=C,T;t[11]!==d||t[12]!==p||t[13]!==o.isPending||t[14]!==l||t[15]!==s||t[16]!==x||t[17]!==r.isPending?(T=j({result:s,checking:o.isPending,starting:r.isPending,showAddress:x,addressDraft:d,checkedServerUrl:l,archiveConfirmed:p}),t[11]=d,t[12]=p,t[13]=o.isPending,t[14]=l,t[15]=s,t[16]=x,t[17]=r.isPending,t[18]=T):T=t[18];let E=T,D;t[19]!==p||t[20]!==l||t[21]!==a||t[22]!==s||t[23]!==E||t[24]!==r||t[25]!==_?(D=()=>{s===null||!E||r.mutate({targetHostId:_,serverUrl:l,stopRunningWork:!0,archiveExistingTargetServerData:s.existingTargetServerData!==null&&p},{onSuccess:a,onError:e=>{let t=S(e);t!==null&&c({...s,items:t,canMove:!1})}})},t[19]=p,t[20]=l,t[21]=a,t[22]=s,t[23]=E,t[24]=r,t[25]=_,t[26]=D):D=t[26];let O=D,k;t[27]!==o.error||t[28]!==o.isError||t[29]!==n.name?(k=o.isError?b({error:o.error,fallbackMessage:`Couldn't check ${n.name}.`}):null,t[27]=o.error,t[28]=o.isError,t[29]=n.name,t[30]=k):k=t[30];let A;t[31]!==r.error||t[32]!==r.isError?(A=r.isError?b({error:r.error,fallbackMessage:`Couldn't start the move.`}):null,t[31]=r.error,t[32]=r.isError,t[33]=A):A=t[33];let M;return t[34]!==d||t[35]!==p||t[36]!==w||t[37]!==o.isPending||t[38]!==i||t[39]!==s||t[40]!==x||t[41]!==O||t[42]!==E||t[43]!==r.isPending||t[44]!==k||t[45]!==A||t[46]!==n.name?(M=(0,U.jsx)($,{targetName:n.name,result:s,checking:o.isPending,checkError:k,showAddress:x,addressDraft:d,archiveConfirmed:p,startAllowed:E,starting:r.isPending,startError:A,onAddressDraftChange:f,onCheck:w,onArchiveConfirmedChange:h,onStart:O,onCancel:i}),t[34]=d,t[35]=p,t[36]=w,t[37]=o.isPending,t[38]=i,t[39]=s,t[40]=x,t[41]=O,t[42]=E,t[43]=r.isPending,t[44]=k,t[45]=A,t[46]=n.name,t[47]=M):M=t[47],M}function $(e){let t=(0,B.c)(53),{targetName:n,result:r,checking:i,checkError:a,showAddress:o,addressDraft:c,archiveConfirmed:l,startAllowed:u,starting:d,startError:p,onAddressDraftChange:m,onCheck:_,onArchiveConfirmedChange:v,onStart:y,onCancel:b}=e,x;t[0]===r?.items?x=t[1]:(x=r?.items.some(xe)??!1,t[0]=r?.items,t[1]=x);let S=!i&&(a!==null||x)&&!o,C;t[2]===n?C=t[3]:(C=(0,U.jsxs)(A,{children:[(0,U.jsxs)(g,{children:[`Move the server to `,n]}),(0,U.jsxs)(f,{children:[`Your threads, settings and plugin data move to `,n,`. Every machine and app switches over when it's done, and the current server machine keeps running as a regular machine.`]})]}),t[2]=n,t[3]=C);let w;t[4]!==a||t[5]!==r||t[6]!==n?(w=r===null&&a===null?(0,U.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md bg-muted/40 px-3 py-2.5`,children:[(0,U.jsx)(h,{name:`Spinner`,className:`size-4 shrink-0 animate-spin text-muted-foreground`}),(0,U.jsxs)(`span`,{role:`status`,className:`text-sm text-muted-foreground`,children:[`Checking `,n,`…`]})]}):null,t[4]=a,t[5]=r,t[6]=n,t[7]=w):w=t[7];let T;t[8]!==c||t[9]!==i||t[10]!==m||t[11]!==_||t[12]!==o||t[13]!==d||t[14]!==n?(T=o?(0,U.jsx)(Se,{targetName:n,value:c,checking:i,disabled:d,onChange:m,onCheck:_}):null,t[8]=c,t[9]=i,t[10]=m,t[11]=_,t[12]=o,t[13]=d,t[14]=n,t[15]=T):T=t[15];let E;t[16]===a?E=t[17]:(E=a===null?null:(0,U.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive-text`,children:a}),t[16]=a,t[17]=E);let O;t[18]!==i||t[19]!==r?(O=r===null?null:(0,U.jsx)(Ce,{items:r.items,dimmed:i}),t[18]=i,t[19]=r,t[20]=O):O=t[20];let k;t[21]!==l||t[22]!==v||t[23]!==r||t[24]!==d?(k=r?.existingTargetServerData?(0,U.jsx)(we,{path:r.existingTargetServerData.path,sizeBytes:r.existingTargetServerData.sizeBytes,checked:l,disabled:d,onCheckedChange:v}):null,t[21]=l,t[22]=v,t[23]=r,t[24]=d,t[25]=k):k=t[25];let j;t[26]===p?j=t[27]:(j=p===null?null:(0,U.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive-text`,children:p}),t[26]=p,t[27]=j);let M;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,U.jsx)(`p`,{className:`text-xs text-subtle-foreground`,children:`Moving stops every running turn and pauses scheduled automations.`}),t[28]=M):M=t[28];let N;t[29]!==b||t[30]!==d?(N=(0,U.jsx)(D,{type:`button`,variant:`outline`,disabled:d,onClick:b,children:`Cancel`}),t[29]=b,t[30]=d,t[31]=N):N=t[31];let P;t[32]!==_||t[33]!==S||t[34]!==d?(P=S?(0,U.jsx)(D,{type:`button`,variant:`outline`,disabled:d,onClick:_,children:`Check again`}):null,t[32]=_,t[33]=S,t[34]=d,t[35]=P):P=t[35];let F=!u,I=d?`Starting…`:`Stop all and move`,L;t[36]!==y||t[37]!==F||t[38]!==I?(L=(0,U.jsx)(D,{type:`button`,disabled:F,onClick:y,children:I}),t[36]=y,t[37]=F,t[38]=I,t[39]=L):L=t[39];let R;t[40]!==N||t[41]!==P||t[42]!==L?(R=(0,U.jsxs)(s,{children:[N,P,L]}),t[40]=N,t[41]=P,t[42]=L,t[43]=R):R=t[43];let z;return t[44]!==R||t[45]!==C||t[46]!==w||t[47]!==T||t[48]!==E||t[49]!==O||t[50]!==k||t[51]!==j?(z=(0,U.jsxs)(U.Fragment,{children:[C,w,T,E,O,k,j,M,R]}),t[44]=R,t[45]=C,t[46]=w,t[47]=T,t[48]=E,t[49]=O,t[50]=k,t[51]=j,t[52]=z):z=t[52],z}function xe(e){return e.severity===`blocker`}function Se(e){let t=(0,B.c)(32),{targetName:n,value:r,checking:i,disabled:a,onChange:o,onCheck:s}=e,c=(0,Q.useId)(),l=(0,Q.useId)(),u;t[0]!==i||t[1]!==a||t[2]!==r?(u=!i&&!a&&r.trim().length>0,t[0]=i,t[1]=a,t[2]=r,t[3]=u):u=t[3];let d=u,f;t[4]===c?f=t[5]:(f=(0,U.jsx)(`label`,{htmlFor:c,className:`block text-sm font-medium text-foreground`,children:`New server address`}),t[4]=c,t[5]=f);let p;t[6]!==l||t[7]!==n?(p=(0,U.jsxs)(`p`,{id:l,className:`text-xs text-subtle-foreground`,children:[`Machines and apps use this address to reach the server on `,n,` `,`after the move.`]}),t[6]=l,t[7]=n,t[8]=p):p=t[8];let m;t[9]===o?m=t[10]:(m=e=>o(e.target.value),t[9]=o,t[10]=m);let h;t[11]!==d||t[12]!==s?(h=e=>{e.key===`Enter`&&(e.preventDefault(),d&&s())},t[11]=d,t[12]=s,t[13]=h):h=t[13];let g;t[14]!==a||t[15]!==l||t[16]!==c||t[17]!==m||t[18]!==h||t[19]!==r?(g=(0,U.jsx)(k,{id:c,"aria-describedby":l,className:`min-w-0 flex-1`,value:r,placeholder:`https://Moonlet.example.com`,inputMode:`url`,autoCapitalize:`off`,autoCorrect:`off`,spellCheck:!1,disabled:a,onChange:m,onKeyDown:h}),t[14]=a,t[15]=l,t[16]=c,t[17]=m,t[18]=h,t[19]=r,t[20]=g):g=t[20];let _=!d,v=i?`Checking…`:`Check address`,y;t[21]!==s||t[22]!==_||t[23]!==v?(y=(0,U.jsx)(D,{type:`button`,variant:`outline`,disabled:_,onClick:s,children:v}),t[21]=s,t[22]=_,t[23]=v,t[24]=y):y=t[24];let b;t[25]!==g||t[26]!==y?(b=(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[g,y]}),t[25]=g,t[26]=y,t[27]=b):b=t[27];let x;return t[28]!==b||t[29]!==f||t[30]!==p?(x=(0,U.jsxs)(`div`,{className:`space-y-2`,children:[f,p,b]}),t[28]=b,t[29]=f,t[30]=p,t[31]=x):x=t[31],x}function Ce(e){let t=(0,B.c)(11),{items:n,dimmed:r}=e,i,a,o;if(t[0]!==r||t[1]!==n){o=Symbol.for(`react.early_return_sentinel`);bb0:{let e=N(n);if(n.length===0){let e;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Nothing needs attention before the move.`}),t[5]=e):e=t[5],o=e;break bb0}let s=r&&`opacity-60`;t[6]===s?i=t[7]:(i=u(`space-y-3 transition-opacity`,s),t[6]=s,t[7]=i),a=x.map(t=>{let n=e[t];if(n.length===0)return null;let r=ve[t];return(0,U.jsxs)(`section`,{"aria-label":r.heading,className:`space-y-1.5`,children:[(0,U.jsx)(`h3`,{className:`text-xs font-medium text-muted-foreground`,children:r.heading}),(0,U.jsx)(`ul`,{className:`space-y-2`,children:n.map(e=>(0,U.jsxs)(`li`,{"data-severity":t,className:`flex items-start gap-2.5`,children:[(0,U.jsx)(h,{name:r.icon,"aria-hidden":!0,className:u(`mt-0.5 size-4 shrink-0`,r.iconClassName)}),(0,U.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,U.jsx)(`p`,{className:`text-sm break-words text-foreground`,children:e.title}),e.detail===null?null:(0,U.jsx)(`p`,{className:`text-xs break-words text-subtle-foreground`,children:e.detail})]})]},e.id))})]},t)})}t[0]=r,t[1]=n,t[2]=i,t[3]=a,t[4]=o}else i=t[2],a=t[3],o=t[4];if(o!==Symbol.for(`react.early_return_sentinel`))return o;let s;return t[8]!==i||t[9]!==a?(s=(0,U.jsx)(`div`,{className:i,children:a}),t[8]=i,t[9]=a,t[10]=s):s=t[10],s}function we(e){let t=(0,B.c)(18),{path:n,sizeBytes:r,checked:i,disabled:a,onCheckedChange:o}=e,s;t[0]===o?s=t[1]:(s=e=>o(e===!0),t[0]=o,t[1]=s);let c;t[2]!==i||t[3]!==a||t[4]!==s?(c=(0,U.jsx)(I,{className:`mt-0.5`,checked:i,disabled:a,onCheckedChange:s}),t[2]=i,t[3]=a,t[4]=s,t[5]=c):c=t[5];let l;t[6]===n?l=t[7]:(l=(0,U.jsxs)(`span`,{className:`block text-sm break-words text-foreground`,children:[`Archive the existing Moonlet data at `,n]}),t[6]=n,t[7]=l);let u;t[8]===r?u=t[9]:(u=T(r),t[8]=r,t[9]=u);let d;t[10]===u?d=t[11]:(d=(0,U.jsxs)(`span`,{className:`block text-xs text-subtle-foreground`,children:[u,`. Moonlet renames it to a backup folder next to it and never merges it.`]}),t[10]=u,t[11]=d);let f;t[12]!==l||t[13]!==d?(f=(0,U.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[l,d]}),t[12]=l,t[13]=d,t[14]=f):f=t[14];let p;return t[15]!==c||t[16]!==f?(p=(0,U.jsxs)(`label`,{className:`flex items-start gap-2.5 rounded-md border border-border px-3 py-2.5`,children:[c,f]}),t[15]=c,t[16]=f,t[17]=p):p=t[17],p}var Te=100;function Ee(e){let t=(0,B.c)(9),{target:n,pending:r,errorMessage:i,onOpenChange:a,onRename:o}=e,s=n!==null,c;t[0]!==i||t[1]!==o||t[2]!==r||t[3]!==n?(c=e=>n?(0,U.jsx)(De,{target:n,pending:r,errorMessage:i,onRename:o,inputRef:e},n.id):null,t[0]=i,t[1]=o,t[2]=r,t[3]=n,t[4]=c):c=t[4];let l;return t[5]!==a||t[6]!==s||t[7]!==c?(l=(0,U.jsx)(v,{open:s,onOpenChange:a,children:c}),t[5]=a,t[6]=s,t[7]=c,t[8]=l):l=t[8],l}function De(e){let t=(0,B.c)(30),{target:n,pending:r,errorMessage:i,onRename:a,inputRef:o}=e,[c,l]=(0,Q.useState)(n.name),u;t[0]!==c||t[1]!==a||t[2]!==r||t[3]!==n?(u=e=>{if(e.preventDefault(),r)return;let t=c.trim();t.length!==0&&a(n,t)},t[0]=c,t[1]=a,t[2]=r,t[3]=n,t[4]=u):u=t[4];let d=u,p;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,U.jsx)(g,{children:`Rename machine`}),t[5]=p):p=t[5];let m;t[6]===n.name?m=t[7]:(m=(0,U.jsxs)(A,{children:[p,(0,U.jsxs)(f,{children:[`Choose a new name for `,n.name,`.`]})]}),t[6]=n.name,t[7]=m);let h;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(h=e=>l(e.target.value),t[8]=h):h=t[8];let _;t[9]!==o||t[10]!==c||t[11]!==r?(_=(0,U.jsx)(k,{ref:o,"aria-label":`Machine name`,value:c,maxLength:Te,autoCorrect:`off`,spellCheck:!1,disabled:r,onChange:h}),t[9]=o,t[10]=c,t[11]=r,t[12]=_):_=t[12];let v;t[13]===i?v=t[14]:(v=i===null?null:(0,U.jsx)(`p`,{className:`text-sm text-destructive`,children:i}),t[13]=i,t[14]=v);let y;t[15]!==_||t[16]!==v?(y=(0,U.jsxs)(`div`,{className:`space-y-2`,children:[_,v]}),t[15]=_,t[16]=v,t[17]=y):y=t[17];let b;t[18]!==c||t[19]!==r?(b=r||c.trim().length===0,t[18]=c,t[19]=r,t[20]=b):b=t[20];let x;t[21]===b?x=t[22]:(x=(0,U.jsx)(s,{children:(0,U.jsx)(D,{type:`submit`,disabled:b,children:`Rename machine`})}),t[21]=b,t[22]=x);let S;t[23]!==d||t[24]!==y||t[25]!==x?(S=(0,U.jsxs)(`form`,{className:`space-y-4`,onSubmit:d,children:[y,x]}),t[23]=d,t[24]=y,t[25]=x,t[26]=S):S=t[26];let C;return t[27]!==S||t[28]!==m?(C=(0,U.jsxs)(U.Fragment,{children:[m,S]}),t[27]=S,t[28]=m,t[29]=C):C=t[29],C}export{me as a,Y as c,te as d,he as i,se as l,ye as n,pe as o,ge as r,X as s,Ee as t,oe as u};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Br as t,Hr as n,hi as r,jr as i,kr as a,ri as o}from"./boot-vendor-CKEhulXz.js";import{t as s}from"./permission-mode-options-BrNWKCMS.js";import{Co as c,E as l,Fc as u,Ft as d,Ir as f,Jo as p,Kr as m,Nh as h,Om as g,Qi as _,Qt as v,Sh as ee,So as y,St as b,Th as x,To as S,Uo as C,Xi as w,Yo as T,Zo as E,Zt as D,bt as O,ja as k,kh as A,km as te,v as j,w as M,wo as N,xi as ne,xt as P}from"./index-miJf0-mc.js";import{a as F,i as I,n as re,o as L,r as ie}from"./dist-DOz2GbNP.js";import{b as ae}from"./resource-list-CGtfzqUn.js";import{t as oe}from"./machine-provider-queries-B4LtwicH.js";import{n as se}from"./MachineLabel-3r8SWEvU.js";import{t as ce}from"./page-shell-BYbdkEb3.js";import{a as le,c as ue,d as de,i as fe,l as pe,n as me,o as he,r as ge,s as _e,t as ve,u as ye}from"./MachineRenameDialog-CwgyUx_1.js";import{a as be,c as xe,i as Se,o as Ce,r as we,s as Te}from"./host-mutations-Da-c1bQb.js";var R=a(),z=e(o(),1);function Ee(e){let t=(0,R.c)(5),{notice:n}=e;if(n===null||n.message===null)return null;let r=n.phase===`suspending`||n.phase===`resuming`?`text-subtle-foreground`:`text-destructive-text`,i;t[0]===r?i=t[1]:(i=h(`min-w-0 text-xs`,r),t[0]=r,t[1]=i);let a;return t[2]!==n.message||t[3]!==i?(a=(0,z.jsx)(`p`,{role:`status`,"aria-label":`Machine maintenance`,className:i,children:n.message}),t[2]=n.message,t[3]=i,t[4]=a):a=t[4],a}var De=e(r(),1);function Oe(e,t){return t!==null&&t.fromHostId===e.id&&t.oldCopyDeletedAt===null}function ke(e,t){let n=`The server moved from ${e.name} to ${t.toHostName}. The old server data is still on ${e.name}, locked so Moonlet won't start a server from it. Keep it as a backup, or delete it once the new server works.`;return e.status===`connected`?n:`${n} ${e.name} has to be online to delete it.`}function Ae(e){let t=(0,R.c)(33),{host:n,lastMove:r}=e,i=l(),[a,o]=(0,De.useState)(!1),s;t[0]===i?s=t[1]:(s=()=>{i.reset(),o(!0)},t[0]=i,t[1]=s);let u;t[2]!==n||t[3]!==r||t[4]!==s?(u=(0,z.jsx)(B,{host:n,lastMove:r,onDelete:s}),t[2]=n,t[3]=r,t[4]=s,t[5]=u):u=t[5];let d;t[6]===i?d=t[7]:(d=e=>{!e&&!i.isPending&&(i.reset(),o(!1))},t[6]=i,t[7]=d);let f;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,z.jsx)(S,{children:`Delete the old server copy?`}),t[8]=f):f=t[8];let p;t[9]!==n.name||t[10]!==r.toHostName?(p=(0,z.jsxs)(N,{children:[f,(0,z.jsxs)(y,{children:[`This permanently deletes the database, settings and plugin data`,` `,n.name,` kept when the server moved to `,r.toHostName,`. The server on `,r.toHostName,` is not affected.`]})]}),t[9]=n.name,t[10]=r.toHostName,t[11]=p):p=t[11];let h;t[12]!==i.error||t[13]!==i.isError||t[14]!==n.name?(h=i.isError?(0,z.jsx)(`p`,{className:`text-sm text-destructive-text`,role:`alert`,children:T({error:i.error,fallbackMessage:`Couldn't delete the old server copy on ${n.name}.`})}):null,t[12]=i.error,t[13]=i.isError,t[14]=n.name,t[15]=h):h=t[15];let g;t[16]!==i||t[17]!==n.id||t[18]!==n.name?(g=()=>i.mutate(n.id,{onSuccess:e=>{o(!1),ee.success(e.deleted?`Deleted the old server copy on ${n.name}`:`No old server copy was left on ${n.name}`)}}),t[16]=i,t[17]=n.id,t[18]=n.name,t[19]=g):g=t[19];let _=i.isPending?`Deleting…`:`Delete old copy`,v;t[20]!==i.isPending||t[21]!==g||t[22]!==_?(v=(0,z.jsx)(c,{children:(0,z.jsx)(A,{type:`button`,variant:`destructive`,disabled:i.isPending,onClick:g,children:_})}),t[20]=i.isPending,t[21]=g,t[22]=_,t[23]=v):v=t[23];let b;t[24]!==a||t[25]!==d||t[26]!==p||t[27]!==h||t[28]!==v?(b=(0,z.jsxs)(m,{modal:!1,open:a,onOpenChange:d,children:[p,h,v]}),t[24]=a,t[25]=d,t[26]=p,t[27]=h,t[28]=v,t[29]=b):b=t[29];let x;return t[30]!==b||t[31]!==u?(x=(0,z.jsxs)(z.Fragment,{children:[u,b]}),t[30]=b,t[31]=u,t[32]=x):x=t[32],x}function B(e){let t=(0,R.c)(9),{host:n,lastMove:r,onDelete:i}=e,a;t[0]!==n||t[1]!==r?(a=ke(n,r),t[0]=n,t[1]=r,t[2]=a):a=t[2];let o=n.status!==`connected`,s;t[3]!==i||t[4]!==o?(s=(0,z.jsx)(F,{children:(0,z.jsx)(I,{children:(0,z.jsx)(A,{type:`button`,variant:`destructive`,size:`sm`,disabled:o,onClick:i,children:`Delete old copy`})})}),t[3]=i,t[4]=o,t[5]=s):s=t[5];let c;return t[6]!==a||t[7]!==s?(c=(0,z.jsx)(L,{title:`Old server copy`,description:a,children:s}),t[6]=a,t[7]=s,t[8]=c):c=t[8],c}var je=`Highest permission mode any thread on the selected machine may run with. Threads that ask for more resolve down to it, and a provider that supports nothing this low can't run here.`,Me={darwin:`macOS`,linux:`Linux`,wsl:`WSL`,win32:`Windows`,unknown:null};function V({host:e,platformLabel:t,now:n}){let r=[pe({host:e,now:n})];return t!==null&&r.push(t),r.push(`paired ${k({timestamp:e.createdAt,now:n})}`),r.join(` · `)}function Ne(e){let t=(0,R.c)(6),{disabled:n,onSelect:r,value:i}=e,a;t[0]!==n||t[1]!==r||t[2]!==i?(a=s.map(e=>{let t=e.value===i;return(0,z.jsx)(I,{className:`items-start`,children:(0,z.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":t,disabled:n,onClick:()=>{t||r(e.value)},className:h(`flex w-full items-start gap-3 rounded-md text-left outline-none focus-visible:ring-2 focus-visible:ring-ring`,n&&`opacity-70`),children:[(0,z.jsx)(`span`,{className:h(`mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border`,t?`border-foreground`:`border-input`),children:t?(0,z.jsx)(`span`,{className:`size-2 rounded-full bg-foreground`}):null}),(0,z.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,z.jsx)(`span`,{className:`block text-sm text-foreground`,children:e.label}),e.description?(0,z.jsx)(`span`,{className:`mt-0.5 block text-xs leading-snug text-subtle-foreground/75`,children:e.description}):null]})]})},e.value)}),t[0]=n,t[1]=r,t[2]=i,t[3]=a):a=t[3];let o;return t[4]===a?o=t[5]:(o=(0,z.jsx)(`div`,{role:`radiogroup`,"aria-label":`Permission limit`,children:(0,z.jsx)(F,{children:a})}),t[4]=a,t[5]=o),o}function Pe(e){let t=(0,R.c)(57),{host:n,machineProvider:r,platformLabel:a,now:o,isPrimary:s,isThisMachine:c,showServerBadge:l,lifecycleNotice:u,lifecycleActionPending:d,onSuspend:f,onResume:p,onRetryCleanup:m,onRename:h,onReconnect:g,canMoveServerHere:v,onMoveServerHere:ee}=e,y;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(y=te(`machines`),t[0]=y):y=t[0];let b;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,z.jsxs)(i,{to:y,className:`inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground`,children:[(0,z.jsx)(x,{name:`ChevronLeft`,className:`size-3.5`}),`Machines`]}),t[1]=b):b=t[1];let S;t[2]!==n||t[3]!==r?(S=(0,z.jsx)(`h1`,{className:`min-w-0 text-sm font-semibold text-foreground`,children:(0,z.jsx)(se,{host:n,machineProvider:r})}),t[2]=n,t[3]=r,t[4]=S):S=t[4];let C;t[5]===c?C=t[6]:(C=c?(0,z.jsx)(re,{children:`This machine`}):null,t[5]=c,t[6]=C);let w;t[7]===l?w=t[8]:(w=l?(0,z.jsx)(re,{children:`Server`}):null,t[7]=l,t[8]=w);let T;t[9]!==S||t[10]!==C||t[11]!==w?(T=(0,z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[S,C,w]}),t[9]=S,t[10]=C,t[11]=w,t[12]=T):T=t[12];let E;t[13]===n?E=t[14]:(E=ye(n),t[13]=n,t[14]=E);let D;t[15]===E?D=t[16]:(D=(0,z.jsx)(_,{tone:E}),t[15]=E,t[16]=D);let O;t[17]!==n||t[18]!==o||t[19]!==a?(O=V({host:n,platformLabel:a,now:o}),t[17]=n,t[18]=o,t[19]=a,t[20]=O):O=t[20];let k;t[21]===O?k=t[22]:(k=(0,z.jsx)(`p`,{className:`min-w-0 text-xs text-subtle-foreground/75`,children:O}),t[21]=O,t[22]=k);let A;t[23]!==k||t[24]!==D?(A=(0,z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[D,k]}),t[23]=k,t[24]=D,t[25]=A):A=t[25];let j;t[26]===u?j=t[27]:(j=(0,z.jsx)(Ee,{notice:u}),t[26]=u,t[27]=j);let M;t[28]!==A||t[29]!==j||t[30]!==T?(M=(0,z.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[T,A,j]}),t[28]=A,t[29]=j,t[30]=T,t[31]=M):M=t[31];let N;t[32]!==n||t[33]!==d||t[34]!==r||t[35]!==p||t[36]!==m||t[37]!==f?(N=(0,z.jsx)(le,{host:n,machineProvider:r,pending:d,onSuspend:f,onResume:p,onRetryCleanup:m}),t[32]=n,t[33]=d,t[34]=r,t[35]=p,t[36]=m,t[37]=f,t[38]=N):N=t[38];let ne=`${n.name} actions`,P;t[39]!==v||t[40]!==n||t[41]!==s||t[42]!==d||t[43]!==r||t[44]!==ee||t[45]!==g||t[46]!==h?(P=fe({host:n,machineProvider:r,isPrimary:s,canMoveServerHere:v,lifecycleActionPending:d,onRename:h,onReconnect:g,onMoveServerHere:ee}),t[39]=v,t[40]=n,t[41]=s,t[42]=d,t[43]=r,t[44]=ee,t[45]=g,t[46]=h,t[47]=P):P=t[47];let F;t[48]!==ne||t[49]!==P?(F=(0,z.jsx)(ae,{label:ne,items:P}),t[48]=ne,t[49]=P,t[50]=F):F=t[50];let I;t[51]!==N||t[52]!==F?(I=(0,z.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[N,F]}),t[51]=N,t[52]=F,t[53]=I):I=t[53];let L;return t[54]!==M||t[55]!==I?(L=(0,z.jsxs)(`div`,{className:`space-y-3`,children:[b,(0,z.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-3`,children:[M,I]})]}),t[54]=M,t[55]=I,t[56]=L):L=t[56],L}function Fe(){let e=(0,R.c)(120),{hostId:r}=n(),a=t(),o=w(),{providers:s}=oe(),c=C(),{localDaemonHostId:l,platform:m}=ne(),h=u(),g=O(),_=we(),y=Ce(),S=Te(),D=Se(),k=be(),N=xe(),re=M(),[ae,se]=(0,De.useState)(!1),[le,fe]=(0,De.useState)(!1),[pe,ye]=(0,De.useState)(!1),[Ee,ke]=(0,De.useState)(!1),B=o.data,V=B?.find(e=>e.id===r)??null,Fe=V?.lifecycle.message??null,Be=V===null?null:{phase:V.lifecycle.phase,message:Fe},Ve=c.data?.primaryHostId??null,H=c.data?.experiments.serverMove??!1,U=V!==null&&V.id===Ve,He;e[0]===B?He=e[1]:(He=B?.filter(ze).length??0,e[0]=B,e[1]=He);let Ue=He>1&&V!==null&&V.id===l,We=V?.machineProviderId===null||V?.machineProviderId===void 0?null:s?.find(e=>e.id===V.machineProviderId)??null,Ge;if(e[2]!==r||e[3]!==h.data?.projects){let t=h.data?.projects??[],n;e[5]===r?n=e[6]:(n=e=>e.sources.some(e=>e.hostId===r),e[5]=r,e[6]=n),Ge=t.filter(n).map(Re),e[2]=r,e[3]=h.data?.projects,e[4]=Ge}else Ge=e[4];let Ke=Ge,W,qe;if(e[7]!==r||e[8]!==g.machines){let t;e[11]===r?t=e[12]:(t=e=>e.host.id===r,e[11]=r,e[12]=t),W=g.machines.find(t),qe=(W?.issues??[]).filter(d),e[7]=r,e[8]=g.machines,e[9]=W,e[10]=qe}else W=e[9],qe=e[10];let Je=qe.length,Ye=p().data;W?.providerStatus;let Xe;bb0:{let t=W?.providerStatus;if(!t){let t;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[13]=t):t=e[13],Xe=t;break bb0}let n;e[14]!==Ye||e[15]!==t?(n=Object.entries(t).flatMap(e=>{let[t,n]=e;if(!n.installed)return[];let r=Ye?.find(e=>e.id===t);return[{...n,providerId:t,provider:r,ProviderIcon:v(`agent`,t,r??null)?.icon}]}),e[14]=Ye,e[15]=t,e[16]=n):n=e[16],Xe=n}let Ze=Xe,Qe;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(Qe=Date.now(),e[17]=Qe):Qe=e[17];let $e=Qe,et=V!==null&&V.id===l&&m!==null?Me[m]:U&&c.data?.primaryHostPlatform?Me[c.data.primaryHostPlatform]:null;if(B===void 0){let t;return e[18]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,z.jsx)(ce,{contentClassName:`pt-4 md:pt-5`,children:(0,z.jsx)(`div`,{className:`mx-auto w-full max-w-3xl`,children:(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading…`})})}),e[18]=t):t=e[18],t}if(V===null){let t;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(t=te(`machines`),e[19]=t):t=e[19];let n;return e[20]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,z.jsx)(ce,{contentClassName:`pt-4 md:pt-5`,children:(0,z.jsxs)(`div`,{className:`mx-auto w-full max-w-3xl space-y-3`,children:[(0,z.jsxs)(i,{to:t,className:`inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground`,children:[(0,z.jsx)(x,{name:`ChevronLeft`,className:`size-3.5`}),`Machines`]}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Machine is no longer paired.`})]})}),e[20]=n):n=e[20],n}let tt=P(V),nt=re.data?.lastMove??null,rt=ce,it=Pe,at=S.isPending||D.isPending||k.isPending,ot=()=>S.mutate(V.id),st=()=>D.mutate(V.id),ct=()=>k.mutate(V.id),G;e[21]===_?G=e[22]:(G=()=>{_.reset(),se(!0)},e[21]=_,e[22]=G);let lt=c.data!==void 0&&j({host:V,primaryHostId:Ve,move:re.data?.move??null,serverMoveEnabled:H}),ut,dt;e[23]===Symbol.for(`react.memo_cache_sentinel`)?(ut=()=>ke(!0),dt=()=>ye(!0),e[23]=ut,e[24]=dt):(ut=e[23],dt=e[24]);let K;e[25]!==it||e[26]!==V||e[27]!==U||e[28]!==Ue||e[29]!==Be||e[30]!==We||e[31]!==$e||e[32]!==et||e[33]!==ct||e[34]!==G||e[35]!==lt||e[36]!==at||e[37]!==ot||e[38]!==st?(K=(0,z.jsx)(it,{host:V,machineProvider:We,platformLabel:et,now:$e,isPrimary:U,isThisMachine:Ue,showServerBadge:U,lifecycleNotice:Be,lifecycleActionPending:at,onSuspend:ot,onResume:st,onRetryCleanup:ct,onRename:G,canMoveServerHere:lt,onReconnect:ut,onMoveServerHere:dt}),e[25]=it,e[26]=V,e[27]=U,e[28]=Ue,e[29]=Be,e[30]=We,e[31]=$e,e[32]=et,e[33]=ct,e[34]=G,e[35]=lt,e[36]=at,e[37]=ot,e[38]=st,e[39]=K):K=e[39];let q;e[40]!==V.id||e[41]!==V.name||e[42]!==N?(q=e=>N.mutate({hostId:V.id,maxPermissionMode:e},{onError:e=>{E({error:e,fallbackMessage:`Couldn't change the permission limit for ${V.name}.`})}}),e[40]=V.id,e[41]=V.name,e[42]=N,e[43]=q):q=e[43];let J;e[44]!==V.maxPermissionMode||e[45]!==q||e[46]!==N.isPending?(J=(0,z.jsx)(L,{title:`Permission limit`,description:je,children:(0,z.jsx)(Ne,{value:V.maxPermissionMode,disabled:N.isPending,onSelect:q})}),e[44]=V.maxPermissionMode,e[45]=q,e[46]=N.isPending,e[47]=J):J=e[47];let Y;e[48]!==V.status||e[49]!==Ze||e[50]!==W?.statusError||e[51]!==W?.statusPending||e[52]!==Je?(Y=(0,z.jsx)(L,{title:`Provider CLIs`,children:(0,z.jsx)(F,{children:(0,z.jsx)(ie,{label:`Installed`,children:V.status===`connected`?W?.statusPending?(0,z.jsx)(`span`,{children:`Checking…`}):W?.statusError?(0,z.jsx)(`span`,{children:`Status unavailable`}):(0,z.jsxs)(z.Fragment,{children:[Ze.length>0?(0,z.jsx)(`span`,{className:`flex min-w-0 flex-wrap items-center justify-start gap-x-3 gap-y-1 @min-[36rem]/settings:justify-end`,children:Ze.map(Le)}):(0,z.jsx)(`span`,{children:`None installed`}),Je>0?(0,z.jsx)(i,{to:te(`updates`),className:`shrink-0 rounded outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`,children:(0,z.jsxs)(f,{variant:`outline`,size:`sm`,className:`border-attention/50 bg-surface-attention text-warning-text transition-colors hover:border-attention hover:text-foreground`,children:[Je,` to fix`]})}):null]}):(0,z.jsx)(`span`,{children:`Unavailable while offline`})})})}),e[48]=V.status,e[49]=Ze,e[50]=W?.statusError,e[51]=W?.statusPending,e[52]=Je,e[53]=Y):Y=e[53];let X;e[54]===V.id?X=e[55]:(X=(0,z.jsx)(de,{hostId:V.id}),e[54]=V.id,e[55]=X);let Z;e[56]===Ke?Z=e[57]:(Z=(0,z.jsx)(ie,{label:`Projects`,children:Ke.length===0?(0,z.jsx)(`span`,{children:`None`}):(0,z.jsx)(`span`,{className:`min-w-0 truncate`,children:Ke.map(Ie)})}),e[56]=Ke,e[57]=Z);let ft=tt??`Up to date`,pt;e[58]===ft?pt=e[59]:(pt=(0,z.jsx)(`span`,{children:ft}),e[58]=ft,e[59]=pt);let mt;e[60]!==V||e[61]!==y?(mt=b(V)?(0,z.jsx)(A,{type:`button`,variant:`outline`,size:`sm`,className:`h-6 px-2 text-xs`,disabled:y.isPending,onClick:()=>y.mutate(V.id,{onSuccess:()=>{ee.success(`Update retry requested for ${V.name}`)}}),children:y.isPending?`Retrying…`:`Retry update`}):null,e[60]=V,e[61]=y,e[62]=mt):mt=e[62];let ht;e[63]!==pt||e[64]!==mt?(ht=(0,z.jsxs)(ie,{label:`Updates`,children:[pt,mt]}),e[63]=pt,e[64]=mt,e[65]=ht):ht=e[65];let gt;e[66]!==Z||e[67]!==ht?(gt=(0,z.jsx)(L,{title:`Machine information`,children:(0,z.jsxs)(F,{children:[Z,ht]})}),e[66]=Z,e[67]=ht,e[68]=gt):gt=e[68];let _t;e[69]!==V||e[70]!==nt||e[71]!==H?(_t=H&&Oe(V,nt)?(0,z.jsx)(Ae,{host:V,lastMove:nt}):null,e[69]=V,e[70]=nt,e[71]=H,e[72]=_t):_t=e[72];let vt;e[73]!==V||e[74]!==U||e[75]!==H?(vt=U?ue(H):`Revokes ${V.name}'s access to this server. ${_e(V)}`,e[73]=V,e[74]=U,e[75]=H,e[76]=vt):vt=e[76];let yt;e[77]===Symbol.for(`react.memo_cache_sentinel`)?(yt=()=>fe(!0),e[77]=yt):yt=e[77];let bt;e[78]===U?bt=e[79]:(bt=(0,z.jsx)(F,{children:(0,z.jsx)(I,{children:(0,z.jsx)(A,{type:`button`,variant:`destructive`,size:`sm`,disabled:U,onClick:yt,children:`Remove machine`})})}),e[78]=U,e[79]=bt);let Q;e[80]!==vt||e[81]!==bt?(Q=(0,z.jsx)(L,{title:`Danger zone`,description:vt,children:bt}),e[80]=vt,e[81]=bt,e[82]=Q):Q=e[82];let xt;e[83]!==K||e[84]!==J||e[85]!==Y||e[86]!==X||e[87]!==gt||e[88]!==_t||e[89]!==Q?(xt=(0,z.jsxs)(`div`,{className:`mx-auto w-full max-w-3xl space-y-6 pb-10`,children:[K,J,Y,X,gt,_t,Q]}),e[83]=K,e[84]=J,e[85]=Y,e[86]=X,e[87]=gt,e[88]=_t,e[89]=Q,e[90]=xt):xt=e[90];let St=ae?V:null,Ct;e[91]!==_.error||e[92]!==_.isError?(Ct=_.isError?T({error:_.error,fallbackMessage:`Couldn't rename the machine.`}):null,e[91]=_.error,e[92]=_.isError,e[93]=Ct):Ct=e[93];let wt;e[94]===_.isPending?wt=e[95]:(wt=e=>{!e&&!_.isPending&&se(!1)},e[94]=_.isPending,e[95]=wt);let Tt;e[96]===_?Tt=e[97]:(Tt=(e,t)=>_.mutate({hostId:e.id,name:t},{onSuccess:()=>se(!1)}),e[96]=_,e[97]=Tt);let Et;e[98]!==_.isPending||e[99]!==St||e[100]!==Ct||e[101]!==wt||e[102]!==Tt?(Et=(0,z.jsx)(ve,{target:St,pending:_.isPending,errorMessage:Ct,onOpenChange:wt,onRename:Tt}),e[98]=_.isPending,e[99]=St,e[100]=Ct,e[101]=wt,e[102]=Tt,e[103]=Et):Et=e[103];let Dt=le?V:null,Ot;e[104]===a?Ot=e[105]:(Ot=()=>a(te(`machines`)),e[104]=a,e[105]=Ot);let kt;e[106]!==Dt||e[107]!==Ot?(kt=(0,z.jsx)(he,{target:Dt,onOpenChange:fe,onRemoved:Ot}),e[106]=Dt,e[107]=Ot,e[108]=kt):kt=e[108];let At=Ee?V:null,jt;e[109]===At?jt=e[110]:(jt=(0,z.jsx)(ge,{target:At,onOpenChange:ke}),e[109]=At,e[110]=jt);let Mt=pe?V:null,$;e[111]===Mt?$=e[112]:($=(0,z.jsx)(me,{target:Mt,onOpenChange:ye}),e[111]=Mt,e[112]=$);let Nt;return e[113]!==rt||e[114]!==xt||e[115]!==Et||e[116]!==kt||e[117]!==jt||e[118]!==$?(Nt=(0,z.jsxs)(rt,{contentClassName:`pt-4 md:pt-5`,children:[xt,Et,kt,jt,$]}),e[113]=rt,e[114]=xt,e[115]=Et,e[116]=kt,e[117]=jt,e[118]=$,e[119]=Nt):Nt=e[119],Nt}function Ie(e,t){return(0,z.jsxs)(`span`,{children:[t>0?` · `:``,(0,z.jsx)(i,{to:g(e.id),className:`hover:text-foreground`,children:e.name})]},e.id)}function Le(e){return(0,z.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-1.5`,children:[e.ProviderIcon?(0,z.jsx)(`span`,{"data-provider-icon":e.providerId,"aria-hidden":!0,className:`flex size-3.5 shrink-0 items-center justify-center`,children:e.provider===void 0?(0,z.jsx)(e.ProviderIcon,{className:`size-3.5`}):(0,z.jsx)(D,{provider:e.provider,icon:e.ProviderIcon,className:`size-3.5`})}):null,(0,z.jsx)(`span`,{children:e.displayName}),e.currentVersion?(0,z.jsx)(`span`,{children:e.currentVersion}):null]},e.providerId)}function Re(e){return{id:e.id,name:e.name}}function ze(e){return e.type===`persistent`}export{Fe as MachineSettingsView};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,kr as n,ri as r}from"./boot-vendor-CKEhulXz.js";import{Nh as i,Th as a}from"./index-miJf0-mc.js";import{a as o,i as s,n as c,t as l}from"./audio-input-device-preference-BKx2st3G.js";import{t as u}from"./WaveformVisualizer-BD93SVDE.js";var d=n(),f=e(t(),1),p=e(r(),1);function m(e){let t=(0,d.c)(43),{open:n,onCaptureReady:r}=e,[m,_]=c(),{devices:v,refresh:y,isSupported:b,hasDeviceAccess:x}=s(),[S,C]=(0,f.useState)(null),[w,T]=(0,f.useState)(null),E,D;t[0]!==b||t[1]!==n||t[2]!==m||t[3]!==y?(E=()=>{if(!n||!b)return;let e=!1,t=null;return T(null),C(null),l(navigator.mediaDevices,m).then(n=>{if(e){n.getTracks().forEach(g);return}t=n,C(n),y()}).catch(t=>{e||T(t instanceof DOMException&&t.name===`NotAllowedError`?`Allow mic access in your settings.`:`Can't open this mic. Choose another.`)}),()=>{e=!0,t?.getTracks().forEach(h),C(null)}},D=[n,m,y,b],t[0]=b,t[1]=n,t[2]=m,t[3]=y,t[4]=E,t[5]=D):(E=t[4],D=t[5]),(0,f.useEffect)(E,D);let O,k;t[6]!==r||t[7]!==n||t[8]!==S?(O=()=>{n&&S&&r?.()},k=[n,S,r],t[6]=r,t[7]=n,t[8]=S,t[9]=O,t[10]=k):(O=t[9],k=t[10]),(0,f.useEffect)(O,k);let A=n?S:null,{silent:j}=o(A,!1),M;t[11]===A?M=t[12]:(M=A?.getAudioTracks()[0]?.label,t[11]=A,t[12]=M);let N=M,P;t[13]!==v||t[14]!==x||t[15]!==m?(P=x&&m!==null&&v.length>0&&!v.some(e=>e.deviceId===m),t[13]=v,t[14]=x,t[15]=m,t[16]=P):P=t[16];let F=P,I;t[17]!==N||t[18]!==w||t[19]!==b||t[20]!==n||t[21]!==j||t[22]!==A?(I=n?(0,p.jsxs)(`div`,{className:`space-y-2 rounded-lg border bg-muted/30 p-3`,"aria-label":`Live microphone preview`,children:[(0,p.jsxs)(`div`,{className:`flex items-center justify-between gap-2 text-xs text-muted-foreground`,children:[(0,p.jsx)(`span`,{className:`shrink-0 font-medium`,children:`Live preview`}),(0,p.jsx)(`span`,{className:`min-w-0 truncate`,title:N,children:w||!b?`Unavailable`:A?N||`Listening`:`Connecting…`})]}),(0,p.jsx)(u,{stream:A,active:n&&A!==null,className:`h-9 w-full`}),(0,p.jsx)(`p`,{role:`status`,className:`min-h-5 text-sm text-muted-foreground`,children:w??(b?A?j?`No audio detected. Try another mic.`:`Speak to check your microphone.`:`Connecting to microphone…`:`This browser can't use a mic.`)})]}):null,t[17]=N,t[18]=w,t[19]=b,t[20]=n,t[21]=j,t[22]=A,t[23]=I):I=t[23];let L;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,p.jsx)(`p`,{className:`px-1 text-xs font-medium text-muted-foreground`,children:`Input device`}),t[24]=L):L=t[24];let R;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(R={deviceId:null,label:`System default`},t[25]=R):R=t[25];let z;t[26]!==m||t[27]!==F?(z=F?[{deviceId:m,label:`Preferred microphone (unavailable)`}]:[],t[26]=m,t[27]=F,t[28]=z):z=t[28];let B;t[29]!==v||t[30]!==z?(B=[R,...z,...v],t[29]=v,t[30]=z,t[31]=B):B=t[31];let V;t[32]!==m||t[33]!==F||t[34]!==_||t[35]!==B?(V=(0,p.jsxs)(`div`,{className:`space-y-2`,children:[L,(0,p.jsx)(`div`,{role:`group`,"aria-label":`Microphone`,className:`max-h-64 space-y-1 overflow-y-auto rounded-lg border p-1`,children:B.map(e=>(0,p.jsxs)(`button`,{type:`button`,"aria-pressed":m===e.deviceId,disabled:F&&e.deviceId===m,onClick:()=>_(e.deviceId),className:i(`flex min-h-11 w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm transition-colors hover:bg-state-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset disabled:opacity-50`,m===e.deviceId&&`bg-state-active`),children:[(0,p.jsx)(a,{name:e.deviceId===null?`Laptop`:`Mic`,className:`size-4 shrink-0 text-muted-foreground`}),(0,p.jsx)(`span`,{className:`min-w-0 flex-1 break-words`,children:e.label}),(0,p.jsx)(`span`,{className:`size-4 shrink-0`,"aria-hidden":`true`,children:m===e.deviceId?(0,p.jsx)(a,{name:`Check`,className:`size-4`}):null})]},e.deviceId??`system`))})]}),t[32]=m,t[33]=F,t[34]=_,t[35]=B,t[36]=V):V=t[36];let H;t[37]===F?H=t[38]:(H=F?(0,p.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Preferred microphone unavailable. Using another input until it returns.`}):null,t[37]=F,t[38]=H);let U;return t[39]!==V||t[40]!==H||t[41]!==I?(U=(0,p.jsxs)(`div`,{className:`space-y-4`,children:[I,V,H]}),t[39]=V,t[40]=H,t[41]=I,t[42]=U):U=t[42],U}function h(e){return e.stop()}function g(e){return e.stop()}export{m as MicrophonePreferences};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{It as t,J as n,Qt as r,X as i,Xn as a,Y as o,Yt as s,Z as c,Zt as l,hi as u,kr as d,ri as f}from"./boot-vendor-CKEhulXz.js";import{Ba as p,Ev as m,Mh as h,Nh as g,Th as ee,Tp as _,Va as v,ga as y,ha as te,ma as b,mp as ne,za as x}from"./index-miJf0-mc.js";import{t as S}from"./switch-Dd_I2Qsh.js";import{a as C,i as w,o as T,r as E,s as D,t as O}from"./model-load-error-message-C3EzABRM.js";var k=d(),A=e(u(),1),j=e(f(),1),M=`Toggle`,N=A.forwardRef((e,n)=>{let{pressed:i,defaultPressed:a,onPressedChange:o,...c}=e,[l,u]=t({prop:i,onChange:o,defaultProp:a??!1,caller:M});return(0,j.jsx)(s.button,{type:`button`,"aria-pressed":l,"data-state":l?`on`:`off`,"data-disabled":e.disabled?``:void 0,...c,ref:n,onClick:r(e.onClick,()=>{e.disabled||u(!l)})})});N.displayName=M;var P=N,F=`ToggleGroup`,[I,L]=l(F,[i]),R=i(),z=A.forwardRef((e,t)=>{let{type:n,...r}=e;if(n===`single`)return(0,j.jsx)(re,{role:`radiogroup`,...r,ref:t});if(n===`multiple`)return(0,j.jsx)(ie,{role:`toolbar`,...r,ref:t});throw Error(`Missing prop \`type\` expected on \`${F}\``)});z.displayName=F;var[B,V]=I(F),re=A.forwardRef((e,n)=>{let{value:r,defaultValue:i,onValueChange:a=()=>{},...o}=e,[s,c]=t({prop:r,defaultProp:i??``,onChange:a,caller:F});return(0,j.jsx)(B,{scope:e.__scopeToggleGroup,type:`single`,value:A.useMemo(()=>s?[s]:[],[s]),onItemActivate:c,onItemDeactivate:A.useCallback(()=>c(``),[c]),children:(0,j.jsx)(U,{...o,ref:n})})}),ie=A.forwardRef((e,n)=>{let{value:r,defaultValue:i,onValueChange:a=()=>{},...o}=e,[s,c]=t({prop:r,defaultProp:i??[],onChange:a,caller:F}),l=A.useCallback(e=>c((t=[])=>[...t,e]),[c]),u=A.useCallback(e=>c((t=[])=>t.filter(t=>t!==e)),[c]);return(0,j.jsx)(B,{scope:e.__scopeToggleGroup,type:`multiple`,value:s,onItemActivate:l,onItemDeactivate:u,children:(0,j.jsx)(U,{...o,ref:n})})});z.displayName=F;var[H,ae]=I(F),U=A.forwardRef((e,t)=>{let{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:a,dir:l,loop:u=!0,...d}=e,f=R(n),p=c(l),m={dir:p,...d};return(0,j.jsx)(H,{scope:n,rovingFocus:i,disabled:r,children:i?(0,j.jsx)(o,{asChild:!0,...f,orientation:a,dir:p,loop:u,children:(0,j.jsx)(s.div,{...m,ref:t})}):(0,j.jsx)(s.div,{...m,ref:t})})}),W=`ToggleGroupItem`,G=A.forwardRef((e,t)=>{let r=V(W,e.__scopeToggleGroup),i=ae(W,e.__scopeToggleGroup),a=R(e.__scopeToggleGroup),o=r.value.includes(e.value),s=i.disabled||e.disabled,c={...e,pressed:o,disabled:s},l=A.useRef(null);return i.rovingFocus?(0,j.jsx)(n,{asChild:!0,...a,focusable:!s,active:o,ref:l,children:(0,j.jsx)(K,{...c,ref:t})}):(0,j.jsx)(K,{...c,ref:t})});G.displayName=W;var K=A.forwardRef((e,t)=>{let{__scopeToggleGroup:n,value:r,...i}=e,a=V(W,n),o={role:`radio`,"aria-checked":e.pressed,"aria-pressed":void 0};return(0,j.jsx)(N,{...a.type===`single`?o:void 0,...i,ref:t,onPressedChange:e=>{e?a.onItemActivate(r):a.onItemDeactivate(r)}})}),q=a(`inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_[data-icon-root]]:pointer-events-none [&_[data-icon-root]]:size-4 [&_[data-icon-root]]:shrink-0`,{variants:{variant:{default:`bg-transparent`,outline:`border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground`},size:{default:`h-9 px-2 min-w-9`,sm:`h-8 px-1.5 min-w-8`,lg:`h-10 px-2.5 min-w-10`}},defaultVariants:{variant:`default`,size:`default`}}),oe=A.forwardRef((e,t)=>{let n=(0,k.c)(13),r,i,a,o;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4]):({className:r,variant:o,size:a,...i}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o);let s;n[5]!==r||n[6]!==a||n[7]!==o?(s=g(q({variant:o,size:a,className:r})),n[5]=r,n[6]=a,n[7]=o,n[8]=s):s=n[8];let c;return n[9]!==i||n[10]!==t||n[11]!==s?(c=(0,j.jsx)(P,{ref:t,className:s,...i}),n[9]=i,n[10]=t,n[11]=s,n[12]=c):c=n[12],c});oe.displayName=P.displayName;var se=A.createContext({size:`default`,variant:`default`}),ce=A.forwardRef((e,t)=>{let n=(0,k.c)(19),r,i,a,o,s;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4],s=n[5]):({className:i,variant:s,size:o,children:r,...a}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o,n[5]=s);let c;n[6]===i?c=n[7]:(c=g(`flex items-center justify-center gap-1`,i),n[6]=i,n[7]=c);let l;n[8]!==o||n[9]!==s?(l={variant:s,size:o},n[8]=o,n[9]=s,n[10]=l):l=n[10];let u;n[11]!==r||n[12]!==l?(u=(0,j.jsx)(se.Provider,{value:l,children:r}),n[11]=r,n[12]=l,n[13]=u):u=n[13];let d;return n[14]!==a||n[15]!==t||n[16]!==c||n[17]!==u?(d=(0,j.jsx)(z,{ref:t,className:c,...a,children:u}),n[14]=a,n[15]=t,n[16]=c,n[17]=u,n[18]=d):d=n[18],d});ce.displayName=z.displayName;var J=A.forwardRef((e,t)=>{let n=(0,k.c)(17),r,i,a,o,s;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4],s=n[5]):({className:i,children:r,variant:s,size:o,...a}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o,n[5]=s);let c=A.useContext(se),l;n[6]!==i||n[7]!==c.size||n[8]!==c.variant||n[9]!==o||n[10]!==s?(l=g(q({variant:c.variant||s,size:c.size||o}),i),n[6]=i,n[7]=c.size,n[8]=c.variant,n[9]=o,n[10]=s,n[11]=l):l=n[11];let u;return n[12]!==r||n[13]!==a||n[14]!==t||n[15]!==l?(u=(0,j.jsx)(G,{ref:t,className:l,...a,children:r}),n[12]=r,n[13]=a,n[14]=t,n[15]=l,n[16]=u):u=n[16],u});J.displayName=G.displayName;function le(e){let t=(0,k.c)(64),{listRef:n,providerId:r,provider:i,providerLabel:a,listboxId:o,optionId:s,modelIsLoading:c,isShowingModelError:l,hasModelOptions:u,modelLoadError:d,modelLoadFailed:f,navRows:p,highlightedIndex:v,isSearching:y,showMoreModels:b,onToggleMoreModels:ne,moreModelOptions:x,moreModelsOpen:C,onMoreModelsOpenChange:w,isPreviewing:M,modelValue:N,selectionBlocked:P,onModelSelect:F,showReasoningSection:I,reasoningValue:L,reasoningOptions:R,onReasoningSelect:z,serviceTierOptions:B,serviceTierValue:V,onServiceTierChange:re,agentSections:ie,onAgentOptionChange:H,onStartHandoff:ae}=e,U=_(),W=i?.brandPrefix,G=B.length===1?B[0]:void 0,K=G?`${G.label} mode`:``,q=B.some(e=>e.id===V)?V:m,oe;t[0]===w?oe=t[1]:(oe=()=>{w(!0)},t[0]=w,t[1]=oe);let se=oe,J=r||`no-provider`,le=o?`listbox`:void 0,be=o?`Models`:void 0,xe=!U&&`max-h-64`,Y;t[2]===xe?Y=t[3]:(Y=g(`min-h-0 flex-1 overflow-y-auto overscroll-contain px-1 pb-1 pt-0`,xe),t[2]=xe,t[3]=Y);let X;t[4]===l?X=t[5]:(X=l?null:(0,j.jsx)(he,{children:`Model`}),t[4]=l,t[5]=X);let Z;t[6]!==W||t[7]!==u||t[8]!==v||t[9]!==U||t[10]!==M||t[11]!==y||t[12]!==o||t[13]!==c||t[14]!==d||t[15]!==f||t[16]!==N||t[17]!==x||t[18]!==C||t[19]!==p||t[20]!==F||t[21]!==w||t[22]!==ne||t[23]!==se||t[24]!==s||t[25]!==i||t[26]!==a||t[27]!==P||t[28]!==b?(Z=c?(0,j.jsx)(T,{label:`Loading models`,rowDataAttribute:`data-model-loading-row`}):u?(0,j.jsxs)(j.Fragment,{children:[p.map((e,t)=>{let n=v===t,r=s(t);if(e.kind===`more-toggle`)return(0,j.jsx)(ge,{id:r,isActive:n,expanded:b,onToggle:ne},`more-toggle`);let i=e.option;return(0,j.jsx)(ve,{id:r,role:o?`option`:void 0,isActive:n,label:D(i.label,W),qualifier:i.routeProviderId,selected:!M&&i.value===N,disabled:P||i.disabled===!0,disabledReason:i.disabledReason,onClick:()=>F(i.value)},i.value)}),!U&&!y&&x.length>0?(0,j.jsx)(_e,{open:C,onOpenChange:w,openSub:se,activeBrandPrefix:W,isPreviewing:M,modelValue:N,options:x,onSelect:F}):null,y&&p.length===0?(0,j.jsx)(`div`,{className:g(`px-2 text-xs text-muted-foreground`,`py-[0.3125rem] max-md:pointer-coarse:py-2`),children:`No models match your search`}):null]}):(0,j.jsx)(`div`,{className:g(`px-2 text-xs leading-relaxed text-muted-foreground`,`pb-2 pt-1.5 max-md:pointer-coarse:pb-3 max-md:pointer-coarse:pt-2`),title:d?E({error:d,providerLabel:a}):void 0,children:d?(0,j.jsx)(O,{error:d,providerLabel:a,...i?.installUrl===void 0?{}:{installUrl:i.installUrl}}):f?`Could not load models.`:`No models available`}),t[6]=W,t[7]=u,t[8]=v,t[9]=U,t[10]=M,t[11]=y,t[12]=o,t[13]=c,t[14]=d,t[15]=f,t[16]=N,t[17]=x,t[18]=C,t[19]=p,t[20]=F,t[21]=w,t[22]=ne,t[23]=se,t[24]=s,t[25]=i,t[26]=a,t[27]=P,t[28]=b,t[29]=Z):Z=t[29];let Q;t[30]!==n||t[31]!==o||t[32]!==J||t[33]!==le||t[34]!==be||t[35]!==Y||t[36]!==X||t[37]!==Z?(Q=(0,j.jsxs)(`div`,{ref:n,role:le,id:o,"aria-label":be,className:Y,children:[X,Z]},J),t[30]=n,t[31]=o,t[32]=J,t[33]=le,t[34]=be,t[35]=Y,t[36]=X,t[37]=Z,t[38]=Q):Q=t[38];let Se;t[39]!==z||t[40]!==R||t[41]!==L||t[42]!==P||t[43]!==I?(Se=I?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`div`,{className:`shrink-0 border-t border-border`}),(0,j.jsxs)(`div`,{className:`shrink-0 px-2 py-2.5`,children:[(0,j.jsx)(he,{className:`mb-2 px-1 py-0`,children:`Reasoning`}),(0,j.jsx)(ce,{type:`single`,"aria-label":`Reasoning`,value:L,onValueChange:e=>{let t=R.find(t=>t.value===e);t&&z(t.value)},disabled:P,className:`flex gap-1`,children:R.map(me)})]})]}):null,t[39]=z,t[40]=R,t[41]=L,t[42]=P,t[43]=I,t[44]=Se):Se=t[44];let Ce;t[45]!==re||t[46]!==q||t[47]!==B||t[48]!==G||t[49]!==K?(Ce=G?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`div`,{className:`shrink-0 border-t border-border`}),(0,j.jsx)(`div`,{className:`shrink-0 p-1`,children:(0,j.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-sm px-2 py-[0.3125rem] text-xs`,title:G.description,children:[(0,j.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,j.jsx)(ee,{name:`Zap`,className:`size-4 fill-current text-muted-foreground`}),(0,j.jsx)(`span`,{children:K})]}),(0,j.jsx)(S,{checked:q===G.id,onCheckedChange:e=>re(e?G.id:m),"aria-label":K,className:g(h,`[&>span]:size-3.5`)})]})})]}):B.length>1?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`div`,{className:`shrink-0 border-t border-border`}),(0,j.jsxs)(`div`,{className:`shrink-0 px-2 py-2.5`,children:[(0,j.jsx)(he,{className:`mb-2 px-1 py-0`,children:`Speed`}),(0,j.jsx)(ce,{type:`single`,"aria-label":`Speed`,value:q,onValueChange:e=>{(e===`default`||B.some(t=>t.id===e))&&re(e)},className:`flex flex-wrap gap-1`,children:[{id:m,label:`Default`},...B].map(pe)})]})]}):null,t[45]=re,t[46]=q,t[47]=B,t[48]=G,t[49]=K,t[50]=Ce):Ce=t[50];let we;if(t[51]!==ie||t[52]!==H){let e;t[54]===H?e=t[55]:(e=e=>{let t=e.appliesOnNextTurn?(0,j.jsx)(`span`,{className:`ml-1.5 font-normal text-subtle-foreground`,children:`from the next turn`}):null,n=e.items.find(fe);return n===void 0?(0,j.jsxs)(A.Fragment,{children:[(0,j.jsx)(`div`,{className:`shrink-0 border-t border-border`}),(0,j.jsxs)(`div`,{className:`shrink-0 px-2 py-2.5`,children:[(0,j.jsxs)(he,{className:`mb-2 px-1 py-0`,children:[e.label,t]}),(0,j.jsx)(ce,{type:`single`,"aria-label":e.label,value:e.items.find(de)?.key??``,onValueChange:t=>{let n=e.items.find(e=>e.key===t);n!==void 0&&H(e.id,n.value)},className:`flex flex-wrap gap-1`,children:e.items.map(ue)})]})]},e.id):(0,j.jsxs)(A.Fragment,{children:[(0,j.jsx)(`div`,{className:`shrink-0 border-t border-border`}),(0,j.jsx)(`div`,{className:`shrink-0 p-1`,children:(0,j.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-sm px-2 py-[0.3125rem] text-xs`,title:e.description??void 0,children:[(0,j.jsxs)(`span`,{className:`min-w-0 truncate`,children:[e.label,t]}),(0,j.jsx)(S,{checked:n.selected,onCheckedChange:t=>H(e.id,t),"aria-label":e.label,className:g(h,`[&>span]:size-3.5`)})]})})]},e.id)},t[54]=H,t[55]=e),we=ie.map(e),t[51]=ie,t[52]=H,t[53]=we}else we=t[53];let $;t[56]===ae?$=t[57]:($=ae?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`div`,{className:`shrink-0 border-t border-border`}),(0,j.jsx)(`div`,{className:`shrink-0 p-1`,children:(0,j.jsx)(ye,{label:`Handoff to new thread`,iconName:`MessageSquarePlus`,onClick:ae})})]}):null,t[56]=ae,t[57]=$);let Te;return t[58]!==Se||t[59]!==Ce||t[60]!==we||t[61]!==$||t[62]!==Q?(Te=(0,j.jsx)(te,{children:(0,j.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden`,children:[Q,Se,Ce,we,$]})}),t[58]=Se,t[59]=Ce,t[60]=we,t[61]=$,t[62]=Q,t[63]=Te):Te=t[63],Te}function ue(e){return(0,j.jsx)(J,{value:e.key,title:e.description??void 0,className:g(`h-6 min-w-0 flex-auto shrink-0 whitespace-nowrap rounded-sm px-1 text-xs font-normal shadow-none hover:bg-state-hover hover:text-foreground data-[state=on]:bg-state-active data-[state=on]:text-foreground data-[state=on]:hover:bg-state-active`,`max-md:pointer-coarse:h-9 max-md:pointer-coarse:text-sm`,h),children:e.label},e.key)}function de(e){return e.selected}function fe(e){return e.value===!0}function pe(e){return(0,j.jsx)(J,{value:e.id,title:e.description,className:g(`h-6 min-w-0 flex-auto shrink-0 whitespace-nowrap rounded-sm px-1 text-xs font-normal shadow-none hover:bg-state-hover hover:text-foreground data-[state=on]:bg-state-active data-[state=on]:text-foreground data-[state=on]:hover:bg-state-active`,`max-md:pointer-coarse:h-9 max-md:pointer-coarse:text-sm`,h),children:e.label},e.id)}function me(e){return(0,j.jsx)(J,{value:e.value,"aria-label":e.label,className:g(`h-6 min-w-0 flex-auto shrink-0 whitespace-nowrap rounded-sm px-1 text-xs font-normal shadow-none hover:bg-state-hover hover:text-foreground data-[state=on]:bg-state-active data-[state=on]:text-foreground data-[state=on]:hover:bg-state-active`,`max-md:pointer-coarse:h-9 max-md:pointer-coarse:text-sm`,h),children:e.label===`Medium`||e.label===`Extra High`?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`span`,{className:`max-[360px]:hidden`,children:e.label}),(0,j.jsx)(`span`,{className:`hidden max-[360px]:inline`,children:e.label===`Medium`?`Med`:`XHigh`})]}):e.label},e.value)}function he(e){let t=(0,k.c)(5),{children:n,className:r}=e,i;t[0]===r?i=t[1]:(i=g(`sticky top-0 z-10 bg-background px-2 text-xs font-medium text-muted-foreground`,`pb-[0.3125rem] pt-2 max-md:pointer-coarse:pb-1.5`,r),t[0]=r,t[1]=i);let a;return t[2]!==n||t[3]!==i?(a=(0,j.jsx)(`div`,{className:i,children:n}),t[2]=n,t[3]=i,t[4]=a):a=t[4],a}function ge(e){let t=(0,k.c)(14),{expanded:n,onToggle:r,isActive:i,id:a}=e,{hoverProps:o}=y(),s=i&&`bg-state-active`,c;t[0]===s?c=t[1]:(c=g(`relative flex w-full cursor-default select-none items-center gap-1 rounded-sm px-2 text-xs text-muted-foreground outline-none hover:bg-state-hover hover:text-foreground`,h,b,s,`py-[0.3125rem] max-md:pointer-coarse:py-2`),t[0]=s,t[1]=c);let l=n?`Fewer models`:`More models`,u;t[2]===l?u=t[3]:(u=(0,j.jsx)(`span`,{children:l}),t[2]=l,t[3]=u);let d=n?`ChevronUp`:`ChevronDown`,f;t[4]===d?f=t[5]:(f=(0,j.jsx)(ee,{name:d,className:`size-3.5 shrink-0`}),t[4]=d,t[5]=f);let p;return t[6]!==n||t[7]!==o||t[8]!==a||t[9]!==r||t[10]!==c||t[11]!==u||t[12]!==f?(p=(0,j.jsxs)(`button`,{type:`button`,id:a,onClick:r,"aria-expanded":n,className:c,...o,children:[u,f]}),t[6]=n,t[7]=o,t[8]=a,t[9]=r,t[10]=c,t[11]=u,t[12]=f,t[13]=p):p=t[13],p}function _e(e){let t=(0,k.c)(46),{open:n,onOpenChange:r,openSub:i,activeBrandPrefix:a,isPreviewing:o,modelValue:s,options:c,onSelect:l}=e,{isLastHovered:u,hoverProps:d}=y(),f=(0,A.useRef)(null),m=(0,A.useRef)(null),_;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(_=()=>{window.setTimeout(()=>{m.current?.querySelector(`button`)?.focus()},0)},t[0]=_):_=t[0];let ne=_,S,C;t[1]!==u||t[2]!==r||t[3]!==n?(S=()=>{n&&!u&&r(!1)},C=[n,u,r],t[1]=u,t[2]=r,t[3]=n,t[4]=S,t[5]=C):(S=t[4],C=t[5]),(0,A.useEffect)(S,C);let T;t[6]!==d||t[7]!==i?(T=e=>{d.onPointerEnter(e),i()},t[6]=d,t[7]=i,t[8]=T):T=t[8];let E;t[9]!==d||t[10]!==r||t[11]!==i?(E=e=>{if(d.onKeyDown(e),e.key===`Enter`||e.key===` `||e.key===`Spacebar`||e.key===`ArrowRight`){e.preventDefault(),i(),ne();return}(e.key===`Escape`||e.key===`ArrowLeft`)&&(e.preventDefault(),r(!1))},t[9]=d,t[10]=r,t[11]=i,t[12]=E):E=t[12];let O;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(O=g(`relative flex w-full cursor-default select-none items-center gap-1 rounded-sm px-2 py-[0.3125rem] text-xs text-muted-foreground outline-none hover:bg-state-hover hover:text-foreground`,h,b),t[13]=O):O=t[13];let M=d[`data-last-hovered`],N,P;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,j.jsx)(`span`,{children:`More models`}),P=(0,j.jsx)(ee,{name:`ChevronRight`,className:`size-3.5 shrink-0`}),t[14]=N,t[15]=P):(N=t[14],P=t[15]);let F;t[16]!==n||t[17]!==i||t[18]!==T||t[19]!==E||t[20]!==M?(F=(0,j.jsx)(p,{asChild:!0,children:(0,j.jsxs)(`button`,{ref:f,type:`button`,"aria-haspopup":`menu`,"aria-expanded":n,onClick:i,onPointerEnter:T,onKeyDown:E,className:O,"data-last-hovered":M,children:[N,P]})}),t[16]=n,t[17]=i,t[18]=T,t[19]=E,t[20]=M,t[21]=F):F=t[21];let I;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(I=g(`max-h-[min(20rem,var(--radix-popover-content-available-height),calc(100dvh-0.5rem))] overflow-y-auto overscroll-contain p-1 data-[state=closed]:animate-none`,w),t[22]=I):I=t[22];let L;t[23]===r?L=t[24]:(L=e=>{(e.key===`Escape`||e.key===`ArrowLeft`)&&(e.preventDefault(),r(!1),f.current?.focus())},t[23]=r,t[24]=L);let R;if(t[25]!==a||t[26]!==o||t[27]!==s||t[28]!==l||t[29]!==c){let e;t[31]!==a||t[32]!==o||t[33]!==s||t[34]!==l?(e=e=>(0,j.jsx)(ve,{label:D(e.label,a),qualifier:e.routeProviderId,selected:!o&&e.value===s,onClick:()=>l(e.value)},e.value),t[31]=a,t[32]=o,t[33]=s,t[34]=l,t[35]=e):e=t[35],R=c.map(e),t[25]=a,t[26]=o,t[27]=s,t[28]=l,t[29]=c,t[30]=R}else R=t[30];let z;t[36]===R?z=t[37]:(z=(0,j.jsx)(te,{children:R}),t[36]=R,t[37]=z);let B;t[38]!==L||t[39]!==z?(B=(0,j.jsx)(v,{ref:m,side:`right`,align:`start`,sideOffset:6,className:I,onKeyDown:L,children:z}),t[38]=L,t[39]=z,t[40]=B):B=t[40];let V;return t[41]!==r||t[42]!==n||t[43]!==F||t[44]!==B?(V=(0,j.jsxs)(x,{open:n,onOpenChange:r,children:[F,B]}),t[41]=r,t[42]=n,t[43]=F,t[44]=B,t[45]=V):V=t[45],V}function ve(e){let t=(0,k.c)(28),{label:n,qualifier:r,selected:i,disabled:a,disabledReason:o,onClick:s,isActive:c,id:l,role:u}=e,d=a===void 0?!1:a,{hoverProps:f}=y(),p;t[0]===n?p=t[1]:(p=C(n),t[0]=n,t[1]=p);let{base:m,tag:_}=p,v=u===`option`?!!c:void 0,te=c&&`bg-state-active`,x=d&&`cursor-not-allowed opacity-60`,S;t[2]!==te||t[3]!==x?(S=g(`relative flex w-full cursor-default select-none items-center justify-between gap-3 rounded-sm px-2 text-xs outline-none hover:bg-state-hover hover:text-foreground`,h,b,te,x,`py-[0.3125rem] max-md:pointer-coarse:py-2`),t[2]=te,t[3]=x,t[4]=S):S=t[4];let w=o??(r?`${n} · ${r}`:n),T;t[5]===_?T=t[6]:(T=_?(0,j.jsx)(`span`,{className:`ml-1.5 text-subtle-foreground`,children:_}):null,t[5]=_,t[6]=T);let E;t[7]===r?E=t[8]:(E=r?(0,j.jsx)(`span`,{className:`ml-1.5 text-subtle-foreground`,children:r}):null,t[7]=r,t[8]=E);let D;t[9]!==m||t[10]!==w||t[11]!==T||t[12]!==E?(D=(0,j.jsxs)(`span`,{className:`truncate`,title:w,children:[m,T,E]}),t[9]=m,t[10]=w,t[11]=T,t[12]=E,t[13]=D):D=t[13];let O=i?`opacity-100`:`opacity-0`,A;t[14]===O?A=t[15]:(A=g(ne,`text-subtle-foreground`,O),t[14]=O,t[15]=A);let M;t[16]===A?M=t[17]:(M=(0,j.jsx)(`span`,{className:`flex shrink-0 items-center gap-1.5`,children:(0,j.jsx)(ee,{name:`Check`,className:A})}),t[16]=A,t[17]=M);let N;return t[18]!==d||t[19]!==f||t[20]!==l||t[21]!==s||t[22]!==u||t[23]!==D||t[24]!==M||t[25]!==v||t[26]!==S?(N=(0,j.jsxs)(`button`,{type:`button`,id:l,role:u,disabled:d,"aria-selected":v,onClick:s,className:S,...f,children:[D,M]}),t[18]=d,t[19]=f,t[20]=l,t[21]=s,t[22]=u,t[23]=D,t[24]=M,t[25]=v,t[26]=S,t[27]=N):N=t[27],N}function ye(e){let t=(0,k.c)(10),{label:n,iconName:r,onClick:i}=e,{hoverProps:a}=y(),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=g(`relative flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 text-xs outline-none hover:bg-state-hover hover:text-foreground`,h,b,`py-[0.3125rem] max-md:pointer-coarse:py-2`),t[0]=o):o=t[0];let s;t[1]===r?s=t[2]:(s=(0,j.jsx)(ee,{name:r,className:`size-3.5 shrink-0`,"aria-hidden":!0}),t[1]=r,t[2]=s);let c;t[3]===n?c=t[4]:(c=(0,j.jsx)(`span`,{className:`min-w-0 truncate`,children:n}),t[3]=n,t[4]=c);let l;return t[5]!==a||t[6]!==i||t[7]!==s||t[8]!==c?(l=(0,j.jsxs)(`button`,{type:`button`,onClick:i,className:o,...a,children:[s,c]}),t[5]=a,t[6]=i,t[7]=s,t[8]=c,t[9]=l):l=t[9],l}export{le as ModelReasoningMenu};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,kr as n,ri as r}from"./boot-vendor-CKEhulXz.js";import{B as i,L as a,Nh as ee}from"./index-miJf0-mc.js";import{t as o}from"./code-loading-skeletons-kAn_Dql6.js";import{n as s,t as c}from"./pierre-strict-mode-recovery-CogG8fEr.js";import{t as l}from"./FileDiff-BRQrZnWt.js";import{a as u,n as te,r as d,t as f}from"./git-diff-patch-text-SHpUxhZL.js";import{t as p}from"./PierreLineSelectionActions-BX8ROJ3g.js";import{i as m}from"./pierre-worker-pool-gate-B91n9XZl.js";var h=n(),g=e(t(),1),_=e(r(),1),v={"--diffs-font-size":`12px`,"--diffs-line-height":`18px`},y=30;function b(e){let t=(0,h.c)(47),{file:n,patchText:r,fullFileContents:b,view:x,overflow:S,showLineNumbers:C,className:w,onSelectionAddToChat:T}=e,E=b?.old.path,D=b?.old.content,O=b?.new.path,k=b?.new.content,A;bb0:{if(E===void 0||D===void 0||O===void 0||k===void 0){A=n;break bb0}let e;t[0]!==n||t[1]!==k||t[2]!==O||t[3]!==D||t[4]!==E||t[5]!==r?(e=u({fileDiff:n,oldFile:{name:E,contents:D},newFile:{name:O,contents:k},patchText:r??d(n)}),t[0]=n,t[1]=k,t[2]=O,t[3]=D,t[4]=E,t[5]=r,t[6]=e):e=t[6],A=e}let j=A,M=j!==n&&j.isPartial===!1?y:void 0,N=(0,g.useRef)(null),P=a(),F=i(),I;t[7]!==j||t[8]!==x?(I=e=>te({displayStyle:x,fileDiff:j,range:e}),t[7]=j,t[8]=x,t[9]=I):I=t[9];let L=I,R;t[10]===j?R=t[11]:(R=e=>{let{containerElement:t}=e;return f({containerElement:t,fileDiff:j})},t[10]=j,t[11]=R);let z=R,B=T!==void 0,V;t[12]!==z||t[13]!==L||t[14]!==T||t[15]!==B?(V={buildFallbackSelectionText:z,buildSelectionText:L,containerRef:N,enabled:B,onSelectionAddToChat:T},t[12]=z,t[13]=L,t[14]=T,t[15]=B,t[16]=V):V=t[16];let H=p(V),U=!C,W;t[17]===M?W=t[18]:(W=M===void 0?{}:{expansionLineCount:M},t[17]=M,t[18]=W);let G=T!==void 0,K=T!==void 0,q=T===void 0?`disabled`:`number`,J=T===void 0?void 0:H.onGutterUtilityClick,Y;t[19]!==P||t[20]!==H.onLineSelectionChange||t[21]!==H.onLineSelectionEnd||t[22]!==H.onLineSelectionStart||t[23]!==S||t[24]!==q||t[25]!==J||t[26]!==U||t[27]!==W||t[28]!==G||t[29]!==K||t[30]!==F||t[31]!==x?(Y={diffStyle:x,overflow:S,disableLineNumbers:U,disableFileHeader:!0,...W,themeType:F,theme:P,enableGutterUtility:G,enableLineSelection:K,lineHoverHighlight:q,onGutterUtilityClick:J,onLineSelectionChange:H.onLineSelectionChange,onLineSelectionEnd:H.onLineSelectionEnd,onLineSelectionStart:H.onLineSelectionStart},t[19]=P,t[20]=H.onLineSelectionChange,t[21]=H.onLineSelectionEnd,t[22]=H.onLineSelectionStart,t[23]=S,t[24]=q,t[25]=J,t[26]=U,t[27]=W,t[28]=G,t[29]=K,t[30]=F,t[31]=x,t[32]=Y):Y=t[32];let X=c(Y);if(!m()){let e;return t[33]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(o,{}),t[33]=e):e=t[33],e}let Z;t[34]===w?Z=t[35]:(Z=ee(`overflow-x-auto`,w),t[34]=w,t[35]=Z);let Q;t[36]!==H.selectedRange||t[37]!==X||t[38]!==j?(Q=(0,_.jsx)(`div`,{className:`w-full max-w-full`,style:v,children:(0,_.jsx)(s,{children:(0,_.jsx)(l,{fileDiff:j,options:X,selectedLines:H.selectedRange})})}),t[36]=H.selectedRange,t[37]=X,t[38]=j,t[39]=Q):Q=t[39];let $;return t[40]!==H.menu||t[41]!==H.onPointerDownCapture||t[42]!==H.onPointerMoveCapture||t[43]!==H.onPointerUpCapture||t[44]!==Z||t[45]!==Q?($=(0,_.jsxs)(`div`,{ref:N,className:Z,onPointerDownCapture:H.onPointerDownCapture,onPointerMoveCapture:H.onPointerMoveCapture,onPointerUpCapture:H.onPointerUpCapture,children:[Q,H.menu]}),t[40]=H.menu,t[41]=H.onPointerDownCapture,t[42]=H.onPointerMoveCapture,t[43]=H.onPointerUpCapture,t[44]=Z,t[45]=Q,t[46]=$):$=t[46],$}export{b as default};