decocms 4.400.5 → 4.401.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (417) hide show
  1. package/dist/client/assets/{AlertCircle-DAwsTYRk.js → AlertCircle-D1gV07Oe.js} +1 -1
  2. package/dist/client/assets/{AreaChart-CY-F46Be.js → AreaChart-lv4gftWl.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-tvLjkuWF.js → ArrowLeft-Bpb3sor7.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-z0a_5OhC.js → ArrowRight-BFyYdKNd.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-Lg4NvWzc.js → ArrowUp-COLR6KTW.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-BoMqHHQt.js → CartesianChart-CJGGumCB.js} +1 -1
  7. package/dist/client/assets/{Check-BQZy9c_F.js → Check-C-Vn17o5.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-Czw2y_F3.js → CheckCircle-CyKBJceB.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-BYljQT_d.js → ChevronUp-Dto8qCq2.js} +1 -1
  10. package/dist/client/assets/{Copy01-6I1_Aion.js → Copy01-B2GuMU9Q.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-DargNaAR.js → CreditCard01-CoMSE38C.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-CN_Dg-j8.js → DotsVertical-R1tuLE9v.js} +1 -1
  13. package/dist/client/assets/{ErrorBarContext-BT3n9Mmx.js → ErrorBarContext-viPSAyu4.js} +1 -1
  14. package/dist/client/assets/{Eye-B4QzGCZN.js → Eye-BhTmzCKr.js} +1 -1
  15. package/dist/client/assets/{Globe04-CXTO7_iP.js → Globe04-BLoVxWaz.js} +1 -1
  16. package/dist/client/assets/{Image01-9AXWgviq.js → Image01-D02_x5mu.js} +1 -1
  17. package/dist/client/assets/{Key01-DFgwFBUs.js → Key01-BuudAO_W.js} +1 -1
  18. package/dist/client/assets/{LayoutLeft-SQ7j1egP.js → LayoutLeft-CuG2yJZR.js} +1 -1
  19. package/dist/client/assets/{Line-_W3oVo8E.js → Line-CsKmpStn.js} +1 -1
  20. package/dist/client/assets/{Link01-V3TqRs3C.js → Link01-CVUd8ZSz.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-CPO90J3S.js → LinkExternal01-Bo5cppL4.js} +1 -1
  22. package/dist/client/assets/{Monitor01-C9DSVDfs.js → Monitor01-Cj93oSbT.js} +1 -1
  23. package/dist/client/assets/{Palette-D0rqSgjT.js → Palette-CEa7GqA9.js} +1 -1
  24. package/dist/client/assets/{Plus-BU--LXol.js → Plus-Ch1uJBgh.js} +1 -1
  25. package/dist/client/assets/{SearchMd-BpFEap-1.js → SearchMd-B_MXZ22A.js} +1 -1
  26. package/dist/client/assets/{Sector-uvc125JQ.js → Sector-CNfzRqjQ.js} +1 -1
  27. package/dist/client/assets/{Share07-B29GBkjP.js → Share07-D6XgmppM.js} +1 -1
  28. package/dist/client/assets/{Sun-t-nvniXl.js → Sun-Dy_rDhHe.js} +1 -1
  29. package/dist/client/assets/{Tool01-B8crh1aV.js → Tool01-BoO1X0ZH.js} +1 -1
  30. package/dist/client/assets/{Trash01-DdWmWubI.js → Trash01-D4CwdSy9.js} +1 -1
  31. package/dist/client/assets/{Upload01-CsQlMBfP.js → Upload01-hQyKBWZL.js} +1 -1
  32. package/dist/client/assets/{User01-B4ccibs0.js → User01-gmEyKvLo.js} +1 -1
  33. package/dist/client/assets/{UserSquare-CAO2KcuZ.js → UserSquare-DXqYCX9F.js} +1 -1
  34. package/dist/client/assets/{Users01-D4csSmiF.js → Users01-BBb4-Wbt.js} +1 -1
  35. package/dist/client/assets/{X-lSFSs7wx.js → X-CEngH8b7.js} +1 -1
  36. package/dist/client/assets/{XClose-BEOYWQzz.js → XClose-Dvx_qcsQ.js} +1 -1
  37. package/dist/client/assets/{Zap-BZmnDtce.js → Zap-DkS3ccHw.js} +1 -1
  38. package/dist/client/assets/{ZoomOut-DwQzEWYf.js → ZoomOut-D3wne5dx.js} +1 -1
  39. package/dist/client/assets/{access-gate-CeyEk8D6.js → access-gate-D2mi3EXZ.js} +1 -1
  40. package/dist/client/assets/{add-connection-dialog-BwKHIeY0.js → add-connection-dialog-mm-WrmAR.js} +1 -1
  41. package/dist/client/assets/agent-analytics-IX3kP91L.js +2 -0
  42. package/dist/client/assets/agent-app-CliE0mM3.js +1 -0
  43. package/dist/client/assets/agent-assets-BbU_YrcZ.js +1 -0
  44. package/dist/client/assets/agent-automation-v13d06rk.js +20 -0
  45. package/dist/client/assets/agent-automations-yzTI8Hoc.js +1 -0
  46. package/dist/client/assets/agent-connect-sources-CEF4jbih.js +1 -0
  47. package/dist/client/assets/agent-deck-rRdXFIQU.js +1 -0
  48. package/dist/client/assets/agent-e2e-SKpj9Qv7.js +1 -0
  49. package/dist/client/assets/agent-experiments-DPD7MHX9.js +1 -0
  50. package/dist/client/assets/agent-file-CBIwfV0H.js +1 -0
  51. package/dist/client/assets/{agent-git-Dm-Aa993.js → agent-git-N-SzMySX.js} +2 -2
  52. package/dist/client/assets/agent-hosting-BnzsqBpZ.js +1 -0
  53. package/dist/client/assets/{agent-icon-Uyip_c6M.js → agent-icon-CjNFk4Bw.js} +1 -1
  54. package/dist/client/assets/agent-library-file-DHUyHSwO.js +1 -0
  55. package/dist/client/assets/agent-monitor-BeURekaz.js +1 -0
  56. package/dist/client/assets/agent-overview-By923wES.js +1 -0
  57. package/dist/client/assets/agent-settings-DiYW6DT3.js +1 -0
  58. package/dist/client/assets/{agent-site-editor-CisoB_8z.js → agent-site-editor-B7WR4KwZ.js} +13 -13
  59. package/dist/client/assets/agent-site-editor-code-A3lMFnBk.js +2 -0
  60. package/dist/client/assets/agent-site-editor-content-CTyxs9-E.js +9 -0
  61. package/dist/client/assets/agent-site-editor-preview-Db1buU8G.js +518 -0
  62. package/dist/client/assets/agent-view-Ct7YMMW7.js +1 -0
  63. package/dist/client/assets/{agent-view-guard-CW2E0Nya.js → agent-view-guard-BpwecHVM.js} +1 -1
  64. package/dist/client/assets/agents-list-XIrdiWMz.js +1 -0
  65. package/dist/client/assets/{ai-providers-aALsTmcr.js → ai-providers-CsYNRATt.js} +2 -2
  66. package/dist/client/assets/{alert-Cj3mDHfa.js → alert-BYraKSPm.js} +1 -1
  67. package/dist/client/assets/{alert-dialog-ScZSd_g9.js → alert-dialog-DpzgB-Ls.js} +1 -1
  68. package/dist/client/assets/analytics-sections-C2rbPWDv.js +1 -0
  69. package/dist/client/assets/api-keys-B9Lt-UrM.js +1 -0
  70. package/dist/client/assets/api-keys-CzlAuC7_.js +1 -0
  71. package/dist/client/assets/app-editor-tD7rn_1-.js +1 -0
  72. package/dist/client/assets/{asset-utils-zuPagV4t.js → asset-utils-4p52RC3c.js} +1 -1
  73. package/dist/client/assets/{auth-IJXSFSKo.js → auth-Dafjkfpj.js} +1 -1
  74. package/dist/client/assets/{auth-catchall-_ZlrnKe5.js → auth-catchall-DD401U-a.js} +1 -1
  75. package/dist/client/assets/auth-entry-CEr7Y2wf.js +1 -0
  76. package/dist/client/assets/{auth-split-layout-RzXa3xC3.js → auth-split-layout-DLRovWby.js} +1 -1
  77. package/dist/client/assets/{authenticate-and-persist-oauth-2rXUqvh1.js → authenticate-and-persist-oauth-DIl2N_8B.js} +1 -1
  78. package/dist/client/assets/{automation-list-row-DXlvb1Ba.js → automation-list-row-ueTfZfDa.js} +1 -1
  79. package/dist/client/assets/{automation-runs-bP6fMSYg.js → automation-runs-iTxxsepZ.js} +1 -1
  80. package/dist/client/assets/{automations-Cc87rLF5.js → automations-Cad12Ows.js} +1 -1
  81. package/dist/client/assets/{autosend-n3O0UdBS.js → autosend-DeYn5nkP.js} +1 -1
  82. package/dist/client/assets/{avatar-BdlFnSU8.js → avatar-B6HmPhM4.js} +1 -1
  83. package/dist/client/assets/{badge-Bhd7Yjxv.js → badge-4kURMy-V.js} +1 -1
  84. package/dist/client/assets/block-document-CgGOvOyl.js +3 -0
  85. package/dist/client/assets/{blocks-preview-workspace-context-CPHwvzb5.js → blocks-preview-workspace-context-Bm8P7H4k.js} +1 -1
  86. package/dist/client/assets/{buckets-D8dvVOSB.js → buckets-CK1WY8Rz.js} +1 -1
  87. package/dist/client/assets/{build-improve-prompt-doc-B6eWxg8K.js → build-improve-prompt-doc-BYdufdhy.js} +1 -1
  88. package/dist/client/assets/{calendar-BBDqyYcl.js → calendar-CZsGTekl.js} +1 -1
  89. package/dist/client/assets/{capability-load-error-DtKGgHck.js → capability-load-error-CaE4aliY.js} +1 -1
  90. package/dist/client/assets/{use-org-repo-syncs-DhQYfFtK.js → cards-DaNm0Rmg.js} +3 -3
  91. package/dist/client/assets/category-editor-CyFQk1RV.js +1 -0
  92. package/dist/client/assets/{chart-E7ehfHUF.js → chart-_YADtzsN.js} +1 -1
  93. package/dist/client/assets/{chat-context-SUJKu-XN.js → chat-context-v9O7Tar9.js} +5 -5
  94. package/dist/client/assets/{chat-draft-D9u5CYEW.js → chat-draft-BSL5UQWs.js} +1 -1
  95. package/dist/client/assets/{checkbox-CC9zkEff.js → checkbox-BMxilLAm.js} +1 -1
  96. package/dist/client/assets/{choose-editor-B5Rx7Zk5.js → choose-editor-TgQWBIvA.js} +1 -1
  97. package/dist/client/assets/{claim-phase-copy-Chi823Vj.js → claim-phase-copy-DHsomph6.js} +1 -1
  98. package/dist/client/assets/{cli-auth-success-QqvzIrWg.js → cli-auth-success-Bsu7TVxL.js} +1 -1
  99. package/dist/client/assets/{client-icons-CPgcSrwC.js → client-icons-PiLBRjl7.js} +1 -1
  100. package/dist/client/assets/{collapsible-CMMGBTfa.js → collapsible-bc19817o.js} +1 -1
  101. package/dist/client/assets/collection-detail-DpwCwzTH.js +1 -0
  102. package/dist/client/assets/{collection-display-button-c-WnLfEk.js → collection-display-button-BBRywDRf.js} +1 -1
  103. package/dist/client/assets/{collection-search-3XS3AdJ3.js → collection-search-kj64tBFw.js} +1 -1
  104. package/dist/client/assets/{collection-table-wrapper-DhxAGzgU.js → collection-table-wrapper-D2tmoW8T.js} +1 -1
  105. package/dist/client/assets/collection-tabs-DCLfzEOA.js +1 -0
  106. package/dist/client/assets/{combobox-q-ECrVO-.js → combobox-DlQnH8_N.js} +1 -1
  107. package/dist/client/assets/command-vKgGCoFF.js +1 -0
  108. package/dist/client/assets/{companion-mcps-section-DQRFd5L_.js → companion-mcps-section-Dpcawwvl.js} +1 -1
  109. package/dist/client/assets/connect-Dick3000.js +8 -0
  110. package/dist/client/assets/{connect-layout-DtbA5xEp.js → connect-layout-BfLs3zCI.js} +1 -1
  111. package/dist/client/assets/{connection-D_fwf_le.js → connection-CTAV5crm.js} +1 -1
  112. package/dist/client/assets/{connection-card-wq7ff65-.js → connection-card-DXWUKoxP.js} +1 -1
  113. package/dist/client/assets/connection-detail-BsIDB4zB.js +1 -0
  114. package/dist/client/assets/{connection-form-helpers-D8LXn1d-.js → connection-form-helpers-BrejHCrx.js} +1 -1
  115. package/dist/client/assets/connections-dBKfZKZY.js +1 -0
  116. package/dist/client/assets/{context-B092rba-.js → context-VbsY_yj4.js} +1 -1
  117. package/dist/client/assets/{create-organization-dialog-CyGYpJhs.js → create-organization-dialog-BCpMYw7e.js} +1 -1
  118. package/dist/client/assets/{decofile-api-BQi9jV2r.js → decofile-api-5Nr0-h_v.js} +1 -1
  119. package/dist/client/assets/{decopilot-D9YGMtj1.js → decopilot-DlmPNMn_.js} +2 -2
  120. package/dist/client/assets/dialog-CEiE0rPQ.js +1 -0
  121. package/dist/client/assets/discover-BvxkrONV.js +1 -0
  122. package/dist/client/assets/{domain-settings-BaQvjI4O.js → domain-settings-D1tynvCC.js} +1 -1
  123. package/dist/client/assets/{download-app-dialog-hSU8H3Vj.js → download-app-dialog-fmWolHKD.js} +1 -1
  124. package/dist/client/assets/{drawer-DeP9v70y.js → drawer-mNZA6mOf.js} +1 -1
  125. package/dist/client/assets/{editor-B7C6vwjS.js → editor-BGAJHie_.js} +1 -1
  126. package/dist/client/assets/{empty-state-CaK4RTlm.js → empty-state-BJxP56xq.js} +1 -1
  127. package/dist/client/assets/{empty-state-Bd7rwiDP.js → empty-state-BgjUu2bT.js} +1 -1
  128. package/dist/client/assets/{extract-connection-data-v71aWs18.js → extract-connection-data-erEsLv_0.js} +1 -1
  129. package/dist/client/assets/{feature-gate-LTW2kwcy.js → feature-gate-BdRUy7K_.js} +1 -1
  130. package/dist/client/assets/{feature-paywall-1lut-OZA.js → feature-paywall-Tj9HTPlX.js} +1 -1
  131. package/dist/client/assets/{file-explorer-CaKgHoMf.js → file-explorer-0KdYuesc.js} +2 -2
  132. package/dist/client/assets/{file-preview-DK07f0Bu.js → file-preview-i5I4Vmk2.js} +1 -1
  133. package/dist/client/assets/file-share-button-FS8XJyOj.js +3 -0
  134. package/dist/client/assets/{file-type-icon-BV5PHbD1.js → file-type-icon-Cv10yXI0.js} +1 -1
  135. package/dist/client/assets/{folder-icon-1-1m6gFV.js → folder-icon-DJuQAXN-.js} +1 -1
  136. package/dist/client/assets/{form-BT-p7abF.js → form-CCT2OtgN.js} +1 -1
  137. package/dist/client/assets/{gateway-client-Bunqz-v_.js → gateway-client-hbsOo-al.js} +1 -1
  138. package/dist/client/assets/{general-fOjVxBHu.js → general-B_HDEt1Q.js} +1 -1
  139. package/dist/client/assets/{github-icon-B7EzOW44.js → github-icon-BpCOzzV8.js} +1 -1
  140. package/dist/client/assets/home-CMRSzFNz.js +1 -0
  141. package/dist/client/assets/{hooks-ZDl1T3YR.js → hooks-CcmbiBeQ.js} +4 -4
  142. package/dist/client/assets/{icon-button-CH4FIKTp.js → icon-button-B8KzCtPE.js} +1 -1
  143. package/dist/client/assets/index-BeJdXzSv.css +1 -0
  144. package/dist/client/assets/{index-DGrB0yWK.js → index-BpvXUNGE.js} +27 -27
  145. package/dist/client/assets/index-BsLVRPrU.js +26 -0
  146. package/dist/client/assets/{index-C6jf5hj5.js → index-CDe2yrwT.js} +1 -1
  147. package/dist/client/assets/index-CGxhGPsv.js +5 -0
  148. package/dist/client/assets/{index-Cbxez_uk.js → index-CKZ6XrRd.js} +1 -1
  149. package/dist/client/assets/{index--xKIMIg3.js → index-CWksyNR9.js} +1 -1
  150. package/dist/client/assets/{index-4aLH0qvl.js → index-ClooW3Im.js} +1 -1
  151. package/dist/client/assets/{index-C_kk8c78.js → index-DVgj8U7g.js} +1 -1
  152. package/dist/client/assets/index-D_lD_4br.js +1 -0
  153. package/dist/client/assets/{index-Ck4x2-t2.js → index-De5sr9zh.js} +44 -44
  154. package/dist/client/assets/{index-Bg7kKf4r.js → index-Kwx27vNK.js} +1 -1
  155. package/dist/client/assets/index-bMw4G7-h.js +1 -0
  156. package/dist/client/assets/{index-Om_Krpb0.js → index-gldwodyc.js} +1 -1
  157. package/dist/client/assets/{index-nUsHjtAT.js → index-ldS2WUeM.js} +1 -1
  158. package/dist/client/assets/index-redirect-CfY3ykU_.js +1 -0
  159. package/dist/client/assets/{infiniteQueryObserver-DJPW5pCw.js → infiniteQueryObserver-CwgE9ndj.js} +1 -1
  160. package/dist/client/assets/{infra-billing-CHwTXFTp.js → infra-billing-TzlPUT1_.js} +1 -1
  161. package/dist/client/assets/{input-BBpmUhtR.js → input-B-DIEGoS.js} +1 -1
  162. package/dist/client/assets/{input-CsRLFWsE.js → input-CogQggtY.js} +1 -1
  163. package/dist/client/assets/input-DMbK8B2u.js +8 -0
  164. package/dist/client/assets/{integration-icon-CXxe2Nmz.js → integration-icon-CsYMgjoT.js} +1 -1
  165. package/dist/client/assets/{label-BasQfmGn.js → label-Baft7ecp.js} +1 -1
  166. package/dist/client/assets/{last-preview-page-tC_ec-8v.js → last-preview-page-DkIjQnDn.js} +1 -1
  167. package/dist/client/assets/{layout-BCBVVsx8.js → layout-CI3O4gkp.js} +1 -1
  168. package/dist/client/assets/{legacy-agents-deep-DJ3dRrzM.js → legacy-agents-deep-BvWpwcOc.js} +1 -1
  169. package/dist/client/assets/{legacy-main-redirect-C7QpzNdk.js → legacy-main-redirect-CQgWSIje.js} +1 -1
  170. package/dist/client/assets/library-CAwdTP4-.js +161 -0
  171. package/dist/client/assets/{login-BtJlygis.js → login-DJ5PeYOE.js} +1 -1
  172. package/dist/client/assets/{markdown-D9JYtNvk.js → markdown-UaZeehfy.js} +2 -2
  173. package/dist/client/assets/{mcp-app-renderer-CK8AdoIv.js → mcp-app-renderer-DVXFXjZU.js} +2 -2
  174. package/dist/client/assets/{mcp-oauth-CCvVH2OB.js → mcp-oauth-DpJ1IX9I.js} +1 -1
  175. package/dist/client/assets/members-CXM5jx_X.js +1 -0
  176. package/dist/client/assets/message-templates-54foej4h.js +1 -0
  177. package/dist/client/assets/{mini-report-page-CCQFv7lr.js → mini-report-page-B1sFW1ww.js} +1 -1
  178. package/dist/client/assets/mock-board-BbS_eZEl.js +10 -0
  179. package/dist/client/assets/{monaco-editor-CLYybS8B.js → monaco-editor-B9FUV1NZ.js} +2 -2
  180. package/dist/client/assets/{monitoring-stats-row-avCjcK0F.js → monitoring-stats-row-Cl5_OBZ5.js} +1 -1
  181. package/dist/client/assets/multi-select-VDMM47xB.js +1 -0
  182. package/dist/client/assets/{mustache-C9rsi357.js → mustache-DZ4FV0Nc.js} +1 -1
  183. package/dist/client/assets/{oauth-callback-ivL7RrDf.js → oauth-callback-OoZf3jL0.js} +1 -1
  184. package/dist/client/assets/{oauth-callback-ai-provider-DyQmwFrI.js → oauth-callback-ai-provider-foDaIFwI.js} +1 -1
  185. package/dist/client/assets/{onboarding-Bu2705eX.js → onboarding-Dq71FOpN.js} +1 -1
  186. package/dist/client/assets/{optimistic-project-sidebar-views-lIiVbcFU.js → optimistic-project-sidebar-views-CgB8Gy1s.js} +1 -1
  187. package/dist/client/assets/org-file-open-context-Mx8jC4-P.js +1 -0
  188. package/dist/client/assets/{organization-choice-Cqq6hiux.js → organization-choice-ZqNf00EY.js} +1 -1
  189. package/dist/client/assets/{orgs-DjPk91H4.js → orgs-B8y0HHqF.js} +1 -1
  190. package/dist/client/assets/page-seo-form-DPObRKD4.js +1 -0
  191. package/dist/client/assets/{pair-DW_WRb6G.js → pair-D39JYx1G.js} +5 -5
  192. package/dist/client/assets/{plan-ladder-BXJ0swZ2.js → plan-ladder-D85oNnSr.js} +1 -1
  193. package/dist/client/assets/{popover-K1ZrYG78.js → popover-DCaw39mN.js} +1 -1
  194. package/dist/client/assets/{post-calendar-2v4vqP8p.js → post-calendar-Dpixo2IP.js} +1 -1
  195. package/dist/client/assets/{post-editor-B2FiOFhN.js → post-editor-BivV74bZ.js} +1 -1
  196. package/dist/client/assets/{preview-content-CpPj1JH3.js → preview-content-ziDhpr9V.js} +1 -1
  197. package/dist/client/assets/{preview-dialog-Clu5ydVv.js → preview-dialog-DHJShsrA.js} +1 -1
  198. package/dist/client/assets/profile-C9xI3KvS.js +1 -0
  199. package/dist/client/assets/{project-app-view-1zY3x0YR.js → project-app-view-CFWAaKq_.js} +1 -1
  200. package/dist/client/assets/project-feed-D6D6bSHY.js +1 -0
  201. package/dist/client/assets/{project-icon-CjBJRgr0.js → project-icon-CXM68zVZ.js} +1 -1
  202. package/dist/client/assets/project-reports-8SYQbI2J.js +1 -0
  203. package/dist/client/assets/project-tasks-DrEyprGU.js +1 -0
  204. package/dist/client/assets/{prompts-rF3K-sXx.js → prompts-CVNAEIJB.js} +1 -1
  205. package/dist/client/assets/record-editor-CKxwz78L.js +1 -0
  206. package/dist/client/assets/{redirect-editor-C8SiyMIE.js → redirect-editor-Dy1UJRrv.js} +1 -1
  207. package/dist/client/assets/{reports-yWFVxw0Z.js → reports-BvZHk8Hk.js} +2 -2
  208. package/dist/client/assets/reports-DyvsxSR9.js +1 -0
  209. package/dist/client/assets/{reports-onboarding-N2pt6gNg.js → reports-onboarding-D4Uaui5Y.js} +1 -1
  210. package/dist/client/assets/reports-tab-CwwTWlIS.js +2 -0
  211. package/dist/client/assets/{repositories-CaSms5FF.js → repositories-CqbcdDdH.js} +1 -1
  212. package/dist/client/assets/{repository-import-picker-Kal2nH0n.js → repository-import-picker-BXQhU82J.js} +1 -1
  213. package/dist/client/assets/{repository-picker-DxgY__Tu.js → repository-picker-D1hSYB_G.js} +1 -1
  214. package/dist/client/assets/require-capability-Cab5QyjH.js +1 -0
  215. package/dist/client/assets/{required-auth-layout-BWh5q3u2.js → required-auth-layout-scRrBHKS.js} +1 -1
  216. package/dist/client/assets/{reset-password-aeaUD9hZ.js → reset-password-CDE1iX3h.js} +1 -1
  217. package/dist/client/assets/{resizable-C3GNt7qd.js → resizable-D2L182YF.js} +1 -1
  218. package/dist/client/assets/{review-settings-DTVyO-Pc.js → review-settings-B98rLFs_.js} +1 -1
  219. package/dist/client/assets/{rich-text-link-control-CWGtfixK.js → rich-text-link-control-DwRx0-0K.js} +1 -1
  220. package/dist/client/assets/roles-CZvYgdUZ.js +1 -0
  221. package/dist/client/assets/route-B9TApoqS.js +1 -0
  222. package/dist/client/assets/route-N926-QRJ.js +1 -0
  223. package/dist/client/assets/route-OKy5_TxY.js +1 -0
  224. package/dist/client/assets/route-page-header-ErgCCo2N.js +1 -0
  225. package/dist/client/assets/runnable-block-editor-C2YphDcL.js +17 -0
  226. package/dist/client/assets/{sandbox-lifecycle-context-DIc5m19C.js → sandbox-lifecycle-context-o4KKoGrI.js} +2 -2
  227. package/dist/client/assets/{schema-C2l7sv-S.js → schema-DkZUkArz.js} +1 -1
  228. package/dist/client/assets/{scroll-area-CTv9WE1l.js → scroll-area-Ca9Mo_QH.js} +1 -1
  229. package/dist/client/assets/{search-input-yrvqqqa5.js → search-input-DRWRYRPs.js} +1 -1
  230. package/dist/client/assets/{search-toggle-g6PUq9ya.js → search-toggle-B5FB44XX.js} +1 -1
  231. package/dist/client/assets/{secret-picker-BxxQ42cR.js → secret-picker-DLap6vTC.js} +1 -1
  232. package/dist/client/assets/secrets-jZp-bTCf.js +1 -0
  233. package/dist/client/assets/sections-editor-BFbkxXEt.js +1 -0
  234. package/dist/client/assets/{select-BoR29t6W.js → select-BZ6sktb7.js} +1 -1
  235. package/dist/client/assets/select-model-BIWsu5PV.js +1 -0
  236. package/dist/client/assets/{seo-editor-BMB6shx2.js → seo-editor-PDlEaSFK.js} +1 -1
  237. package/dist/client/assets/{separator-Di6srp9Z.js → separator-D_UVaWw6.js} +1 -1
  238. package/dist/client/assets/settings-tab-BBHI-Kul.js +5 -0
  239. package/dist/client/assets/{sheet-C9bl1oJW.js → sheet-Kja83qKC.js} +1 -1
  240. package/dist/client/assets/shell-layout-ynqF32RZ.js +1 -0
  241. package/dist/client/assets/{skill-preview-CjSzB6zf.js → skill-preview-BjeMKh94.js} +1 -1
  242. package/dist/client/assets/skills-BVNUFN8s.js +1 -0
  243. package/dist/client/assets/{sso-CT9ELyZE.js → sso-CbvzPnGh.js} +1 -1
  244. package/dist/client/assets/{suggestion-BSo5OP_j.js → suggestion-DMGPIg87.js} +1 -1
  245. package/dist/client/assets/{switch-wAm3D1I6.js → switch-CSgTLkLq.js} +1 -1
  246. package/dist/client/assets/synced-repos-DkDa4E03.js +1 -0
  247. package/dist/client/assets/{table-3nkTB4Np.js → table-BNlBwUw8.js} +1 -1
  248. package/dist/client/assets/{tabs-Z84fQLpa.js → tabs-DWl7SNDG.js} +1 -1
  249. package/dist/client/assets/{task-board-CIQEQ9gq.js → task-board-C6TTBmRS.js} +1 -1
  250. package/dist/client/assets/{task-route-BYXl_z5M.js → task-route-Bz3woGSP.js} +1 -1
  251. package/dist/client/assets/{task-status-B6zn5x63.js → task-status-CnFMIlt_.js} +1 -1
  252. package/dist/client/assets/taskboard-analytics-DoJw1Xfg.js +1 -0
  253. package/dist/client/assets/tasks-CIdMsSLJ.js +1 -0
  254. package/dist/client/assets/{tasks-3RHZzkFK.js → tasks-Cqz8mQiU.js} +2 -2
  255. package/dist/client/assets/{textarea-DmhWadvL.js → textarea-CufiKBr1.js} +1 -1
  256. package/dist/client/assets/thread-analytics-CC-_zVgm.js +1 -0
  257. package/dist/client/assets/thread-button-Ds-0KssI.js +1 -0
  258. package/dist/client/assets/{thread-intent-BuxfElu5.js → thread-intent-rbLXiRX-.js} +1 -1
  259. package/dist/client/assets/{thread-route-CmEEfnPs.js → thread-route-B3__WRb1.js} +1 -1
  260. package/dist/client/assets/thread-route-D_-4E_Qa.js +1 -0
  261. package/dist/client/assets/{thread-sheet-body-BpOJ-mpg.js → thread-sheet-body-C6Nvo-gY.js} +1 -1
  262. package/dist/client/assets/toggle-group-CEb1zCbt.js +1 -0
  263. package/dist/client/assets/toolbar-icon-button-B7ENG3u2.js +1 -0
  264. package/dist/client/assets/{tooltip-D_t5agRT.js → tooltip-Bdu4_ay-.js} +1 -1
  265. package/dist/client/assets/{track-CWcmFBdJ.js → track-DYcNrkYj.js} +1 -1
  266. package/dist/client/assets/{types-EnXetskt.js → types-C1lh-7rD.js} +3 -3
  267. package/dist/client/assets/{usage-stats-Gv-3x4Ta.js → usage-stats-C8kdutYl.js} +1 -1
  268. package/dist/client/assets/{use-ai-providers-BOtkBAHJ.js → use-ai-providers-DdvmCGxF.js} +1 -1
  269. package/dist/client/assets/{use-automations-C_H2RSDu.js → use-automations-By-N-e6c.js} +1 -1
  270. package/dist/client/assets/{use-autosave-CtwCn4lm.js → use-autosave-tkO4DMDZ.js} +1 -1
  271. package/dist/client/assets/use-connect-companion-CRgCDVPT.js +1 -0
  272. package/dist/client/assets/{use-connection-CK-5Lpbl.js → use-connection-CzhqmkxY.js} +1 -1
  273. package/dist/client/assets/{use-copy-CWcw9y0f.js → use-copy-D35bNj5j.js} +1 -1
  274. package/dist/client/assets/{use-create-virtual-mcp-0s6caXAs.js → use-create-virtual-mcp-DSS6KW-Y.js} +1 -1
  275. package/dist/client/assets/{use-date-fns-locale-DeGGdClH.js → use-date-fns-locale-B65-a3KP.js} +1 -1
  276. package/dist/client/assets/{use-debounced-autosave-l-fa5dGN.js → use-debounced-autosave-UCDN4Lw3.js} +1 -1
  277. package/dist/client/assets/{use-debounced-value-BAmcCwZ4.js → use-debounced-value-CWshbX7F.js} +1 -1
  278. package/dist/client/assets/{use-deco-credits-BAtSd5iZ.js → use-deco-credits-DTu_Qf20.js} +1 -1
  279. package/dist/client/assets/{use-decopilot-events-BzhXXQi3.js → use-decopilot-events-BvKgG5Ws.js} +1 -1
  280. package/dist/client/assets/{use-delete-connection-AWBlHZP0.js → use-delete-connection-1XhxmMPF.js} +1 -1
  281. package/dist/client/assets/{use-deployment-admin-sAUdKDqS.js → use-deployment-admin-DMXwbJU8.js} +1 -1
  282. package/dist/client/assets/{use-entitlements-Dql2buFj.js → use-entitlements-Da1bmf67.js} +1 -1
  283. package/dist/client/assets/{use-fast-preview-draft-url-BxezoKmd.js → use-fast-preview-draft-url-C7L3VsQn.js} +1 -1
  284. package/dist/client/assets/{use-file-configs-Dr0d27aT.js → use-file-configs-C7xVU8E2.js} +1 -1
  285. package/dist/client/assets/use-in-settings-icIKIpSR.js +1 -0
  286. package/dist/client/assets/{use-infinite-scroll-CAp6PiC0.js → use-infinite-scroll-7-m4dXi3.js} +1 -1
  287. package/dist/client/assets/{use-join-requests-CMqjWeBG.js → use-join-requests-D_x3dmzZ.js} +1 -1
  288. package/dist/client/assets/use-main-panel-tabs-B5g6e1MJ.js +1 -0
  289. package/dist/client/assets/{use-mcp-auth-status-CH7YPNve.js → use-mcp-auth-status-nDkEwx2c.js} +1 -1
  290. package/dist/client/assets/{use-mcp-client-DDIocHT6.js → use-mcp-client-CkjkRUta.js} +1 -1
  291. package/dist/client/assets/{use-mcp-prompts-D8MzpgAT.js → use-mcp-prompts-D2XJcis0.js} +1 -1
  292. package/dist/client/assets/{use-mcp-tools-CFGrhbrB.js → use-mcp-tools-DZlo67bQ.js} +1 -1
  293. package/dist/client/assets/{use-members-BtxsC9V3.js → use-members-CdPjttiy.js} +1 -1
  294. package/dist/client/assets/{use-mobile-CdzCnkMt.js → use-mobile-DVMuGaln.js} +1 -1
  295. package/dist/client/assets/{use-navigate-to-agent-CK2ojcHr.js → use-navigate-to-agent-BCcYux8q.js} +1 -1
  296. package/dist/client/assets/{use-open-billing-url-ptdTbbBm.js → use-open-billing-url-CJn1G7pV.js} +1 -1
  297. package/dist/client/assets/{use-org-auth-client-B2Mz39Ds.js → use-org-auth-client-D8dxsLtj.js} +1 -1
  298. package/dist/client/assets/{use-org-fs-B5SsMM_1.js → use-org-fs-3jzMRDSK.js} +1 -1
  299. package/dist/client/assets/{use-org-sso-Bg9XoWeE.js → use-org-sso-Bb_2_N0Z.js} +1 -1
  300. package/dist/client/assets/{use-organization-roles-Q61E1tJN.js → use-organization-roles-ixSaPxG5.js} +1 -1
  301. package/dist/client/assets/{use-organization-settings-DYk5FZJw.js → use-organization-settings-B0mobgxG.js} +1 -1
  302. package/dist/client/assets/{use-panel-navigate-wv77dcM5.js → use-panel-navigate-CjSWJCy4.js} +1 -1
  303. package/dist/client/assets/{use-project-native-view-presence-gzbdZMHU.js → use-project-native-view-presence-_PPun-xm.js} +1 -1
  304. package/dist/client/assets/{use-project-scope-DHDkFc-g.js → use-project-scope-CJnr8HCi.js} +1 -1
  305. package/dist/client/assets/{use-releases-h152tw9n.js → use-releases-CT-nVxtd.js} +1 -1
  306. package/dist/client/assets/{use-reports-diagnostic-DldYivxc.js → use-reports-diagnostic-AsJIEIvt.js} +1 -1
  307. package/dist/client/assets/{use-route-default-main-BWkjTfSK.js → use-route-default-main-CQGz2KW9.js} +1 -1
  308. package/dist/client/assets/{use-secrets-DQHJ4cVA.js → use-secrets-DgNcVRY9.js} +1 -1
  309. package/dist/client/assets/use-section-preview-base-mIL7vKdH.js +1 -0
  310. package/dist/client/assets/{use-session-runtime-D_Z0r9x6.js → use-session-runtime-B9eFlXyW.js} +1 -1
  311. package/dist/client/assets/{use-tags-DEpNJldS.js → use-tags-BM82Yu0K.js} +1 -1
  312. package/dist/client/assets/{use-task-board-analytics-Cw3-V-U_.js → use-task-board-analytics-D_ruF5p9.js} +1 -1
  313. package/dist/client/assets/{use-task-metadata-B8IWdSS_.js → use-task-metadata-qZ-qzNT-.js} +1 -1
  314. package/dist/client/assets/{use-thread-analytics-CW55-Xe0.js → use-thread-analytics-BcEpZDI1.js} +1 -1
  315. package/dist/client/assets/{use-thread-outputs-C4iYsVj1.js → use-thread-outputs-CIF4-tq_.js} +1 -1
  316. package/dist/client/assets/{use-virtual-mcp-CfvZlIda.js → use-virtual-mcp-BKP1YfD8.js} +1 -1
  317. package/dist/client/assets/useInfiniteQuery-DhVx-Xnv.js +1 -0
  318. package/dist/client/assets/{useQueries-Cd_bJN_E.js → useQueries-CbuhlNe5.js} +1 -1
  319. package/dist/client/assets/useSuspenseInfiniteQuery-CB90sByh.js +1 -0
  320. package/dist/client/assets/{users-DHJxjXSq.js → users-CDy-vhRi.js} +1 -1
  321. package/dist/client/assets/{utils-DMlJ8ARz.js → utils-VRidfAJX.js} +1 -1
  322. package/dist/client/assets/{variant-calendar-DghqPTU4.js → variant-calendar-C5Yhhu_f.js} +1 -1
  323. package/dist/client/assets/{variant-matcher-override-BL815r4E.js → variant-matcher-override-NRDTBNQG.js} +1 -1
  324. package/dist/client/assets/view-mode-toggle-P-VmNhrj.js +1 -0
  325. package/dist/client/assets/{virtual-mcp-CcUa7C54.js → virtual-mcp-DXr1jTLu.js} +1 -1
  326. package/dist/client/index.html +2 -2
  327. package/dist/server/cli.js +6 -6
  328. package/dist/server/server.js +6 -6
  329. package/package.json +1 -1
  330. package/dist/client/assets/agent-analytics-5H0k6n1D.js +0 -2
  331. package/dist/client/assets/agent-app-Cw9tbDuz.js +0 -1
  332. package/dist/client/assets/agent-assets-YP1dibLm.js +0 -1
  333. package/dist/client/assets/agent-automation-Bp39QN0z.js +0 -20
  334. package/dist/client/assets/agent-automations-CcIjwuOa.js +0 -1
  335. package/dist/client/assets/agent-connect-sources-gwlJwqxl.js +0 -1
  336. package/dist/client/assets/agent-deck-DjA8jeH7.js +0 -1
  337. package/dist/client/assets/agent-e2e-BiBmSSMh.js +0 -1
  338. package/dist/client/assets/agent-experiments-C0aMSCki.js +0 -1
  339. package/dist/client/assets/agent-file-C8oUDbru.js +0 -1
  340. package/dist/client/assets/agent-hosting-CrRHqit9.js +0 -1
  341. package/dist/client/assets/agent-library-file-DHksNut0.js +0 -1
  342. package/dist/client/assets/agent-monitor-BfRZolsZ.js +0 -1
  343. package/dist/client/assets/agent-overview-B71w2k7g.js +0 -1
  344. package/dist/client/assets/agent-settings-DLjV3KWn.js +0 -1
  345. package/dist/client/assets/agent-site-editor-code-HV34X_yY.js +0 -2
  346. package/dist/client/assets/agent-site-editor-content-BcZDuxlX.js +0 -9
  347. package/dist/client/assets/agent-site-editor-preview-B9JYzQCZ.js +0 -518
  348. package/dist/client/assets/agent-view-BTwtHRZF.js +0 -1
  349. package/dist/client/assets/agents-list-BOyqXgKJ.js +0 -1
  350. package/dist/client/assets/analytics-sections-DtS7EZgf.js +0 -1
  351. package/dist/client/assets/api-keys-CuyD-Z5R.js +0 -1
  352. package/dist/client/assets/api-keys-DrMp2tSJ.js +0 -1
  353. package/dist/client/assets/app-editor-CIFNTD8w.js +0 -1
  354. package/dist/client/assets/auth-entry-Bt2xP80T.js +0 -1
  355. package/dist/client/assets/block-document-B66z-LAv.js +0 -3
  356. package/dist/client/assets/breadcrumb-CTYBDQ2Q.js +0 -1
  357. package/dist/client/assets/category-editor-BzKSt8vB.js +0 -1
  358. package/dist/client/assets/collection-detail-CNH0TqEJ.js +0 -1
  359. package/dist/client/assets/collection-tabs-B6d-4IcJ.js +0 -1
  360. package/dist/client/assets/command-BNNuUVzL.js +0 -1
  361. package/dist/client/assets/connect-B67H5sTV.js +0 -8
  362. package/dist/client/assets/connection-detail-CGeE1NL9.js +0 -1
  363. package/dist/client/assets/connections-JoHYlluM.js +0 -1
  364. package/dist/client/assets/dialog-DP1MSxJH.js +0 -1
  365. package/dist/client/assets/discover-BV0HsgaI.js +0 -1
  366. package/dist/client/assets/file-share-button-rEL9QTqo.js +0 -3
  367. package/dist/client/assets/home-D2-wyRKJ.js +0 -1
  368. package/dist/client/assets/index-Cba7I4uA.js +0 -26
  369. package/dist/client/assets/index-DK8MJmup.js +0 -1
  370. package/dist/client/assets/index-DQQ8_5-n.css +0 -1
  371. package/dist/client/assets/index-g9QoTWAS.js +0 -1
  372. package/dist/client/assets/index-redirect-Cl6Yu5tU.js +0 -1
  373. package/dist/client/assets/index-xK_UxIbV.js +0 -5
  374. package/dist/client/assets/input-BpZKxjG2.js +0 -8
  375. package/dist/client/assets/library-B502b1z4.js +0 -161
  376. package/dist/client/assets/members-BoGXKcke.js +0 -1
  377. package/dist/client/assets/message-templates-D0vFWbXr.js +0 -1
  378. package/dist/client/assets/mock-board-CLLyx2N9.js +0 -10
  379. package/dist/client/assets/multi-select--1a2IkR7.js +0 -1
  380. package/dist/client/assets/org-file-open-context-BGwxOJ5f.js +0 -1
  381. package/dist/client/assets/page-seo-form-C1Rgy6PR.js +0 -1
  382. package/dist/client/assets/profile-r8hRIBVU.js +0 -1
  383. package/dist/client/assets/project-feed-DminiBzl.js +0 -1
  384. package/dist/client/assets/project-reports-JmbfgpKz.js +0 -1
  385. package/dist/client/assets/project-tasks-2GTKjWCp.js +0 -1
  386. package/dist/client/assets/record-editor-B-ETGxA0.js +0 -1
  387. package/dist/client/assets/reports-Dd7XY9fp.js +0 -1
  388. package/dist/client/assets/reports-tab-CoNw5u9A.js +0 -2
  389. package/dist/client/assets/require-capability-3QFnbaVg.js +0 -1
  390. package/dist/client/assets/roles-CesqgDGr.js +0 -1
  391. package/dist/client/assets/route-BXF3hfx7.js +0 -1
  392. package/dist/client/assets/route-CH1X1P-P.js +0 -1
  393. package/dist/client/assets/route-page-header-BHR-ItxW.js +0 -1
  394. package/dist/client/assets/route-utJJlEy1.js +0 -1
  395. package/dist/client/assets/runnable-block-editor-D_EKjpsM.js +0 -17
  396. package/dist/client/assets/secrets-CTexxl38.js +0 -1
  397. package/dist/client/assets/sections-editor-8OIVL9zx.js +0 -1
  398. package/dist/client/assets/select-model-baGNpvTB.js +0 -1
  399. package/dist/client/assets/settings-tab-DSJnx2cf.js +0 -5
  400. package/dist/client/assets/shell-layout-PUnaTk6G.js +0 -1
  401. package/dist/client/assets/sidebar-gH44_aFR.js +0 -1
  402. package/dist/client/assets/skills-CEarjmfu.js +0 -1
  403. package/dist/client/assets/synced-repos-B5N_C_En.js +0 -1
  404. package/dist/client/assets/taskboard-analytics-BDhMfBmv.js +0 -1
  405. package/dist/client/assets/tasks-L4O6RNHu.js +0 -1
  406. package/dist/client/assets/thread-analytics-CWolaSZq.js +0 -1
  407. package/dist/client/assets/thread-button-C353BNO6.js +0 -1
  408. package/dist/client/assets/thread-route-Bx6eqAUQ.js +0 -1
  409. package/dist/client/assets/toggle-group-WpqscYaw.js +0 -1
  410. package/dist/client/assets/toolbar-icon-button-DAFKD_pK.js +0 -1
  411. package/dist/client/assets/use-connect-companion-v6osDnhK.js +0 -1
  412. package/dist/client/assets/use-in-settings-BA5Od6zt.js +0 -1
  413. package/dist/client/assets/use-main-panel-tabs-CtoMsbfs.js +0 -1
  414. package/dist/client/assets/use-section-preview-base-CdEeBhgs.js +0 -1
  415. package/dist/client/assets/useInfiniteQuery-DfdWdULq.js +0 -1
  416. package/dist/client/assets/useSuspenseInfiniteQuery-ByyP6gL-.js +0 -1
  417. package/dist/client/assets/view-mode-toggle-Czn_wQOw.js +0 -1
