decocms 4.52.2 → 4.52.3

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 (226) hide show
  1. package/dist/client/assets/{AlertCircle-ClNAIcG0.js → AlertCircle-B53JhFAu.js} +1 -1
  2. package/dist/client/assets/{ArrowUp-DY8HR8F0.js → ArrowUp-BRSr5Hko.js} +1 -1
  3. package/dist/client/assets/{ArrowUpRight-DjTrxTn1.js → ArrowUpRight-H0WTVT37.js} +1 -1
  4. package/dist/client/assets/{Check-BaUMJ78L.js → Check-C_CIFiKi.js} +1 -1
  5. package/dist/client/assets/{CheckCircle-BDnR8A1L.js → CheckCircle-BHN-wFbK.js} +1 -1
  6. package/dist/client/assets/{ChevronDown-wNYjMtTF.js → ChevronDown-BfG3lHhC.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-C-TpN8He.js → ChevronRight-Dqs4UYfi.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-C6irMbKQ.js → ChevronUp-D1yQd_10.js} +1 -1
  9. package/dist/client/assets/{Circle-YG_2bf45.js → Circle-BMe_lNRs.js} +1 -1
  10. package/dist/client/assets/{Copy01-_g0t0qlZ.js → Copy01-I5E-L-KP.js} +1 -1
  11. package/dist/client/assets/{DotsVertical-DTKbesDy.js → DotsVertical-DCj3Pe-o.js} +1 -1
  12. package/dist/client/assets/{Eye-B0b47qlC.js → Eye-Fa6zzcvh.js} +1 -1
  13. package/dist/client/assets/{FilterLines-CgaBTy3e.js → FilterLines-Dabon75B.js} +1 -1
  14. package/dist/client/assets/{Globe01-XPkeFMHR.js → Globe01-D8Lfegq4.js} +1 -1
  15. package/dist/client/assets/{Globe04-BrUOkeSn.js → Globe04-BKaoGJE9.js} +1 -1
  16. package/dist/client/assets/{HardDrive-C0Mdm8TH.js → HardDrive-CmlVCNCP.js} +1 -1
  17. package/dist/client/assets/{Key01-X2Cp5G1j.js → Key01-BlVS9wch.js} +1 -1
  18. package/dist/client/assets/{LayoutLeft-DlvxEfnj.js → LayoutLeft-CvxAKnEI.js} +1 -1
  19. package/dist/client/assets/{LinkExternal01-DbsJ_E6N.js → LinkExternal01-3dZq5bY0.js} +1 -1
  20. package/dist/client/assets/{List-Bk3antXp.js → List-DoWo7FQN.js} +1 -1
  21. package/dist/client/assets/{Loading02-Q-5W4uzZ.js → Loading02-CQnI4ICL.js} +1 -1
  22. package/dist/client/assets/{Monitor01-CNRD_PE8.js → Monitor01-CadwJLnk.js} +1 -1
  23. package/dist/client/assets/{Palette-DjHatrbR.js → Palette-BJcNGJoP.js} +1 -1
  24. package/dist/client/assets/{Play-CeoTbFcX.js → Play-CgD79iZg.js} +1 -1
  25. package/dist/client/assets/{Plus-BMHnzEgp.js → Plus-D63gaaHA.js} +1 -1
  26. package/dist/client/assets/{SearchLg-V_Q9UCyP.js → SearchLg-MLCu3K6z.js} +1 -1
  27. package/dist/client/assets/{SearchMd-DANDIa_n.js → SearchMd-evNv9trP.js} +1 -1
  28. package/dist/client/assets/{Settings02-C8t-YS9f.js → Settings02-Ddh7L72a.js} +1 -1
  29. package/dist/client/assets/{Shield01-Dn1dWDdY.js → Shield01-CoyB298o.js} +1 -1
  30. package/dist/client/assets/{Star01-CFBLrKzQ.js → Star01-D1xnxtGT.js} +1 -1
  31. package/dist/client/assets/{Stars01-CdPO3Nl2.js → Stars01-IimVOfNw.js} +1 -1
  32. package/dist/client/assets/{Stars02-u80z6or-.js → Stars02-D3yMrrs0.js} +1 -1
  33. package/dist/client/assets/{Sun-BntcwdNi.js → Sun-icg_V74A.js} +1 -1
  34. package/dist/client/assets/{SwitchHorizontal01-C5lh09BG.js → SwitchHorizontal01-DDDazbVr.js} +1 -1
  35. package/dist/client/assets/{Tool01-B8q9vFcz.js → Tool01-FgDVN5Aa.js} +1 -1
  36. package/dist/client/assets/{Trash01-CfJ0a-B-.js → Trash01-Cf4xz_lu.js} +1 -1
  37. package/dist/client/assets/{Upload01-D_QZcVHs.js → Upload01-DqR1L_zb.js} +1 -1
  38. package/dist/client/assets/{User01-Darruqx_.js → User01-2BQwgTbP.js} +1 -1
  39. package/dist/client/assets/{Users01-Bus8Z2ZL.js → Users01-CHhUYr_-.js} +1 -1
  40. package/dist/client/assets/{Users03-C1C_-4H4.js → Users03-BubKtGEN.js} +1 -1
  41. package/dist/client/assets/{X-DuH9meaW.js → X-DNthiYnC.js} +1 -1
  42. package/dist/client/assets/{XCircle-DDi-eHUx.js → XCircle-CowkXBTi.js} +1 -1
  43. package/dist/client/assets/{XClose-GdiLhRNK.js → XClose-B9_O9ZwX.js} +1 -1
  44. package/dist/client/assets/{Zap-Dy75gJ9Z.js → Zap-DptPhcrr.js} +1 -1
  45. package/dist/client/assets/{ZapSquare-P6cQPzc4.js → ZapSquare-DM6ZWSzD.js} +1 -1
  46. package/dist/client/assets/{ZoomOut-DP0DgIxq.js → ZoomOut-BmpdGZEc.js} +1 -1
  47. package/dist/client/assets/{access-gate-B7VqgZu1.js → access-gate-DzI7fje7.js} +1 -1
  48. package/dist/client/assets/{add-section-modal-BfmN6P7x.js → add-section-modal-Cl2Q63YX.js} +1 -1
  49. package/dist/client/assets/{agent-capabilities-B1SWagyu.js → agent-capabilities-DlIlOn9g.js} +1 -1
  50. package/dist/client/assets/{agent-icon-DgEjd-zg.js → agent-icon-DiJCyVK_.js} +1 -1
  51. package/dist/client/assets/{agents-list-DNHcK1QD.js → agents-list-C6ag4VGE.js} +1 -1
  52. package/dist/client/assets/{ai-providers-DTLfG4EU.js → ai-providers-Cn8GiYb0.js} +1 -1
  53. package/dist/client/assets/{alert-Q_eEr_y9.js → alert-BNE2objS.js} +1 -1
  54. package/dist/client/assets/{alert-dialog-B1rOkStA.js → alert-dialog-Bb_E0Ib3.js} +1 -1
  55. package/dist/client/assets/{app-editor-BRbNZS9F.js → app-editor-u7WWlq5N.js} +1 -1
  56. package/dist/client/assets/{auth-USBWp_2D.js → auth-X2zOoLs3.js} +1 -1
  57. package/dist/client/assets/{auth-catchall-DQYMKZjA.js → auth-catchall-B5n0qWQs.js} +1 -1
  58. package/dist/client/assets/{auth-entry-BfHZrcV5.js → auth-entry-8VtUevv2.js} +1 -1
  59. package/dist/client/assets/{auth-split-layout-VPCmaeTK.js → auth-split-layout-cRqLGO3N.js} +1 -1
  60. package/dist/client/assets/{authenticate-and-persist-oauth-DcLeuVqz.js → authenticate-and-persist-oauth-uQHwVym9.js} +1 -1
  61. package/dist/client/assets/{automation-list-row-CoXbNmPR.js → automation-list-row-DMW0IRGB.js} +1 -1
  62. package/dist/client/assets/{automation-runs-B6W-oQ-b.js → automation-runs-Dt4hr7e4.js} +1 -1
  63. package/dist/client/assets/{automations-obFho4ZR.js → automations-CHbcRBgK.js} +1 -1
  64. package/dist/client/assets/{autosend-CmW2aOxR.js → autosend-hpJ3sd0t.js} +1 -1
  65. package/dist/client/assets/{avatar-BRw1vbr3.js → avatar-7MpZ9q34.js} +1 -1
  66. package/dist/client/assets/{badge-CVxnahFC.js → badge-DK3Lxhxf.js} +1 -1
  67. package/dist/client/assets/{block-document-Q6RnxK7S.js → block-document-D52oI8HZ.js} +1 -1
  68. package/dist/client/assets/{brand-context-BonyZcM-.js → brand-context-kupTn8ww.js} +1 -1
  69. package/dist/client/assets/{breadcrumb-aBS6Ng2n.js → breadcrumb-Chp_BCp3.js} +1 -1
  70. package/dist/client/assets/{buckets-C7dWs2uu.js → buckets-9c-3tQqN.js} +1 -1
  71. package/dist/client/assets/{bulk-category-panel-Do97eXJC.js → bulk-category-panel-Cvr8ttuk.js} +1 -1
  72. package/dist/client/assets/{calendar-JCMASnmh.js → calendar-CVcC02T0.js} +1 -1
  73. package/dist/client/assets/{capability-load-error-YZD1WIw1.js → capability-load-error-BDl1R2Mq.js} +1 -1
  74. package/dist/client/assets/{card-Box4iJoV.js → card-CuLmtjkK.js} +1 -1
  75. package/dist/client/assets/{category-editor-DhuqqWc4.js → category-editor-CXTluY_C.js} +1 -1
  76. package/dist/client/assets/{chat-context-RywSrvyo.js → chat-context-Bcthg0Rk.js} +1 -1
  77. package/dist/client/assets/{checkbox-CIrD_BaK.js → checkbox-B1YF-uK0.js} +1 -1
  78. package/dist/client/assets/{cli-auth-success-XSaYrZBb.js → cli-auth-success-C53wAj-e.js} +1 -1
  79. package/dist/client/assets/{collection-detail-D1g5WZ3K.js → collection-detail-ZtPppzVw.js} +1 -1
  80. package/dist/client/assets/{collection-display-button-Bj7twyNb.js → collection-display-button-DpeNVXJK.js} +1 -1
  81. package/dist/client/assets/{collection-search-DFOtRfqr.js → collection-search-COWX-zrS.js} +1 -1
  82. package/dist/client/assets/{collection-table-wrapper-DGM0c4AV.js → collection-table-wrapper-Dx6fV4WQ.js} +1 -1
  83. package/dist/client/assets/{collection-tabs-C8GiZNTZ.js → collection-tabs-CJs3t0kZ.js} +1 -1
  84. package/dist/client/assets/{command-C5AmTrdX.js → command-U4hp1Sg9.js} +1 -1
  85. package/dist/client/assets/{commerce-onboarding-DylsNiNy.js → commerce-onboarding-IejA-j4v.js} +1 -1
  86. package/dist/client/assets/{connect-desktop-dialog-DXKUejW8.js → connect-desktop-dialog-CttYQBP_.js} +1 -1
  87. package/dist/client/assets/{connection-card-R8cixMJA.js → connection-card-zsKQnX7M.js} +1 -1
  88. package/dist/client/assets/{connection-detail-BXlY0hBc.js → connection-detail-u-TS1N7E.js} +1 -1
  89. package/dist/client/assets/{connection-form-helpers-Dg4QpFTl.js → connection-form-helpers-BBQix76t.js} +1 -1
  90. package/dist/client/assets/{connections-D9SCiPTC.js → connections-CDKaSrk-.js} +1 -1
  91. package/dist/client/assets/{decopilot-sse-pool-DbpDU6zp.js → decopilot-sse-pool-Bp3qtF_q.js} +1 -1
  92. package/dist/client/assets/{dialog-DSwtrH3c.js → dialog-DkT4Ri5Y.js} +1 -1
  93. package/dist/client/assets/{domain-settings-BSHm1szM.js → domain-settings-BFWHE9rM.js} +1 -1
  94. package/dist/client/assets/{drawer-DLnh7VDP.js → drawer-CsLvjAFm.js} +1 -1
  95. package/dist/client/assets/{dropdown-menu-CP58k9uG.js → dropdown-menu-Ckz_4tyn.js} +1 -1
  96. package/dist/client/assets/{empty-state-DeqTpsIg.js → empty-state-B1jCdJ6v.js} +1 -1
  97. package/dist/client/assets/{extract-connection-data-B9XwWcLA.js → extract-connection-data-iRkA6j8O.js} +1 -1
  98. package/dist/client/assets/{file-explorer-kVctnG_C.js → file-explorer-DeYjEnVU.js} +1 -1
  99. package/dist/client/assets/{file-type-icon-DX-skkXW.js → file-type-icon-CGnBXvlC.js} +1 -1
  100. package/dist/client/assets/{files-DILn6HGU.js → files-BQl4hGax.js} +1 -1
  101. package/dist/client/assets/{form-CrI62Hn2.js → form-DaFgzcD-.js} +1 -1
  102. package/dist/client/assets/{general-D1Yw1l7v.js → general-r1yDnvRs.js} +1 -1
  103. package/dist/client/assets/{github-repo-picker-yq0WAGxV.js → github-repo-picker-DNxMMrPO.js} +1 -1
  104. package/dist/client/assets/{hooks-DWYbP5m8.js → hooks-6n_u4oV8.js} +1 -1
  105. package/dist/client/assets/{index-DvNlHFzE.js → index-0RYeOBGJ.js} +1 -1
  106. package/dist/client/assets/{index-DmpQNPd4.js → index-BBLmYI9u.js} +22 -22
  107. package/dist/client/assets/{index-DYg2VhI5.js → index-BLUPWNvZ.js} +1 -1
  108. package/dist/client/assets/{index-Cb7CSq23.js → index-BgmdlU4F.js} +1 -1
  109. package/dist/client/assets/{index-CI61BawX.js → index-BuoPGVgL.js} +1 -1
  110. package/dist/client/assets/{index-DYSbWFsV.js → index-BzYr87l3.js} +1 -1
  111. package/dist/client/assets/{index-DGdLDowk.js → index-CR0OxjC9.js} +1 -1
  112. package/dist/client/assets/{index-BFgDL42Z.js → index-CakKlCqQ.js} +1 -1
  113. package/dist/client/assets/{index-C3vwz_dr.js → index-D85wAsnN.js} +1 -1
  114. package/dist/client/assets/{index-2J9py-e1.js → index-DMCDP9dR.js} +3 -3
  115. package/dist/client/assets/index-DR1NTX1L.css +1 -0
  116. package/dist/client/assets/{index-DRWjYT4B.js → index-Dva6I2-Y.js} +1 -1
  117. package/dist/client/assets/{index-BeYjQpI7.js → index-OHGOt-QL.js} +1 -1
  118. package/dist/client/assets/{index-D104HfgJ.js → index-_JTFwd45.js} +1 -1
  119. package/dist/client/assets/{index-redirect-BskdDWV4.js → index-redirect-BdktlaC9.js} +1 -1
  120. package/dist/client/assets/{index-0NY8sfnD.js → index-zpcYg8ov.js} +1 -1
  121. package/dist/client/assets/{input-CPgIZjnq.js → input-Bv-zBVyU.js} +1 -1
  122. package/dist/client/assets/{integration-icon-BRx3OrOO.js → integration-icon-DQZa3sYE.js} +1 -1
  123. package/dist/client/assets/{invite-member-dialog-BqLsPd-I.js → invite-member-dialog-DXZ80KCM.js} +1 -1
  124. package/dist/client/assets/{label-ByJJI9o9.js → label-o5nMOYcO.js} +1 -1
  125. package/dist/client/assets/{layout-DkSXJKeZ.js → layout-Ct-NSkaZ.js} +1 -1
  126. package/dist/client/assets/{login-BaRuvHAv.js → login-BNYF44OS.js} +1 -1
  127. package/dist/client/assets/{mcp-oauth-CjPLnQJW.js → mcp-oauth-C_medu58.js} +1 -1
  128. package/dist/client/assets/{members-Cjw14hN6.js → members-C9_M5PqO.js} +1 -1
  129. package/dist/client/assets/{monaco-editor-DO2E_4ud.js → monaco-editor-tFbpBjhS.js} +1 -1
  130. package/dist/client/assets/{monitoring-stats-row-BDngajlS.js → monitoring-stats-row-DeM-N2J5.js} +1 -1
  131. package/dist/client/assets/{oauth-callback-DDmigr1U.js → oauth-callback-BeTVZqoU.js} +1 -1
  132. package/dist/client/assets/{oauth-callback-ai-provider-jnUl_dNc.js → oauth-callback-ai-provider-DU9kvW_X.js} +1 -1
  133. package/dist/client/assets/{onboarding-BLwm4iYG.js → onboarding-BXkj_1d1.js} +1 -1
  134. package/dist/client/assets/{org-install-BKR8pPq9.js → org-install-C5Q_lrGd.js} +1 -1
  135. package/dist/client/assets/{org-layout-iq4QcPHM.js → org-layout-LSJ3O2qD.js} +1 -1
  136. package/dist/client/assets/{organization-choice-1zNEO-z1.js → organization-choice-kI0WcHW4.js} +1 -1
  137. package/dist/client/assets/{orgs-BvPbxUA_.js → orgs-AtEz89cn.js} +1 -1
  138. package/dist/client/assets/{page-seo-form-xMWOO_aT.js → page-seo-form-B3JcFei-.js} +1 -1
  139. package/dist/client/assets/page-seo-sheet-JexZxptV.js +1 -0
  140. package/dist/client/assets/{popover-Di49hXoq.js → popover-DScORrBz.js} +1 -1
  141. package/dist/client/assets/{post-editor-BJtWqvn2.js → post-editor-CtABAPyS.js} +1 -1
  142. package/dist/client/assets/{primitives-40xnqKa8.js → primitives-2aKpJLl6.js} +1 -1
  143. package/dist/client/assets/{profile-B3Qz5OQH.js → profile-B5fhF0J5.js} +1 -1
  144. package/dist/client/assets/project-app-view-DpI2GgkU.js +1 -0
  145. package/dist/client/assets/record-editor-BQRaFuNl.js +1 -0
  146. package/dist/client/assets/registry-BZL70RtY.js +2 -0
  147. package/dist/client/assets/{registry-layout-BP4UvzFu.js → registry-layout-C6j571Mp.js} +1 -1
  148. package/dist/client/assets/{require-capability-bheSt4Ha.js → require-capability-CpBEjv6M.js} +1 -1
  149. package/dist/client/assets/{required-auth-layout-D8-9nMC1.js → required-auth-layout-BllY9X0X.js} +1 -1
  150. package/dist/client/assets/{reset-password-Cm90t6OS.js → reset-password-DkiqmSgp.js} +1 -1
  151. package/dist/client/assets/{roles-DRGXssOA.js → roles-DJxIZBSn.js} +1 -1
  152. package/dist/client/assets/{search-input-CDgOZhUx.js → search-input-BdjHYcO9.js} +1 -1
  153. package/dist/client/assets/{secrets-ChNigaEB.js → secrets-BG5x9RsU.js} +1 -1
  154. package/dist/client/assets/{sections-editor-CWNNeE6w.js → sections-editor-N4FsFHJ4.js} +2 -2
  155. package/dist/client/assets/{select-Cghqgv9M.js → select-DX7cJPSR.js} +1 -1
  156. package/dist/client/assets/{select-model-hKeuB30h.js → select-model-DeqZghIM.js} +1 -1
  157. package/dist/client/assets/{seo-editor-BOvmQGoB.js → seo-editor-OsNm8ZRU.js} +1 -1
  158. package/dist/client/assets/{settings-layout-yKc49o-h.js → settings-layout-DQClMbGM.js} +1 -1
  159. package/dist/client/assets/{settings-section-DJSF2-yN.js → settings-section-DG4UePho.js} +1 -1
  160. package/dist/client/assets/{shell-controls-BfBfRxJV.js → shell-controls-CPfTsUc0.js} +1 -1
  161. package/dist/client/assets/{shell-layout-D6B5jOh9.js → shell-layout-CKAEuy11.js} +1 -1
  162. package/dist/client/assets/{sidebar-DRcu2eQH.js → sidebar-CQ6X6EgL.js} +1 -1
  163. package/dist/client/assets/{skeleton-Dgzqsrmm.js → skeleton-B1SkUhzL.js} +1 -1
  164. package/dist/client/assets/{sso-xUQ7r0ut.js → sso-DKGtOmgQ.js} +1 -1
  165. package/dist/client/assets/{store-Dkup7A2E.js → store-Oz22e-Wi.js} +1 -1
  166. package/dist/client/assets/store-registry-DH3yKhz-.js +2 -0
  167. package/dist/client/assets/{studio-tools-Dq9eyK0h.js → studio-tools-O1wqkKr7.js} +1 -1
  168. package/dist/client/assets/{switch-CNYOO06Q.js → switch-B4AE76uJ.js} +1 -1
  169. package/dist/client/assets/{table-D0SHP_P3.js → table-D94_WLHm.js} +1 -1
  170. package/dist/client/assets/{tabs-WbQCNiHn.js → tabs-BdsrY0VQ.js} +1 -1
  171. package/dist/client/assets/{textarea-DyoYWnbd.js → textarea-D5bA0vwh.js} +1 -1
  172. package/dist/client/assets/{toggle-group-Bu-PWxkG.js → toggle-group-f2RgMq4W.js} +1 -1
  173. package/dist/client/assets/{toolbar-LEdb9i7-.js → toolbar-CnGwQIGK.js} +1 -1
  174. package/dist/client/assets/{toolbar-icon-button-BdGG2k_3.js → toolbar-icon-button-DV30tB3z.js} +1 -1
  175. package/dist/client/assets/{tools-list-CyU2eF6i.js → tools-list-BZtd6vTC.js} +1 -1
  176. package/dist/client/assets/{tooltip-BRb7PA9v.js → tooltip-C-Fdi799.js} +1 -1
  177. package/dist/client/assets/{types-DcP2pDvU.js → types-BGdz0DTZ.js} +1 -1
  178. package/dist/client/assets/{use-ai-providers-B-08Js8f.js → use-ai-providers-DnQtGTlK.js} +1 -1
  179. package/dist/client/assets/{use-automations-RVQrgYV7.js → use-automations-CLvdnni4.js} +1 -1
  180. package/dist/client/assets/{use-capability-D8RRDS0J.js → use-capability-DyEmup-l.js} +1 -1
  181. package/dist/client/assets/{use-clock-tick-PutxutBx.js → use-clock-tick-r41I52rR.js} +1 -1
  182. package/dist/client/assets/{use-collections-DEBusStk.js → use-collections-B4CZte7v.js} +1 -1
  183. package/dist/client/assets/{use-connection-CbSx9WL-.js → use-connection-C9S1yRy-.js} +1 -1
  184. package/dist/client/assets/{use-copy-zn7CKsNn.js → use-copy-Dtp5QKkh.js} +1 -1
  185. package/dist/client/assets/{use-create-virtual-mcp-CIsGMDdP.js → use-create-virtual-mcp-bFBi_I94.js} +1 -1
  186. package/dist/client/assets/{use-debounced-autosave-CZutZGE6.js → use-debounced-autosave-B_MytNzA.js} +1 -1
  187. package/dist/client/assets/{use-debounced-value-stLkCGGE.js → use-debounced-value-D5S2o6mL.js} +1 -1
  188. package/dist/client/assets/{use-decopilot-events-C-bHC4m2.js → use-decopilot-events-X4WShNfU.js} +1 -1
  189. package/dist/client/assets/{use-delete-connection-LLHSraLG.js → use-delete-connection-B6yuL_jT.js} +1 -1
  190. package/dist/client/assets/{use-deployment-admin-DLjYzDku.js → use-deployment-admin-DOqhSJ2E.js} +1 -1
  191. package/dist/client/assets/{use-file-configs-Cr3ojEQZ.js → use-file-configs-i-DgXdKu.js} +1 -1
  192. package/dist/client/assets/{use-infinite-scroll-DU6_2BYs.js → use-infinite-scroll-C10ycd3E.js} +1 -1
  193. package/dist/client/assets/{use-join-requests-DCSa94Gt.js → use-join-requests-C9k3gHqE.js} +1 -1
  194. package/dist/client/assets/{use-mcp-client-BFfDw7Na.js → use-mcp-client-xyqZgz7w.js} +1 -1
  195. package/dist/client/assets/{use-mcp-prompts-ZigM2rJs.js → use-mcp-prompts-rcTAN3zC.js} +1 -1
  196. package/dist/client/assets/{use-mcp-tools-Dci7vJWh.js → use-mcp-tools-BY1xI7T1.js} +1 -1
  197. package/dist/client/assets/{use-members-CkM3oszX.js → use-members-BLAy8O_e.js} +1 -1
  198. package/dist/client/assets/{use-mobile-DcoKiKHf.js → use-mobile-8PCzv3Mi.js} +1 -1
  199. package/dist/client/assets/{use-navigate-to-agent-DLTVhJZe.js → use-navigate-to-agent-DFHenM1Y.js} +1 -1
  200. package/dist/client/assets/{use-org-auth-client-NR_tIEBe.js → use-org-auth-client-Dapr-HwO.js} +1 -1
  201. package/dist/client/assets/{use-org-sso-BBuTBvZM.js → use-org-sso-Bi4sTov0.js} +1 -1
  202. package/dist/client/assets/{use-organization-roles-Ds-tZdpJ.js → use-organization-roles-Bf_z3Rj3.js} +1 -1
  203. package/dist/client/assets/{use-organization-settings-CjrnkZNU.js → use-organization-settings-DTNEfKpa.js} +1 -1
  204. package/dist/client/assets/{use-registry-connections-BTmktc4i.js → use-registry-connections-B9ry2u5e.js} +1 -1
  205. package/dist/client/assets/{use-secrets-Q44-sgJw.js → use-secrets-CufX7ryc.js} +1 -1
  206. package/dist/client/assets/{use-status-sounds-DNwiCMgb.js → use-status-sounds-83cWEknM.js} +1 -1
  207. package/dist/client/assets/{use-view-mode-T-khPQ1H.js → use-view-mode-CSOFCgi9.js} +1 -1
  208. package/dist/client/assets/{use-virtual-mcp-BDvqLUy9.js → use-virtual-mcp-DNIEk3-8.js} +1 -1
  209. package/dist/client/assets/useInfiniteQuery-KvXcQTyz.js +1 -0
  210. package/dist/client/assets/{useRouterState-CAhYvs_K.js → useRouterState-Bir8csze.js} +1 -1
  211. package/dist/client/assets/useSuspenseInfiniteQuery-CNDc5W3G.js +1 -0
  212. package/dist/client/assets/{users-gc1Jdg0-.js → users-D5_kLsNp.js} +1 -1
  213. package/dist/client/assets/{variant-calendar-BCNKLZth.js → variant-calendar-FGtc7tCa.js} +1 -1
  214. package/dist/client/assets/{view-mode-toggle-BmycSdLQ.js → view-mode-toggle-BnUQvisV.js} +1 -1
  215. package/dist/client/index.html +2 -2
  216. package/dist/server/cli.js +1 -1
  217. package/dist/server/server.js +1 -1
  218. package/package.json +1 -1
  219. package/dist/client/assets/index-ZbSNKPKh.css +0 -1
  220. package/dist/client/assets/page-seo-sheet-DWGLdSx-.js +0 -1
  221. package/dist/client/assets/project-app-view-jdTC0Cg5.js +0 -1
  222. package/dist/client/assets/record-editor-0LSR3b6o.js +0 -1
  223. package/dist/client/assets/registry-DJ31-ipj.js +0 -2
  224. package/dist/client/assets/store-registry-D7mOTqo9.js +0 -2
  225. package/dist/client/assets/useInfiniteQuery-UssBOKk_.js +0 -1
  226. package/dist/client/assets/useSuspenseInfiniteQuery-DzPLr418.js +0 -1