@@ -0,0 +1 @@
1
+ import{c as k,b as z,j as n,U as wt,r as T,V as ps,P as xs,X as B,l as O,B as De,Y as gs,Z as Ne,_ as Re,q as V,a as ee,d as we,$ as hs,x as _t,t as re,a0 as bs,a1 as js,p as Qe,a2 as $t,a3 as Ct,o as Pt,e as vs,K as Me,y as ys,a4 as Ss,m as et,a5 as ks,w as Ns,L as It,a6 as D,J as de,a7 as tt,a8 as ws,a9 as pt,aa as _s,ab as $s,ac as Cs,ad as Ps,ae as Is,af as zs,ag as Ts,ah as As,ai as Os,f as Rs,k as Ds,aj as Ms,ak as Es,E as Ls,u as Fs,O as qs}from"./index-De5sr9zh.js";import{u as Ve,S as Bs,a as Vs,b as Ks,c as le,d as q,e as oe,f as Je,g as Ws,h as Us,i as zt}from"./use-in-settings-icIKIpSR.js";import{S as Hs,a as Gs,b as Qs}from"./sheet-Kja83qKC.js";import{u as st}from"./use-mobile-DVMuGaln.js";import{S as Js,a as Tt}from"./thread-button-Ds-0KssI.js";import{u as Xs,L as te,i as At}from"./shell-layout-ynqF32RZ.js";import{u as Se,a as Ke,b as Ot}from"./use-project-scope-CJnr8HCi.js";import{u as Ys}from"./thread-route-B3__WRb1.js";import{P as nt,a as We,b as ot}from"./popover-DCaw39mN.js";import{D as Rt,a as Dt,b as Mt,c as Zs}from"./drawer-mNZA6mOf.js";import{A as Ee}from"./avatar-B6HmPhM4.js";import{T as it,a as at,b as en,c as rt}from"./tooltip-Bdu4_ay-.js";import{a as tn}from"./Copy01-B2GuMU9Q.js";import{n as sn}from"./Eye-BhTmzCKr.js";import{t as nn,i as Xe,a as on,b as an,c as rn,d as ln,e as Et,s as lt,f as cn,A as dn,g as un,n as Lt,h as Ft,j as mn,k as fn,l as pn,m as xn,o as gn,p as hn}from"./agent-icon-CjNFk4Bw.js";import{i as bn,a as jn}from"./Share07-D6XgmppM.js";import{n as qt}from"./LinkExternal01-Bo5cppL4.js";import{i as Bt}from"./Monitor01-Cj93oSbT.js";import{n as vn,a as yn}from"./Sun-Dy_rDhHe.js";import{a as Vt,i as Sn,t as kn}from"./Tool01-BoO1X0ZH.js";import{u as Nn}from"./use-deployment-admin-DMXwbJU8.js";import{u as wn}from"./use-is-desktop-app-BNujXJc_.js";import{i as _n,a as xt,D as $n}from"./download-app-dialog-fmWolHKD.js";import{I as Cn,u as Pn}from"./use-join-requests-D_x3dmzZ.js";import{u as In}from"./use-deco-credits-DTu_Qf20.js";import{u as zn,a as Kt}from"./use-entitlements-Da1bmf67.js";import{u as Tn,P as An}from"./plan-ladder-D85oNnSr.js";import{u as On}from"./use-organization-settings-B0mobgxG.js";import{S as Rn}from"./scroll-area-Ca9Mo_QH.js";import{u as Dn}from"./useInfiniteQuery-DhVx-Xnv.js";import{n as Mn}from"./hooks-CcmbiBeQ.js";import{t as Wt,S as En,b as Ln,p as Fn,a as qn,i as Bn,c as Vn,d as Kn}from"./task-route-Bz3woGSP.js";import{g as Wn}from"./get-initials-D-f_fDFw.js";import{a as Un}from"./format-time-BtXRrtv4.js";import{i as Ut}from"./LayoutLeft-CuG2yJZR.js";import{I as Hn,T as Ht}from"./toolbar-icon-button-B7ENG3u2.js";import{i as Le}from"./Check-C-Vn17o5.js";import{s as Gt}from"./Plus-Ch1uJBgh.js";import{C as gt,a as Oe,b as Fe,c as Gn,d as Qn,e as Jn}from"./command-vKgGCoFF.js";import{P as ct}from"./project-icon-CXM68zVZ.js";import{C as Xn}from"./create-organization-dialog-BCpMYw7e.js";import{s as Yn,c as Zn}from"./XClose-Dvx_qcsQ.js";import{u as eo}from"./use-virtual-mcp-BKP1YfD8.js";import{i as to}from"./ArrowLeft-Bpb3sor7.js";import{u as so}from"./use-thread-analytics-BcEpZDI1.js";import{e as no,r as Qt,u as oo,s as io,p as ao,P as ro}from"./use-project-native-view-presence-_PPun-xm.js";import{u as Jt}from"./optimistic-project-sidebar-views-CgB8Gy1s.js";import{u as dt}from"./use-navigate-to-agent-BCcYux8q.js";import{a as lo}from"./Image01-D02_x5mu.js";import{u as co}from"./use-panel-navigate-CjSWJCy4.js";import{R as uo}from"./repository-import-picker-BXQhU82J.js";import{t as mo}from"./ChevronUp-Dto8qCq2.js";import{t as fo}from"./Globe04-BLoVxWaz.js";import{i as po}from"./CreditCard01-CoMSE38C.js";import{i as xo}from"./Key01-BuudAO_W.js";import{s as go}from"./User01-gmEyKvLo.js";import{i as ho}from"./Zap-DkS3ccHw.js";import{p as bo,q as jo}from"./question-004-sINsf4GQ.js";import{u as vo}from"./use-decopilot-events-BvKgG5Ws.js";import"./X-CEngH8b7.js";import"./use-route-default-main-CQGz2KW9.js";import"./UserSquare-DXqYCX9F.js";import"./CheckCircle-CyKBJceB.js";import"./dialog-CEiE0rPQ.js";import"./integration-icon-CsYMgjoT.js";import"./use-mcp-client-CkjkRUta.js";import"./auth-Dafjkfpj.js";import"./required-auth-layout-scRrBHKS.js";import"./autosend-DeYn5nkP.js";import"./use-org-sso-Bb_2_N0Z.js";import"./github-repo-BknN0SVI.js";import"./index-DVgj8U7g.js";import"./AlertCircle-D1gV07Oe.js";import"./ArrowUp-COLR6KTW.js";import"./ArrowRight-BFyYdKNd.js";import"./ZoomOut-D3wne5dx.js";import"./DotsVertical-R1tuLE9v.js";import"./Link01-CVUd8ZSz.js";import"./Palette-CEa7GqA9.js";import"./SearchMd-B_MXZ22A.js";import"./Trash01-D4CwdSy9.js";import"./Upload01-hQyKBWZL.js";import"./Users01-BBb4-Wbt.js";import"./form-CCT2OtgN.js";import"./label-Baft7ecp.js";import"./select-BZ6sktb7.js";import"./textarea-CufiKBr1.js";import"./use-org-auth-client-D8dxsLtj.js";import"./use-organization-roles-ixSaPxG5.js";import"./use-ai-providers-DdvmCGxF.js";import"./schema-DkZUkArz.js";import"./task-board-C6TTBmRS.js";import"./infiniteQueryObserver-CwgE9ndj.js";import"./backoff-8mStPHYB.js";import"./differenceInSeconds-C3x8sHUj.js";import"./index-Kwx27vNK.js";import"./alert-dialog-DpzgB-Ls.js";import"./input-B-DIEGoS.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-C7xVU8E2.js";import"./site-slug-DebpOoQq.js";import"./thread-intent-rbLXiRX-.js";import"./slugify-CEUa2lfQ.js";import"./repository-picker-D1hSYB_G.js";import"./github-icon-BpCOzzV8.js";import"./collection-search-kj64tBFw.js";import"./use-debounced-value-CWshbX7F.js";function ie(){const{state:t,isMobile:e}=Ve();return t==="collapsed"&&!e}function yo(t){const e=k.c(15),{width:s,minWidth:i,maxWidth:o,onPointerDown:a,onKeyDown:r,onDoubleClick:l}=t,c=z(),{isMobile:d}=Ve(),u=ie();if(d||u)return null;let m;e[0]!==c?(m=c("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=c,e[1]=m):m=e[1];let f;e[2]!==c?(f=c("sidebar.sidebarResizeHandle.title"),e[2]=c,e[3]=f):f=e[3];let p,x;e[4]===Symbol.for("react.memo_cache_sentinel")?(p={left:"var(--sidebar-width)"},x=n.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border group-focus-visible/resize:bg-ring"}),e[4]=p,e[5]=x):(p=e[4],x=e[5]);let h;return e[6]!==o||e[7]!==i||e[8]!==l||e[9]!==r||e[10]!==a||e[11]!==m||e[12]!==f||e[13]!==s?(h=n.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":m,"aria-valuenow":s,"aria-valuemin":i,"aria-valuemax":o,title:f,tabIndex:0,onPointerDown:a,onKeyDown:r,onDoubleClick:l,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize focus-visible:outline-none",style:p,children:x}),e[6]=o,e[7]=i,e[8]=l,e[9]=r,e[10]=a,e[11]=m,e[12]=f,e[13]=s,e[14]=h):h=e[14],h}const Ye=400,ht=16,So="sidebar.width";function ko(){const t=k.c(14),e=No;let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=x=>typeof x=="number"?e(x):224,t[0]=s):s=t[0];const[i,o]=wt(So,s),a=T.useRef(null);let r;t[1]!==o||t[2]!==i?(r=x=>{x.preventDefault();const h=x.clientX,b=e(i),g=a.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),v=g?Array.from(g.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const S of v)S.style.transition="none";const j=S=>{const N=e(b+(S.clientX-h));g?.style.setProperty("--sidebar-width",`${N}px`)},y=S=>{const N=e(b+(S.clientX-h));o(N);for(const w of v)w.style.transition="";window.removeEventListener("pointermove",j),window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",j),window.addEventListener("pointerup",y),window.addEventListener("pointercancel",y)},t[1]=o,t[2]=i,t[3]=r):r=t[3];const l=r;let c;t[4]!==o?(c=()=>{o(224)},t[4]=o,t[5]=c):c=t[5];const d=c;let u;t[6]!==o||t[7]!==i?(u=x=>{if(x.key==="ArrowLeft")o(e(i-ht));else if(x.key==="ArrowRight")o(e(i+ht));else if(x.key==="Home")o(224);else if(x.key==="End")o(Ye);else return;x.preventDefault()},t[6]=o,t[7]=i,t[8]=u):u=t[8];const m=u,f=e(i);let p;return t[9]!==m||t[10]!==l||t[11]!==d||t[12]!==f?(p={width:f,minWidth:224,maxWidth:Ye,wrapperRef:a,onStartResize:l,onKeyDownResize:m,resetWidth:d},t[9]=m,t[10]=l,t[11]=d,t[12]=f,t[13]=p):p=t[13],p}function No(t){return Math.max(224,Math.min(Ye,t))}const Xt=T.createContext(null);function wo(){const t=T.use(Xt);if(!t)throw new Error("Layout regions require a Layout");return t}function _o({children:t,notice:e}){const s=st(),[i,o]=wt(ps.sidebarOpen(),!0),a=ko();return n.jsx(Xt,{value:{isMobile:s,resize:a},children:n.jsx(Bs,{open:i,onOpenChange:o,children:n.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[e,n.jsx(Vs,{ref:a.wrapperRef,className:"flex-1 bg-sidebar relative min-h-0",style:{"--sidebar-width":`${a.width}px`,"--sidebar-width-icon":"3.25rem"},children:n.jsx(Js,{children:t})})]})})})}function $o(t){const e=k.c(26),{children:s,renderMobile:i}=t,o=z(),{isMobile:a,resize:r}=wo(),{openMobile:l,setOpenMobile:c}=Ve();if(!a){let h;e[0]!==r.maxWidth||e[1]!==r.minWidth||e[2]!==r.onKeyDownResize||e[3]!==r.onStartResize||e[4]!==r.resetWidth||e[5]!==r.width?(h=n.jsx(yo,{width:r.width,minWidth:r.minWidth,maxWidth:r.maxWidth,onPointerDown:r.onStartResize,onKeyDown:r.onKeyDownResize,onDoubleClick:r.resetWidth}),e[0]=r.maxWidth,e[1]=r.minWidth,e[2]=r.onKeyDownResize,e[3]=r.onStartResize,e[4]=r.resetWidth,e[5]=r.width,e[6]=h):h=e[6];let b;return e[7]!==s||e[8]!==h?(b=n.jsxs(n.Fragment,{children:[s,h]}),e[7]=s,e[8]=h,e[9]=b):b=e[9],b}let d;e[10]!==o?(d=o("layouts.shellControls.navigationTitle"),e[10]=o,e[11]=d):d=e[11];let u;e[12]!==d?(u=n.jsx(Hs,{className:"sr-only",children:d}),e[12]=d,e[13]=u):u=e[13];let m;e[14]!==c?(m=()=>c(!1),e[14]=c,e[15]=m):m=e[15];let f;e[16]!==i||e[17]!==m?(f=i({onClose:m}),e[16]=i,e[17]=m,e[18]=f):f=e[18];let p;e[19]!==u||e[20]!==f?(p=n.jsxs(Gs,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",children:[u,f]}),e[19]=u,e[20]=f,e[21]=p):p=e[21];let x;return e[22]!==l||e[23]!==c||e[24]!==p?(x=n.jsx(Qs,{open:l,onOpenChange:c,children:p}),e[22]=l,e[23]=c,e[24]=p,e[25]=x):x=e[25],x}function Co(t){const e=k.c(3),{children:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={background:"transparent",containerType:"inline-size"},e[0]=i):i=e[0];let o;return e[1]!==s?(o=n.jsx(Ks,{className:"flex flex-col min-h-0",style:i,children:n.jsx(xs,{variant:"plain",className:"bg-sidebar",children:n.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s})})}),e[1]=s,e[2]=o):o=e[2],o}const Ge=Object.assign(_o,{Sidebar:$o,Content:Co});function Po(){const t=k.c(19),{org:e}=B(),{data:s}=Xs(e.slug);if(!s)return null;const i=s.severity==="block",o=i?"border-destructive/25 bg-destructive/5 text-destructive":"border-warning/40 bg-warning/10 text-foreground";let a;t[0]!==o?(a=O("flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1 border-b px-4 py-2 text-sm",o),t[0]=o,t[1]=a):a=t[1];const r=i?void 0:"text-warning";let l;t[2]!==r?(l=O("size-4 shrink-0",r),t[2]=r,t[3]=l):l=t[3];let c;t[4]!==l?(c=n.jsx(gs,{className:l}),t[4]=l,t[5]=c):c=t[5];let d;t[6]!==s.title?(d=n.jsx("span",{className:"font-medium",children:s.title}),t[6]=s.title,t[7]=d):d=t[7];let u;t[8]!==s.message?(u=n.jsx("span",{className:"min-w-0 flex-1 text-muted-foreground",children:s.message}),t[8]=s.message,t[9]=u):u=t[9];let m;t[10]!==s.ctaLabel||t[11]!==s.ctaUrl?(m=s.ctaUrl&&s.ctaLabel?n.jsx(De,{size:"sm",variant:"outline",asChild:!0,children:n.jsx("a",{href:s.ctaUrl,target:"_blank",rel:"noreferrer noopener",children:s.ctaLabel})}):null,t[10]=s.ctaLabel,t[11]=s.ctaUrl,t[12]=m):m=t[12];let f;return t[13]!==a||t[14]!==c||t[15]!==d||t[16]!==u||t[17]!==m?(f=n.jsxs("div",{role:"alert",className:a,children:[c,d,u,m]}),t[13]=a,t[14]=c,t[15]=d,t[16]=u,t[17]=m,t[18]=f):f=t[18],f}function Io(){const t=k.c(4),{setScope:e}=Se(),s=Ys(),i=Ne();let o;return t[0]!==i||t[1]!==s||t[2]!==e?(o=()=>{const a=s!==void 0?"route_resolves_scope":Re(i,null)?null:"route_needs_scope";V("scope_cleared",{relocated:a!==null,reason:a}),e(null)},t[0]=i,t[1]=s,t[2]=e,t[3]=o):o=t[3],o}const qe="size-4 shrink-0";function ut(t){const e=k.c(5),{children:s,className:i}=t;let o;e[0]!==i?(o=O("flex w-4 shrink-0 items-center justify-center",i),e[0]=i,e[1]=o):o=e[1];let a;return e[2]!==s||e[3]!==o?(a=n.jsx("span",{className:o,children:s}),e[2]=s,e[3]=o,e[4]=a):a=e[4],a}function ye(t){const e=k.c(26),{item:s,onClose:i}=t;let o;e[0]!==s.className?(o=O("flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",s.className),e[0]=s.className,e[1]=o):o=e[1];const a=o;if(s.href){const u=s.external?"_blank":void 0,m=s.external?"noopener noreferrer":void 0;let f;e[2]!==s.icon?(f=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:s.icon}),e[2]=s.icon,e[3]=f):f=e[3];let p;e[4]!==s.label?(p=n.jsx("span",{className:"flex-1",children:s.label}),e[4]=s.label,e[5]=p):p=e[5];let x;return e[6]!==a||e[7]!==s.href||e[8]!==i||e[9]!==u||e[10]!==m||e[11]!==f||e[12]!==p?(x=n.jsxs("a",{href:s.href,target:u,rel:m,className:a,onClick:i,children:[f,p]}),e[6]=a,e[7]=s.href,e[8]=i,e[9]=u,e[10]=m,e[11]=f,e[12]=p,e[13]=x):x=e[13],x}let r;e[14]!==s||e[15]!==i?(r=()=>{s.onClick?.(),i()},e[14]=s,e[15]=i,e[16]=r):r=e[16];let l;e[17]!==s.icon?(l=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:s.icon}),e[17]=s.icon,e[18]=l):l=e[18];let c;e[19]!==s.label?(c=n.jsx("span",{className:"flex-1",children:s.label}),e[19]=s.label,e[20]=c):c=e[20];let d;return e[21]!==a||e[22]!==r||e[23]!==l||e[24]!==c?(d=n.jsxs("button",{type:"button",onClick:r,className:a,children:[l,c]}),e[21]=a,e[22]=r,e[23]=l,e[24]=c,e[25]=d):d=e[25],d}function zo(){const t=k.c(4),e=z();let s;t[0]!==e?(s=e("common.accountPopover.impersonating"),t[0]=e,t[1]=s):s=t[1];let i;return t[2]!==s?(i=n.jsx("span",{className:"shrink-0 inline-flex items-center rounded-full bg-warning/10 px-2 py-0.5 text-[10px] font-medium text-warning",children:s}),t[2]=s,t[3]=i):i=t[3],i}function bt(t){const e=k.c(38),{user:s,userImage:i,isImpersonating:o,isMobile:a}=t,r=z(),l=a?"py-4 border-b border-border":"py-3 mx-1 mt-1";let c;e[0]!==l?(c=O("flex items-center gap-3 px-4",l),e[0]=l,e[1]=c):c=e[1];const d=s?.name??"U";let u;e[2]!==d||e[3]!==i?(u=n.jsx(Ee,{url:i,fallback:d,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=d,e[3]=i,e[4]=u):u=e[4];let m;e[5]!==r||e[6]!==s?.name?(m=s?.name??r("common.accountPopover.defaultUserName"),e[5]=r,e[6]=s?.name,e[7]=m):m=e[7];let f;e[8]!==m?(f=n.jsx("p",{className:"text-sm font-medium truncate",children:m}),e[8]=m,e[9]=f):f=e[9];let p;e[10]!==o?(p=o&&n.jsx(zo,{}),e[10]=o,e[11]=p):p=e[11];let x;e[12]!==f||e[13]!==p?(x=n.jsxs("div",{className:"flex items-center gap-2",children:[f,p]}),e[12]=f,e[13]=p,e[14]=x):x=e[14];const h=s?.email;let b;e[15]!==h?(b=n.jsx("p",{className:"text-xs text-muted-foreground truncate",children:h}),e[15]=h,e[16]=b):b=e[16];let g;e[17]!==b||e[18]!==x?(g=n.jsxs("div",{className:"flex-1 min-w-0",children:[x,b]}),e[17]=b,e[18]=x,e[19]=g):g=e[19];let v;e[20]!==r||e[21]!==s?(v=()=>{s?.id&&navigator.clipboard.writeText(s.id).then(()=>{re.success(r("common.accountPopover.userIdCopied"))})},e[20]=r,e[21]=s,e[22]=v):v=e[22];let j;e[23]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(tn,{size:14}),e[23]=j):j=e[23];let y;e[24]!==v?(y=n.jsx(it,{asChild:!0,children:n.jsx("button",{type:"button",tabIndex:-1,onClick:v,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:j})}),e[24]=v,e[25]=y):y=e[25];let S;e[26]!==r?(S=r("common.accountPopover.copyUserId"),e[26]=r,e[27]=S):S=e[27];let N;e[28]!==S?(N=n.jsx(at,{side:"right",children:n.jsx("p",{className:"text-xs",children:S})}),e[28]=S,e[29]=N):N=e[29];let w;e[30]!==y||e[31]!==N?(w=n.jsx(en,{delayDuration:300,children:n.jsxs(rt,{children:[y,N]})}),e[30]=y,e[31]=N,e[32]=w):w=e[32];let _;return e[33]!==g||e[34]!==w||e[35]!==c||e[36]!==u?(_=n.jsxs("div",{className:c,children:[u,g,w]}),e[33]=g,e[34]=w,e[35]=c,e[36]=u,e[37]=_):_=e[37],_}function jt(t){const e=k.c(35),{themeOptions:s,preferences:i,setPreferences:o,isMobile:a}=t,r=z(),l=a?"size-8":"size-7",c=a?"px-3 py-3":"px-2 py-1.5";let d;e[0]!==c?(d=O("flex items-center justify-between border-t border-border/50",c),e[0]=c,e[1]=d):d=e[1];let u;if(e[2]!==l||e[3]!==i.theme||e[4]!==o||e[5]!==s){let S;e[7]!==l||e[8]!==i.theme||e[9]!==o?(S=N=>{const{value:w,icon:_,label:$}=N;return n.jsx("button",{type:"button","aria-label":$,onClick:()=>o(C=>({...C,theme:w})),className:O(l,"rounded-lg flex items-center justify-center transition-colors",i.theme===w?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:_},w)},e[7]=l,e[8]=i.theme,e[9]=o,e[10]=S):S=e[10],u=s.map(S),e[2]=l,e[3]=i.theme,e[4]=o,e[5]=s,e[6]=u}else u=e[6];let m;e[11]!==u?(m=n.jsx("div",{className:"flex items-center gap-0.5",children:u}),e[11]=u,e[12]=m):m=e[12];let f;e[13]!==i.enableSounds||e[14]!==r?(f=i.enableSounds?r("common.accountPopover.disableSounds"):r("common.accountPopover.enableSounds"),e[13]=i.enableSounds,e[14]=r,e[15]=f):f=e[15];let p;e[16]!==o?(p=()=>o(To),e[16]=o,e[17]=p):p=e[17];const x=i.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let h;e[18]!==l||e[19]!==x?(h=O(l,"rounded-lg flex items-center justify-center transition-colors",x),e[18]=l,e[19]=x,e[20]=h):h=e[20];let b;e[21]!==i.enableSounds?(b=i.enableSounds?n.jsx(an,{size:14}):n.jsx(rn,{size:14}),e[21]=i.enableSounds,e[22]=b):b=e[22];let g;e[23]!==f||e[24]!==p||e[25]!==h||e[26]!==b?(g=n.jsx("button",{type:"button","aria-label":f,onClick:p,className:h,children:b}),e[23]=f,e[24]=p,e[25]=h,e[26]=b,e[27]=g):g=e[27];let v;e[28]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.401.0"]}),e[28]=v):v=e[28];let j;e[29]!==g?(j=n.jsxs("div",{className:"flex items-center gap-2",children:[g,v]}),e[29]=g,e[30]=j):j=e[30];let y;return e[31]!==j||e[32]!==d||e[33]!==m?(y=n.jsxs("div",{className:d,children:[m,j]}),e[31]=j,e[32]=d,e[33]=m,e[34]=y):y=e[34],y}function To(t){return{...t,enableSounds:!t.enableSounds}}function vt(t){const e=k.c(54),{user:s,userImage:i,menuItems:o,signOutItem:a,stopImpersonatingItem:r,isImpersonating:l,themeOptions:c,preferences:d,setPreferences:u,close:m,isMobile:f}=t;if(f){let y;e[0]!==l||e[1]!==s||e[2]!==i?(y=n.jsx(bt,{user:s,userImage:i,isImpersonating:l,isMobile:!0}),e[0]=l,e[1]=s,e[2]=i,e[3]=y):y=e[3];let S;if(e[4]!==m||e[5]!==o){let I;e[7]!==m?(I=R=>n.jsx(ye,{item:R,onClose:m},R.key),e[7]=m,e[8]=I):I=e[8],S=o.map(I),e[4]=m,e[5]=o,e[6]=S}else S=e[6];let N;e[9]!==m||e[10]!==r?(N=r&&n.jsx(ye,{item:r,onClose:m}),e[9]=m,e[10]=r,e[11]=N):N=e[11];let w;e[12]!==m||e[13]!==a?(w=n.jsx(ye,{item:a,onClose:m}),e[12]=m,e[13]=a,e[14]=w):w=e[14];let _;e[15]!==S||e[16]!==N||e[17]!==w?(_=n.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:n.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[S,N,w]})}),e[15]=S,e[16]=N,e[17]=w,e[18]=_):_=e[18];let $;e[19]!==d||e[20]!==u||e[21]!==c?($=n.jsx(jt,{themeOptions:c,preferences:d,setPreferences:u,isMobile:!0}),e[19]=d,e[20]=u,e[21]=c,e[22]=$):$=e[22];let C;return e[23]!==y||e[24]!==_||e[25]!==$?(C=n.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[y,_,$]}),e[23]=y,e[24]=_,e[25]=$,e[26]=C):C=e[26],C}let p;e[27]!==l||e[28]!==s||e[29]!==i?(p=n.jsx(bt,{user:s,userImage:i,isImpersonating:l,isMobile:!1}),e[27]=l,e[28]=s,e[29]=i,e[30]=p):p=e[30];let x;if(e[31]!==m||e[32]!==o){let y;e[34]!==m?(y=S=>n.jsx(ye,{item:S,onClose:m},S.key),e[34]=m,e[35]=y):y=e[35],x=o.map(y),e[31]=m,e[32]=o,e[33]=x}else x=e[33];let h;e[36]!==m||e[37]!==r?(h=r&&n.jsx(ye,{item:r,onClose:m}),e[36]=m,e[37]=r,e[38]=h):h=e[38];let b;e[39]!==m||e[40]!==a?(b=n.jsx(ye,{item:a,onClose:m}),e[39]=m,e[40]=a,e[41]=b):b=e[41];let g;e[42]!==x||e[43]!==h||e[44]!==b?(g=n.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[x,h,b]}),e[42]=x,e[43]=h,e[44]=b,e[45]=g):g=e[45];let v;e[46]!==d||e[47]!==u||e[48]!==c?(v=n.jsx(jt,{themeOptions:c,preferences:d,setPreferences:u,isMobile:!1}),e[46]=d,e[47]=u,e[48]=c,e[49]=v):v=e[49];let j;return e[50]!==p||e[51]!==g||e[52]!==v?(j=n.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:n.jsxs("div",{className:"flex flex-col",children:[p,g,v]})}),e[50]=p,e[51]=g,e[52]=v,e[53]=j):j=e[53],j}function Ze(){const t=k.c(107),e=z(),{data:s}=ee.useSession(),{org:i}=B(),o=we();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/shell/$org",shouldThrow:!1},t[0]=a):a=t[0];const l=hs(a)?.params.org,[c,d]=_t(),u=st(),{isAdmin:m}=Nn(),f=wn(),[p,x]=T.useState(!1),[h,b]=T.useState(!1),g=s?.user,v=g?.image,j=!!s?.session?.impersonatedBy;let y;t[1]===Symbol.for("react.memo_cache_sentinel")?(y=()=>x(!1),t[1]=y):y=t[1];const S=y;let N;t[2]!==e?(N=e("common.accountPopover.preferences"),t[2]=e,t[3]=N):N=t[3];let w;t[4]===Symbol.for("react.memo_cache_sentinel")?(w=n.jsx(Vt,{size:16}),t[4]=w):w=t[4];let _;t[5]!==o||t[6]!==l?(_=()=>{o({to:"/$org/settings/profile",params:{org:l??""}})},t[5]=o,t[6]=l,t[7]=_):_=t[7];let $;t[8]!==N||t[9]!==_?($={key:"preferences",label:N,icon:w,onClick:_},t[8]=N,t[9]=_,t[10]=$):$=t[10];let C;t[11]!==i||t[12]!==o?(C=i?[{key:"connect-clients",label:"Connect to Agents",icon:n.jsx(qt,{size:16}),onClick:()=>{o({to:"/$org/settings/connect",params:{org:i.slug}})}}]:[],t[11]=i,t[12]=o,t[13]=C):C=t[13];let I;t[14]!==f||t[15]!==e?(I=(_n()||xt())&&!f?[{key:"install-desktop-app",label:xt()?e("downloadApp.installOnLinux"):e("downloadApp.installOnMac"),icon:n.jsx(sn,{size:16}),onClick:()=>b(!0)}]:[],t[14]=f,t[15]=e,t[16]=I):I=t[16];let R;t[17]!==e?(R=e("common.accountPopover.termsOfUse"),t[17]=e,t[18]=R):R=t[18];let Q;t[19]===Symbol.for("react.memo_cache_sentinel")?(Q=n.jsx(on,{size:16}),t[19]=Q):Q=t[19];let A;t[20]!==R?(A={key:"terms",label:R,icon:Q,href:"https://www.decocms.com/terms-of-use",external:!0},t[20]=R,t[21]=A):A=t[21];let E;t[22]!==e?(E=e("common.accountPopover.privacyPolicy"),t[22]=e,t[23]=E):E=t[23];let K;t[24]===Symbol.for("react.memo_cache_sentinel")?(K=n.jsx(bs,{size:16}),t[24]=K):K=t[24];let L;t[25]!==E?(L={key:"privacy",label:E,icon:K,href:"https://www.decocms.com/privacy-policy",external:!0},t[25]=E,t[26]=L):L=t[26];let J;t[27]!==e?(J=e("common.accountPopover.githubRepo"),t[27]=e,t[28]=J):J=t[28];let W;t[29]===Symbol.for("react.memo_cache_sentinel")?(W=n.jsx(js,{className:"w-4 h-4"}),t[29]=W):W=t[29];let U;t[30]!==J?(U={key:"github",label:J,icon:W,href:"https://github.com/decocms/studio",external:!0},t[30]=J,t[31]=U):U=t[31];let X;t[32]!==e?(X=e("common.accountPopover.community"),t[32]=e,t[33]=X):X=t[33];let se;t[34]===Symbol.for("react.memo_cache_sentinel")?(se=n.jsx(Qe,{size:16}),t[34]=se):se=t[34];let Y;t[35]!==X?(Y={key:"community",label:X,icon:se,href:"https://decocms.com/discord",external:!0},t[35]=X,t[36]=Y):Y=t[36];let H;t[37]!==e?(H=e("common.accountPopover.homepage"),t[37]=e,t[38]=H):H=t[38];let me;t[39]===Symbol.for("react.memo_cache_sentinel")?(me=n.jsx(bn,{size:16}),t[39]=me):me=t[39];let F;t[40]!==H?(F={key:"homepage",label:H,icon:me,href:"https://decocms.com",external:!0},t[40]=H,t[41]=F):F=t[41];let G;t[42]!==m||t[43]!==o||t[44]!==e?(G=m?[{key:"admin-dashboard",label:e("common.accountPopover.adminDashboard"),icon:n.jsx(nn,{size:16}),onClick:()=>o({to:"/_admin"}),className:"text-warning"}]:[],t[42]=m,t[43]=o,t[44]=e,t[45]=G):G=t[45];let ae;t[46]!==A||t[47]!==L||t[48]!==U||t[49]!==Y||t[50]!==F||t[51]!==G||t[52]!==$||t[53]!==C||t[54]!==I?(ae=[$,...C,...I,A,L,U,Y,F,...G],t[46]=A,t[47]=L,t[48]=U,t[49]=Y,t[50]=F,t[51]=G,t[52]=$,t[53]=C,t[54]=I,t[55]=ae):ae=t[55];const ke=ae;let Z;t[56]!==e?(Z=e("common.accountPopover.signOut"),t[56]=e,t[57]=Z):Z=t[57];let ne;t[58]===Symbol.for("react.memo_cache_sentinel")?(ne=n.jsx(Xe,{size:16}),t[58]=ne):ne=t[58];let P;t[59]!==Z?(P={key:"logout",label:Z,icon:ne,onClick:Oo},t[59]=Z,t[60]=P):P=t[60];const M=P;let _e;t[61]!==j||t[62]!==e?(_e=j?{key:"stop-impersonating",label:e("common.accountPopover.stopImpersonation"),icon:n.jsx(Xe,{size:16}),onClick:async()=>{const{error:ft}=await ee.admin.stopImpersonating();if(ft){re.error(ft.message||e("common.accountPopover.failedToStopImpersonation"));return}window.location.href="/"},className:"text-warning"}:null,t[61]=j,t[62]=e,t[63]=_e):_e=t[63];const Ue=_e;let $e;t[64]===Symbol.for("react.memo_cache_sentinel")?($e=n.jsx(vn,{size:14}),t[64]=$e):$e=t[64];let fe;t[65]!==e?(fe=e("common.accountPopover.lightTheme"),t[65]=e,t[66]=fe):fe=t[66];let pe;t[67]!==fe?(pe={value:"light",icon:$e,label:fe},t[67]=fe,t[68]=pe):pe=t[68];let Ce;t[69]===Symbol.for("react.memo_cache_sentinel")?(Ce=n.jsx(yn,{size:14}),t[69]=Ce):Ce=t[69];let xe;t[70]!==e?(xe=e("common.accountPopover.darkTheme"),t[70]=e,t[71]=xe):xe=t[71];let ge;t[72]!==xe?(ge={value:"dark",icon:Ce,label:xe},t[72]=xe,t[73]=ge):ge=t[73];let Pe;t[74]===Symbol.for("react.memo_cache_sentinel")?(Pe=n.jsx(Bt,{size:14}),t[74]=Pe):Pe=t[74];let he;t[75]!==e?(he=e("common.accountPopover.systemTheme"),t[75]=e,t[76]=he):he=t[76];let be;t[77]!==he?(be={value:"system",icon:Pe,label:he},t[77]=he,t[78]=be):be=t[78];let Ie;t[79]!==pe||t[80]!==ge||t[81]!==be?(Ie=[pe,ge,be],t[79]=pe,t[80]=ge,t[81]=be,t[82]=Ie):Ie=t[82];const He=Ie;let ze;t[83]!==j||t[84]!==u||t[85]!==ke||t[86]!==c||t[87]!==d||t[88]!==M||t[89]!==Ue||t[90]!==He||t[91]!==g||t[92]!==v?(ze={user:g,userImage:v,menuItems:ke,signOutItem:M,stopImpersonatingItem:Ue,isImpersonating:j,themeOptions:He,preferences:c,setPreferences:d,close:S,isMobile:u},t[83]=j,t[84]=u,t[85]=ke,t[86]=c,t[87]=d,t[88]=M,t[89]=Ue,t[90]=He,t[91]=g,t[92]=v,t[93]=ze):ze=t[93];const Te=ze;let je;t[94]!==j||t[95]!==u||t[96]!==p||t[97]!==Te||t[98]!==e||t[99]!==g?.name||t[100]!==v?(je=u?n.jsxs(Rt,{open:p,onOpenChange:x,direction:"bottom",children:[n.jsxs("button",{type:"button",onClick:()=>x(!0),className:O("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",j&&"border-2 border-dashed border-warning"),children:[n.jsx(Ee,{url:v,fallback:g?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),n.jsx("span",{className:"truncate",children:g?.name??e("common.accountPopover.defaultAccountLabel")})]}),n.jsxs(Dt,{className:"h-[80dvh] p-0",children:[n.jsx(Mt,{className:"sr-only",children:e("common.accountPopover.account")}),n.jsx(vt,{...Te})]})]}):n.jsxs(nt,{open:p,onOpenChange:x,children:[n.jsx(We,{asChild:!0,children:n.jsxs(le,{"data-tour":te.account,tooltip:g?.name??e("common.accountPopover.defaultAccountLabel"),className:O(j&&"border-2 border-dashed border-warning"),children:[n.jsx(ut,{children:n.jsx(Ee,{url:v,fallback:g?.name??"U",shape:"circle",size:"2xs",className:"size-[18px] shrink-0"})}),n.jsx("span",{className:"truncate",children:g?.name??e("common.accountPopover.defaultAccountLabel")})]})}),n.jsx(ot,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:Ao,children:n.jsx(vt,{...Te})})]}),t[94]=j,t[95]=u,t[96]=p,t[97]=Te,t[98]=e,t[99]=g?.name,t[100]=v,t[101]=je):je=t[101];let ve;t[102]!==h?(ve=n.jsx($n,{open:h,onOpenChange:b}),t[102]=h,t[103]=ve):ve=t[103];let Ae;return t[104]!==je||t[105]!==ve?(Ae=n.jsxs(n.Fragment,{children:[je,ve]}),t[104]=je,t[105]=ve,t[106]=Ae):Ae=t[106],Ae}function Ao(t){return t.preventDefault()}function Oo(){V("signed_out",{source:"account_popover"}),$t(),ee.signOut()}class Ro extends T.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,s){}render(){return this.state.hasError?null:this.props.children}}function Do(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function Mo(){const t=k.c(17),e=we(),{org:s}=B(),{hasDecoKey:i,balanceDollars:o}=In();if(!i)return null;let a;t[0]!==o?(a=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=a):a=t[1];let r;t[2]!==o?(r=O(o!=null&&Do(o)),t[2]=o,t[3]=r):r=t[3];let l;t[4]!==e||t[5]!==s.slug?(l=()=>e({to:"/$org/settings/ai-providers",params:{org:s.slug}}),t[4]=e,t[5]=s.slug,t[6]=l):l=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(ln,{}),t[7]=c):c=t[7];let d;t[8]!==o?(d=o!=null?`$${o.toFixed(2)}`:"Credits",t[8]=o,t[9]=d):d=t[9];let u;t[10]!==d?(u=n.jsx("span",{children:d}),t[10]=d,t[11]=u):u=t[11];let m;return t[12]!==a||t[13]!==r||t[14]!==l||t[15]!==u?(m=n.jsx(q,{children:n.jsx(oe,{children:n.jsxs(le,{tooltip:a,className:r,onClick:l,children:[c,u]})})}),t[12]=a,t[13]=r,t[14]=l,t[15]=u,t[16]=m):m=t[16],m}const Eo={ok:"stroke-brand-purple",warn:"stroke-warning",exhausted:"stroke-destructive"},Lo={ok:"bg-brand-purple",warn:"bg-warning",exhausted:"bg-destructive"};function Fo(){const t=k.c(40),e=z(),s=ie(),i=we(),{org:o}=B(),{data:a}=Kt();if(!a?.usage||!a.features.chat)return null;let r,l;if(t[0]!==a.usage.percent?(r=Math.round(a.usage.percent*100),l=Number.isFinite(r),t[0]=a.usage.percent,t[1]=r,t[2]=l):(r=t[1],l=t[2]),!l)return null;const c=Math.min(100,Math.max(0,r)),d=a.plan.name;let u;t[3]!==e?(u=e("settings.planUsage.aiUsage"),t[3]=e,t[4]=u):u=t[4];const m=`${d} · ${u} ${c}%`;let f;t[5]!==i||t[6]!==o.slug?(f=()=>i({to:"/$org/settings/ai-providers",params:{org:o.slug}}),t[5]=i,t[6]=o.slug,t[7]=f):f=t[7];const p=!s&&"-ml-px";let x;t[8]!==p?(x=O(p),t[8]=p,t[9]=x):x=t[9];let h;t[10]!==a.plan.id||t[11]!==a.usage.state||t[12]!==s||t[13]!==c?(h=s?n.jsx(Bo,{percent:c,state:a.usage.state}):n.jsx(qo,{planId:a.plan.id}),t[10]=a.plan.id,t[11]=a.usage.state,t[12]=s,t[13]=c,t[14]=h):h=t[14];let b;t[15]!==x||t[16]!==h?(b=n.jsx(ut,{className:x,children:h}),t[15]=x,t[16]=h,t[17]=b):b=t[17];let g;t[18]!==a.plan.name?(g=n.jsx("span",{className:"truncate font-medium",children:a.plan.name}),t[18]=a.plan.name,t[19]=g):g=t[19];let v;t[20]!==c?(v=n.jsxs("span",{className:"tabular-nums text-xs text-muted-foreground",children:[c,"%"]}),t[20]=c,t[21]=v):v=t[21];let j;t[22]!==v||t[23]!==g?(j=n.jsxs("span",{className:"flex items-baseline justify-between gap-2",children:[g,v]}),t[22]=v,t[23]=g,t[24]=j):j=t[24];const y=Lo[a.usage.state];let S;t[25]!==y?(S=O("block h-full rounded-full",y),t[25]=y,t[26]=S):S=t[26];const N=`${c}%`;let w;t[27]!==N?(w={width:N},t[27]=N,t[28]=w):w=t[28];let _;t[29]!==S||t[30]!==w?(_=n.jsx("span",{className:"block h-1 overflow-hidden rounded-full bg-muted",children:n.jsx("span",{className:S,style:w})}),t[29]=S,t[30]=w,t[31]=_):_=t[31];let $;t[32]!==j||t[33]!==_?($=n.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-1.5",children:[j,_]}),t[32]=j,t[33]=_,t[34]=$):$=t[34];let C;return t[35]!==$||t[36]!==m||t[37]!==f||t[38]!==b?(C=n.jsx(q,{children:n.jsx(oe,{children:n.jsxs(le,{tooltip:m,className:"h-auto! rounded-lg border border-border bg-card px-2 py-2 [&_svg]:opacity-100!",onClick:f,children:[b,$]})})}),t[35]=$,t[36]=m,t[37]=f,t[38]=b,t[39]=C):C=t[39],C}function qo(t){const e=k.c(6),{planId:s}=t,{data:i}=Tn();let o;e[0]!==s||e[1]!==i?(o=i?.findIndex(l=>l.id===s)??-1,e[0]=s,e[1]=i,e[2]=o):o=e[2];const a=o;if(a<0){let l;return e[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Et,{className:qe}),e[3]=l):l=e[3],l}let r;return e[4]!==a?(r=n.jsx(An,{index:a,className:qe}),e[4]=a,e[5]=r):r=e[5],r}function Bo(t){const e=k.c(5),{percent:s,state:i}=t,o=2*Math.PI*8;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=O("-rotate-90",qe),e[0]=a):a=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("circle",{cx:"10",cy:"10",r:8,fill:"none",strokeWidth:"3",className:"stroke-muted"}),e[1]=r):r=e[1];const l=Eo[i],c=`${o*s/100} ${o}`;let d;return e[2]!==l||e[3]!==c?(d=n.jsxs("svg",{viewBox:"0 0 20 20",className:a,"aria-hidden":"true",children:[r,n.jsx("circle",{cx:"10",cy:"10",r:8,fill:"none",strokeWidth:"3",strokeLinecap:"round",className:l,strokeDasharray:c})]}),e[2]=l,e[3]=c,e[4]=d):d=e[4],d}function Vo(){return zn()?n.jsx(Fo,{}):n.jsx(Mo,{})}function yt(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Ro,{children:n.jsx(T.Suspense,{fallback:null,children:n.jsx(Vo,{})})}),t[0]=e):e=t[0],e}const Ko=6e4;function Wo(t,e){return t.call("NOTIFICATION_LIST",e?{cursor:e}:{})}function Uo(t,e){if(!t)return t;const s=e?new Set(e):null;let i=0;const o=t.pages.map(r=>{const l=r.notifications.filter(c=>s&&!s.has(c.id)?!0:(i++,!1));return{...r,notifications:l}}),a=s?Math.max(0,(t.pages[0]?.unreadCount??0)-i):0;return{...t,pages:o.map(r=>({...r,unreadCount:a}))}}function Ho(t,e){const s=k.c(4),{data:i}=ee.useSession(),o=i?.user?.id;let a;s[0]!==e||s[1]!==t||s[2]!==o?(a=r=>!t||!o?Jo:Mn.subscribe(t,c=>{try{if(JSON.parse(c.data).subject!==o)return}catch{return}e(),r()},e),s[0]=e,s[1]=t,s[2]=o,s[3]=a):a=s[3],T.useSyncExternalStore(a,Qo,Go)}function Go(){return 0}function Qo(){return 0}function Jo(){}function Yt(){const t=k.c(37),{locator:e,org:s}=B(),i=Ct(),o=Pt();let a;t[0]!==e?(a=Me.notifications(e),t[0]=e,t[1]=a):a=t[1];const r=a;let l;t[2]!==i?(l=_=>{const{pageParam:$}=_;return Wo(i,$)},t[2]=i,t[3]=l):l=t[3];let c;t[4]!==r||t[5]!==l?(c={queryKey:r,queryFn:l,initialPageParam:void 0,getNextPageParam:Zo,refetchInterval:Ko},t[4]=r,t[5]=l,t[6]=c):c=t[6];const d=Dn(c);let u;t[7]!==o||t[8]!==r?(u=()=>o.invalidateQueries({queryKey:r,refetchType:"active"}),t[7]=o,t[8]=r,t[9]=u):u=t[9],Ho(s.slug,u);let m;t[10]!==i?(m=_=>i.call("NOTIFICATION_MARK_READ",_?{ids:_}:{}),t[10]=i,t[11]=m):m=t[11];let f,p;t[12]!==o||t[13]!==r?(f=async _=>{await o.cancelQueries({queryKey:r}),o.setQueryData(r,$=>Uo($,_))},p=()=>o.invalidateQueries({queryKey:r}),t[12]=o,t[13]=r,t[14]=f,t[15]=p):(f=t[14],p=t[15]);let x;t[16]!==m||t[17]!==f||t[18]!==p?(x={mutationFn:m,onMutate:f,onSettled:p},t[16]=m,t[17]=f,t[18]=p,t[19]=x):x=t[19];const h=vs(x);let b;t[20]!==d.data?.pages?(b=d.data?.pages??[],t[20]=d.data?.pages,t[21]=b):b=t[21];const g=b;let v;t[22]!==g?(v=g.flatMap(Xo),t[22]=g,t[23]=v):v=t[23];const j=g[0]?.unreadCount??0;let y;t[24]!==d?(y=()=>{d.hasNextPage&&!d.isFetchingNextPage&&d.fetchNextPage()},t[24]=d,t[25]=y):y=t[25];let S,N;t[26]!==h?(S=()=>h.mutate(null),N=_=>h.mutate([_]),t[26]=h,t[27]=S,t[28]=N):(S=t[27],N=t[28]);let w;return t[29]!==d.hasNextPage||t[30]!==d.isFetchingNextPage||t[31]!==j||t[32]!==y||t[33]!==S||t[34]!==N||t[35]!==v?(w={updates:v,redDotCount:j,hasMore:d.hasNextPage,isFetchingMore:d.isFetchingNextPage,fetchMore:y,markAllRead:S,markRead:N},t[29]=d.hasNextPage,t[30]=d.isFetchingNextPage,t[31]=j,t[32]=y,t[33]=S,t[34]=N,t[35]=v,t[36]=w):w=t[36],w}function Xo(t){return t.notifications.map(Yo)}function Yo(t){return{id:t.id,taskBoardItemId:t.taskBoardItemId,taskTitle:t.taskTitle,taskKeySeq:t.taskKeySeq,action:t.type,actorName:t.actorName,actorImage:t.actorImage,occurredAt:t.createdAt}}function Zo(t){return t.nextCursor??void 0}function ei(t){switch(t){case"mentioned":case"review_requested":return"font-medium text-foreground";case"merge_failed":case"review_changes_requested":return"font-medium text-destructive";case"review_approved":return"font-medium text-success";default:return""}}function ti(t,e){switch(t.action){case"commented":return e("sidebar.inbox.actionCommented");case"mentioned":return e("sidebar.inbox.actionMentioned");case"created":return e("sidebar.inbox.actionCreated");case"status_changed":return e("sidebar.inbox.actionStatusChanged");case"assignee_changed":return e("sidebar.inbox.actionAssigneeChanged");case"review_requested":return e("sidebar.inbox.actionReviewRequested");case"review_approved":return e("sidebar.inbox.actionReviewApproved");case"review_changes_requested":return e("sidebar.inbox.actionReviewChangesRequested");case"merge_failed":return e("sidebar.inbox.actionMergeFailed");default:{const s=t.action;return String(s)}}}function si(t){const e=k.c(36),{update:s,orgSlug:i,onSelect:o}=t,a=z();let r;e[0]!==i||e[1]!==s.taskKeySeq?(r=Wt(i,s.taskKeySeq),e[0]=i,e[1]=s.taskKeySeq,e[2]=r):r=e[2];const l=r,c=!s.actorName;let d;e[3]!==c||e[4]!==s.actorImage||e[5]!==s.actorName?(d=n.jsx("span",{className:"mt-0.5 shrink-0",children:c?n.jsx(En,{size:24}):n.jsx(Ee,{url:s.actorImage??void 0,fallback:Wn(s.actorName??void 0),shape:"circle",size:"xs"})}),e[3]=c,e[4]=s.actorImage,e[5]=s.actorName,e[6]=d):d=e[6];let u;e[7]!==s.taskTitle?(u=n.jsx("p",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:s.taskTitle}),e[7]=s.taskTitle,e[8]=u):u=e[8];let m;e[9]!==s.occurredAt?(m=Un(new Date(s.occurredAt)),e[9]=s.occurredAt,e[10]=m):m=e[10];let f;e[11]!==m?(f=n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground/70",children:m}),e[11]=m,e[12]=f):f=e[12];let p;e[13]!==u||e[14]!==f?(p=n.jsxs("div",{className:"flex items-baseline gap-2",children:[u,f]}),e[13]=u,e[14]=f,e[15]=p):p=e[15];let x;e[16]!==l?(x=l&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"font-medium",children:l})," · "]}),e[16]=l,e[17]=x):x=e[17];let h;e[18]!==s.action?(h=O(ei(s.action)),e[18]=s.action,e[19]=h):h=e[19];let b;e[20]!==a||e[21]!==s?(b=ti(s,a),e[20]=a,e[21]=s,e[22]=b):b=e[22];let g;e[23]!==h||e[24]!==b?(g=n.jsx("span",{className:h,children:b}),e[23]=h,e[24]=b,e[25]=g):g=e[25];let v;e[26]!==g||e[27]!==x?(v=n.jsxs("p",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:[x,g]}),e[26]=g,e[27]=x,e[28]=v):v=e[28];let j;e[29]!==v||e[30]!==p?(j=n.jsxs("div",{className:"min-w-0 flex-1",children:[p,v]}),e[29]=v,e[30]=p,e[31]=j):j=e[31];let y;return e[32]!==o||e[33]!==j||e[34]!==d?(y=n.jsxs("button",{type:"button",onClick:o,className:"flex w-full items-start gap-3 border-b border-border px-4 py-3 text-left transition-colors last:border-0 hover:bg-muted/25",children:[d,j]}),e[32]=o,e[33]=j,e[34]=d,e[35]=y):y=e[35],y}function ni(t){const e=k.c(2),{onReach:s}=t;let i;return e[0]!==s?(i=n.jsx("div",{className:"h-8 shrink-0",ref:o=>{if(!o)return;const a=new IntersectionObserver(r=>{r.some(oi)&&s()});return a.observe(o),()=>a.disconnect()}}),e[0]=s,e[1]=i):i=e[1],i}function oi(t){return t.isIntersecting}function ii(t){const e=k.c(23),{onClose:s}=t,i=z(),o=we(),{org:a}=B(),{updates:r,markAllRead:l,markRead:c,hasMore:d,fetchMore:u}=Yt();let m;e[0]!==i?(m=i("sidebar.inbox.title"),e[0]=i,e[1]=m):m=e[1];let f;e[2]!==m?(f=n.jsx("h3",{className:"text-sm font-medium",children:m}),e[2]=m,e[3]=f):f=e[3];let p;e[4]!==l||e[5]!==i||e[6]!==r.length?(p=r.length>0&&n.jsx(De,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs text-muted-foreground",onClick:l,children:i("sidebar.inbox.markAllRead")}),e[4]=l,e[5]=i,e[6]=r.length,e[7]=p):p=e[7];let x;e[8]!==f||e[9]!==p?(x=n.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b border-border px-4 py-3",children:[f,p]}),e[8]=f,e[9]=p,e[10]=x):x=e[10];let h;e[11]!==u||e[12]!==d||e[13]!==c||e[14]!==o||e[15]!==s||e[16]!==a||e[17]!==i||e[18]!==r?(h=r.length===0?n.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 py-10 text-center",children:[n.jsx(lt,{size:24,className:"text-muted-foreground/50"}),n.jsx("p",{className:"text-sm font-medium text-foreground",children:i("sidebar.inbox.emptyTitle")}),n.jsx("p",{className:"text-xs text-muted-foreground",children:i("sidebar.inbox.emptyBody")})]}):n.jsxs(Rn,{className:"min-h-0 flex-1",children:[r.map(g=>{const v=Wt(a.slug,g.taskKeySeq);return n.jsx(si,{update:g,orgSlug:a.slug,onSelect:()=>{c(g.id),s(),v&&o({to:"/$org/tasks/{-$taskKey}",params:{org:a.slug,taskKey:v}})}},g.id)}),d&&n.jsx(ni,{onReach:u})]}),e[11]=u,e[12]=d,e[13]=c,e[14]=o,e[15]=s,e[16]=a,e[17]=i,e[18]=r,e[19]=h):h=e[19];let b;return e[20]!==x||e[21]!==h?(b=n.jsxs(n.Fragment,{children:[x,h]}),e[20]=x,e[21]=h,e[22]=b):b=e[22],b}function Zt(){const t=k.c(1),{redDotCount:e}=Yt();if(e===0)return null;let s;return t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx("span",{className:"pointer-events-none absolute top-1 right-1 size-2 rounded-full bg-destructive"}),t[0]=s):s=t[0],s}function es(t){const e=k.c(10),{open:s,onOpenChange:i,children:o}=t;let a;e[0]!==i||e[1]!==s?(a=s&&n.jsx(ii,{onClose:()=>i(!1)}),e[0]=i,e[1]=s,e[2]=a):a=e[2];let r;e[3]!==a?(r=n.jsx(ot,{side:"right",align:"end",sideOffset:12,collisionPadding:16,className:"flex max-h-[min(650px,calc(100dvh-4rem))] w-[min(400px,calc(100vw-2rem))] flex-col p-0",children:a}),e[3]=a,e[4]=r):r=e[4];let l;return e[5]!==o||e[6]!==i||e[7]!==s||e[8]!==r?(l=n.jsxs(nt,{open:s,onOpenChange:i,children:[o,r]}),e[5]=o,e[6]=i,e[7]=s,e[8]=r,e[9]=l):l=e[9],l}function ts(){const t=k.c(9),e=z(),[s,i]=T.useState(!1);let o;t[0]!==e?(o=e("sidebar.inbox.title"),t[0]=e,t[1]=o):o=t[1];let a,r;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(lt,{size:15}),r=n.jsx(Zt,{}),t[2]=a,t[3]=r):(a=t[2],r=t[3]);let l;t[4]!==o?(l=n.jsx(We,{asChild:!0,children:n.jsxs("button",{type:"button","aria-label":o,className:"relative flex size-7 shrink-0 items-center justify-center rounded-lg text-sidebar-foreground/60 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[a,r]})}),t[4]=o,t[5]=l):l=t[5];let c;return t[6]!==s||t[7]!==l?(c=n.jsx(es,{open:s,onOpenChange:i,children:l}),t[6]=s,t[7]=l,t[8]=c):c=t[8],c}function ai(){const t=k.c(15),e=z(),[s,i]=T.useState(!1),o=ie();let a;t[0]!==o||t[1]!==e?(a=o?e("sidebar.inbox.title"):void 0,t[0]=o,t[1]=e,t[2]=a):a=t[2];let r,l;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(lt,{}),l=n.jsx(Zt,{}),t[3]=r,t[4]=l):(r=t[3],l=t[4]);let c;t[5]!==e?(c=e("sidebar.inbox.title"),t[5]=e,t[6]=c):c=t[6];let d;t[7]!==c?(d=n.jsx("span",{className:"truncate",children:c}),t[7]=c,t[8]=d):d=t[8];let u;t[9]!==a||t[10]!==d?(u=n.jsx(We,{asChild:!0,children:n.jsxs(le,{tooltip:a,className:"relative",children:[r,l,d]})}),t[9]=a,t[10]=d,t[11]=u):u=t[11];let m;return t[12]!==s||t[13]!==u?(m=n.jsx(es,{open:s,onOpenChange:i,children:u}),t[12]=s,t[13]=u,t[14]=m):m=t[14],m}function St(){const t=k.c(10),e=z();let s;t[0]!==e?(s=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=s):s=t[1];let i;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(ut,{children:n.jsx(cn,{className:qe})}),t[2]=i):i=t[2];let o;t[3]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=o):o=t[4];let a;t[5]!==o?(a=n.jsx("span",{children:o}),t[5]=o,t[6]=a):a=t[6];let r;return t[7]!==s||t[8]!==a?(r=n.jsx(q,{className:"gap-0.5",children:n.jsx(oe,{children:n.jsx(Cn,{trigger:n.jsxs(le,{tooltip:s,children:[i,a]})})})}),t[7]=s,t[8]=a,t[9]=r):r=t[9],r}function ri(){const t=k.c(13),e=ie(),i=!On();if(e){let c;t[0]!==i?(c=i&&n.jsx(yt,{}),t[0]=i,t[1]=c):c=t[1];let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(St,{}),t[2]=d):d=t[2];let u;t[3]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(oe,{children:n.jsx(ai,{})}),t[3]=u):u=t[3];let m;t[4]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsxs(q,{children:[u,n.jsx(oe,{children:n.jsx(Ze,{})})]}),t[4]=m):m=t[4];let f;return t[5]!==c?(f=n.jsxs(Je,{className:"px-2 pb-3 gap-1",children:[c,d,m]}),t[5]=c,t[6]=f):f=t[6],f}let o;t[7]!==i?(o=i&&n.jsx(yt,{}),t[7]=i,t[8]=o):o=t[8];let a;t[9]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(St,{}),t[9]=a):a=t[9];let r;t[10]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(q,{className:"gap-0.5",children:n.jsx(oe,{children:n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx(Ze,{})}),n.jsx(ts,{})]})})}),t[10]=r):r=t[10];let l;return t[11]!==o?(l=n.jsxs(Je,{className:"px-2 pb-3 gap-0.5",children:[o,a,r]}),t[11]=o,t[12]=l):l=t[12],l}function li(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Je,{className:"px-2 pb-3",children:n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx(q,{children:n.jsx(oe,{children:n.jsx(Ze,{})})})}),n.jsx(ts,{})]})}),t[0]=e):e=t[0],e}function ci(t){let e=0;for(let i=0;i<t.length;i++)e=t.charCodeAt(i)+((e<<5)-e);const s=Math.abs(e)%360;return{backgroundColor:`hsl(${s} 55% 70%)`,color:`hsl(${s} 55% 20%)`}}function mt(t){const e=k.c(13),{org:s,size:i}=t,o=i===void 0?"sm":i,a=o==="xs"?"size-5":"size-6",r=o==="xs"?"text-[9px]":"text-xs";let l;e[0]!==a?(l=O(a,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=a,e[1]=l):l=e[1];let c;e[2]!==s.logo||e[3]!==s.name?(c=s.logo?void 0:ci(s.name),e[2]=s.logo,e[3]=s.name,e[4]=c):c=e[4];let d;e[5]!==s.logo||e[6]!==s.name||e[7]!==r?(d=s.logo?n.jsx("img",{src:s.logo,alt:"",className:"size-full object-cover"}):n.jsx("span",{className:O("font-semibold leading-none",r),children:s.name.slice(0,2).toUpperCase()}),e[5]=s.logo,e[6]=s.name,e[7]=r,e[8]=d):d=e[8];let u;return e[9]!==l||e[10]!==c||e[11]!==d?(u=n.jsx("div",{className:l,style:c,children:d}),e[9]=l,e[10]=c,e[11]=d,e[12]=u):u=e[12],u}function di({invitation:t,onChanged:e}){const s=z(),[i,o]=T.useState(!1),a=t.organizationName??s("header.orgSwitcher.unknownOrganization"),r=async()=>{o(!0);try{const d=await ee.organization.acceptInvitation({invitationId:t.id});if(d.error){re.error(d.error.message),o(!1);return}}catch{re.error(s("header.orgSwitcher.failedToAcceptInvitation")),o(!1);return}re.success(s("header.orgSwitcher.joined",{name:a})),ys();let c;try{c=(await ee.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=c?`/${c}`:"/"},l=async()=>{o(!0);try{const c=await ee.organization.rejectInvitation({invitationId:t.id});if(c.error){re.error(c.error.message),o(!1);return}re.success(s("header.orgSwitcher.invitationDeclined")),o(!1),e()}catch{re.error(s("header.orgSwitcher.failedToDeclineInvitation")),o(!1)}};return n.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[n.jsx(mt,{org:{name:a},size:"sm"}),n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsx("p",{className:"truncate text-sm font-medium",children:a}),n.jsx("p",{className:"truncate text-xs text-muted-foreground",children:s("header.orgSwitcher.invitedToJoin")})]}),n.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[n.jsx(De,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:r,disabled:i,children:s("header.orgSwitcher.accept")}),n.jsx(De,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:l,disabled:i,"aria-label":s("header.orgSwitcher.declineInvitationTo",{name:a}),children:n.jsx(Yn,{size:14})})]})]})}function ss(){const t=T.useContext(Ss),{data:e,refetch:s}=t.hooks.useListUserInvitations();return{invitations:(e??[]).filter(o=>o.status==="pending"&&new Date(o.expiresAt)>new Date),refetch:()=>s?.()}}function ui(t){const e=k.c(13),s=t.trim(),{data:i}=ee.useSession(),o=i?.user?.id??"",a=s.length>0&&!!o,r=Me.projectSearch(o,s);let l;e[0]!==s?(l=async g=>{const{signal:v}=g,j=await fetch(`/api/_me/projects/search?q=${encodeURIComponent(s)}`,{signal:v});if(!j.ok)throw new Error(`Project search failed: ${j.status}`);return await j.json()},e[0]=s,e[1]=l):l=e[1];let c;e[2]!==a||e[3]!==r||e[4]!==l?(c={queryKey:r,queryFn:l,enabled:a,placeholderData:ks,staleTime:3e4,retry:!1},e[2]=a,e[3]=r,e[4]=l,e[5]=c):c=e[5];const{data:d,isFetching:u,isPlaceholderData:m,isError:f}=et(c);let p;e[6]!==d?.items?(p=d?.items??[],e[6]=d?.items,e[7]=p):p=e[7];const x=a&&u,h=a&&m;let b;return e[8]!==f||e[9]!==p||e[10]!==x||e[11]!==h?(b={hits:p,isSearching:x,isStale:h,isError:f},e[8]=f,e[9]=p,e[10]=x,e[11]=h,e[12]=b):b=e[12],b}function kt(t){const e=k.c(15),{id:s,label:i,createLabel:o,onCreate:a}=t;let r;e[0]!==s||e[1]!==i?(r=n.jsx("span",{id:s,className:"truncate",children:i}),e[0]=s,e[1]=i,e[2]=r):r=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Gt,{size:14}),e[3]=l):l=e[3];let c;e[4]!==o||e[5]!==a?(c=n.jsx(it,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":o,className:"-my-1 shrink-0 cursor-pointer rounded-lg p-1 text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",onClick:a,children:l})}),e[4]=o,e[5]=a,e[6]=c):c=e[6];let d;e[7]!==o?(d=n.jsx(at,{side:"right",children:o}),e[7]=o,e[8]=d):d=e[8];let u;e[9]!==c||e[10]!==d?(u=n.jsxs(rt,{children:[c,d]}),e[9]=c,e[10]=d,e[11]=u):u=e[11];let m;return e[12]!==r||e[13]!==u?(m=n.jsxs("div",{className:"flex w-full items-center justify-between gap-2 px-2 py-1.5 text-xs font-medium text-muted-foreground",children:[r,u]}),e[12]=r,e[13]=u,e[14]=m):m=e[14],m}const Be="min-h-9 items-center",ue={allProjects:"scope:__all__",project:t=>`scope:${t}`,org:t=>`org:${t}`,foreignProject:(t,e)=>`travel:${t}:${e}`};function mi(t){const e=k.c(9),{active:s,rows:i}=t,o=z();let a,r,l;if(e[0]!==s||e[1]!==i||e[2]!==o){l=Symbol.for("react.early_return_sentinel");e:{const d=i.get(s);if(d?.kind!=="travel"){l=null;break e}a="border-t border-border px-3 py-2 text-xs text-warning",r=o("sidebar.picker.verbTravel",{name:d.label})}e[0]=s,e[1]=i,e[2]=o,e[3]=a,e[4]=r,e[5]=l}else a=e[3],r=e[4],l=e[5];if(l!==Symbol.for("react.early_return_sentinel"))return l;let c;return e[6]!==a||e[7]!==r?(c=n.jsx("div",{className:a,children:r}),e[6]=a,e[7]=r,e[8]=c):c=e[8],c}function fi(t){const e=k.c(25),{onClose:s,onCreateOrg:i,className:o}=t,a=z(),r=T.useId(),l=T.useId(),c=we(),{org:d}=B(),{scopeId:u,projects:m,setScope:f}=Se(),{hasMore:p}=eo(),[x,h]=T.useState(""),[b,g]=T.useState(ue.allProjects),v=T.useDeferredValue(x);let j;e[0]!==v?(j=v.trim(),e[0]=v,e[1]=j):j=e[1];const y=j,S=y.length>0,{data:N}=Ns(),{invitations:w,refetch:_}=ss();let $;e[2]!==d.slug?($=(P,M)=>P.slug===d.slug?-1:M.slug===d.slug?1:0,e[2]=d.slug,e[3]=$):$=e[3];const C=(N??[]).slice().sort($),{hits:I,isSearching:R,isStale:Q,isError:A}=ui(S?y:""),E=S?C.filter(P=>{const M=y.toLowerCase();return P.name.toLowerCase().includes(M)||P.slug.toLowerCase().includes(M)}):[],K=Ne();let L;e[4]!==K?(L=K.startsWith("/$org/settings"),e[4]=K,e[5]=L):L=e[5];const J=L,W=new Map;let U;e[6]!==J||e[7]!==s||e[8]!==f?(U=P=>{V("scope_set",{scoped:P!==null,fromSettings:J}),f(P),s()},e[6]=J,e[7]=s,e[8]=f,e[9]=U):U=e[9];const X=U;let se;e[10]!==c||e[11]!==s?(se=(P,M)=>{V("org_project_travel",{scoped:!!M}),c(M?{to:"/$org/projects/$agentId",params:{org:P,agentId:M}}:{to:"/$org/home",params:{org:P}}),s()},e[10]=c,e[11]=s,e[12]=se):se=e[12];const Y=se;let H;e[13]!==c||e[14]!==s||e[15]!==d.slug?(H=()=>{V("picker_new_project"),c({to:"/$org/home",params:{org:d.slug}}),s()},e[13]=c,e[14]=s,e[15]=d.slug,e[16]=H):H=e[16];const me=H;W.set(ue.allProjects,{kind:"scope",label:a("sidebar.scope.allProjects")});let F;e[17]!==a?(F=a("sidebar.picker.searchPlaceholder"),e[17]=a,e[18]=F):F=e[18];let G;e[19]!==x||e[20]!==F?(G=n.jsx(Jn,{value:x,onValueChange:h,placeholder:F}),e[19]=x,e[20]=F,e[21]=G):G=e[21];const ae=Gn,ke="max-h-none min-h-0 flex-1",Z=S?n.jsxs(n.Fragment,{children:[A&&n.jsx(gt,{children:a("sidebar.picker.searchFailed")}),!A&&!R&&I.length===0&&E.length===0&&n.jsx(gt,{children:a("sidebar.picker.noMatches",{query:y})}),!A&&I.length>0&&n.jsx(Oe,{heading:a("sidebar.picker.projectsHeading"),className:O(Q&&"opacity-50"),children:I.map(P=>n.jsx(pi,{hit:P,currentOrgSlug:d.slug,scopeId:u,rows:W,onScope:X,onTravel:Y},`${P.orgSlug}:${P.id}`))}),E.length>0&&n.jsx(Oe,{heading:a("sidebar.picker.orgsHeading"),children:E.map(P=>n.jsx(Nt,{candidate:P,currentOrgSlug:d.slug,rows:W,onTravel:Y,onClose:s},P.id))})]}):n.jsxs(n.Fragment,{children:[n.jsx(kt,{id:r,label:a("sidebar.picker.projectsHeading"),createLabel:a("sidebar.picker.newProject"),onCreate:me}),n.jsxs(Oe,{"aria-labelledby":r,children:[n.jsxs(Fe,{value:ue.allProjects,className:Be,onSelect:()=>X(null),children:[n.jsx("span",{className:"min-w-0 flex-1 truncate",children:a("sidebar.scope.allProjects")}),u===null&&n.jsx(Le,{size:14})]}),m.map(P=>{const M=ue.project(P.id);return W.set(M,{kind:"scope",label:P.title}),n.jsxs(Fe,{value:M,className:Be,onSelect:()=>X(P.id),children:[n.jsx(ct,{icon:P.icon,name:P.title}),n.jsx("span",{className:"min-w-0 flex-1 truncate",children:P.title}),u===P.id&&n.jsx(Le,{size:14})]},P.id)}),p&&n.jsx("p",{className:"px-3 py-1.5 text-xs text-muted-foreground",children:a("sidebar.picker.moreExist")})]}),n.jsx(kt,{id:l,label:a("sidebar.picker.orgsHeading"),createLabel:a("sidebar.picker.newOrganization"),onCreate:i}),n.jsxs(Oe,{"aria-labelledby":l,children:[w.map(P=>n.jsx(di,{invitation:P,onChanged:_},P.id)),C.map(P=>n.jsx(Nt,{candidate:P,currentOrgSlug:d.slug,rows:W,onTravel:Y,onClose:s},P.id))]})]});let ne;return e[22]!==ae||e[23]!==Z?(ne=n.jsx(ae,{className:ke,children:Z}),e[22]=ae,e[23]=Z,e[24]=ne):ne=e[24],n.jsxs(Qn,{shouldFilter:!1,value:b,onValueChange:g,className:o,children:[G,ne,n.jsx(mi,{active:b,rows:W})]})}function Nt(t){const e=k.c(22),{candidate:s,currentOrgSlug:i,rows:o,onTravel:a,onClose:r}=t,l=s.slug===i;let c;e[0]!==s.name||e[1]!==s.slug||e[2]!==l||e[3]!==o?(c=ue.org(s.slug),o.set(c,{kind:l?"scope":"travel",label:s.name}),e[0]=s.name,e[1]=s.slug,e[2]=l,e[3]=o,e[4]=c):c=e[4];let d;e[5]!==s.slug||e[6]!==l||e[7]!==r||e[8]!==a?(d=()=>l?r():a(s.slug),e[5]=s.slug,e[6]=l,e[7]=r,e[8]=a,e[9]=d):d=e[9];let u;e[10]!==s?(u=n.jsx(mt,{org:s,size:"xs"}),e[10]=s,e[11]=u):u=e[11];let m;e[12]!==s.name?(m=n.jsx("span",{className:"min-w-0 flex-1 truncate",children:s.name}),e[12]=s.name,e[13]=m):m=e[13];let f;e[14]!==l?(f=l&&n.jsx(Le,{size:14}),e[14]=l,e[15]=f):f=e[15];let p;return e[16]!==d||e[17]!==u||e[18]!==m||e[19]!==f||e[20]!==c?(p=n.jsxs(Fe,{value:c,className:Be,onSelect:d,children:[u,m,f]}),e[16]=d,e[17]=u,e[18]=m,e[19]=f,e[20]=c,e[21]=p):p=e[21],p}function pi(t){const e=k.c(30),{hit:s,currentOrgSlug:i,scopeId:o,rows:a,onScope:r,onTravel:l}=t,c=s.orgSlug===i;let d;e[0]!==s.id||e[1]!==s.orgSlug||e[2]!==s.title||e[3]!==c||e[4]!==a?(d=c?ue.project(s.id):ue.foreignProject(s.orgSlug,s.id),a.set(d,{kind:c?"scope":"travel",label:s.title}),e[0]=s.id,e[1]=s.orgSlug,e[2]=s.title,e[3]=c,e[4]=a,e[5]=d):d=e[5];let u;e[6]!==s.id||e[7]!==s.orgSlug||e[8]!==c||e[9]!==r||e[10]!==l?(u=()=>c?r(s.id):l(s.orgSlug,s.id),e[6]=s.id,e[7]=s.orgSlug,e[8]=c,e[9]=r,e[10]=l,e[11]=u):u=e[11];let m;e[12]!==s.icon||e[13]!==s.title?(m=n.jsx(ct,{icon:s.icon,name:s.title}),e[12]=s.icon,e[13]=s.title,e[14]=m):m=e[14];let f;e[15]!==s.title?(f=n.jsx("span",{className:"min-w-0 flex-1 truncate",children:s.title}),e[15]=s.title,e[16]=f):f=e[16];let p;e[17]!==s.orgName?(p=n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:s.orgName}),e[17]=s.orgName,e[18]=p):p=e[18];let x;e[19]!==s.id||e[20]!==c||e[21]!==o?(x=c&&o===s.id&&n.jsx(Le,{size:14}),e[19]=s.id,e[20]=c,e[21]=o,e[22]=x):x=e[22];let h;return e[23]!==u||e[24]!==m||e[25]!==f||e[26]!==p||e[27]!==x||e[28]!==d?(h=n.jsxs(Fe,{value:d,className:Be,onSelect:u,children:[m,f,p,x]}),e[23]=u,e[24]=m,e[25]=f,e[26]=p,e[27]=x,e[28]=d,e[29]=h):h=e[29],h}function ns(t){const e=k.c(32),{collapsed:s,onNavigate:i}=t,o=s===void 0?!1:s,a=z(),{org:r}=B(),{project:l}=Se(),{invitations:c}=ss(),[d,u]=T.useState(!1),[m,f]=T.useState(!1),p=st();let x;if(e[0]!==o||e[1]!==c.length||e[2]!==r||e[3]!==l||e[4]!==a){const _=l?a("sidebar.picker.projectInOrg",{project:l.title,org:r.name}):r.name;let $;e[6]!==r||e[7]!==l?($=l?n.jsx(dn,{icon:l.icon,name:l.title,size:"xs",className:"shrink-0"}):n.jsx(mt,{org:r,size:"sm"}),e[6]=r,e[7]=l,e[8]=$):$=e[8];let C;e[9]!==c.length?(C=c.length>0&&n.jsx("span",{className:"absolute -right-1 -top-1 size-2.5 rounded-full bg-destructive ring-2 ring-background"}),e[9]=c.length,e[10]=C):C=e[10];let I;e[11]!==$||e[12]!==C?(I=n.jsxs("div",{className:"relative inline-flex shrink-0",children:[$,C]}),e[11]=$,e[12]=C,e[13]=I):I=e[13];const R=I;x=o?n.jsx(le,{tooltip:_,"data-tour":te.switcher,children:R}):n.jsxs("button",{type:"button","data-tour":te.switcher,"aria-label":a("sidebar.picker.ariaLabel",{name:_}),className:O("flex min-w-0 flex-1 items-center gap-2 rounded-lg py-1.5 pl-1 pr-1.5 text-left md:h-[34px] md:py-0","[transition:background-color_180ms_ease] hover:bg-sidebar-accent",Hn),children:[R,n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:l?l.title:r.name}),n.jsx(Sn,{size:14,className:"shrink-0 text-muted-foreground"})]}),e[0]=o,e[1]=c.length,e[2]=r,e[3]=l,e[4]=a,e[5]=x}else x=e[5];const h=x,b=p?"min-h-0 flex-1":"max-h-[min(560px,70dvh,var(--radix-popover-content-available-height,70dvh))]";let g;e[14]!==i?(g=()=>{u(!1),i?.()},e[14]=i,e[15]=g):g=e[15];let v;e[16]===Symbol.for("react.memo_cache_sentinel")?(v=()=>{u(!1),f(!0)},e[16]=v):v=e[16];let j;e[17]!==b||e[18]!==g?(j=n.jsx(fi,{onClose:g,onCreateOrg:v,className:b}),e[17]=b,e[18]=g,e[19]=j):j=e[19];const y=j;let S;e[20]!==o||e[21]!==y||e[22]!==p||e[23]!==d||e[24]!==a||e[25]!==h?(S=p?n.jsxs(Rt,{open:d,onOpenChange:u,direction:"bottom",children:[n.jsx(Zs,{asChild:!0,children:h}),n.jsxs(Dt,{className:"flex max-h-[85dvh] flex-col p-0",children:[n.jsx(Mt,{className:"sr-only",children:a("sidebar.picker.title")}),y]})]}):n.jsxs(nt,{open:d,onOpenChange:u,children:[n.jsx(We,{asChild:!0,children:h}),n.jsx(ot,{side:o?"right":"bottom",align:"start",className:"w-[min(340px,calc(100vw-2rem))] p-0",children:y})]}),e[20]=o,e[21]=y,e[22]=p,e[23]=d,e[24]=a,e[25]=h,e[26]=S):S=e[26];let N;e[27]!==m?(N=n.jsx(Xn,{open:m,onOpenChange:f}),e[27]=m,e[28]=N):N=e[28];let w;return e[29]!==S||e[30]!==N?(w=n.jsxs(n.Fragment,{children:[S,N]}),e[29]=S,e[30]=N,e[31]=w):w=e[31],w}const os=16;function xi(){const t=k.c(6),e=ie();let s;t[0]!==e?(s=n.jsx(ns,{collapsed:e}),t[0]=e,t[1]=s):s=t[1];let i,o;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(hi,{}),o=n.jsx(Tt,{}),t[2]=i,t[3]=o):(i=t[2],o=t[3]);let a;return t[4]!==s?(a=n.jsxs(n.Fragment,{children:[s,i,o]}),t[4]=s,t[5]=a):a=t[5],a}function gi(t){const e=k.c(13),{onClose:s}=t,i=z();let o;e[0]!==s?(o=n.jsx(ns,{onNavigate:s}),e[0]=s,e[1]=o):o=e[1];let a,r;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("div",{className:"flex-1"}),r=n.jsx(Tt,{}),e[2]=a,e[3]=r):(a=e[2],r=e[3]);let l;e[4]!==i?(l=i("sidebar.header.closeSidebar"),e[4]=i,e[5]=l):l=e[5];let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Ut,{size:os}),e[6]=c):c=e[6];let d;e[7]!==s||e[8]!==l?(d=n.jsx(Ht,{onClick:s,"aria-label":l,children:c}),e[7]=s,e[8]=l,e[9]=d):d=e[9];let u;return e[10]!==o||e[11]!==d?(u=n.jsxs(n.Fragment,{children:[o,a,r,d]}),e[10]=o,e[11]=d,e[12]=u):u=e[12],u}function hi(){const t=k.c(13),e=z(),s=ie(),{toggleSidebar:i}=Ve(),o=s?"page.expandSidebar":"page.collapseSidebar";let a;t[0]!==e||t[1]!==o?(a=e(o),t[0]=e,t[1]=o,t[2]=a):a=t[2];const r=a;let l;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Ut,{size:os}),t[3]=l):l=t[3];let c;t[4]!==r||t[5]!==i?(c=n.jsx(it,{asChild:!0,children:n.jsx(Ht,{"aria-label":r,onClick:i,className:"shrink-0 group-data-[state=collapsed]/sidebar:mx-auto size-7 group-data-[state=collapsed]/sidebar:size-8",children:l})}),t[4]=r,t[5]=i,t[6]=c):c=t[6];const d=!s;let u;t[7]!==r||t[8]!==d?(u=n.jsx(at,{side:"right",hidden:d,children:r}),t[7]=r,t[8]=d,t[9]=u):u=t[9];let m;return t[10]!==c||t[11]!==u?(m=n.jsxs(rt,{children:[c,u]}),t[10]=c,t[11]=u,t[12]=m):m=t[12],m}function ce(t){const e=k.c(33),{icon:s,label:i,isActive:o,link:a,onSelect:r,ariaLabel:l,className:c,dataTour:d,children:u,trailing:m}=t,f=o===void 0?!1:o,p=ie(),x=l??i,h=p?x:void 0;let b;e[0]!==c||e[1]!==d||e[2]!==f||e[3]!==h?(b={isActive:f,tooltip:h,className:c,"data-tour":d},e[0]=c,e[1]=d,e[2]=f,e[3]=h,e[4]=b):b=e[4];const g=b;let v;e[5]!==m?(v=m&&n.jsx("span",{className:"order-last ml-auto flex shrink-0 items-center group-data-[state=collapsed]/sidebar:hidden",children:m}),e[5]=m,e[6]=v):v=e[6];let j;e[7]!==i?(j=n.jsx("span",{className:"truncate",children:i}),e[7]=i,e[8]=j):j=e[8];let y;e[9]!==s||e[10]!==v||e[11]!==j?(y=n.jsxs(n.Fragment,{children:[s,v,j]}),e[9]=s,e[10]=v,e[11]=j,e[12]=y):y=e[12];const S=y;if(a){const _=f?"page":void 0;let $;e[13]!==S||e[14]!==a||e[15]!==x||e[16]!==r||e[17]!==_?($=n.jsx(It,{...a,"aria-label":x,"aria-current":_,onClick:r,children:S}),e[13]=S,e[14]=a,e[15]=x,e[16]=r,e[17]=_,e[18]=$):$=e[18];let C;e[19]!==g||e[20]!==$?(C=n.jsx(le,{asChild:!0,...g,children:$}),e[19]=g,e[20]=$,e[21]=C):C=e[21];let I;return e[22]!==u||e[23]!==C?(I=n.jsxs(oe,{children:[C,u]}),e[22]=u,e[23]=C,e[24]=I):I=e[24],I}let N;e[25]!==S||e[26]!==x||e[27]!==r||e[28]!==g?(N=n.jsx(le,{...g,"aria-label":x,onClick:r,children:S}),e[25]=S,e[26]=x,e[27]=r,e[28]=g,e[29]=N):N=e[29];let w;return e[30]!==u||e[31]!==N?(w=n.jsxs(oe,{children:[N,u]}),e[30]=u,e[31]=N,e[32]=w):w=e[32],w}function is(t){const e=k.c(5),{label:s,link:i,onSelect:o}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(to,{size:16}),e[0]=a):a=e[0];let r;return e[1]!==s||e[2]!==i||e[3]!==o?(r=n.jsx("div",{className:"contents",children:n.jsx(q,{className:"shrink-0",children:n.jsx(ce,{icon:a,label:s,className:"text-sidebar-foreground/70",link:i,onSelect:o})})}),e[1]=s,e[2]=i,e[3]=o,e[4]=r):r=e[4],r}function bi(t){return t==="board"?"kanban":t==="cdn"?"monitoring":At(t)?"cms":null}function as(){const t=k.c(2),{data:e}=Kt();let s;return t[0]!==e?(s=i=>{const o=bi(i);return!o||!e?!1:e.features[o]!==!0},t[0]=e,t[1]=s):s=t[1],s}const ji="settings",vi=["overview","reports","board","files","threadAnalytics"];function yi(t,e){return!t||!e?!1:!Ot(e.metadata)}function Si(t,e,s,i){if(!t||!e)return!0;const o=i!==void 0;return no(o?i:Qt(e.metadata),o?1:e.metadata?.sidebarViewsVersion).includes(s)}function ki(){const t=k.c(17),e=z(),{org:s}=B(),i=Ne(),o=Ke(),{project:a,repo:r}=Se(),l=Jt(a?.id),c=so().data?.isAdmin===!0;let d;t[0]!==a||t[1]!==o?(d=yi(o,a),t[0]=a,t[1]=o,t[2]=d):d=t[2];const u=d;let m;t[3]!==l||t[4]!==a||t[5]!==o?(m=x=>Si(o,a,x,l),t[3]=l,t[4]=a,t[5]=o,t[6]=m):m=t[6];const f=m;let p;if(t[7]!==f||t[8]!==c||t[9]!==u||t[10]!==i||t[11]!==s||t[12]!==a?.id||t[13]!==r||t[14]!==o||t[15]!==e){const x={overview:u||!f("overview")?null:{key:"overview",label:e("sidebar.navDestinations.home"),icon:n.jsx(mn,{size:16}),isActive:i===D.home||i===D.orgIndex||i===de.root||i===`${de.root}/`,trackAs:"overview",link:o?{to:de.root,params:{org:s.slug,agentId:o}}:{to:D.home,params:{org:s.slug}}},reports:Re(D.reports,o)&&!u&&f("reports")?{key:"reports",label:e("sidebar.navDestinations.reports"),icon:n.jsx(Ft,{size:16}),isActive:i===D.reports||i===de.reports,trackAs:"reports",link:o?{to:de.reports,params:{org:s.slug,agentId:o}}:{to:D.reports,params:{org:s.slug}}}:null,board:u||!f("board")?null:{key:"board",label:e("sidebar.navDestinations.tasks"),icon:n.jsx(Lt,{size:16}),isActive:i===D.tasks||i===de.tasks,trackAs:"board",dataTour:te.tasks,link:{to:o?de.tasks:D.tasks,params:{org:s.slug,agentId:o??void 0,taskKey:void 0},search:h=>{const b=r??a?.id;return b?{...h,repo:b}:h}}},files:Re(D.library,o)?{key:"files",label:e("sidebar.navDestinations.library"),icon:n.jsx(jn,{size:16}),isActive:i===D.library,trackAs:"files",link:{to:D.library,params:{org:s.slug}}}:null,threadAnalytics:c&&Re(D.threadAnalytics,o)?{key:"threadAnalytics",label:e("sidebar.navDestinations.threadAnalytics"),icon:n.jsx(un,{size:16}),isActive:i===D.threadAnalytics,trackAs:"thread_analytics",link:{to:D.threadAnalytics,params:{org:s.slug}}}:null};p=vi.map(h=>x[h]).filter(Ni),t[7]=f,t[8]=c,t[9]=u,t[10]=i,t[11]=s,t[12]=a?.id,t[13]=r,t[14]=o,t[15]=e,t[16]=p}else p=t[16];return p}function Ni(t){return t!==null}function wi(t){const e=k.c(9),{onNavigate:s}=t,i=ki(),o=as();let a;if(e[0]!==i||e[1]!==o||e[2]!==s){let l;e[4]!==o||e[5]!==s?(l=c=>n.jsx(ce,{icon:c.icon,label:c.label,dataTour:c.dataTour,isActive:c.isActive,link:c.link,trailing:o(c.key)?n.jsx(tt,{size:14,className:"text-muted-foreground"}):void 0,onSelect:()=>{V("nav_destination_clicked",{destination:c.trackAs}),s?.()}},c.key),e[4]=o,e[5]=s,e[6]=l):l=e[6],a=i.map(l),e[0]=i,e[1]=o,e[2]=s,e[3]=a}else a=e[3];let r;return e[7]!==a?(r=n.jsx(q,{className:"gap-1",children:a}),e[7]=a,e[8]=r):r=e[8],r}function _i(t){const e=k.c(18),{onNavigate:s}=t,i=z(),{org:o}=B(),a=Ke(),r=dt(),l=Ne(),c=ws();let d;e[0]!==c||e[1]!==l?(d=l.startsWith("/$org/settings")||l.startsWith(D.projects)&&c==="settings",e[0]=c,e[1]=l,e[2]=d):d=e[2];const u=d;let m;e[3]!==i?(m=i("sidebar.navDestinations.settings"),e[3]=i,e[4]=m):m=e[4];const f=m;let p;e[5]!==o||e[6]!==a?(p=a?void 0:{to:"/$org/settings",params:{org:o.slug}},e[5]=o,e[6]=a,e[7]=p):p=e[7];const x=p;let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Vt,{size:16}),e[8]=h):h=e[8];let b;e[9]!==r||e[10]!==s||e[11]!==a?(b=()=>{V("nav_destination_clicked",{destination:ji,target:a?"project":"org"}),a&&r(a,{panel:"settings"}),s?.()},e[9]=r,e[10]=s,e[11]=a,e[12]=b):b=e[12];let g;return e[13]!==u||e[14]!==f||e[15]!==x||e[16]!==b?(g=n.jsx(q,{className:"gap-1",children:n.jsx(ce,{dataTour:te.settings,icon:h,label:f,isActive:u,link:x,onSelect:b})}),e[13]=u,e[14]=f,e[15]=x,e[16]=b,e[17]=g):g=e[17],g}function $i(t,e){const s=new Set(e);return s.size===0?t:t.filter(i=>s.has(i.connectionId))}function Ci(t){const e=t.metadata?.ui;return Array.isArray(e?.pinnedViews)?e.pinnedViews.filter(s=>!!s&&typeof s=="object"&&typeof s.connectionId=="string"&&typeof s.toolName=="string"):[]}function Pi(t){const e=k.c(13),{onNavigate:s}=t,i=z(),{project:o}=Se(),a=dt(),r=Ne(),l=co(),c=oo(o),d=as(),u=Jt(o?.id);if(!o)return null;let m;if(e[0]!==c.presence||e[1]!==u||e[2]!==o.metadata){const x=Ot(o.metadata),h=u??Qt(o.metadata);m=new Set(io(h,ao(x,c.presence),u!==void 0?1:o.metadata.sidebarViewsVersion)),e[0]=c.presence,e[1]=u,e[2]=o.metadata,e[3]=m}else m=e[3];const f=m;let p;if(e[4]!==l||e[5]!==d||e[6]!==r||e[7]!==a||e[8]!==s||e[9]!==o||e[10]!==f||e[11]!==i){const x=[];f.has("site-editor")&&x.push({key:"site-editor",label:i("sidebar.projectNav.siteEditor"),icon:n.jsx(Bt,{size:16}),panel:"site-editor",isActive:Ti,dataTour:te.siteEditor});const h={assets:{label:i("common.mainPanelTabs.assets"),icon:n.jsx(lo,{size:16})},hosting:{label:i("common.mainPanelTabs.hosting"),icon:n.jsx(_s,{size:16})},e2e:{label:i("common.mainPanelTabs.e2e"),icon:n.jsx(xn,{size:16})},analytics:{label:i("common.mainPanelTabs.analytics"),icon:n.jsx(Ft,{size:16})},cdn:{label:i("common.mainPanelTabs.cdn"),icon:n.jsx(pn,{size:16})},experiments:{label:i("experiments.title"),icon:n.jsx(fn,{size:16})}};for(const g of ro){if(!f.has(g))continue;const v=h[g];x.push({key:g,label:v.label,icon:v.icon,panel:g,isActive:j=>j===g})}for(const g of $i(Ci(o),(o.connections??[]).map(zi)))g.toolName!=="fetch_assets"&&x.push({key:`pinned:${g.connectionId}:${g.toolName}`,label:g.label||g.toolName,icon:g.icon?n.jsx("img",{src:g.icon,alt:"",className:"size-4 rounded-[3px]"}):n.jsx(Zn,{size:16}),panel:pt(g.connectionId,g.toolName),isActive:v=>v===pt(g.connectionId,g.toolName)});f.has("automations")&&x.push({key:"automations",label:i("sidebar.projectNav.automations"),icon:n.jsx(Et,{size:16}),panel:"automations",isActive:Ii,dataTour:te.automations});const b=r.startsWith(D.projects);p=n.jsx(q,{className:"gap-1",children:x.map(g=>n.jsx(ce,{icon:g.icon,label:g.label,dataTour:g.dataTour,isActive:b&&g.isActive(l),trailing:d(g.panel)?n.jsx(tt,{size:14,className:"text-muted-foreground"}):void 0,onSelect:()=>{V("project_nav_clicked",{surface:g.key}),a(o.id,{panel:g.panel}),s?.()}},g.key))}),e[4]=l,e[5]=d,e[6]=r,e[7]=a,e[8]=s,e[9]=o,e[10]=f,e[11]=i,e[12]=p}else p=e[12];return p}function Ii(t){return t==="automations"||$s(t)!==null}function zi(t){return t.connection_id}function Ti(t){return!!t&&At(t)}const Ai=3;function Oi(t,e){return t.status==="archived"||t.status==="done"?!1:e&&t.assigneeId===e?!0:Bn(t)||Vn(t)}function Ri(t,e,s){const i=new Map;for(const a of e){if(!Oi(a,s))continue;const r=Fn(a,t);for(const l of r){const c=i.get(l.id)??[];c.push({task:a,only:r.length===1}),i.set(l.id,c)}}const o=new Map;for(const[a,r]of i)r.sort((l,c)=>Number(c.only)-Number(l.only)||(c.task.updatedAt??"").localeCompare(l.task.updatedAt??"")),o.set(a,r.slice(0,Ai).map(l=>l.task));return o}function Di(t){const e=k.c(21),{task:s,orgSlug:i,isLast:o,onNavigate:a}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("span",{"aria-hidden":"true",className:"absolute top-0 left-4 h-1/2 w-3 rounded-bl-lg border-b border-l border-sidebar-border"}),e[0]=r):r=e[0];let l;e[1]!==o?(l=!o&&n.jsx("span",{"aria-hidden":"true",className:"absolute top-1/2 bottom-0 left-4 border-l border-sidebar-border"}),e[1]=o,e[2]=l):l=e[2];let c;e[3]!==i||e[4]!==s?(c=qn(i,s),e[3]=i,e[4]=s,e[5]=c):c=e[5];let d;e[6]!==i||e[7]!==c?(d={org:i,taskKey:c},e[6]=i,e[7]=c,e[8]=d):d=e[8];let u;e[9]!==a||e[10]!==s.status?(u=()=>{V("sidebar_attention_task_clicked",{status:s.status}),a?.()},e[9]=a,e[10]=s.status,e[11]=u):u=e[11];let m;e[12]!==s.title?(m=n.jsx("span",{className:"truncate",children:s.title}),e[12]=s.title,e[13]=m):m=e[13];let f;e[14]!==d||e[15]!==u||e[16]!==m?(f=n.jsx(It,{to:"/$org/tasks/{-$taskKey}",params:d,onClick:u,className:"flex h-8 items-center rounded-lg pr-2 pl-9 text-sm text-sidebar-foreground/70 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",children:m}),e[14]=d,e[15]=u,e[16]=m,e[17]=f):f=e[17];let p;return e[18]!==l||e[19]!==f?(p=n.jsxs("li",{className:"relative",children:[r,l,f]}),e[18]=l,e[19]=f,e[20]=p):p=e[20],p}function Mi(t){const e=k.c(42),{onNavigate:s}=t,i=z(),o=ie(),[a,r]=T.useState(!1),{granted:l}=Cs("agents:manage"),{org:c,locator:d}=B(),u=Ct(),{projects:m}=Se(),f=Ke(),p=dt(),{data:x}=ee.useSession();let h;e[0]!==d||e[1]!==u?(h=Kn(d,u),e[0]=d,e[1]=u,e[2]=h):h=e[2];const b=!o&&!f;let g;e[3]!==h||e[4]!==b?(g={...h,enabled:b},e[3]=h,e[4]=b,e[5]=g):g=e[5];const{data:v}=et(g);if(f||m.length===0&&!l)return null;let j,y,S,N,w,_;if(e[6]!==o||e[7]!==v?.items||e[8]!==p||e[9]!==s||e[10]!==c||e[11]!==m||e[12]!==f||e[13]!==x?.user?.id||e[14]!==i){const Q=Ri(Ln(m),v?.items??[],x?.user?.id);N="flex flex-col gap-2",w=te.projects,e[21]!==o||e[22]!==i?(_=!o&&n.jsx("p",{className:"px-2 text-xs font-medium text-muted-foreground",children:i("sidebar.projects.heading")}),e[21]=o,e[22]=i,e[23]=_):_=e[23],j=q,y="gap-1",S=m.map(A=>{const E=Q.get(A.id)??[];return n.jsx(ce,{icon:n.jsx(ct,{icon:A.icon,name:A.title}),label:A.title,isActive:A.id===f,onSelect:()=>{V("sidebar_project_clicked"),p(A.id,{panel:Ps(A.metadata?.ui?.layout)}),s?.()},children:!o&&E.length>0&&n.jsx("ul",{className:"flex flex-col",children:E.map((K,L)=>n.jsx(Di,{task:K,orgSlug:c.slug,isLast:L===E.length-1,onNavigate:s},K.id))})},A.id)}),e[6]=o,e[7]=v?.items,e[8]=p,e[9]=s,e[10]=c,e[11]=m,e[12]=f,e[13]=x?.user?.id,e[14]=i,e[15]=j,e[16]=y,e[17]=S,e[18]=N,e[19]=w,e[20]=_}else j=e[15],y=e[16],S=e[17],N=e[18],w=e[19],_=e[20];let $;e[24]!==l||e[25]!==i?($=l&&n.jsx(ce,{icon:n.jsx(Gt,{size:16}),label:i("sidebar.projects.addProject"),onSelect:()=>r(!0)}),e[24]=l,e[25]=i,e[26]=$):$=e[26];let C;e[27]!==j||e[28]!==y||e[29]!==S||e[30]!==$?(C=n.jsxs(j,{className:y,children:[S,$]}),e[27]=j,e[28]=y,e[29]=S,e[30]=$,e[31]=C):C=e[31];let I;e[32]!==a||e[33]!==p||e[34]!==s?(I=a&&n.jsx(T.Suspense,{fallback:null,children:n.jsx(uo,{open:!0,onOpenChange:r,onImportComplete:Q=>{const{virtualMcpId:A}=Q;A&&p(A),s?.()}})}),e[32]=a,e[33]=p,e[34]=s,e[35]=I):I=e[35];let R;return e[36]!==C||e[37]!==I||e[38]!==N||e[39]!==w||e[40]!==_?(R=n.jsxs("div",{className:N,"data-tour":w,children:[_,C,I]}),e[36]=C,e[37]=I,e[38]=N,e[39]=w,e[40]=_,e[41]=R):R=e[41],R}function Ei(){const t=k.c(8),e=z(),{capabilities:s,isPrivileged:i,loading:o,error:a}=Is(),r=Pn().length,l=zs();let c;return t[0]!==s||t[1]!==a||t[2]!==i||t[3]!==r||t[4]!==o||t[5]!==e||t[6]!==l?(c=[{key:"account",label:"",items:[{key:"profile",label:e("settings.nav.profile"),icon:n.jsx(go,{size:14}),to:"/$org/settings/profile"}]},{key:"organization",label:e("settings.nav.organization"),items:[{key:"general",label:e("settings.nav.general"),icon:n.jsx(fo,{size:14}),to:"/$org/settings/general",requires:"org:manage"},{key:"billing",label:e("settings.nav.billing"),icon:n.jsx(po,{size:14}),to:"/$org/settings/ai-providers",group:"billing"},{key:"connect",label:e("settings.nav.connect"),icon:n.jsx(qt,{size:14}),to:"/$org/settings/connect",group:"connect"},{key:"tasks",label:e("settings.nav.tasks"),icon:n.jsx(Lt,{size:14}),to:"/$org/settings/task-board",requires:"org:manage"}]},{key:"build",label:e("settings.nav.build"),items:[{key:"repositories",label:e("settings.nav.repositories"),icon:n.jsx(Ts,{size:14}),to:"/$org/settings/repositories",requires:"file-configs:manage"},{key:"connections",label:e("settings.nav.connections"),icon:n.jsx(gn,{size:14}),to:"/$org/settings/connections"},{key:"agents",label:e("settings.nav.agents"),icon:n.jsx(Qe,{size:14}),to:"/$org/settings/agents"},{key:"automations",label:e("settings.nav.automations"),icon:n.jsx(ho,{size:14}),to:"/$org/settings/automations",requires:"automations:manage"},{key:"skills",label:e("settings.nav.skills"),icon:n.jsx(kn,{size:14}),to:"/$org/settings/skills"}]},{key:"manage",label:e("settings.nav.manage"),items:[{key:"monitor",label:e("settings.nav.monitor"),icon:n.jsx(hn,{size:14}),to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:e("settings.nav.members"),icon:n.jsx(Qe,{size:14}),to:"/$org/settings/members",group:"members",badge:r}]},{key:"advanced",label:e("settings.nav.advanced"),collapsible:!0,items:[{key:"secrets",label:e("settings.nav.secrets"),icon:n.jsx(xo,{size:14}),to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"storage",label:e("settings.nav.storage"),icon:n.jsx(As,{size:14}),to:"/$org/settings/buckets",group:"storage"},{key:"sso",label:e("settings.nav.security"),icon:n.jsx(tt,{size:14}),to:"/$org/settings/sso",requires:"org:manage"}]}].map(u=>({...u,items:u.items.flatMap(m=>{if(m.group){const[f]=l[m.group];return f?[{...m,to:f.to}]:Os(m.group)?[]:[m]}return o||a?[m]:m.privilegedOnly?i?[m]:[]:m.requires?i||s[m.requires]?[m]:[]:[m]})})).filter(Li),t[0]=s,t[1]=a,t[2]=i,t[3]=r,t[4]=o,t[5]=e,t[6]=l,t[7]=c):c=t[7],c}function Li(t){return t.items.length>0}function rs(){const t=k.c(8);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org"},t[0]=e):e=t[0];const{org:s}=Rs(e);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i={select:Fi},t[1]=i):i=t[1];const o=Ds(i);let a;if(t[2]!==s||t[3]!==o){const c=d=>{const u=d.replace("$org",s);return o===u||o.startsWith(`${u}/`)};a=d=>[d.to,...d.group?Ms(d.group):[]].some(c),t[2]=s,t[3]=o,t[4]=a}else a=t[4];const r=a;let l;return t[5]!==r||t[6]!==s?(l={org:s,isActive:r},t[5]=r,t[6]=s,t[7]=l):l=t[7],l}function Fi(t){return t.location.pathname}function qi(){const t=k.c(9),{isActive:e}=rs();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={},t[0]=s):s=t[0];const[i,o]=T.useState(s);let a;t[1]!==e||t[2]!==i?(a=u=>i[u.key]??(!u.collapsible||u.items.some(e)),t[1]=e,t[2]=i,t[3]=a):a=t[3];const r=a;let l;t[4]!==r?(l=u=>o(m=>({...m,[u.key]:!r(u)})),t[4]=r,t[5]=l):l=t[5];const c=l;let d;return t[6]!==r||t[7]!==c?(d={isOpen:r,toggle:c},t[6]=r,t[7]=c,t[8]=d):d=t[8],d}function Bi(t){const e=k.c(21),{group:s,open:i,onToggle:o,className:a}=t;let r,l,c,d,u;if(e[0]!==a||e[1]!==s.collapsible||e[2]!==s.label||e[3]!==o||e[4]!==i){u=Symbol.for("react.early_return_sentinel");e:{const x=O("text-xs font-medium text-muted-foreground/60 truncate",a);if(!s.collapsible){u=n.jsx("p",{className:x,children:s.label});break e}r="button",l=o,c=i,d=O("flex w-full items-center gap-1 rounded-lg hover:text-muted-foreground",x)}e[0]=a,e[1]=s.collapsible,e[2]=s.label,e[3]=o,e[4]=i,e[5]=r,e[6]=l,e[7]=c,e[8]=d,e[9]=u}else r=e[5],l=e[6],c=e[7],d=e[8],u=e[9];if(u!==Symbol.for("react.early_return_sentinel"))return u;let m;e[10]!==i?(m=i?n.jsx(mo,{size:12}):n.jsx(Es,{size:12}),e[10]=i,e[11]=m):m=e[11];let f;e[12]!==s.label?(f=n.jsx("span",{className:"truncate",children:s.label}),e[12]=s.label,e[13]=f):f=e[13];let p;return e[14]!==r||e[15]!==l||e[16]!==c||e[17]!==d||e[18]!==m||e[19]!==f?(p=n.jsxs("button",{type:r,onClick:l,"aria-expanded":c,className:d,children:[m,f]}),e[14]=r,e[15]=l,e[16]=c,e[17]=d,e[18]=m,e[19]=f,e[20]=p):p=e[20],p}function Vi(t){const e=k.c(5),{icon:s,badge:i}=t;let o;e[0]!==i?(o=i?n.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-destructive pointer-events-none"}):null,e[0]=i,e[1]=o):o=e[1];let a;return e[2]!==s||e[3]!==o?(a=n.jsxs("span",{className:"relative shrink-0",children:[s,o]}),e[2]=s,e[3]=o,e[4]=a):a=e[4],a}function ls(t){const e=k.c(24),{onNavigate:s}=t,i=ie(),o=z(),a=Ei(),{org:r,isActive:l}=rs(),{isOpen:c,toggle:d}=qi();let u;if(e[0]!==i||e[1]!==a||e[2]!==l||e[3]!==c||e[4]!==s||e[5]!==r||e[6]!==d){let b;e[8]!==i||e[9]!==l||e[10]!==c||e[11]!==s||e[12]!==r||e[13]!==d?(b=(g,v)=>n.jsxs("div",{className:"flex flex-col",children:[g.label&&!i&&n.jsx(Bi,{group:g,open:c(g),onToggle:()=>d(g),className:O("px-2 pt-1.5 pb-0.5",v>0&&"mt-3")}),(i||c(g))&&n.jsx(q,{className:"gap-0.5",children:g.items.map(j=>n.jsx(ce,{icon:n.jsx(Vi,{icon:j.icon,badge:j.badge}),label:j.label,isActive:l(j),link:{to:j.to,params:{org:r}},className:"gap-2.5",onSelect:()=>{V("settings_nav_clicked",{section_key:j.key,group_key:g.key}),s?.()}},j.key))})]},g.key),e[8]=i,e[9]=l,e[10]=c,e[11]=s,e[12]=r,e[13]=d,e[14]=b):b=e[14],u=a.map(b),e[0]=i,e[1]=a,e[2]=l,e[3]=c,e[4]=s,e[5]=r,e[6]=d,e[7]=u}else u=e[7];let m;e[15]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx("div",{className:"mx-2 my-2 border-t border-border/50 hidden"}),e[15]=m):m=e[15];let f;e[16]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx("span",{className:"shrink-0",children:n.jsx(Xe,{size:14})}),e[16]=f):f=e[16];let p;e[17]!==o?(p=o("settings.nav.signOut"),e[17]=o,e[18]=p):p=e[18];let x;e[19]!==p?(x=n.jsxs("div",{className:"mt-auto flex flex-col pt-4",children:[m,n.jsx(q,{className:"gap-0.5",children:n.jsx(ce,{icon:f,label:p,className:"gap-2.5",onSelect:Ki})})]}),e[19]=p,e[20]=x):x=e[20];let h;return e[21]!==u||e[22]!==x?(h=n.jsxs(n.Fragment,{children:[u,x]}),e[21]=u,e[22]=x,e[23]=h):h=e[23],h}function Ki(){V("signed_out",{source:"settings_sidebar"}),$t(),ee.signOut()}function cs(t){const e=k.c(8),{onNavigate:s}=t,i=z(),{org:o}=B();let a;e[0]!==i?(a=i("settings.nav.backToHome"),e[0]=i,e[1]=a):a=e[1];let r;e[2]!==o.slug?(r={to:"/$org/home",params:{org:o.slug}},e[2]=o.slug,e[3]=r):r=e[3];let l;return e[4]!==s||e[5]!==a||e[6]!==r?(l=n.jsx(is,{label:a,link:r,onSelect:s}),e[4]=s,e[5]=a,e[6]=r,e[7]=l):l=e[7],l}function ds(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"px-4 pb-1 group-data-[state=collapsed]/sidebar:hidden",children:n.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.401.0"]})}),t[0]=e):e=t[0],e}const Wi="pt-1.5";function us(t){const e=k.c(18),{header:s,back:i,body:o,footer:a,sheet:r}=t;let l;e[0]!==s?(l=s&&n.jsx("div",{"data-slot":"sidebar-picker-header",className:"flex h-12 shrink-0 flex-row items-center gap-1 px-2 group-data-[state=collapsed]/sidebar:h-auto group-data-[state=collapsed]/sidebar:flex-col group-data-[state=collapsed]/sidebar:gap-2 group-data-[state=collapsed]/sidebar:py-2",children:s}),e[0]=s,e[1]=l):l=e[1];let c;e[2]!==s?(c=s&&n.jsx("div",{className:"hidden mt-1.5 h-px shrink-0 bg-sidebar-border"}),e[2]=s,e[3]=c):c=e[3];let d;e[4]!==i?(d=i&&n.jsx("div",{className:"sticky top-0 z-10 hidden shrink-0 bg-sidebar pb-2 not-empty:block",children:i}),e[4]=i,e[5]=d):d=e[5];let u;e[6]!==o||e[7]!==d?(u=n.jsxs(Ws,{className:"gap-0 overflow-y-auto px-2 pt-3 pb-2 group-data-[state=collapsed]/sidebar:[scrollbar-width:none] group-data-[state=collapsed]/sidebar:[&::-webkit-scrollbar]:hidden",children:[d,o]}),e[6]=o,e[7]=d,e[8]=u):u=e[8];let m;e[9]!==a||e[10]!==l||e[11]!==c||e[12]!==u?(m=n.jsxs(n.Fragment,{children:[l,c,u,a]}),e[9]=a,e[10]=l,e[11]=c,e[12]=u,e[13]=m):m=e[13];const f=m;if(r){let x;return e[14]!==f?(x=n.jsx("div",{className:"group/sidebar flex h-full w-full flex-col bg-sidebar text-sidebar-foreground","data-sidebar":"sidebar","data-state":"expanded","data-tour":te.nav,children:f}),e[14]=f,e[15]=x):x=e[15],x}let p;return e[16]!==f?(p=n.jsx(Us,{className:Wi,"data-tour":te.nav,children:f}),e[16]=f,e[17]=p):p=e[17],p}function ms(t){const e=k.c(8),{onNavigate:s}=t,i=z(),o=Ke(),a=Io();if(!o)return null;let r;e[0]!==i?(r=i("sidebar.scope.allProjects"),e[0]=i,e[1]=r):r=e[1];let l;e[2]!==a||e[3]!==s?(l=()=>{a(),s?.()},e[2]=a,e[3]=s,e[4]=l):l=e[4];let c;return e[5]!==r||e[6]!==l?(c=n.jsx(is,{label:r,onSelect:l}),e[5]=r,e[6]=l,e[7]=c):c=e[7],c}function fs(t){const e=k.c(2),{onNavigate:s}=t;let i;return e[0]!==s?(i=n.jsx(Ls,{children:n.jsxs("div",{className:"flex flex-col gap-6",children:[n.jsxs("div",{className:"flex flex-col gap-1",children:[n.jsx(wi,{onNavigate:s}),n.jsx(Pi,{onNavigate:s}),n.jsx(_i,{onNavigate:s})]}),n.jsx(Mi,{onNavigate:s})]})}),e[0]=s,e[1]=i):i=e[1],i}function Ui(){const t=k.c(3),e=zt();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(xi,{}),t[0]=s):s=t[0];let i;return t[1]!==e?(i=n.jsx(us,{header:s,back:e?n.jsx(cs,{}):n.jsx(ms,{}),body:e?n.jsx(ls,{}):n.jsx(fs,{}),footer:e?n.jsx(ds,{}):n.jsx(ri,{})}),t[1]=e,t[2]=i):i=t[2],i}function Hi(t){const e=k.c(13),{onClose:s}=t,i=zt();let o;e[0]!==s?(o=n.jsx(gi,{onClose:s}),e[0]=s,e[1]=o):o=e[1];let a,r;e[2]!==i||e[3]!==s?(a=i?n.jsx(cs,{onNavigate:s}):n.jsx(ms,{onNavigate:s}),r=i?n.jsx(ls,{onNavigate:s}):n.jsx(fs,{onNavigate:s}),e[2]=i,e[3]=s,e[4]=a,e[5]=r):(a=e[4],r=e[5]);let l;e[6]!==i?(l=i?n.jsx(ds,{}):n.jsx(li,{}),e[6]=i,e[7]=l):l=e[7];let c;return e[8]!==o||e[9]!==a||e[10]!==r||e[11]!==l?(c=n.jsx(us,{sheet:!0,header:o,back:a,body:r,footer:l}),e[8]=o,e[9]=a,e[10]=r,e[11]=l,e[12]=c):c=e[12],c}const Gi=new Set(["completed","failed","requires_action"]);function Qi(t){const e=k.c(5),[s]=_t();let i;e[0]!==s?(i=a=>{s.enableSounds&&Gi.has(a.data.status)&&bo(jo.dataUri).catch(Ji)},e[0]=s,e[1]=i):i=e[1];let o;e[2]!==t||e[3]!==i?(o={orgSlug:t,onTaskStatus:i},e[2]=t,e[3]=i,e[4]=o):o=e[4],vo(o)}function Ji(t){console.warn("[status-sounds] playback failed:",t)}const Xi=2e3,Yi=4e4;function Zi(t){return t==="success"||t==="updated"}function ea(t){const e=k.c(15);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},e[0]=s):s=e[0];const i=Fs(s),o=Pt();let a;e[1]!==i.checkout?(a=Zi(i.checkout),e[1]=i.checkout,e[2]=a):a=e[2];const r=a,[l]=T.useState(ta);let c;e[3]!==t?(c=Me.checkoutReturnPoll(t),e[3]=t,e[4]=c):c=e[4];let d;e[5]!==l?(d=()=>Date.now()<l?Xi:!1,e[5]=l,e[6]=d):d=e[6];let u;e[7]!==t||e[8]!==o?(u=async()=>(await o.invalidateQueries({queryKey:Me.aiPlanEntitlements(t)}),Date.now()),e[7]=t,e[8]=o,e[9]=u):u=e[9];let m;e[10]!==r||e[11]!==c||e[12]!==d||e[13]!==u?(m={queryKey:c,enabled:r,gcTime:0,staleTime:0,refetchInterval:d,queryFn:u},e[10]=r,e[11]=c,e[12]=d,e[13]=u,e[14]=m):m=e[14],et(m)}function ta(){return Date.now()+Yi}function sl(){const t=k.c(3),{org:e}=B();Qi(e.slug),ea(e.id);let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(Po,{}),t[0]=s):s=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Ge.Sidebar,{renderMobile:sa,children:n.jsx(Ui,{})}),t[1]=i):i=t[1];let o;return t[2]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsxs(Ge,{notice:s,children:[i,n.jsx(Ge.Content,{children:n.jsx(qs,{})})]}),t[2]=o):o=t[2],o}function sa(t){const{onClose:e}=t;return n.jsx(Hi,{onClose:e})}export{sl as default};
@@ -0,0 +1 @@
1
+ import{c as p,l as d,j as t,n as f,P as c,aq as u,O as x}from"./index-De5sr9zh.js";import{u as j}from"./use-mobile-DVMuGaln.js";import{R as h}from"./route-page-header-ErgCCo2N.js";import"./LayoutLeft-CuG2yJZR.js";import"./use-in-settings-icIKIpSR.js";import"./sheet-Kja83qKC.js";import"./X-CEngH8b7.js";import"./tooltip-Bdu4_ay-.js";import"./index-DVgj8U7g.js";import"./toolbar-icon-button-B7ENG3u2.js";import"./use-project-scope-CJnr8HCi.js";import"./use-virtual-mcp-BKP1YfD8.js";import"./use-mcp-client-CkjkRUta.js";import"./auth-Dafjkfpj.js";import"./github-repo-BknN0SVI.js";function I(){const e=p.c(9),m=j(),n=!m&&"p-1.5";let i;e[0]!==n?(i=d("flex-1 min-h-0",n),e[0]=n,e[1]=i):i=e[1];const l=m?"plain":"card";let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(h,{}),e[2]=r):r=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsxs(f.Breadcrumbs.Provider,{children:[r,t.jsx(c.Content,{children:t.jsx(u,{children:t.jsx(x,{})})})]}),e[3]=o):o=e[3];let s;e[4]!==l?(s=t.jsx(c,{"data-testid":"settings-panel",variant:l,children:o}),e[4]=l,e[5]=s):s=e[5];let a;return e[6]!==i||e[7]!==s?(a=t.jsx("div",{className:i,children:s}),e[6]=i,e[7]=s,e[8]=a):a=e[8],a}export{I as default};
@@ -0,0 +1 @@
1
+ import{c as $,b as U,r as O,l as Y,j as s,h as je,X as le,ar as ke,aq as Le,E as Tt,a as $e,K as _t,m as nt,q as xe,a3 as at,as as ss,at as ns,U as wt,t as Ct,ak as as,d as De,n as ft,au as rs,f as Se,C as mt,e as is,u as Fe,k as ls,av as os,aw as cs,O as Pt,ax as ds,N as us,B as fs,P as Ye}from"./index-De5sr9zh.js";import{i as rt}from"./AlertCircle-D1gV07Oe.js";import{i as ms}from"./LayoutLeft-CuG2yJZR.js";import{u as hs}from"./use-in-settings-icIKIpSR.js";import{T as Ae}from"./toolbar-icon-button-B7ENG3u2.js";import{C as ee,w as ps}from"./index-bMw4G7-h.js";import{u as xs,a as gs}from"./use-organization-settings-B0mobgxG.js";import{d as bs,i as vs}from"./decofile-api-5Nr0-h_v.js";import{u as Re,a as At,b as Ee,c as It,d as js,e as ys,s as ks}from"./chat-context-v9O7Tar9.js";import{u as Mt}from"./use-session-runtime-B9eFlXyW.js";import{u as Ss}from"./use-ai-providers-DdvmCGxF.js";import{i as Ns}from"./CheckCircle-CyKBJceB.js";import{q as Ts,r as ht,A as ye,u as _s,v as ws,w as Cs,x as Ps,y as As,z as Is,B as Lt,C as Ms,D as Ls,E as $s,n as Ds}from"./agent-icon-CjNFk4Bw.js";import{s as pt}from"./XClose-Dvx_qcsQ.js";import{a as ce,b as $t}from"./use-virtual-mcp-BKP1YfD8.js";import{I as Dt}from"./integration-icon-CsYMgjoT.js";import{b as Fs}from"./use-entitlements-Da1bmf67.js";import{t as it}from"./ChevronUp-Dto8qCq2.js";import{O as Rs}from"./pair-D39JYx1G.js";import{u as Es,a as Os}from"./use-thread-outputs-CIF4-tq_.js";import{u as Bs}from"./use-deco-credits-DTu_Qf20.js";import{a as lt,b as zs,f as Gs,L as Hs,s as Us,c as Ks}from"./shell-layout-ynqF32RZ.js";import{f as Vs,b as Ws}from"./use-project-scope-CJnr8HCi.js";import{g as et,u as qs,n as Ys,a as Qs}from"./use-releases-CT-nVxtd.js";import{d as Ft,c as Xs}from"./thread-intent-rbLXiRX-.js";import{u as Zs,a as ot,b as ct,c as dt}from"./hooks-CcmbiBeQ.js";import{f as Js,a as Rt,b as en}from"./use-navigate-to-agent-BCcYux8q.js";import{o as tn,s as sn,u as nn,S as an,a as rn}from"./sandbox-lifecycle-context-o4KKoGrI.js";import{E as Et}from"./empty-state-BJxP56xq.js";import{t as ln,m as on,u as cn}from"./thread-button-Ds-0KssI.js";import{g as Ot}from"./github-repo-BknN0SVI.js";import{ChatLayout as xt}from"./index-D_lD_4br.js";import{a as Bt,b as zt,P as Gt}from"./popover-DCaw39mN.js";import{T as Oe,a as Be,c as ze}from"./tooltip-Bdu4_ay-.js";import{T as dn,a as un}from"./toggle-group-CEb1zCbt.js";import{u as Ht,a as Ge,r as fn,b as Ut,c as mn,d as hn}from"./thread-route-B3__WRb1.js";import{d as pn,h as xn,c as gn,b as bn,D as vn}from"./dialog-CEiE0rPQ.js";import{c as jn,C as yn,a as kn,b as Sn,e as Nn,d as Tn}from"./command-vKgGCoFF.js";import{i as Kt}from"./Zap-DkS3ccHw.js";import{A as _n,a as wn,b as Cn,c as Pn,g as An,d as In,e as Mn,f as Ln}from"./alert-dialog-DpzgB-Ls.js";import{g as $n,S as Dn}from"./task-status-CnFMIlt_.js";import{a as Fn}from"./format-time-BtXRrtv4.js";import{i as Rn,a as En}from"./Share07-D6XgmppM.js";import{a as Vt,u as On}from"./use-panel-navigate-CjSWJCy4.js";import{u as Wt}from"./use-main-panel-tabs-B5g6e1MJ.js";import{a as Bn}from"./ZoomOut-D3wne5dx.js";import{b as zn,c as qt,S as Gn,d as Hn}from"./select-BZ6sktb7.js";import{L as ut,a as Un}from"./legacy-main-redirect-CQgWSIje.js";import{u as Kn}from"./use-mobile-DVMuGaln.js";import{L as Vn}from"./preview-dialog-DHJShsrA.js";import{O as Wn}from"./org-file-open-context-Mx8jC4-P.js";import{B as gt}from"./blocks-preview-workspace-context-Bm8P7H4k.js";import{u as Yt}from"./use-is-desktop-app-BNujXJc_.js";import{p as qn}from"./virtual-mcp-DXr1jTLu.js";import"./sheet-Kja83qKC.js";import"./X-CEngH8b7.js";import"./ArrowUp-COLR6KTW.js";import"./gateway-client-hbsOo-al.js";import"./drawer-mNZA6mOf.js";import"./collection-search-kj64tBFw.js";import"./SearchMd-B_MXZ22A.js";import"./use-mcp-client-CkjkRUta.js";import"./auth-Dafjkfpj.js";import"./use-mcp-prompts-D2XJcis0.js";import"./index-CWksyNR9.js";import"./form-CCT2OtgN.js";import"./label-Baft7ecp.js";import"./input-B-DIEGoS.js";import"./utils-CVEq3hMx.js";import"./input-DMbK8B2u.js";import"./autosend-DeYn5nkP.js";import"./chat-draft-BSL5UQWs.js";import"./ArrowRight-BFyYdKNd.js";import"./Check-C-Vn17o5.js";import"./Image01-D02_x5mu.js";import"./Upload01-hQyKBWZL.js";import"./Copy01-B2GuMU9Q.js";import"./ArrowLeft-Bpb3sor7.js";import"./usage-stats-C8kdutYl.js";import"./use-copy-D35bNj5j.js";import"./markdown-UaZeehfy.js";import"./Eye-BhTmzCKr.js";import"./tabs-DWl7SNDG.js";import"./tool-namespace-DmnQIdtF.js";import"./use-open-billing-url-CJn1G7pV.js";import"./decopilot-DlmPNMn_.js";import"./checkbox-BMxilLAm.js";import"./Tool01-BoO1X0ZH.js";import"./Key01-BuudAO_W.js";import"./ai-providers-logos-DD3qZ33J.js";import"./Monitor01-Cj93oSbT.js";import"./avatar-B6HmPhM4.js";import"./User01-gmEyKvLo.js";import"./download-app-dialog-fmWolHKD.js";import"./index-ldS2WUeM.js";import"./input-CogQggtY.js";import"./suggestion-DMGPIg87.js";import"./use-org-fs-3jzMRDSK.js";import"./Link01-CVUd8ZSz.js";import"./Plus-Ch1uJBgh.js";import"./question-004-sINsf4GQ.js";import"./use-members-CdPjttiy.js";import"./use-org-auth-client-D8dxsLtj.js";import"./feature-paywall-Tj9HTPlX.js";import"./plan-ladder-D85oNnSr.js";import"./add-connection-dialog-mm-WrmAR.js";import"./extract-connection-data-erEsLv_0.js";import"./metadata-D72DunRR.js";import"./connection-CTAV5crm.js";import"./connection-card-DXWUKoxP.js";import"./useInfiniteQuery-DhVx-Xnv.js";import"./infiniteQueryObserver-CwgE9ndj.js";import"./connection-slug-CITJ0kGN.js";import"./slugify-CEUa2lfQ.js";import"./textarea-CufiKBr1.js";import"./use-connection-CzhqmkxY.js";import"./UserSquare-DXqYCX9F.js";import"./connection-form-helpers-BrejHCrx.js";import"./Trash01-D4CwdSy9.js";import"./authenticate-and-persist-oauth-DIl2N_8B.js";import"./mcp-oauth-DpJ1IX9I.js";import"./collection-tabs-DCLfzEOA.js";import"./badge-4kURMy-V.js";import"./use-infinite-scroll-7-m4dXi3.js";import"./useSuspenseInfiniteQuery-CB90sByh.js";import"./schema-DkZUkArz.js";import"./task-board-C6TTBmRS.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-BvKgG5Ws.js";import"./Globe04-BLoVxWaz.js";import"./CreditCard01-CoMSE38C.js";import"./DotsVertical-R1tuLE9v.js";import"./LinkExternal01-Bo5cppL4.js";import"./Sun-Dy_rDhHe.js";import"./Palette-CEa7GqA9.js";import"./Users01-BBb4-Wbt.js";import"./collapsible-bc19817o.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DVXFXjZU.js";import"./types-C1lh-7rD.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./file-type-icon-Cv10yXI0.js";import"./project-icon-CXM68zVZ.js";import"./required-auth-layout-scRrBHKS.js";import"./use-org-sso-Bb_2_N0Z.js";import"./serial-task-queue-CGOeQgpr.js";import"./backoff-8mStPHYB.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./use-route-default-main-CQGz2KW9.js";import"./resizable-D2L182YF.js";import"./route-page-header-ErgCCo2N.js";import"./index-DVgj8U7g.js";import"./index-Kwx27vNK.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-mcp-tools-DZlo67bQ.js";import"./use-task-metadata-qZ-qzNT-.js";import"./use-project-native-view-presence-_PPun-xm.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-C7xVU8E2.js";import"./site-slug-DebpOoQq.js";import"./preview-content-ziDhpr9V.js";import"./file-preview-i5I4Vmk2.js";import"./utils-VRidfAJX.js";import"./editor-BGAJHie_.js";import"./file-share-button-FS8XJyOj.js";function Yn({isThreadLocked:t,hasCloudProviderKeys:e}){return t?!1:!e}function Qn(){const t=$.c(3),e=Ss(),r=Re()?.isThreadLocked??!1,i=e.length>0;let a;return t[0]!==r||t[1]!==i?(a=Yn({isThreadLocked:r,hasCloudProviderKeys:i}),t[0]=r,t[1]=i,t[2]=a):a=t[2],a}function ve(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function Qe(t){if(!t)return"—";const e=typeof t=="string"?new Date(t):t;return isNaN(e.getTime())?"—":e.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function Xn(t){return t?t.replace(/-\d{8}(?:-[a-z0-9]+)*$/i,"").replace(/-/g," "):"—"}function Zn(t){const e=$.c(4),{items:n}=t;let r;e[0]!==n?(r=n.map(Jn),e[0]=n,e[1]=r):r=e[1];let i;return e[2]!==r?(i=s.jsx("div",{className:"grid grid-cols-2 gap-x-8 gap-y-6",children:r}),e[2]=r,e[3]=i):i=e[3],i}function Jn(t){return s.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[s.jsx("span",{className:"text-xs text-muted-foreground truncate",children:t.label}),s.jsx("span",{className:"text-sm text-foreground tabular-nums truncate",children:t.value})]},t.label)}function ea(t){const e=$.c(33),{userTokens:n,assistantTokens:r,otherTokens:i}=t,a=U(),l=n+r+i,d=l>0?n/l*100:0,u=l>0?r/l*100:0,o=l>0?i/l*100:0;let c;e[0]!==d?(c=d>0&&s.jsx("div",{className:"h-full bg-chart-1",style:{width:`${d}%`}}),e[0]=d,e[1]=c):c=e[1];let f;e[2]!==u?(f=u>0&&s.jsx("div",{className:"h-full bg-chart-2",style:{width:`${u}%`}}),e[2]=u,e[3]=f):f=e[3];let m;e[4]!==o?(m=o>0&&s.jsx("div",{className:"h-full bg-muted-foreground/30",style:{width:`${o}%`}}),e[4]=o,e[5]=m):m=e[5];let h;e[6]!==c||e[7]!==f||e[8]!==m?(h=s.jsxs("div",{className:"flex h-2 w-full overflow-hidden rounded-full bg-muted",children:[c,f,m]}),e[6]=c,e[7]=f,e[8]=m,e[9]=h):h=e[9];let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-1 shrink-0"}),e[10]=g):g=e[10];let j;e[11]!==a||e[12]!==d?(j=a("chat.contextPanel.userPercent",{pct:d.toFixed(1)}),e[11]=a,e[12]=d,e[13]=j):j=e[13];let k;e[14]!==j?(k=s.jsxs("div",{className:"flex items-center gap-1.5",children:[g,s.jsx("span",{className:"text-xs text-muted-foreground",children:j})]}),e[14]=j,e[15]=k):k=e[15];let p;e[16]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-2 shrink-0"}),e[16]=p):p=e[16];let b;e[17]!==u||e[18]!==a?(b=a("chat.contextPanel.assistantPercent",{pct:u.toFixed(1)}),e[17]=u,e[18]=a,e[19]=b):b=e[19];let y;e[20]!==b?(y=s.jsxs("div",{className:"flex items-center gap-1.5",children:[p,s.jsx("span",{className:"text-xs text-muted-foreground",children:b})]}),e[20]=b,e[21]=y):y=e[21];let v;e[22]!==o||e[23]!==i||e[24]!==a?(v=i>0&&s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-muted-foreground/30 shrink-0"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.otherPercent",{pct:o.toFixed(1)})})]}),e[22]=o,e[23]=i,e[24]=a,e[25]=v):v=e[25];let x;e[26]!==y||e[27]!==v||e[28]!==k?(x=s.jsxs("div",{className:"flex flex-wrap gap-x-3 gap-y-1",children:[k,y,v]}),e[26]=y,e[27]=v,e[28]=k,e[29]=x):x=e[29];let T;return e[30]!==x||e[31]!==h?(T=s.jsxs("div",{className:"flex flex-col gap-2",children:[h,x]}),e[30]=x,e[31]=h,e[32]=T):T=e[32],T}function ta(t){const e=$.c(14),{agentId:n,isError:r}=t,i=ce(n),a=U();let l;e[0]!==i?.title||e[1]!==a?(l=i?.title??a("chat.subtask.subtaskNoun"),e[0]=i?.title,e[1]=a,e[2]=l):l=e[2];const d=l,u=i?.icon??null;let o;e[3]!==u||e[4]!==d?(o=s.jsx(Dt,{icon:u,name:d,size:"xs",className:"size-6 rounded-md shrink-0"}),e[3]=u,e[4]=d,e[5]=o):o=e[5];const c=r?"text-destructive":"text-foreground";let f;e[6]!==c?(f=Y("shrink-0 font-medium",c),e[6]=c,e[7]=f):f=e[7];let m;e[8]!==d||e[9]!==f?(m=s.jsx("span",{className:f,children:d}),e[8]=d,e[9]=f,e[10]=m):m=e[10];let h;return e[11]!==o||e[12]!==m?(h=s.jsxs(s.Fragment,{children:[o,m]}),e[11]=o,e[12]=m,e[13]=h):h=e[13],h}function sa(t){const e=$.c(12),{isError:n}=t,r=U();let i;e[0]!==r?(i=r("chat.contextPanel.subtask"),e[0]=r,e[1]=i):i=e[1];const a=i;let l;e[2]!==a?(l=s.jsx(Dt,{icon:null,name:a,size:"xs",className:"size-6 rounded-md shrink-0"}),e[2]=a,e[3]=l):l=e[3];const d=n?"text-destructive":"text-foreground";let u;e[4]!==d?(u=Y("shrink-0 font-medium",d),e[4]=d,e[5]=u):u=e[5];let o;e[6]!==a||e[7]!==u?(o=s.jsx("span",{className:u,children:a}),e[6]=a,e[7]=u,e[8]=o):o=e[8];let c;return e[9]!==l||e[10]!==o?(c=s.jsxs(s.Fragment,{children:[l,o]}),e[9]=l,e[10]=o,e[11]=c):c=e[11],c}function na(t){const e=$.c(18),{part:n}=t,r=n.input?.agent_id,i=n.state==="input-streaming"||n.state==="input-available"||n.state==="output-available"&&n.preliminary===!0,a=n.state==="output-error",l=n.state==="approval-requested";let d;e[0]!==a?(d=s.jsx(sa,{isError:a}),e[0]=a,e[1]=d):d=e[1];let u;e[2]!==r||e[3]!==a?(u=s.jsx(ta,{agentId:r,isError:a}),e[2]=r,e[3]=a,e[4]=u):u=e[4];let o;e[5]!==d||e[6]!==u?(o=s.jsx(O.Suspense,{fallback:d,children:u}),e[5]=d,e[6]=u,e[7]=o):o=e[7];let c;e[8]!==n.input?(c=n.input?.prompt&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-muted-foreground/50",children:"·"}),s.jsx("span",{className:"truncate text-muted-foreground",children:n.input.prompt})]}),e[8]=n.input,e[9]=c):c=e[9];let f;e[10]!==l||e[11]!==a||e[12]!==i?(f=s.jsx("span",{className:"ml-auto shrink-0",children:i?s.jsx(je,{className:"size-3 text-muted-foreground"}):a?s.jsx(Ts,{size:12,className:"text-destructive"}):l?s.jsx(rt,{size:12,className:"text-warning"}):s.jsx(Ns,{size:12,className:"text-success"})}),e[10]=l,e[11]=a,e[12]=i,e[13]=f):f=e[13];let m;return e[14]!==o||e[15]!==c||e[16]!==f?(m=s.jsxs("div",{className:"flex items-center gap-2 text-xs min-w-0",children:[o,c,f]}),e[14]=o,e[15]=c,e[16]=f,e[17]=m):m=e[17],m}function aa(t){const e=$.c(51),{onClose:n,back:r,className:i}=t,a=U(),[l,d]=O.useState(null),{messages:u}=At(),{activeTask:o}=Ee(),{selectedModel:c,selectedVirtualMcp:f}=It(),m=js(u),h=[...u].reverse().find(pa),g=h?.metadata?.usage,j=h?.metadata?.modelLimits?.contextWindow??c?.limits?.contextWindow??null,k=g?.contextTokens??0,p=j&&j>0?(k/j*100).toFixed(1):null,b=u;let y;e[0]!==b?(y=b.filter(ha).reduce(ma,0),e[0]=b,e[1]=y):y=e[1];const v=y,x=u;let T;e[2]!==x?(T=x.filter(fa).reduce(ua,0),e[2]=x,e[3]=T):T=e[3];const S=T,N=Math.max(0,m.totalTokens-v-S),w=u[0],_=u.at(-1),C=w?.metadata?.created_at??o?.created_at,L=_?.metadata?.created_at??o?.updated_at,P=u.filter(da),I=u.flatMap(oa),A=c?.modelId?Xn(c.modelId):"—",D=f?.title??"Super Agent",F=Fs(),R=[{label:a("chat.contextPanel.sessionLabel"),value:o?.title??a("chat.contextPanel.newChat")},{label:a("chat.contextPanel.messagesLabel"),value:P.length},{label:a("chat.contextPanel.agentLabel"),value:D},...F?[{label:a("chat.contextPanel.modelLabel"),value:A}]:[],{label:a("chat.contextPanel.contextLimitLabel"),value:j?ve(j):"—"},{label:a("chat.contextPanel.sessionTokensLabel"),value:m.totalTokens>0?ve(m.totalTokens):"0"},{label:a("chat.contextPanel.usageLabel"),value:p!==null?`${p}%`:"—"},{label:a("chat.contextPanel.inputTokensLabel"),value:m.inputTokens>0?ve(m.inputTokens):"0"},{label:a("chat.contextPanel.outputTokensLabel"),value:m.outputTokens>0?ve(m.outputTokens):"0"},{label:a("chat.contextPanel.reasoningTokensLabel"),value:m.reasoningTokens>0?ve(m.reasoningTokens):"0"},...F?[{label:a("chat.contextPanel.costLabel"),value:m.cost>0?`$${m.cost<.001?m.cost.toFixed(6):m.cost.toFixed(4)}`:"$0.00"}]:[],{label:a("chat.contextPanel.sessionCreatedLabel"),value:Qe(C)},{label:a("chat.contextPanel.lastActivityLabel"),value:Qe(L)}];if(!o&&P.length===0){let H;e[4]!==i?(H=Y("flex flex-col h-full w-full border-l border-border bg-background",i),e[4]=i,e[5]=H):H=e[5];let q;e[6]!==a?(q=a("chat.contextPanel.title"),e[6]=a,e[7]=q):q=e[7];let ae;e[8]!==q?(ae=s.jsx("span",{className:"text-sm font-medium text-foreground",children:q}),e[8]=q,e[9]=ae):ae=e[9];let ie;e[10]!==r?(ie=r?s.jsx(ht,{size:14,className:"text-muted-foreground"}):s.jsx(pt,{size:14,className:"text-muted-foreground"}),e[10]=r,e[11]=ie):ie=e[11];let J;e[12]!==n||e[13]!==ie?(J=s.jsx("button",{type:"button",onClick:n,className:"flex size-6 items-center justify-center hover:bg-accent transition-colors rounded-lg",children:ie}),e[12]=n,e[13]=ie,e[14]=J):J=e[14];let oe;e[15]!==ae||e[16]!==J?(oe=s.jsxs("div",{className:"h-11 px-4 flex items-center justify-between shrink-0 border-b border-border/50",children:[ae,J]}),e[15]=ae,e[16]=J,e[17]=oe):oe=e[17];let te;e[18]!==a?(te=a("chat.contextPanel.emptyState"),e[18]=a,e[19]=te):te=e[19];let se;e[20]!==te?(se=s.jsx("div",{className:"flex-1 flex items-center justify-center px-4 text-center",children:s.jsx("p",{className:"text-xs text-muted-foreground",children:te})}),e[20]=te,e[21]=se):se=e[21];let re;return e[22]!==oe||e[23]!==se||e[24]!==H?(re=s.jsxs("div",{className:H,children:[oe,se]}),e[22]=oe,e[23]=se,e[24]=H,e[25]=re):re=e[25],re}let M;e[26]!==i?(M=Y("flex flex-col h-full w-full border-l border-border bg-background overflow-y-auto",i),e[26]=i,e[27]=M):M=e[27];let G;e[28]!==a?(G=a("chat.contextPanel.title"),e[28]=a,e[29]=G):G=e[29];let B;e[30]!==G?(B=s.jsx("span",{className:"text-sm font-medium text-foreground",children:G}),e[30]=G,e[31]=B):B=e[31];let V;e[32]!==r?(V=r?s.jsx(ht,{size:14}):s.jsx(pt,{size:14}),e[32]=r,e[33]=V):V=e[33];let E;e[34]!==n||e[35]!==V?(E=s.jsx("button",{type:"button",onClick:n,className:"flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:V}),e[34]=n,e[35]=V,e[36]=E):E=e[36];let Q;e[37]!==B||e[38]!==E?(Q=s.jsxs("div",{className:"flex h-11 shrink-0 items-center justify-between border-b border-border/50 px-4",children:[B,E]}),e[37]=B,e[38]=E,e[39]=Q):Q=e[39];let K;e[40]!==a?(K=a("chat.contextPanel.contextBreakdownSection"),e[40]=a,e[41]=K):K=e[41];let W;e[42]!==K?(W=s.jsx("span",{className:"text-xs text-muted-foreground",children:K}),e[42]=K,e[43]=W):W=e[43];let X;e[44]!==S||e[45]!==N||e[46]!==v?(X=s.jsx(ea,{userTokens:v,assistantTokens:S,otherTokens:N}),e[44]=S,e[45]=N,e[46]=v,e[47]=X):X=e[47];let Z;return e[48]!==W||e[49]!==X?(Z=s.jsxs("div",{className:"flex flex-col gap-3",children:[W,X]}),e[48]=W,e[49]=X,e[50]=Z):Z=e[50],s.jsxs("div",{className:M,children:[Q,s.jsxs("div",{className:"flex flex-col gap-8 p-6",children:[I.length>0&&s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.subtasksSection")}),s.jsx("div",{className:"flex flex-col gap-1",children:I.map(la)})]}),s.jsx(Zn,{items:R}),Z,P.length>0&&s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.rawMessagesSection")}),s.jsx("div",{className:"flex flex-col gap-1",children:P.map(H=>{const q=H.metadata?.created_at,ae=l?.id===H.id;return s.jsxs("div",{className:"rounded-md border border-border/50 overflow-hidden",children:[s.jsxs("button",{type:"button",onClick:()=>d(ae?null:H),className:"flex items-center justify-between gap-2 px-3 py-2 text-xs hover:bg-accent/50 w-full text-left cursor-pointer",children:[s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx("span",{className:Y("shrink-0 font-medium",H.role==="user"?"text-chart-1":"text-chart-2"),children:H.role}),s.jsx("span",{className:"text-muted-foreground",children:"•"}),s.jsx("span",{className:"truncate text-muted-foreground font-mono",children:H.id})]}),q&&s.jsx("span",{className:"shrink-0 text-muted-foreground tabular-nums",children:Qe(q)})]}),ae&&s.jsxs(s.Fragment,{children:[H.role==="assistant"&&(()=>{const ie=H.metadata?._request;if(!ie)return null;const J=ie.systemSections??[],oe=Math.max(1,...J.map(ia)),te=J.reduce(ra,0);return s.jsxs("div",{className:"border-t border-border/50 px-3 py-2.5 text-xs space-y-2.5",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"font-medium text-foreground",children:a("chat.contextPanel.requestLabel")}),s.jsxs("span",{className:"text-muted-foreground tabular-nums",children:[ie.activeTools??0," / ",ie.tools??0," ",a("chat.contextPanel.toolsActive")]})]}),J.length>0&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsxs("div",{className:"text-muted-foreground",children:[a("chat.contextPanel.systemPromptLabel")," ",s.jsxs("span",{className:"tabular-nums",children:["~",Math.round(te/4).toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),J.map((se,re)=>{const de=se.preview.match(/^<([a-z-]+)/i)?.[1]??`section ${re}`,ge=se.chars/oe*100,ue=Math.round(se.chars/4);return s.jsxs("div",{className:"space-y-0.5",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx("span",{className:"font-mono text-foreground truncate",children:de}),s.jsxs("span",{className:"text-muted-foreground tabular-nums shrink-0",children:["~",ue.toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),s.jsx("div",{className:"h-1 w-full rounded-full bg-muted overflow-hidden",children:s.jsx("div",{className:"h-full rounded-full bg-chart-3",style:{width:`${ge}%`}})})]},re)})]})]})})(),s.jsx("pre",{className:"text-xs font-mono bg-muted px-3 py-2 overflow-auto whitespace-pre-wrap break-all border-t border-border/50 max-h-64",children:JSON.stringify(H,null,2)})]})]},H.id)})})]})]})]})}function ra(t,e){return t+e.chars}function ia(t){return t.chars}function la(t,e){return s.jsx(na,{part:t},e)}function oa(t){return(t.parts??[]).filter(ca)}function ca(t){return t.type==="tool-subtask"}function da(t){return t.role!=="system"}function ua(t,e){const n=e.metadata?.usage;return t+(n?.outputTokens??0)}function fa(t){return t.role==="assistant"}function ma(t,e){const n=e.metadata?.usage;return t+(n?.inputTokens??0)}function ha(t){return t.role==="user"}function pa(t){return t.role==="assistant"&&t.metadata?.usage}function xa(t){const e=$.c(21),{onOpenContextPanel:n}=t,{org:r}=le(),{selectedVirtualMcp:i}=It();let a;e[0]!==r.id?(a=ke(r.id),e[0]=r.id,e[1]=a):a=e[1];const d=i??a,o=ce(d.id)??d,c=o.title??"Super Agent",f=o.icon??null,m=o.description??null;let h;e[2]!==f||e[3]!==c?(h=s.jsx(ye,{icon:f,name:c,size:"lg"}),e[2]=f,e[3]=c,e[4]=h):h=e[4];let g;e[5]!==c?(g=s.jsx("h2",{className:"text-2xl font-semibold tracking-tight text-foreground",children:c}),e[5]=c,e[6]=g):g=e[6];let j;e[7]!==m?(j=m?s.jsx("p",{className:"text-sm text-muted-foreground max-w-md text-balance",children:m}):null,e[7]=m,e[8]=j):j=e[8];let k;e[9]!==g||e[10]!==j?(k=s.jsxs("div",{className:"space-y-1.5",children:[g,j]}),e[9]=g,e[10]=j,e[11]=k):k=e[11];let p;e[12]!==h||e[13]!==k?(p=s.jsxs("div",{className:"flex-1 min-h-0 flex flex-col items-center justify-center gap-4 px-6 text-center overflow-hidden",children:[h,k]}),e[12]=h,e[13]=k,e[14]=p):p=e[14];let b;e[15]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(ee.IceBreakers,{className:"pb-3"}),e[15]=b):b=e[15];let y;e[16]!==n?(y=s.jsxs(ee.Footer,{children:[b,s.jsx(ee.Input,{onOpenContextPanel:n})]}),e[16]=n,e[17]=y):y=e[17];let v;return e[18]!==p||e[19]!==y?(v=s.jsxs(s.Fragment,{children:[p,y]}),e[18]=p,e[19]=y,e[20]=v):v=e[20],v}function bt(t){const e=$.c(17),{outputs:n,collapsed:r,onToggle:i,variant:a}=t,l=a==="card"?"rounded-xl border border-border bg-muted/95 shadow-sm backdrop-blur-sm":"border-b border-border bg-background";let d;e[0]!==l?(d=Y(l),e[0]=l,e[1]=d):d=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("span",{className:"text-sm font-medium text-foreground",children:"Files in this task"}),e[2]=u):u=e[2];const o=r&&"-rotate-90";let c;e[3]!==o?(c=Y("size-4 text-muted-foreground transition-transform",o),e[3]=o,e[4]=c):c=e[4];let f;e[5]!==c?(f=s.jsx(it,{className:c}),e[5]=c,e[6]=f):f=e[6];let m;e[7]!==i||e[8]!==f?(m=s.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center justify-between px-3 py-2.5 text-left",children:[u,f]}),e[7]=i,e[8]=f,e[9]=m):m=e[9];let h;e[10]!==r||e[11]!==n?(h=!r&&s.jsx("div",{className:"flex max-h-72 flex-col gap-1.5 overflow-y-auto px-2 pb-2",children:n.map(ga)}),e[10]=r,e[11]=n,e[12]=h):h=e[12];let g;return e[13]!==d||e[14]!==m||e[15]!==h?(g=s.jsxs("div",{className:d,children:[m,h]}),e[13]=d,e[14]=m,e[15]=h,e[16]=g):g=e[16],g}function ga(t){return s.jsx(Rs,{file:t},t.key)}function ba(){const t=$.c(13),e=Re()?.taskId??null,n=Es();let r;t[0]!==n?(r={enabled:n},t[0]=n,t[1]=r):r=t[1];const{data:i}=Os(e,r),[a,l]=O.useState(!1),[d,u]=O.useState(!0);if(!e||!i||i.length===0)return null;let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=()=>l(ja),t[2]=o):o=t[2];let c;t[3]!==a||t[4]!==i?(c=s.jsx("div",{className:"absolute top-2 right-2 z-10 hidden w-72 @[1280px]:block",children:s.jsx(bt,{variant:"card",outputs:i,collapsed:a,onToggle:o})}),t[3]=a,t[4]=i,t[5]=c):c=t[5];let f;t[6]===Symbol.for("react.memo_cache_sentinel")?(f=()=>u(va),t[6]=f):f=t[6];let m;t[7]!==d||t[8]!==i?(m=s.jsx("div",{className:"shrink-0 @[1280px]:hidden",children:s.jsx(bt,{variant:"bar",outputs:i,collapsed:d,onToggle:f})}),t[7]=d,t[8]=i,t[9]=m):m=t[9];let h;return t[10]!==c||t[11]!==m?(h=s.jsxs(s.Fragment,{children:[c,m]}),t[10]=c,t[11]=m,t[12]=h):h=t[12],h}function va(t){return!t}function ja(t){return!t}function ya(){const t=$.c(31),{org:e}=le(),n=Re(),{isChatEmpty:r}=At(),[i,a]=O.useState("chat"),l=Bs(),d=Qn(),{runtime:u}=Mt(n?.virtualMcpId);if(d&&u!=="cms"){let _;return t[0]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(ee,{className:"animate-in fade-in-0 duration-200",children:s.jsx(ee.Main,{className:"flex flex-col items-center",children:s.jsx(ee.EmptyState,{children:s.jsx(ee.NoAiProviderEmptyState,{})})})}),t[0]=_):_=t[0],_}let c;t[1]!==l.hasDecoKey||t[2]!==l.hasOnlyDecoProvider||t[3]!==l.isLoading||t[4]!==l.isZeroBalance||t[5]!==r||t[6]!==e?(c=l.hasDecoKey&&l.isZeroBalance&&l.hasOnlyDecoProvider&&!l.isLoading&&r&&!ps(e.id),t[1]=l.hasDecoKey,t[2]=l.hasOnlyDecoProvider,t[3]=l.isLoading,t[4]=l.isZeroBalance,t[5]=r,t[6]=e,t[7]=c):c=t[7];const f=c;let m;t[8]!==f?(m=f&&s.jsx(ee.CreditsEmptyState,{}),t[8]=f,t[9]=m):m=t[9];const h=i!=="chat"?!0:void 0,g=i!=="chat",j=i!=="chat"?"opacity-0 pointer-events-none":"opacity-100";let k;t[10]!==j?(k=Y("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",j),t[10]=j,t[11]=k):k=t[11];let p;t[12]!==r||t[13]!==u?(p=r&&u!=="cms"?s.jsx(xa,{onOpenContextPanel:()=>a("context")}):s.jsxs(s.Fragment,{children:[s.jsxs(ee.Main,{className:"relative flex flex-col overflow-hidden @container",children:[s.jsx(ba,{}),s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(ee.Messages,{})})]}),s.jsx(ee.Footer,{children:s.jsx(ee.Input,{onOpenContextPanel:()=>a("context")})})]}),t[12]=r,t[13]=u,t[14]=p):p=t[14];let b;t[15]!==h||t[16]!==g||t[17]!==k||t[18]!==p?(b=s.jsx("div",{inert:h,"aria-hidden":g,className:k,children:p}),t[15]=h,t[16]=g,t[17]=k,t[18]=p,t[19]=b):b=t[19];const y=i!=="context"?!0:void 0,v=i!=="context",x=i==="context"?"opacity-100":"opacity-0 pointer-events-none";let T;t[20]!==x?(T=Y("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",x),t[20]=x,t[21]=T):T=t[21];let S;t[22]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(aa,{back:!0,onClose:()=>a("chat")}),t[22]=S):S=t[22];let N;t[23]!==T||t[24]!==y||t[25]!==v?(N=s.jsx("div",{inert:y,"aria-hidden":v,className:T,children:S}),t[23]=T,t[24]=y,t[25]=v,t[26]=N):N=t[26];let w;return t[27]!==m||t[28]!==N||t[29]!==b?(w=s.jsxs(ee,{className:"relative overflow-hidden animate-in fade-in-0 duration-200",children:[m,b,N]}),t[27]=m,t[28]=N,t[29]=b,t[30]=w):w=t[30],w}function ka(){const t=$.c(7),e=U();let n;t[0]!==e?(n=e("agentShellLayout.agentShellLayout.chatLoadingError"),t[0]=e,t[1]=n):n=t[1];let r;t[2]!==n?(r=s.jsx("div",{role:"alert",className:"flex h-full flex-1 items-center justify-center text-sm text-muted-foreground",children:n}),t[2]=n,t[3]=r):r=t[3];let i;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Le,{children:s.jsx(ya,{})}),t[4]=i):i=t[4];let a;return t[5]!==r?(a=s.jsx(Tt,{fallback:r,children:i}),t[5]=r,t[6]=a):a=t[6],a}function Sa(t){const e=$.c(10),{org:n}=le(),r=Zs(),{data:i}=$e.useSession(),a=i?.user?.id,l=t?.id??null,d=!!t&&!!a&&!!t.created_by&&t.created_by!==a;let u;e[0]!==n.id||e[1]!==l?(u=_t.viewedThreadMetadataRefresh(n.id,l??""),e[0]=n.id,e[1]=l,e[2]=u):u=e[2];const o=!!r&&!!l&&d;let c;e[3]!==r||e[4]!==l?(c=async()=>(await r?.refreshThreadMetadata(l??""),!0),e[3]=r,e[4]=l,e[5]=c):c=e[5];let f;e[6]!==u||e[7]!==o||e[8]!==c?(f={queryKey:u,enabled:o,staleTime:Number.POSITIVE_INFINITY,queryFn:c},e[6]=u,e[7]=o,e[8]=c,e[9]=f):f=e[9],nt(f)}function Xe(t){const e=$.c(14),{label:n,value:r,onChange:i,options:a}=t;let l;e[0]!==n?(l=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),e[0]=n,e[1]=l):l=e[1];let d;e[2]!==i?(d=f=>f&&i(f),e[2]=i,e[3]=d):d=e[3];let u;e[4]!==a?(u=a.map(Na),e[4]=a,e[5]=u):u=e[5];let o;e[6]!==n||e[7]!==d||e[8]!==u||e[9]!==r?(o=s.jsx(un,{type:"single",size:"sm",value:r,onValueChange:d,"aria-label":n,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:u}),e[6]=n,e[7]=d,e[8]=u,e[9]=r,e[10]=o):o=e[10];let c;return e[11]!==l||e[12]!==o?(c=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l,o]}),e[11]=l,e[12]=o,e[13]=c):c=e[13],c}function Na(t){return s.jsxs(dn,{value:t.value,className:"h-6 gap-1.5 rounded-lg border border-transparent px-2 text-xs font-medium text-muted-foreground hover:bg-transparent data-[state=on]:border-border data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm",children:[t.icon,t.label]},t.value)}function Ta(t){const e=$.c(91),{panel:n,className:r}=t,i=r===void 0?"md:size-[34px]":r,a=U();let l;e[0]!==a?(l=a("sidebar.taskGroupsList.filterChats"),e[0]=a,e[1]=l):l=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(_s,{size:16}),e[2]=d):d=e[2];let u;e[3]!==n.filtersActive?(u=n.filtersActive&&s.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"}),e[3]=n.filtersActive,e[4]=u):u=e[4];let o;e[5]!==i||e[6]!==n.filtersActive||e[7]!==l||e[8]!==u?(o=s.jsx(Oe,{asChild:!0,children:s.jsx(Bt,{asChild:!0,children:s.jsxs(Ae,{"aria-label":l,active:n.filtersActive,className:i,children:[d,u]})})}),e[5]=i,e[6]=n.filtersActive,e[7]=l,e[8]=u,e[9]=o):o=e[9];let c;e[10]!==a?(c=a("sidebar.taskGroupsList.filterChats"),e[10]=a,e[11]=c):c=e[11];let f;e[12]!==c?(f=s.jsx(Be,{side:"bottom",children:c}),e[12]=c,e[13]=f):f=e[13];let m;e[14]!==o||e[15]!==f?(m=s.jsxs(ze,{children:[o,f]}),e[14]=o,e[15]=f,e[16]=m):m=e[16];let h;e[17]!==a?(h=a("sidebar.taskGroupsList.filterView"),e[17]=a,e[18]=h):h=e[18];const g=n.groupBy;let j;e[19]!==n?(j=q=>{xe("tasks_panel_group_by_changed",{to_value:q}),n.setGroupBy(q)},e[19]=n,e[20]=j):j=e[20];let k;e[21]!==a?(k=a("sidebar.taskGroupsList.viewList"),e[21]=a,e[22]=k):k=e[22];let p;e[23]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(ws,{size:13}),e[23]=p):p=e[23];let b;e[24]!==k?(b={value:"flat",label:k,icon:p},e[24]=k,e[25]=b):b=e[25];let y;e[26]!==a?(y=a("sidebar.taskGroupsList.viewStatus"),e[26]=a,e[27]=y):y=e[27];let v;e[28]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Cs,{size:13}),e[28]=v):v=e[28];let x;e[29]!==y?(x={value:"status",label:y,icon:v},e[29]=y,e[30]=x):x=e[30];let T;e[31]!==b||e[32]!==x?(T=[b,x],e[31]=b,e[32]=x,e[33]=T):T=e[33];let S;e[34]!==n.groupBy||e[35]!==j||e[36]!==T||e[37]!==h?(S=s.jsx(Xe,{label:h,value:g,onChange:j,options:T}),e[34]=n.groupBy,e[35]=j,e[36]=T,e[37]=h,e[38]=S):S=e[38];let N;e[39]!==a?(N=a("sidebar.taskGroupsList.filterType"),e[39]=a,e[40]=N):N=e[40];const w=n.typeFilter;let _;e[41]!==n?(_=q=>{xe("tasks_panel_filter_changed",{to_value:q}),n.setTypeFilter(q)},e[41]=n,e[42]=_):_=e[42];let C;e[43]!==a?(C=a("sidebar.taskGroupsList.typeAll"),e[43]=a,e[44]=C):C=e[44];let L;e[45]!==C?(L={value:"all",label:C},e[45]=C,e[46]=L):L=e[46];let P;e[47]!==a?(P=a("sidebar.taskGroupsList.typeChats"),e[47]=a,e[48]=P):P=e[48];let I;e[49]!==P?(I={value:"manual",label:P},e[49]=P,e[50]=I):I=e[50];let A;e[51]!==a?(A=a("sidebar.taskGroupsList.typeAuto"),e[51]=a,e[52]=A):A=e[52];let D;e[53]!==A?(D={value:"automation",label:A},e[53]=A,e[54]=D):D=e[54];let F;e[55]!==L||e[56]!==I||e[57]!==D?(F=[L,I,D],e[55]=L,e[56]=I,e[57]=D,e[58]=F):F=e[58];let R;e[59]!==n.typeFilter||e[60]!==N||e[61]!==_||e[62]!==F?(R=s.jsx(Xe,{label:N,value:w,onChange:_,options:F}),e[59]=n.typeFilter,e[60]=N,e[61]=_,e[62]=F,e[63]=R):R=e[63];let M;e[64]!==a?(M=a("sidebar.taskGroupsList.filterScope"),e[64]=a,e[65]=M):M=e[65];const G=n.showAll?"team":"mine";let B;e[66]!==n?(B=q=>n.setShowAll(q==="team"),e[66]=n,e[67]=B):B=e[67];let V;e[68]!==a?(V=a("sidebar.taskGroupsList.scopeMine"),e[68]=a,e[69]=V):V=e[69];let E;e[70]!==V?(E={value:"mine",label:V},e[70]=V,e[71]=E):E=e[71];let Q;e[72]!==a?(Q=a("sidebar.taskGroupsList.scopeTeam"),e[72]=a,e[73]=Q):Q=e[73];let K;e[74]!==Q?(K={value:"team",label:Q},e[74]=Q,e[75]=K):K=e[75];let W;e[76]!==E||e[77]!==K?(W=[E,K],e[76]=E,e[77]=K,e[78]=W):W=e[78];let X;e[79]!==M||e[80]!==G||e[81]!==B||e[82]!==W?(X=s.jsx(Xe,{label:M,value:G,onChange:B,options:W}),e[79]=M,e[80]=G,e[81]=B,e[82]=W,e[83]=X):X=e[83];let Z;e[84]!==S||e[85]!==R||e[86]!==X?(Z=s.jsxs(zt,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[S,R,X]}),e[84]=S,e[85]=R,e[86]=X,e[87]=Z):Z=e[87];let H;return e[88]!==Z||e[89]!==m?(H=s.jsxs(Gt,{children:[m,Z]}),e[88]=Z,e[89]=m,e[90]=H):H=e[90],H}function _a(t,e){return t.filter(n=>n.id===e||!!n.trigger_id||ln(n))}function wa(){const t=$.c(2),e=$t()??[];let n;return t[0]!==e?(n=r=>{if(!r)return;const i=e.find(a=>a.id===r);return i?Ft(i.metadata):void 0},t[0]=e,t[1]=n):n=t[1],n}function Ca(t){const e=$.c(9),{virtualMcpId:n,size:r,showAutomationBadge:i}=t,a=r===void 0?"sm":r,l=U();let d;e[0]!==a||e[1]!==n?(d=n?s.jsx(Pa,{virtualMcpId:n,size:a}):s.jsx(ye,{icon:null,name:"?",size:a}),e[0]=a,e[1]=n,e[2]=d):d=e[2];let u;e[3]!==i||e[4]!==l?(u=i&&s.jsx("span",{"aria-label":l("tasksPanel.mcpAvatar.automationTriggered"),className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-special border border-special text-special-foreground",children:s.jsx(Kt,{size:10,className:"text-white"})}),e[3]=i,e[4]=l,e[5]=u):u=e[5];let o;return e[6]!==d||e[7]!==u?(o=s.jsxs("div",{className:"relative shrink-0",children:[d,u]}),e[6]=d,e[7]=u,e[8]=o):o=e[8],o}function Pa(t){const e=$.c(6),{virtualMcpId:n,size:r}=t,i=ce(n);if(!i){let d;return e[0]!==r?(d=s.jsx(ye,{icon:null,name:"?",size:r}),e[0]=r,e[1]=d):d=e[1],d}const a=i.icon??null;let l;return e[2]!==i.title||e[3]!==r||e[4]!==a?(l=s.jsx(ye,{icon:a,name:i.title,size:r}),e[2]=i.title,e[3]=r,e[4]=a,e[5]=l):l=e[5],l}const vt=["thread"];function Aa(t){const e=$.c(53),{open:n,onOpenChange:r}=t,[i,a]=O.useState(""),{org:l}=le(),{setTaskId:d}=lt(),u=at(),o=U();let c,f,m,h;e[0]!==l.id||e[1]!==i?(h=i.trim(),c=h?20:10,m=nt,f=_t.globalSearch(l.id,h,c,vt),e[0]=l.id,e[1]=i,e[2]=c,e[3]=f,e[4]=m,e[5]=h):(c=e[2],f=e[3],m=e[4],h=e[5]);let g;e[6]!==c||e[7]!==u||e[8]!==h?(g=async()=>{const M=await u.call("GLOBAL_SEARCH",{query:h,limit:c,types:[...vt]});return{...M,items:M.items.filter(Ia)}},e[6]=c,e[7]=u,e[8]=h,e[9]=g):g=e[9];let j;e[10]!==n||e[11]!==f||e[12]!==g?(j={queryKey:f,enabled:n,queryFn:g,staleTime:1e4},e[10]=n,e[11]=f,e[12]=g,e[13]=j):j=e[13];const{data:k,isFetching:p}=m(j);let b;e[14]!==k?.items?(b=k?.items??[],e[14]=k?.items,e[15]=b):b=e[15];const y=b;let v;e[16]!==r?(v=M=>{M||a(""),r(M)},e[16]=r,e[17]=v):v=e[17];const x=v;let T;e[18]!==x||e[19]!==d?(T=M=>{x(!1),d(M.id,M.virtual_mcp_id??void 0)},e[18]=x,e[19]=d,e[20]=T):T=e[20];const S=T;let N;e[21]!==o?(N=o("tasksPanel.globalSearchDialog.title"),e[21]=o,e[22]=N):N=e[22];let w;e[23]!==N?(w=s.jsx(pn,{children:N}),e[23]=N,e[24]=w):w=e[24];let _;e[25]!==o?(_=o("tasksPanel.globalSearchDialog.description"),e[25]=o,e[26]=_):_=e[26];let C;e[27]!==_?(C=s.jsx(xn,{children:_}),e[27]=_,e[28]=C):C=e[28];let L;e[29]!==C||e[30]!==w?(L=s.jsxs(gn,{className:"sr-only",children:[w,C]}),e[29]=C,e[30]=w,e[31]=L):L=e[31];let P;e[32]!==o?(P=o("tasksPanel.globalSearchDialog.placeholder"),e[32]=o,e[33]=P):P=e[33];let I;e[34]!==i||e[35]!==P?(I=s.jsx(Nn,{value:i,onValueChange:a,placeholder:P}),e[34]=i,e[35]=P,e[36]=I):I=e[36];let A;e[37]!==S||e[38]!==p||e[39]!==y||e[40]!==o||e[41]!==h?(A=s.jsx(jn,{children:p&&y.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:o("tasksPanel.globalSearchDialog.searching")}):y.length===0?s.jsx(yn,{children:o("tasksPanel.globalSearchDialog.noResults")}):s.jsx(kn,{heading:h?void 0:o("tasksPanel.globalSearchDialog.recent"),children:y.map(M=>M.type==="thread"?s.jsxs(Sn,{value:`thread:${M.id}:${M.title}`,onSelect:()=>S(M),className:"gap-2.5",children:[s.jsx(Ca,{virtualMcpId:M.virtual_mcp_id,size:"xs"}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("div",{className:"text-sm text-foreground truncate",children:M.title||o("tasksPanel.globalSearchDialog.untitledChat")})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(M.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${M.id}`):null)})}),e[37]=S,e[38]=p,e[39]=y,e[40]=o,e[41]=h,e[42]=A):A=e[42];let D;e[43]!==I||e[44]!==A?(D=s.jsxs(Tn,{shouldFilter:!1,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:[I,A]}),e[43]=I,e[44]=A,e[45]=D):D=e[45];let F;e[46]!==L||e[47]!==D?(F=s.jsxs(bn,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[L,D]}),e[46]=L,e[47]=D,e[48]=F):F=e[48];let R;return e[49]!==x||e[50]!==n||e[51]!==F?(R=s.jsx(vn,{open:n,onOpenChange:x,children:F}),e[49]=x,e[50]=n,e[51]=F,e[52]=R):R=e[52],R}function Ia(t){return t.type==="thread"}function Ma(t){const e=$.c(43),{branch:n,onOutcome:r}=t,i=U();let a;e[0]!==r?(a=S=>{S||r("cancel")},e[0]=r,e[1]=a):a=e[1];let l;e[2]!==i?(l=i("sidebar.archiveWorktreeDialog.title"),e[2]=i,e[3]=l):l=e[3];let d;e[4]!==l?(d=s.jsx(_n,{children:l}),e[4]=l,e[5]=d):d=e[5];let u;e[6]!==i?(u=i("sidebar.archiveWorktreeDialog.stopsAndDeletesBefore"),e[6]=i,e[7]=u):u=e[7];let o;e[8]!==n?(o=s.jsx("span",{className:"font-mono",children:n}),e[8]=n,e[9]=o):o=e[9];let c;e[10]!==i?(c=i("sidebar.archiveWorktreeDialog.stopsAndDeletesAfter"),e[10]=i,e[11]=c):c=e[11];let f;e[12]!==u||e[13]!==o||e[14]!==c?(f=s.jsxs(wn,{children:[u," ",o," ",c]}),e[12]=u,e[13]=o,e[14]=c,e[15]=f):f=e[15];let m;e[16]!==d||e[17]!==f?(m=s.jsxs(Cn,{children:[d,f]}),e[16]=d,e[17]=f,e[18]=m):m=e[18];let h;e[19]!==r?(h=()=>r("cancel"),e[19]=r,e[20]=h):h=e[20];let g;e[21]!==i?(g=i("sidebar.archiveWorktreeDialog.cancel"),e[21]=i,e[22]=g):g=e[22];let j;e[23]!==g||e[24]!==h?(j=s.jsx(Pn,{onClick:h,children:g}),e[23]=g,e[24]=h,e[25]=j):j=e[25];let k;e[26]===Symbol.for("react.memo_cache_sentinel")?(k=Y(ss({variant:"destructive"})),e[26]=k):k=e[26];let p;e[27]!==r?(p=()=>r("confirm"),e[27]=r,e[28]=p):p=e[28];let b;e[29]!==i?(b=i("sidebar.archiveWorktreeDialog.confirm"),e[29]=i,e[30]=b):b=e[30];let y;e[31]!==p||e[32]!==b?(y=s.jsx(An,{className:k,onClick:p,children:b}),e[31]=p,e[32]=b,e[33]=y):y=e[33];let v;e[34]!==j||e[35]!==y?(v=s.jsxs(In,{children:[j,y]}),e[34]=j,e[35]=y,e[36]=v):v=e[36];let x;e[37]!==v||e[38]!==m?(x=s.jsxs(Mn,{children:[m,v]}),e[37]=v,e[38]=m,e[39]=x):x=e[39];let T;return e[40]!==a||e[41]!==x?(T=s.jsx(Ln,{open:!0,onOpenChange:a,children:x}),e[40]=a,e[41]=x,e[42]=T):T=e[42],T}function La(t,e,n){if(!n)return;const r=t.findIndex(i=>i.id===e);if(r!==-1){for(let i=r+1;i<t.length;i++){const a=t[i];if(a?.created_by===n)return a}for(let i=r-1;i>=0;i--){const a=t[i];if(a?.created_by===n)return a}}}function $a(t){return t==="ephemeral"||t.startsWith("thread:")}function Qt(t){const e=$.c(45),{task:n,isActive:r,onClick:i,onArchive:a,showAutomationBadge:l,showAgentIcon:d,hideStatusIdle:u,indented:o}=t,c=U(),f=$n(n.status),m=f.icon,h=n.metadata?.kind==="tool_call_run",g=ce(h?void 0:n.virtual_mcp_id);let j;e[0]!==g?(j=Ot(g),e[0]=g,e[1]=j):j=e[1];const k=j;zs(6e4);const p=l||!!n.trigger_id,b=n.id,y="button",v=0;let x;e[2]!==i?(x=B=>{B.target===B.currentTarget&&(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),i())},e[2]=i,e[3]=x):x=e[3];const T=o?"-ml-4 pl-6":"pl-[9px]",S=r?"bg-accent text-accent-foreground":"hover:bg-accent/60";let N;e[4]!==T||e[5]!==S?(N=Y("group/row flex items-center gap-2 py-1.5 rounded-md cursor-pointer transition-colors",T,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",S),e[4]=T,e[5]=S,e[6]=N):N=e[6];let w;e[7]!==h||e[8]!==d||e[9]!==g?.icon||e[10]!==g?.title?(w=d&&!h&&s.jsx(ye,{icon:g?.icon??null,name:g?.title??"?",size:"2xs"}),e[7]=h,e[8]=d,e[9]=g?.icon,e[10]=g?.title,e[11]=w):w=e[11];let _;e[12]!==p||e[13]!==c?(_=p&&s.jsx(Kt,{size:12,"aria-label":c("tasksPanel.taskRow.automationTriggered"),className:"shrink-0 text-special"}),e[12]=p,e[13]=c,e[14]=_):_=e[14];let C;e[15]!==c||e[16]!==n.title?(C=n.title||c("tasksPanel.taskRow.untitledTask"),e[15]=c,e[16]=n.title,e[17]=C):C=e[17];let L;e[18]!==C?(L=s.jsx("div",{className:"text-sm text-foreground truncate",children:C}),e[18]=C,e[19]=L):L=e[19];let P;e[20]!==_||e[21]!==L?(P=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[_,L]}),e[20]=_,e[21]=L,e[22]=P):P=e[22];let I;e[23]!==k||e[24]!==r||e[25]!==n.branch||e[26]!==n.updated_at?(I=n.updated_at&&s.jsxs("div",{className:Y("flex items-center gap-1 text-[11px] min-w-0",r?"text-accent-foreground/70":"text-muted-foreground/60"),children:[n.branch&&!$a(n.branch)?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate font-mono",children:n.branch}),s.jsx("span",{className:"shrink-0",children:"·"})]}):k?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"truncate",children:[k.owner,"/",k.name]}),s.jsx("span",{className:"shrink-0",children:"·"})]}):null,s.jsx("span",{className:"shrink-0",children:Fn(new Date(n.updated_at))})]}),e[23]=k,e[24]=r,e[25]=n.branch,e[26]=n.updated_at,e[27]=I):I=e[27];let A;e[28]!==P||e[29]!==I?(A=s.jsxs("div",{className:"flex-1 min-w-0",children:[P,I]}),e[28]=P,e[29]=I,e[30]=A):A=e[30];const D="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",F=!u&&s.jsx("span",{className:Y("[grid-area:slot] flex size-8 items-center justify-center pointer-events-none transition-opacity",a&&"group-hover/row:opacity-0"),"aria-label":c("tasksPanel.taskRow.statusLabel",{status:c(f.labelKey)}),children:n.status==="in_progress"?s.jsx(je,{className:Y("size-3.5",f.iconClassName)}):s.jsx(m,{size:14,className:f.iconClassName})});let R;e[31]!==a||e[32]!==c?(R=a&&s.jsxs(ze,{children:[s.jsx(Oe,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":c("tasksPanel.taskRow.archiveTask"),onClick:B=>{B.stopPropagation(),a()},className:"[grid-area:slot] opacity-0 pointer-events-none group-hover/row:opacity-100 group-hover/row:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto transition-opacity flex size-8 items-center justify-center rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:s.jsx(ns,{size:14})})}),s.jsx(Be,{side:"right",children:c("tasksPanel.taskRow.archive")})]}),e[31]=a,e[32]=c,e[33]=R):R=e[33];let M;e[34]!==F||e[35]!==R?(M=s.jsxs("div",{className:D,children:[F,R]}),e[34]=F,e[35]=R,e[36]=M):M=e[36];let G;return e[37]!==i||e[38]!==A||e[39]!==M||e[40]!==x||e[41]!==N||e[42]!==w||e[43]!==n.id?(G=s.jsxs("div",{"data-task-id":b,role:y,tabIndex:v,onClick:i,onKeyDown:x,className:N,children:[w,A,M]}),e[37]=i,e[38]=A,e[39]=M,e[40]=x,e[41]=N,e[42]=w,e[43]=n.id,e[44]=G):G=e[44],G}const jt=["requires_action","in_progress","failed","expired","completed"];function Da(t){const e=new Map(jt.map(n=>[n,[]]));for(const n of t){const r=n.status??"completed";(e.get(r)??e.get("completed")).push(n)}return jt.map(n=>({status:n,threads:e.get(n)}))}const Fa="sidebar.group.expanded.";function Ra(t,e){const n=$.c(3),[r,i]=wt(`${Fa}${t}`,e);let a;return n[0]!==r||n[1]!==i?(a=[r,i],n[0]=r,n[1]=i,n[2]=a):a=n[2],a}function Xt(t){const e=$.c(18),{onClick:n,isFetching:r,indented:i}=t,a=U();let l;e[0]!==a?(l=a("sidebar.showMoreButton.ariaLabel"),e[0]=a,e[1]=l):l=e[1];const d=i?"-ml-4 pl-6 pr-2":"px-2";let u;e[2]!==d?(u=Y("flex items-center gap-2 py-1.5 rounded-lg text-sm text-muted-foreground",d,"hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50","transition-colors disabled:cursor-progress disabled:opacity-60"),e[2]=d,e[3]=u):u=e[3];let o;e[4]!==r?(o=r&&s.jsx(je,{className:"size-3.5"}),e[4]=r,e[5]=o):o=e[5];let c;e[6]!==r||e[7]!==a?(c=a(r?"sidebar.showMoreButton.loading":"sidebar.showMoreButton.showMore"),e[6]=r,e[7]=a,e[8]=c):c=e[8];let f;e[9]!==c?(f=s.jsx("span",{children:c}),e[9]=c,e[10]=f):f=e[10];let m;return e[11]!==r||e[12]!==n||e[13]!==l||e[14]!==u||e[15]!==o||e[16]!==f?(m=s.jsxs("button",{type:"button","aria-label":l,onClick:n,disabled:r,className:u,children:[o,f]}),e[11]=r,e[12]=n,e[13]=l,e[14]=u,e[15]=o,e[16]=f,e[17]=m):m=e[17],m}function Ea(t,e,n,r){return[t,e,n,r.type,r.member,r.currentUserId??""].join("|")}function Oa(t){return t.member==="mine"&&!t.currentUserId}const Zt=4;let Pe=0;const tt=[];function Ba(){for(;Pe<Zt&&tt.length>0;){const t=tt.shift();t&&t()}}function Jt(t){return new Promise((e,n)=>{const r=()=>{Pe++,t().then(e,n).finally(()=>{Pe--,Ba()})};Pe<Zt?r():tt.push(r)})}const He=10;function yt(t,e,n,r,i){const a={hidden:!1};r.member==="mine"&&r.currentUserId&&(a.created_by=r.currentUserId),r.type==="automation"&&(a.has_trigger=!0),r.type==="manual"&&(a.has_trigger=!1);const l={where:a,limit:i,offset:n,orderBy:[{field:["updated_at"],direction:"desc"}]};return l.status=e,l}function za(t,e,n,r){let i=0;for(const a of t)es(a,e,n,r)&&i++;return i}function Ze(t,e,n,r){return za(t,e,n,r)}function Ga(t,e){return!!(t>=He||t===0&&e)}function kt(t,e){return t<e}function Ha(t,e){return e===!1?!1:e===!0?!0:t}function es(t,e,n,r){return!(t.hidden||(t.status??"completed")!==n||r.member==="mine"&&r.currentUserId&&t.created_by!==r.currentUserId||r.type==="automation"&&!t.trigger_id||r.type==="manual"&&t.trigger_id)}const Ie=new Map,Ce=new Map;function Ua(t,e){return e?t>=He?!0:null:!1}function St(t){return Ie.get(t)}function Ka(t,e){Ie.set(t,e)}function Va(t,e,n){const r=Ie.get(t);if(r!==void 0){n(r);return}let i=Ce.get(t);i||(i=Jt(e).then(a=>(Ie.set(t,a),Ce.delete(t),a)).catch(()=>(Ce.delete(t),Promise.reject(new Error("group probe failed")))),Ce.set(t,i)),i.then(n,()=>n(!1))}function Nt(t){const e=t,n=Array.isArray(e.items)?e.items:[];return{items:n,hasMore:e.hasMore??n.length===He,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function Wa(t,e,n,r,i){let a=0;for(const l of t)e.has(l.id)||es(l,n,r,i)&&a++;return a}function qa(t,e,n,r){const i=$.c(8),{org:a}=le(),l=Ea(a.id,t,e,n);let d;i[0]!==n?(d=Oa(n),i[0]=n,i[1]=d):d=i[1];const u=d,[o,c]=O.useState({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});o.identity!==l&&c({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});const f=ot(),{threads:m,hasMore:h}=ct(),g=Ze(m,t,e,n),j=Ga(g,h),k=Ua(g,h),p=at();if(o.identity===l&&o.serverHasMore===null){const S=k??St(l);S!==void 0&&c({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:o.probeSubscribedIdentity,serverHasMore:S})}!u&&o.identity===l&&o.serverHasMore===null&&k===null&&St(l)===void 0&&o.probeSubscribedIdentity!==l&&(c(S=>S.identity===l?{...S,isProbing:!0,probeSubscribedIdentity:l}:S),Va(l,async()=>{const S=yt(t,e,0,n,1),N=await p.call("COLLECTION_THREADS_LIST",S),{totalCount:w}=Nt(N),_=Ze(f.threads.get(),t,e,n);return w===void 0?!1:kt(_,w)},S=>{c(N=>N.identity!==l?N:{...N,isProbing:!1,serverHasMore:S})}));const y=async function(){if(o.isFetching||o.isProbing||u)return;const N=l;c(w=>w.identity===N?{...w,isFetching:!0}:w);try{const w=Ze(m,t,e,n),_=yt(t,e,w,n,He),C=await Jt(()=>p.call("COLLECTION_THREADS_LIST",_)),{items:L,hasMore:P,totalCount:I}=Nt(C),A=new Set(m.map(Ya)),D=Wa(L,A,t,e,n),F=w;f.mergeThreads(L),c(R=>{if(R.identity!==N)return R;let M;return I!==void 0?M=kt(F+D,I):M=L.length===0||D===0?!1:P,Ka(N,M),{...R,isFetching:!1,serverHasMore:M}})}catch(w){const _=w,C=_ instanceof Error?_.message:String(_);Ct.error(`Could not load more tasks: ${C}`),c(L=>L.identity===N?{...L,isFetching:!1}:L)}},v=o.isFetching||o.isProbing,x=!u&&!v&&Ha(j,o.serverHasMore);let T;return i[2]!==v||i[3]!==y||i[4]!==x||i[5]!==o.isProbing||i[6]!==o.serverHasMore?(T={hasMore:x,isFetching:v,isProbing:o.isProbing,serverHasMore:o.serverHasMore,loadMore:y},i[2]=v,i[3]=y,i[4]=x,i[5]=o.isProbing,i[6]=o.serverHasMore,i[7]=T):T=i[7],T}function Ya(t){return t.id}function Qa(t){const e=$.c(20),{status:n,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:d,filters:u}=t,{isFetching:o,isProbing:c,loadMore:f,hasMore:m,serverHasMore:h}=qa("status",n,u),[g,j]=O.useState(!1);!g&&r.length===0&&h===!0&&!o&&!c&&(j(!0),queueMicrotask(()=>{f()}));let k;if(e[0]!==i||e[1]!==d||e[2]!==u||e[3]!==l||e[4]!==a||e[5]!==r){let y;e[7]!==i||e[8]!==d||e[9]!==u||e[10]!==l||e[11]!==a?(y=v=>s.jsx(Qt,{task:v,isActive:i===v.id,onClick:()=>a(v),onArchive:d&&v.created_by===u.currentUserId?()=>l(v):void 0,showAutomationBadge:!!v.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},v.id),e[7]=i,e[8]=d,e[9]=u,e[10]=l,e[11]=a,e[12]=y):y=e[12],k=r.map(y),e[0]=i,e[1]=d,e[2]=u,e[3]=l,e[4]=a,e[5]=r,e[6]=k}else k=e[6];let p;e[13]!==m||e[14]!==o||e[15]!==f?(p=(m||o)&&s.jsx(Xt,{onClick:()=>{f()},isFetching:o,indented:!0}),e[13]=m,e[14]=o,e[15]=f,e[16]=p):p=e[16];let b;return e[17]!==k||e[18]!==p?(b=s.jsxs(s.Fragment,{children:[k,p]}),e[17]=k,e[18]=p,e[19]=b):b=e[19],b}function Xa(t){const e=$.c(43),{status:n,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:d,filters:u}=t,o=U(),c=Dn[n],f=c.icon,[m,h]=Ra(`status-${n}`,!1);let g;e[0]!==m||e[1]!==h?(g=function(){h(!m)},e[0]=m,e[1]=h,e[2]=g):g=e[2];const j=g;let k;e[3]!==c.labelKey||e[4]!==o?(k=o("sidebar.taskGroupsList.toggleStatusGroup",{status:o(c.labelKey)}),e[3]=c.labelKey,e[4]=o,e[5]=k):k=e[5];let p;e[6]!==j?(p=C=>{C.target===C.currentTarget&&(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),j())},e[6]=j,e[7]=p):p=e[7];let b;e[8]!==f||e[9]!==c.iconClassName?(b=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(f,{size:12,className:c.iconClassName})}),e[8]=f,e[9]=c.iconClassName,e[10]=b):b=e[10];let y;e[11]!==m?(y=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:m?s.jsx(it,{size:14}):s.jsx(as,{size:14})}),e[11]=m,e[12]=y):y=e[12];let v;e[13]!==b||e[14]!==y?(v=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[b,y]}),e[13]=b,e[14]=y,e[15]=v):v=e[15];let x;e[16]!==c.labelKey||e[17]!==o?(x=o(c.labelKey),e[16]=c.labelKey,e[17]=o,e[18]=x):x=e[18];let T;e[19]!==x?(T=s.jsx("span",{className:"flex-1 truncate",children:x}),e[19]=x,e[20]=T):T=e[20];let S;e[21]!==r.length?(S=s.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:s.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:r.length})}),e[21]=r.length,e[22]=S):S=e[22];let N;e[23]!==m||e[24]!==j||e[25]!==k||e[26]!==p||e[27]!==v||e[28]!==T||e[29]!==S?(N=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":m,"aria-label":k,onClick:j,onKeyDown:p,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-lg text-sm font-medium text-foreground cursor-pointer hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 transition-colors",children:[v,T,S]}),e[23]=m,e[24]=j,e[25]=k,e[26]=p,e[27]=v,e[28]=T,e[29]=S,e[30]=N):N=e[30];let w;e[31]!==i||e[32]!==d||e[33]!==m||e[34]!==u||e[35]!==l||e[36]!==a||e[37]!==n||e[38]!==r?(w=m&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(Qa,{status:n,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:d,filters:u})}),e[31]=i,e[32]=d,e[33]=m,e[34]=u,e[35]=l,e[36]=a,e[37]=n,e[38]=r,e[39]=w):w=e[39];let _;return e[40]!==N||e[41]!==w?(_=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[N,w]}),e[40]=N,e[41]=w,e[42]=_):_=e[42],_}function Za(t){const e=$.c(41),{threads:n,groupBy:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,filters:d,hasMore:u,isFetchingMore:o,onLoadMore:c,filtersActive:f}=t,m=U();if(n.length===0&&!u&&!o){let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Ps,{className:"size-6 opacity-60"}),e[0]=p):p=e[0];let b;e[1]!==f||e[2]!==m?(b=m(f?"sidebar.myThreadsSection.noChatsMatchFilters":"sidebar.myThreadsSection.noChatsYet"),e[1]=f,e[2]=m,e[3]=b):b=e[3];let y;return e[4]!==b?(y=s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[p,s.jsx("p",{className:"text-sm",children:b})]}),e[4]=b,e[5]=y):y=e[5],y}const h=n.length>1||u;if(r==="status"){let p;if(e[6]!==i||e[7]!==h||e[8]!==d||e[9]!==l||e[10]!==a||e[11]!==n){let y;e[13]!==i||e[14]!==h||e[15]!==d||e[16]!==l||e[17]!==a?(y=v=>s.jsx(Xa,{status:v.status,threads:v.threads,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:h,filters:d},v.status),e[13]=i,e[14]=h,e[15]=d,e[16]=l,e[17]=a,e[18]=y):y=e[18],p=Da(n).map(y),e[6]=i,e[7]=h,e[8]=d,e[9]=l,e[10]=a,e[11]=n,e[12]=p}else p=e[12];let b;return e[19]!==p?(b=s.jsx(s.Fragment,{children:p}),e[19]=p,e[20]=b):b=e[20],b}let g;if(e[21]!==i||e[22]!==h||e[23]!==d||e[24]!==l||e[25]!==a||e[26]!==n){let p;e[28]!==i||e[29]!==h||e[30]!==d||e[31]!==l||e[32]!==a?(p=b=>s.jsx(Qt,{task:b,isActive:i===b.id,onClick:()=>a(b),onArchive:h&&b.created_by===d.currentUserId?()=>l(b):void 0,showAutomationBadge:!!b.trigger_id,showAgentIcon:!0},b.id),e[28]=i,e[29]=h,e[30]=d,e[31]=l,e[32]=a,e[33]=p):p=e[33],g=n.map(p),e[21]=i,e[22]=h,e[23]=d,e[24]=l,e[25]=a,e[26]=n,e[27]=g}else g=e[27];let j;e[34]!==u||e[35]!==o||e[36]!==c?(j=(u||o)&&s.jsx(Xt,{onClick:c,isFetching:o}),e[34]=u,e[35]=o,e[36]=c,e[37]=j):j=e[37];let k;return e[38]!==g||e[39]!==j?(k=s.jsxs(s.Fragment,{children:[g,j]}),e[38]=g,e[39]=j,e[40]=k):k=e[40],k}function Ja(t,e){return null}function er(t,e){return t.some(n=>n.id!==e.taskId&&!n.hidden&&n.branch===e.branch&&n.virtual_mcp_id===e.virtualMcpId)}const tr=["archive","reclaim-worktree"],sr=[];function nr(t){return t==="confirm"?tr:sr}function ar(t){const e=$.c(11),{panel:n}=t;let r;return e[0]!==n.activeTaskId||e[1]!==n.archiveTask||e[2]!==n.filters||e[3]!==n.filtersActive||e[4]!==n.groupBy||e[5]!==n.hasMore||e[6]!==n.isFetchingMore||e[7]!==n.loadMore||e[8]!==n.selectTask||e[9]!==n.threads?(r=s.jsx(Za,{threads:n.threads,groupBy:n.groupBy,activeTaskId:n.activeTaskId,onSelectTask:n.selectTask,onArchiveTask:n.archiveTask,filters:n.filters,hasMore:n.hasMore,isFetchingMore:n.isFetchingMore,onLoadMore:n.loadMore,filtersActive:n.filtersActive}),e[0]=n.activeTaskId,e[1]=n.archiveTask,e[2]=n.filters,e[3]=n.filtersActive,e[4]=n.groupBy,e[5]=n.hasMore,e[6]=n.isFetchingMore,e[7]=n.loadMore,e[8]=n.selectTask,e[9]=n.threads,e[10]=r):r=e[10],r}function rr(t){const e=$.c(83);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{onNavigate:r}=n,i=U(),{data:a}=$e.useSession(),l=a?.user?.id,{org:d}=le();let u;e[2]!==d.id?(u=ke(d.id),e[2]=d.id,e[3]=u):u=e[3];const o=u.id,c=wa(),{threads:f,hasMore:m,isFetchingMore:h,fetchNextPage:g}=ct(),j=f.filter(cr),{hide:k,setScope:p}=dt(),b=De(),y=at(),{setTaskId:v,createNewTask:x}=lt(),T=Ht(),S=Ge();let N;e[4]!==S||e[5]!==f||e[6]!==T?(N=fn({routeAgentId:T,threadVirtualMcpId:f.find(z=>z.id===S)?.virtual_mcp_id}),e[4]=S,e[5]=f,e[6]=T,e[7]=N):N=e[7];const w=N;let _;e[8]!==r?(_=()=>{r?.()},e[8]=r,e[9]=_):_=e[9];const C=_,L=[...j].sort(or),[P,I]=O.useState("all"),[A,D]=O.useState("flat"),[F,R]=wt("sidebar-threads-scope-all",!1),[M,G]=O.useState(!1),[B,V]=O.useState(!1);let E;e[10]!==G?(E=()=>{xe("tasks_panel_search_opened"),V(!0),G(!0)},e[10]=G,e[11]=E):E=e[11];const Q=E,[K,W]=O.useState(null),X=l??null;let Z;e[12]!==X||e[13]!==P?(Z={type:P,member:"mine",currentUserId:X},e[12]=X,e[13]=P,e[14]=Z):Z=e[14];const H=Z,q={};F||(q.created_by="me"),p(q);let ae;e[15]!==l?(ae=z=>l?z.filter(ne=>ne.created_by===l):[],e[15]=l,e[16]=ae):ae=e[16];const ie=ae;let J;e[17]!==P?(J=z=>P==="automation"?z.filter(lr):P==="manual"?z.filter(ir):z,e[17]=P,e[18]=J):J=e[18];const oe=J,te=_a(oe(F?L:ie(L)),S);let se;e[19]!==S||e[20]!==C||e[21]!==l||e[22]!==k||e[23]!==b||e[24]!==d.slug||e[25]!==v||e[26]!==te?(se=z=>{const ne=z.id===S,pe=k(z.id);if(Gs(z.id),!ne)return pe;const be=La(te,z.id,l);return C(),be?v(be.id,be.virtual_mcp_id):b({to:"/$org",params:{org:d.slug}}),pe},e[19]=S,e[20]=C,e[21]=l,e[22]=k,e[23]=b,e[24]=d.slug,e[25]=v,e[26]=te,e[27]=se):se=e[27];const re=se;let de;e[28]!==y||e[29]!==i?(de=async z=>{try{await y.call("SANDBOX_DELETE",{virtualMcpId:z.virtualMcpId,branch:z.branch,removeWorktree:!0})}catch{Ct.error(i("sidebar.archiveWorktreeDialog.reclaimFailed",{branch:z.branch}))}},e[28]=y,e[29]=i,e[30]=de):de=e[30];const ge=de;let ue;e[31]!==f||e[32]!==re||e[33]!==l||e[34]!==W?(ue=z=>{if(l&&z.created_by&&z.created_by!==l)return;const ne=Ja();if(!ne||er(f,ne)){re(z);return}W({task:z,target:ne})},e[31]=f,e[32]=re,e[33]=l,e[34]=W,e[35]=ue):ue=e[35];const Ue=ue;let Ne;e[36]!==re||e[37]!==K||e[38]!==ge||e[39]!==W?(Ne=z=>{const ne=K;ne&&(W(null),(async()=>{for(const pe of nr(z))if(pe==="archive")try{await re(ne.task)}catch{return}else await ge(ne.target)})())},e[36]=re,e[37]=K,e[38]=ge,e[39]=W,e[40]=Ne):Ne=e[40];const Ke=Ne;let Te;e[41]!==C||e[42]!==v?(Te=z=>{C(),v(z.id,z.virtual_mcp_id)},e[41]=C,e[42]=v,e[43]=Te):Te=e[43];const Ve=Te;let _e;e[44]!==w||e[45]!==S||e[46]!==f||e[47]!==C||e[48]!==x||e[49]!==l||e[50]!==o||e[51]!==c||e[52]!==v?(_e=()=>{const z=w??o;xe("sidebar_new_thread_clicked",{virtual_mcp_id:z}),C();const ne=Js(f,z,l,c(z));if(ne){v(ne.id,ne.virtual_mcp_id);return}const pe=f.find(be=>be.id===S)?.branch??null;x(z,pe)},e[44]=w,e[45]=S,e[46]=f,e[47]=C,e[48]=x,e[49]=l,e[50]=o,e[51]=c,e[52]=v,e[53]=_e):_e=e[53];const We=_e;let fe;e[54]!==g?(fe=()=>{g()},e[54]=g,e[55]=fe):fe=e[55];const qe=A!=="flat"||P!=="all"||F;let me;e[56]!==Ke||e[57]!==K?(me=K?s.jsx(Ma,{branch:K.target.branch,onOutcome:Ke}):null,e[56]=Ke,e[57]=K,e[58]=me):me=e[58];let he;e[59]!==B||e[60]!==M||e[61]!==G?(he=B?s.jsx(Aa,{open:M,onOpenChange:G}):null,e[59]=B,e[60]=M,e[61]=G,e[62]=he):he=e[62];let we;return e[63]!==S||e[64]!==Ue||e[65]!==H||e[66]!==A||e[67]!==m||e[68]!==h||e[69]!==We||e[70]!==Q||e[71]!==Ve||e[72]!==D||e[73]!==R||e[74]!==I||e[75]!==F||e[76]!==fe||e[77]!==qe||e[78]!==me||e[79]!==he||e[80]!==P||e[81]!==te?(we={threads:te,activeTaskId:S,filters:H,hasMore:m,isFetchingMore:h,loadMore:fe,groupBy:A,setGroupBy:D,typeFilter:P,setTypeFilter:I,showAll:F,setShowAll:R,filtersActive:qe,selectTask:Ve,archiveTask:Ue,newThread:We,openSearch:Q,reclaimDialog:me,searchDialog:he},e[63]=S,e[64]=Ue,e[65]=H,e[66]=A,e[67]=m,e[68]=h,e[69]=We,e[70]=Q,e[71]=Ve,e[72]=D,e[73]=R,e[74]=I,e[75]=F,e[76]=fe,e[77]=qe,e[78]=me,e[79]=he,e[80]=P,e[81]=te,e[82]=we):we=e[82],we}function ir(t){return!t.trigger_id}function lr(t){return!!t.trigger_id}function or(t,e){return(e.updated_at??"").localeCompare(t.updated_at??"")}function cr(t){return!t.hidden}function dr(){const t=$.c(60),e=U(),[n,r]=O.useState(!1);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={onNavigate:()=>r(!1)},t[0]=i):i=t[0];const a=rr(i),l=Re()?.activeTask;let d;t[1]!==l?.title||t[2]!==a.activeTaskId||t[3]!==a.threads||t[4]!==e?(d=l?.title||a.threads.find(R=>R.id===a.activeTaskId)?.title||e("tasksPanel.taskRow.untitledTask"),t[1]=l?.title,t[2]=a.activeTaskId,t[3]=a.threads,t[4]=e,t[5]=d):d=t[5];const u=d;let o;t[6]!==a?(o=()=>{r(!1),a.openSearch()},t[6]=a,t[7]=o):o=t[7];const c=o;let f;t[8]!==e?(f=e("chat.threadsMenu.chats"),t[8]=e,t[9]=f):f=t[9];const m=n&&"bg-sidebar-accent";let h;t[10]!==m?(h=Y("flex h-[34px] min-w-0 shrink items-center gap-1.5 rounded-lg px-2 text-sm text-foreground transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",m),t[10]=m,t[11]=h):h=t[11];let g;t[12]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(As,{size:16,className:"shrink-0"}),t[12]=g):g=t[12];let j;t[13]!==u?(j=s.jsx("span",{className:"truncate max-w-[10rem] font-medium",children:u}),t[13]=u,t[14]=j):j=t[14];let k;t[15]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(it,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),t[15]=k):k=t[15];let p;t[16]!==f||t[17]!==h||t[18]!==j?(p=s.jsx(Oe,{asChild:!0,children:s.jsx(Bt,{asChild:!0,children:s.jsxs("button",{type:"button","aria-label":f,className:h,children:[g,j,k]})})}),t[16]=f,t[17]=h,t[18]=j,t[19]=p):p=t[19];let b;t[20]!==e?(b=e("chat.threadsMenu.chats"),t[20]=e,t[21]=b):b=t[21];let y;t[22]!==b?(y=s.jsx(Be,{side:"bottom",children:b}),t[22]=b,t[23]=y):y=t[23];let v;t[24]!==y||t[25]!==p?(v=s.jsxs(ze,{children:[p,y]}),t[24]=y,t[25]=p,t[26]=v):v=t[26];let x;t[27]!==a?(x=s.jsx(Ta,{panel:a,className:"size-8"}),t[27]=a,t[28]=x):x=t[28];let T;t[29]!==e?(T=e("sidebar.taskGroupsList.searchChats"),t[29]=e,t[30]=T):T=t[30];let S;t[31]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Is,{size:16}),t[31]=S):S=t[31];let N;t[32]!==c||t[33]!==T?(N=s.jsx(Ae,{"aria-label":T,onClick:c,className:"size-8",children:S}),t[32]=c,t[33]=T,t[34]=N):N=t[34];let w;t[35]!==e?(w=e("sidebar.taskGroupsList.newChat"),t[35]=e,t[36]=w):w=t[36];let _;t[37]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Lt,{size:16}),t[37]=_):_=t[37];let C;t[38]!==a.newThread||t[39]!==w?(C=s.jsx(Ae,{"aria-label":w,onClick:a.newThread,className:"size-8",children:_}),t[38]=a.newThread,t[39]=w,t[40]=C):C=t[40];let L;t[41]!==N||t[42]!==C?(L=s.jsxs("div",{className:"flex items-center gap-0.5",children:[N,C]}),t[41]=N,t[42]=C,t[43]=L):L=t[43];let P;t[44]!==x||t[45]!==L?(P=s.jsxs("div",{className:"flex shrink-0 items-center justify-between",children:[x,L]}),t[44]=x,t[45]=L,t[46]=P):P=t[46];let I;t[47]!==a?(I=s.jsx("div",{className:"flex max-h-[60vh] min-h-0 flex-col gap-0.5 overflow-y-auto overscroll-contain",children:s.jsx(ar,{panel:a})}),t[47]=a,t[48]=I):I=t[48];let A;t[49]!==P||t[50]!==I?(A=s.jsxs(zt,{align:"start",side:"bottom",onOpenAutoFocus:ur,className:"flex w-80 flex-col gap-2 p-2",children:[P,I]}),t[49]=P,t[50]=I,t[51]=A):A=t[51];let D;t[52]!==n||t[53]!==v||t[54]!==A?(D=s.jsxs(Gt,{open:n,onOpenChange:r,children:[v,A]}),t[52]=n,t[53]=v,t[54]=A,t[55]=D):D=t[55];let F;return t[56]!==a.reclaimDialog||t[57]!==a.searchDialog||t[58]!==D?(F=s.jsxs(s.Fragment,{children:[D,a.searchDialog,a.reclaimDialog]}),t[56]=a.reclaimDialog,t[57]=a.searchDialog,t[58]=D,t[59]=F):F=t[59],F}function ur(t){return t.preventDefault()}function fr(){const t=$.c(20),e=U(),{threads:n}=ct(),{createNewTask:r}=lt(),i=Ut(),a=Ge();let l;t[0]!==a||t[1]!==n?(l=n.find(k=>k.id===a)?.branch??null,t[0]=a,t[1]=n,t[2]=l):l=t[2];const d=l;let u;t[3]!==i||t[4]!==r||t[5]!==d?(u=()=>{r(i,d)},t[3]=i,t[4]=r,t[5]=d,t[6]=u):u=t[6];const o=u;let c;t[7]!==e?(c=e("sidebar.taskGroupsList.newChat"),t[7]=e,t[8]=c):c=t[8];let f;t[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Lt,{size:16}),t[9]=f):f=t[9];let m;t[10]!==o||t[11]!==c?(m=s.jsx(Oe,{asChild:!0,children:s.jsx("button",{type:"button",onClick:o,"aria-label":c,className:"flex shrink-0 items-center rounded-lg p-1.5 text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:f})}),t[10]=o,t[11]=c,t[12]=m):m=t[12];let h;t[13]!==e?(h=e("sidebar.taskGroupsList.newChat"),t[13]=e,t[14]=h):h=t[14];let g;t[15]!==h?(g=s.jsx(Be,{side:"bottom",children:h}),t[15]=h,t[16]=g):g=t[16];let j;return t[17]!==m||t[18]!==g?(j=s.jsxs(ze,{children:[m,g]}),t[17]=m,t[18]=g,t[19]=j):j=t[19],j}function mr(t){const e=$.c(14),{virtualMcp:n}=t,r=U(),i=$t(),{navigateToTask:a}=ys(),{create:l}=dt();let d,u;if(e[0]!==i||e[1]!==l||e[2]!==a||e[3]!==r||e[4]!==n){u=Symbol.for("react.early_return_sentinel");e:{const o=Vs(n,i);if(!o){u=null;break e}const c=o.mode==="dev";let f;e[7]!==l||e[8]!==a?(f=async p=>{const b=crypto.randomUUID();try{await l({id:b,virtual_mcp_id:p})}catch{}a(b,{virtualMcpId:p})},e[7]=l,e[8]=a,e[9]=f):f=e[9];const m=f,h=(p,b,y)=>s.jsxs("button",{type:"button","aria-pressed":b,"aria-label":p,title:p,onClick:()=>{b||m(o.targetId)},className:Y("inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg transition-colors",b?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[s.jsx(y,{className:"size-3.5 shrink-0"}),s.jsx("span",{className:"@max-3xl/panel-header:hidden",children:p})]});let g;e[10]!==r?(g=r("devAgent.devAgentControl.develop"),e[10]=r,e[11]=g):g=e[11];const j=h(g,c,Ms);let k;e[12]!==r?(k=r("devAgent.devAgentControl.live"),e[12]=r,e[13]=k):k=e[13],d=s.jsxs("div",{className:"inline-flex items-center rounded-lg border border-border bg-muted p-0.5 text-xs font-medium",children:[j,h(k,!c,Rn)]})}e[0]=i,e[1]=l,e[2]=a,e[3]=r,e[4]=n,e[5]=d,e[6]=u}else d=e[5],u=e[6];return u!==Symbol.for("react.early_return_sentinel")?u:d}function Me(t){const e=$.c(10),{icon:n,className:r}=t,i=r===void 0?"size-4":r;if(n.kind==="component"){const{Component:l}=n;let d;return e[0]!==l||e[1]!==i?(d=s.jsx(l,{className:i}),e[0]=l,e[1]=i,e[2]=d):d=e[2],d}if(n.kind==="url"){const l=n.src;let d;e[3]!==i?(d=Y(i,"rounded-sm object-cover"),e[3]=i,e[4]=d):d=e[4];let u;return e[5]!==n.src||e[6]!==d?(u=s.jsx("img",{src:l,alt:"",className:d}),e[5]=n.src,e[6]=d,e[7]=u):u=e[7],u}let a;return e[8]!==i?(a=s.jsx(Bn,{className:i}),e[8]=i,e[9]=a):a=e[9],a}function hr(t){const e=$.c(16),{virtualMcpId:n,taskId:r}=t,{openPanel:i}=Vt();let a;e[0]!==r||e[1]!==n?(a={virtualMcpId:n,taskId:r},e[0]=r,e[1]=n,e[2]=a):a=e[2];const{tabs:l,activeTab:d,mainOpen:u}=Wt(a);if(l.length===0)return null;let o;if(e[3]!==d||e[4]!==u||e[5]!==i||e[6]!==l||e[7]!==n){let f;e[9]!==d||e[10]!==u||e[11]!==i||e[12]!==n?(f=m=>{const h=m.id==="automations"?rs({activeTab:d,mainOpen:u}):u&&m.id===d;return s.jsxs(ft.Tab,{active:h,onClick:()=>{h||(xe("main_panel_tab_clicked",{virtual_mcp_id:n,tab_id:m.id,tab_kind:m.kind,was_active:!1}),i(m.id))},children:[s.jsx("span",{"aria-hidden":"true",className:"flex size-4 shrink-0 items-center justify-center",children:s.jsx(Me,{icon:m.icon})}),m.title]},m.id)},e[9]=d,e[10]=u,e[11]=i,e[12]=n,e[13]=f):f=e[13],o=l.map(f),e[3]=d,e[4]=u,e[5]=i,e[6]=l,e[7]=n,e[8]=o}else o=e[8];let c;return e[14]!==o?(c=s.jsx(ft.Tabs,{"data-tour":Hs.surfaceTabs,children:o}),e[14]=o,e[15]=c):c=e[15],c}function pr(t){return{threadId:t.routeThreadId,providerKey:t.routeThreadId??t.fallbackKey}}const Je="__mobile-main-panel-tab-select__",st="main";function xr({tabs:t,activeTab:e,mainOpen:n,t:r}){const i=t.find(l=>l.id===e),a=r("mainPanelTabs.mobileMainPanelTabSelect.mainView");return n?i?.title??a:i?.title??t[0]?.title??a}const gr={kind:"component",Component:Ls},br={kind:"component",Component:Ds},vr={kind:"component",Component:En},jr={kind:"component",Component:$s};function yr({tabs:t,overlayEnabled:e,t:n}){return[{value:"chat",title:n("mainPanelTabs.mobileMainPanelTabSelect.chat"),icon:gr},...t.length>0?t.map(r=>({value:r.id,title:r.title,icon:r.icon})):[{value:st,title:n("mainPanelTabs.mobileMainPanelTabSelect.mainView"),icon:jr}],...e?[{value:"board",title:n("mainPanelTabs.mobileMainPanelTabSelect.tasks"),icon:br},{value:"files",title:n("mainPanelTabs.mobileMainPanelTabSelect.library"),icon:vr}]:[]]}function kr(t){const e=$.c(53),{virtualMcpId:n,taskId:r}=t,i=U(),a=De(),{openPanel:l}=Vt();let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={strict:!1},e[0]=d):d=e[0];const u=Se(d);let o;e[1]!==r||e[2]!==n?(o={virtualMcpId:n,taskId:r},e[1]=r,e[2]=n,e[3]=o):o=e[3];const{tabs:c,activeTab:f,mainOpen:m}=Wt(o),{org:h}=le(),g=xs();let j;e[4]!==h.id?(j=mt(h.id),e[4]=h.id,e[5]=j):j=e[5];const k=n===j;let p,b,y,v,x,T,S,N,w,_;if(e[6]!==f||e[7]!==m||e[8]!==a||e[9]!==k||e[10]!==l||e[11]!==h.id||e[12]!==u.org||e[13]!==u.taskId||e[14]!==g||e[15]!==i||e[16]!==c||e[17]!==n){v=Symbol.for("react.early_return_sentinel");e:{const P=yr({tabs:c,overlayEnabled:!!(u.org&&u.taskId),t:i}),I=m?P.find(E=>E.value===f)?.value??st:"chat",A=P.find(E=>E.value===I),D=A?.title??xr({tabs:c,activeTab:f,mainOpen:m,t:i});let F;e[28]!==a?(F=E=>{a({to:".",search:Q=>({...Q,...on(E)}),replace:!0})},e[28]=a,e[29]=F):F=e[29];const R=F;let M;e[30]!==k||e[31]!==l||e[32]!==h.id||e[33]!==g||e[34]!==R||e[35]!==n?(M=E=>{if(E!==Je){if(xe("main_panel_tab_clicked",{virtual_mcp_id:n,tab_id:E,source:"mobile_select"}),Us({reportsOnly:g,onReportAgent:k,tabId:E})){l(E,{virtualmcpid:mt(h.id),search:Tr});return}if(E==="chat"||E===st){R(E==="chat"?"chat":"main");return}l(E,{search:Nr})}},e[30]=k,e[31]=l,e[32]=h.id,e[33]=g,e[34]=R,e[35]=n,e[36]=M):M=e[36];const G=M,B=P.find(E=>E.value!==I);if(P.length===2&&B){v=s.jsxs("button",{type:"button",onClick:()=>G(B.value),"aria-label":i("mainPanelTabs.mobileMainPanelTabSelect.switchTo",{name:B.title}),className:"flex h-10 min-w-0 max-w-[7.5rem] items-center gap-1.5 rounded-lg px-1.5 text-xs text-foreground transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:[s.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:s.jsx(Me,{icon:B.icon,className:"size-5"})}),s.jsx("span",{className:"min-w-0 truncate",children:B.title})]});break e}b=Gn,w=Je,_=G;let V;e[37]!==i?(V=i("mainPanelTabs.mobileMainPanelTabSelect.view"),e[37]=i,e[38]=V):V=e[38],y=s.jsx(zn,{"aria-label":V,className:"h-10! w-full min-w-0 max-w-[7.5rem] rounded-lg border-0 bg-transparent px-1.5 text-xs shadow-none [--card-shadow:none]",children:s.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[A&&s.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:s.jsx(Me,{icon:A.icon,className:"size-5"})}),s.jsx("span",{className:"min-w-0 truncate",children:D})]})}),p=Hn,x="end",T="w-56",e[39]!==D?(S=s.jsx(qt,{value:Je,disabled:!0,hideCheck:!0,className:"hidden",children:D}),e[39]=D,e[40]=S):S=e[40],N=P.map(Sr)}e[6]=f,e[7]=m,e[8]=a,e[9]=k,e[10]=l,e[11]=h.id,e[12]=u.org,e[13]=u.taskId,e[14]=g,e[15]=i,e[16]=c,e[17]=n,e[18]=p,e[19]=b,e[20]=y,e[21]=v,e[22]=x,e[23]=T,e[24]=S,e[25]=N,e[26]=w,e[27]=_}else p=e[18],b=e[19],y=e[20],v=e[21],x=e[22],T=e[23],S=e[24],N=e[25],w=e[26],_=e[27];if(v!==Symbol.for("react.early_return_sentinel"))return v;let C;e[41]!==p||e[42]!==x||e[43]!==T||e[44]!==S||e[45]!==N?(C=s.jsxs(p,{align:x,className:T,children:[S,N]}),e[41]=p,e[42]=x,e[43]=T,e[44]=S,e[45]=N,e[46]=C):C=e[46];let L;return e[47]!==b||e[48]!==y||e[49]!==C||e[50]!==w||e[51]!==_?(L=s.jsxs(b,{value:w,onValueChange:_,children:[y,C]}),e[47]=b,e[48]=y,e[49]=C,e[50]=w,e[51]=_,e[52]=L):L=e[52],L}function Sr(t){return s.jsx(qt,{value:t.value,children:s.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[s.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:s.jsx(Me,{icon:t.icon})}),s.jsx("span",{className:"min-w-0 truncate",children:t.title})]})},t.value)}function Nr(t){return{...t,sidepanel:!1}}function Tr(t){return{...t,thread:void 0,sidepanel:!1}}function _r(t,e,n){const r=$.c(33),i=ot(),{locator:a}=le(),l=O.useSyncExternalStore(i.threads.subscribe,i.threads.get),d=O.useSyncExternalStore(i.threadsStatus.subscribe,i.threadsStatus.get);let u;r[0]!==t||r[1]!==l?(u=t===null?null:l.find(x=>x.id===t&&!x.partial)??null,r[0]=t,r[1]=l,r[2]=u):u=r[2];const o=u,[c,f]=O.useState(void 0),[m,h]=O.useState(t);m!==t&&(h(t),f(void 0));let g,j;r[3]!==c||r[4]!==t||r[5]!==o||r[6]!==i||r[7]!==d.kind?(g=()=>{t!==null&&(o||d.kind!=="loading"&&c===void 0&&(f("pending"),i.fetchThreadIntoSlot(t).then(x=>{f(x)})))},j=[t,o,d.kind,c,i],r[3]=c,r[4]=t,r[5]=o,r[6]=i,r[7]=d.kind,r[8]=g,r[9]=j):(g=r[8],j=r[9]),O.useEffect(g,j);let k;r[10]!==n||r[11]!==a||r[12]!==i||r[13]!==e?(k={mutationFn:async x=>i.create({id:x,virtual_mcp_id:e,...n?{branch:n}:{},...Xs(sessionStorage,a,x)})},r[10]=n,r[11]=a,r[12]=i,r[13]=e,r[14]=k):k=r[14];const p=is(k);let b,y;if(r[15]!==p||r[16]!==c||r[17]!==t||r[18]!==o||r[19]!==d.kind?(b=()=>{t!==null&&(o||c===null&&d.kind!=="loading"&&(p.isPending||p.variables!==t&&p.mutate(t)))},y=[t,o,c,d.kind,p],r[15]=p,r[16]=c,r[17]=t,r[18]=o,r[19]=d.kind,r[20]=b,r[21]=y):(b=r[20],y=r[21]),O.useEffect(b,y),t===null){let x;return r[22]===Symbol.for("react.memo_cache_sentinel")?(x={status:"ready",task:null},r[22]=x):x=r[22],x}if(o){let x;return r[23]!==o?(x={status:"ready",task:o},r[23]=o,r[24]=x):x=r[24],x}if(c&&typeof c=="object"){let x;return r[25]!==c?(x={status:"ready",task:c},r[25]=c,r[26]=x):x=r[26],x}if(p.data){let x;return r[27]!==p.data?(x={status:"ready",task:p.data},r[27]=p.data,r[28]=x):x=r[28],x}if(p.isError){let x;return r[29]!==p.error?(x={status:"error",error:p.error},r[29]=p.error,r[30]=x):x=r[30],x}if(p.isPending||d.kind!=="loading"){let x;return r[31]===Symbol.for("react.memo_cache_sentinel")?(x={status:"creating"},r[31]=x):x=r[31],x}let v;return r[32]===Symbol.for("react.memo_cache_sentinel")?(v={status:"loading"},r[32]=v):v=r[32],v}function wr(t){const e=$.c(13),{children:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const i=Se(r);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[1]=a):a=e[1];const l=Fe(a);let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d={select:Cr},e[2]=d):d=e[2];const u=ls(d),{org:o}=le();let c;e[3]!==o||e[4]!==i.agentId||e[5]!==i.legacyView||e[6]!==i.org||e[7]!==u||e[8]!==l?(c=i.org?os({pathname:u,org:i.org,pathAgentId:i.agentId,pathLegacyView:i.legacyView,fallbackAgentId:ke(o.id).id,search:l}):null,e[3]=o,e[4]=i.agentId,e[5]=i.legacyView,e[6]=i.org,e[7]=u,e[8]=l,e[9]=c):c=e[9];const f=c;let m;return e[10]!==n||e[11]!==f?(m=f?s.jsx(ut,{target:f}):n,e[10]=n,e[11]=f,e[12]=m):m=e[12],m}function Cr(t){return t.matches.at(-1)?.pathname??t.location.pathname}function Pr(){const t=$.c(7);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const n=Se(e);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[1]=r):r=t[1];const i=Fe(r),{org:a}=le(),{org:l,taskId:d}=n;if(!l||d===void 0)return null;let u;return t[2]!==l||t[3]!==a.id||t[4]!==i||t[5]!==d?(u=cs({org:l,taskId:d,fallbackAgentId:ke(a.id).id,search:i}),t[2]=l,t[3]=a.id,t[4]=i,t[5]=d,t[6]=u):u=t[6],u}function Ar(){const t=$.c(2),e=Pr();let n;return t[0]!==e?(n=e?s.jsx(ut,{target:e}):null,t[0]=e,t[1]=n):n=t[1],n}function Ir(){const t=$.c(6),e=Kn(),n=De();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[0]=r):r=t[0];const{preview:i}=Fe(r);if(!e||!i)return null;let a;t[1]!==n?(a=()=>n({to:".",search:Mr}),t[1]=n,t[2]=a):a=t[2];let l;return t[3]!==i||t[4]!==a?(l=s.jsx(Vn,{previewPath:i,onClose:a,showSeeInLibrary:!0}),t[3]=i,t[4]=a,t[5]=l):l=t[5],l}function Mr(t){const{preview:e,...n}=t;return n}const Lr=O.createContext(null);function ts(){return O.useContext(Lr)}function $r(t){const e=$.c(13),{children:n}=t,r=U(),i=Yt(),a=ts(),l=Ge()!==null;let d;e[0]!==l||e[1]!==i||e[2]!==a?(d=s.jsx(ka,{}),e[0]=l,e[1]=i,e[2]=a,e[3]=d):d=e[3];const u=d;let o;e[4]!==r?(o=r("agentShellLayout.agentShellLayout.chatLoadingError"),e[4]=r,e[5]=o):o=e[5];let c;e[6]!==o?(c=s.jsx("div",{role:"alert",className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:o}),e[6]=o,e[7]=c):c=e[7];const f=n??u;let m;e[8]!==f?(m=s.jsx(Le,{children:f}),e[8]=f,e[9]=m):m=e[9];let h;return e[10]!==c||e[11]!==m?(h=s.jsx(Tt,{fallback:c,children:m}),e[10]=c,e[11]=m,e[12]=h):h=e[12],h}function Dr(t){const e=$.c(13),{threadId:n,children:r}=t;if(U(),ts(),n===null){let a;return e[0]!==r?(a=s.jsx(ee.ThreadlessProvider,{children:r}),e[0]=r,e[1]=a):a=e[1],a}let i;return e[10]!==r||e[11]!==n?(i=s.jsx(ee.ActiveTaskProvider,{taskId:n,children:r}),e[10]=r,e[11]=n,e[12]=i):i=e[12],i}function Fr(t){const e=$.c(3),{onNewTaskRef:n,createNewTask:r}=t;let i;return e[0]!==r||e[1]!==n?(i=()=>(n.current=r,()=>{n.current=null}),e[0]=r,e[1]=n,e[2]=i):i=e[2],O.useLayoutEffect(i),null}function Rr({virtualMcpId:t,hasActiveGithubRepo:e,sandboxMap:n,children:r}){const i=U(),{currentBranch:a,activeTask:l,setCurrentTaskBranch:d}=Ee(),u=Yt(),o="agent-sandbox",{data:c}=$e.useSession(),f=c?.user?.id,m=!ks({isDesktopApp:u,harnessId:l?.harness_id}),h=tn({agentSandboxMap:n,threadSandboxMap:l?.metadata?.sandboxMap,userId:f,ownerId:l?.created_by,branch:a}),g=e||Ws(l?.metadata),j=O.useRef(null),k=m&&sn({threadLoaded:!!l,isOwner:!!f&&l?.created_by===f,hasActiveGithubRepo:g,branch:a??null,attempted:j.current===(l?.id??null)});O.useEffect(()=>{!k||!l||(j.current=l.id,d(et(c?.user?.name||c?.user?.email?.split("@")[0])))},[k,l,c,d]);const{org:p}=le(),b=gs("cms_auto_fresh_branch"),y=Mt(t),v=O.useRef(null),x=b&&y.resolved&&y.runtime==="cms"&&!!p?.slug&&!!a&&v.current!==(l?.id??null),S=nt({...bs({orgSlug:p?.slug??"",virtualMcpId:t,branch:a??""}),enabled:x}).data?.lastCommitAt??null;O.useEffect(()=>{!x||!l||vs(S,Date.now())&&(v.current=l.id,d(et(c?.user?.name||c?.user?.email?.split("@")[0])))},[x,S,l,c,d]);const N=ce(t),w=Rt(N,a),{releases:_,createRelease:C}=qs(t),P=!!f&&l?.created_by===f&&!!a&&a!==w&&!_.some(B=>B.branch===a),I=O.useRef(null);O.useEffect(()=>{!P||!a||I.current!==a&&(I.current=a,C({branch:a,name:Qs(_,i("thread.branchPicker.defaultVersionName")),color:Ys(_.length),createdBy:f,createdAt:new Date().toISOString()}).catch(()=>{}))},[P,a,_,C,f,i]);const A=y.resolved?y.runtime:null,D=nn(t,a??void 0),R=(f&&a?qn(h?.[f]?.[a]):{})[o]??null,M=R?.previewUrl??null,G=m&&A!=="cms"&&(!!R||D);return m?A==="cms"?s.jsx(gt,{children:r},`${t}:${a??"no-branch"}:${l?.id??""}`):s.jsx(an,{virtualMcpId:t,branch:a??null,previewUrl:M,enabled:G,children:s.jsx(rn,{executionEnabled:m,virtualMcpId:t,branch:a??null,userId:f??null,hasActiveGithubRepo:g,vmEntry:R,threadId:l?.id??null,children:s.jsx(gt,{children:r},`${t}:${a??"no-branch"}:${l?.id??""}`)})},l?.id??"no-thread"):s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsx("div",{className:"flex h-full rounded-[0.75rem] bg-background card-shadow",children:s.jsx(Et,{image:s.jsx(rt,{size:48,className:"text-muted-foreground"}),title:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWeb"),description:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWebDescription")})})})}function Er(){const t=$.c(16),e=U(),{toggleSidebar:n}=hs(),{virtualMcpId:r,taskId:i}=Ee();let a;t[0]!==e?(a=e("layouts.shellControls.toggleSidebar"),t[0]=e,t[1]=a):a=t[1];let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ms,{size:16}),t[2]=l):l=t[2];let d;t[3]!==a||t[4]!==n?(d=s.jsx(Ae,{className:"md:hidden",onClick:n,"aria-label":a,children:l}),t[3]=a,t[4]=n,t[5]=d):d=t[5];let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(dr,{}),t[6]=u):u=t[6];let o;t[7]!==d?(o=s.jsxs(Ye.Topbar.Left,{children:[d,u]}),t[7]=d,t[8]=o):o=t[8];let c;t[9]!==i||t[10]!==r?(c=s.jsx("div",{className:"min-w-0 md:hidden",children:s.jsx(kr,{virtualMcpId:r,taskId:i})}),t[9]=i,t[10]=r,t[11]=c):c=t[11];let f;t[12]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Ye.Topbar.Right,{className:"shrink-0",children:s.jsx(fr,{})}),t[12]=f):f=t[12];let m;return t[13]!==o||t[14]!==c?(m=s.jsxs(Ye.Topbar,{className:"border-b border-border/60 px-3",children:[o,c,f]}),t[13]=o,t[14]=c,t[15]=m):m=t[15],m}function Or(t){const e=$.c(18),{layout:n,onNewTaskRef:r,createNewTask:i}=t,{virtualMcpId:a,taskId:l}=Ee(),d=ce(a),u=On()??"overview";let o;e[0]!==i||e[1]!==r?(o=s.jsx(Fr,{onNewTaskRef:r,createNewTask:i}),e[0]=i,e[1]=r,e[2]=o):o=e[2];let c;e[3]!==l||e[4]!==a?(c=s.jsx(hr,{virtualMcpId:a,taskId:l}),e[3]=l,e[4]=a,e[5]=c):c=e[5];let f;e[6]!==d?(f=d&&s.jsx(mr,{virtualMcp:d}),e[6]=d,e[7]=f):f=e[7];let m,h;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(xt.Thread,{topbar:s.jsx(Er,{}),children:s.jsx($r,{})}),h=s.jsx(Pt,{}),e[8]=m,e[9]=h):(m=e[8],h=e[9]);let g;e[10]!==u||e[11]!==n||e[12]!==c||e[13]!==f?(g=s.jsxs(xt,{...n,contentKey:u,contentNavigation:c,contentActions:f,children:[m,h]}),e[10]=u,e[11]=n,e[12]=c,e[13]=f,e[14]=g):g=e[14];let j;return e[15]!==o||e[16]!==g?(j=s.jsxs(s.Fragment,{children:[o,g]}),e[15]=o,e[16]=g,e[17]=j):j=e[17],j}function Br(){const t=U(),e=De(),n=mn(),{create:r}=dt(),{org:i}=le(),l=Se({strict:!1}).org??"",d=Fe({strict:!1}),u=Ge(),o=Ut(),c=Ht(),[f]=O.useState(()=>crypto.randomUUID()),{data:m}=$e.useSession(),[h]=O.useState(()=>et(m?.user?.name||m?.user?.email?.split("@")[0])),g=ot(),j=O.useSyncExternalStore(g.threads.subscribe,g.threads.get),k=O.useSyncExternalStore(g.threadsStatus.subscribe,g.threadsStatus.get),p=ce(o),b=!!(p&&Ot(p)),y=Rt(p,null),v=_r(u,o,h);Sa(v.status==="ready"?v.task:null);const x=p?.metadata?.ui?.layout??null,T=x?{defaultMainView:x.defaultMainView??null,chatDefaultOpen:x.chatDefaultOpen??null}:null,S=cn(T),{threadId:N,providerKey:w}=pr({routeThreadId:u,fallbackKey:f}),_=async()=>{const I=crypto.randomUUID(),A=j.find(D=>D.id===N)?.branch??null;try{await r({id:I,virtual_mcp_id:o,...A?{branch:A}:{}})}catch{}n(I,()=>({}))},C=O.useRef(null);O.useEffect(()=>{const I=A=>{Ks(A)&&A.shiftKey&&A.code==="KeyS"&&!A.repeat&&(A.preventDefault(),C.current?.())};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[]);const L=v.status==="ready"?v.task:null,P=L?.virtual_mcp_id;if(L&&P&&!hn({routeAgentId:o,threadAgentId:P})){const I=ds({org:l,agentId:P,superAgentId:ke(i.id).id});return s.jsx(ut,{target:{route:I,search:{thread:L.id,sidepanel:d.sidepanel,mainpanel:d.mainpanel,autosend:d.autosend}}})}if(u===null&&c&&p){if(k.kind==="loading")return s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsxs("div",{role:"status","aria-live":"polite",className:"flex h-full items-center justify-center bg-background card-shadow rounded-[0.75rem] text-sm text-muted-foreground",children:[s.jsx(je,{className:"size-4 mr-2"}),t("agentShellLayout.agentShellLayout.creatingTask")]})});const A=en(j,o,m?.user?.id,Ft(p.metadata),b,{baseBranch:y})?.id??(b?f:null);if(A)return s.jsx(us,{to:".",replace:!0,search:D=>({...D,thread:A})})}return v.status==="creating"||v.status==="loading"?s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsxs("div",{role:"status","aria-live":"polite",className:"flex h-full items-center justify-center bg-background card-shadow rounded-[0.75rem] text-sm text-muted-foreground",children:[s.jsx(je,{className:"size-4 mr-2"}),t("agentShellLayout.agentShellLayout.creatingTask")]})}):v.status==="error"?s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsxs("div",{role:"alert",className:"flex flex-col h-full items-center justify-center gap-2 bg-background card-shadow rounded-[0.75rem] p-8 text-sm",children:[s.jsx("div",{className:"font-medium",children:t("agentShellLayout.agentShellLayout.taskUnavailable")}),s.jsx("div",{className:"text-muted-foreground",children:v.error.message})]})}):p?s.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:s.jsx(ee.Provider,{virtualMcpId:o,task:v.status==="ready"?v.task:null,children:s.jsx(Rr,{virtualMcpId:o,hasActiveGithubRepo:b,sandboxMap:p.metadata?.sandboxMap,children:s.jsx(Dr,{threadId:N,children:s.jsx(Le,{children:s.jsx(Or,{layout:S,onNewTaskRef:C,createNewTask:_})})},w)})},o)}):s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsx("div",{className:"flex flex-col h-full bg-background overflow-hidden card-shadow rounded-[0.75rem]",children:s.jsx(Et,{image:s.jsx(rt,{size:48,className:"text-muted-foreground"}),title:t("agentShellLayout.agentShellLayout.agentNotFound"),description:t("agentShellLayout.agentShellLayout.agentNotFoundDescription",{virtualMcpId:o}),actions:s.jsx(fs,{variant:"outline",onClick:()=>e({to:"/$org",params:{org:l}}),children:t("agentShellLayout.agentShellLayout.goToOrgHome")})})})})}function Vo(){const t=$.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const n=Se(e);if(n.taskId!==void 0){let i;return t[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ar,{}),t[1]=i):i=t[1],i}if(n._splat!==void 0){let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Pt,{}),t[2]=i):i=t[2],i}let r;return t[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Le,{children:s.jsx(wr,{children:s.jsx(Un,{children:s.jsxs(Wn,{children:[s.jsx(Br,{}),s.jsx(Ir,{})]})})})}),t[3]=r):r=t[3],r}export{Vo as default};
@@ -0,0 +1 @@
1
+ import{c as R,b as C,X as D,k as P,j as _,n as $}from"./index-De5sr9zh.js";import{i as w}from"./LayoutLeft-CuG2yJZR.js";import{i as H,u as B}from"./use-in-settings-icIKIpSR.js";import{T as E}from"./toolbar-icon-button-B7ENG3u2.js";import{a as N}from"./use-project-scope-CJnr8HCi.js";import{d as V}from"./use-virtual-mcp-BKP1YfD8.js";function J(m){const e=R.c(44),{actions:x,navigation:T}=m,t=C(),{org:a}=D(),o=N(),v=V(o),y=H(),{toggleSidebar:I}=B();let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p={select:z},e[0]=p):p=e[0];const f=P(p),r=f?.mainView==="overview";let d;e[1]!==v?.title||e[2]!==t?(d=v?.title??t("common.loading"),e[1]=v?.title,e[2]=t,e[3]=d):d=e[3];const n=d;let b;e[4]!==r||e[5]!==f?.pageTitle||e[6]!==n||e[7]!==o||e[8]!==t?(b=r?o?n:t("sidebar.navDestinations.home"):t(f?.pageTitle??"page.view"),e[4]=r,e[5]=f?.pageTitle,e[6]=n,e[7]=o,e[8]=t,e[9]=b):b=e[9];const u=b;let l;if(e[10]!==y||e[11]!==r||e[12]!==a||e[13]!==n||e[14]!==o||e[15]!==t||e[16]!==u){if(l=[],y){let s;e[18]!==t?(s=t("sidebar.navDestinations.settings"),e[18]=t,e[19]=s):s=e[19];let i;e[20]!==a.slug?(i={to:"/$org/settings/general",params:{org:a.slug}},e[20]=a.slug,e[21]=i):i=e[21];let k;e[22]!==s||e[23]!==i?(k={key:"settings",label:s,link:i},e[22]=s,e[23]=i,e[24]=k):k=e[24],l.push(k)}else if(o&&!r){let s;e[25]!==a.slug||e[26]!==o?(s={to:"/$org/projects/$agentId",params:{org:a.slug,agentId:o}},e[25]=a.slug,e[26]=o,e[27]=s):s=e[27];let i;e[28]!==n||e[29]!==s?(i={key:"project",label:n,link:s},e[28]=n,e[29]=s,e[30]=i):i=e[30],l.push(i)}let S;e[31]!==u?(S={key:"page",label:u},e[31]=u,e[32]=S):S=e[32],l.push(S),e[10]=y,e[11]=r,e[12]=a,e[13]=n,e[14]=o,e[15]=t,e[16]=u,e[17]=l}else l=e[17];let c;e[33]!==t?(c=t("layouts.shellControls.toggleSidebar"),e[33]=t,e[34]=c):c=e[34];let h;e[35]===Symbol.for("react.memo_cache_sentinel")?(h=_.jsx(w,{size:16}),e[35]=h):h=e[35];let g;e[36]!==c||e[37]!==I?(g=_.jsx(E,{className:"md:hidden",onClick:I,"aria-label":c,children:h}),e[36]=c,e[37]=I,e[38]=g):g=e[38];let j;return e[39]!==x||e[40]!==l||e[41]!==T||e[42]!==g?(j=_.jsx($.Header,{leading:g,breadcrumbs:l,actions:x,navigation:T}),e[39]=x,e[40]=l,e[41]=T,e[42]=g,e[43]=j):j=e[43],j}function z(m){return m.matches.findLast(L)?.staticData}function L(m){return m.staticData.pageTitle}export{J as R};