@@ -1 +1 @@
1
- import{c as f,l as d,r as p,j as r}from"./index-2J9py-e1.js";import{r as w}from"./sidebar-DRcu2eQH.js";const v=p.createContext(void 0),H=v.Provider;function N(c,e){const l=p.Children.toArray(c);for(const i of l)if(p.isValidElement(i)&&i.type===e)return i;return null}function P(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex flex-col h-full w-full bg-background overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function C(c){const e=f.c(17),{children:l,className:i,hideSidebarTrigger:s}=c;let t;e[0]!==l?(t=N(l,j),e[0]=l,e[1]=t):t=e[1];const n=t;let a;e[2]!==l?(a=N(l,b),e[2]=l,e[3]=a):a=e[3];const o=a;let m;e[4]!==i?(m=d("shrink-0 w-full border-b border-border/50 h-11","flex items-center justify-between gap-3 pr-2 pl-2 md:pl-4",i),e[4]=i,e[5]=m):m=e[5];let x;e[6]!==s?(x=!s&&r.jsx(w,{className:"md:hidden shrink-0"}),e[6]=s,e[7]=x):x=e[7];let u;e[8]!==n||e[9]!==x?(u=r.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[x,n]}),e[8]=n,e[9]=x,e[10]=u):u=e[10];let h;e[11]!==o?(h=r.jsx("div",{className:"flex items-center",children:o}),e[11]=o,e[12]=h):h=e[12];let g;return e[13]!==m||e[14]!==u||e[15]!==h?(g=r.jsxs("div",{className:m,children:[u,h]}),e[13]=m,e[14]=u,e[15]=h,e[16]=g):g=e[16],g}function j(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 min-w-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function b(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 shrink-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function $(c){const e=f.c(6),{children:l,className:i}=c,s=p.useContext(v);let t;e[0]!==i||e[1]!==s?(t=d("flex-1 overflow-auto",s,i),e[0]=i,e[1]=s,e[2]=t):t=e[2];let n;return e[3]!==l||e[4]!==t?(n=r.jsx("div",{className:t,children:l}),e[3]=l,e[4]=t,e[5]=n):n=e[5],n}function y(c){const e=f.c(10),{children:l,actions:i,className:s}=c;let t;e[0]!==s?(t=d("flex flex-wrap items-center justify-between gap-3",s),e[0]=s,e[1]=t):t=e[1];let n;e[2]!==l?(n=r.jsx("div",{className:"text-xl font-medium min-w-0",children:l}),e[2]=l,e[3]=n):n=e[3];let a;e[4]!==i?(a=i&&r.jsx("div",{className:"flex items-center gap-2",children:i}),e[4]=i,e[5]=a):a=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==a?(o=r.jsxs("div",{className:t,children:[n,a]}),e[6]=t,e[7]=n,e[8]=a,e[9]=o):o=e[9],o}function R(c){const e=f.c(6),{children:l,className:i,maxWidth:s}=c,t=s===void 0?"max-w-[1200px]":s;let n;e[0]!==i||e[1]!==t?(n=d("mx-auto w-full px-4 pt-8 pb-6 md:px-10 md:pt-12 md:pb-10",t,i),e[0]=i,e[1]=t,e[2]=n):n=e[2];let a;return e[3]!==l||e[4]!==n?(a=r.jsx("div",{className:n,children:l}),e[3]=l,e[4]=n,e[5]=a):a=e[5],a}const T=Object.assign(P,{Header:Object.assign(C,{Left:j,Right:b}),Content:$,Title:y,Body:R});export{T as P,H as a};
1
+ import{c as f,l as d,r as p,j as r}from"./index-DMCDP9dR.js";import{r as w}from"./sidebar-CQ6X6EgL.js";const v=p.createContext(void 0),H=v.Provider;function N(c,e){const l=p.Children.toArray(c);for(const i of l)if(p.isValidElement(i)&&i.type===e)return i;return null}function P(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex flex-col h-full w-full bg-background overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function C(c){const e=f.c(17),{children:l,className:i,hideSidebarTrigger:s}=c;let t;e[0]!==l?(t=N(l,j),e[0]=l,e[1]=t):t=e[1];const n=t;let a;e[2]!==l?(a=N(l,b),e[2]=l,e[3]=a):a=e[3];const o=a;let m;e[4]!==i?(m=d("shrink-0 w-full border-b border-border/50 h-11","flex items-center justify-between gap-3 pr-2 pl-2 md:pl-4",i),e[4]=i,e[5]=m):m=e[5];let x;e[6]!==s?(x=!s&&r.jsx(w,{className:"md:hidden shrink-0"}),e[6]=s,e[7]=x):x=e[7];let u;e[8]!==n||e[9]!==x?(u=r.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[x,n]}),e[8]=n,e[9]=x,e[10]=u):u=e[10];let h;e[11]!==o?(h=r.jsx("div",{className:"flex items-center",children:o}),e[11]=o,e[12]=h):h=e[12];let g;return e[13]!==m||e[14]!==u||e[15]!==h?(g=r.jsxs("div",{className:m,children:[u,h]}),e[13]=m,e[14]=u,e[15]=h,e[16]=g):g=e[16],g}function j(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 min-w-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function b(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 shrink-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function $(c){const e=f.c(6),{children:l,className:i}=c,s=p.useContext(v);let t;e[0]!==i||e[1]!==s?(t=d("flex-1 overflow-auto",s,i),e[0]=i,e[1]=s,e[2]=t):t=e[2];let n;return e[3]!==l||e[4]!==t?(n=r.jsx("div",{className:t,children:l}),e[3]=l,e[4]=t,e[5]=n):n=e[5],n}function y(c){const e=f.c(10),{children:l,actions:i,className:s}=c;let t;e[0]!==s?(t=d("flex flex-wrap items-center justify-between gap-3",s),e[0]=s,e[1]=t):t=e[1];let n;e[2]!==l?(n=r.jsx("div",{className:"text-xl font-medium min-w-0",children:l}),e[2]=l,e[3]=n):n=e[3];let a;e[4]!==i?(a=i&&r.jsx("div",{className:"flex items-center gap-2",children:i}),e[4]=i,e[5]=a):a=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==a?(o=r.jsxs("div",{className:t,children:[n,a]}),e[6]=t,e[7]=n,e[8]=a,e[9]=o):o=e[9],o}function R(c){const e=f.c(6),{children:l,className:i,maxWidth:s}=c,t=s===void 0?"max-w-[1200px]":s;let n;e[0]!==i||e[1]!==t?(n=d("mx-auto w-full px-4 pt-8 pb-6 md:px-10 md:pt-12 md:pb-10",t,i),e[0]=i,e[1]=t,e[2]=n):n=e[2];let a;return e[3]!==l||e[4]!==n?(a=r.jsx("div",{className:n,children:l}),e[3]=l,e[4]=n,e[5]=a):a=e[5],a}const T=Object.assign(P,{Header:Object.assign(C,{Left:j,Right:b}),Content:$,Title:y,Body:R});export{T as P,H as a};
@@ -1,4 +1,4 @@
1
- import{c as oe,r as K,b as yt,a1 as Be,j as t,B as Z,t as Se,l as de,K as it,m as wt,ah as rs,u as os,R as xt,U as ls}from"./index-2J9py-e1.js";import{S as as}from"./search-input-CDgOZhUx.js";import{P as De}from"./index-DYg2VhI5.js";import{E as St}from"./empty-state-DeqTpsIg.js";import{R as ns}from"./require-capability-bheSt4Ha.js";import{N as Tt,A as is,Q as cs,U as Mt,V as Ze,W as At,X as ft,Y as ds,Z as _t,_ as Pt,L as ms,$ as us,a0 as xs,a1 as pt}from"./automation-runs-B6W-oQ-b.js";import{u as vt}from"./use-connection-CbSx9WL-.js";import{g as Ut}from"./connection-slug-eyAPH6o3.js";import{B as rt}from"./badge-CVxnahFC.js";import{P as ct,a as dt,b as mt}from"./popover-Di49hXoq.js";import{T as et,a as tt,b as st}from"./tooltip-BRb7PA9v.js";import{i as ht}from"./Check-BaUMJ78L.js";import{a as Xe}from"./Copy01-_g0t0qlZ.js";import{n as Dt}from"./Globe01-XPkeFMHR.js";import{i as Vt}from"./FilterLines-CgaBTy3e.js";import{i as fs}from"./Key01-X2Cp5G1j.js";import{i as ps}from"./Play-CeoTbFcX.js";import{au as hs,X as gs}from"./agent-icon-DgEjd-zg.js";import{M as Lt}from"./monaco-editor-DO2E_4ud.js";import{u as js}from"./use-members-CkM3oszX.js";import{u as vs}from"./use-mcp-client-BFfDw7Na.js";import{a as Ns}from"./use-virtual-mcp-BDvqLUy9.js";import{S as bs,W as ys}from"./constants-B72Xmt_K.js";import{n as Ge}from"./XCircle-DDi-eHUx.js";import{c as ws}from"./SwitchHorizontal01-C5lh09BG.js";import{s as Ss}from"./Plus-BMHnzEgp.js";import{s as Is}from"./Trash01-CfJ0a-B-.js";import{I as Qe}from"./input-CPgIZjnq.js";import{a as ot,b as lt,c as at,d as $e,S as nt}from"./select-Cghqgv9M.js";import{t as Kt}from"./ChevronDown-wNYjMtTF.js";import{s as Cs}from"./Stars02-u80z6or-.js";import{C as ks}from"./calendar-JCMASnmh.js";import{a as Ts}from"./Loading02-Q-5W4uzZ.js";import{T as Ms}from"./textarea-DyoYWnbd.js";import{C as qt}from"./collection-tabs-C8GiZNTZ.js";import{S as _s}from"./switch-CNYOO06Q.js";import{L as Ds}from"./label-ByJJI9o9.js";import{I as qe}from"./integration-icon-BRx3OrOO.js";import{A as Bt}from"./avatar-BRw1vbr3.js";import{A as Ls,a as Rs,b as Fs}from"./alert-Q_eEr_y9.js";import{C as Ht}from"./card-Box4iJoV.js";import{K as Me}from"./monitoring-stats-row-BDngajlS.js";import{u as Jt}from"./studio-tools-Dq9eyK0h.js";import{u as $s}from"./useSuspenseInfiniteQuery-DzPLr418.js";import{o as zs,m as Os,p as Es,q as As}from"./sidebar-DRcu2eQH.js";import{T as Re,a as ut,b as Qt,c as Gt,d as Wt,e as ae}from"./table-D0SHP_P3.js";import{n as Ps}from"./ChevronUp-C6irMbKQ.js";import{u as Us}from"./use-infinite-scroll-DU6_2BYs.js";import{c as Vs,b as Ks}from"./use-automations-RVQrgYV7.js";import"./SearchMd-DANDIa_n.js";import"./use-capability-D8RRDS0J.js";import"./access-gate-B7VqgZu1.js";import"./capability-load-error-YZD1WIw1.js";import"./useInfiniteQuery-UssBOKk_.js";import"./use-clock-tick-PutxutBx.js";import"./AlertCircle-ClNAIcG0.js";import"./CheckCircle-BDnR8A1L.js";import"./Circle-YG_2bf45.js";import"./checkbox-CIrD_BaK.js";import"./command-C5AmTrdX.js";import"./index-C3vwz_dr.js";import"./dialog-DSwtrH3c.js";import"./X-DuH9meaW.js";import"./Stars01-CdPO3Nl2.js";import"./ChevronRight-C-TpN8He.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-zn7CKsNn.js";import"./file-type-icon-DX-skkXW.js";import"./ZoomOut-DP0DgIxq.js";import"./use-mobile-DcoKiKHf.js";import"./tab-id-bb-jjgGv.js";import"./types-DcP2pDvU.js";import"./chat-context-RywSrvyo.js";import"./autosend-CmW2aOxR.js";import"./hooks-DWYbP5m8.js";import"./decopilot-sse-pool-DbpDU6zp.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-B-08Js8f.js";import"./use-decopilot-events-C-bHC4m2.js";import"./use-organization-settings-CjrnkZNU.js";import"./Eye-B0b47qlC.js";import"./Star01-CFBLrKzQ.js";import"./XClose-GdiLhRNK.js";import"./ZapSquare-P6cQPzc4.js";import"./Tool01-B8q9vFcz.js";import"./Monitor01-CNRD_PE8.js";import"./Upload01-D_QZcVHs.js";import"./shell-layout-D6B5jOh9.js";import"./Users03-C1C_-4H4.js";import"./SearchLg-V_Q9UCyP.js";import"./Zap-Dy75gJ9Z.js";import"./alert-dialog-B1rOkStA.js";import"./required-auth-layout-D8-9nMC1.js";import"./use-org-sso-BBuTBvZM.js";import"./LinkExternal01-DbsJ_E6N.js";import"./ArrowUpRight-DjTrxTn1.js";import"./Palette-DjHatrbR.js";import"./use-navigate-to-agent-DLTVhJZe.js";import"./reusable-new-chat-CouMjkYR.js";import"./use-mcp-prompts-ZigM2rJs.js";import"./form-CrI62Hn2.js";import"./use-collections-DEBusStk.js";import"./ArrowUp-DY8HR8F0.js";import"./Settings02-C8t-YS9f.js";import"./DotsVertical-DTKbesDy.js";import"./Globe04-BrUOkeSn.js";import"./HardDrive-C0Mdm8TH.js";import"./LayoutLeft-DlvxEfnj.js";import"./List-Bk3antXp.js";import"./Sun-BntcwdNi.js";import"./Shield01-Dn1dWDdY.js";import"./User01-Darruqx_.js";import"./Users01-Bus8Z2ZL.js";import"./index-CI61BawX.js";import"./use-org-auth-client-NR_tIEBe.js";import"./auth-USBWp_2D.js";import"./index-DGdLDowk.js";const Nt={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3};function Fe(s){return s.filter(e=>e.key.trim()).map(e=>{const r=encodeURIComponent(e.key.trim()),o=encodeURIComponent(e.value||"");return`${r}:${e.operator}:${o}`}).join(",")}function qs(s){return s?s.split(",").map(e=>{const[r,o,...a]=e.split(":");return{key:decodeURIComponent(r||""),operator:o||"eq",value:decodeURIComponent(a.join(":")||"")}}):[]}function Ye(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
1
+ import{c as oe,r as K,b as yt,a1 as Be,j as t,B as Z,t as Se,l as de,K as it,m as wt,ah as rs,u as os,R as xt,U as ls}from"./index-DMCDP9dR.js";import{S as as}from"./search-input-BdjHYcO9.js";import{P as De}from"./index-BLUPWNvZ.js";import{E as St}from"./empty-state-B1jCdJ6v.js";import{R as ns}from"./require-capability-CpBEjv6M.js";import{N as Tt,A as is,Q as cs,U as Mt,V as Ze,W as At,X as ft,Y as ds,Z as _t,_ as Pt,L as ms,$ as us,a0 as xs,a1 as pt}from"./automation-runs-Dt4hr7e4.js";import{u as vt}from"./use-connection-C9S1yRy-.js";import{g as Ut}from"./connection-slug-eyAPH6o3.js";import{B as rt}from"./badge-DK3Lxhxf.js";import{P as ct,a as dt,b as mt}from"./popover-DScORrBz.js";import{T as et,a as tt,b as st}from"./tooltip-C-Fdi799.js";import{i as ht}from"./Check-C_CIFiKi.js";import{a as Xe}from"./Copy01-I5E-L-KP.js";import{n as Dt}from"./Globe01-D8Lfegq4.js";import{i as Vt}from"./FilterLines-Dabon75B.js";import{i as fs}from"./Key01-BlVS9wch.js";import{i as ps}from"./Play-CgD79iZg.js";import{au as hs,Y as gs}from"./agent-icon-DiJCyVK_.js";import{M as Lt}from"./monaco-editor-tFbpBjhS.js";import{u as js}from"./use-members-BLAy8O_e.js";import{u as vs}from"./use-mcp-client-xyqZgz7w.js";import{a as Ns}from"./use-virtual-mcp-DNIEk3-8.js";import{S as bs,W as ys}from"./constants-B72Xmt_K.js";import{n as Ge}from"./XCircle-CowkXBTi.js";import{c as ws}from"./SwitchHorizontal01-DDDazbVr.js";import{s as Ss}from"./Plus-D63gaaHA.js";import{s as Is}from"./Trash01-Cf4xz_lu.js";import{I as Qe}from"./input-Bv-zBVyU.js";import{a as ot,b as lt,c as at,d as $e,S as nt}from"./select-DX7cJPSR.js";import{t as Kt}from"./ChevronDown-BfG3lHhC.js";import{s as Cs}from"./Stars02-D3yMrrs0.js";import{C as ks}from"./calendar-CVcC02T0.js";import{a as Ts}from"./Loading02-CQnI4ICL.js";import{T as Ms}from"./textarea-D5bA0vwh.js";import{C as qt}from"./collection-tabs-CJs3t0kZ.js";import{S as _s}from"./switch-B4AE76uJ.js";import{L as Ds}from"./label-o5nMOYcO.js";import{I as qe}from"./integration-icon-DQZa3sYE.js";import{A as Bt}from"./avatar-7MpZ9q34.js";import{A as Ls,a as Rs,b as Fs}from"./alert-BNE2objS.js";import{C as Ht}from"./card-CuLmtjkK.js";import{K as Me}from"./monitoring-stats-row-DeM-N2J5.js";import{u as Jt}from"./studio-tools-O1wqkKr7.js";import{u as $s}from"./useSuspenseInfiniteQuery-CNDc5W3G.js";import{o as zs,m as Os,p as Es,q as As}from"./sidebar-CQ6X6EgL.js";import{T as Re,a as ut,b as Qt,c as Gt,d as Wt,e as ae}from"./table-D94_WLHm.js";import{n as Ps}from"./ChevronUp-D1yQd_10.js";import{u as Us}from"./use-infinite-scroll-C10ycd3E.js";import{c as Vs,b as Ks}from"./use-automations-CLvdnni4.js";import"./SearchMd-evNv9trP.js";import"./use-capability-DyEmup-l.js";import"./access-gate-DzI7fje7.js";import"./capability-load-error-BDl1R2Mq.js";import"./useInfiniteQuery-KvXcQTyz.js";import"./use-clock-tick-r41I52rR.js";import"./AlertCircle-B53JhFAu.js";import"./CheckCircle-BHN-wFbK.js";import"./Circle-BMe_lNRs.js";import"./checkbox-B1YF-uK0.js";import"./command-U4hp1Sg9.js";import"./index-D85wAsnN.js";import"./dialog-DkT4Ri5Y.js";import"./X-DNthiYnC.js";import"./Stars01-IimVOfNw.js";import"./ChevronRight-Dqs4UYfi.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Dtp5QKkh.js";import"./file-type-icon-CGnBXvlC.js";import"./ZoomOut-BmpdGZEc.js";import"./use-mobile-8PCzv3Mi.js";import"./tab-id-bb-jjgGv.js";import"./types-BGdz0DTZ.js";import"./chat-context-Bcthg0Rk.js";import"./autosend-hpJ3sd0t.js";import"./hooks-6n_u4oV8.js";import"./decopilot-sse-pool-Bp3qtF_q.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-DnQtGTlK.js";import"./use-decopilot-events-X4WShNfU.js";import"./use-organization-settings-DTNEfKpa.js";import"./Eye-Fa6zzcvh.js";import"./Star01-D1xnxtGT.js";import"./XClose-B9_O9ZwX.js";import"./ZapSquare-DM6ZWSzD.js";import"./Tool01-FgDVN5Aa.js";import"./Monitor01-CadwJLnk.js";import"./Upload01-DqR1L_zb.js";import"./shell-layout-CKAEuy11.js";import"./Users03-BubKtGEN.js";import"./SearchLg-MLCu3K6z.js";import"./Zap-DptPhcrr.js";import"./alert-dialog-Bb_E0Ib3.js";import"./required-auth-layout-BllY9X0X.js";import"./use-org-sso-Bi4sTov0.js";import"./LinkExternal01-3dZq5bY0.js";import"./ArrowUpRight-H0WTVT37.js";import"./Palette-BJcNGJoP.js";import"./use-navigate-to-agent-DFHenM1Y.js";import"./reusable-new-chat-CouMjkYR.js";import"./use-mcp-prompts-rcTAN3zC.js";import"./form-DaFgzcD-.js";import"./use-collections-B4CZte7v.js";import"./ArrowUp-BRSr5Hko.js";import"./Settings02-Ddh7L72a.js";import"./DotsVertical-DCj3Pe-o.js";import"./Globe04-BKaoGJE9.js";import"./HardDrive-CmlVCNCP.js";import"./LayoutLeft-CvxAKnEI.js";import"./List-DoWo7FQN.js";import"./Sun-icg_V74A.js";import"./Shield01-CoyB298o.js";import"./User01-2BQwgTbP.js";import"./Users01-CHhUYr_-.js";import"./index-BuoPGVgL.js";import"./use-org-auth-client-Dapr-HwO.js";import"./auth-X2zOoLs3.js";import"./index-CR0OxjC9.js";const Nt={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3};function Fe(s){return s.filter(e=>e.key.trim()).map(e=>{const r=encodeURIComponent(e.key.trim()),o=encodeURIComponent(e.value||"");return`${r}:${e.operator}:${o}`}).join(",")}function qs(s){return s?s.split(",").map(e=>{const[r,o,...a]=e.split(":");return{key:decodeURIComponent(r||""),operator:o||"eq",value:decodeURIComponent(a.join(":")||"")}}):[]}function Ye(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
2
2
  `)}function Rt(s){return s.trim()?s.split(`
3
3
  `).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[r,...o]=e.split("=");return{key:r||"",operator:"eq",value:o.join("=")}}if(e.includes("~")){const[r,...o]=e.split("~");return{key:r||"",operator:"contains",value:o.join("~")}}if(e.includes("@")){const[r,...o]=e.split("@");return{key:r||"",operator:"in",value:o.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function Bs(s){const e={},r={},o=[],a={};for(const l of s)if(l.key.trim())switch(l.operator){case"eq":l.value&&(e[l.key]=l.value);break;case"contains":l.value&&(r[l.key]=`%${l.value}%`);break;case"exists":o.push(l.key);break;case"in":l.value&&(a[l.key]=l.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(r).length>0?r:void 0,propertyKeys:o.length>0?o:void 0,propertyInValues:Object.keys(a).length>0?a:void 0}}function Ft(s){if(!s)return{content:"null",isTruncated:!1,originalSize:4};if(typeof s._decocms_truncated=="string")return{content:s._decocms_truncated,isTruncated:!0,originalSize:s._decocms_truncated.length};const e=JSON.stringify(s,null,2),r=e.length;return r<=Nt.maxJsonRenderSize?{content:e,isTruncated:!1,originalSize:r}:{content:e.slice(0,Nt.maxJsonRenderSize)+`
4
4
 
@@ -1,4 +1,4 @@
1
- import{r as a,aK as R}from"./index-2J9py-e1.js";function re(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function me(e){if(Array.isArray(e))return e}function be(e,t,r){return(t=Se(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ye(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,c,s=[],f=!0,p=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(f=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);f=!0);}catch(j){p=!0,o=j}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(p)throw o}}return s}}function we(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{r as a,aK as R}from"./index-DMCDP9dR.js";function re(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function me(e){if(Array.isArray(e))return e}function be(e,t,r){return(t=Se(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ye(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,c,s=[],f=!0,p=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(f=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);f=!0);}catch(j){p=!0,o=j}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(p)throw o}}return s}}function we(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function oe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ne(Object(r),!0).forEach(function(n){be(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ne(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Oe(e,t){if(e==null)return{};var r,n,o=je(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function je(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Me(e,t){return me(e)||ye(e,t)||Ee(e,t)||we()}function Pe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Se(e){var t=Pe(e,"string");return typeof t=="symbol"?t:t+""}function Ee(e,t){if(e){if(typeof e=="string")return re(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?re(e,t):void 0}}function Re(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ae(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ie(Object(r),!0).forEach(function(n){Re(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ie(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ie(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return t.reduceRight(function(o,i){return i(o)},n)}}function A(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var c=arguments.length,s=new Array(c),f=0;f<c;f++)s[f]=arguments[f];return t.apply(r,[].concat(o,s))}}}function F(e){return{}.toString.call(e).includes("Object")}function Te(e){return!Object.keys(e).length}function D(e){return typeof e=="function"}function Ce(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Le(e,t){return F(t)||P("changeType"),Object.keys(t).some(function(r){return!Ce(e,r)})&&P("changeField"),t}function Ae(e){D(e)||P("selectorType")}function $e(e){D(e)||F(e)||P("handlerType"),F(e)&&Object.values(e).some(function(t){return!D(t)})&&P("handlersType")}function De(e){e||P("initialIsRequired"),F(e)||P("initialType"),Te(e)&&P("initialContent")}function Ve(e,t){throw new Error(e[t]||e.default)}var xe={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},P=A(Ve)(xe),q={changes:Le,selector:Ae,handler:$e,initial:De};function Ne(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};q.initial(e),q.handler(t);var r={current:e},n=A(Fe)(r,t),o=A(ze)(r),i=A(q.changes)(e),c=A(qe)(r);function s(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(j){return j};return q.selector(p),p(r.current)}function f(p){Ie(n,o,i,c)(p)}return[s,f]}function qe(e,t){return D(t)?t(e.current):t}function ze(e,t){return e.current=ae(ae({},e.current),t),t}function Fe(e,t,r){return D(t)?t(e.current):Object.keys(r).forEach(function(n){var o;return(o=t[n])===null||o===void 0?void 0:o.call(t,e.current[n])}),r}var Ue={create:Ne},He={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function We(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var c=arguments.length,s=new Array(c),f=0;f<c;f++)s[f]=arguments[f];return t.apply(r,[].concat(o,s))}}}function Ke(e){return{}.toString.call(e).includes("Object")}function Be(e){return e||ue("configIsRequired"),Ke(e)||ue("configType"),e.urls?(Ge(),{paths:{vs:e.urls.monacoBase}}):e}function Ge(){console.warn(ce.deprecation)}function Ye(e,t){throw new Error(e[t]||e.default)}var ce={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
3
3
  You are using deprecated way of configuration.
4
4
 
@@ -1 +1 @@
1
- import{c as $,j as s,_ as Ye,r as R,l as D,R as de,$ as As,a0 as Is,a as re,a1 as oe,b as pe,a2 as zs,a3 as $s,t as ie,a4 as Ts,a5 as Ms,K as Os,m as Ps,a6 as Ds,i as Vt,e as ft,u as ht,U as Yt,H as Fs,I as Es,J as Ls,M as Rs,d as Bs,B as rt,a7 as Hs,W as Gs,X as Us,L as Ws,O as qs,a8 as Ks}from"./index-2J9py-e1.js";import{u as ge,S as xt,a as pt,b as me,c as te,d as X,e as Qt,f as Jt,g as Xs,h as Vs,i as ot,j as Ys,k as Qs,l as Js}from"./sidebar-DRcu2eQH.js";import{u as gt}from"./use-mobile-DcoKiKHf.js";import{S as le}from"./skeleton-Dgzqsrmm.js";import{i as Zt}from"./LayoutLeft-DlvxEfnj.js";import{T as je}from"./toolbar-icon-button-BdGG2k_3.js";import{P as Qe,a as Ee,b as Je}from"./popover-Di49hXoq.js";import{D as es,a as ts,b as ss}from"./drawer-DLnh7VDP.js";import{A as Ke}from"./avatar-BRw1vbr3.js";import{a as ue,b as fe,c as at,T as he}from"./tooltip-BRb7PA9v.js";import{a as Ct}from"./Copy01-_g0t0qlZ.js";import{n as Zs,i as en}from"./Globe01-XPkeFMHR.js";import{i as tn}from"./ZoomOut-DP0DgIxq.js";import{i as wt,a as sn}from"./ZapSquare-P6cQPzc4.js";import{i as ct}from"./Monitor01-CNRD_PE8.js";import{n as nn,a as ln}from"./Sun-BntcwdNi.js";import{a as bt}from"./Settings02-C8t-YS9f.js";import{i as rn}from"./Shield01-Dn1dWDdY.js";import{b as kt,c as At,d as on,e as an,f as cn,A as ve,g as It,i as dn,s as mn,h as un}from"./agent-icon-DgEjd-zg.js";import{a as fn}from"./Users03-C1C_-4H4.js";import{u as hn}from"./use-deployment-admin-DLjYzDku.js";import"./index-D104HfgJ.js";import{I as xn}from"./invite-member-dialog-BqLsPd-I.js";import{u as pn,A as gn,g as bn,a as jn,b as ns}from"./agent-capabilities-B1SWagyu.js";import{u as vn,v as yn,C as zt}from"./connect-desktop-dialog-DXKUejW8.js";import{i as Sn}from"./FilterLines-CgaBTy3e.js";import{T as Nn,a as _n}from"./toggle-group-Bu-PWxkG.js";import{u as Cn}from"./use-mcp-client-BFfDw7Na.js";import{S as wn,a as Xe,i as kn,b as An}from"./constants-B72Xmt_K.js";import{u as jt,a as is}from"./use-virtual-mcp-BDvqLUy9.js";import{u as In,a as vt,b as ls,T as zn}from"./hooks-DWYbP5m8.js";import{u as yt,r as $n}from"./shell-layout-D6B5jOh9.js";import{D as Tn,a as Mn,f as On,d as Pn,e as Dn}from"./dialog-DSwtrH3c.js";import{C as Fn,a as En,b as Ln,c as Rn,d as Bn}from"./command-C5AmTrdX.js";import{u as rs}from"./studio-tools-Dq9eyK0h.js";import{i as os}from"./Zap-Dy75gJ9Z.js";import{S as as,M as Hn}from"./shell-controls-BfBfRxJV.js";import{n as Gn}from"./Stars02-u80z6or-.js";import{g as Un,u as Wn,S as qn}from"./use-clock-tick-PutxutBx.js";import{a as Kn}from"./format-time-BnbuEtat.js";import{t as St}from"./ChevronDown-wNYjMtTF.js";import{i as Xn}from"./ChevronRight-C-TpN8He.js";import{S as cs,u as Vn,g as Yn,a as Qn,b as Jn}from"./use-navigate-to-agent-DLTVhJZe.js";import{S as Zn,C as ei}from"./chat-context-RywSrvyo.js";import{B as $t,a as ti,b as si}from"./breadcrumb-aBS6Ng2n.js";import{i as ds}from"./Check-BaUMJ78L.js";import{s as Le}from"./Plus-BMHnzEgp.js";import{i as ms}from"./SearchMd-DANDIa_n.js";import{s as ni}from"./XClose-GdiLhRNK.js";import{A as ii,a as li,b as ri,c as oi,d as ai,e as ci,f as di}from"./alert-dialog-B1rOkStA.js";import{F as mi,a as ui,b as fi,c as hi,d as xi,f as pi,e as gi}from"./form-CrI62Hn2.js";import{I as bi}from"./input-CPgIZjnq.js";import{G as ji,a as vi}from"./github-repo-picker-yq0WAGxV.js";import{f as yi}from"./reusable-new-chat-CouMjkYR.js";import{T as ee}from"./toolbar-LEdb9i7-.js";import{u as Si}from"./use-organization-settings-CjrnkZNU.js";import"./X-DuH9meaW.js";import"./User01-Darruqx_.js";import"./AlertCircle-ClNAIcG0.js";import"./Tool01-B8q9vFcz.js";import"./ArrowUp-DY8HR8F0.js";import"./XCircle-DDi-eHUx.js";import"./ArrowUpRight-DjTrxTn1.js";import"./Loading02-Q-5W4uzZ.js";import"./CheckCircle-BDnR8A1L.js";import"./ChevronUp-C6irMbKQ.js";import"./Circle-YG_2bf45.js";import"./DotsVertical-DTKbesDy.js";import"./Eye-B0b47qlC.js";import"./Star01-CFBLrKzQ.js";import"./Globe04-BrUOkeSn.js";import"./SwitchHorizontal01-C5lh09BG.js";import"./HardDrive-C0Mdm8TH.js";import"./Key01-X2Cp5G1j.js";import"./LinkExternal01-DbsJ_E6N.js";import"./List-Bk3antXp.js";import"./Palette-DjHatrbR.js";import"./Play-CeoTbFcX.js";import"./SearchLg-V_Q9UCyP.js";import"./Stars01-CdPO3Nl2.js";import"./Trash01-CfJ0a-B-.js";import"./Upload01-D_QZcVHs.js";import"./Users01-Bus8Z2ZL.js";import"./select-Cghqgv9M.js";import"./textarea-DyoYWnbd.js";import"./use-org-auth-client-NR_tIEBe.js";import"./use-organization-roles-Ds-tZdpJ.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-R8cixMJA.js";import"./use-registry-connections-BTmktc4i.js";import"./use-connection-CbSx9WL-.js";import"./use-collections-DEBusStk.js";import"./useInfiniteQuery-UssBOKk_.js";import"./use-infinite-scroll-DU6_2BYs.js";import"./extract-connection-data-B9XwWcLA.js";import"./card-Box4iJoV.js";import"./integration-icon-BRx3OrOO.js";import"./collection-search-DFOtRfqr.js";import"./collection-tabs-C8GiZNTZ.js";import"./badge-CVxnahFC.js";import"./connection-form-helpers-Dg4QpFTl.js";import"./authenticate-and-persist-oauth-DcLeuVqz.js";import"./mcp-oauth-CjPLnQJW.js";import"./auth-USBWp_2D.js";import"./useSuspenseInfiniteQuery-DzPLr418.js";import"./use-ai-providers-B-08Js8f.js";import"./decopilot-sse-pool-DbpDU6zp.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./required-auth-layout-D8-9nMC1.js";import"./autosend-CmW2aOxR.js";import"./tab-id-bb-jjgGv.js";import"./use-org-sso-BBuTBvZM.js";import"./index-C3vwz_dr.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-decopilot-events-C-bHC4m2.js";import"./label-ByJJI9o9.js";import"./use-debounced-value-stLkCGGE.js";import"./use-mcp-tools-Dci7vJWh.js";import"./github-installations-D2vHSx02.js";function Ni(t){const e=$.c(5),{onPointerDown:n,onDoubleClick:l}=t,{state:i,isMobile:r}=ge();if(r||i==="collapsed")return null;let o,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={left:"var(--sidebar-width)"},a=s.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"}),e[0]=o,e[1]=a):(o=e[0],a=e[1]);let m;return e[2]!==l||e[3]!==n?(m=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar",title:"Drag to resize, double-click to reset",onPointerDown:n,onDoubleClick:l,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:o,children:a}),e[2]=l,e[3]=n,e[4]=m):m=e[4],m}const Nt=240,_i=400,Ci="sidebar.width";function Re(t){return Math.max(Nt,Math.min(_i,t))}function wi(){const t=$.c(11),[e,n]=Ye(Ci,ki),l=R.useRef(null);let i;t[0]!==n||t[1]!==e?(i=d=>{d.preventDefault();const u=d.clientX,f=Re(e),h=l.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),x=h?Array.from(h.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const g of x)g.style.transition="none";const b=g=>{const j=Re(f+(g.clientX-u));h?.style.setProperty("--sidebar-width",`${j}px`)},p=g=>{const j=Re(f+(g.clientX-u));n(j);for(const y of x)y.style.transition="";window.removeEventListener("pointermove",b),window.removeEventListener("pointerup",p),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",b),window.addEventListener("pointerup",p)},t[0]=n,t[1]=e,t[2]=i):i=t[2];const r=i;let o;t[3]!==n?(o=()=>{n(Nt)},t[3]=n,t[4]=o):o=t[4];const a=o;let m;t[5]!==e?(m=Re(e),t[5]=e,t[6]=m):m=t[6];let c;return t[7]!==r||t[8]!==a||t[9]!==m?(c={width:m,wrapperRef:l,onStartResize:r,resetWidth:a},t[7]=r,t[8]=a,t[9]=m,t[10]=c):c=t[10],c}function ki(t){return typeof t=="number"?Re(t):Nt}function us(){return[]}function fs(t){const e=$.c(3),{children:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex h-6 items-center",children:s.jsx("div",{className:"h-0.5 w-16 rounded-full bg-sidebar-foreground/15"})}),e[0]=l):l=e[0];let i;return e[1]!==n?(i=s.jsxs(xt,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[l,s.jsx(pt,{children:s.jsx(me,{className:"gap-0.5",children:n})})]}),e[1]=n,e[2]=i):i=e[2],i}function hs(t){const e=$.c(18),{item:n}=t,{isMobile:l,setOpenMobile:i}=ge();let r;e[0]!==l||e[1]!==n||e[2]!==i?(r=()=>{de("nav_item_clicked",{nav_key:n.key,nav_label:n.label,is_active:!!n.isActive,is_mobile:l}),n.onClick?.(),l&&i(!1)},e[0]=l,e[1]=n,e[2]=i,e[3]=r):r=e[3];const o=r,a=n.key,m=n.isActive&&"z-10";let c;e[4]!==m?(c=D(m),e[4]=m,e[5]=c):c=e[5];let d;e[6]!==n.label?(d=s.jsx("span",{children:n.label}),e[6]=n.label,e[7]=d):d=e[7];let u;e[8]!==o||e[9]!==n.icon||e[10]!==n.isActive||e[11]!==n.label||e[12]!==d?(u=s.jsxs(te,{onClick:o,isActive:n.isActive,tooltip:n.label,children:[n.icon,d]}),e[8]=o,e[9]=n.icon,e[10]=n.isActive,e[11]=n.label,e[12]=d,e[13]=u):u=e[13];let f;return e[14]!==n.key||e[15]!==c||e[16]!==u?(f=s.jsx(X,{className:c,children:u},a),e[14]=n.key,e[15]=c,e[16]=u,e[17]=f):f=e[17],f}function Ai(t){const e=$.c(12),{section:n}=t;switch(n.type){case"divider":{let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Qt,{className:"my-2"}),e[0]=l):l=e[0],l}case"spacer":{let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1"}),e[1]=l):l=e[1],l}case"group":{const l=n.group.label,i=n.group.defaultExpanded;let r;e[2]!==n.group.items?(r=n.group.items.map(zi),e[2]=n.group.items,e[3]=r):r=e[3];let o;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==r?(o=s.jsx(fs,{label:l,defaultExpanded:i,children:r}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=r,e[7]=o):o=e[7],o}case"items":{let l;e[8]!==n.items?(l=n.items.map(Ii),e[8]=n.items,e[9]=l):l=e[9];let i;return e[10]!==l?(i=s.jsx(xt,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(pt,{children:s.jsx(me,{className:"gap-1.5",children:l})})}),e[10]=l,e[11]=i):i=e[11],i}case"custom":return n.content}}function Ii(t){return s.jsx(hs,{item:t},t.key)}function zi(t){return s.jsx(hs,{item:t},t.key)}function $i(t){const e=$.c(14),{sections:n,footer:l,additionalContent:i,variant:r,contentClassName:o}=t,a=r===void 0?"sidebar":r;let m;e[0]!==o?(m=D("flex flex-col flex-1 px-2 pb-2 gap-0.5",o),e[0]=o,e[1]=m):m=e[1];let c;e[2]!==n?(c=n.map(Ti),e[2]=n,e[3]=c):c=e[3];let d;e[4]!==i?(d=i&&s.jsx("div",{className:"flex flex-col flex-1 min-h-0 group-data-[state=collapsed]/sidebar:mt-1 group-data-[state=expanded]/sidebar:mt-2",children:i}),e[4]=i,e[5]=d):d=e[5];let u;e[6]!==m||e[7]!==c||e[8]!==d?(u=s.jsxs(Jt,{className:m,children:[c,d]}),e[6]=m,e[7]=c,e[8]=d,e[9]=u):u=e[9];let f;return e[10]!==l||e[11]!==u||e[12]!==a?(f=s.jsxs(Xs,{variant:a,children:[u,l]}),e[10]=l,e[11]=u,e[12]=a,e[13]=f):f=e[13],f}function Ti(t,e){return s.jsx(Ai,{section:t},e)}function xs(t){const e=$.c(2);let n;return e[0]!==t?(n=s.jsx($i,{...t}),e[0]=t,e[1]=n):n=e[1],n}xs.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,n)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(le,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};function Mi(t){const e=$.c(16),{onToggle:n,className:l}=t,r=As().logo??Is,o=typeof r=="string"?r:r.light,a=typeof r=="string"?r:r.dark;let m;e[0]!==l?(m=D("flex flex-row items-center gap-2 md:gap-0.5 shrink-0 h-12 pl-1 pr-2 pt-0.25 pb-0","group-data-[collapsible=icon]/sidebar:hidden",l),e[0]=l,e[1]=m):m=e[1];let c;e[2]!==o?(c=s.jsx("img",{src:o,alt:"Logo",className:"size-6 object-contain dark:hidden"}),e[2]=o,e[3]=c):c=e[3];let d;e[4]!==a?(d=s.jsx("img",{src:a,alt:"Logo",className:"size-6 object-contain hidden dark:block"}),e[4]=a,e[5]=d):d=e[5];let u;e[6]!==c||e[7]!==d?(u=s.jsx("span",{className:"flex items-center shrink-0 pl-1",children:s.jsxs("span",{className:"flex items-center shrink-0 px-2",children:[c,d]})}),e[6]=c,e[7]=d,e[8]=u):u=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Zt,{size:16}),e[9]=f):f=e[9];let h;e[10]!==n?(h=s.jsx(je,{onClick:n,"aria-label":"Toggle sidebar",children:f}),e[10]=n,e[11]=h):h=e[11];let x;return e[12]!==m||e[13]!==u||e[14]!==h?(x=s.jsxs(Vs,{className:m,children:[u,h]}),e[12]=m,e[13]=u,e[14]=h,e[15]=x):x=e[15],x}function Tt(t){const e=$.c(18),{item:n,onClose:l}=t,i=n.isActive&&"z-10";let r;e[0]!==i?(r=D(i),e[0]=i,e[1]=r):r=e[1];let o;e[2]!==n||e[3]!==l?(o=()=>{n.onClick?.(),l()},e[2]=n,e[3]=l,e[4]=o):o=e[4];let a;e[5]!==n.icon?(a=s.jsx("span",{className:"[&>svg]:size-5 shrink-0",children:n.icon}),e[5]=n.icon,e[6]=a):a=e[6];let m;e[7]!==n.label?(m=s.jsx("span",{children:n.label}),e[7]=n.label,e[8]=m):m=e[8];let c;e[9]!==n.isActive||e[10]!==n.label||e[11]!==o||e[12]!==a||e[13]!==m?(c=s.jsxs(te,{onClick:o,isActive:n.isActive,tooltip:n.label,className:"h-10! text-sm!",children:[a,m]}),e[9]=n.isActive,e[10]=n.label,e[11]=o,e[12]=a,e[13]=m,e[14]=c):c=e[14];let d;return e[15]!==r||e[16]!==c?(d=s.jsx(X,{className:r,children:c}),e[15]=r,e[16]=c,e[17]=d):d=e[17],d}function Oi(t){const e=$.c(18),{section:n,onClose:l}=t;switch(n.type){case"divider":{let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Qt,{className:"my-2"}),e[0]=i):i=e[0],i}case"spacer":{let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex-1"}),e[1]=i):i=e[1],i}case"group":{const i=n.group.label,r=n.group.defaultExpanded;let o;if(e[2]!==l||e[3]!==n.group.items){let m;e[5]!==l?(m=c=>s.jsx(Tt,{item:c,onClose:l},c.key),e[5]=l,e[6]=m):m=e[6],o=n.group.items.map(m),e[2]=l,e[3]=n.group.items,e[4]=o}else o=e[4];let a;return e[7]!==n.group.defaultExpanded||e[8]!==n.group.label||e[9]!==o?(a=s.jsx(fs,{label:i,defaultExpanded:r,children:o}),e[7]=n.group.defaultExpanded,e[8]=n.group.label,e[9]=o,e[10]=a):a=e[10],a}case"items":{let i;if(e[11]!==l||e[12]!==n.items){let o;e[14]!==l?(o=a=>s.jsx(Tt,{item:a,onClose:l},a.key),e[14]=l,e[15]=o):o=e[15],i=n.items.map(o),e[11]=l,e[12]=n.items,e[13]=i}else i=e[13];let r;return e[16]!==i?(r=s.jsx(xt,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(pt,{children:s.jsx(me,{className:"gap-1.5",children:i})})}),e[16]=i,e[17]=r):r=e[17],r}case"custom":return n.content}}function Pi(t){const e=$.c(17),{sections:n,onClose:l,footer:i,additionalContent:r}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"h-12 shrink-0"}),e[0]=o):o=e[0];let a;e[1]!==l?(a=s.jsx(R.Suspense,{fallback:o,children:s.jsx(Mi,{onToggle:l})}),e[1]=l,e[2]=a):a=e[2];let m;if(e[3]!==l||e[4]!==n){let f;e[6]!==l?(f=(h,x)=>s.jsx(Oi,{section:h,onClose:l},x),e[6]=l,e[7]=f):f=e[7],m=n.map(f),e[3]=l,e[4]=n,e[5]=m}else m=e[5];let c;e[8]!==r?(c=r&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:r}),e[8]=r,e[9]=c):c=e[9];let d;e[10]!==m||e[11]!==c?(d=s.jsxs(Jt,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[m,c]}),e[10]=m,e[11]=c,e[12]=d):d=e[12];let u;return e[13]!==i||e[14]!==a||e[15]!==d?(u=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[a,d,i]}),e[13]=i,e[14]=a,e[15]=d,e[16]=u):u=e[16],u}function Fe(t){const e=$.c(26),{item:n,onClose:l}=t;let i;e[0]!==n.className?(i=D("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",n.className),e[0]=n.className,e[1]=i):i=e[1];const r=i;if(n.href){const d=n.external?"_blank":void 0,u=n.external?"noopener noreferrer":void 0;let f;e[2]!==n.icon?(f=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[2]=n.icon,e[3]=f):f=e[3];let h;e[4]!==n.label?(h=s.jsx("span",{className:"flex-1",children:n.label}),e[4]=n.label,e[5]=h):h=e[5];let x;return e[6]!==r||e[7]!==n.href||e[8]!==l||e[9]!==d||e[10]!==u||e[11]!==f||e[12]!==h?(x=s.jsxs("a",{href:n.href,target:d,rel:u,className:r,onClick:l,children:[f,h]}),e[6]=r,e[7]=n.href,e[8]=l,e[9]=d,e[10]=u,e[11]=f,e[12]=h,e[13]=x):x=e[13],x}let o;e[14]!==n||e[15]!==l?(o=()=>{n.onClick?.(),l()},e[14]=n,e[15]=l,e[16]=o):o=e[16];let a;e[17]!==n.icon?(a=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[17]=n.icon,e[18]=a):a=e[18];let m;e[19]!==n.label?(m=s.jsx("span",{className:"flex-1",children:n.label}),e[19]=n.label,e[20]=m):m=e[20];let c;return e[21]!==r||e[22]!==o||e[23]!==a||e[24]!==m?(c=s.jsxs("button",{type:"button",onClick:o,className:r,children:[a,m]}),e[21]=r,e[22]=o,e[23]=a,e[24]=m,e[25]=c):c=e[25],c}function Mt(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("span",{className:"shrink-0 inline-flex items-center rounded-full bg-amber-100 dark:bg-amber-500/20 px-2 py-0.5 text-[10px] font-medium text-amber-700 dark:text-amber-400",children:"Impersonating"}),t[0]=e):e=t[0],e}function Ot(t){const e=$.c(144),{user:n,userImage:l,menuItems:i,signOutItem:r,stopImpersonatingItem:o,isImpersonating:a,themeOptions:m,preferences:c,setPreferences:d,close:u,isMobile:f}=t;if(f){const V=n?.name??"U";let J;e[0]!==V||e[1]!==l?(J=s.jsx(Ke,{url:l,fallback:V,shape:"circle",size:"sm",className:"shrink-0"}),e[0]=V,e[1]=l,e[2]=J):J=e[2];const xe=n?.name??"User";let Z;e[3]!==xe?(Z=s.jsx("p",{className:"text-sm font-medium truncate",children:xe}),e[3]=xe,e[4]=Z):Z=e[4];let ne;e[5]!==a?(ne=a&&s.jsx(Mt,{}),e[5]=a,e[6]=ne):ne=e[6];let se;e[7]!==Z||e[8]!==ne?(se=s.jsxs("div",{className:"flex items-center gap-2",children:[Z,ne]}),e[7]=Z,e[8]=ne,e[9]=se):se=e[9];const T=n?.email;let G;e[10]!==T?(G=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:T}),e[10]=T,e[11]=G):G=e[11];let Y;e[12]!==se||e[13]!==G?(Y=s.jsxs("div",{className:"flex-1 min-w-0",children:[se,G]}),e[12]=se,e[13]=G,e[14]=Y):Y=e[14];let K;e[15]!==n?(K=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(Li)},e[15]=n,e[16]=K):K=e[16];let be;e[17]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(Ct,{size:14}),e[17]=be):be=e[17];let Se;e[18]!==K?(Se=s.jsx(ue,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:K,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:be})}),e[18]=K,e[19]=Se):Se=e[19];let Be;e[20]===Symbol.for("react.memo_cache_sentinel")?(Be=s.jsx(fe,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[20]=Be):Be=e[20];let Ne;e[21]!==Se?(Ne=s.jsx(at,{delayDuration:300,children:s.jsxs(he,{children:[Se,Be]})}),e[21]=Se,e[22]=Ne):Ne=e[22];let _e;e[23]!==Ne||e[24]!==J||e[25]!==Y?(_e=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-4 border-b border-border",children:[J,Y,Ne]}),e[23]=Ne,e[24]=J,e[25]=Y,e[26]=_e):_e=e[26];let Ce;if(e[27]!==u||e[28]!==i){let ce;e[30]!==u?(ce=Ue=>s.jsx(Fe,{item:Ue,onClose:u},Ue.key),e[30]=u,e[31]=ce):ce=e[31],Ce=i.map(ce),e[27]=u,e[28]=i,e[29]=Ce}else Ce=e[29];let we;e[32]!==u||e[33]!==o?(we=o&&s.jsx(Fe,{item:o,onClose:u}),e[32]=u,e[33]=o,e[34]=we):we=e[34];let ke;e[35]!==u||e[36]!==r?(ke=s.jsx(Fe,{item:r,onClose:u}),e[35]=u,e[36]=r,e[37]=ke):ke=e[37];let Ae;e[38]!==Ce||e[39]!==we||e[40]!==ke?(Ae=s.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:s.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[Ce,we,ke]})}),e[38]=Ce,e[39]=we,e[40]=ke,e[41]=Ae):Ae=e[41];let Ie;if(e[42]!==c.theme||e[43]!==d||e[44]!==m){let ce;e[46]!==c.theme||e[47]!==d?(ce=Ue=>{const{value:st,icon:Cs,label:ws}=Ue;return s.jsx("button",{type:"button","aria-label":ws,onClick:()=>d(ks=>({...ks,theme:st})),className:D("size-8 rounded-md flex items-center justify-center transition-colors",c.theme===st?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:Cs},st)},e[46]=c.theme,e[47]=d,e[48]=ce):ce=e[48],Ie=m.map(ce),e[42]=c.theme,e[43]=d,e[44]=m,e[45]=Ie}else Ie=e[45];let ze;e[49]!==Ie?(ze=s.jsx("div",{className:"flex items-center gap-0.5",children:Ie}),e[49]=Ie,e[50]=ze):ze=e[50];const et=c.enableSounds?"Disable sounds":"Enable sounds";let $e;e[51]!==d?($e=()=>d(Ei),e[51]=d,e[52]=$e):$e=e[52];const tt=c.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let Te;e[53]!==tt?(Te=D("size-8 rounded-md flex items-center justify-center transition-colors",tt),e[53]=tt,e[54]=Te):Te=e[54];let Me;e[55]!==c.enableSounds?(Me=c.enableSounds?s.jsx(kt,{size:14}):s.jsx(At,{size:14}),e[55]=c.enableSounds,e[56]=Me):Me=e[56];let Oe;e[57]!==et||e[58]!==$e||e[59]!==Te||e[60]!==Me?(Oe=s.jsx("button",{type:"button","aria-label":et,onClick:$e,className:Te,children:Me}),e[57]=et,e[58]=$e,e[59]=Te,e[60]=Me,e[61]=Oe):Oe=e[61];let He;e[62]===Symbol.for("react.memo_cache_sentinel")?(He=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.52.2"]}),e[62]=He):He=e[62];let Pe;e[63]!==Oe?(Pe=s.jsxs("div",{className:"flex items-center gap-2",children:[Oe,He]}),e[63]=Oe,e[64]=Pe):Pe=e[64];let De;e[65]!==ze||e[66]!==Pe?(De=s.jsxs("div",{className:"flex items-center justify-between px-3 py-3 border-t border-border/50",children:[ze,Pe]}),e[65]=ze,e[66]=Pe,e[67]=De):De=e[67];let Ge;return e[68]!==_e||e[69]!==Ae||e[70]!==De?(Ge=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[_e,Ae,De]}),e[68]=_e,e[69]=Ae,e[70]=De,e[71]=Ge):Ge=e[71],Ge}const h=n?.name??"U";let x;e[72]!==h||e[73]!==l?(x=s.jsx(Ke,{url:l,fallback:h,shape:"circle",size:"sm",className:"shrink-0"}),e[72]=h,e[73]=l,e[74]=x):x=e[74];const b=n?.name??"User";let p;e[75]!==b?(p=s.jsx("p",{className:"text-sm font-medium truncate",children:b}),e[75]=b,e[76]=p):p=e[76];let g;e[77]!==a?(g=a&&s.jsx(Mt,{}),e[77]=a,e[78]=g):g=e[78];let j;e[79]!==p||e[80]!==g?(j=s.jsxs("div",{className:"flex items-center gap-2",children:[p,g]}),e[79]=p,e[80]=g,e[81]=j):j=e[81];const y=n?.email;let v;e[82]!==y?(v=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:y}),e[82]=y,e[83]=v):v=e[83];let w;e[84]!==j||e[85]!==v?(w=s.jsxs("div",{className:"flex-1 min-w-0",children:[j,v]}),e[84]=j,e[85]=v,e[86]=w):w=e[86];let C;e[87]!==n?(C=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(Fi)},e[87]=n,e[88]=C):C=e[88];let N;e[89]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Ct,{size:14}),e[89]=N):N=e[89];let S;e[90]!==C?(S=s.jsx(ue,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:C,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:N})}),e[90]=C,e[91]=S):S=e[91];let A;e[92]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(fe,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[92]=A):A=e[92];let k;e[93]!==S?(k=s.jsx(at,{delayDuration:300,children:s.jsxs(he,{children:[S,A]})}),e[93]=S,e[94]=k):k=e[94];let z;e[95]!==k||e[96]!==x||e[97]!==w?(z=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 mx-1 mt-1",children:[x,w,k]}),e[95]=k,e[96]=x,e[97]=w,e[98]=z):z=e[98];let _;if(e[99]!==u||e[100]!==i){let V;e[102]!==u?(V=J=>s.jsx(Fe,{item:J,onClose:u},J.key),e[102]=u,e[103]=V):V=e[103],_=i.map(V),e[99]=u,e[100]=i,e[101]=_}else _=e[101];let I;e[104]!==u||e[105]!==o?(I=o&&s.jsx(Fe,{item:o,onClose:u}),e[104]=u,e[105]=o,e[106]=I):I=e[106];let O;e[107]!==u||e[108]!==r?(O=s.jsx(Fe,{item:r,onClose:u}),e[107]=u,e[108]=r,e[109]=O):O=e[109];let F;e[110]!==_||e[111]!==I||e[112]!==O?(F=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[_,I,O]}),e[110]=_,e[111]=I,e[112]=O,e[113]=F):F=e[113];let E;if(e[114]!==c.theme||e[115]!==d||e[116]!==m){let V;e[118]!==c.theme||e[119]!==d?(V=J=>{const{value:xe,icon:Z,label:ne}=J;return s.jsx("button",{type:"button","aria-label":ne,onClick:()=>d(se=>({...se,theme:xe})),className:D("size-7 rounded-md flex items-center justify-center transition-colors",c.theme===xe?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:Z},xe)},e[118]=c.theme,e[119]=d,e[120]=V):V=e[120],E=m.map(V),e[114]=c.theme,e[115]=d,e[116]=m,e[117]=E}else E=e[117];let P;e[121]!==E?(P=s.jsx("div",{className:"flex items-center gap-0.5",children:E}),e[121]=E,e[122]=P):P=e[122];const L=c.enableSounds?"Disable sounds":"Enable sounds";let M;e[123]!==d?(M=()=>d(Di),e[123]=d,e[124]=M):M=e[124];const H=c.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let q;e[125]!==H?(q=D("size-7 rounded-md flex items-center justify-center transition-colors",H),e[125]=H,e[126]=q):q=e[126];let U;e[127]!==c.enableSounds?(U=c.enableSounds?s.jsx(kt,{size:14}):s.jsx(At,{size:14}),e[127]=c.enableSounds,e[128]=U):U=e[128];let W;e[129]!==L||e[130]!==M||e[131]!==q||e[132]!==U?(W=s.jsx("button",{type:"button","aria-label":L,onClick:M,className:q,children:U}),e[129]=L,e[130]=M,e[131]=q,e[132]=U,e[133]=W):W=e[133];let Q;e[134]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.52.2"]}),e[134]=Q):Q=e[134];let B;e[135]!==W?(B=s.jsxs("div",{className:"flex items-center gap-2",children:[W,Q]}),e[135]=W,e[136]=B):B=e[136];let ae;e[137]!==P||e[138]!==B?(ae=s.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-t border-border/50",children:[P,B]}),e[137]=P,e[138]=B,e[139]=ae):ae=e[139];let ye;return e[140]!==z||e[141]!==F||e[142]!==ae?(ye=s.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:s.jsxs("div",{className:"flex flex-col",children:[z,F,ae]})}),e[140]=z,e[141]=F,e[142]=ae,e[143]=ye):ye=e[143],ye}function Di(t){return{...t,enableSounds:!t.enableSounds}}function Fi(){ie.success("User ID copied")}function Ei(t){return{...t,enableSounds:!t.enableSounds}}function Li(){ie.success("User ID copied")}function dt(){const t=$.c(43),{data:e}=re.useSession(),{org:n}=oe(),l=pe();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org",shouldThrow:!1},t[0]=i):i=t[0];const o=zs(i)?.params.org,[a,m]=$s(),c=gt(),{isAdmin:d}=hn(),[u,f]=R.useState(!1),h=e?.user,x=h?.image,b=!!e?.session?.impersonatedBy;let p;t[1]===Symbol.for("react.memo_cache_sentinel")?(p=()=>f(!1),t[1]=p):p=t[1];const g=p;let j;t[2]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(bt,{size:16}),t[2]=j):j=t[2];let y;t[3]!==l||t[4]!==o?(y={key:"preferences",label:"Preferences",icon:j,onClick:()=>{l({to:"/$org/settings/profile",params:{org:o??""}})}},t[3]=l,t[4]=o,t[5]=y):y=t[5];let v;t[6]!==n||t[7]!==l?(v=n?[{key:"install-app",label:"Add to Home Screen",icon:s.jsx(Zs,{size:16}),onClick:()=>{l({to:"/$org/install",params:{org:n.slug}})}}]:[],t[6]=n,t[7]=l,t[8]=v):v=t[8];let w;t[9]===Symbol.for("react.memo_cache_sentinel")?(w={key:"terms",label:"Terms of Use",icon:s.jsx(tn,{size:16}),href:"https://www.decocms.com/terms-of-use",external:!0},t[9]=w):w=t[9];let C;t[10]===Symbol.for("react.memo_cache_sentinel")?(C={key:"privacy",label:"Privacy Policy",icon:s.jsx(rn,{size:16}),href:"https://www.decocms.com/privacy-policy",external:!0},t[10]=C):C=t[10];let N;t[11]===Symbol.for("react.memo_cache_sentinel")?(N={key:"github",label:"decocms/studio",icon:s.jsx(Ts,{className:"w-4 h-4"}),href:"https://github.com/decocms/studio",external:!0},t[11]=N):N=t[11];let S;t[12]===Symbol.for("react.memo_cache_sentinel")?(S={key:"community",label:"Community",icon:s.jsx(fn,{size:16}),href:"https://decocms.com/discord",external:!0},t[12]=S):S=t[12];let A;t[13]===Symbol.for("react.memo_cache_sentinel")?(A={key:"homepage",label:"Homepage",icon:s.jsx(en,{size:16}),href:"https://decocms.com",external:!0},t[13]=A):A=t[13];let k;t[14]!==d||t[15]!==l?(k=d?[{key:"admin-dashboard",label:"Admin Dashboard",icon:s.jsx(on,{size:16}),onClick:()=>l({to:"/_admin"}),className:"text-amber-700 dark:text-amber-400"}]:[],t[14]=d,t[15]=l,t[16]=k):k=t[16];let z;t[17]!==k||t[18]!==y||t[19]!==v?(z=[y,...v,w,C,N,S,A,...k],t[17]=k,t[18]=y,t[19]=v,t[20]=z):z=t[20];const _=z;let I;t[21]===Symbol.for("react.memo_cache_sentinel")?(I={key:"logout",label:"Sign out",icon:s.jsx(wt,{size:16}),onClick:Hi},t[21]=I):I=t[21];const O=I;let F;t[22]!==b?(F=b?{key:"stop-impersonating",label:"Stop impersonation",icon:s.jsx(wt,{size:16}),onClick:Bi,className:"text-amber-700 dark:text-amber-400"}:null,t[22]=b,t[23]=F):F=t[23];const E=F;let P;t[24]===Symbol.for("react.memo_cache_sentinel")?(P={value:"light",icon:s.jsx(nn,{size:14}),label:"Light theme"},t[24]=P):P=t[24];let L;t[25]===Symbol.for("react.memo_cache_sentinel")?(L={value:"dark",icon:s.jsx(ln,{size:14}),label:"Dark theme"},t[25]=L):L=t[25];let M;t[26]===Symbol.for("react.memo_cache_sentinel")?(M=[P,L,{value:"system",icon:s.jsx(ct,{size:14}),label:"System theme"}],t[26]=M):M=t[26];const H=M;let q;t[27]!==b||t[28]!==c||t[29]!==_||t[30]!==a||t[31]!==m||t[32]!==E||t[33]!==h||t[34]!==x?(q={user:h,userImage:x,menuItems:_,signOutItem:O,stopImpersonatingItem:E,isImpersonating:b,themeOptions:H,preferences:a,setPreferences:m,close:g,isMobile:c},t[27]=b,t[28]=c,t[29]=_,t[30]=a,t[31]=m,t[32]=E,t[33]=h,t[34]=x,t[35]=q):q=t[35];const U=q;let W;return t[36]!==b||t[37]!==c||t[38]!==u||t[39]!==U||t[40]!==h?.name||t[41]!==x?(W=s.jsx(s.Fragment,{children:c?s.jsxs(es,{open:u,onOpenChange:f,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>f(!0),className:D("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",b&&"border-2 border-dashed border-amber-500"),children:[s.jsx(Ke,{url:x,fallback:h?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:h?.name??"Account"})]}),s.jsxs(ts,{className:"h-[80dvh] p-0",children:[s.jsx(ss,{className:"sr-only",children:"Account"}),s.jsx(Ot,{...U})]})]}):s.jsxs(Qe,{open:u,onOpenChange:f,children:[s.jsx(Ee,{asChild:!0,children:s.jsxs(te,{tooltip:h?.name??"Account",className:D("rounded-md",b&&"border-2 border-dashed border-amber-500"),children:[s.jsx(Ke,{url:x,fallback:h?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:h?.name??"Account"})]})}),s.jsx(Je,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:Ri,children:s.jsx(Ot,{...U})})]})}),t[36]=b,t[37]=c,t[38]=u,t[39]=U,t[40]=h?.name,t[41]=x,t[42]=W):W=t[42],W}function Ri(t){return t.preventDefault()}async function Bi(){const{error:t}=await re.admin.stopImpersonating();if(t){ie.error(t.message||"Failed to stop impersonation");return}window.location.href="/"}function Hi(){de("signed_out",{source:"account_popover"}),Ms(),re.signOut()}function mt(t){const e=$.c(43),{variant:n}=t===void 0?{}:t,l=n===void 0?"icon":n,i=vn(),[r,o]=R.useState(!1);let a,m;if(e[0]!==i.capabilities||e[1]!==i.hostname||e[2]!==i.machineId||e[3]!==i.online){const y=yn(i.capabilities);a=i.online?"Desktop linked":"Connect desktop",m=i.online?s.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",children:[s.jsx("span",{className:"font-medium",children:i.hostname??i.machineId??"Desktop linked"}),s.jsx("span",{className:"text-muted-foreground",children:y.length>0?`Available: ${y.join(", ")}`:"No CLI agents detected"})]}):s.jsx("span",{className:"text-xs",children:"Desktop disconnected"}),e[0]=i.capabilities,e[1]=i.hostname,e[2]=i.machineId,e[3]=i.online,e[4]=a,e[5]=m}else a=e[4],m=e[5];const c=m;if(l==="full"){let y,v;e[6]===Symbol.for("react.memo_cache_sentinel")?(y=()=>o(!0),v=s.jsx(ct,{}),e[6]=y,e[7]=v):(y=e[6],v=e[7]);let w;e[8]!==a?(w=s.jsx("span",{children:a}),e[8]=a,e[9]=w):w=e[9];let C;e[10]!==i.online?(C=i.online&&s.jsx("span",{className:"ml-auto size-2 rounded-full bg-success animate-pulse"}),e[10]=i.online,e[11]=C):C=e[11];let N;e[12]!==a||e[13]!==w||e[14]!==C?(N=s.jsx(ue,{asChild:!0,children:s.jsxs(te,{tooltip:a,onClick:y,children:[v,w,C]})}),e[12]=a,e[13]=w,e[14]=C,e[15]=N):N=e[15];let S;e[16]!==c?(S=s.jsx(fe,{side:"right",children:c}),e[16]=c,e[17]=S):S=e[17];let A;e[18]!==N||e[19]!==S?(A=s.jsxs(he,{children:[N,S]}),e[18]=N,e[19]=S,e[20]=A):A=e[20];let k;e[21]!==r?(k=s.jsx(zt,{open:r,onOpenChange:o}),e[21]=r,e[22]=k):k=e[22];let z;return e[23]!==k||e[24]!==A?(z=s.jsxs(s.Fragment,{children:[A,k]}),e[23]=k,e[24]=A,e[25]=z):z=e[25],z}let d;e[26]===Symbol.for("react.memo_cache_sentinel")?(d=()=>o(!0),e[26]=d):d=e[26];const u=i.online?"Desktop linked":"Connect your desktop";let f;e[27]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(ct,{size:16}),e[27]=f):f=e[27];let h;e[28]!==i.online?(h=i.online&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-success ring-2 ring-background animate-pulse"}),e[28]=i.online,e[29]=h):h=e[29];let x;e[30]!==u||e[31]!==h?(x=s.jsx(ue,{asChild:!0,children:s.jsxs(je,{onClick:d,"aria-label":u,children:[f,h]})}),e[30]=u,e[31]=h,e[32]=x):x=e[32];let b;e[33]!==c?(b=s.jsx(fe,{side:"bottom",children:c}),e[33]=c,e[34]=b):b=e[34];let p;e[35]!==x||e[36]!==b?(p=s.jsxs(he,{children:[x,b]}),e[35]=x,e[36]=b,e[37]=p):p=e[37];let g;e[38]!==r?(g=s.jsx(zt,{open:r,onOpenChange:o}),e[38]=r,e[39]=g):g=e[39];let j;return e[40]!==g||e[41]!==p?(j=s.jsxs(s.Fragment,{children:[p,g]}),e[40]=g,e[41]=p,e[42]=j):j=e[42],j}class Gi extends R.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,n){}render(){return this.state.hasError?null:this.props.children}}function Ui(t){return t<=1?"text-destructive":t<=5?"text-amber-500 dark:text-amber-400":"text-foreground/70"}function Wi(){const t=$.c(17),e=pe(),{org:n}=oe(),{hasDecoKey:l,balanceDollars:i}=pn();if(!l)return null;let r;t[0]!==i?(r=i!=null?`Credits: $${i.toFixed(2)}`:"Credits",t[0]=i,t[1]=r):r=t[1];let o;t[2]!==i?(o=D(i!=null&&Ui(i)),t[2]=i,t[3]=o):o=t[3];let a;t[4]!==e||t[5]!==n.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:n.slug}}),t[4]=e,t[5]=n.slug,t[6]=a):a=t[6];let m;t[7]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(an,{}),t[7]=m):m=t[7];let c;t[8]!==i?(c=i!=null?`$${i.toFixed(2)}`:"Credits",t[8]=i,t[9]=c):c=t[9];let d;t[10]!==c?(d=s.jsx("span",{children:c}),t[10]=c,t[11]=d):d=t[11];let u;return t[12]!==r||t[13]!==o||t[14]!==a||t[15]!==d?(u=s.jsx(me,{children:s.jsx(X,{children:s.jsxs(te,{tooltip:r,className:o,onClick:a,children:[m,d]})})}),t[12]=r,t[13]=o,t[14]=a,t[15]=d,t[16]=u):u=t[16],u}function Pt(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Gi,{children:s.jsx(R.Suspense,{fallback:null,children:s.jsx(Wi,{})})}),t[0]=e):e=t[0],e}function Dt(){const t=$.c(7),e=pe(),{org:n}=oe();let l;t[0]!==e||t[1]!==n.slug?(l=()=>e({to:"/$org/settings",params:{org:n.slug}}),t[0]=e,t[1]=n.slug,t[2]=l):l=t[2];let i,r;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(bt,{}),r=s.jsx("span",{children:"Settings"}),t[3]=i,t[4]=r):(i=t[3],r=t[4]);let o;return t[5]!==l?(o=s.jsxs(te,{tooltip:"Settings",onClick:l,children:[i,r]}),t[5]=l,t[6]=o):o=t[6],o}function Ft(){const t=$.c(4),[e,n]=R.useState(!1);let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(X,{children:s.jsx(xn,{trigger:s.jsxs(te,{tooltip:"Invite members",children:[s.jsx(cn,{}),s.jsx("span",{children:"Invite members"})]})})}),t[0]=l):l=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(me,{className:"gap-0.5",children:[l,s.jsx(X,{children:s.jsxs(te,{tooltip:"Add connection",onClick:()=>n(!0),children:[s.jsx(sn,{}),s.jsx("span",{children:"Add connection"})]})})]}),t[1]=i):i=t[1];let r;return t[2]!==e?(r=s.jsxs(s.Fragment,{children:[i,s.jsx(gn,{open:e,onOpenChange:n,mode:"browse"})]}),t[2]=e,t[3]=r):r=t[3],r}function qi(){const t=$.c(10),{state:e}=ge();if(e==="collapsed"){let m,c;t[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Ft,{}),c=s.jsx(Pt,{}),t[0]=m,t[1]=c):(m=t[0],c=t[1]);let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(X,{children:s.jsx("div",{className:"flex justify-center",children:s.jsx(mt,{})})}),t[2]=d):d=t[2];let u;t[3]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(X,{children:s.jsx(Dt,{})}),t[3]=u):u=t[3];let f;return t[4]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsxs(ot,{className:"px-2 pb-3 gap-1",children:[m,c,s.jsxs(me,{children:[d,u,s.jsx(X,{children:s.jsx(dt,{})})]})]}),t[4]=f):f=t[4],f}let l,i;t[5]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Ft,{}),i=s.jsx(Pt,{}),t[5]=l,t[6]=i):(l=t[5],i=t[6]);let r;t[7]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(X,{children:s.jsx(mt,{variant:"full"})}),t[7]=r):r=t[7];let o;t[8]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(X,{children:s.jsx(Dt,{})}),t[8]=o):o=t[8];let a;return t[9]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs(ot,{className:"px-2 pb-3 gap-0.5",children:[l,i,s.jsxs(me,{className:"gap-0.5",children:[r,o,s.jsx(X,{children:s.jsx(dt,{})})]})]}),t[9]=a):a=t[9],a}function Ki(){const t=$.c(8),e=pe(),{org:n}=oe(),{setOpenMobile:l}=ge();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(me,{children:s.jsx(X,{children:s.jsx(dt,{})})})}),t[0]=i):i=t[0];let r;t[1]!==e||t[2]!==n.slug||t[3]!==l?(r=()=>{e({to:"/$org/settings",params:{org:n.slug}}),l(!1)},t[1]=e,t[2]=n.slug,t[3]=l,t[4]=r):r=t[4];let o;t[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(bt,{className:"size-4"}),t[5]=o):o=t[5];let a;return t[6]!==r?(a=s.jsx(ot,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[i,s.jsx(je,{"aria-label":"Settings",onClick:r,children:o})]})}),t[6]=r,t[7]=a):a=t[7],a}function Et(t){const e=$.c(15),{className:n,wrapperClassName:l,children:i}=t,[r,o]=R.useState(!1);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=g=>{g&&o(g.scrollHeight>g.clientHeight+1)},e[0]=a):a=e[0];const m=a;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=g=>{const j=g.currentTarget;o(j.scrollHeight-j.scrollTop>j.clientHeight+1)},e[1]=c):c=e[1];const d=c;let u;e[2]!==l?(u=D("relative",l),e[2]=l,e[3]=u):u=e[3];let f;e[4]!==i||e[5]!==n?(f=s.jsx("div",{ref:m,onScroll:d,className:n,children:i}),e[4]=i,e[5]=n,e[6]=f):f=e[6];const h=r?"opacity-100":"opacity-0";let x;e[7]!==h?(x=D("pointer-events-none absolute right-0 bottom-0 left-0 h-10 bg-gradient-to-t from-sidebar to-transparent transition-opacity duration-150",h),e[7]=h,e[8]=x):x=e[8];let b;e[9]!==x?(b=s.jsx("div",{"aria-hidden":!0,className:x}),e[9]=x,e[10]=b):b=e[10];let p;return e[11]!==u||e[12]!==f||e[13]!==b?(p=s.jsxs("div",{className:u,children:[f,b]}),e[11]=u,e[12]=f,e[13]=b,e[14]=p):p=e[14],p}function Xi(t){const e=$.c(8),{virtualMcpId:n,size:l,showAutomationBadge:i}=t,r=l===void 0?"sm":l;let o;e[0]!==r||e[1]!==n?(o=n?s.jsx(Vi,{virtualMcpId:n,size:r}):s.jsx(ve,{icon:null,name:"?",size:r}),e[0]=r,e[1]=n,e[2]=o):o=e[2];let a;e[3]!==i?(a=i&&s.jsx("span",{"aria-label":"Automation-triggered",className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-blue-500 border border-blue-600 text-white",children:s.jsx(os,{size:10,className:"text-white"})}),e[3]=i,e[4]=a):a=e[4];let m;return e[5]!==o||e[6]!==a?(m=s.jsxs("div",{className:"relative shrink-0",children:[o,a]}),e[5]=o,e[6]=a,e[7]=m):m=e[7],m}function Vi(t){const e=$.c(6),{virtualMcpId:n,size:l}=t,i=jt(n);if(!i){let a;return e[0]!==l?(a=s.jsx(ve,{icon:null,name:"?",size:l}),e[0]=l,e[1]=a):a=e[1],a}const r=i.icon??null;let o;return e[2]!==i.title||e[3]!==l||e[4]!==r?(o=s.jsx(ve,{icon:r,name:i.title,size:l}),e[2]=i.title,e[3]=l,e[4]=r,e[5]=o):o=e[5],o}function Lt(t){const e=$.c(36),{open:n,onOpenChange:l}=t,[i,r]=R.useState(""),{org:o}=oe(),{setTaskId:a}=yt(),m=rs();let c,d,u;e[0]!==o.id||e[1]!==i?(u=i.trim(),d=Ps,c=Os.globalSearch(o.id,u),e[0]=o.id,e[1]=i,e[2]=c,e[3]=d,e[4]=u):(c=e[2],d=e[3],u=e[4]);const f=n&&u.length>0;let h;e[5]!==m||e[6]!==u?(h=async()=>await m.call("GLOBAL_SEARCH",{query:u,limit:20}),e[5]=m,e[6]=u,e[7]=h):h=e[7];let x;e[8]!==c||e[9]!==f||e[10]!==h?(x={queryKey:c,enabled:f,queryFn:h,staleTime:1e4},e[8]=c,e[9]=f,e[10]=h,e[11]=x):x=e[11];const{data:b,isFetching:p}=d(x);let g;e[12]!==b?.items?(g=b?.items??[],e[12]=b?.items,e[13]=g):g=e[13];const j=g;let y;e[14]!==l?(y=I=>{I||r(""),l(I)},e[14]=l,e[15]=y):y=e[15];const v=y;let w;e[16]!==v||e[17]!==a?(w=I=>{v(!1),a(I.id,I.virtual_mcp_id??void 0)},e[16]=v,e[17]=a,e[18]=w):w=e[18];const C=w;let N;e[19]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsxs(Tn,{className:"sr-only",children:[s.jsx(Mn,{children:"Search"}),s.jsx(On,{children:"Search across your organization's resources."})]}),e[19]=N):N=e[19];let S;e[20]!==i?(S=s.jsx(Ln,{value:i,onValueChange:r,placeholder:"Search..."}),e[20]=i,e[21]=S):S=e[21];let A;e[22]!==C||e[23]!==p||e[24]!==j||e[25]!==u?(A=u?p&&j.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Searching…"}):j.length===0?s.jsx(Fn,{children:"No results."}):j.map(I=>I.type==="thread"?s.jsxs(En,{value:`thread:${I.id}:${I.title}`,onSelect:()=>C(I),className:"gap-2.5",children:[s.jsx(Xi,{virtualMcpId:I.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:I.title||"Untitled thread"})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(I.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${I.id}`):null):s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Start typing to search."}),e[22]=C,e[23]=p,e[24]=j,e[25]=u,e[26]=A):A=e[26];let k;e[27]!==A?(k=s.jsx(Rn,{children:A}),e[27]=A,e[28]=k):k=e[28];let z;e[29]!==S||e[30]!==k?(z=s.jsxs(Pn,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[N,s.jsxs(Bn,{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:[S,k]})]}),e[29]=S,e[30]=k,e[31]=z):z=e[31];let _;return e[32]!==v||e[33]!==n||e[34]!==z?(_=s.jsx(Dn,{open:n,onOpenChange:v,children:z}),e[32]=v,e[33]=n,e[34]=z,e[35]=_):_=e[35],_}function Yi(t){return t==="ephemeral"||t.startsWith("thread:")}function ps(t){const e=$.c(40),{task:n,isActive:l,onClick:i,onArchive:r,showAutomationBadge:o,showAgentIcon:a,hideStatusIdle:m,indented:c}=t,d=Un(n.status),u=d.icon,f=n.metadata?.kind==="tool_call_run",h=jt(f?void 0:n.virtual_mcp_id);let x;e[0]!==h?(x=bn(h),e[0]=h,e[1]=x):x=e[1];const b=x;Wn(6e4);const p=o||!!n.trigger_id,g=n.id,j="button",y=0;let v;e[2]!==i?(v=H=>{H.target===H.currentTarget&&(H.key==="Enter"||H.key===" ")&&(H.preventDefault(),i())},e[2]=i,e[3]=v):v=e[3];const w=c?"-ml-4 pl-6":"pl-2",C=l?"bg-accent text-accent-foreground":"hover:bg-accent/60";let N;e[4]!==w||e[5]!==C?(N=D("group/row flex items-center gap-2 py-1.5 pr-2 rounded-md cursor-pointer transition-colors",w,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",C),e[4]=w,e[5]=C,e[6]=N):N=e[6];let S;e[7]!==f||e[8]!==a||e[9]!==h?.icon||e[10]!==h?.title?(S=a&&!f&&s.jsx(ve,{icon:h?.icon??null,name:h?.title??"?",size:"2xs"}),e[7]=f,e[8]=a,e[9]=h?.icon,e[10]=h?.title,e[11]=S):S=e[11];let A;e[12]!==p?(A=p&&s.jsx(os,{size:12,"aria-label":"Automation-triggered",className:"shrink-0 text-blue-500"}),e[12]=p,e[13]=A):A=e[13];const k=n.title||"Untitled task";let z;e[14]!==k?(z=s.jsx("div",{className:"text-sm text-foreground truncate",children:k}),e[14]=k,e[15]=z):z=e[15];let _;e[16]!==A||e[17]!==z?(_=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[A,z]}),e[16]=A,e[17]=z,e[18]=_):_=e[18];let I;e[19]!==b||e[20]!==l||e[21]!==n.branch||e[22]!==n.updated_at?(I=n.updated_at&&s.jsxs("div",{className:D("flex items-center gap-1 text-[11px] min-w-0",l?"text-accent-foreground/70":"text-muted-foreground/60"),children:[n.branch&&!Yi(n.branch)?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate font-mono",children:n.branch}),s.jsx("span",{className:"shrink-0",children:"·"})]}):b?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"truncate",children:[b.owner,"/",b.name]}),s.jsx("span",{className:"shrink-0",children:"·"})]}):null,s.jsx("span",{className:"shrink-0",children:Kn(new Date(n.updated_at))})]}),e[19]=b,e[20]=l,e[21]=n.branch,e[22]=n.updated_at,e[23]=I):I=e[23];let O;e[24]!==_||e[25]!==I?(O=s.jsxs("div",{className:"flex-1 min-w-0",children:[_,I]}),e[24]=_,e[25]=I,e[26]=O):O=e[26];const F="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",E=!m&&s.jsx("span",{className:D("[grid-area:slot] flex size-7 items-center justify-center pointer-events-none transition-opacity",r&&"group-hover/row:opacity-0"),"aria-label":d.label,children:s.jsx(u,{size:14,className:D(d.iconClassName,n.status==="in_progress"&&"animate-spin")})});let P;e[27]!==r?(P=r&&s.jsxs(he,{children:[s.jsx(ue,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":"Archive task",onClick:H=>{H.stopPropagation(),r()},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-7 items-center justify-center rounded-md 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(Ds,{size:14})})}),s.jsx(fe,{side:"right",children:"Archive"})]}),e[27]=r,e[28]=P):P=e[28];let L;e[29]!==E||e[30]!==P?(L=s.jsxs("div",{className:F,children:[E,P]}),e[29]=E,e[30]=P,e[31]=L):L=e[31];let M;return e[32]!==i||e[33]!==O||e[34]!==L||e[35]!==v||e[36]!==N||e[37]!==S||e[38]!==n.id?(M=s.jsxs("div",{"data-task-id":g,role:j,tabIndex:y,onClick:i,onKeyDown:v,className:N,children:[S,O,L]}),e[32]=i,e[33]=O,e[34]=L,e[35]=v,e[36]=N,e[37]=S,e[38]=n.id,e[39]=M):M=e[39],M}const Rt=["requires_action","in_progress","failed","expired","completed"];function Qi(t){const e=new Map(Rt.map(n=>[n,[]]));for(const n of t){const l=n.status??"completed";(e.get(l)??e.get("completed")).push(n)}return Rt.map(n=>({status:n,threads:e.get(n)}))}const Ji="sidebar.group.expanded.";function Zi(t,e){const n=$.c(3),[l,i]=Ye(`${Ji}${t}`,e);let r;return n[0]!==l||n[1]!==i?(r=[l,i],n[0]=l,n[1]=i,n[2]=r):r=n[2],r}function gs(t){const e=$.c(12),{onClick:n,isFetching:l,indented:i}=t,r=i?"-ml-4 pl-6 pr-2":"px-2";let o;e[0]!==r?(o=D("flex items-center gap-2 py-1.5 rounded-md text-sm text-muted-foreground",r,"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[0]=r,e[1]=o):o=e[1];let a;e[2]!==l?(a=l&&s.jsx(Vt,{size:14,className:"animate-spin"}),e[2]=l,e[3]=a):a=e[3];const m=l?"Loading…":"Show more";let c;e[4]!==m?(c=s.jsx("span",{children:m}),e[4]=m,e[5]=c):c=e[5];let d;return e[6]!==l||e[7]!==n||e[8]!==o||e[9]!==a||e[10]!==c?(d=s.jsxs("button",{type:"button","aria-label":"Show more tasks",onClick:n,disabled:l,className:o,children:[a,c]}),e[6]=l,e[7]=n,e[8]=o,e[9]=a,e[10]=c,e[11]=d):d=e[11],d}function el(t,e,n,l){return[t,e,n,l.type,l.member,l.currentUserId??""].join("|")}function tl(t){return t.member==="mine"&&!t.currentUserId}const bs=4;let qe=0;const ut=[];function sl(){for(;qe<bs&&ut.length>0;){const t=ut.shift();t&&t()}}function js(t){return new Promise((e,n)=>{const l=()=>{qe++,t().then(e,n).finally(()=>{qe--,sl()})};qe<bs?l():ut.push(l)})}const Ze=10;function Bt(t,e,n,l,i){const r={hidden:!1};l.member==="mine"&&l.currentUserId&&(r.created_by=l.currentUserId),l.type==="automation"&&(r.has_trigger=!0),l.type==="manual"&&(r.has_trigger=!1);const o={where:r,limit:i,offset:n,orderBy:[{field:["updated_at"],direction:"desc"}]};return o.status=e,o}function nl(t,e,n,l){let i=0;for(const r of t)vs(r,e,n,l)&&i++;return i}function nt(t,e,n,l){return nl(t,e,n,l)}function il(t,e){return!!(t>=Ze||t===0&&e)}function Ht(t,e){return t<e}function ll(t,e){return e===!1?!1:e===!0?!0:t}function vs(t,e,n,l){return!(t.hidden||(t.status??"completed")!==n||l.member==="mine"&&l.currentUserId&&t.created_by!==l.currentUserId||l.type==="automation"&&!t.trigger_id||l.type==="manual"&&t.trigger_id)}const Ve=new Map,We=new Map;function rl(t,e){return e?t>=Ze?!0:null:!1}function Gt(t){return Ve.get(t)}function ol(t,e){Ve.set(t,e)}function al(t,e,n){const l=Ve.get(t);if(l!==void 0){n(l);return}let i=We.get(t);i||(i=js(e).then(r=>(Ve.set(t,r),We.delete(t),r)).catch(()=>(We.delete(t),Promise.reject(new Error("group probe failed")))),We.set(t,i)),i.then(n,()=>n(!1))}function Ut(t){const e=t,n=Array.isArray(e.items)?e.items:[];return{items:n,hasMore:e.hasMore??n.length===Ze,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function cl(t,e,n,l,i){let r=0;for(const o of t)e.has(o.id)||vs(o,n,l,i)&&r++;return r}function dl(t,e,n,l){const i=$.c(8),{org:r}=oe(),o=el(r.id,t,e,n);let a;i[0]!==n?(a=tl(n),i[0]=n,i[1]=a):a=i[1];const m=a,[c,d]=R.useState({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});c.identity!==o&&d({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});const u=In(),{threads:f,hasMore:h}=vt(),x=nt(f,t,e,n),b=il(x,h),p=rl(x,h),g=rs();if(c.identity===o&&c.serverHasMore===null){const N=p??Gt(o);N!==void 0&&d({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:c.probeSubscribedIdentity,serverHasMore:N})}!m&&c.identity===o&&c.serverHasMore===null&&p===null&&Gt(o)===void 0&&c.probeSubscribedIdentity!==o&&(d(N=>N.identity===o?{...N,isProbing:!0,probeSubscribedIdentity:o}:N),al(o,async()=>{const N=Bt(t,e,0,n,1),S=await g.call("COLLECTION_THREADS_LIST",N),{totalCount:A}=Ut(S),k=nt(u.threads.get(),t,e,n);return A===void 0?!1:Ht(k,A)},N=>{d(S=>S.identity!==o?S:{...S,isProbing:!1,serverHasMore:N})}));const y=async function(){if(c.isFetching||c.isProbing||m)return;const S=o;d(A=>A.identity===S?{...A,isFetching:!0}:A);try{const A=nt(f,t,e,n),k=Bt(t,e,A,n,Ze),z=await js(()=>g.call("COLLECTION_THREADS_LIST",k)),{items:_,hasMore:I,totalCount:O}=Ut(z),F=new Set(f.map(ml)),E=cl(_,F,t,e,n),P=A;u.mergeThreads(_),d(L=>{if(L.identity!==S)return L;let M;return O!==void 0?M=Ht(P+E,O):M=_.length===0||E===0?!1:I,ol(S,M),{...L,isFetching:!1,serverHasMore:M}})}catch(A){const k=A,z=k instanceof Error?k.message:String(k);ie.error(`Could not load more tasks: ${z}`),d(_=>_.identity===S?{..._,isFetching:!1}:_)}},v=c.isFetching||c.isProbing,w=!m&&!v&&ll(b,c.serverHasMore);let C;return i[2]!==v||i[3]!==y||i[4]!==w||i[5]!==c.isProbing||i[6]!==c.serverHasMore?(C={hasMore:w,isFetching:v,isProbing:c.isProbing,serverHasMore:c.serverHasMore,loadMore:y},i[2]=v,i[3]=y,i[4]=w,i[5]=c.isProbing,i[6]=c.serverHasMore,i[7]=C):C=i[7],C}function ml(t){return t.id}function ul(t){const e=$.c(20),{status:n,threads:l,activeTaskId:i,onSelectTask:r,onArchiveTask:o,canArchive:a,filters:m}=t,{isFetching:c,isProbing:d,loadMore:u,hasMore:f,serverHasMore:h}=dl("status",n,m),[x,b]=R.useState(!1);!x&&l.length===0&&h===!0&&!c&&!d&&(b(!0),queueMicrotask(()=>{u()}));let p;if(e[0]!==i||e[1]!==a||e[2]!==m||e[3]!==o||e[4]!==r||e[5]!==l){let y;e[7]!==i||e[8]!==a||e[9]!==m||e[10]!==o||e[11]!==r?(y=v=>s.jsx(ps,{task:v,isActive:i===v.id,onClick:()=>r(v),onArchive:a&&v.created_by===m.currentUserId?()=>o(v):void 0,showAutomationBadge:!!v.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},v.id),e[7]=i,e[8]=a,e[9]=m,e[10]=o,e[11]=r,e[12]=y):y=e[12],p=l.map(y),e[0]=i,e[1]=a,e[2]=m,e[3]=o,e[4]=r,e[5]=l,e[6]=p}else p=e[6];let g;e[13]!==f||e[14]!==c||e[15]!==u?(g=(f||c)&&s.jsx(gs,{onClick:()=>{u()},isFetching:c,indented:!0}),e[13]=f,e[14]=c,e[15]=u,e[16]=g):g=e[16];let j;return e[17]!==p||e[18]!==g?(j=s.jsxs(s.Fragment,{children:[p,g]}),e[17]=p,e[18]=g,e[19]=j):j=e[19],j}function fl(t){const e=$.c(36),{status:n,threads:l,activeTaskId:i,onSelectTask:r,onArchiveTask:o,canArchive:a,filters:m}=t,c=qn[n],d=c.icon,[u,f]=Zi(`status-${n}`,!1);let h;e[0]!==u||e[1]!==f?(h=function(){f(!u)},e[0]=u,e[1]=f,e[2]=h):h=e[2];const x=h;let b;e[3]!==x?(b=S=>{S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),x())},e[3]=x,e[4]=b):b=e[4];let p;e[5]!==d||e[6]!==c.iconClassName?(p=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(d,{size:12,className:c.iconClassName})}),e[5]=d,e[6]=c.iconClassName,e[7]=p):p=e[7];let g;e[8]!==u?(g=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:u?s.jsx(St,{size:14}):s.jsx(Xn,{size:14})}),e[8]=u,e[9]=g):g=e[9];let j;e[10]!==p||e[11]!==g?(j=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[p,g]}),e[10]=p,e[11]=g,e[12]=j):j=e[12];let y;e[13]!==c.label?(y=s.jsx("span",{className:"flex-1 truncate",children:c.label}),e[13]=c.label,e[14]=y):y=e[14];let v;e[15]!==l.length?(v=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:l.length})}),e[15]=l.length,e[16]=v):v=e[16];let w;e[17]!==u||e[18]!==x||e[19]!==b||e[20]!==j||e[21]!==y||e[22]!==v?(w=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":u,onClick:x,onKeyDown:b,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-md 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:[j,y,v]}),e[17]=u,e[18]=x,e[19]=b,e[20]=j,e[21]=y,e[22]=v,e[23]=w):w=e[23];let C;e[24]!==i||e[25]!==a||e[26]!==u||e[27]!==m||e[28]!==o||e[29]!==r||e[30]!==n||e[31]!==l?(C=u&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(ul,{status:n,threads:l,activeTaskId:i,onSelectTask:r,onArchiveTask:o,canArchive:a,filters:m})}),e[24]=i,e[25]=a,e[26]=u,e[27]=m,e[28]=o,e[29]=r,e[30]=n,e[31]=l,e[32]=C):C=e[32];let N;return e[33]!==w||e[34]!==C?(N=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[w,C]}),e[33]=w,e[34]=C,e[35]=N):N=e[35],N}function Wt(t){const e=$.c(38),{threads:n,groupBy:l,activeTaskId:i,onSelectTask:r,onArchiveTask:o,filters:a,hasMore:m,isFetchingMore:c,onLoadMore:d,filtersActive:u}=t;if(n.length===0&&!m&&!c){let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Gn,{className:"size-6 opacity-60"}),e[0]=p):p=e[0];const g=u?"No threads match your filters":"No threads yet";let j;return e[1]!==g?(j=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:g})]}),e[1]=g,e[2]=j):j=e[2],j}const f=n.length>1||m;if(l==="status"){let p;if(e[3]!==i||e[4]!==f||e[5]!==a||e[6]!==o||e[7]!==r||e[8]!==n){let j;e[10]!==i||e[11]!==f||e[12]!==a||e[13]!==o||e[14]!==r?(j=y=>s.jsx(fl,{status:y.status,threads:y.threads,activeTaskId:i,onSelectTask:r,onArchiveTask:o,canArchive:f,filters:a},y.status),e[10]=i,e[11]=f,e[12]=a,e[13]=o,e[14]=r,e[15]=j):j=e[15],p=Qi(n).map(j),e[3]=i,e[4]=f,e[5]=a,e[6]=o,e[7]=r,e[8]=n,e[9]=p}else p=e[9];let g;return e[16]!==p?(g=s.jsx(s.Fragment,{children:p}),e[16]=p,e[17]=g):g=e[17],g}let h;if(e[18]!==i||e[19]!==f||e[20]!==a||e[21]!==o||e[22]!==r||e[23]!==n){let p;e[25]!==i||e[26]!==f||e[27]!==a||e[28]!==o||e[29]!==r?(p=g=>s.jsx(ps,{task:g,isActive:i===g.id,onClick:()=>r(g),onArchive:f&&g.created_by===a.currentUserId?()=>o(g):void 0,showAutomationBadge:!!g.trigger_id,showAgentIcon:!0},g.id),e[25]=i,e[26]=f,e[27]=a,e[28]=o,e[29]=r,e[30]=p):p=e[30],h=n.map(p),e[18]=i,e[19]=f,e[20]=a,e[21]=o,e[22]=r,e[23]=n,e[24]=h}else h=e[24];let x;e[31]!==m||e[32]!==c||e[33]!==d?(x=(m||c)&&s.jsx(gs,{onClick:d,isFetching:c}),e[31]=m,e[32]=c,e[33]=d,e[34]=x):x=e[34];let b;return e[35]!==h||e[36]!==x?(b=s.jsxs(s.Fragment,{children:[h,x]}),e[35]=h,e[36]=x,e[37]=b):b=e[37],b}function hl(t,e,n){if(!n)return;const l=t.findIndex(i=>i.id===e);if(l!==-1){for(let i=l+1;i<t.length;i++){const r=t[i];if(r?.created_by===n)return r}for(let i=l-1;i>=0;i--){const r=t[i];if(r?.created_by===n)return r}}}function qt(t){const e=$.c(17),{label:n,onClick:l,active:i,children:r}=t,[o,a]=R.useState(!1);let m,c,d,u;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=()=>a(!0),c=()=>a(!1),d=()=>a(!0),u=()=>a(!1),e[0]=m,e[1]=c,e[2]=d,e[3]=u):(m=e[0],c=e[1],d=e[2],u=e[3]);const f=i&&"bg-sidebar-accent text-foreground";let h;e[4]!==f?(h=D(f),e[4]=f,e[5]=h):h=e[5];let x;e[6]!==r||e[7]!==n||e[8]!==l||e[9]!==h?(x=s.jsx(ue,{asChild:!0,children:s.jsx(je,{"aria-label":n,onClick:l,onPointerEnter:m,onPointerLeave:c,onFocus:d,onBlur:u,className:h,children:r})}),e[6]=r,e[7]=n,e[8]=l,e[9]=h,e[10]=x):x=e[10];let b;e[11]!==n?(b=s.jsx(fe,{side:"bottom",children:n}),e[11]=n,e[12]=b):b=e[12];let p;return e[13]!==o||e[14]!==x||e[15]!==b?(p=s.jsxs(he,{open:o,children:[x,b]}),e[13]=o,e[14]=x,e[15]=b,e[16]=p):p=e[16],p}function it(t){const e=$.c(13),{label:n,value:l,onChange:i,options:r}=t;let o;e[0]!==n?(o=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),e[0]=n,e[1]=o):o=e[1];let a;e[2]!==i?(a=u=>u&&i(u),e[2]=i,e[3]=a):a=e[3];let m;e[4]!==r?(m=r.map(xl),e[4]=r,e[5]=m):m=e[5];let c;e[6]!==a||e[7]!==m||e[8]!==l?(c=s.jsx(_n,{type:"single",size:"sm",value:l,onValueChange:a,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:m}),e[6]=a,e[7]=m,e[8]=l,e[9]=c):c=e[9];let d;return e[10]!==o||e[11]!==c?(d=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o,c]}),e[10]=o,e[11]=c,e[12]=d):d=e[12],d}function xl(t){return s.jsxs(Nn,{value:t.value,className:"h-6 gap-1.5 rounded-md 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 ys({onNavigate:t}={}){const{data:e}=re.useSession(),n=e?.user?.id,{org:l}=oe(),i=Cn({connectionId:wn,orgId:l.id,orgSlug:l.slug}),r=Xe(l.id).id,o=is(),{threads:a,hasMore:m,isFetchingMore:c,fetchNextPage:d}=vt(),u=a.filter(T=>!T.hidden),{hide:f}=ls(),h=pe(),{setTaskId:x,createNewTask:b}=yt(),p=ft({strict:!1}),g=ht({strict:!1}),j=p.taskId??null,y=g.virtualmcpid??a.find(T=>T.id===j)?.virtual_mcp_id??null,v=()=>{t?.()},w=[...u].sort((T,G)=>(G.updated_at??"").localeCompare(T.updated_at??"")),[C,N]=R.useState("all"),[S,A]=R.useState("flat"),[k,z]=Ye("sidebar-threads-scope-all",!1),[_,I]=R.useState(!1),[O,F]=R.useState(!1),E={type:C,member:"mine",currentUserId:n??null},P=T=>n?T.filter(G=>G.created_by===n):[],L=T=>C==="automation"?T.filter(G=>!!G.trigger_id):C==="manual"?T.filter(G=>!G.trigger_id):T,M=P(w),H=L(M),q=L(w),U=k?q:H,W=T=>{if(n&&T.created_by&&T.created_by!==n)return;const G=T.id===j;if(f(T.id),!G)return;const Y=hl(U,T.id,n);v(),Y?x(Y.id,Y.virtual_mcp_id):h({to:"/$org",params:{org:l.slug}})},Q=T=>{v(),x(T.id,T.virtual_mcp_id)},B=async T=>{try{const G=await i.callTool({name:"COLLECTION_THREAD_MESSAGES_LIST",arguments:{thread_id:T,limit:1,offset:0}});return((G.structuredContent??G).items?.length??0)===0}catch{return!1}},ae=async()=>{const T=y??r;de("sidebar_new_thread_clicked",{virtual_mcp_id:T});const G=M.find(Y=>Y.virtual_mcp_id===T&&Y.title==="New chat");if(G&&await B(G.id)){v(),x(G.id,T);return}v(),b(T)},{state:ye,isMobile:V,toggleSidebar:J}=ge();if(ye==="collapsed"&&!V){const T=Xe(l.id),G=new Map((o??[]).map(K=>[K.id,K])),Y=K=>(K?G.get(K):void 0)??(K===r?T:void 0);return s.jsxs(me,{className:"min-h-0 gap-1.5 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[s.jsx(X,{children:s.jsx(te,{"aria-label":"Toggle sidebar",tooltip:"Toggle sidebar",onClick:J,children:s.jsx(Zt,{size:16})})}),s.jsx(X,{children:s.jsx(te,{tooltip:"New thread",onClick:()=>{ae()},children:s.jsx(It,{size:16})})}),U.map(K=>{const be=Y(K.virtual_mcp_id);return s.jsx(X,{children:s.jsx(te,{tooltip:K.title||"New chat",isActive:K.id===j,onClick:()=>Q(K),children:s.jsx(ve,{icon:be?.icon??null,name:be?.title??"Agent",size:"2xs"})})},K.id)})]})}const Z=S!=="flat"||C!=="all"||k===!0,ne=s.jsxs(Qe,{children:[s.jsxs(he,{children:[s.jsx(ue,{asChild:!0,children:s.jsx(Ee,{asChild:!0,children:s.jsxs(je,{"aria-label":"Filter threads",active:Z,children:[s.jsx(Sn,{size:16}),Z&&s.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"})]})})}),s.jsx(fe,{side:"bottom",children:"Filter threads"})]}),s.jsxs(Je,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[s.jsx(it,{label:"View",value:S,onChange:T=>{de("tasks_panel_group_by_changed",{to_value:T}),A(T)},options:[{value:"flat",label:"List",icon:s.jsx(mn,{size:13})},{value:"status",label:"Status",icon:s.jsx(un,{size:13})}]}),s.jsx(it,{label:"Type",value:C,onChange:T=>{de("tasks_panel_filter_changed",{to_value:T}),N(T)},options:[{value:"all",label:"All"},{value:"manual",label:"Chats"},{value:"automation",label:"Auto"}]}),s.jsx(it,{label:"Scope",value:k?"team":"mine",onChange:T=>z(T==="team"),options:[{value:"mine",label:"Mine"},{value:"team",label:"Team"}]})]})]}),se=T=>s.jsx(at,{delayDuration:300,children:s.jsxs("div",{className:D("shrink-0 px-1 flex items-center justify-between",T?"h-10":"h-10 md:h-7 mb-2"),children:[s.jsxs("div",{className:"flex items-center gap-0.5",children:[!T&&s.jsx(as,{}),ne]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx(qt,{label:"Search threads",onClick:()=>{de("tasks_panel_search_opened"),F(!0),I(!0)},children:s.jsx(dn,{size:16})}),s.jsx(qt,{label:"New thread",onClick:()=>{ae()},children:s.jsx(It,{size:16})})]})]})});return V?s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[se(!0),s.jsx(Et,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain px-1 h-full",children:s.jsx(Wt,{threads:U,groupBy:S,activeTaskId:j,onSelectTask:Q,onArchiveTask:W,filters:E,hasMore:m,isFetchingMore:c,onLoadMore:()=>{d()},filtersActive:Z})}),O&&s.jsx(Lt,{open:_,onOpenChange:I})]}):s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[se(!1),s.jsx("div",{className:"flex-1 min-h-0 flex flex-col gap-0.5 -mr-2 pr-2",children:s.jsx(Et,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain h-full",children:s.jsx(Wt,{threads:U,groupBy:S,activeTaskId:j,onSelectTask:Q,onArchiveTask:W,filters:E,hasMore:m,isFetchingMore:c,onLoadMore:()=>{d()},filtersActive:Z})})}),O&&s.jsx(Lt,{open:_,onOpenChange:I})]})}const pl=5,gl=[{nameWidth:"w-24",taskRows:2},{nameWidth:"w-28",taskRows:0},{nameWidth:"w-20",taskRows:1},{nameWidth:"w-32",taskRows:0},{nameWidth:"w-24",taskRows:0}];function Ss(){const t=$.c(3),{state:e}=ge();if(e==="collapsed"){let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex flex-col gap-1.5",children:Array.from({length:pl}).map(vl)}),t[0]=i):i=t[0],i}let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"shrink-0 px-1 h-10 md:h-7 mb-2 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(le,{className:"size-6 rounded-md"}),s.jsx(le,{className:"size-6 rounded-md"}),s.jsx(le,{className:"size-6 rounded-md"})]}),s.jsx(le,{className:"h-6 w-20 rounded-md"})]}),t[1]=n):n=t[1];let l;return t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[n,s.jsx("div",{className:"flex flex-col gap-0.5",children:gl.map(bl)})]}),t[2]=l):l=t[2],l}function bl(t,e){return s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[s.jsx(le,{className:"size-5 rounded-full shrink-0"}),s.jsx(le,{className:D("h-3",t.nameWidth,"rounded-sm")})]}),t.taskRows>0&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:Array.from({length:t.taskRows}).map(jl)})]},e)}function jl(t,e){return s.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:s.jsx(le,{className:"h-3 flex-1 rounded-sm"})},e)}function vl(t,e){return s.jsx(le,{className:"size-10 rounded-lg mx-auto"},e)}function yl(){const t=$.c(4),e=us();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(qi,{}),t[0]=n):n=t[0];let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Yt,{children:s.jsx(R.Suspense,{fallback:s.jsx(Ss,{}),children:s.jsx(ys,{})})}),t[1]=l):l=t[1];let i;return t[2]!==e?(i=s.jsx(cs,{children:s.jsx(xs,{sections:e,footer:n,additionalContent:l})}),t[2]=e,t[3]=i):i=t[3],i}function Sl(t){const e=$.c(8),{onClose:n}=t,l=us();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ki,{}),e[0]=i):i=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ss,{}),e[1]=r):r=e[1];let o;e[2]!==n?(o=s.jsx(Yt,{children:s.jsx(R.Suspense,{fallback:r,children:s.jsx(ys,{onNavigate:n})})}),e[2]=n,e[3]=o):o=e[3];let a;return e[4]!==n||e[5]!==l||e[6]!==o?(a=s.jsx(cs,{children:s.jsx(Pi,{sections:l,onClose:n,footer:i,additionalContent:o})}),e[4]=n,e[5]=l,e[6]=o,e[7]=a):a=e[7],a}function Ns(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Nl=Fs({name:Es().min(2,"Organization name is required")});function _l(t){const e=$.c(41),{open:n,onOpenChange:l}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={resolver:Ls(Nl),defaultValues:{name:""}},e[0]=i):i=e[0];const r=Rs(i);let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={mutationFn:wl,onSuccess:Cl},e[1]=o):o=e[1];const a=Bs(o),m=a.error instanceof Error?a.error.message:a.error?"Failed to create organization.":null;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsxs(ri,{children:[s.jsx(oi,{children:"Create a new organization"}),s.jsx(ai,{children:"Set up a new organization to collaborate with others."})]}),e[2]=c):c=e[2];let d;if(e[3]!==a||e[4]!==r){let N;e[6]!==a?(N=S=>a.mutateAsync(S),e[6]=a,e[7]=N):N=e[7],d=r.handleSubmit(N),e[3]=a,e[4]=r,e[5]=d}else d=e[5];let u;e[8]!==r.formState.isSubmitting?(u=N=>{const{field:S}=N;return s.jsxs(fi,{children:[s.jsx(hi,{children:"Organization Name"}),s.jsx(xi,{children:s.jsx(bi,{...S,placeholder:"Acme Inc.",disabled:r.formState.isSubmitting})}),s.jsx(pi,{children:"The name of your company or organization"}),S.value&&s.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Organization URL:"," ",s.jsxs("span",{className:"font-mono",children:[typeof window<"u"?globalThis.location.origin:"","/",Ns(S.value)]})]}),s.jsx(gi,{})]})},e[8]=r.formState.isSubmitting,e[9]=u):u=e[9];let f;e[10]!==r.control||e[11]!==u?(f=s.jsx(mi,{control:r.control,name:"name",render:u}),e[10]=r.control,e[11]=u,e[12]=f):f=e[12];let h;e[13]!==m?(h=m&&s.jsx("div",{className:"text-destructive text-sm mt-2",children:m}),e[13]=m,e[14]=h):h=e[14];let x;e[15]!==a||e[16]!==r?(x=()=>{a.reset(),r.reset()},e[15]=a,e[16]=r,e[17]=x):x=e[17];let b;e[18]!==r.formState.isSubmitting||e[19]!==x?(b=s.jsx(ii,{disabled:r.formState.isSubmitting,onClick:x,children:"Cancel"}),e[18]=r.formState.isSubmitting,e[19]=x,e[20]=b):b=e[20];const p=!r.formState.isValid||r.formState.isSubmitting;let g;e[21]!==r.formState.isSubmitting?(g=r.formState.isSubmitting?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(Zn,{size:"xs"})," Creating..."]}):"Create Organization",e[21]=r.formState.isSubmitting,e[22]=g):g=e[22];let j;e[23]!==p||e[24]!==g?(j=s.jsx(rt,{type:"submit",variant:"default",disabled:p,children:g}),e[23]=p,e[24]=g,e[25]=j):j=e[25];let y;e[26]!==j||e[27]!==b?(y=s.jsxs(ci,{children:[b,j]}),e[26]=j,e[27]=b,e[28]=y):y=e[28];let v;e[29]!==y||e[30]!==d||e[31]!==f||e[32]!==h?(v=s.jsxs("form",{className:"space-y-6",onSubmit:d,autoComplete:"off",children:[f,h,y]}),e[29]=y,e[30]=d,e[31]=f,e[32]=h,e[33]=v):v=e[33];let w;e[34]!==r||e[35]!==v?(w=s.jsxs(li,{children:[c,s.jsx(ui,{...r,children:v})]}),e[34]=r,e[35]=v,e[36]=w):w=e[36];let C;return e[37]!==l||e[38]!==n||e[39]!==w?(C=s.jsx(di,{open:n,onOpenChange:l,children:w}),e[37]=l,e[38]=n,e[39]=w,e[40]=C):C=e[40],C}function Cl(t){const{orgSlug:e}=t;window.location.href=`/${e}`}async function wl(t){const e=Ns(t.name);if(!e)throw new Error("Organization slug is invalid");const n=await re.organization.create({name:t.name,slug:e});if(n?.error)throw new Error(n.error.message||"Failed to create organization");const l=n?.data?.slug??e;if(!l)throw new Error("Failed to create organization");return{orgSlug:l}}function _s(){const t=R.useContext(Hs),{data:e,refetch:n}=t.hooks.useListUserInvitations();return{invitations:(e??[]).filter(i=>i.status==="pending"&&new Date(i.expiresAt)>new Date),refetch:()=>n?.()}}function kl(t){let e=0;for(let l=0;l<t.length;l++)e=t.charCodeAt(l)+((e<<5)-e);const n=Math.abs(e)%360;return{backgroundColor:`hsl(${n} 55% 70%)`,color:`hsl(${n} 55% 20%)`}}function _t(t){const e=$.c(13),{org:n,size:l}=t,i=l===void 0?"sm":l,r=i==="xs"?"size-5":"size-6",o=i==="xs"?"text-[9px]":"text-xs";let a;e[0]!==r?(a=D(r,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=r,e[1]=a):a=e[1];let m;e[2]!==n.logo||e[3]!==n.name?(m=n.logo?void 0:kl(n.name),e[2]=n.logo,e[3]=n.name,e[4]=m):m=e[4];let c;e[5]!==n.logo||e[6]!==n.name||e[7]!==o?(c=n.logo?s.jsx("img",{src:n.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:D("font-semibold leading-none",o),children:n.name.slice(0,2).toUpperCase()}),e[5]=n.logo,e[6]=n.name,e[7]=o,e[8]=c):c=e[8];let d;return e[9]!==a||e[10]!==m||e[11]!==c?(d=s.jsx("div",{className:a,style:m,children:c}),e[9]=a,e[10]=m,e[11]=c,e[12]=d):d=e[12],d}function Al({invitation:t,onChanged:e}){const[n,l]=R.useState(!1),i=t.organizationName??"Unknown organization",r=async()=>{l(!0);try{const m=await re.organization.acceptInvitation({invitationId:t.id});if(m.error){ie.error(m.error.message),l(!1);return}}catch{ie.error("Failed to accept invitation"),l(!1);return}ie.success(`Joined ${i}`),Us();let a;try{a=(await re.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=a?`/${a}`:"/"},o=async()=>{l(!0);try{const a=await re.organization.rejectInvitation({invitationId:t.id});if(a.error){ie.error(a.error.message),l(!1);return}ie.success("Invitation declined"),l(!1),e()}catch{ie.error("Failed to decline invitation"),l(!1)}};return s.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[s.jsx(_t,{org:{name:i},size:"sm"}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"truncate text-sm font-medium",children:i}),s.jsx("p",{className:"truncate text-xs text-muted-foreground",children:"Invited to join"})]}),s.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[s.jsx(rt,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:r,disabled:n,children:"Accept"}),s.jsx(rt,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:o,disabled:n,"aria-label":`Decline invitation to ${i}`,children:s.jsx(ni,{size:14})})]})]})}function Il(t){const e=$.c(29),{orgParam:n,onSelectOrg:l,onCreateOrg:i}=t,{data:r}=Gs(),{invitations:o,refetch:a}=_s();let m;e[0]!==n?(m=(_,I)=>_.slug===n?-1:I.slug===n?1:_.name.localeCompare(I.name),e[0]=n,e[1]=m):m=e[1];const c=[...r??[]].sort(m),[d,u]=R.useState(""),f=d.toLowerCase(),h=f?c.filter(_=>_.name.toLowerCase().includes(f)||_.slug.toLowerCase().includes(f)):c;let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ms,{size:16,className:"shrink-0 text-muted-foreground/60"}),e[2]=x):x=e[2];let b;e[3]===Symbol.for("react.memo_cache_sentinel")?(b=_=>u(_.target.value),e[3]=b):b=e[3];let p;e[4]!==d?(p=_=>_.key==="Escape"&&d&&u(""),e[4]=d,e[5]=p):p=e[5];let g;e[6]!==d||e[7]!==p?(g=s.jsx("input",{"data-org-switcher-search":!0,autoFocus:!0,type:"text",value:d,onChange:b,onKeyDown:p,placeholder:"Search organizations...",className:"flex-1 min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60"}),e[6]=d,e[7]=p,e[8]=g):g=e[8];let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Le,{size:16}),e[9]=j):j=e[9];let y;e[10]!==i?(y=s.jsx("button",{type:"button",onClick:i,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:j}),e[10]=i,e[11]=y):y=e[11];let v;e[12]!==g||e[13]!==y?(v=s.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 border-b border-border/50",children:[x,g,y]}),e[12]=g,e[13]=y,e[14]=v):v=e[14];const w="flex-1 min-h-0 overflow-y-auto p-1.5 flex flex-col gap-1";let C;e[15]!==o||e[16]!==d||e[17]!==a?(C=!d&&o.map(_=>s.jsx(Al,{invitation:_,onChanged:a},_.id)),e[15]=o,e[16]=d,e[17]=a,e[18]=C):C=e[18];const N=h.length===0&&s.jsx("p",{className:"px-3 py-4 text-sm text-muted-foreground/60 text-center",children:d?`No organizations match "${d}"`:"No organizations available"});let S;e[19]!==l||e[20]!==n?(S=_=>s.jsxs("button",{type:"button",onClick:()=>l(_.slug),className:D("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",_.slug===n?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50"),children:[s.jsx(_t,{org:_,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:_.name}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:_.slug})]}),_.slug===n&&s.jsx(ds,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},_.id),e[19]=l,e[20]=n,e[21]=S):S=e[21];const A=h.map(S);let k;e[22]!==C||e[23]!==N||e[24]!==A?(k=s.jsxs("div",{className:w,children:[C,N,A]}),e[22]=C,e[23]=N,e[24]=A,e[25]=k):k=e[25];let z;return e[26]!==k||e[27]!==v?(z=s.jsxs(s.Fragment,{children:[v,k]}),e[26]=k,e[27]=v,e[28]=z):z=e[28],z}function zl(t){const e=$.c(22),{trigger:n,orgParam:l,align:i,side:r}=t,o=i===void 0?"start":i,a=r===void 0?"bottom":r,m=pe(),[c,d]=R.useState(!1),[u,f]=R.useState(!1);let h;e[0]!==n?(h=s.jsx(Ee,{asChild:!0,children:n}),e[0]=n,e[1]=h):h=e[1];const x=String(c);let b;e[2]!==m?(b=C=>{d(!1),m({to:"/$org",params:{org:C}})},e[2]=m,e[3]=b):b=e[3];let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{d(!1),f(!0)},e[4]=p):p=e[4];let g;e[5]!==l||e[6]!==x||e[7]!==b?(g=s.jsx(Il,{orgParam:l,onSelectOrg:b,onCreateOrg:p},x),e[5]=l,e[6]=x,e[7]=b,e[8]=g):g=e[8];let j;e[9]!==o||e[10]!==a||e[11]!==g?(j=s.jsx(Je,{side:a,align:o,sideOffset:8,collisionPadding:16,className:"w-[300px] p-0 flex flex-col max-h-[440px]",onOpenAutoFocus:Tl,onCloseAutoFocus:$l,children:g}),e[9]=o,e[10]=a,e[11]=g,e[12]=j):j=e[12];let y;e[13]!==c||e[14]!==h||e[15]!==j?(y=s.jsxs(Qe,{open:c,onOpenChange:d,children:[h,j]}),e[13]=c,e[14]=h,e[15]=j,e[16]=y):y=e[16];let v;e[17]!==u?(v=s.jsx(_l,{open:u,onOpenChange:f}),e[17]=u,e[18]=v):v=e[18];let w;return e[19]!==v||e[20]!==y?(w=s.jsxs(s.Fragment,{children:[y,v]}),e[19]=v,e[20]=y,e[21]=w):w=e[21],w}function $l(t){return t.preventDefault()}function Tl(t){t.preventDefault(),t.currentTarget?.querySelector("[data-org-switcher-search]")?.focus()}function Ml(t){const e=$.c(21),{value:n,onChange:l,placeholder:i,onKeyDown:r,className:o,isSearching:a,disabled:m}=t,c=i===void 0?"Search...":i;let d;e[0]!==o?(d=D("shrink-0 w-full border-b border-border h-12",o),e[0]=o,e[1]=d):d=e[1];const u=m?"cursor-not-allowed opacity-50":"cursor-text";let f;e[2]!==u?(f=D("flex items-center gap-2.5 h-12 px-4",u),e[2]=u,e[3]=f):f=e[3];let h;e[4]!==a?(h=a?s.jsx(Vt,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):s.jsx(ms,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=a,e[5]=h):h=e[5];let x;e[6]!==l?(x=j=>l(j.target.value),e[6]=l,e[7]=x):x=e[7];let b;e[8]!==m||e[9]!==r||e[10]!==c||e[11]!==x||e[12]!==n?(b=s.jsx("input",{type:"text",value:n,onChange:x,onKeyDown:r,placeholder:c,disabled:m,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=m,e[9]=r,e[10]=c,e[11]=x,e[12]=n,e[13]=b):b=e[13];let p;e[14]!==f||e[15]!==h||e[16]!==b?(p=s.jsxs("label",{className:f,children:[h,b]}),e[14]=f,e[15]=h,e[16]=b,e[17]=p):p=e[17];let g;return e[18]!==d||e[19]!==p?(g=s.jsx("div",{className:d,children:p}),e[18]=d,e[19]=p,e[20]=g):g=e[20],g}const Ol="Select an existing agent";function Pl(t){const e=$.c(5),{children:n}=t;let l;e[0]!==n?(l=s.jsx(ue,{asChild:!0,children:n}),e[0]=n,e[1]=l):l=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(fe,{side:"right",sideOffset:8,children:Ol}),e[2]=i):i=e[2];let r;return e[3]!==l?(r=s.jsxs(he,{defaultOpen:!0,delayDuration:0,children:[l,i]}),e[3]=l,e[4]=r):r=e[4],r}function Dl(t){const e=pe(),{create:n}=ls(),{locator:l}=oe(),i=ft({strict:!1}),r=ht({strict:!1});return async o=>{const a=crypto.randomUUID(),m=o===r.virtualmcpid?$n(t,l,i.taskId??""):null;try{await n({id:a,virtual_mcp_id:o,...m?{branch:m}:{}})}catch{}e({to:"/$org/$taskId",params:{org:t,taskId:a},search:{virtualmcpid:o}})}}function lt(t){const e=$.c(20),{agent:n,selected:l,onClick:i}=t,r=l?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let o;e[0]!==r?(o=D("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",r),e[0]=r,e[1]=o):o=e[1];let a;e[2]!==n.icon||e[3]!==n.title?(a=s.jsx(ve,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[2]=n.icon,e[3]=n.title,e[4]=a):a=e[4];let m;e[5]!==n.title?(m=s.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[5]=n.title,e[6]=m):m=e[6];let c;e[7]!==n.description?(c=n.description&&s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n.description}),e[7]=n.description,e[8]=c):c=e[8];let d;e[9]!==m||e[10]!==c?(d=s.jsxs("div",{className:"flex-1 min-w-0",children:[m,c]}),e[9]=m,e[10]=c,e[11]=d):d=e[11];let u;e[12]!==l?(u=l&&s.jsx(ds,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=l,e[13]=u):u=e[13];let f;return e[14]!==i||e[15]!==o||e[16]!==a||e[17]!==d||e[18]!==u?(f=s.jsxs("button",{type:"button",onClick:i,className:o,children:[a,d,u]}),e[14]=i,e[15]=o,e[16]=a,e[17]=d,e[18]=u,e[19]=f):f=e[19],f}function Kt(t){const e=$.c(5),{children:n,action:l}=t;let i;e[0]!==n?(i=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n}),e[0]=n,e[1]=i):i=e[1];let r;return e[2]!==l||e[3]!==i?(r=s.jsxs("div",{className:"flex items-center justify-between px-3 pb-1 pt-2",children:[i,l]}),e[2]=l,e[3]=i,e[4]=r):r=e[4],r}function Fl(t){const e=$.c(27),{onClose:n,onSelectAgent:l,selectedAgentId:i,onImportFromGithub:r}=t,[o,a]=R.useState(""),m=is(),c=m??[],{org:d}=oe(),{data:u}=re.useSession(),f=u?.user?.id??"anon",h=Yn(m),x=Qn(),b=Dl(d.slug),p=jn(m),g=o.toLowerCase(),j=c.filter(Bl).filter(B=>!p.has(B.id)).filter(Rl).filter(B=>!o||B.title.toLowerCase().includes(g)),y=j.filter(Ll),v=j.filter(El),w=Xe(d.id),C=!o||w.title.toLowerCase().includes(g),N=!!(l&&C);let S;e[0]!==n||e[1]!==l?(S=()=>{l?.(null),n(),a("")},e[0]=n,e[1]=l,e[2]=S):S=e[2];const A=S,k=B=>{if(l){l(B.id),n(),a("");return}Jn({orgId:d.id,userId:f},B.id,h),x(),n(),a(""),b(B.id)},z="flex flex-col max-h-[min(640px,80dvh)]";let _;e[3]!==o?(_=s.jsx(Ml,{value:o,onChange:a,placeholder:"Search agents..."}),e[3]=o,e[4]=_):_=e[4];const I="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-0.5",O=l&&C&&w&&s.jsx(lt,{agent:w,selected:!i||i===w.id,onClick:A}),F=v.length>0&&s.jsx(Kt,{children:"Agents"}),E=v.map(B=>s.jsx(lt,{agent:B,selected:l?i===B.id:void 0,onClick:()=>k(B)},B.id)),P=(y.length>0||!o)&&s.jsx(Kt,{action:s.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",children:[s.jsx(vi,{className:"size-3.5"}),"Import"]}),children:"Code Agents"}),L=y.map(B=>s.jsx(lt,{agent:B,selected:l?i===B.id:void 0,onClick:()=>k(B)},B.id));let M;e[5]!==N||e[6]!==o||e[7]!==j.length?(M=j.length===0&&!N&&o&&s.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:"No agents found"}),e[5]=N,e[6]=o,e[7]=j.length,e[8]=M):M=e[8];let H;e[9]!==M||e[10]!==O||e[11]!==F||e[12]!==E||e[13]!==P||e[14]!==L?(H=s.jsxs("div",{className:I,children:[O,F,E,P,L,M]}),e[9]=M,e[10]=O,e[11]=F,e[12]=E,e[13]=P,e[14]=L,e[15]=H):H=e[15];let q;e[16]!==d.slug?(q={org:d.slug},e[16]=d.slug,e[17]=q):q=e[17];let U;e[18]!==n?(U=()=>n(),e[18]=n,e[19]=U):U=e[19];let W;e[20]!==q||e[21]!==U?(W=s.jsx("div",{className:"border-t border-border px-3 py-2.5",children:s.jsx(Ws,{to:"/$org/settings/agents",params:q,onClick:U,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:"See all agents"})}),e[20]=q,e[21]=U,e[22]=W):W=e[22];let Q;return e[23]!==H||e[24]!==W||e[25]!==_?(Q=s.jsxs("div",{className:z,children:[_,H,W]}),e[23]=H,e[24]=W,e[25]=_,e[26]=Q):Q=e[26],Q}function El(t){return!ns(t.metadata)}function Ll(t){return ns(t.metadata)}function Rl(t){return!An(t.id)}function Bl(t){return!kn(t.id)}function Hl(t){const e=$.c(31);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{compact:l,trigger:i,onSelectAgent:r,selectedAgentId:o,side:a,align:m}=n,c=l===void 0?!1:l,d=a===void 0?"right":a,u=m===void 0?"start":m,[f,h]=R.useState(!1),[x,b]=R.useState(!1),p=gt(),{setOpenMobile:g}=ge(),j=Vn(),y=j?"border border-border":void 0;let v;e[2]!==j?(v=F=>j?s.jsx(Pl,{children:F}):F,e[2]=j,e[3]=v):v=e[3];const w=v;let C;e[4]!==p||e[5]!==g?(C=()=>{h(!1),p&&g(!1)},e[4]=p,e[5]=g,e[6]=C):C=e[6];const N=C;let S;e[7]!==N?(S=()=>{N(),b(!0)},e[7]=N,e[8]=S):S=e[8];const A=S;let k;e[9]!==N||e[10]!==A||e[11]!==r||e[12]!==f||e[13]!==o?(k=f&&s.jsx(R.Suspense,{fallback:s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx(le,{className:"h-4 w-24"})}),children:s.jsx(Fl,{onClose:N,onSelectAgent:r,selectedAgentId:o,onImportFromGithub:A})}),e[9]=N,e[10]=A,e[11]=r,e[12]=f,e[13]=o,e[14]=k):k=e[14];const z=k;let _;e[15]!==u||e[16]!==c||e[17]!==y||e[18]!==j||e[19]!==p||e[20]!==f||e[21]!==z||e[22]!==d||e[23]!==i||e[24]!==w?(_=p?s.jsxs(s.Fragment,{children:[i?s.jsx("button",{type:"button",onClick:()=>h(!0),className:"contents",children:i}):c?w(s.jsx(je,{"aria-label":"Browse agents",className:D(y),onClick:()=>{de("agent_browser_opened",{surface:"mobile_drawer"}),h(!0)},children:s.jsx(Le,{className:"size-4"})})):s.jsx(X,{children:w(s.jsxs(te,{tooltip:j?void 0:"Browse agents",className:D(y),onClick:()=>{de("agent_browser_opened",{surface:"mobile_drawer"}),h(!0)},children:[s.jsx(Le,{}),s.jsx("span",{children:"New agent"})]}))}),s.jsx(es,{open:f,onOpenChange:h,direction:"bottom",children:s.jsxs(ts,{className:"max-h-[85dvh] p-0",children:[s.jsx(ss,{className:"sr-only",children:"Browse agents"}),z]})})]}):s.jsxs(Qe,{open:f,onOpenChange:F=>{F&&!f&&de("agent_browser_opened",{surface:"desktop_popover"}),h(F)},children:[i?s.jsx(Ee,{asChild:!0,children:i}):c?w(s.jsx(Ee,{asChild:!0,children:s.jsx(je,{"aria-label":"Browse agents",className:D(y),children:s.jsx(Le,{className:"size-4"})})})):s.jsx(X,{children:w(s.jsx(Ee,{asChild:!0,children:s.jsxs(te,{tooltip:j?void 0:"Browse agents",className:D(y),children:[s.jsx(Le,{}),s.jsx("span",{children:"New agent"})]})}))}),s.jsx(Je,{className:"w-[380px] p-0 overflow-hidden",side:d,align:u,children:z})]}),e[15]=u,e[16]=c,e[17]=y,e[18]=j,e[19]=p,e[20]=f,e[21]=z,e[22]=d,e[23]=i,e[24]=w,e[25]=_):_=e[25];let I;e[26]!==x?(I=s.jsx(ji,{open:x,onOpenChange:b,mode:"agent"}),e[26]=x,e[27]=I):I=e[27];let O;return e[28]!==I||e[29]!==_?(O=s.jsxs(s.Fragment,{children:[_,I]}),e[28]=I,e[29]=_,e[30]=O):O=e[30],O}const Gl="wco-no-drag inline-flex items-center gap-1.5 min-w-0 rounded-md px-2 py-1.5 text-sm text-foreground hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50";function Ul(t){const e=$.c(19),{agentId:n,fallback:l,onOpenHome:i,onPick:r}=t,o=jt(n)??l??null,a=o?.title??"Super Agent",m=`Open ${a} home`,c=o?.icon??null;let d;e[0]!==c||e[1]!==a?(d=s.jsx(ve,{icon:c,name:a,size:"xs"}),e[0]=c,e[1]=a,e[2]=d):d=e[2];let u;e[3]!==i||e[4]!==m||e[5]!==d?(u=s.jsx("button",{type:"button",onClick:i,"aria-label":m,className:"wco-no-drag flex items-center shrink-0 rounded-md p-1 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:d}),e[3]=i,e[4]=m,e[5]=d,e[6]=u):u=e[6];let f;e[7]!==a?(f=s.jsx("span",{className:"truncate font-medium max-w-[10rem]",children:a}),e[7]=a,e[8]=f):f=e[8];let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(St,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[9]=h):h=e[9];let x;e[10]!==f?(x=s.jsxs("button",{type:"button",className:Gl,children:[f,h]}),e[10]=f,e[11]=x):x=e[11];let b;e[12]!==n||e[13]!==r||e[14]!==x?(b=s.jsx(Hl,{side:"bottom",align:"start",selectedAgentId:n,onSelectAgent:r,trigger:x}),e[12]=n,e[13]=r,e[14]=x,e[15]=b):b=e[15];let p;return e[16]!==u||e[17]!==b?(p=s.jsxs("div",{className:"flex items-center gap-1",children:[u,b]}),e[16]=u,e[17]=b,e[18]=p):p=e[18],p}function Xt(){const t=$.c(44),{org:e}=oe(),{state:n,isMobile:l}=ge(),i=pe();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[0]=r):r=t[0];const o=ft(r);let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},t[1]=a):a=t[1];const m=ht(a),{threads:c}=vt(),{data:d}=re.useSession(),{setTaskId:u,createNewTask:f}=yt(),h=_s().invitations.length>0,x=n==="collapsed"||l;let b;t[2]!==e.id?(b=Xe(e.id),t[2]=e.id,t[3]=b):b=t[3];const p=b,g=p.id,j=o.taskId?m.virtualmcpid??g:g;let y;t[4]!==f||t[5]!==g||t[6]!==i||t[7]!==e.slug||t[8]!==d?.user?.id||t[9]!==u||t[10]!==c?(y=M=>{if(!M||M===g){i({to:"/$org",params:{org:e.slug}});return}const H=yi(c,M,d?.user?.id);H?u(H.id,M):f(M)},t[4]=f,t[5]=g,t[6]=i,t[7]=e.slug,t[8]=d?.user?.id,t[9]=u,t[10]=c,t[11]=y):y=t[11];const v=y,w=h?`${e.name} — switch organization (pending invitation)`:`${e.name} — switch organization`;let C;t[12]!==e?(C=s.jsx(_t,{org:e,size:"sm"}),t[12]=e,t[13]=C):C=t[13];let N;t[14]!==h||t[15]!==x?(N=h&&s.jsx("span",{className:D("absolute -right-1 size-2.5 rounded-full bg-destructive ring-2 ring-background",x?"-top-1":"top-1/2 -translate-y-1/2")}),t[14]=h,t[15]=x,t[16]=N):N=t[16];let S;t[17]!==C||t[18]!==N?(S=s.jsxs("span",{className:"relative inline-flex",children:[C,N]}),t[17]=C,t[18]=N,t[19]=S):S=t[19];let A;t[20]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(St,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),t[20]=A):A=t[20];let k;t[21]!==w||t[22]!==S?(k=s.jsx(ue,{asChild:!0,children:s.jsxs("button",{type:"button","aria-label":w,className:"wco-no-drag flex items-center gap-1.5 shrink-0 rounded-md pl-3 pr-1.5 py-1.5 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:[S,A]})}),t[21]=w,t[22]=S,t[23]=k):k=t[23];let z;t[24]!==e.slug||t[25]!==k?(z=s.jsx(zl,{orgParam:e.slug,trigger:k}),t[24]=e.slug,t[25]=k,t[26]=z):z=t[26];let _;t[27]!==e.name?(_=s.jsx(fe,{side:"bottom",children:e.name}),t[27]=e.name,t[28]=_):_=t[28];let I;t[29]!==z||t[30]!==_?(I=s.jsx($t,{children:s.jsxs(he,{children:[z,_]})}),t[29]=z,t[30]=_,t[31]=I):I=t[31];let O;t[32]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx("span",{className:"h-5 w-24 rounded bg-muted animate-pulse"}),t[32]=O):O=t[32];const F=j===g?p:void 0;let E;t[33]!==j||t[34]!==v?(E=()=>v(j),t[33]=j,t[34]=v,t[35]=E):E=t[35];let P;t[36]!==j||t[37]!==v||t[38]!==F||t[39]!==E?(P=s.jsx($t,{children:s.jsx(R.Suspense,{fallback:O,children:s.jsx(Ul,{agentId:j,fallback:F,onOpenHome:E,onPick:v})})}),t[36]=j,t[37]=v,t[38]=F,t[39]=E,t[40]=P):P=t[40];let L;return t[41]!==I||t[42]!==P?(L=s.jsx(ti,{className:"wco-no-drag",children:s.jsxs(si,{className:"flex-nowrap gap-1.5 sm:gap-1.5",children:[I,P]})}),t[41]=I,t[42]=P,t[43]=L):L=t[43],L}const Wl="sidebar.open";function ql(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Ks,{}),t[0]=e):e=t[0],e}function oa(){const t=$.c(27),e=gt(),n=Si(),[l,i]=Ye(Wl,!1),{width:r,wrapperRef:o,onStartResize:a,resetWidth:m}=wi();let c;t[0]!==e||t[1]!==n?(c=e?s.jsxs(ee.Header,{className:"grid-cols-1 px-1 pr-1",children:[s.jsxs("div",{className:"grid w-full grid-cols-[auto_auto_auto_1fr_auto_auto] items-center gap-2",children:[!n&&s.jsx(as,{}),!n&&s.jsx(Xt,{}),!n&&s.jsx(mt,{}),s.jsx("div",{"aria-hidden":!0,className:"min-w-0"}),s.jsx(ee.TogglesSlot,{}),!n&&s.jsx(ee.TabsSlot,{className:"min-w-0 justify-self-end"})]}),!n&&s.jsx(ee.CenterSlot,{}),!n&&s.jsx(ee.RightSlot,{})]}):s.jsxs(ee.Header,{children:[s.jsxs(ee.LeftColumn,{children:[!n&&s.jsx(Xt,{}),s.jsx(ee.TogglesSlot,{})]}),n?s.jsx("div",{"aria-hidden":!0}):s.jsx(ee.CenterSlot,{}),s.jsx(ee.RightColumn,{children:!n&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"min-w-0 flex-1 overflow-x-auto [scrollbar-width:none] flex justify-end items-center gap-0.5",children:s.jsx(ee.TabsSlot,{})}),s.jsx(ee.RightSlot,{})]})})]}),t[0]=e,t[1]=n,t[2]=c):c=t[2];const d=`${r}px`;let u;t[3]!==d?(u={"--sidebar-width":d,"--sidebar-width-icon":"3.5rem"},t[3]=d,t[4]=u):u=t[4];const f=u;let h;t[5]!==e||t[6]!==a||t[7]!==n||t[8]!==m?(h=!e&&!n&&s.jsxs(s.Fragment,{children:[s.jsx(yl,{}),s.jsx(Ni,{onPointerDown:a,onDoubleClick:m})]}),t[5]=e,t[6]=a,t[7]=n,t[8]=m,t[9]=h):h=t[9];let x;t[10]===Symbol.for("react.memo_cache_sentinel")?(x={background:"transparent",containerType:"inline-size"},t[10]=x):x=t[10];let b;t[11]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Ys,{className:"flex flex-col",style:x,children:s.jsx("div",{className:"flex flex-col h-full min-h-0",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s.jsx(R.Suspense,{fallback:s.jsx(ql,{}),children:s.jsx(qs,{})})})})}),t[11]=b):b=t[11];let p;t[12]!==f||t[13]!==h||t[14]!==o?(p=s.jsxs(Qs,{ref:o,className:"flex-1 bg-sidebar relative min-h-0",style:f,children:[h,b]}),t[12]=f,t[13]=h,t[14]=o,t[15]=p):p=t[15];let g;t[16]!==e||t[17]!==n?(g=e&&!n&&s.jsx(Hn,{renderSidebar:Kl}),t[16]=e,t[17]=n,t[18]=g):g=t[18];let j;t[19]!==c||t[20]!==p||t[21]!==g?(j=s.jsx(ei,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[c,p,g]})}),t[19]=c,t[20]=p,t[21]=g,t[22]=j):j=t[22];let y;return t[23]!==i||t[24]!==l||t[25]!==j?(y=s.jsx(zn,{children:s.jsx(ee.Provider,{children:s.jsx(Js,{open:l,onOpenChange:i,children:j})})}),t[23]=i,t[24]=l,t[25]=j,t[26]=y):y=t[26],y}function Kl(t){const{onClose:e}=t;return s.jsx("div",{className:"flex h-full",children:s.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:s.jsx(Sl,{onClose:e})})})}export{oa as default};
1
+ import{c as $,j as s,_ as Ye,r as R,l as D,R as de,$ as As,a0 as Is,a as re,a1 as oe,b as pe,a2 as zs,a3 as $s,t as ie,a4 as Ts,a5 as Ms,K as Os,m as Ps,a6 as Ds,i as Vt,e as ft,u as ht,U as Yt,H as Fs,I as Es,J as Ls,M as Rs,d as Bs,B as rt,a7 as Hs,W as Gs,X as Us,L as Ws,O as qs,a8 as Ks}from"./index-DMCDP9dR.js";import{u as ge,S as xt,a as pt,b as me,c as te,d as X,e as Qt,f as Jt,g as Xs,h as Vs,i as ot,j as Ys,k as Qs,l as Js}from"./sidebar-CQ6X6EgL.js";import{u as gt}from"./use-mobile-8PCzv3Mi.js";import{S as le}from"./skeleton-B1SkUhzL.js";import{i as Zt}from"./LayoutLeft-CvxAKnEI.js";import{T as je}from"./toolbar-icon-button-DV30tB3z.js";import{P as Qe,a as Ee,b as Je}from"./popover-DScORrBz.js";import{D as es,a as ts,b as ss}from"./drawer-CsLvjAFm.js";import{A as Ke}from"./avatar-7MpZ9q34.js";import{a as ue,b as fe,c as at,T as he}from"./tooltip-C-Fdi799.js";import{a as Ct}from"./Copy01-I5E-L-KP.js";import{n as Zs,i as en}from"./Globe01-D8Lfegq4.js";import{i as tn}from"./ZoomOut-BmpdGZEc.js";import{i as wt,a as sn}from"./ZapSquare-DM6ZWSzD.js";import{i as ct}from"./Monitor01-CadwJLnk.js";import{n as nn,a as ln}from"./Sun-icg_V74A.js";import{a as bt}from"./Settings02-Ddh7L72a.js";import{i as rn}from"./Shield01-CoyB298o.js";import{b as kt,c as At,d as on,e as an,f as cn,A as ve,g as It,i as dn,s as mn,h as un}from"./agent-icon-DiJCyVK_.js";import{a as fn}from"./Users03-BubKtGEN.js";import{u as hn}from"./use-deployment-admin-DOqhSJ2E.js";import"./index-_JTFwd45.js";import{I as xn}from"./invite-member-dialog-DXZ80KCM.js";import{u as pn,A as gn,g as bn,a as jn,b as ns}from"./agent-capabilities-DlIlOn9g.js";import{u as vn,v as yn,C as zt}from"./connect-desktop-dialog-CttYQBP_.js";import{i as Sn}from"./FilterLines-Dabon75B.js";import{T as Nn,a as _n}from"./toggle-group-f2RgMq4W.js";import{u as Cn}from"./use-mcp-client-xyqZgz7w.js";import{S as wn,a as Xe,i as kn,b as An}from"./constants-B72Xmt_K.js";import{u as jt,a as is}from"./use-virtual-mcp-DNIEk3-8.js";import{u as In,a as vt,b as ls,T as zn}from"./hooks-6n_u4oV8.js";import{u as yt,r as $n}from"./shell-layout-CKAEuy11.js";import{D as Tn,a as Mn,f as On,d as Pn,e as Dn}from"./dialog-DkT4Ri5Y.js";import{C as Fn,a as En,b as Ln,c as Rn,d as Bn}from"./command-U4hp1Sg9.js";import{u as rs}from"./studio-tools-O1wqkKr7.js";import{i as os}from"./Zap-DptPhcrr.js";import{S as as,M as Hn}from"./shell-controls-CPfTsUc0.js";import{n as Gn}from"./Stars02-D3yMrrs0.js";import{g as Un,u as Wn,S as qn}from"./use-clock-tick-r41I52rR.js";import{a as Kn}from"./format-time-BnbuEtat.js";import{t as St}from"./ChevronDown-BfG3lHhC.js";import{i as Xn}from"./ChevronRight-Dqs4UYfi.js";import{S as cs,u as Vn,g as Yn,a as Qn,b as Jn}from"./use-navigate-to-agent-DFHenM1Y.js";import{S as Zn,C as ei}from"./chat-context-Bcthg0Rk.js";import{B as $t,a as ti,b as si}from"./breadcrumb-Chp_BCp3.js";import{i as ds}from"./Check-C_CIFiKi.js";import{s as Le}from"./Plus-D63gaaHA.js";import{i as ms}from"./SearchMd-evNv9trP.js";import{s as ni}from"./XClose-B9_O9ZwX.js";import{A as ii,a as li,b as ri,c as oi,d as ai,e as ci,f as di}from"./alert-dialog-Bb_E0Ib3.js";import{F as mi,a as ui,b as fi,c as hi,d as xi,f as pi,e as gi}from"./form-DaFgzcD-.js";import{I as bi}from"./input-Bv-zBVyU.js";import{G as ji,a as vi}from"./github-repo-picker-DNxMMrPO.js";import{f as yi}from"./reusable-new-chat-CouMjkYR.js";import{T as ee}from"./toolbar-CnGwQIGK.js";import{u as Si}from"./use-organization-settings-DTNEfKpa.js";import"./X-DNthiYnC.js";import"./User01-2BQwgTbP.js";import"./AlertCircle-B53JhFAu.js";import"./Tool01-FgDVN5Aa.js";import"./ArrowUp-BRSr5Hko.js";import"./XCircle-CowkXBTi.js";import"./ArrowUpRight-H0WTVT37.js";import"./Loading02-CQnI4ICL.js";import"./CheckCircle-BHN-wFbK.js";import"./ChevronUp-D1yQd_10.js";import"./Circle-BMe_lNRs.js";import"./DotsVertical-DCj3Pe-o.js";import"./Eye-Fa6zzcvh.js";import"./Star01-D1xnxtGT.js";import"./Globe04-BKaoGJE9.js";import"./SwitchHorizontal01-DDDazbVr.js";import"./HardDrive-CmlVCNCP.js";import"./Key01-BlVS9wch.js";import"./LinkExternal01-3dZq5bY0.js";import"./List-DoWo7FQN.js";import"./Palette-BJcNGJoP.js";import"./Play-CgD79iZg.js";import"./SearchLg-MLCu3K6z.js";import"./Stars01-IimVOfNw.js";import"./Trash01-Cf4xz_lu.js";import"./Upload01-DqR1L_zb.js";import"./Users01-CHhUYr_-.js";import"./select-DX7cJPSR.js";import"./textarea-D5bA0vwh.js";import"./use-org-auth-client-Dapr-HwO.js";import"./use-organization-roles-Bf_z3Rj3.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-zsKQnX7M.js";import"./use-registry-connections-B9ry2u5e.js";import"./use-connection-C9S1yRy-.js";import"./use-collections-B4CZte7v.js";import"./useInfiniteQuery-KvXcQTyz.js";import"./use-infinite-scroll-C10ycd3E.js";import"./extract-connection-data-iRkA6j8O.js";import"./card-CuLmtjkK.js";import"./integration-icon-DQZa3sYE.js";import"./collection-search-COWX-zrS.js";import"./collection-tabs-CJs3t0kZ.js";import"./badge-DK3Lxhxf.js";import"./connection-form-helpers-BBQix76t.js";import"./authenticate-and-persist-oauth-uQHwVym9.js";import"./mcp-oauth-C_medu58.js";import"./auth-X2zOoLs3.js";import"./useSuspenseInfiniteQuery-CNDc5W3G.js";import"./use-ai-providers-DnQtGTlK.js";import"./decopilot-sse-pool-Bp3qtF_q.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./required-auth-layout-BllY9X0X.js";import"./autosend-hpJ3sd0t.js";import"./tab-id-bb-jjgGv.js";import"./use-org-sso-Bi4sTov0.js";import"./index-D85wAsnN.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-decopilot-events-X4WShNfU.js";import"./label-o5nMOYcO.js";import"./use-debounced-value-D5S2o6mL.js";import"./use-mcp-tools-BY1xI7T1.js";import"./github-installations-D2vHSx02.js";function Ni(t){const e=$.c(5),{onPointerDown:n,onDoubleClick:l}=t,{state:i,isMobile:r}=ge();if(r||i==="collapsed")return null;let o,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={left:"var(--sidebar-width)"},a=s.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"}),e[0]=o,e[1]=a):(o=e[0],a=e[1]);let m;return e[2]!==l||e[3]!==n?(m=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar",title:"Drag to resize, double-click to reset",onPointerDown:n,onDoubleClick:l,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:o,children:a}),e[2]=l,e[3]=n,e[4]=m):m=e[4],m}const Nt=240,_i=400,Ci="sidebar.width";function Re(t){return Math.max(Nt,Math.min(_i,t))}function wi(){const t=$.c(11),[e,n]=Ye(Ci,ki),l=R.useRef(null);let i;t[0]!==n||t[1]!==e?(i=d=>{d.preventDefault();const u=d.clientX,f=Re(e),h=l.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),x=h?Array.from(h.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const g of x)g.style.transition="none";const b=g=>{const j=Re(f+(g.clientX-u));h?.style.setProperty("--sidebar-width",`${j}px`)},p=g=>{const j=Re(f+(g.clientX-u));n(j);for(const y of x)y.style.transition="";window.removeEventListener("pointermove",b),window.removeEventListener("pointerup",p),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",b),window.addEventListener("pointerup",p)},t[0]=n,t[1]=e,t[2]=i):i=t[2];const r=i;let o;t[3]!==n?(o=()=>{n(Nt)},t[3]=n,t[4]=o):o=t[4];const a=o;let m;t[5]!==e?(m=Re(e),t[5]=e,t[6]=m):m=t[6];let c;return t[7]!==r||t[8]!==a||t[9]!==m?(c={width:m,wrapperRef:l,onStartResize:r,resetWidth:a},t[7]=r,t[8]=a,t[9]=m,t[10]=c):c=t[10],c}function ki(t){return typeof t=="number"?Re(t):Nt}function us(){return[]}function fs(t){const e=$.c(3),{children:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex h-6 items-center",children:s.jsx("div",{className:"h-0.5 w-16 rounded-full bg-sidebar-foreground/15"})}),e[0]=l):l=e[0];let i;return e[1]!==n?(i=s.jsxs(xt,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[l,s.jsx(pt,{children:s.jsx(me,{className:"gap-0.5",children:n})})]}),e[1]=n,e[2]=i):i=e[2],i}function hs(t){const e=$.c(18),{item:n}=t,{isMobile:l,setOpenMobile:i}=ge();let r;e[0]!==l||e[1]!==n||e[2]!==i?(r=()=>{de("nav_item_clicked",{nav_key:n.key,nav_label:n.label,is_active:!!n.isActive,is_mobile:l}),n.onClick?.(),l&&i(!1)},e[0]=l,e[1]=n,e[2]=i,e[3]=r):r=e[3];const o=r,a=n.key,m=n.isActive&&"z-10";let c;e[4]!==m?(c=D(m),e[4]=m,e[5]=c):c=e[5];let d;e[6]!==n.label?(d=s.jsx("span",{children:n.label}),e[6]=n.label,e[7]=d):d=e[7];let u;e[8]!==o||e[9]!==n.icon||e[10]!==n.isActive||e[11]!==n.label||e[12]!==d?(u=s.jsxs(te,{onClick:o,isActive:n.isActive,tooltip:n.label,children:[n.icon,d]}),e[8]=o,e[9]=n.icon,e[10]=n.isActive,e[11]=n.label,e[12]=d,e[13]=u):u=e[13];let f;return e[14]!==n.key||e[15]!==c||e[16]!==u?(f=s.jsx(X,{className:c,children:u},a),e[14]=n.key,e[15]=c,e[16]=u,e[17]=f):f=e[17],f}function Ai(t){const e=$.c(12),{section:n}=t;switch(n.type){case"divider":{let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Qt,{className:"my-2"}),e[0]=l):l=e[0],l}case"spacer":{let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1"}),e[1]=l):l=e[1],l}case"group":{const l=n.group.label,i=n.group.defaultExpanded;let r;e[2]!==n.group.items?(r=n.group.items.map(zi),e[2]=n.group.items,e[3]=r):r=e[3];let o;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==r?(o=s.jsx(fs,{label:l,defaultExpanded:i,children:r}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=r,e[7]=o):o=e[7],o}case"items":{let l;e[8]!==n.items?(l=n.items.map(Ii),e[8]=n.items,e[9]=l):l=e[9];let i;return e[10]!==l?(i=s.jsx(xt,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(pt,{children:s.jsx(me,{className:"gap-1.5",children:l})})}),e[10]=l,e[11]=i):i=e[11],i}case"custom":return n.content}}function Ii(t){return s.jsx(hs,{item:t},t.key)}function zi(t){return s.jsx(hs,{item:t},t.key)}function $i(t){const e=$.c(14),{sections:n,footer:l,additionalContent:i,variant:r,contentClassName:o}=t,a=r===void 0?"sidebar":r;let m;e[0]!==o?(m=D("flex flex-col flex-1 px-2 pb-2 gap-0.5",o),e[0]=o,e[1]=m):m=e[1];let c;e[2]!==n?(c=n.map(Ti),e[2]=n,e[3]=c):c=e[3];let d;e[4]!==i?(d=i&&s.jsx("div",{className:"flex flex-col flex-1 min-h-0 group-data-[state=collapsed]/sidebar:mt-1 group-data-[state=expanded]/sidebar:mt-2",children:i}),e[4]=i,e[5]=d):d=e[5];let u;e[6]!==m||e[7]!==c||e[8]!==d?(u=s.jsxs(Jt,{className:m,children:[c,d]}),e[6]=m,e[7]=c,e[8]=d,e[9]=u):u=e[9];let f;return e[10]!==l||e[11]!==u||e[12]!==a?(f=s.jsxs(Xs,{variant:a,children:[u,l]}),e[10]=l,e[11]=u,e[12]=a,e[13]=f):f=e[13],f}function Ti(t,e){return s.jsx(Ai,{section:t},e)}function xs(t){const e=$.c(2);let n;return e[0]!==t?(n=s.jsx($i,{...t}),e[0]=t,e[1]=n):n=e[1],n}xs.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,n)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(le,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};function Mi(t){const e=$.c(16),{onToggle:n,className:l}=t,r=As().logo??Is,o=typeof r=="string"?r:r.light,a=typeof r=="string"?r:r.dark;let m;e[0]!==l?(m=D("flex flex-row items-center gap-2 md:gap-0.5 shrink-0 h-12 pl-1 pr-2 pt-0.25 pb-0","group-data-[collapsible=icon]/sidebar:hidden",l),e[0]=l,e[1]=m):m=e[1];let c;e[2]!==o?(c=s.jsx("img",{src:o,alt:"Logo",className:"size-6 object-contain dark:hidden"}),e[2]=o,e[3]=c):c=e[3];let d;e[4]!==a?(d=s.jsx("img",{src:a,alt:"Logo",className:"size-6 object-contain hidden dark:block"}),e[4]=a,e[5]=d):d=e[5];let u;e[6]!==c||e[7]!==d?(u=s.jsx("span",{className:"flex items-center shrink-0 pl-1",children:s.jsxs("span",{className:"flex items-center shrink-0 px-2",children:[c,d]})}),e[6]=c,e[7]=d,e[8]=u):u=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Zt,{size:16}),e[9]=f):f=e[9];let h;e[10]!==n?(h=s.jsx(je,{onClick:n,"aria-label":"Toggle sidebar",children:f}),e[10]=n,e[11]=h):h=e[11];let x;return e[12]!==m||e[13]!==u||e[14]!==h?(x=s.jsxs(Vs,{className:m,children:[u,h]}),e[12]=m,e[13]=u,e[14]=h,e[15]=x):x=e[15],x}function Tt(t){const e=$.c(18),{item:n,onClose:l}=t,i=n.isActive&&"z-10";let r;e[0]!==i?(r=D(i),e[0]=i,e[1]=r):r=e[1];let o;e[2]!==n||e[3]!==l?(o=()=>{n.onClick?.(),l()},e[2]=n,e[3]=l,e[4]=o):o=e[4];let a;e[5]!==n.icon?(a=s.jsx("span",{className:"[&>svg]:size-5 shrink-0",children:n.icon}),e[5]=n.icon,e[6]=a):a=e[6];let m;e[7]!==n.label?(m=s.jsx("span",{children:n.label}),e[7]=n.label,e[8]=m):m=e[8];let c;e[9]!==n.isActive||e[10]!==n.label||e[11]!==o||e[12]!==a||e[13]!==m?(c=s.jsxs(te,{onClick:o,isActive:n.isActive,tooltip:n.label,className:"h-10! text-sm!",children:[a,m]}),e[9]=n.isActive,e[10]=n.label,e[11]=o,e[12]=a,e[13]=m,e[14]=c):c=e[14];let d;return e[15]!==r||e[16]!==c?(d=s.jsx(X,{className:r,children:c}),e[15]=r,e[16]=c,e[17]=d):d=e[17],d}function Oi(t){const e=$.c(18),{section:n,onClose:l}=t;switch(n.type){case"divider":{let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Qt,{className:"my-2"}),e[0]=i):i=e[0],i}case"spacer":{let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex-1"}),e[1]=i):i=e[1],i}case"group":{const i=n.group.label,r=n.group.defaultExpanded;let o;if(e[2]!==l||e[3]!==n.group.items){let m;e[5]!==l?(m=c=>s.jsx(Tt,{item:c,onClose:l},c.key),e[5]=l,e[6]=m):m=e[6],o=n.group.items.map(m),e[2]=l,e[3]=n.group.items,e[4]=o}else o=e[4];let a;return e[7]!==n.group.defaultExpanded||e[8]!==n.group.label||e[9]!==o?(a=s.jsx(fs,{label:i,defaultExpanded:r,children:o}),e[7]=n.group.defaultExpanded,e[8]=n.group.label,e[9]=o,e[10]=a):a=e[10],a}case"items":{let i;if(e[11]!==l||e[12]!==n.items){let o;e[14]!==l?(o=a=>s.jsx(Tt,{item:a,onClose:l},a.key),e[14]=l,e[15]=o):o=e[15],i=n.items.map(o),e[11]=l,e[12]=n.items,e[13]=i}else i=e[13];let r;return e[16]!==i?(r=s.jsx(xt,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(pt,{children:s.jsx(me,{className:"gap-1.5",children:i})})}),e[16]=i,e[17]=r):r=e[17],r}case"custom":return n.content}}function Pi(t){const e=$.c(17),{sections:n,onClose:l,footer:i,additionalContent:r}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"h-12 shrink-0"}),e[0]=o):o=e[0];let a;e[1]!==l?(a=s.jsx(R.Suspense,{fallback:o,children:s.jsx(Mi,{onToggle:l})}),e[1]=l,e[2]=a):a=e[2];let m;if(e[3]!==l||e[4]!==n){let f;e[6]!==l?(f=(h,x)=>s.jsx(Oi,{section:h,onClose:l},x),e[6]=l,e[7]=f):f=e[7],m=n.map(f),e[3]=l,e[4]=n,e[5]=m}else m=e[5];let c;e[8]!==r?(c=r&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:r}),e[8]=r,e[9]=c):c=e[9];let d;e[10]!==m||e[11]!==c?(d=s.jsxs(Jt,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[m,c]}),e[10]=m,e[11]=c,e[12]=d):d=e[12];let u;return e[13]!==i||e[14]!==a||e[15]!==d?(u=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[a,d,i]}),e[13]=i,e[14]=a,e[15]=d,e[16]=u):u=e[16],u}function Fe(t){const e=$.c(26),{item:n,onClose:l}=t;let i;e[0]!==n.className?(i=D("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",n.className),e[0]=n.className,e[1]=i):i=e[1];const r=i;if(n.href){const d=n.external?"_blank":void 0,u=n.external?"noopener noreferrer":void 0;let f;e[2]!==n.icon?(f=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[2]=n.icon,e[3]=f):f=e[3];let h;e[4]!==n.label?(h=s.jsx("span",{className:"flex-1",children:n.label}),e[4]=n.label,e[5]=h):h=e[5];let x;return e[6]!==r||e[7]!==n.href||e[8]!==l||e[9]!==d||e[10]!==u||e[11]!==f||e[12]!==h?(x=s.jsxs("a",{href:n.href,target:d,rel:u,className:r,onClick:l,children:[f,h]}),e[6]=r,e[7]=n.href,e[8]=l,e[9]=d,e[10]=u,e[11]=f,e[12]=h,e[13]=x):x=e[13],x}let o;e[14]!==n||e[15]!==l?(o=()=>{n.onClick?.(),l()},e[14]=n,e[15]=l,e[16]=o):o=e[16];let a;e[17]!==n.icon?(a=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[17]=n.icon,e[18]=a):a=e[18];let m;e[19]!==n.label?(m=s.jsx("span",{className:"flex-1",children:n.label}),e[19]=n.label,e[20]=m):m=e[20];let c;return e[21]!==r||e[22]!==o||e[23]!==a||e[24]!==m?(c=s.jsxs("button",{type:"button",onClick:o,className:r,children:[a,m]}),e[21]=r,e[22]=o,e[23]=a,e[24]=m,e[25]=c):c=e[25],c}function Mt(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("span",{className:"shrink-0 inline-flex items-center rounded-full bg-amber-100 dark:bg-amber-500/20 px-2 py-0.5 text-[10px] font-medium text-amber-700 dark:text-amber-400",children:"Impersonating"}),t[0]=e):e=t[0],e}function Ot(t){const e=$.c(144),{user:n,userImage:l,menuItems:i,signOutItem:r,stopImpersonatingItem:o,isImpersonating:a,themeOptions:m,preferences:c,setPreferences:d,close:u,isMobile:f}=t;if(f){const V=n?.name??"U";let J;e[0]!==V||e[1]!==l?(J=s.jsx(Ke,{url:l,fallback:V,shape:"circle",size:"sm",className:"shrink-0"}),e[0]=V,e[1]=l,e[2]=J):J=e[2];const xe=n?.name??"User";let Z;e[3]!==xe?(Z=s.jsx("p",{className:"text-sm font-medium truncate",children:xe}),e[3]=xe,e[4]=Z):Z=e[4];let ne;e[5]!==a?(ne=a&&s.jsx(Mt,{}),e[5]=a,e[6]=ne):ne=e[6];let se;e[7]!==Z||e[8]!==ne?(se=s.jsxs("div",{className:"flex items-center gap-2",children:[Z,ne]}),e[7]=Z,e[8]=ne,e[9]=se):se=e[9];const T=n?.email;let G;e[10]!==T?(G=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:T}),e[10]=T,e[11]=G):G=e[11];let Y;e[12]!==se||e[13]!==G?(Y=s.jsxs("div",{className:"flex-1 min-w-0",children:[se,G]}),e[12]=se,e[13]=G,e[14]=Y):Y=e[14];let K;e[15]!==n?(K=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(Li)},e[15]=n,e[16]=K):K=e[16];let be;e[17]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(Ct,{size:14}),e[17]=be):be=e[17];let Se;e[18]!==K?(Se=s.jsx(ue,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:K,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:be})}),e[18]=K,e[19]=Se):Se=e[19];let Be;e[20]===Symbol.for("react.memo_cache_sentinel")?(Be=s.jsx(fe,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[20]=Be):Be=e[20];let Ne;e[21]!==Se?(Ne=s.jsx(at,{delayDuration:300,children:s.jsxs(he,{children:[Se,Be]})}),e[21]=Se,e[22]=Ne):Ne=e[22];let _e;e[23]!==Ne||e[24]!==J||e[25]!==Y?(_e=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-4 border-b border-border",children:[J,Y,Ne]}),e[23]=Ne,e[24]=J,e[25]=Y,e[26]=_e):_e=e[26];let Ce;if(e[27]!==u||e[28]!==i){let ce;e[30]!==u?(ce=Ue=>s.jsx(Fe,{item:Ue,onClose:u},Ue.key),e[30]=u,e[31]=ce):ce=e[31],Ce=i.map(ce),e[27]=u,e[28]=i,e[29]=Ce}else Ce=e[29];let we;e[32]!==u||e[33]!==o?(we=o&&s.jsx(Fe,{item:o,onClose:u}),e[32]=u,e[33]=o,e[34]=we):we=e[34];let ke;e[35]!==u||e[36]!==r?(ke=s.jsx(Fe,{item:r,onClose:u}),e[35]=u,e[36]=r,e[37]=ke):ke=e[37];let Ae;e[38]!==Ce||e[39]!==we||e[40]!==ke?(Ae=s.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:s.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[Ce,we,ke]})}),e[38]=Ce,e[39]=we,e[40]=ke,e[41]=Ae):Ae=e[41];let Ie;if(e[42]!==c.theme||e[43]!==d||e[44]!==m){let ce;e[46]!==c.theme||e[47]!==d?(ce=Ue=>{const{value:st,icon:Cs,label:ws}=Ue;return s.jsx("button",{type:"button","aria-label":ws,onClick:()=>d(ks=>({...ks,theme:st})),className:D("size-8 rounded-md flex items-center justify-center transition-colors",c.theme===st?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:Cs},st)},e[46]=c.theme,e[47]=d,e[48]=ce):ce=e[48],Ie=m.map(ce),e[42]=c.theme,e[43]=d,e[44]=m,e[45]=Ie}else Ie=e[45];let ze;e[49]!==Ie?(ze=s.jsx("div",{className:"flex items-center gap-0.5",children:Ie}),e[49]=Ie,e[50]=ze):ze=e[50];const et=c.enableSounds?"Disable sounds":"Enable sounds";let $e;e[51]!==d?($e=()=>d(Ei),e[51]=d,e[52]=$e):$e=e[52];const tt=c.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let Te;e[53]!==tt?(Te=D("size-8 rounded-md flex items-center justify-center transition-colors",tt),e[53]=tt,e[54]=Te):Te=e[54];let Me;e[55]!==c.enableSounds?(Me=c.enableSounds?s.jsx(kt,{size:14}):s.jsx(At,{size:14}),e[55]=c.enableSounds,e[56]=Me):Me=e[56];let Oe;e[57]!==et||e[58]!==$e||e[59]!==Te||e[60]!==Me?(Oe=s.jsx("button",{type:"button","aria-label":et,onClick:$e,className:Te,children:Me}),e[57]=et,e[58]=$e,e[59]=Te,e[60]=Me,e[61]=Oe):Oe=e[61];let He;e[62]===Symbol.for("react.memo_cache_sentinel")?(He=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.52.3"]}),e[62]=He):He=e[62];let Pe;e[63]!==Oe?(Pe=s.jsxs("div",{className:"flex items-center gap-2",children:[Oe,He]}),e[63]=Oe,e[64]=Pe):Pe=e[64];let De;e[65]!==ze||e[66]!==Pe?(De=s.jsxs("div",{className:"flex items-center justify-between px-3 py-3 border-t border-border/50",children:[ze,Pe]}),e[65]=ze,e[66]=Pe,e[67]=De):De=e[67];let Ge;return e[68]!==_e||e[69]!==Ae||e[70]!==De?(Ge=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[_e,Ae,De]}),e[68]=_e,e[69]=Ae,e[70]=De,e[71]=Ge):Ge=e[71],Ge}const h=n?.name??"U";let x;e[72]!==h||e[73]!==l?(x=s.jsx(Ke,{url:l,fallback:h,shape:"circle",size:"sm",className:"shrink-0"}),e[72]=h,e[73]=l,e[74]=x):x=e[74];const b=n?.name??"User";let p;e[75]!==b?(p=s.jsx("p",{className:"text-sm font-medium truncate",children:b}),e[75]=b,e[76]=p):p=e[76];let g;e[77]!==a?(g=a&&s.jsx(Mt,{}),e[77]=a,e[78]=g):g=e[78];let j;e[79]!==p||e[80]!==g?(j=s.jsxs("div",{className:"flex items-center gap-2",children:[p,g]}),e[79]=p,e[80]=g,e[81]=j):j=e[81];const y=n?.email;let v;e[82]!==y?(v=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:y}),e[82]=y,e[83]=v):v=e[83];let w;e[84]!==j||e[85]!==v?(w=s.jsxs("div",{className:"flex-1 min-w-0",children:[j,v]}),e[84]=j,e[85]=v,e[86]=w):w=e[86];let C;e[87]!==n?(C=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(Fi)},e[87]=n,e[88]=C):C=e[88];let N;e[89]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Ct,{size:14}),e[89]=N):N=e[89];let S;e[90]!==C?(S=s.jsx(ue,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:C,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:N})}),e[90]=C,e[91]=S):S=e[91];let A;e[92]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(fe,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[92]=A):A=e[92];let k;e[93]!==S?(k=s.jsx(at,{delayDuration:300,children:s.jsxs(he,{children:[S,A]})}),e[93]=S,e[94]=k):k=e[94];let z;e[95]!==k||e[96]!==x||e[97]!==w?(z=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 mx-1 mt-1",children:[x,w,k]}),e[95]=k,e[96]=x,e[97]=w,e[98]=z):z=e[98];let _;if(e[99]!==u||e[100]!==i){let V;e[102]!==u?(V=J=>s.jsx(Fe,{item:J,onClose:u},J.key),e[102]=u,e[103]=V):V=e[103],_=i.map(V),e[99]=u,e[100]=i,e[101]=_}else _=e[101];let I;e[104]!==u||e[105]!==o?(I=o&&s.jsx(Fe,{item:o,onClose:u}),e[104]=u,e[105]=o,e[106]=I):I=e[106];let O;e[107]!==u||e[108]!==r?(O=s.jsx(Fe,{item:r,onClose:u}),e[107]=u,e[108]=r,e[109]=O):O=e[109];let F;e[110]!==_||e[111]!==I||e[112]!==O?(F=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[_,I,O]}),e[110]=_,e[111]=I,e[112]=O,e[113]=F):F=e[113];let E;if(e[114]!==c.theme||e[115]!==d||e[116]!==m){let V;e[118]!==c.theme||e[119]!==d?(V=J=>{const{value:xe,icon:Z,label:ne}=J;return s.jsx("button",{type:"button","aria-label":ne,onClick:()=>d(se=>({...se,theme:xe})),className:D("size-7 rounded-md flex items-center justify-center transition-colors",c.theme===xe?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:Z},xe)},e[118]=c.theme,e[119]=d,e[120]=V):V=e[120],E=m.map(V),e[114]=c.theme,e[115]=d,e[116]=m,e[117]=E}else E=e[117];let P;e[121]!==E?(P=s.jsx("div",{className:"flex items-center gap-0.5",children:E}),e[121]=E,e[122]=P):P=e[122];const L=c.enableSounds?"Disable sounds":"Enable sounds";let M;e[123]!==d?(M=()=>d(Di),e[123]=d,e[124]=M):M=e[124];const H=c.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let q;e[125]!==H?(q=D("size-7 rounded-md flex items-center justify-center transition-colors",H),e[125]=H,e[126]=q):q=e[126];let U;e[127]!==c.enableSounds?(U=c.enableSounds?s.jsx(kt,{size:14}):s.jsx(At,{size:14}),e[127]=c.enableSounds,e[128]=U):U=e[128];let W;e[129]!==L||e[130]!==M||e[131]!==q||e[132]!==U?(W=s.jsx("button",{type:"button","aria-label":L,onClick:M,className:q,children:U}),e[129]=L,e[130]=M,e[131]=q,e[132]=U,e[133]=W):W=e[133];let Q;e[134]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.52.3"]}),e[134]=Q):Q=e[134];let B;e[135]!==W?(B=s.jsxs("div",{className:"flex items-center gap-2",children:[W,Q]}),e[135]=W,e[136]=B):B=e[136];let ae;e[137]!==P||e[138]!==B?(ae=s.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-t border-border/50",children:[P,B]}),e[137]=P,e[138]=B,e[139]=ae):ae=e[139];let ye;return e[140]!==z||e[141]!==F||e[142]!==ae?(ye=s.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:s.jsxs("div",{className:"flex flex-col",children:[z,F,ae]})}),e[140]=z,e[141]=F,e[142]=ae,e[143]=ye):ye=e[143],ye}function Di(t){return{...t,enableSounds:!t.enableSounds}}function Fi(){ie.success("User ID copied")}function Ei(t){return{...t,enableSounds:!t.enableSounds}}function Li(){ie.success("User ID copied")}function dt(){const t=$.c(43),{data:e}=re.useSession(),{org:n}=oe(),l=pe();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org",shouldThrow:!1},t[0]=i):i=t[0];const o=zs(i)?.params.org,[a,m]=$s(),c=gt(),{isAdmin:d}=hn(),[u,f]=R.useState(!1),h=e?.user,x=h?.image,b=!!e?.session?.impersonatedBy;let p;t[1]===Symbol.for("react.memo_cache_sentinel")?(p=()=>f(!1),t[1]=p):p=t[1];const g=p;let j;t[2]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(bt,{size:16}),t[2]=j):j=t[2];let y;t[3]!==l||t[4]!==o?(y={key:"preferences",label:"Preferences",icon:j,onClick:()=>{l({to:"/$org/settings/profile",params:{org:o??""}})}},t[3]=l,t[4]=o,t[5]=y):y=t[5];let v;t[6]!==n||t[7]!==l?(v=n?[{key:"install-app",label:"Add to Home Screen",icon:s.jsx(Zs,{size:16}),onClick:()=>{l({to:"/$org/install",params:{org:n.slug}})}}]:[],t[6]=n,t[7]=l,t[8]=v):v=t[8];let w;t[9]===Symbol.for("react.memo_cache_sentinel")?(w={key:"terms",label:"Terms of Use",icon:s.jsx(tn,{size:16}),href:"https://www.decocms.com/terms-of-use",external:!0},t[9]=w):w=t[9];let C;t[10]===Symbol.for("react.memo_cache_sentinel")?(C={key:"privacy",label:"Privacy Policy",icon:s.jsx(rn,{size:16}),href:"https://www.decocms.com/privacy-policy",external:!0},t[10]=C):C=t[10];let N;t[11]===Symbol.for("react.memo_cache_sentinel")?(N={key:"github",label:"decocms/studio",icon:s.jsx(Ts,{className:"w-4 h-4"}),href:"https://github.com/decocms/studio",external:!0},t[11]=N):N=t[11];let S;t[12]===Symbol.for("react.memo_cache_sentinel")?(S={key:"community",label:"Community",icon:s.jsx(fn,{size:16}),href:"https://decocms.com/discord",external:!0},t[12]=S):S=t[12];let A;t[13]===Symbol.for("react.memo_cache_sentinel")?(A={key:"homepage",label:"Homepage",icon:s.jsx(en,{size:16}),href:"https://decocms.com",external:!0},t[13]=A):A=t[13];let k;t[14]!==d||t[15]!==l?(k=d?[{key:"admin-dashboard",label:"Admin Dashboard",icon:s.jsx(on,{size:16}),onClick:()=>l({to:"/_admin"}),className:"text-amber-700 dark:text-amber-400"}]:[],t[14]=d,t[15]=l,t[16]=k):k=t[16];let z;t[17]!==k||t[18]!==y||t[19]!==v?(z=[y,...v,w,C,N,S,A,...k],t[17]=k,t[18]=y,t[19]=v,t[20]=z):z=t[20];const _=z;let I;t[21]===Symbol.for("react.memo_cache_sentinel")?(I={key:"logout",label:"Sign out",icon:s.jsx(wt,{size:16}),onClick:Hi},t[21]=I):I=t[21];const O=I;let F;t[22]!==b?(F=b?{key:"stop-impersonating",label:"Stop impersonation",icon:s.jsx(wt,{size:16}),onClick:Bi,className:"text-amber-700 dark:text-amber-400"}:null,t[22]=b,t[23]=F):F=t[23];const E=F;let P;t[24]===Symbol.for("react.memo_cache_sentinel")?(P={value:"light",icon:s.jsx(nn,{size:14}),label:"Light theme"},t[24]=P):P=t[24];let L;t[25]===Symbol.for("react.memo_cache_sentinel")?(L={value:"dark",icon:s.jsx(ln,{size:14}),label:"Dark theme"},t[25]=L):L=t[25];let M;t[26]===Symbol.for("react.memo_cache_sentinel")?(M=[P,L,{value:"system",icon:s.jsx(ct,{size:14}),label:"System theme"}],t[26]=M):M=t[26];const H=M;let q;t[27]!==b||t[28]!==c||t[29]!==_||t[30]!==a||t[31]!==m||t[32]!==E||t[33]!==h||t[34]!==x?(q={user:h,userImage:x,menuItems:_,signOutItem:O,stopImpersonatingItem:E,isImpersonating:b,themeOptions:H,preferences:a,setPreferences:m,close:g,isMobile:c},t[27]=b,t[28]=c,t[29]=_,t[30]=a,t[31]=m,t[32]=E,t[33]=h,t[34]=x,t[35]=q):q=t[35];const U=q;let W;return t[36]!==b||t[37]!==c||t[38]!==u||t[39]!==U||t[40]!==h?.name||t[41]!==x?(W=s.jsx(s.Fragment,{children:c?s.jsxs(es,{open:u,onOpenChange:f,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>f(!0),className:D("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",b&&"border-2 border-dashed border-amber-500"),children:[s.jsx(Ke,{url:x,fallback:h?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:h?.name??"Account"})]}),s.jsxs(ts,{className:"h-[80dvh] p-0",children:[s.jsx(ss,{className:"sr-only",children:"Account"}),s.jsx(Ot,{...U})]})]}):s.jsxs(Qe,{open:u,onOpenChange:f,children:[s.jsx(Ee,{asChild:!0,children:s.jsxs(te,{tooltip:h?.name??"Account",className:D("rounded-md",b&&"border-2 border-dashed border-amber-500"),children:[s.jsx(Ke,{url:x,fallback:h?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:h?.name??"Account"})]})}),s.jsx(Je,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:Ri,children:s.jsx(Ot,{...U})})]})}),t[36]=b,t[37]=c,t[38]=u,t[39]=U,t[40]=h?.name,t[41]=x,t[42]=W):W=t[42],W}function Ri(t){return t.preventDefault()}async function Bi(){const{error:t}=await re.admin.stopImpersonating();if(t){ie.error(t.message||"Failed to stop impersonation");return}window.location.href="/"}function Hi(){de("signed_out",{source:"account_popover"}),Ms(),re.signOut()}function mt(t){const e=$.c(43),{variant:n}=t===void 0?{}:t,l=n===void 0?"icon":n,i=vn(),[r,o]=R.useState(!1);let a,m;if(e[0]!==i.capabilities||e[1]!==i.hostname||e[2]!==i.machineId||e[3]!==i.online){const y=yn(i.capabilities);a=i.online?"Desktop linked":"Connect desktop",m=i.online?s.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",children:[s.jsx("span",{className:"font-medium",children:i.hostname??i.machineId??"Desktop linked"}),s.jsx("span",{className:"text-muted-foreground",children:y.length>0?`Available: ${y.join(", ")}`:"No CLI agents detected"})]}):s.jsx("span",{className:"text-xs",children:"Desktop disconnected"}),e[0]=i.capabilities,e[1]=i.hostname,e[2]=i.machineId,e[3]=i.online,e[4]=a,e[5]=m}else a=e[4],m=e[5];const c=m;if(l==="full"){let y,v;e[6]===Symbol.for("react.memo_cache_sentinel")?(y=()=>o(!0),v=s.jsx(ct,{}),e[6]=y,e[7]=v):(y=e[6],v=e[7]);let w;e[8]!==a?(w=s.jsx("span",{children:a}),e[8]=a,e[9]=w):w=e[9];let C;e[10]!==i.online?(C=i.online&&s.jsx("span",{className:"ml-auto size-2 rounded-full bg-success animate-pulse"}),e[10]=i.online,e[11]=C):C=e[11];let N;e[12]!==a||e[13]!==w||e[14]!==C?(N=s.jsx(ue,{asChild:!0,children:s.jsxs(te,{tooltip:a,onClick:y,children:[v,w,C]})}),e[12]=a,e[13]=w,e[14]=C,e[15]=N):N=e[15];let S;e[16]!==c?(S=s.jsx(fe,{side:"right",children:c}),e[16]=c,e[17]=S):S=e[17];let A;e[18]!==N||e[19]!==S?(A=s.jsxs(he,{children:[N,S]}),e[18]=N,e[19]=S,e[20]=A):A=e[20];let k;e[21]!==r?(k=s.jsx(zt,{open:r,onOpenChange:o}),e[21]=r,e[22]=k):k=e[22];let z;return e[23]!==k||e[24]!==A?(z=s.jsxs(s.Fragment,{children:[A,k]}),e[23]=k,e[24]=A,e[25]=z):z=e[25],z}let d;e[26]===Symbol.for("react.memo_cache_sentinel")?(d=()=>o(!0),e[26]=d):d=e[26];const u=i.online?"Desktop linked":"Connect your desktop";let f;e[27]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(ct,{size:16}),e[27]=f):f=e[27];let h;e[28]!==i.online?(h=i.online&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-success ring-2 ring-background animate-pulse"}),e[28]=i.online,e[29]=h):h=e[29];let x;e[30]!==u||e[31]!==h?(x=s.jsx(ue,{asChild:!0,children:s.jsxs(je,{onClick:d,"aria-label":u,children:[f,h]})}),e[30]=u,e[31]=h,e[32]=x):x=e[32];let b;e[33]!==c?(b=s.jsx(fe,{side:"bottom",children:c}),e[33]=c,e[34]=b):b=e[34];let p;e[35]!==x||e[36]!==b?(p=s.jsxs(he,{children:[x,b]}),e[35]=x,e[36]=b,e[37]=p):p=e[37];let g;e[38]!==r?(g=s.jsx(zt,{open:r,onOpenChange:o}),e[38]=r,e[39]=g):g=e[39];let j;return e[40]!==g||e[41]!==p?(j=s.jsxs(s.Fragment,{children:[p,g]}),e[40]=g,e[41]=p,e[42]=j):j=e[42],j}class Gi extends R.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,n){}render(){return this.state.hasError?null:this.props.children}}function Ui(t){return t<=1?"text-destructive":t<=5?"text-amber-500 dark:text-amber-400":"text-foreground/70"}function Wi(){const t=$.c(17),e=pe(),{org:n}=oe(),{hasDecoKey:l,balanceDollars:i}=pn();if(!l)return null;let r;t[0]!==i?(r=i!=null?`Credits: $${i.toFixed(2)}`:"Credits",t[0]=i,t[1]=r):r=t[1];let o;t[2]!==i?(o=D(i!=null&&Ui(i)),t[2]=i,t[3]=o):o=t[3];let a;t[4]!==e||t[5]!==n.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:n.slug}}),t[4]=e,t[5]=n.slug,t[6]=a):a=t[6];let m;t[7]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(an,{}),t[7]=m):m=t[7];let c;t[8]!==i?(c=i!=null?`$${i.toFixed(2)}`:"Credits",t[8]=i,t[9]=c):c=t[9];let d;t[10]!==c?(d=s.jsx("span",{children:c}),t[10]=c,t[11]=d):d=t[11];let u;return t[12]!==r||t[13]!==o||t[14]!==a||t[15]!==d?(u=s.jsx(me,{children:s.jsx(X,{children:s.jsxs(te,{tooltip:r,className:o,onClick:a,children:[m,d]})})}),t[12]=r,t[13]=o,t[14]=a,t[15]=d,t[16]=u):u=t[16],u}function Pt(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Gi,{children:s.jsx(R.Suspense,{fallback:null,children:s.jsx(Wi,{})})}),t[0]=e):e=t[0],e}function Dt(){const t=$.c(7),e=pe(),{org:n}=oe();let l;t[0]!==e||t[1]!==n.slug?(l=()=>e({to:"/$org/settings",params:{org:n.slug}}),t[0]=e,t[1]=n.slug,t[2]=l):l=t[2];let i,r;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(bt,{}),r=s.jsx("span",{children:"Settings"}),t[3]=i,t[4]=r):(i=t[3],r=t[4]);let o;return t[5]!==l?(o=s.jsxs(te,{tooltip:"Settings",onClick:l,children:[i,r]}),t[5]=l,t[6]=o):o=t[6],o}function Ft(){const t=$.c(4),[e,n]=R.useState(!1);let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(X,{children:s.jsx(xn,{trigger:s.jsxs(te,{tooltip:"Invite members",children:[s.jsx(cn,{}),s.jsx("span",{children:"Invite members"})]})})}),t[0]=l):l=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(me,{className:"gap-0.5",children:[l,s.jsx(X,{children:s.jsxs(te,{tooltip:"Add connection",onClick:()=>n(!0),children:[s.jsx(sn,{}),s.jsx("span",{children:"Add connection"})]})})]}),t[1]=i):i=t[1];let r;return t[2]!==e?(r=s.jsxs(s.Fragment,{children:[i,s.jsx(gn,{open:e,onOpenChange:n,mode:"browse"})]}),t[2]=e,t[3]=r):r=t[3],r}function qi(){const t=$.c(10),{state:e}=ge();if(e==="collapsed"){let m,c;t[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Ft,{}),c=s.jsx(Pt,{}),t[0]=m,t[1]=c):(m=t[0],c=t[1]);let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(X,{children:s.jsx("div",{className:"flex justify-center",children:s.jsx(mt,{})})}),t[2]=d):d=t[2];let u;t[3]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(X,{children:s.jsx(Dt,{})}),t[3]=u):u=t[3];let f;return t[4]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsxs(ot,{className:"px-2 pb-3 gap-1",children:[m,c,s.jsxs(me,{children:[d,u,s.jsx(X,{children:s.jsx(dt,{})})]})]}),t[4]=f):f=t[4],f}let l,i;t[5]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Ft,{}),i=s.jsx(Pt,{}),t[5]=l,t[6]=i):(l=t[5],i=t[6]);let r;t[7]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(X,{children:s.jsx(mt,{variant:"full"})}),t[7]=r):r=t[7];let o;t[8]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(X,{children:s.jsx(Dt,{})}),t[8]=o):o=t[8];let a;return t[9]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs(ot,{className:"px-2 pb-3 gap-0.5",children:[l,i,s.jsxs(me,{className:"gap-0.5",children:[r,o,s.jsx(X,{children:s.jsx(dt,{})})]})]}),t[9]=a):a=t[9],a}function Ki(){const t=$.c(8),e=pe(),{org:n}=oe(),{setOpenMobile:l}=ge();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(me,{children:s.jsx(X,{children:s.jsx(dt,{})})})}),t[0]=i):i=t[0];let r;t[1]!==e||t[2]!==n.slug||t[3]!==l?(r=()=>{e({to:"/$org/settings",params:{org:n.slug}}),l(!1)},t[1]=e,t[2]=n.slug,t[3]=l,t[4]=r):r=t[4];let o;t[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(bt,{className:"size-4"}),t[5]=o):o=t[5];let a;return t[6]!==r?(a=s.jsx(ot,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[i,s.jsx(je,{"aria-label":"Settings",onClick:r,children:o})]})}),t[6]=r,t[7]=a):a=t[7],a}function Et(t){const e=$.c(15),{className:n,wrapperClassName:l,children:i}=t,[r,o]=R.useState(!1);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=g=>{g&&o(g.scrollHeight>g.clientHeight+1)},e[0]=a):a=e[0];const m=a;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=g=>{const j=g.currentTarget;o(j.scrollHeight-j.scrollTop>j.clientHeight+1)},e[1]=c):c=e[1];const d=c;let u;e[2]!==l?(u=D("relative",l),e[2]=l,e[3]=u):u=e[3];let f;e[4]!==i||e[5]!==n?(f=s.jsx("div",{ref:m,onScroll:d,className:n,children:i}),e[4]=i,e[5]=n,e[6]=f):f=e[6];const h=r?"opacity-100":"opacity-0";let x;e[7]!==h?(x=D("pointer-events-none absolute right-0 bottom-0 left-0 h-10 bg-gradient-to-t from-sidebar to-transparent transition-opacity duration-150",h),e[7]=h,e[8]=x):x=e[8];let b;e[9]!==x?(b=s.jsx("div",{"aria-hidden":!0,className:x}),e[9]=x,e[10]=b):b=e[10];let p;return e[11]!==u||e[12]!==f||e[13]!==b?(p=s.jsxs("div",{className:u,children:[f,b]}),e[11]=u,e[12]=f,e[13]=b,e[14]=p):p=e[14],p}function Xi(t){const e=$.c(8),{virtualMcpId:n,size:l,showAutomationBadge:i}=t,r=l===void 0?"sm":l;let o;e[0]!==r||e[1]!==n?(o=n?s.jsx(Vi,{virtualMcpId:n,size:r}):s.jsx(ve,{icon:null,name:"?",size:r}),e[0]=r,e[1]=n,e[2]=o):o=e[2];let a;e[3]!==i?(a=i&&s.jsx("span",{"aria-label":"Automation-triggered",className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-blue-500 border border-blue-600 text-white",children:s.jsx(os,{size:10,className:"text-white"})}),e[3]=i,e[4]=a):a=e[4];let m;return e[5]!==o||e[6]!==a?(m=s.jsxs("div",{className:"relative shrink-0",children:[o,a]}),e[5]=o,e[6]=a,e[7]=m):m=e[7],m}function Vi(t){const e=$.c(6),{virtualMcpId:n,size:l}=t,i=jt(n);if(!i){let a;return e[0]!==l?(a=s.jsx(ve,{icon:null,name:"?",size:l}),e[0]=l,e[1]=a):a=e[1],a}const r=i.icon??null;let o;return e[2]!==i.title||e[3]!==l||e[4]!==r?(o=s.jsx(ve,{icon:r,name:i.title,size:l}),e[2]=i.title,e[3]=l,e[4]=r,e[5]=o):o=e[5],o}function Lt(t){const e=$.c(36),{open:n,onOpenChange:l}=t,[i,r]=R.useState(""),{org:o}=oe(),{setTaskId:a}=yt(),m=rs();let c,d,u;e[0]!==o.id||e[1]!==i?(u=i.trim(),d=Ps,c=Os.globalSearch(o.id,u),e[0]=o.id,e[1]=i,e[2]=c,e[3]=d,e[4]=u):(c=e[2],d=e[3],u=e[4]);const f=n&&u.length>0;let h;e[5]!==m||e[6]!==u?(h=async()=>await m.call("GLOBAL_SEARCH",{query:u,limit:20}),e[5]=m,e[6]=u,e[7]=h):h=e[7];let x;e[8]!==c||e[9]!==f||e[10]!==h?(x={queryKey:c,enabled:f,queryFn:h,staleTime:1e4},e[8]=c,e[9]=f,e[10]=h,e[11]=x):x=e[11];const{data:b,isFetching:p}=d(x);let g;e[12]!==b?.items?(g=b?.items??[],e[12]=b?.items,e[13]=g):g=e[13];const j=g;let y;e[14]!==l?(y=I=>{I||r(""),l(I)},e[14]=l,e[15]=y):y=e[15];const v=y;let w;e[16]!==v||e[17]!==a?(w=I=>{v(!1),a(I.id,I.virtual_mcp_id??void 0)},e[16]=v,e[17]=a,e[18]=w):w=e[18];const C=w;let N;e[19]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsxs(Tn,{className:"sr-only",children:[s.jsx(Mn,{children:"Search"}),s.jsx(On,{children:"Search across your organization's resources."})]}),e[19]=N):N=e[19];let S;e[20]!==i?(S=s.jsx(Ln,{value:i,onValueChange:r,placeholder:"Search..."}),e[20]=i,e[21]=S):S=e[21];let A;e[22]!==C||e[23]!==p||e[24]!==j||e[25]!==u?(A=u?p&&j.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Searching…"}):j.length===0?s.jsx(Fn,{children:"No results."}):j.map(I=>I.type==="thread"?s.jsxs(En,{value:`thread:${I.id}:${I.title}`,onSelect:()=>C(I),className:"gap-2.5",children:[s.jsx(Xi,{virtualMcpId:I.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:I.title||"Untitled thread"})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(I.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${I.id}`):null):s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Start typing to search."}),e[22]=C,e[23]=p,e[24]=j,e[25]=u,e[26]=A):A=e[26];let k;e[27]!==A?(k=s.jsx(Rn,{children:A}),e[27]=A,e[28]=k):k=e[28];let z;e[29]!==S||e[30]!==k?(z=s.jsxs(Pn,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[N,s.jsxs(Bn,{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:[S,k]})]}),e[29]=S,e[30]=k,e[31]=z):z=e[31];let _;return e[32]!==v||e[33]!==n||e[34]!==z?(_=s.jsx(Dn,{open:n,onOpenChange:v,children:z}),e[32]=v,e[33]=n,e[34]=z,e[35]=_):_=e[35],_}function Yi(t){return t==="ephemeral"||t.startsWith("thread:")}function ps(t){const e=$.c(40),{task:n,isActive:l,onClick:i,onArchive:r,showAutomationBadge:o,showAgentIcon:a,hideStatusIdle:m,indented:c}=t,d=Un(n.status),u=d.icon,f=n.metadata?.kind==="tool_call_run",h=jt(f?void 0:n.virtual_mcp_id);let x;e[0]!==h?(x=bn(h),e[0]=h,e[1]=x):x=e[1];const b=x;Wn(6e4);const p=o||!!n.trigger_id,g=n.id,j="button",y=0;let v;e[2]!==i?(v=H=>{H.target===H.currentTarget&&(H.key==="Enter"||H.key===" ")&&(H.preventDefault(),i())},e[2]=i,e[3]=v):v=e[3];const w=c?"-ml-4 pl-6":"pl-2",C=l?"bg-accent text-accent-foreground":"hover:bg-accent/60";let N;e[4]!==w||e[5]!==C?(N=D("group/row flex items-center gap-2 py-1.5 pr-2 rounded-md cursor-pointer transition-colors",w,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",C),e[4]=w,e[5]=C,e[6]=N):N=e[6];let S;e[7]!==f||e[8]!==a||e[9]!==h?.icon||e[10]!==h?.title?(S=a&&!f&&s.jsx(ve,{icon:h?.icon??null,name:h?.title??"?",size:"2xs"}),e[7]=f,e[8]=a,e[9]=h?.icon,e[10]=h?.title,e[11]=S):S=e[11];let A;e[12]!==p?(A=p&&s.jsx(os,{size:12,"aria-label":"Automation-triggered",className:"shrink-0 text-blue-500"}),e[12]=p,e[13]=A):A=e[13];const k=n.title||"Untitled task";let z;e[14]!==k?(z=s.jsx("div",{className:"text-sm text-foreground truncate",children:k}),e[14]=k,e[15]=z):z=e[15];let _;e[16]!==A||e[17]!==z?(_=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[A,z]}),e[16]=A,e[17]=z,e[18]=_):_=e[18];let I;e[19]!==b||e[20]!==l||e[21]!==n.branch||e[22]!==n.updated_at?(I=n.updated_at&&s.jsxs("div",{className:D("flex items-center gap-1 text-[11px] min-w-0",l?"text-accent-foreground/70":"text-muted-foreground/60"),children:[n.branch&&!Yi(n.branch)?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate font-mono",children:n.branch}),s.jsx("span",{className:"shrink-0",children:"·"})]}):b?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"truncate",children:[b.owner,"/",b.name]}),s.jsx("span",{className:"shrink-0",children:"·"})]}):null,s.jsx("span",{className:"shrink-0",children:Kn(new Date(n.updated_at))})]}),e[19]=b,e[20]=l,e[21]=n.branch,e[22]=n.updated_at,e[23]=I):I=e[23];let O;e[24]!==_||e[25]!==I?(O=s.jsxs("div",{className:"flex-1 min-w-0",children:[_,I]}),e[24]=_,e[25]=I,e[26]=O):O=e[26];const F="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",E=!m&&s.jsx("span",{className:D("[grid-area:slot] flex size-7 items-center justify-center pointer-events-none transition-opacity",r&&"group-hover/row:opacity-0"),"aria-label":d.label,children:s.jsx(u,{size:14,className:D(d.iconClassName,n.status==="in_progress"&&"animate-spin")})});let P;e[27]!==r?(P=r&&s.jsxs(he,{children:[s.jsx(ue,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":"Archive task",onClick:H=>{H.stopPropagation(),r()},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-7 items-center justify-center rounded-md 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(Ds,{size:14})})}),s.jsx(fe,{side:"right",children:"Archive"})]}),e[27]=r,e[28]=P):P=e[28];let L;e[29]!==E||e[30]!==P?(L=s.jsxs("div",{className:F,children:[E,P]}),e[29]=E,e[30]=P,e[31]=L):L=e[31];let M;return e[32]!==i||e[33]!==O||e[34]!==L||e[35]!==v||e[36]!==N||e[37]!==S||e[38]!==n.id?(M=s.jsxs("div",{"data-task-id":g,role:j,tabIndex:y,onClick:i,onKeyDown:v,className:N,children:[S,O,L]}),e[32]=i,e[33]=O,e[34]=L,e[35]=v,e[36]=N,e[37]=S,e[38]=n.id,e[39]=M):M=e[39],M}const Rt=["requires_action","in_progress","failed","expired","completed"];function Qi(t){const e=new Map(Rt.map(n=>[n,[]]));for(const n of t){const l=n.status??"completed";(e.get(l)??e.get("completed")).push(n)}return Rt.map(n=>({status:n,threads:e.get(n)}))}const Ji="sidebar.group.expanded.";function Zi(t,e){const n=$.c(3),[l,i]=Ye(`${Ji}${t}`,e);let r;return n[0]!==l||n[1]!==i?(r=[l,i],n[0]=l,n[1]=i,n[2]=r):r=n[2],r}function gs(t){const e=$.c(12),{onClick:n,isFetching:l,indented:i}=t,r=i?"-ml-4 pl-6 pr-2":"px-2";let o;e[0]!==r?(o=D("flex items-center gap-2 py-1.5 rounded-md text-sm text-muted-foreground",r,"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[0]=r,e[1]=o):o=e[1];let a;e[2]!==l?(a=l&&s.jsx(Vt,{size:14,className:"animate-spin"}),e[2]=l,e[3]=a):a=e[3];const m=l?"Loading…":"Show more";let c;e[4]!==m?(c=s.jsx("span",{children:m}),e[4]=m,e[5]=c):c=e[5];let d;return e[6]!==l||e[7]!==n||e[8]!==o||e[9]!==a||e[10]!==c?(d=s.jsxs("button",{type:"button","aria-label":"Show more tasks",onClick:n,disabled:l,className:o,children:[a,c]}),e[6]=l,e[7]=n,e[8]=o,e[9]=a,e[10]=c,e[11]=d):d=e[11],d}function el(t,e,n,l){return[t,e,n,l.type,l.member,l.currentUserId??""].join("|")}function tl(t){return t.member==="mine"&&!t.currentUserId}const bs=4;let qe=0;const ut=[];function sl(){for(;qe<bs&&ut.length>0;){const t=ut.shift();t&&t()}}function js(t){return new Promise((e,n)=>{const l=()=>{qe++,t().then(e,n).finally(()=>{qe--,sl()})};qe<bs?l():ut.push(l)})}const Ze=10;function Bt(t,e,n,l,i){const r={hidden:!1};l.member==="mine"&&l.currentUserId&&(r.created_by=l.currentUserId),l.type==="automation"&&(r.has_trigger=!0),l.type==="manual"&&(r.has_trigger=!1);const o={where:r,limit:i,offset:n,orderBy:[{field:["updated_at"],direction:"desc"}]};return o.status=e,o}function nl(t,e,n,l){let i=0;for(const r of t)vs(r,e,n,l)&&i++;return i}function nt(t,e,n,l){return nl(t,e,n,l)}function il(t,e){return!!(t>=Ze||t===0&&e)}function Ht(t,e){return t<e}function ll(t,e){return e===!1?!1:e===!0?!0:t}function vs(t,e,n,l){return!(t.hidden||(t.status??"completed")!==n||l.member==="mine"&&l.currentUserId&&t.created_by!==l.currentUserId||l.type==="automation"&&!t.trigger_id||l.type==="manual"&&t.trigger_id)}const Ve=new Map,We=new Map;function rl(t,e){return e?t>=Ze?!0:null:!1}function Gt(t){return Ve.get(t)}function ol(t,e){Ve.set(t,e)}function al(t,e,n){const l=Ve.get(t);if(l!==void 0){n(l);return}let i=We.get(t);i||(i=js(e).then(r=>(Ve.set(t,r),We.delete(t),r)).catch(()=>(We.delete(t),Promise.reject(new Error("group probe failed")))),We.set(t,i)),i.then(n,()=>n(!1))}function Ut(t){const e=t,n=Array.isArray(e.items)?e.items:[];return{items:n,hasMore:e.hasMore??n.length===Ze,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function cl(t,e,n,l,i){let r=0;for(const o of t)e.has(o.id)||vs(o,n,l,i)&&r++;return r}function dl(t,e,n,l){const i=$.c(8),{org:r}=oe(),o=el(r.id,t,e,n);let a;i[0]!==n?(a=tl(n),i[0]=n,i[1]=a):a=i[1];const m=a,[c,d]=R.useState({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});c.identity!==o&&d({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});const u=In(),{threads:f,hasMore:h}=vt(),x=nt(f,t,e,n),b=il(x,h),p=rl(x,h),g=rs();if(c.identity===o&&c.serverHasMore===null){const N=p??Gt(o);N!==void 0&&d({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:c.probeSubscribedIdentity,serverHasMore:N})}!m&&c.identity===o&&c.serverHasMore===null&&p===null&&Gt(o)===void 0&&c.probeSubscribedIdentity!==o&&(d(N=>N.identity===o?{...N,isProbing:!0,probeSubscribedIdentity:o}:N),al(o,async()=>{const N=Bt(t,e,0,n,1),S=await g.call("COLLECTION_THREADS_LIST",N),{totalCount:A}=Ut(S),k=nt(u.threads.get(),t,e,n);return A===void 0?!1:Ht(k,A)},N=>{d(S=>S.identity!==o?S:{...S,isProbing:!1,serverHasMore:N})}));const y=async function(){if(c.isFetching||c.isProbing||m)return;const S=o;d(A=>A.identity===S?{...A,isFetching:!0}:A);try{const A=nt(f,t,e,n),k=Bt(t,e,A,n,Ze),z=await js(()=>g.call("COLLECTION_THREADS_LIST",k)),{items:_,hasMore:I,totalCount:O}=Ut(z),F=new Set(f.map(ml)),E=cl(_,F,t,e,n),P=A;u.mergeThreads(_),d(L=>{if(L.identity!==S)return L;let M;return O!==void 0?M=Ht(P+E,O):M=_.length===0||E===0?!1:I,ol(S,M),{...L,isFetching:!1,serverHasMore:M}})}catch(A){const k=A,z=k instanceof Error?k.message:String(k);ie.error(`Could not load more tasks: ${z}`),d(_=>_.identity===S?{..._,isFetching:!1}:_)}},v=c.isFetching||c.isProbing,w=!m&&!v&&ll(b,c.serverHasMore);let C;return i[2]!==v||i[3]!==y||i[4]!==w||i[5]!==c.isProbing||i[6]!==c.serverHasMore?(C={hasMore:w,isFetching:v,isProbing:c.isProbing,serverHasMore:c.serverHasMore,loadMore:y},i[2]=v,i[3]=y,i[4]=w,i[5]=c.isProbing,i[6]=c.serverHasMore,i[7]=C):C=i[7],C}function ml(t){return t.id}function ul(t){const e=$.c(20),{status:n,threads:l,activeTaskId:i,onSelectTask:r,onArchiveTask:o,canArchive:a,filters:m}=t,{isFetching:c,isProbing:d,loadMore:u,hasMore:f,serverHasMore:h}=dl("status",n,m),[x,b]=R.useState(!1);!x&&l.length===0&&h===!0&&!c&&!d&&(b(!0),queueMicrotask(()=>{u()}));let p;if(e[0]!==i||e[1]!==a||e[2]!==m||e[3]!==o||e[4]!==r||e[5]!==l){let y;e[7]!==i||e[8]!==a||e[9]!==m||e[10]!==o||e[11]!==r?(y=v=>s.jsx(ps,{task:v,isActive:i===v.id,onClick:()=>r(v),onArchive:a&&v.created_by===m.currentUserId?()=>o(v):void 0,showAutomationBadge:!!v.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},v.id),e[7]=i,e[8]=a,e[9]=m,e[10]=o,e[11]=r,e[12]=y):y=e[12],p=l.map(y),e[0]=i,e[1]=a,e[2]=m,e[3]=o,e[4]=r,e[5]=l,e[6]=p}else p=e[6];let g;e[13]!==f||e[14]!==c||e[15]!==u?(g=(f||c)&&s.jsx(gs,{onClick:()=>{u()},isFetching:c,indented:!0}),e[13]=f,e[14]=c,e[15]=u,e[16]=g):g=e[16];let j;return e[17]!==p||e[18]!==g?(j=s.jsxs(s.Fragment,{children:[p,g]}),e[17]=p,e[18]=g,e[19]=j):j=e[19],j}function fl(t){const e=$.c(36),{status:n,threads:l,activeTaskId:i,onSelectTask:r,onArchiveTask:o,canArchive:a,filters:m}=t,c=qn[n],d=c.icon,[u,f]=Zi(`status-${n}`,!1);let h;e[0]!==u||e[1]!==f?(h=function(){f(!u)},e[0]=u,e[1]=f,e[2]=h):h=e[2];const x=h;let b;e[3]!==x?(b=S=>{S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),x())},e[3]=x,e[4]=b):b=e[4];let p;e[5]!==d||e[6]!==c.iconClassName?(p=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(d,{size:12,className:c.iconClassName})}),e[5]=d,e[6]=c.iconClassName,e[7]=p):p=e[7];let g;e[8]!==u?(g=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:u?s.jsx(St,{size:14}):s.jsx(Xn,{size:14})}),e[8]=u,e[9]=g):g=e[9];let j;e[10]!==p||e[11]!==g?(j=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[p,g]}),e[10]=p,e[11]=g,e[12]=j):j=e[12];let y;e[13]!==c.label?(y=s.jsx("span",{className:"flex-1 truncate",children:c.label}),e[13]=c.label,e[14]=y):y=e[14];let v;e[15]!==l.length?(v=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:l.length})}),e[15]=l.length,e[16]=v):v=e[16];let w;e[17]!==u||e[18]!==x||e[19]!==b||e[20]!==j||e[21]!==y||e[22]!==v?(w=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":u,onClick:x,onKeyDown:b,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-md 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:[j,y,v]}),e[17]=u,e[18]=x,e[19]=b,e[20]=j,e[21]=y,e[22]=v,e[23]=w):w=e[23];let C;e[24]!==i||e[25]!==a||e[26]!==u||e[27]!==m||e[28]!==o||e[29]!==r||e[30]!==n||e[31]!==l?(C=u&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(ul,{status:n,threads:l,activeTaskId:i,onSelectTask:r,onArchiveTask:o,canArchive:a,filters:m})}),e[24]=i,e[25]=a,e[26]=u,e[27]=m,e[28]=o,e[29]=r,e[30]=n,e[31]=l,e[32]=C):C=e[32];let N;return e[33]!==w||e[34]!==C?(N=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[w,C]}),e[33]=w,e[34]=C,e[35]=N):N=e[35],N}function Wt(t){const e=$.c(38),{threads:n,groupBy:l,activeTaskId:i,onSelectTask:r,onArchiveTask:o,filters:a,hasMore:m,isFetchingMore:c,onLoadMore:d,filtersActive:u}=t;if(n.length===0&&!m&&!c){let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Gn,{className:"size-6 opacity-60"}),e[0]=p):p=e[0];const g=u?"No threads match your filters":"No threads yet";let j;return e[1]!==g?(j=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:g})]}),e[1]=g,e[2]=j):j=e[2],j}const f=n.length>1||m;if(l==="status"){let p;if(e[3]!==i||e[4]!==f||e[5]!==a||e[6]!==o||e[7]!==r||e[8]!==n){let j;e[10]!==i||e[11]!==f||e[12]!==a||e[13]!==o||e[14]!==r?(j=y=>s.jsx(fl,{status:y.status,threads:y.threads,activeTaskId:i,onSelectTask:r,onArchiveTask:o,canArchive:f,filters:a},y.status),e[10]=i,e[11]=f,e[12]=a,e[13]=o,e[14]=r,e[15]=j):j=e[15],p=Qi(n).map(j),e[3]=i,e[4]=f,e[5]=a,e[6]=o,e[7]=r,e[8]=n,e[9]=p}else p=e[9];let g;return e[16]!==p?(g=s.jsx(s.Fragment,{children:p}),e[16]=p,e[17]=g):g=e[17],g}let h;if(e[18]!==i||e[19]!==f||e[20]!==a||e[21]!==o||e[22]!==r||e[23]!==n){let p;e[25]!==i||e[26]!==f||e[27]!==a||e[28]!==o||e[29]!==r?(p=g=>s.jsx(ps,{task:g,isActive:i===g.id,onClick:()=>r(g),onArchive:f&&g.created_by===a.currentUserId?()=>o(g):void 0,showAutomationBadge:!!g.trigger_id,showAgentIcon:!0},g.id),e[25]=i,e[26]=f,e[27]=a,e[28]=o,e[29]=r,e[30]=p):p=e[30],h=n.map(p),e[18]=i,e[19]=f,e[20]=a,e[21]=o,e[22]=r,e[23]=n,e[24]=h}else h=e[24];let x;e[31]!==m||e[32]!==c||e[33]!==d?(x=(m||c)&&s.jsx(gs,{onClick:d,isFetching:c}),e[31]=m,e[32]=c,e[33]=d,e[34]=x):x=e[34];let b;return e[35]!==h||e[36]!==x?(b=s.jsxs(s.Fragment,{children:[h,x]}),e[35]=h,e[36]=x,e[37]=b):b=e[37],b}function hl(t,e,n){if(!n)return;const l=t.findIndex(i=>i.id===e);if(l!==-1){for(let i=l+1;i<t.length;i++){const r=t[i];if(r?.created_by===n)return r}for(let i=l-1;i>=0;i--){const r=t[i];if(r?.created_by===n)return r}}}function qt(t){const e=$.c(17),{label:n,onClick:l,active:i,children:r}=t,[o,a]=R.useState(!1);let m,c,d,u;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=()=>a(!0),c=()=>a(!1),d=()=>a(!0),u=()=>a(!1),e[0]=m,e[1]=c,e[2]=d,e[3]=u):(m=e[0],c=e[1],d=e[2],u=e[3]);const f=i&&"bg-sidebar-accent text-foreground";let h;e[4]!==f?(h=D(f),e[4]=f,e[5]=h):h=e[5];let x;e[6]!==r||e[7]!==n||e[8]!==l||e[9]!==h?(x=s.jsx(ue,{asChild:!0,children:s.jsx(je,{"aria-label":n,onClick:l,onPointerEnter:m,onPointerLeave:c,onFocus:d,onBlur:u,className:h,children:r})}),e[6]=r,e[7]=n,e[8]=l,e[9]=h,e[10]=x):x=e[10];let b;e[11]!==n?(b=s.jsx(fe,{side:"bottom",children:n}),e[11]=n,e[12]=b):b=e[12];let p;return e[13]!==o||e[14]!==x||e[15]!==b?(p=s.jsxs(he,{open:o,children:[x,b]}),e[13]=o,e[14]=x,e[15]=b,e[16]=p):p=e[16],p}function it(t){const e=$.c(13),{label:n,value:l,onChange:i,options:r}=t;let o;e[0]!==n?(o=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),e[0]=n,e[1]=o):o=e[1];let a;e[2]!==i?(a=u=>u&&i(u),e[2]=i,e[3]=a):a=e[3];let m;e[4]!==r?(m=r.map(xl),e[4]=r,e[5]=m):m=e[5];let c;e[6]!==a||e[7]!==m||e[8]!==l?(c=s.jsx(_n,{type:"single",size:"sm",value:l,onValueChange:a,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:m}),e[6]=a,e[7]=m,e[8]=l,e[9]=c):c=e[9];let d;return e[10]!==o||e[11]!==c?(d=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o,c]}),e[10]=o,e[11]=c,e[12]=d):d=e[12],d}function xl(t){return s.jsxs(Nn,{value:t.value,className:"h-6 gap-1.5 rounded-md 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 ys({onNavigate:t}={}){const{data:e}=re.useSession(),n=e?.user?.id,{org:l}=oe(),i=Cn({connectionId:wn,orgId:l.id,orgSlug:l.slug}),r=Xe(l.id).id,o=is(),{threads:a,hasMore:m,isFetchingMore:c,fetchNextPage:d}=vt(),u=a.filter(T=>!T.hidden),{hide:f}=ls(),h=pe(),{setTaskId:x,createNewTask:b}=yt(),p=ft({strict:!1}),g=ht({strict:!1}),j=p.taskId??null,y=g.virtualmcpid??a.find(T=>T.id===j)?.virtual_mcp_id??null,v=()=>{t?.()},w=[...u].sort((T,G)=>(G.updated_at??"").localeCompare(T.updated_at??"")),[C,N]=R.useState("all"),[S,A]=R.useState("flat"),[k,z]=Ye("sidebar-threads-scope-all",!1),[_,I]=R.useState(!1),[O,F]=R.useState(!1),E={type:C,member:"mine",currentUserId:n??null},P=T=>n?T.filter(G=>G.created_by===n):[],L=T=>C==="automation"?T.filter(G=>!!G.trigger_id):C==="manual"?T.filter(G=>!G.trigger_id):T,M=P(w),H=L(M),q=L(w),U=k?q:H,W=T=>{if(n&&T.created_by&&T.created_by!==n)return;const G=T.id===j;if(f(T.id),!G)return;const Y=hl(U,T.id,n);v(),Y?x(Y.id,Y.virtual_mcp_id):h({to:"/$org",params:{org:l.slug}})},Q=T=>{v(),x(T.id,T.virtual_mcp_id)},B=async T=>{try{const G=await i.callTool({name:"COLLECTION_THREAD_MESSAGES_LIST",arguments:{thread_id:T,limit:1,offset:0}});return((G.structuredContent??G).items?.length??0)===0}catch{return!1}},ae=async()=>{const T=y??r;de("sidebar_new_thread_clicked",{virtual_mcp_id:T});const G=M.find(Y=>Y.virtual_mcp_id===T&&Y.title==="New chat");if(G&&await B(G.id)){v(),x(G.id,T);return}v(),b(T)},{state:ye,isMobile:V,toggleSidebar:J}=ge();if(ye==="collapsed"&&!V){const T=Xe(l.id),G=new Map((o??[]).map(K=>[K.id,K])),Y=K=>(K?G.get(K):void 0)??(K===r?T:void 0);return s.jsxs(me,{className:"min-h-0 gap-1.5 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[s.jsx(X,{children:s.jsx(te,{"aria-label":"Toggle sidebar",tooltip:"Toggle sidebar",onClick:J,children:s.jsx(Zt,{size:16})})}),s.jsx(X,{children:s.jsx(te,{tooltip:"New thread",onClick:()=>{ae()},children:s.jsx(It,{size:16})})}),U.map(K=>{const be=Y(K.virtual_mcp_id);return s.jsx(X,{children:s.jsx(te,{tooltip:K.title||"New chat",isActive:K.id===j,onClick:()=>Q(K),children:s.jsx(ve,{icon:be?.icon??null,name:be?.title??"Agent",size:"2xs"})})},K.id)})]})}const Z=S!=="flat"||C!=="all"||k===!0,ne=s.jsxs(Qe,{children:[s.jsxs(he,{children:[s.jsx(ue,{asChild:!0,children:s.jsx(Ee,{asChild:!0,children:s.jsxs(je,{"aria-label":"Filter threads",active:Z,children:[s.jsx(Sn,{size:16}),Z&&s.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"})]})})}),s.jsx(fe,{side:"bottom",children:"Filter threads"})]}),s.jsxs(Je,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[s.jsx(it,{label:"View",value:S,onChange:T=>{de("tasks_panel_group_by_changed",{to_value:T}),A(T)},options:[{value:"flat",label:"List",icon:s.jsx(mn,{size:13})},{value:"status",label:"Status",icon:s.jsx(un,{size:13})}]}),s.jsx(it,{label:"Type",value:C,onChange:T=>{de("tasks_panel_filter_changed",{to_value:T}),N(T)},options:[{value:"all",label:"All"},{value:"manual",label:"Chats"},{value:"automation",label:"Auto"}]}),s.jsx(it,{label:"Scope",value:k?"team":"mine",onChange:T=>z(T==="team"),options:[{value:"mine",label:"Mine"},{value:"team",label:"Team"}]})]})]}),se=T=>s.jsx(at,{delayDuration:300,children:s.jsxs("div",{className:D("shrink-0 px-1 flex items-center justify-between",T?"h-10":"h-10 md:h-7 mb-2"),children:[s.jsxs("div",{className:"flex items-center gap-0.5",children:[!T&&s.jsx(as,{}),ne]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx(qt,{label:"Search threads",onClick:()=>{de("tasks_panel_search_opened"),F(!0),I(!0)},children:s.jsx(dn,{size:16})}),s.jsx(qt,{label:"New thread",onClick:()=>{ae()},children:s.jsx(It,{size:16})})]})]})});return V?s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[se(!0),s.jsx(Et,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain px-1 h-full",children:s.jsx(Wt,{threads:U,groupBy:S,activeTaskId:j,onSelectTask:Q,onArchiveTask:W,filters:E,hasMore:m,isFetchingMore:c,onLoadMore:()=>{d()},filtersActive:Z})}),O&&s.jsx(Lt,{open:_,onOpenChange:I})]}):s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[se(!1),s.jsx("div",{className:"flex-1 min-h-0 flex flex-col gap-0.5 -mr-2 pr-2",children:s.jsx(Et,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain h-full",children:s.jsx(Wt,{threads:U,groupBy:S,activeTaskId:j,onSelectTask:Q,onArchiveTask:W,filters:E,hasMore:m,isFetchingMore:c,onLoadMore:()=>{d()},filtersActive:Z})})}),O&&s.jsx(Lt,{open:_,onOpenChange:I})]})}const pl=5,gl=[{nameWidth:"w-24",taskRows:2},{nameWidth:"w-28",taskRows:0},{nameWidth:"w-20",taskRows:1},{nameWidth:"w-32",taskRows:0},{nameWidth:"w-24",taskRows:0}];function Ss(){const t=$.c(3),{state:e}=ge();if(e==="collapsed"){let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex flex-col gap-1.5",children:Array.from({length:pl}).map(vl)}),t[0]=i):i=t[0],i}let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"shrink-0 px-1 h-10 md:h-7 mb-2 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(le,{className:"size-6 rounded-md"}),s.jsx(le,{className:"size-6 rounded-md"}),s.jsx(le,{className:"size-6 rounded-md"})]}),s.jsx(le,{className:"h-6 w-20 rounded-md"})]}),t[1]=n):n=t[1];let l;return t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[n,s.jsx("div",{className:"flex flex-col gap-0.5",children:gl.map(bl)})]}),t[2]=l):l=t[2],l}function bl(t,e){return s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[s.jsx(le,{className:"size-5 rounded-full shrink-0"}),s.jsx(le,{className:D("h-3",t.nameWidth,"rounded-sm")})]}),t.taskRows>0&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:Array.from({length:t.taskRows}).map(jl)})]},e)}function jl(t,e){return s.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:s.jsx(le,{className:"h-3 flex-1 rounded-sm"})},e)}function vl(t,e){return s.jsx(le,{className:"size-10 rounded-lg mx-auto"},e)}function yl(){const t=$.c(4),e=us();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(qi,{}),t[0]=n):n=t[0];let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Yt,{children:s.jsx(R.Suspense,{fallback:s.jsx(Ss,{}),children:s.jsx(ys,{})})}),t[1]=l):l=t[1];let i;return t[2]!==e?(i=s.jsx(cs,{children:s.jsx(xs,{sections:e,footer:n,additionalContent:l})}),t[2]=e,t[3]=i):i=t[3],i}function Sl(t){const e=$.c(8),{onClose:n}=t,l=us();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ki,{}),e[0]=i):i=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ss,{}),e[1]=r):r=e[1];let o;e[2]!==n?(o=s.jsx(Yt,{children:s.jsx(R.Suspense,{fallback:r,children:s.jsx(ys,{onNavigate:n})})}),e[2]=n,e[3]=o):o=e[3];let a;return e[4]!==n||e[5]!==l||e[6]!==o?(a=s.jsx(cs,{children:s.jsx(Pi,{sections:l,onClose:n,footer:i,additionalContent:o})}),e[4]=n,e[5]=l,e[6]=o,e[7]=a):a=e[7],a}function Ns(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Nl=Fs({name:Es().min(2,"Organization name is required")});function _l(t){const e=$.c(41),{open:n,onOpenChange:l}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={resolver:Ls(Nl),defaultValues:{name:""}},e[0]=i):i=e[0];const r=Rs(i);let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={mutationFn:wl,onSuccess:Cl},e[1]=o):o=e[1];const a=Bs(o),m=a.error instanceof Error?a.error.message:a.error?"Failed to create organization.":null;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsxs(ri,{children:[s.jsx(oi,{children:"Create a new organization"}),s.jsx(ai,{children:"Set up a new organization to collaborate with others."})]}),e[2]=c):c=e[2];let d;if(e[3]!==a||e[4]!==r){let N;e[6]!==a?(N=S=>a.mutateAsync(S),e[6]=a,e[7]=N):N=e[7],d=r.handleSubmit(N),e[3]=a,e[4]=r,e[5]=d}else d=e[5];let u;e[8]!==r.formState.isSubmitting?(u=N=>{const{field:S}=N;return s.jsxs(fi,{children:[s.jsx(hi,{children:"Organization Name"}),s.jsx(xi,{children:s.jsx(bi,{...S,placeholder:"Acme Inc.",disabled:r.formState.isSubmitting})}),s.jsx(pi,{children:"The name of your company or organization"}),S.value&&s.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Organization URL:"," ",s.jsxs("span",{className:"font-mono",children:[typeof window<"u"?globalThis.location.origin:"","/",Ns(S.value)]})]}),s.jsx(gi,{})]})},e[8]=r.formState.isSubmitting,e[9]=u):u=e[9];let f;e[10]!==r.control||e[11]!==u?(f=s.jsx(mi,{control:r.control,name:"name",render:u}),e[10]=r.control,e[11]=u,e[12]=f):f=e[12];let h;e[13]!==m?(h=m&&s.jsx("div",{className:"text-destructive text-sm mt-2",children:m}),e[13]=m,e[14]=h):h=e[14];let x;e[15]!==a||e[16]!==r?(x=()=>{a.reset(),r.reset()},e[15]=a,e[16]=r,e[17]=x):x=e[17];let b;e[18]!==r.formState.isSubmitting||e[19]!==x?(b=s.jsx(ii,{disabled:r.formState.isSubmitting,onClick:x,children:"Cancel"}),e[18]=r.formState.isSubmitting,e[19]=x,e[20]=b):b=e[20];const p=!r.formState.isValid||r.formState.isSubmitting;let g;e[21]!==r.formState.isSubmitting?(g=r.formState.isSubmitting?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(Zn,{size:"xs"})," Creating..."]}):"Create Organization",e[21]=r.formState.isSubmitting,e[22]=g):g=e[22];let j;e[23]!==p||e[24]!==g?(j=s.jsx(rt,{type:"submit",variant:"default",disabled:p,children:g}),e[23]=p,e[24]=g,e[25]=j):j=e[25];let y;e[26]!==j||e[27]!==b?(y=s.jsxs(ci,{children:[b,j]}),e[26]=j,e[27]=b,e[28]=y):y=e[28];let v;e[29]!==y||e[30]!==d||e[31]!==f||e[32]!==h?(v=s.jsxs("form",{className:"space-y-6",onSubmit:d,autoComplete:"off",children:[f,h,y]}),e[29]=y,e[30]=d,e[31]=f,e[32]=h,e[33]=v):v=e[33];let w;e[34]!==r||e[35]!==v?(w=s.jsxs(li,{children:[c,s.jsx(ui,{...r,children:v})]}),e[34]=r,e[35]=v,e[36]=w):w=e[36];let C;return e[37]!==l||e[38]!==n||e[39]!==w?(C=s.jsx(di,{open:n,onOpenChange:l,children:w}),e[37]=l,e[38]=n,e[39]=w,e[40]=C):C=e[40],C}function Cl(t){const{orgSlug:e}=t;window.location.href=`/${e}`}async function wl(t){const e=Ns(t.name);if(!e)throw new Error("Organization slug is invalid");const n=await re.organization.create({name:t.name,slug:e});if(n?.error)throw new Error(n.error.message||"Failed to create organization");const l=n?.data?.slug??e;if(!l)throw new Error("Failed to create organization");return{orgSlug:l}}function _s(){const t=R.useContext(Hs),{data:e,refetch:n}=t.hooks.useListUserInvitations();return{invitations:(e??[]).filter(i=>i.status==="pending"&&new Date(i.expiresAt)>new Date),refetch:()=>n?.()}}function kl(t){let e=0;for(let l=0;l<t.length;l++)e=t.charCodeAt(l)+((e<<5)-e);const n=Math.abs(e)%360;return{backgroundColor:`hsl(${n} 55% 70%)`,color:`hsl(${n} 55% 20%)`}}function _t(t){const e=$.c(13),{org:n,size:l}=t,i=l===void 0?"sm":l,r=i==="xs"?"size-5":"size-6",o=i==="xs"?"text-[9px]":"text-xs";let a;e[0]!==r?(a=D(r,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=r,e[1]=a):a=e[1];let m;e[2]!==n.logo||e[3]!==n.name?(m=n.logo?void 0:kl(n.name),e[2]=n.logo,e[3]=n.name,e[4]=m):m=e[4];let c;e[5]!==n.logo||e[6]!==n.name||e[7]!==o?(c=n.logo?s.jsx("img",{src:n.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:D("font-semibold leading-none",o),children:n.name.slice(0,2).toUpperCase()}),e[5]=n.logo,e[6]=n.name,e[7]=o,e[8]=c):c=e[8];let d;return e[9]!==a||e[10]!==m||e[11]!==c?(d=s.jsx("div",{className:a,style:m,children:c}),e[9]=a,e[10]=m,e[11]=c,e[12]=d):d=e[12],d}function Al({invitation:t,onChanged:e}){const[n,l]=R.useState(!1),i=t.organizationName??"Unknown organization",r=async()=>{l(!0);try{const m=await re.organization.acceptInvitation({invitationId:t.id});if(m.error){ie.error(m.error.message),l(!1);return}}catch{ie.error("Failed to accept invitation"),l(!1);return}ie.success(`Joined ${i}`),Us();let a;try{a=(await re.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=a?`/${a}`:"/"},o=async()=>{l(!0);try{const a=await re.organization.rejectInvitation({invitationId:t.id});if(a.error){ie.error(a.error.message),l(!1);return}ie.success("Invitation declined"),l(!1),e()}catch{ie.error("Failed to decline invitation"),l(!1)}};return s.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[s.jsx(_t,{org:{name:i},size:"sm"}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"truncate text-sm font-medium",children:i}),s.jsx("p",{className:"truncate text-xs text-muted-foreground",children:"Invited to join"})]}),s.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[s.jsx(rt,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:r,disabled:n,children:"Accept"}),s.jsx(rt,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:o,disabled:n,"aria-label":`Decline invitation to ${i}`,children:s.jsx(ni,{size:14})})]})]})}function Il(t){const e=$.c(29),{orgParam:n,onSelectOrg:l,onCreateOrg:i}=t,{data:r}=Gs(),{invitations:o,refetch:a}=_s();let m;e[0]!==n?(m=(_,I)=>_.slug===n?-1:I.slug===n?1:_.name.localeCompare(I.name),e[0]=n,e[1]=m):m=e[1];const c=[...r??[]].sort(m),[d,u]=R.useState(""),f=d.toLowerCase(),h=f?c.filter(_=>_.name.toLowerCase().includes(f)||_.slug.toLowerCase().includes(f)):c;let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ms,{size:16,className:"shrink-0 text-muted-foreground/60"}),e[2]=x):x=e[2];let b;e[3]===Symbol.for("react.memo_cache_sentinel")?(b=_=>u(_.target.value),e[3]=b):b=e[3];let p;e[4]!==d?(p=_=>_.key==="Escape"&&d&&u(""),e[4]=d,e[5]=p):p=e[5];let g;e[6]!==d||e[7]!==p?(g=s.jsx("input",{"data-org-switcher-search":!0,autoFocus:!0,type:"text",value:d,onChange:b,onKeyDown:p,placeholder:"Search organizations...",className:"flex-1 min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60"}),e[6]=d,e[7]=p,e[8]=g):g=e[8];let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Le,{size:16}),e[9]=j):j=e[9];let y;e[10]!==i?(y=s.jsx("button",{type:"button",onClick:i,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:j}),e[10]=i,e[11]=y):y=e[11];let v;e[12]!==g||e[13]!==y?(v=s.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 border-b border-border/50",children:[x,g,y]}),e[12]=g,e[13]=y,e[14]=v):v=e[14];const w="flex-1 min-h-0 overflow-y-auto p-1.5 flex flex-col gap-1";let C;e[15]!==o||e[16]!==d||e[17]!==a?(C=!d&&o.map(_=>s.jsx(Al,{invitation:_,onChanged:a},_.id)),e[15]=o,e[16]=d,e[17]=a,e[18]=C):C=e[18];const N=h.length===0&&s.jsx("p",{className:"px-3 py-4 text-sm text-muted-foreground/60 text-center",children:d?`No organizations match "${d}"`:"No organizations available"});let S;e[19]!==l||e[20]!==n?(S=_=>s.jsxs("button",{type:"button",onClick:()=>l(_.slug),className:D("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",_.slug===n?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50"),children:[s.jsx(_t,{org:_,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:_.name}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:_.slug})]}),_.slug===n&&s.jsx(ds,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},_.id),e[19]=l,e[20]=n,e[21]=S):S=e[21];const A=h.map(S);let k;e[22]!==C||e[23]!==N||e[24]!==A?(k=s.jsxs("div",{className:w,children:[C,N,A]}),e[22]=C,e[23]=N,e[24]=A,e[25]=k):k=e[25];let z;return e[26]!==k||e[27]!==v?(z=s.jsxs(s.Fragment,{children:[v,k]}),e[26]=k,e[27]=v,e[28]=z):z=e[28],z}function zl(t){const e=$.c(22),{trigger:n,orgParam:l,align:i,side:r}=t,o=i===void 0?"start":i,a=r===void 0?"bottom":r,m=pe(),[c,d]=R.useState(!1),[u,f]=R.useState(!1);let h;e[0]!==n?(h=s.jsx(Ee,{asChild:!0,children:n}),e[0]=n,e[1]=h):h=e[1];const x=String(c);let b;e[2]!==m?(b=C=>{d(!1),m({to:"/$org",params:{org:C}})},e[2]=m,e[3]=b):b=e[3];let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{d(!1),f(!0)},e[4]=p):p=e[4];let g;e[5]!==l||e[6]!==x||e[7]!==b?(g=s.jsx(Il,{orgParam:l,onSelectOrg:b,onCreateOrg:p},x),e[5]=l,e[6]=x,e[7]=b,e[8]=g):g=e[8];let j;e[9]!==o||e[10]!==a||e[11]!==g?(j=s.jsx(Je,{side:a,align:o,sideOffset:8,collisionPadding:16,className:"w-[300px] p-0 flex flex-col max-h-[440px]",onOpenAutoFocus:Tl,onCloseAutoFocus:$l,children:g}),e[9]=o,e[10]=a,e[11]=g,e[12]=j):j=e[12];let y;e[13]!==c||e[14]!==h||e[15]!==j?(y=s.jsxs(Qe,{open:c,onOpenChange:d,children:[h,j]}),e[13]=c,e[14]=h,e[15]=j,e[16]=y):y=e[16];let v;e[17]!==u?(v=s.jsx(_l,{open:u,onOpenChange:f}),e[17]=u,e[18]=v):v=e[18];let w;return e[19]!==v||e[20]!==y?(w=s.jsxs(s.Fragment,{children:[y,v]}),e[19]=v,e[20]=y,e[21]=w):w=e[21],w}function $l(t){return t.preventDefault()}function Tl(t){t.preventDefault(),t.currentTarget?.querySelector("[data-org-switcher-search]")?.focus()}function Ml(t){const e=$.c(21),{value:n,onChange:l,placeholder:i,onKeyDown:r,className:o,isSearching:a,disabled:m}=t,c=i===void 0?"Search...":i;let d;e[0]!==o?(d=D("shrink-0 w-full border-b border-border h-12",o),e[0]=o,e[1]=d):d=e[1];const u=m?"cursor-not-allowed opacity-50":"cursor-text";let f;e[2]!==u?(f=D("flex items-center gap-2.5 h-12 px-4",u),e[2]=u,e[3]=f):f=e[3];let h;e[4]!==a?(h=a?s.jsx(Vt,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):s.jsx(ms,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=a,e[5]=h):h=e[5];let x;e[6]!==l?(x=j=>l(j.target.value),e[6]=l,e[7]=x):x=e[7];let b;e[8]!==m||e[9]!==r||e[10]!==c||e[11]!==x||e[12]!==n?(b=s.jsx("input",{type:"text",value:n,onChange:x,onKeyDown:r,placeholder:c,disabled:m,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=m,e[9]=r,e[10]=c,e[11]=x,e[12]=n,e[13]=b):b=e[13];let p;e[14]!==f||e[15]!==h||e[16]!==b?(p=s.jsxs("label",{className:f,children:[h,b]}),e[14]=f,e[15]=h,e[16]=b,e[17]=p):p=e[17];let g;return e[18]!==d||e[19]!==p?(g=s.jsx("div",{className:d,children:p}),e[18]=d,e[19]=p,e[20]=g):g=e[20],g}const Ol="Select an existing agent";function Pl(t){const e=$.c(5),{children:n}=t;let l;e[0]!==n?(l=s.jsx(ue,{asChild:!0,children:n}),e[0]=n,e[1]=l):l=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(fe,{side:"right",sideOffset:8,children:Ol}),e[2]=i):i=e[2];let r;return e[3]!==l?(r=s.jsxs(he,{defaultOpen:!0,delayDuration:0,children:[l,i]}),e[3]=l,e[4]=r):r=e[4],r}function Dl(t){const e=pe(),{create:n}=ls(),{locator:l}=oe(),i=ft({strict:!1}),r=ht({strict:!1});return async o=>{const a=crypto.randomUUID(),m=o===r.virtualmcpid?$n(t,l,i.taskId??""):null;try{await n({id:a,virtual_mcp_id:o,...m?{branch:m}:{}})}catch{}e({to:"/$org/$taskId",params:{org:t,taskId:a},search:{virtualmcpid:o}})}}function lt(t){const e=$.c(20),{agent:n,selected:l,onClick:i}=t,r=l?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let o;e[0]!==r?(o=D("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",r),e[0]=r,e[1]=o):o=e[1];let a;e[2]!==n.icon||e[3]!==n.title?(a=s.jsx(ve,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[2]=n.icon,e[3]=n.title,e[4]=a):a=e[4];let m;e[5]!==n.title?(m=s.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[5]=n.title,e[6]=m):m=e[6];let c;e[7]!==n.description?(c=n.description&&s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n.description}),e[7]=n.description,e[8]=c):c=e[8];let d;e[9]!==m||e[10]!==c?(d=s.jsxs("div",{className:"flex-1 min-w-0",children:[m,c]}),e[9]=m,e[10]=c,e[11]=d):d=e[11];let u;e[12]!==l?(u=l&&s.jsx(ds,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=l,e[13]=u):u=e[13];let f;return e[14]!==i||e[15]!==o||e[16]!==a||e[17]!==d||e[18]!==u?(f=s.jsxs("button",{type:"button",onClick:i,className:o,children:[a,d,u]}),e[14]=i,e[15]=o,e[16]=a,e[17]=d,e[18]=u,e[19]=f):f=e[19],f}function Kt(t){const e=$.c(5),{children:n,action:l}=t;let i;e[0]!==n?(i=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n}),e[0]=n,e[1]=i):i=e[1];let r;return e[2]!==l||e[3]!==i?(r=s.jsxs("div",{className:"flex items-center justify-between px-3 pb-1 pt-2",children:[i,l]}),e[2]=l,e[3]=i,e[4]=r):r=e[4],r}function Fl(t){const e=$.c(27),{onClose:n,onSelectAgent:l,selectedAgentId:i,onImportFromGithub:r}=t,[o,a]=R.useState(""),m=is(),c=m??[],{org:d}=oe(),{data:u}=re.useSession(),f=u?.user?.id??"anon",h=Yn(m),x=Qn(),b=Dl(d.slug),p=jn(m),g=o.toLowerCase(),j=c.filter(Bl).filter(B=>!p.has(B.id)).filter(Rl).filter(B=>!o||B.title.toLowerCase().includes(g)),y=j.filter(Ll),v=j.filter(El),w=Xe(d.id),C=!o||w.title.toLowerCase().includes(g),N=!!(l&&C);let S;e[0]!==n||e[1]!==l?(S=()=>{l?.(null),n(),a("")},e[0]=n,e[1]=l,e[2]=S):S=e[2];const A=S,k=B=>{if(l){l(B.id),n(),a("");return}Jn({orgId:d.id,userId:f},B.id,h),x(),n(),a(""),b(B.id)},z="flex flex-col max-h-[min(640px,80dvh)]";let _;e[3]!==o?(_=s.jsx(Ml,{value:o,onChange:a,placeholder:"Search agents..."}),e[3]=o,e[4]=_):_=e[4];const I="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-0.5",O=l&&C&&w&&s.jsx(lt,{agent:w,selected:!i||i===w.id,onClick:A}),F=v.length>0&&s.jsx(Kt,{children:"Agents"}),E=v.map(B=>s.jsx(lt,{agent:B,selected:l?i===B.id:void 0,onClick:()=>k(B)},B.id)),P=(y.length>0||!o)&&s.jsx(Kt,{action:s.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",children:[s.jsx(vi,{className:"size-3.5"}),"Import"]}),children:"Code Agents"}),L=y.map(B=>s.jsx(lt,{agent:B,selected:l?i===B.id:void 0,onClick:()=>k(B)},B.id));let M;e[5]!==N||e[6]!==o||e[7]!==j.length?(M=j.length===0&&!N&&o&&s.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:"No agents found"}),e[5]=N,e[6]=o,e[7]=j.length,e[8]=M):M=e[8];let H;e[9]!==M||e[10]!==O||e[11]!==F||e[12]!==E||e[13]!==P||e[14]!==L?(H=s.jsxs("div",{className:I,children:[O,F,E,P,L,M]}),e[9]=M,e[10]=O,e[11]=F,e[12]=E,e[13]=P,e[14]=L,e[15]=H):H=e[15];let q;e[16]!==d.slug?(q={org:d.slug},e[16]=d.slug,e[17]=q):q=e[17];let U;e[18]!==n?(U=()=>n(),e[18]=n,e[19]=U):U=e[19];let W;e[20]!==q||e[21]!==U?(W=s.jsx("div",{className:"border-t border-border px-3 py-2.5",children:s.jsx(Ws,{to:"/$org/settings/agents",params:q,onClick:U,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:"See all agents"})}),e[20]=q,e[21]=U,e[22]=W):W=e[22];let Q;return e[23]!==H||e[24]!==W||e[25]!==_?(Q=s.jsxs("div",{className:z,children:[_,H,W]}),e[23]=H,e[24]=W,e[25]=_,e[26]=Q):Q=e[26],Q}function El(t){return!ns(t.metadata)}function Ll(t){return ns(t.metadata)}function Rl(t){return!An(t.id)}function Bl(t){return!kn(t.id)}function Hl(t){const e=$.c(31);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{compact:l,trigger:i,onSelectAgent:r,selectedAgentId:o,side:a,align:m}=n,c=l===void 0?!1:l,d=a===void 0?"right":a,u=m===void 0?"start":m,[f,h]=R.useState(!1),[x,b]=R.useState(!1),p=gt(),{setOpenMobile:g}=ge(),j=Vn(),y=j?"border border-border":void 0;let v;e[2]!==j?(v=F=>j?s.jsx(Pl,{children:F}):F,e[2]=j,e[3]=v):v=e[3];const w=v;let C;e[4]!==p||e[5]!==g?(C=()=>{h(!1),p&&g(!1)},e[4]=p,e[5]=g,e[6]=C):C=e[6];const N=C;let S;e[7]!==N?(S=()=>{N(),b(!0)},e[7]=N,e[8]=S):S=e[8];const A=S;let k;e[9]!==N||e[10]!==A||e[11]!==r||e[12]!==f||e[13]!==o?(k=f&&s.jsx(R.Suspense,{fallback:s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx(le,{className:"h-4 w-24"})}),children:s.jsx(Fl,{onClose:N,onSelectAgent:r,selectedAgentId:o,onImportFromGithub:A})}),e[9]=N,e[10]=A,e[11]=r,e[12]=f,e[13]=o,e[14]=k):k=e[14];const z=k;let _;e[15]!==u||e[16]!==c||e[17]!==y||e[18]!==j||e[19]!==p||e[20]!==f||e[21]!==z||e[22]!==d||e[23]!==i||e[24]!==w?(_=p?s.jsxs(s.Fragment,{children:[i?s.jsx("button",{type:"button",onClick:()=>h(!0),className:"contents",children:i}):c?w(s.jsx(je,{"aria-label":"Browse agents",className:D(y),onClick:()=>{de("agent_browser_opened",{surface:"mobile_drawer"}),h(!0)},children:s.jsx(Le,{className:"size-4"})})):s.jsx(X,{children:w(s.jsxs(te,{tooltip:j?void 0:"Browse agents",className:D(y),onClick:()=>{de("agent_browser_opened",{surface:"mobile_drawer"}),h(!0)},children:[s.jsx(Le,{}),s.jsx("span",{children:"New agent"})]}))}),s.jsx(es,{open:f,onOpenChange:h,direction:"bottom",children:s.jsxs(ts,{className:"max-h-[85dvh] p-0",children:[s.jsx(ss,{className:"sr-only",children:"Browse agents"}),z]})})]}):s.jsxs(Qe,{open:f,onOpenChange:F=>{F&&!f&&de("agent_browser_opened",{surface:"desktop_popover"}),h(F)},children:[i?s.jsx(Ee,{asChild:!0,children:i}):c?w(s.jsx(Ee,{asChild:!0,children:s.jsx(je,{"aria-label":"Browse agents",className:D(y),children:s.jsx(Le,{className:"size-4"})})})):s.jsx(X,{children:w(s.jsx(Ee,{asChild:!0,children:s.jsxs(te,{tooltip:j?void 0:"Browse agents",className:D(y),children:[s.jsx(Le,{}),s.jsx("span",{children:"New agent"})]})}))}),s.jsx(Je,{className:"w-[380px] p-0 overflow-hidden",side:d,align:u,children:z})]}),e[15]=u,e[16]=c,e[17]=y,e[18]=j,e[19]=p,e[20]=f,e[21]=z,e[22]=d,e[23]=i,e[24]=w,e[25]=_):_=e[25];let I;e[26]!==x?(I=s.jsx(ji,{open:x,onOpenChange:b,mode:"agent"}),e[26]=x,e[27]=I):I=e[27];let O;return e[28]!==I||e[29]!==_?(O=s.jsxs(s.Fragment,{children:[_,I]}),e[28]=I,e[29]=_,e[30]=O):O=e[30],O}const Gl="wco-no-drag inline-flex items-center gap-1.5 min-w-0 rounded-md px-2 py-1.5 text-sm text-foreground hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50";function Ul(t){const e=$.c(19),{agentId:n,fallback:l,onOpenHome:i,onPick:r}=t,o=jt(n)??l??null,a=o?.title??"Super Agent",m=`Open ${a} home`,c=o?.icon??null;let d;e[0]!==c||e[1]!==a?(d=s.jsx(ve,{icon:c,name:a,size:"xs"}),e[0]=c,e[1]=a,e[2]=d):d=e[2];let u;e[3]!==i||e[4]!==m||e[5]!==d?(u=s.jsx("button",{type:"button",onClick:i,"aria-label":m,className:"wco-no-drag flex items-center shrink-0 rounded-md p-1 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:d}),e[3]=i,e[4]=m,e[5]=d,e[6]=u):u=e[6];let f;e[7]!==a?(f=s.jsx("span",{className:"truncate font-medium max-w-[10rem]",children:a}),e[7]=a,e[8]=f):f=e[8];let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(St,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[9]=h):h=e[9];let x;e[10]!==f?(x=s.jsxs("button",{type:"button",className:Gl,children:[f,h]}),e[10]=f,e[11]=x):x=e[11];let b;e[12]!==n||e[13]!==r||e[14]!==x?(b=s.jsx(Hl,{side:"bottom",align:"start",selectedAgentId:n,onSelectAgent:r,trigger:x}),e[12]=n,e[13]=r,e[14]=x,e[15]=b):b=e[15];let p;return e[16]!==u||e[17]!==b?(p=s.jsxs("div",{className:"flex items-center gap-1",children:[u,b]}),e[16]=u,e[17]=b,e[18]=p):p=e[18],p}function Xt(){const t=$.c(44),{org:e}=oe(),{state:n,isMobile:l}=ge(),i=pe();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[0]=r):r=t[0];const o=ft(r);let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},t[1]=a):a=t[1];const m=ht(a),{threads:c}=vt(),{data:d}=re.useSession(),{setTaskId:u,createNewTask:f}=yt(),h=_s().invitations.length>0,x=n==="collapsed"||l;let b;t[2]!==e.id?(b=Xe(e.id),t[2]=e.id,t[3]=b):b=t[3];const p=b,g=p.id,j=o.taskId?m.virtualmcpid??g:g;let y;t[4]!==f||t[5]!==g||t[6]!==i||t[7]!==e.slug||t[8]!==d?.user?.id||t[9]!==u||t[10]!==c?(y=M=>{if(!M||M===g){i({to:"/$org",params:{org:e.slug}});return}const H=yi(c,M,d?.user?.id);H?u(H.id,M):f(M)},t[4]=f,t[5]=g,t[6]=i,t[7]=e.slug,t[8]=d?.user?.id,t[9]=u,t[10]=c,t[11]=y):y=t[11];const v=y,w=h?`${e.name} — switch organization (pending invitation)`:`${e.name} — switch organization`;let C;t[12]!==e?(C=s.jsx(_t,{org:e,size:"sm"}),t[12]=e,t[13]=C):C=t[13];let N;t[14]!==h||t[15]!==x?(N=h&&s.jsx("span",{className:D("absolute -right-1 size-2.5 rounded-full bg-destructive ring-2 ring-background",x?"-top-1":"top-1/2 -translate-y-1/2")}),t[14]=h,t[15]=x,t[16]=N):N=t[16];let S;t[17]!==C||t[18]!==N?(S=s.jsxs("span",{className:"relative inline-flex",children:[C,N]}),t[17]=C,t[18]=N,t[19]=S):S=t[19];let A;t[20]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(St,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),t[20]=A):A=t[20];let k;t[21]!==w||t[22]!==S?(k=s.jsx(ue,{asChild:!0,children:s.jsxs("button",{type:"button","aria-label":w,className:"wco-no-drag flex items-center gap-1.5 shrink-0 rounded-md pl-3 pr-1.5 py-1.5 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:[S,A]})}),t[21]=w,t[22]=S,t[23]=k):k=t[23];let z;t[24]!==e.slug||t[25]!==k?(z=s.jsx(zl,{orgParam:e.slug,trigger:k}),t[24]=e.slug,t[25]=k,t[26]=z):z=t[26];let _;t[27]!==e.name?(_=s.jsx(fe,{side:"bottom",children:e.name}),t[27]=e.name,t[28]=_):_=t[28];let I;t[29]!==z||t[30]!==_?(I=s.jsx($t,{children:s.jsxs(he,{children:[z,_]})}),t[29]=z,t[30]=_,t[31]=I):I=t[31];let O;t[32]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx("span",{className:"h-5 w-24 rounded bg-muted animate-pulse"}),t[32]=O):O=t[32];const F=j===g?p:void 0;let E;t[33]!==j||t[34]!==v?(E=()=>v(j),t[33]=j,t[34]=v,t[35]=E):E=t[35];let P;t[36]!==j||t[37]!==v||t[38]!==F||t[39]!==E?(P=s.jsx($t,{children:s.jsx(R.Suspense,{fallback:O,children:s.jsx(Ul,{agentId:j,fallback:F,onOpenHome:E,onPick:v})})}),t[36]=j,t[37]=v,t[38]=F,t[39]=E,t[40]=P):P=t[40];let L;return t[41]!==I||t[42]!==P?(L=s.jsx(ti,{className:"wco-no-drag",children:s.jsxs(si,{className:"flex-nowrap gap-1.5 sm:gap-1.5",children:[I,P]})}),t[41]=I,t[42]=P,t[43]=L):L=t[43],L}const Wl="sidebar.open";function ql(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Ks,{}),t[0]=e):e=t[0],e}function oa(){const t=$.c(27),e=gt(),n=Si(),[l,i]=Ye(Wl,!1),{width:r,wrapperRef:o,onStartResize:a,resetWidth:m}=wi();let c;t[0]!==e||t[1]!==n?(c=e?s.jsxs(ee.Header,{className:"grid-cols-1 px-1 pr-1",children:[s.jsxs("div",{className:"grid w-full grid-cols-[auto_auto_auto_1fr_auto_auto] items-center gap-2",children:[!n&&s.jsx(as,{}),!n&&s.jsx(Xt,{}),!n&&s.jsx(mt,{}),s.jsx("div",{"aria-hidden":!0,className:"min-w-0"}),s.jsx(ee.TogglesSlot,{}),!n&&s.jsx(ee.TabsSlot,{className:"min-w-0 justify-self-end"})]}),!n&&s.jsx(ee.CenterSlot,{}),!n&&s.jsx(ee.RightSlot,{})]}):s.jsxs(ee.Header,{children:[s.jsxs(ee.LeftColumn,{children:[!n&&s.jsx(Xt,{}),s.jsx(ee.TogglesSlot,{})]}),n?s.jsx("div",{"aria-hidden":!0}):s.jsx(ee.CenterSlot,{}),s.jsx(ee.RightColumn,{children:!n&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"min-w-0 flex-1 overflow-x-auto [scrollbar-width:none] flex justify-end items-center gap-0.5",children:s.jsx(ee.TabsSlot,{})}),s.jsx(ee.RightSlot,{})]})})]}),t[0]=e,t[1]=n,t[2]=c):c=t[2];const d=`${r}px`;let u;t[3]!==d?(u={"--sidebar-width":d,"--sidebar-width-icon":"3.5rem"},t[3]=d,t[4]=u):u=t[4];const f=u;let h;t[5]!==e||t[6]!==a||t[7]!==n||t[8]!==m?(h=!e&&!n&&s.jsxs(s.Fragment,{children:[s.jsx(yl,{}),s.jsx(Ni,{onPointerDown:a,onDoubleClick:m})]}),t[5]=e,t[6]=a,t[7]=n,t[8]=m,t[9]=h):h=t[9];let x;t[10]===Symbol.for("react.memo_cache_sentinel")?(x={background:"transparent",containerType:"inline-size"},t[10]=x):x=t[10];let b;t[11]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Ys,{className:"flex flex-col",style:x,children:s.jsx("div",{className:"flex flex-col h-full min-h-0",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s.jsx(R.Suspense,{fallback:s.jsx(ql,{}),children:s.jsx(qs,{})})})})}),t[11]=b):b=t[11];let p;t[12]!==f||t[13]!==h||t[14]!==o?(p=s.jsxs(Qs,{ref:o,className:"flex-1 bg-sidebar relative min-h-0",style:f,children:[h,b]}),t[12]=f,t[13]=h,t[14]=o,t[15]=p):p=t[15];let g;t[16]!==e||t[17]!==n?(g=e&&!n&&s.jsx(Hn,{renderSidebar:Kl}),t[16]=e,t[17]=n,t[18]=g):g=t[18];let j;t[19]!==c||t[20]!==p||t[21]!==g?(j=s.jsx(ei,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[c,p,g]})}),t[19]=c,t[20]=p,t[21]=g,t[22]=j):j=t[22];let y;return t[23]!==i||t[24]!==l||t[25]!==j?(y=s.jsx(zn,{children:s.jsx(ee.Provider,{children:s.jsx(Js,{open:l,onOpenChange:i,children:j})})}),t[23]=i,t[24]=l,t[25]=j,t[26]=y):y=t[26],y}function Kl(t){const{onClose:e}=t;return s.jsx("div",{className:"flex h-full",children:s.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:s.jsx(Sl,{onClose:e})})})}export{oa as default};
@@ -1 +1 @@
1
- import{bu as _}from"./index-2J9py-e1.js";var S={exports:{}},r={};var $;function I(){if($)return r;$=1;var m=Symbol.for("react.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),x=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function t(e){if(typeof e=="object"&&e!==null){var d=e.$$typeof;switch(d){case m:switch(e=e.type,e){case o:case s:case n:case i:case l:return e;default:switch(e=e&&e.$$typeof,e){case x:case f:case u:case p:case a:case c:return e;default:return d}}case y:return d}}}return r.ContextConsumer=f,r.ContextProvider=c,r.Element=m,r.ForwardRef=u,r.Fragment=o,r.Lazy=p,r.Memo=a,r.Portal=y,r.Profiler=s,r.StrictMode=n,r.Suspense=i,r.SuspenseList=l,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(e){return t(e)===f},r.isContextProvider=function(e){return t(e)===c},r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m},r.isForwardRef=function(e){return t(e)===u},r.isFragment=function(e){return t(e)===o},r.isLazy=function(e){return t(e)===p},r.isMemo=function(e){return t(e)===a},r.isPortal=function(e){return t(e)===y},r.isProfiler=function(e){return t(e)===s},r.isStrictMode=function(e){return t(e)===n},r.isSuspense=function(e){return t(e)===i},r.isSuspenseList=function(e){return t(e)===l},r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===o||e===s||e===n||e===i||e===l||e===R||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===a||e.$$typeof===c||e.$$typeof===f||e.$$typeof===u||e.$$typeof===b||e.getModuleId!==void 0)},r.typeOf=t,r}var v;function C(){return v||(v=1,S.exports=I()),S.exports}var g=C();const h=_(g);export{h as R,g as r};
1
+ import{bu as _}from"./index-DMCDP9dR.js";var S={exports:{}},r={};var $;function I(){if($)return r;$=1;var m=Symbol.for("react.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),x=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function t(e){if(typeof e=="object"&&e!==null){var d=e.$$typeof;switch(d){case m:switch(e=e.type,e){case o:case s:case n:case i:case l:return e;default:switch(e=e&&e.$$typeof,e){case x:case f:case u:case p:case a:case c:return e;default:return d}}case y:return d}}}return r.ContextConsumer=f,r.ContextProvider=c,r.Element=m,r.ForwardRef=u,r.Fragment=o,r.Lazy=p,r.Memo=a,r.Portal=y,r.Profiler=s,r.StrictMode=n,r.Suspense=i,r.SuspenseList=l,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(e){return t(e)===f},r.isContextProvider=function(e){return t(e)===c},r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m},r.isForwardRef=function(e){return t(e)===u},r.isFragment=function(e){return t(e)===o},r.isLazy=function(e){return t(e)===p},r.isMemo=function(e){return t(e)===a},r.isPortal=function(e){return t(e)===y},r.isProfiler=function(e){return t(e)===s},r.isStrictMode=function(e){return t(e)===n},r.isSuspense=function(e){return t(e)===i},r.isSuspenseList=function(e){return t(e)===l},r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===o||e===s||e===n||e===i||e===l||e===R||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===a||e.$$typeof===c||e.$$typeof===f||e.$$typeof===u||e.$$typeof===b||e.getModuleId!==void 0)},r.typeOf=t,r}var v;function C(){return v||(v=1,S.exports=I()),S.exports}var g=C();const h=_(g);export{h as R,g as r};