@decocms/mesh 2.121.0 → 2.122.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/dist/client/assets/{AlertCircle-BvhzS1YT.js → AlertCircle-xlmc_ewP.js} +1 -1
  2. package/dist/client/assets/{AlertOctagon-BUf3xaDz.js → AlertOctagon-D421ZtkR.js} +1 -1
  3. package/dist/client/assets/{AlertTriangle-BUE7sdod.js → AlertTriangle-Ddzav--o.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-BU2sm27g.js → ArrowLeft-Cm3_NyIq.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-CkjIXBAe.js → ArrowUp-D7gFQV8U.js} +1 -1
  6. package/dist/client/assets/{Check-DYZ8kvzv.js → Check-CwhCIsIx.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-DTVGXl8H.js → CheckCircle-gVXszZ9H.js} +1 -1
  8. package/dist/client/assets/{CheckDone01-CWio5h0R.js → CheckDone01-CZrV6JdL.js} +1 -1
  9. package/dist/client/assets/{CheckVerified02-lDwU0JKj.js → CheckVerified02-BG2LRHT3.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-DugvEHIv.js → ChevronDown-DHYql12c.js} +1 -1
  11. package/dist/client/assets/{ChevronRight-B5elpXGa.js → ChevronRight-qRilEtY5.js} +1 -1
  12. package/dist/client/assets/{Clock-BWKgsoiG.js → Clock-Ck0JfdvV.js} +1 -1
  13. package/dist/client/assets/{Code01-Dv0mdRP8.js → Code01-CJtE_l6W.js} +1 -1
  14. package/dist/client/assets/Coins01-BilMBcS0.js +1 -0
  15. package/dist/client/assets/{Container-83NFZamb.js → Container-DmRzes59.js} +1 -1
  16. package/dist/client/assets/{Copy01-CqukwIfv.js → Copy01-_H9GhcIe.js} +1 -1
  17. package/dist/client/assets/{Dataflow03-C__zTPE5.js → Dataflow03-DVn12h_U.js} +1 -1
  18. package/dist/client/assets/{DotsHorizontal-Bh5e-6rc.js → DotsHorizontal-wYWp0xyO.js} +1 -1
  19. package/dist/client/assets/{DotsVertical-jfuFTzKE.js → DotsVertical-DXaOiE8_.js} +1 -1
  20. package/dist/client/assets/{Download01-DFCfNrum.js → Download01-CYVDY-WP.js} +1 -1
  21. package/dist/client/assets/{Edit01-CO8VRSTn.js → Edit01-BNuFD-E4.js} +1 -1
  22. package/dist/client/assets/{Eye-B5D7LmIz.js → Eye-DRUYj907.js} +1 -1
  23. package/dist/client/assets/{File02-DbRoaSSj.js → File02-BTJzpWWh.js} +1 -1
  24. package/dist/client/assets/{File06-BCPbJ79i.js → File06-D7PEf5a6.js} +1 -1
  25. package/dist/client/assets/{FilterLines-C7xWgmCm.js → FilterLines-DEUbdgpO.js} +1 -1
  26. package/dist/client/assets/{Globe01-C--nEoR6.js → Globe01-D38ZY7LP.js} +1 -1
  27. package/dist/client/assets/{Globe02-CaREPjt_.js → Globe02-C1VZ1Sth.js} +1 -1
  28. package/dist/client/assets/{Grid01-BWlobPSC.js → Grid01-CSoBYZVu.js} +1 -1
  29. package/dist/client/assets/{Hash02-C8PvyKUH.js → Hash02-70NdGfYY.js} +1 -1
  30. package/dist/client/assets/{Home02-DUurisPV.js → Home02-TEl7q7Ca.js} +1 -1
  31. package/dist/client/assets/{Image01-CiXOk6aA.js → Image01-B7uGBtXf.js} +1 -1
  32. package/dist/client/assets/{Inbox01-BjRCuorQ.js → Inbox01-D4AhYFiy.js} +1 -1
  33. package/dist/client/assets/{InfoCircle-DXIZ30Xe.js → InfoCircle-1K9NYGAl.js} +1 -1
  34. package/dist/client/assets/{Key01-DGayuWvT.js → Key01-BabDlHce.js} +1 -1
  35. package/dist/client/assets/{LinkExternal01-B0wN3aw-.js → LinkExternal01-CpfoXnvY.js} +1 -1
  36. package/dist/client/assets/{List-Bm2F0wOt.js → List-FibtrqYM.js} +1 -1
  37. package/dist/client/assets/{Loading01-DVlzuDXC.js → Loading01-Bl1Pk_oo.js} +1 -1
  38. package/dist/client/assets/{Lock01-Dlsr6mr6.js → Lock01-BltwB-9b.js} +1 -1
  39. package/dist/client/assets/{Pin01-CTbGsypg.js → Pin01-BmPA32VH.js} +1 -1
  40. package/dist/client/assets/{Play--vga6A7y.js → Play-CbvJYqM5.js} +1 -1
  41. package/dist/client/assets/{Plus-BgTScIjT.js → Plus-CPirwa1w.js} +1 -1
  42. package/dist/client/assets/{RefreshCcw01-C9q1gCtA.js → RefreshCcw01-DpTBiD-b.js} +1 -1
  43. package/dist/client/assets/{RefreshCw01-DlEvV3CS.js → RefreshCw01-B1WiG0_Y.js} +1 -1
  44. package/dist/client/assets/{Rows03-BvTFjz3x.js → Rows03-CSDgVDop.js} +1 -1
  45. package/dist/client/assets/{Save01-s6loxod6.js → Save01-LUKipDfp.js} +1 -1
  46. package/dist/client/assets/{SearchMd-qPELZ8ba.js → SearchMd-CmV0Tepn.js} +1 -1
  47. package/dist/client/assets/{Settings01-B3ha2umj.js → Settings01-C0WLxd49.js} +1 -1
  48. package/dist/client/assets/{Shield01-CmaBuhqg.js → Shield01-BbVNhLRQ.js} +1 -1
  49. package/dist/client/assets/{Terminal-CLx6qyUj.js → Terminal-BNbAKfj5.js} +1 -1
  50. package/dist/client/assets/{Tool01-BBuFYp2z.js → Tool01-XlUnVTZF.js} +1 -1
  51. package/dist/client/assets/{Trash01-BwVrCeYG.js → Trash01-CsD9CMZr.js} +1 -1
  52. package/dist/client/assets/{Upload01-O1LTk7kl.js → Upload01-Tev8kZ4-.js} +1 -1
  53. package/dist/client/assets/{Users03-mLhLYYpx.js → Users03-B5yv7ula.js} +1 -1
  54. package/dist/client/assets/{XCircle-DYabZgm3.js → XCircle-BGdKXUli.js} +1 -1
  55. package/dist/client/assets/{XClose-CUkPQHX7.js → XClose-CBFYdEvF.js} +1 -1
  56. package/dist/client/assets/{agent-connections-preview-C0ZC1Uys.js → agent-connections-preview-CDXgp0lX.js} +1 -1
  57. package/dist/client/assets/{agent-detail-PNk7yJqH.js → agent-detail-H6KClcRl.js} +1 -1
  58. package/dist/client/assets/{agents-BgVLYh1H.js → agents-DMasQsS6.js} +1 -1
  59. package/dist/client/assets/{alert-dialog-IbckaySD.js → alert-dialog-DB07UdJN.js} +1 -1
  60. package/dist/client/assets/{auth-catchall-DnzAukzZ.js → auth-catchall-vsfBBopf.js} +1 -1
  61. package/dist/client/assets/{avatar-De3rgEZe.js → avatar-DlH0tlJW.js} +1 -1
  62. package/dist/client/assets/{badge-Dic8iag_.js → badge-DApFAaFp.js} +1 -1
  63. package/dist/client/assets/{binder-kzm2-hR4.js → binder-DA98_oix.js} +1 -1
  64. package/dist/client/assets/{breadcrumb-DA-aLp2Z.js → breadcrumb-rKBAWCrS.js} +1 -1
  65. package/dist/client/assets/{button-COjpHvkK.js → button-CZPRmDPf.js} +1 -1
  66. package/dist/client/assets/{card-BiC_BjTe.js → card-RVty8OZv.js} +1 -1
  67. package/dist/client/assets/chart-IzVtzoKL.js +15 -0
  68. package/dist/client/assets/{checkbox-pPAN-LtC.js → checkbox-BcFea8vV.js} +1 -1
  69. package/dist/client/assets/{circle-alert-D41wsw8X.js → circle-alert-D5ZoEK1D.js} +1 -1
  70. package/dist/client/assets/{collection-detail-CTsvweAq.js → collection-detail-D6YGM3Fm.js} +2 -2
  71. package/dist/client/assets/{collection-tab-C561L5WF.js → collection-tab-B5SlZhK5.js} +1 -1
  72. package/dist/client/assets/{collection-table-wrapper-qfYRj5nQ.js → collection-table-wrapper-Dg5F9IdT.js} +1 -1
  73. package/dist/client/assets/{collection-tabs-CZ7jNcIU.js → collection-tabs-DBVkuHlL.js} +1 -1
  74. package/dist/client/assets/{command-CpW6wMAK.js → command-BsoFq-dz.js} +1 -1
  75. package/dist/client/assets/{connect-BOSD5VhT.js → connect-Bu-5xEzi.js} +1 -1
  76. package/dist/client/assets/{connection-card-ClRCfHxD.js → connection-card-DzedQCif.js} +1 -1
  77. package/dist/client/assets/connection-detail-CbVv5VEj.js +1 -0
  78. package/dist/client/assets/{connections-BJH0-etY.js → connections-C2FCZthc.js} +1 -1
  79. package/dist/client/assets/constants-BHCPzANQ.js +1 -0
  80. package/dist/client/assets/{constants-D-wlluJ1.js → constants-C2M7RsNt.js} +1 -1
  81. package/dist/client/assets/{context-JZ9bzUIC.js → context-BgVlhaqT.js} +1 -1
  82. package/dist/client/assets/{create-organization-dialog-CtvnKlw-.js → create-organization-dialog-Cwe3EZ2W.js} +1 -1
  83. package/dist/client/assets/{create-project-dialog-pcTtT4gK.js → create-project-dialog-CICUNrHC.js} +1 -1
  84. package/dist/client/assets/{dialog-DbMPbzlh.js → dialog-DGoua-F-.js} +1 -1
  85. package/dist/client/assets/{dropdown-menu-DFSc-v7C.js → dropdown-menu-CEy971MU.js} +1 -1
  86. package/dist/client/assets/{dynamic-plugin-layout-DW7MYlbX.js → dynamic-plugin-layout-C0ICbkQo.js} +1 -1
  87. package/dist/client/assets/{empty-state-CWevsb-G.js → empty-state-C_g2tsPC.js} +1 -1
  88. package/dist/client/assets/{empty-state-DnI_qH-Y.js → empty-state-C_zMtSoY.js} +1 -1
  89. package/dist/client/assets/{env-vars-editor-BU2Y2-Ll.js → env-vars-editor-C8MNbLkk.js} +1 -1
  90. package/dist/client/assets/{error-boundary-CCf2jUlG.js → error-boundary-DqZtjxEB.js} +1 -1
  91. package/dist/client/assets/{extract-connection-data-DZvBZ10P.js → extract-connection-data-BdeTK8Ro.js} +1 -1
  92. package/dist/client/assets/{file-browser-BIlLUTHf.js → file-browser-q6rlKrnm.js} +2 -2
  93. package/dist/client/assets/{form-ek51qwAH.js → form-CFbWoYe6.js} +1 -1
  94. package/dist/client/assets/{grid-view-CENvKEY6.js → grid-view-DPEEIdxr.js} +1 -1
  95. package/dist/client/assets/{home-XXv2oXrf.js → home-CS0lvzq9.js} +1 -1
  96. package/dist/client/assets/{index-CjOTWUhd.js → index-0fcwYTfR.js} +36 -36
  97. package/dist/client/assets/{index-BbQ4Bnn7.js → index-0yaYrNTf.js} +1 -1
  98. package/dist/client/assets/index-BHAz67cr.css +1 -0
  99. package/dist/client/assets/{index-XxwFMzDI.js → index-Bl5KG9xm.js} +1 -1
  100. package/dist/client/assets/{index-Ba79Kla7.js → index-BpjZjisS.js} +1 -1
  101. package/dist/client/assets/{index-DqBwvK0E.js → index-BzbwskdO.js} +1 -1
  102. package/dist/client/assets/{index-Cl2GHryt.js → index-DOQ9GLeH.js} +1 -1
  103. package/dist/client/assets/{index-UItETm2j.js → index-Dq6km8uv.js} +1 -1
  104. package/dist/client/assets/{index-CEFIvFnf.js → index-DrrqKIxq.js} +3 -3
  105. package/dist/client/assets/{infiniteQueryObserver-B9nwx2aL.js → infiniteQueryObserver-BUe0-uqo.js} +1 -1
  106. package/dist/client/assets/{input-UPbtT6D5.js → input-C2aMc-tK.js} +1 -1
  107. package/dist/client/assets/{integration-icon-D3KY1sTg.js → integration-icon-BVqKl9De.js} +1 -1
  108. package/dist/client/assets/{label-OGiRqcEX.js → label-CoS6RHW3.js} +1 -1
  109. package/dist/client/assets/{layout-CvVtUUQW.js → layout-D1KoVO75.js} +1 -1
  110. package/dist/client/assets/{localstorage-keys-CRTQAB4C.js → localstorage-keys-Dn-W0lb3.js} +1 -1
  111. package/dist/client/assets/{login-CdLmE4NZ.js → login-VK-mokwH.js} +1 -1
  112. package/dist/client/assets/{markdown-Ca1p_aAP.js → markdown-BM0BQJdP.js} +1 -1
  113. package/dist/client/assets/{mcp-oauth-BbnOwrZd.js → mcp-oauth-DeNBGJ6_.js} +1 -1
  114. package/dist/client/assets/{mcp-server-card-CWlDBaaF.js → mcp-server-card-DacuauM5.js} +1 -1
  115. package/dist/client/assets/{mcp-server-detail-B-5zNwGt.js → mcp-server-detail-BLz5yvcq.js} +2 -2
  116. package/dist/client/assets/{members-UNx8dAjn.js → members-DenaIJqs.js} +1 -1
  117. package/dist/client/assets/monitoring-CJ1M1mUC.js +31 -0
  118. package/dist/client/assets/{monitoring-dashboard-edit-D1I_fFwn.js → monitoring-dashboard-edit-R1y62lIg.js} +1 -1
  119. package/dist/client/assets/{monitoring-dashboard-view-BBoKWBp9.js → monitoring-dashboard-view-BKjuLdW2.js} +1 -1
  120. package/dist/client/assets/{oauth-callback-tVkX9nfx.js → oauth-callback-DX8HUvyR.js} +1 -1
  121. package/dist/client/assets/page-B9pAkFvr.js +1 -0
  122. package/dist/client/assets/{page-B9N0sRu5.js → page-sxnt39Ii.js} +1 -1
  123. package/dist/client/assets/{plugin-empty-state-DtpXQISJ.js → plugin-empty-state-ChCFqmd0.js} +1 -1
  124. package/dist/client/assets/{plugin-empty-state-Dap_lue3.js → plugin-empty-state-D5H9c9JD.js} +1 -1
  125. package/dist/client/assets/{plugin-header-BMtZYqR-.js → plugin-header-BWrOoTRo.js} +1 -1
  126. package/dist/client/assets/{plugin-header-mbAE6Sve.js → plugin-header-CVre9sGT.js} +1 -1
  127. package/dist/client/assets/{popover-CJJX7cOM.js → popover-D64RiLTH.js} +1 -1
  128. package/dist/client/assets/project-layout-BaHenL2i.js +1 -0
  129. package/dist/client/assets/{projects-list-BmWZdC4b.js → projects-list-DnkqBPpp.js} +1 -1
  130. package/dist/client/assets/{ranking-layout-BqQuRiQh.js → ranking-layout-Wlr8fTR0.js} +1 -1
  131. package/dist/client/assets/{readme-viewer-CgSAdR9I.js → readme-viewer-DHp79NQe.js} +1 -1
  132. package/dist/client/assets/{registry-layout-DgsXq9Iy.js → registry-layout-DYNrneTu.js} +1 -1
  133. package/dist/client/assets/{registry-utils-DNrODt4G.js → registry-utils-B3BaD7r8.js} +1 -1
  134. package/dist/client/assets/{reports-layout-rm_1mJnU.js → reports-layout-BbfZIE8e.js} +1 -1
  135. package/dist/client/assets/{reset-password-CARUWrH0.js → reset-password-BQ__IAnv.js} +1 -1
  136. package/dist/client/assets/{resizable-BeAVlcw0.js → resizable-DAFw0KAb.js} +1 -1
  137. package/dist/client/assets/{save-actions-CcxXXbVc.js → save-actions-DGAmsooG.js} +1 -1
  138. package/dist/client/assets/{scroll-area-CItFqOci.js → scroll-area-DH4YtMqo.js} +1 -1
  139. package/dist/client/assets/{select-CwgyA5Wi.js → select-L9VC3PJn.js} +1 -1
  140. package/dist/client/assets/shell-layout-BEcaEstI.js +3 -0
  141. package/dist/client/assets/{skeleton-B5wseAX1.js → skeleton-C7PEWbcl.js} +1 -1
  142. package/dist/client/assets/{spinner-JsI3DFrV.js → spinner-BCc4DqcN.js} +1 -1
  143. package/dist/client/assets/{store-invite-D3LF9Yde.js → store-invite-CVYdc9iu.js} +1 -1
  144. package/dist/client/assets/{switch-BYuPAsrN.js → switch-EPGLJyI3.js} +1 -1
  145. package/dist/client/assets/{table-C25e3lsO.js → table-BKrr_ZVb.js} +1 -1
  146. package/dist/client/assets/{tasks-CzwD0Q_Q.js → tasks-Bn5ZyhP_.js} +1 -1
  147. package/dist/client/assets/{textarea-BzrbRDMZ.js → textarea-bPVDAJiU.js} +1 -1
  148. package/dist/client/assets/{time-range-picker-U_fyer52.js → time-range-picker-VyfEBU8i.js} +1 -1
  149. package/dist/client/assets/{toggle-group-DwUL9sIJ.js → toggle-group-Dp_hXbL3.js} +1 -1
  150. package/dist/client/assets/{tools-list-Beeckj80.js → tools-list-BdI3Q54q.js} +1 -1
  151. package/dist/client/assets/{tooltip-WTQ1Sf9I.js → tooltip-Di7lOmib.js} +1 -1
  152. package/dist/client/assets/{topbar-portal-CzctQPFH.js → topbar-portal-DKAZNOCc.js} +1 -1
  153. package/dist/client/assets/{typewriter-title-yszFjZyk.js → typewriter-title-CJBquTSX.js} +1 -1
  154. package/dist/client/assets/{use-binding-Xiu53R3H.js → use-binding-lQ5At5HW.js} +1 -1
  155. package/dist/client/assets/{use-connection-Cn_KCAac.js → use-connection-DjTWTI9s.js} +1 -1
  156. package/dist/client/assets/{use-copy-DxEdnDUl.js → use-copy-Cy4z0myA.js} +1 -1
  157. package/dist/client/assets/{use-create-virtual-mcp-D2iqPR2G.js → use-create-virtual-mcp-DyqNrljf.js} +1 -1
  158. package/dist/client/assets/{use-deco-chat-open-gpgx82-l.js → use-deco-chat-open-BuSNLd83.js} +1 -1
  159. package/dist/client/assets/{use-install-from-registry-xTriX8BS.js → use-install-from-registry-Dww4DIOX.js} +1 -1
  160. package/dist/client/assets/{use-list-state-DbHjmI2c.js → use-list-state-1nCBLa98.js} +1 -1
  161. package/dist/client/assets/{use-llm-1lq-QT_E.js → use-llm-Ce8POLUd.js} +1 -1
  162. package/dist/client/assets/{use-mcp-prompts-VDHthI2F.js → use-mcp-prompts-9RF1o3Vk.js} +1 -1
  163. package/dist/client/assets/{use-mcp-tools-D-6_rATb.js → use-mcp-tools-mAwwC0gK.js} +1 -1
  164. package/dist/client/assets/{use-mobile-DZvuCyAg.js → use-mobile-Cyo_7CU1.js} +1 -1
  165. package/dist/client/assets/{use-organization-settings-BzT6x8GT.js → use-organization-settings-dfLWy4_Y.js} +1 -1
  166. package/dist/client/assets/{use-project-Cpu_jAWh.js → use-project-BLgGy5mK.js} +1 -1
  167. package/dist/client/assets/use-settings-modal-BAyKuvP-.js +1 -0
  168. package/dist/client/assets/{use-view-mode-1Gj9Ftyw.js → use-view-mode-Dz6ZqxC7.js} +1 -1
  169. package/dist/client/assets/{use-virtual-mcp-CzLaRfMK.js → use-virtual-mcp-BA3G4Be3.js} +1 -1
  170. package/dist/client/assets/useInfiniteQuery-CIiL-5Y3.js +1 -0
  171. package/dist/client/assets/{useMutation-CRJhwh4V.js → useMutation-byIh8vPM.js} +1 -1
  172. package/dist/client/assets/useQuery-DcU1ldNG.js +1 -0
  173. package/dist/client/assets/useSuspenseInfiniteQuery-Dc-GS2UT.js +1 -0
  174. package/dist/client/assets/{workflow-I781PsAJ.js → workflow-j7kNV5HR.js} +1 -1
  175. package/dist/client/index.html +2 -2
  176. package/package.json +1 -1
  177. package/dist/client/assets/connection-detail-CrRrhObV.js +0 -1
  178. package/dist/client/assets/constants-DNU7gsUd.js +0 -1
  179. package/dist/client/assets/index-CRF3yQiM.css +0 -1
  180. package/dist/client/assets/monitoring-CNQyYNJh.js +0 -45
  181. package/dist/client/assets/page-CiWneucU.js +0 -1
  182. package/dist/client/assets/project-layout-06BwdR0x.js +0 -1
  183. package/dist/client/assets/shell-layout-BeAkZvQA.js +0 -3
  184. package/dist/client/assets/use-settings-modal-DWpwYi2w.js +0 -1
  185. package/dist/client/assets/useInfiniteQuery-BkWiNIx3.js +0 -1
  186. package/dist/client/assets/useQuery-DMUhrQv9.js +0 -1
  187. package/dist/client/assets/useSuspenseInfiniteQuery-CvuCfv37.js +0 -1
@@ -1 +0,0 @@
1
- import{r as b,c as y,j as s,u as ne,d as ae,t as Y}from"./index-CEFIvFnf.js";import{V as ce,C as j}from"./index-CjOTWUhd.js";import{T as me,i as de,a as fe,t as pe}from"./typewriter-title-yszFjZyk.js";import{E as ue}from"./error-boundary-CCf2jUlG.js";import{u as ee,b as he}from"./context-JZ9bzUIC.js";import{I as te}from"./integration-icon-D3KY1sTg.js";import{P as xe,a as je,b as ge}from"./popover-CJJX7cOM.js";import{S as X}from"./skeleton-B5wseAX1.js";import{c as se,B as H}from"./button-COjpHvkK.js";import{i as be,d as ye}from"./constants-D-wlluJ1.js";import{b as Ne}from"./use-virtual-mcp-CzLaRfMK.js";import{i as _e}from"./ChevronRight-B5elpXGa.js";import{t as ie}from"./Users03-mLhLYYpx.js";import{P as A}from"./index-DqBwvK0E.js";import{a as U,b as J,T as Q}from"./tooltip-WTQ1Sf9I.js";import{c as Se}from"./Pin01-CTbGsypg.js";import{s as ve}from"./Plus-BgTScIjT.js";import"./spinner-JsI3DFrV.js";import"./use-mcp-prompts-VDHthI2F.js";import"./useQuery-DMUhrQv9.js";import"./dialog-DbMPbzlh.js";import"./form-ek51qwAH.js";import"./label-OGiRqcEX.js";import"./input-UPbtT6D5.js";import"./usage-B8eRkRZY.js";import"./ArrowUp-CkjIXBAe.js";import"./ChevronDown-DugvEHIv.js";import"./Edit01-CO8VRSTn.js";import"./XCircle-DYabZgm3.js";import"./AlertCircle-BvhzS1YT.js";import"./AlertTriangle-BUE7sdod.js";import"./use-deco-chat-open-gpgx82-l.js";import"./localstorage-keys-CRTQAB4C.js";import"./useMutation-CRJhwh4V.js";import"./ArrowLeft-BU2sm27g.js";import"./use-copy-DxEdnDUl.js";import"./badge-Dic8iag_.js";import"./Check-DYZ8kvzv.js";import"./Code01-Dv0mdRP8.js";import"./SearchMd-qPELZ8ba.js";import"./use-create-virtual-mcp-D2iqPR2G.js";import"./marked.esm-BaswSlok.js";import"./markdown-Ca1p_aAP.js";import"./Copy01-CqukwIfv.js";import"./tools-list-Beeckj80.js";import"./collection-table-wrapper-qfYRj5nQ.js";import"./dropdown-menu-DFSc-v7C.js";import"./Grid01-BWlobPSC.js";import"./List-Bm2F0wOt.js";import"./table-C25e3lsO.js";import"./empty-state-CWevsb-G.js";import"./Loading01-DVlzuDXC.js";import"./card-BiC_BjTe.js";import"./Eye-B5D7LmIz.js";import"./Globe02-CaREPjt_.js";import"./RefreshCw01-DlEvV3CS.js";import"./layout-CvVtUUQW.js";import"./use-connection-Cn_KCAac.js";import"./generate-id-Dyweu44Y.js";import"./Clock-BWKgsoiG.js";import"./Trash01-BwVrCeYG.js";import"./decopilot-events-Brt4gAR6.js";import"./use-llm-1lq-QT_E.js";import"./use-binding-Xiu53R3H.js";import"./binder-kzm2-hR4.js";import"./select-CwgyA5Wi.js";import"./File06-BCPbJ79i.js";import"./Image01-CiXOk6aA.js";import"./RefreshCcw01-C9q1gCtA.js";import"./Settings01-B3ha2umj.js";import"./useSuspenseInfiniteQuery-CvuCfv37.js";import"./infiniteQueryObserver-B9nwx2aL.js";import"./Container-83NFZamb.js";import"./use-mobile-DZvuCyAg.js";const re=({size:e=24,color:t="currentColor",...i})=>b.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},b.createElement("path",{d:"m8.59 13.51 6.83 3.98m-.01-10.98-6.82 3.98M21 5a3 3 0 1 1-6 0 3 3 0 0 1 6 0ZM9 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm12 7a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}));re.displayName="Share07";function Ce(e){const t=y.c(15),{agent:i}=e,{setVirtualMcpId:u}=ee();let l;t[0]!==i.id||t[1]!==u?(l=()=>{u(i.id)},t[0]=i.id,t[1]=u,t[2]=l):l=t[2];const r=l;let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=se("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),t[3]=m):m=t[3];const d=`Select agent ${i.title}`;let o;t[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ie,{size:20}),t[4]=o):o=t[4];let c;t[5]!==i.icon||t[6]!==i.title?(c=s.jsx(te,{icon:i.icon,name:i.title,fallbackIcon:o}),t[5]=i.icon,t[6]=i.title,t[7]=c):c=t[7];let n;t[8]!==i.title?(n=s.jsx("p",{className:"text-sm text-foreground text-center leading-tight line-clamp-2",children:i.title}),t[8]=i.title,t[9]=n):n=t[9];let a;return t[10]!==r||t[11]!==d||t[12]!==c||t[13]!==n?(a=s.jsxs("button",{type:"button",onClick:r,className:m,"aria-label":d,children:[c,n]}),t[10]=r,t[11]=d,t[12]=c,t[13]=n,t[14]=a):a=t[14],a}function we(e){const t=y.c(14),{virtualMcps:i,selectedVirtualMcpId:u,onVirtualMcpChange:l}=e,[r,m]=b.useState(!1),d=b.useRef(null);let o,c;t[0]!==r?(o=()=>{r&&setTimeout(()=>{d.current?.focus()},0)},c=[r],t[0]=r,t[1]=o,t[2]=c):(o=t[1],c=t[2]),b.useEffect(o,c);let n;t[3]!==l?(n=N=>{l(N),m(!1)},t[3]=l,t[4]=n):n=t[4];const a=n;let f;t[5]===Symbol.for("react.memo_cache_sentinel")?(f=se("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),t[5]=f):f=t[5];let p;t[6]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(xe,{asChild:!0,children:s.jsxs("button",{type:"button",className:f,"aria-label":"See all agents",children:[s.jsx("div",{className:"size-12 rounded-lg bg-accent flex items-center justify-center shrink-0",children:s.jsx(_e,{size:24,className:"text-foreground"})}),s.jsx("p",{className:"text-sm text-foreground text-center leading-tight",children:"See all"})]})}),t[6]=p):p=t[6];let h;t[7]!==a||t[8]!==u||t[9]!==i?(h=s.jsx(je,{className:"w-[550px] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,children:s.jsx(ce,{virtualMcps:i,selectedVirtualMcpId:u,onVirtualMcpChange:a,searchInputRef:d})}),t[7]=a,t[8]=u,t[9]=i,t[10]=h):h=t[10];let g;return t[11]!==r||t[12]!==h?(g=s.jsxs(ge,{open:r,onOpenChange:m,children:[p,h]}),t[11]=r,t[12]=h,t[13]=g):g=t[13],g}function ke(){const e=y.c(20),t=Ne(),{selectedVirtualMcp:i,setVirtualMcpId:u}=ee();let l,r,m,d,o,c;if(e[0]!==t){o=Symbol.for("react.early_return_sentinel");e:{const h=t.filter(Me).slice(0,6);if(h.length===0){o=null;break e}c=t.map(Te),m="w-full max-w-[800px]",e[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("h2",{className:"text-sm font-medium text-muted-foreground mb-4",children:"Recently used agents"}),e[7]=d):d=e[7],l="grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",r=h.map(ze)}e[0]=t,e[1]=l,e[2]=r,e[3]=m,e[4]=d,e[5]=o,e[6]=c}else l=e[1],r=e[2],m=e[3],d=e[4],o=e[5],c=e[6];if(o!==Symbol.for("react.early_return_sentinel"))return o;const n=i?.id??null;let a;e[8]!==u||e[9]!==n||e[10]!==c?(a=s.jsx(we,{virtualMcps:c,selectedVirtualMcpId:n,onVirtualMcpChange:u}),e[8]=u,e[9]=n,e[10]=c,e[11]=a):a=e[11];let f;e[12]!==l||e[13]!==r||e[14]!==a?(f=s.jsxs("div",{className:l,children:[r,a]}),e[12]=l,e[13]=r,e[14]=a,e[15]=f):f=e[15];let p;return e[16]!==m||e[17]!==d||e[18]!==f?(p=s.jsxs("div",{className:m,children:[d,f]}),e[16]=m,e[17]=d,e[18]=f,e[19]=p):p=e[19],p}function ze(e){return s.jsx(Ce,{agent:e},e.id??"default")}function Te(e){return{id:e.id,title:e.title,description:e.description,icon:e.icon}}function Me(e){return e.id!==null&&!be(e.id)}function Ie(){const e=y.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(X,{className:"h-5 w-40 mb-4"}),e[0]=t):t=e[0];let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:"w-full max-w-[800px]",children:[t,s.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",children:Array.from({length:7}).map(Pe)})]}),e[1]=i):i=e[1],i}function Pe(e,t){return s.jsxs("div",{className:"flex flex-col items-center gap-3 p-2 self-stretch",children:[s.jsx(X,{className:"size-6 rounded-md shrink-0"}),s.jsx(X,{className:"h-4 w-full"})]},t)}function $e(){const e=y.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(b.Suspense,{fallback:s.jsx(Ie,{}),children:s.jsx(ke,{})}),e[0]=t):t=e[0],t}function Ee(){const e=new Date().getHours();return e>=5&&e<12?"Morning":e>=12&&e<17?"Afternoon":e>=17&&e<22?"Evening":"Night"}function Ve(){const e=y.c(61),{org:t}=ne(),{data:i}=ae.useSession(),{modelsConnections:u,isChatEmpty:l,activeThreadId:r,createThread:m,switchToThread:d,threads:o,selectedVirtualMcp:c}=he();let n;if(e[0]!==r||e[1]!==o){let x;e[3]!==r?(x=oe=>oe.id===r,e[3]=r,e[4]=x):x=e[4],n=o.find(x),e[0]=r,e[1]=o,e[2]=n}else n=e[2];const a=n,[f,p]=b.useState(!1);let h;e[5]!==i?.user?.name?(h=i?.user?.name?.split(" ")[0]||"there",e[5]=i?.user?.name,e[6]=h):h=e[6];const g=h;let N;e[7]===Symbol.for("react.memo_cache_sentinel")?(N=Ee(),e[7]=N):N=e[7];const le=N;let L;e[8]!==t.id?(L=ye(t.id),e[8]=t.id,e[9]=L):L=e[9];const R=c??L;if(u.length===0){let x;return e[10]!==t?(x=s.jsx("div",{className:"flex flex-col size-full bg-background items-center justify-center",children:s.jsx(j.NoLlmBindingEmptyState,{org:t})}),e[10]=t,e[11]=x):x=e[11],x}let _;e[12]!==a?(_=a?.title&&s.jsx(me,{text:a.title,className:"text-sm font-medium text-foreground"}),e[12]=a,e[13]=_):_=e[13];let S;e[14]!==_?(S=s.jsx(A.Header.Left,{className:"gap-2",children:_}),e[14]=_,e[15]=S):S=e[15];let v;e[16]!==m?(v=()=>m(),e[16]=m,e[17]=v):v=e[17];let B;e[18]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(ve,{size:16}),e[18]=B):B=e[18];let C;e[19]!==l||e[20]!==v?(C=s.jsx(U,{asChild:!0,children:s.jsx(H,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:v,disabled:l,"aria-label":"New chat",children:B})}),e[19]=l,e[20]=v,e[21]=C):C=e[21];let O;e[22]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(J,{children:"New chat"}),e[22]=O):O=e[22];let w;e[23]!==C?(w=s.jsxs(Q,{children:[C,O]}),e[23]=C,e[24]=w):w=e[24];let D;e[25]===Symbol.for("react.memo_cache_sentinel")?(D=()=>p(!0),e[25]=D):D=e[25];let F;e[26]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsxs(Q,{children:[s.jsx(U,{asChild:!0,children:s.jsx(H,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:D,"aria-label":"Chat history",children:s.jsx(de,{size:16})})}),s.jsx(J,{children:"Chat history"})]}),e[26]=F):F=e[26];let W;e[27]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(Se,{size:16}),e[27]=W):W=e[27];let k;e[28]!==l?(k=s.jsx(U,{asChild:!0,children:s.jsx(H,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:He,disabled:l,"aria-label":"Pin chat",children:W})}),e[28]=l,e[29]=k):k=e[29];let Z;e[30]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsx(J,{children:"Pin chat"}),e[30]=Z):Z=e[30];let z;e[31]!==k?(z=s.jsxs(Q,{children:[k,Z]}),e[31]=k,e[32]=z):z=e[32];let q;e[33]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(re,{size:16}),e[33]=q):q=e[33];let T;e[34]!==l?(T=s.jsx(U,{asChild:!0,children:s.jsx(H,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:Ae,disabled:l,"aria-label":"Share chat",children:q})}),e[34]=l,e[35]=T):T=e[35];let G;e[36]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsx(J,{children:"Share chat"}),e[36]=G):G=e[36];let M;e[37]!==T?(M=s.jsxs(Q,{children:[T,G]}),e[37]=T,e[38]=M):M=e[38];let I;e[39]!==w||e[40]!==z||e[41]!==M?(I=s.jsxs(A.Header.Right,{className:"gap-1",children:[w,F,z,M]}),e[39]=w,e[40]=z,e[41]=M,e[42]=I):I=e[42];let P;e[43]!==I||e[44]!==S?(P=s.jsxs(A.Header,{className:"flex-none z-10 bg-background",children:[S,I]}),e[43]=I,e[44]=S,e[45]=P):P=e[45];let $;e[46]!==R||e[47]!==l||e[48]!==g?($=l?s.jsxs("div",{className:"flex-1 min-h-0 flex flex-col items-center justify-center px-10 pb-32 pt-10",children:[s.jsxs("div",{className:"flex flex-col items-center gap-3 w-full max-w-[600px]",children:[s.jsx("div",{className:"flex justify-center",children:s.jsx(te,{icon:R.icon,name:R.title,size:"md",fallbackIcon:s.jsx(ie,{size:20}),className:"size-12 rounded-xl border border-stone-200/60 shadow-sm aspect-square transition-opacity duration-200"})}),s.jsxs("div",{className:"text-center",children:[s.jsxs("p",{className:"text-lg font-medium text-foreground",children:[le," ",g,","]}),s.jsx("p",{className:"text-base text-muted-foreground opacity-50 mb-0",children:"What are we building today?"})]}),s.jsx("div",{className:"w-full -mt-1",children:s.jsx(j.Input,{})}),s.jsx(j.IceBreakers,{className:"w-full"})]}),s.jsx("div",{className:"flex flex-col items-center w-full mt-4",children:s.jsx($e,{})})]}):s.jsxs(s.Fragment,{children:[s.jsx(j.Main,{children:s.jsx(j.Messages,{})}),s.jsx(j.Footer,{children:s.jsx(j.Input,{})})]}),e[46]=R,e[47]=l,e[48]=g,e[49]=$):$=e[49];let E;e[50]!==d?(E=async x=>{await d(x),p(!1)},e[50]=d,e[51]=E):E=e[51];let V;e[52]!==r||e[53]!==f||e[54]!==E||e[55]!==o?(V=s.jsx(fe,{open:f,onOpenChange:p,threads:o,activeThreadId:r,onThreadSelect:E}),e[52]=r,e[53]=f,e[54]=E,e[55]=o,e[56]=V):V=e[56];let K;return e[57]!==P||e[58]!==$||e[59]!==V?(K=s.jsxs(j,{children:[P,$,V]}),e[57]=P,e[58]=$,e[59]=V,e[60]=K):K=e[60],K}function Ae(){Y.info("Share feature coming soon")}function He(){Y.info("Pin feature coming soon")}function Le(e){const t=y.c(14),{error:i,onRetry:u}=e,l=i?.message?.includes("401")||i?.message?.toLowerCase().includes("unauthorized");let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(A.Header,{className:"flex-none",children:[s.jsx(A.Header.Left,{className:"gap-2"}),s.jsx(A.Header.Right,{className:"gap-1"})]}),t[0]=r):r=t[0];let m;t[1]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full mx-auto w-fit",children:s.jsx(pe,{className:"h-6 w-6 text-destructive"})}),t[1]=m):m=t[1];const d=l?"Unable to load models":"Something went wrong";let o;t[2]!==d?(o=s.jsx("h3",{className:"text-lg font-medium",children:d}),t[2]=d,t[3]=o):o=t[3];const c=l?"There was an authentication error while loading the models. This might be due to an expired session or invalid API key.":i?.message||"An unexpected error occurred";let n;t[4]!==c?(n=s.jsx("p",{className:"text-sm text-muted-foreground",children:c}),t[4]=c,t[5]=n):n=t[5];let a;t[6]!==o||t[7]!==n?(a=s.jsxs("div",{className:"space-y-2",children:[o,n]}),t[6]=o,t[7]=n,t[8]=a):a=t[8];let f;t[9]!==u?(f=s.jsx(H,{variant:"outline",onClick:u,children:"Try again"}),t[9]=u,t[10]=f):f=t[10];let p;return t[11]!==a||t[12]!==f?(p=s.jsxs(j,{children:[r,s.jsx("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center",children:s.jsxs("div",{className:"max-w-sm space-y-4",children:[m,a,f]})})]}),t[11]=a,t[12]=f,t[13]=p):p=t[13],p}function ns(){const e=y.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ue,{fallback:Re,children:s.jsx(b.Suspense,{fallback:s.jsx(j.Skeleton,{}),children:s.jsx(Ve,{})})}),e[0]=t):t=e[0],t}function Re(e){const{error:t,resetError:i}=e;return s.jsx(Le,{error:t,onRetry:i})}export{ns as default};
@@ -1 +0,0 @@
1
- import{r as O,c as z,d as me,j as s,u as J,O as G,t as R,H as Le,o as ve,s as W,b as ne,m as le,l as Ne,k as Se,K as q,aF as re,bF as Be,P as Ce,S as ae,e as Re,aD as Me}from"./index-CEFIvFnf.js";import{u as Ue,a as _e}from"./use-project-Cpu_jAWh.js";import{c as X,B as U}from"./button-COjpHvkK.js";import{a as qe,D as Ge}from"./dialog-DbMPbzlh.js";import{a as Ke,b as Qe,c as Ve,T as Je,i as Pe}from"./tooltip-WTQ1Sf9I.js";import{u as ue,S as te}from"./skeleton-B5wseAX1.js";import{p as ke,a as pe,t as We,u as Ze}from"./use-settings-modal-DWpwYi2w.js";import{A as we}from"./avatar-De3rgEZe.js";import{t as Ie}from"./Settings01-B3ha2umj.js";import{i as He}from"./Check-DYZ8kvzv.js";import{a as Ye}from"./Copy01-CqukwIfv.js";import{S as se}from"./switch-BYuPAsrN.js";import{S as ze,a as Ee,d as Y,c as $e,b as Xe}from"./select-CwgyA5Wi.js";import{i as et}from"./Code01-Dv0mdRP8.js";import{i as tt}from"./Shield01-CmaBuhqg.js";import{n as st}from"./CheckDone01-CWio5h0R.js";import{u as oe}from"./useMutation-CRJhwh4V.js";import{a as De,F as Z,b as K,c as Q,d as V,f as H,e as ce}from"./form-ek51qwAH.js";import{I as ee}from"./input-UPbtT6D5.js";import{i as nt}from"./Upload01-O1LTk7kl.js";import{a as fe,u as xe}from"./constants-D-wlluJ1.js";import{T as lt}from"./textarea-BzrbRDMZ.js";import{c as ot,h as rt,d as it,b as at,A as ct,e as dt,g as mt,a as ut,f as ft}from"./alert-dialog-IbckaySD.js";import{u as xt}from"./useQuery-DMUhrQv9.js";import{L as gt}from"./label-OGiRqcEX.js";import{n as pt}from"./Container-83NFZamb.js";import{h as ht}from"./use-connection-Cn_KCAac.js";import{a as jt,c as bt}from"./use-binding-Xiu53R3H.js";import{u as yt}from"./use-install-from-registry-xTriX8BS.js";import{i as vt}from"./Loading01-DVlzuDXC.js";import{s as Nt}from"./Plus-BgTScIjT.js";import"./localstorage-keys-CRTQAB4C.js";import"./ChevronDown-DugvEHIv.js";import"./binder-kzm2-hR4.js";import"./extract-connection-data-DZvBZ10P.js";import"./constants-DNU7gsUd.js";import"./github-icon-Dp3wHhYE.js";import"./registry-utils-DNrODt4G.js";import"./generate-id-Dyweu44Y.js";const Oe=({size:e=24,color:t="currentColor",...n})=>O.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},O.createElement("path",{d:"M10 2v4.66c0 .218 0 .326-.033.413a.47.47 0 0 1-.138.198c-.07.06-.183.102-.409.185a7.5 7.5 0 1 0 5.16 0c-.226-.083-.339-.125-.409-.185a.469.469 0 0 1-.138-.198C14 6.986 14 6.878 14 6.66V2M8.5 2h7"}));Oe.displayName="Beaker01";const Te=({size:e=24,color:t="currentColor",...n})=>O.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},O.createElement("path",{d:"M9.354 21c.705.622 1.632 1 2.646 1s1.94-.378 2.646-1M18 8A6 6 0 1 0 6 8c0 3.09-.78 5.206-1.65 6.605-.735 1.18-1.102 1.771-1.089 1.936.015.182.054.252.2.36.133.099.732.099 1.928.099H18.61c1.196 0 1.795 0 1.927-.098.147-.11.186-.179.2-.361.014-.165-.353-.755-1.088-1.936C18.78 13.206 18 11.09 18 8Z"}));Te.displayName="Bell01";const ge=({size:e=24,color:t="currentColor",...n})=>O.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},O.createElement("path",{d:"M13 2 4.093 12.688c-.348.418-.523.628-.525.804a.5.5 0 0 0 .185.397c.138.111.41.111.955.111H12l-1 8 8.907-10.688c.348-.418.523-.628.525-.804a.5.5 0 0 0-.185-.397c-.138-.111-.41-.111-.955-.111H12l1-8Z"}));ge.displayName="Zap";const St=[{key:"general",label:"General",icon:s.jsx(Ie,{size:14})},{key:"plugins",label:"Plugins",icon:s.jsx(ge,{size:14})}];function Ct(e){const t=z.c(14),{activeSection:n,onNavigate:r}=e,{org:i}=J();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={suspense:!0},t[0]=l):l=t[0];const{data:o}=Ue(i.id,l);let m;t[1]!==n?(m=ke(n),t[1]=n,t[2]=m):m=t[2];const u=m;let f;if(t[3]!==u?.slug||t[4]!==n||t[5]!==r||t[6]!==o){let x;t[8]!==u?.slug||t[9]!==n||t[10]!==r?(x=a=>{const g=u?.slug===a.slug;return s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsxs("button",{type:"button",onClick:()=>r(pe(a.slug,"general")),className:X("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",g?"text-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("div",{className:"size-4 shrink-0 rounded-[3px] flex items-center justify-center overflow-hidden border border-border/50",style:{backgroundColor:a.ui?.themeColor??"#60a5fa"},children:a.ui?.icon?s.jsx("img",{src:a.ui.icon,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:"text-[8px] font-semibold text-white leading-none",children:(a.name??a.slug).charAt(0).toUpperCase()})}),s.jsx("span",{className:"truncate",children:a.name??a.slug})]}),g&&s.jsx("div",{className:"ml-3 flex flex-col gap-0.5 border-l border-border pl-2.5",children:St.map(j=>{const h=pe(a.slug,j.key);return s.jsxs("button",{type:"button",onClick:()=>r(h),className:X("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",n===h?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:j.icon}),s.jsx("span",{className:"truncate",children:j.label})]},j.key)})})]},a.slug)},t[8]=u?.slug,t[9]=n,t[10]=r,t[11]=x):x=t[11],f=(o??[]).filter(_t).map(x),t[3]=u?.slug,t[4]=n,t[5]=r,t[6]=o,t[7]=f}else f=t[7];let d;return t[12]!==f?(d=s.jsx(s.Fragment,{children:f}),t[12]=f,t[13]=d):d=t[13],d}function _t(e){return e.slug!==G}function Pt(e){const t=z.c(29),{activeSection:n,onNavigate:r}=e,{data:i}=me.useSession(),[l]=ue(),o=i?.user,m=o?.image,u=o?.name??"Profile",f=o?.name??"U";let d;t[0]!==f||t[1]!==m?(d=s.jsx(we,{url:m,fallback:f,shape:"circle",size:"2xs",className:"size-4 shrink-0"}),t[0]=f,t[1]=m,t[2]=d):d=t[2];let x;t[3]!==u||t[4]!==d?(x={key:"account.profile",label:u,icon:d},t[3]=u,t[4]=d,t[5]=x):x=t[5];let a;t[6]===Symbol.for("react.memo_cache_sentinel")?(a={key:"account.preferences",label:"Preferences",icon:s.jsx(Ie,{size:14})},t[6]=a):a=t[6];let g;t[7]===Symbol.for("react.memo_cache_sentinel")?(g={key:"account.experimental",label:"Experimental",icon:s.jsx(Oe,{size:14})},t[7]=g):g=t[7];let j;t[8]!==x?(j=[x,a,g],t[8]=x,t[9]=j):j=t[9];const h=j;let y;t[10]===Symbol.for("react.memo_cache_sentinel")?(y={key:"org.general",label:"General",icon:s.jsx(We,{size:14})},t[10]=y):y=t[10];let S;t[11]===Symbol.for("react.memo_cache_sentinel")?(S=[y,{key:"org.plugins",label:"Plugins",icon:s.jsx(ge,{size:14})}],t[11]=S):S=t[11];const C=S;let _;t[12]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Account"}),t[12]=_):_=t[12];let v;t[13]!==h||t[14]!==n||t[15]!==r?(v=s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[_,h.map(P=>s.jsxs("button",{type:"button",onClick:()=>r(P.key),className:X("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",n===P.key?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:P.icon}),s.jsx("span",{className:"truncate",children:P.label})]},P.key))]}),t[13]=h,t[14]=n,t[15]=r,t[16]=v):v=t[16];let c;t[17]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Organization"}),t[17]=c):c=t[17];let p;t[18]!==n||t[19]!==r?(p=s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[c,C.map(P=>s.jsxs("button",{type:"button",onClick:()=>r(P.key),className:X("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",n===P.key?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:P.icon}),s.jsx("span",{className:"truncate",children:P.label})]},P.key))]}),t[18]=n,t[19]=r,t[20]=p):p=t[20];let b;t[21]!==n||t[22]!==r||t[23]!==l.experimental_projects?(b=l.experimental_projects&&s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Projects"}),s.jsx(O.Suspense,{fallback:s.jsx("div",{className:"px-2 py-1.5 text-xs text-muted-foreground/50",children:"Loading…"}),children:s.jsx(Ct,{activeSection:n,onNavigate:r})})]}),t[21]=n,t[22]=r,t[23]=l.experimental_projects,t[24]=b):b=t[24];let N;return t[25]!==v||t[26]!==p||t[27]!==b?(N=s.jsxs("div",{className:"w-52 shrink-0 border-r border-border bg-sidebar/50 overflow-y-auto py-3 flex flex-col gap-4",children:[v,p,b]}),t[25]=v,t[26]=p,t[27]=b,t[28]=N):N=t[28],N}function kt(){const e=z.c(32),{data:t}=me.useSession(),[n,r]=O.useState(!1),i=t?.user,l=i?.image;let o;e[0]!==i?(o=()=>{i?.id&&navigator.clipboard.writeText(i.id).then(()=>{r(!0),setTimeout(()=>r(!1),2e3)})},e[0]=i,e[1]=o):o=e[1];const m=o;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Profile"})}),e[2]=u):u=e[2];const f=i?.name??"U";let d;e[3]!==f||e[4]!==l?(d=s.jsx(we,{url:l,fallback:f,shape:"circle",size:"xl",className:"size-16 shrink-0"}),e[3]=f,e[4]=l,e[5]=d):d=e[5];const x=i?.name??"User";let a;e[6]!==x?(a=s.jsx("span",{className:"text-sm font-semibold text-foreground truncate",children:x}),e[6]=x,e[7]=a):a=e[7];const g=i?.email;let j;e[8]!==g?(j=s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:g}),e[8]=g,e[9]=j):j=e[9];let h;e[10]!==a||e[11]!==j?(h=s.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[a,j]}),e[10]=a,e[11]=j,e[12]=h):h=e[12];let y;e[13]!==d||e[14]!==h?(y=s.jsxs("div",{className:"flex items-center gap-4",children:[d,h]}),e[13]=d,e[14]=h,e[15]=y):y=e[15];let S;e[16]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"User ID"}),e[16]=S):S=e[16];let C;e[17]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("p",{className:"text-sm text-muted-foreground",children:"User ID"}),e[17]=C):C=e[17];const _=i?.id;let v;e[18]!==_?(v=s.jsx("span",{className:"font-mono text-sm",children:_}),e[18]=_,e[19]=v):v=e[19];let c;e[20]!==n?(c=n?s.jsx(He,{size:14,className:"text-green-600 shrink-0"}):s.jsx(Ye,{size:14,className:"shrink-0 opacity-70 group-hover:opacity-100 transition-opacity"}),e[20]=n,e[21]=c):c=e[21];let p;e[22]!==m||e[23]!==v||e[24]!==c?(p=s.jsx(Ke,{asChild:!0,children:s.jsxs("button",{type:"button",onClick:m,className:"group flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[v,c]})}),e[22]=m,e[23]=v,e[24]=c,e[25]=p):p=e[25];let b;e[26]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Qe,{side:"left",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[26]=b):b=e[26];let N;e[27]!==p?(N=s.jsxs("div",{className:"flex flex-col",children:[S,s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[C,s.jsx(Ve,{children:s.jsxs(Je,{children:[p,b]})})]})]}),e[27]=p,e[28]=N):N=e[28];let P;return e[29]!==N||e[30]!==y?(P=s.jsxs("div",{className:"flex flex-col gap-8",children:[u,y,N]}),e[29]=N,e[30]=y,e[31]=P):P=e[31],P}function ie(e){const t=z.c(27),{icon:n,label:r,description:i,control:l,onClick:o,disabled:m}=e,u=m?void 0:o,f=o?"button":void 0,d=o&&!m?0:void 0;let x;t[0]!==m||t[1]!==o?(x=o&&!m?c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),o())}:void 0,t[0]=m,t[1]=o,t[2]=x):x=t[2];const a=o&&!m?"pointer":void 0;let g;t[3]!==a?(g={cursor:a},t[3]=a,t[4]=g):g=t[4];let j;t[5]!==n?(j=s.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0",children:n}),t[5]=n,t[6]=j):j=t[6];let h;t[7]!==r?(h=s.jsx("p",{className:"text-sm font-medium text-foreground",children:r}),t[7]=r,t[8]=h):h=t[8];let y;t[9]!==i?(y=s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:i}),t[9]=i,t[10]=y):y=t[10];let S;t[11]!==h||t[12]!==y?(S=s.jsxs("div",{className:"min-w-0",children:[h,y]}),t[11]=h,t[12]=y,t[13]=S):S=t[13];let C;t[14]!==S||t[15]!==j?(C=s.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[j,S]}),t[14]=S,t[15]=j,t[16]=C):C=t[16];let _;t[17]!==l?(_=s.jsx("div",{onClick:wt,className:"shrink-0",children:l}),t[17]=l,t[18]=_):_=t[18];let v;return t[19]!==u||t[20]!==C||t[21]!==_||t[22]!==f||t[23]!==d||t[24]!==x||t[25]!==g?(v=s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4 border-b border-border last:border-0",onClick:u,role:f,tabIndex:d,onKeyDown:x,style:g,children:[C,_]}),t[19]=u,t[20]=C,t[21]=_,t[22]=f,t[23]=d,t[24]=x,t[25]=g,t[26]=v):v=t[26],v}function wt(e){return e.stopPropagation()}function he(){const e=z.c(35),[t,n]=ue();let r;e[0]!==n?(r=async b=>{if(b&&await Notification.requestPermission()!=="granted"){R.error("Notifications denied. Please enable them in your browser settings."),n(zt);return}n(N=>({...N,enableNotifications:b}))},e[0]=n,e[1]=r):r=e[1];const i=r;let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Preferences"})}),e[2]=l):l=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(et,{size:16}),e[3]=o):o=e[3];let m;e[4]!==n?(m=()=>n(It),e[4]=n,e[5]=m):m=e[5];let u;e[6]!==n?(u=b=>n(N=>({...N,devMode:b})),e[6]=n,e[7]=u):u=e[7];let f;e[8]!==t.devMode||e[9]!==u?(f=s.jsx(se,{checked:t.devMode,onCheckedChange:u}),e[8]=t.devMode,e[9]=u,e[10]=f):f=e[10];let d;e[11]!==m||e[12]!==f?(d=s.jsx(ie,{icon:o,label:"Developer Mode",description:"Show technical details like JSON input/output for tool calls.",onClick:m,control:f}),e[11]=m,e[12]=f,e[13]=d):d=e[13];let x;e[14]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Te,{size:16}),e[14]=x):x=e[14];let a;e[15]!==i||e[16]!==t.enableNotifications?(a=s.jsx(ie,{icon:x,label:"Notifications",description:"Play a sound and show a notification when chat messages complete while the app is unfocused.",disabled:typeof Notification>"u",onClick:()=>i(!t.enableNotifications),control:s.jsx(se,{disabled:typeof Notification>"u",checked:t.enableNotifications,onCheckedChange:i})}),e[15]=i,e[16]=t.enableNotifications,e[17]=a):a=e[17];let g;e[18]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(tt,{size:16}),e[18]=g):g=e[18];let j;e[19]!==n?(j=b=>n(N=>({...N,toolApprovalLevel:b})),e[19]=n,e[20]=j):j=e[20];let h;e[21]===Symbol.for("react.memo_cache_sentinel")?(h={none:"None",readonly:"Read-only",yolo:"YOLO"},e[21]=h):h=e[21];const y=h[t.toolApprovalLevel];let S;e[22]!==y?(S=s.jsx(Ee,{className:"w-36",children:s.jsx("span",{children:y})}),e[22]=y,e[23]=S):S=e[23];let C;e[24]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(Y,{value:"none",textValue:"None",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"None"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Require approval for all tool calls"})]})}),e[24]=C):C=e[24];let _;e[25]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Y,{value:"readonly",textValue:"Read-only",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Read-only"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),e[25]=_):_=e[25];let v;e[26]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs($e,{children:[C,_,s.jsx(Y,{value:"yolo",textValue:"YOLO",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"YOLO"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all tools without approval"})]})})]}),e[26]=v):v=e[26];let c;e[27]!==t.toolApprovalLevel||e[28]!==j||e[29]!==S?(c=s.jsx(ie,{icon:g,label:"Tool Approval",description:"Choose when to require approval before tools execute.",control:s.jsxs(ze,{value:t.toolApprovalLevel,onValueChange:j,children:[S,v]})}),e[27]=t.toolApprovalLevel,e[28]=j,e[29]=S,e[30]=c):c=e[30];let p;return e[31]!==c||e[32]!==d||e[33]!==a?(p=s.jsxs("div",{className:"flex flex-col gap-6",children:[l,s.jsxs("div",{className:"flex flex-col",children:[d,a,c]})]}),e[31]=c,e[32]=d,e[33]=a,e[34]=p):p=e[34],p}function It(e){return{...e,devMode:!e.devMode}}function zt(e){return{...e,enableNotifications:!1}}function je(e){const t=z.c(22),{icon:n,label:r,description:i,checked:l,onCheckedChange:o}=e;let m;t[0]!==l||t[1]!==o?(m=()=>o(!l),t[0]=l,t[1]=o,t[2]=m):m=t[2];let u;t[3]!==n?(u=s.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0",children:n}),t[3]=n,t[4]=u):u=t[4];let f;t[5]!==r?(f=s.jsx("p",{className:"text-sm font-medium text-foreground",children:r}),t[5]=r,t[6]=f):f=t[6];let d;t[7]!==i?(d=s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:i}),t[7]=i,t[8]=d):d=t[8];let x;t[9]!==f||t[10]!==d?(x=s.jsxs("div",{className:"min-w-0",children:[f,d]}),t[9]=f,t[10]=d,t[11]=x):x=t[11];let a;t[12]!==u||t[13]!==x?(a=s.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[u,x]}),t[12]=u,t[13]=x,t[14]=a):a=t[14];let g;t[15]!==l||t[16]!==o?(g=s.jsx("div",{onClick:Et,className:"shrink-0",children:s.jsx(se,{checked:l,onCheckedChange:o})}),t[15]=l,t[16]=o,t[17]=g):g=t[17];let j;return t[18]!==m||t[19]!==a||t[20]!==g?(j=s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4 border-b border-border last:border-0 cursor-pointer",onClick:m,children:[a,g]}),t[18]=m,t[19]=a,t[20]=g,t[21]=j):j=t[21],j}function Et(e){return e.stopPropagation()}function $t(){const e=z.c(16),[t,n]=ue();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("div",{children:[s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Experimental"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"These features are unstable and may change or stop working at any time."})]}),e[0]=r):r=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Le,{size:16}),e[1]=i):i=e[1];let l;e[2]!==n?(l=x=>n(a=>({...a,experimental_projects:x})),e[2]=n,e[3]=l):l=e[3];let o;e[4]!==t.experimental_projects||e[5]!==l?(o=s.jsx(je,{icon:i,label:"Projects",description:"Enable the projects feature in the sidebar.",checked:t.experimental_projects,onCheckedChange:l}),e[4]=t.experimental_projects,e[5]=l,e[6]=o):o=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(st,{size:16}),e[7]=m):m=e[7];let u;e[8]!==n?(u=x=>n(a=>({...a,experimental_tasks:x})),e[8]=n,e[9]=u):u=e[9];let f;e[10]!==t.experimental_tasks||e[11]!==u?(f=s.jsx(je,{icon:m,label:"Tasks",description:"Enable the tasks feature in the sidebar.",checked:t.experimental_tasks,onCheckedChange:u}),e[10]=t.experimental_tasks,e[11]=u,e[12]=f):f=e[12];let d;return e[13]!==o||e[14]!==f?(d=s.jsxs("div",{className:"flex flex-col gap-6",children:[r,s.jsxs("div",{className:"flex flex-col rounded-lg border border-border bg-muted/25 px-4",children:[o,f]})]}),e[13]=o,e[14]=f,e[15]=d):d=e[15],d}const Dt=ve({name:W().min(1,"Name is required").max(255,"Name is too long"),slug:W().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:W().optional()});function Ot(e){const t=z.c(24),{value:n,onChange:r,name:i}=e,l=O.useRef(null);let o;t[0]!==r?(o=v=>{const c=v.target.files?.[0];if(c){if(c.size>2097152){R.error("Image must be smaller than 2MB");return}const p=new FileReader;p.onerror=()=>{const b=p.error;console.error("FileReader error:",b),R.error(b?.message||"Failed to read image file. Please try again."),l.current&&(l.current.value="")},p.onloadend=()=>{if(p.readyState===FileReader.DONE&&p.result){const b=p.result;r(b)}},p.readAsDataURL(c)}},t[0]=r,t[1]=o):o=t[1];const m=o;let u;t[2]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{l.current?.click()},t[2]=u):u=t[2];const f=u;let d;t[3]!==r?(d=v=>{v.stopPropagation(),r("")},t[3]=r,t[4]=d):d=t[4];const x=d;let a;t[5]!==m?(a=s.jsx("input",{type:"file",ref:l,className:"hidden",accept:"image/*",onChange:m}),t[5]=m,t[6]=a):a=t[6];let g;t[7]!==x||t[8]!==i||t[9]!==n?(g=n?s.jsxs("div",{className:"relative group",children:[s.jsx("div",{className:"h-20 w-20 rounded-lg border border-border bg-muted/20 overflow-hidden",children:s.jsx("img",{src:n,alt:i||"Organization logo",className:"w-full h-full object-cover"})}),s.jsx("button",{type:"button",onClick:x,className:"absolute -top-2 -right-2 h-6 w-6 rounded-full bg-destructive text-destructive-foreground opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:s.jsx(Pe,{className:"h-3 w-3"})})]}):s.jsxs("button",{type:"button",onClick:f,className:"h-20 w-20 rounded-lg border-2 border-dashed border-border hover:border-foreground/50 hover:bg-accent/50 transition-colors flex flex-col items-center justify-center gap-1 text-muted-foreground hover:text-foreground",children:[s.jsx(nt,{className:"h-5 w-5"}),s.jsx("span",{className:"text-xs",children:"Upload"})]}),t[7]=x,t[8]=i,t[9]=n,t[10]=g):g=t[10];const j=n?"Change Logo":"Upload Logo";let h;t[11]!==j?(h=s.jsx(U,{type:"button",variant:"outline",size:"sm",onClick:f,className:"mb-2",children:j}),t[11]=j,t[12]=h):h=t[12];let y;t[13]!==x||t[14]!==n?(y=n&&s.jsx(U,{type:"button",variant:"ghost",size:"sm",onClick:x,className:"ml-2",children:"Remove"}),t[13]=x,t[14]=n,t[15]=y):y=t[15];let S;t[16]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Recommended: Square image, at least 200x200px. Max 2MB."}),t[16]=S):S=t[16];let C;t[17]!==h||t[18]!==y?(C=s.jsxs("div",{className:"flex-1",children:[h,y,S]}),t[17]=h,t[18]=y,t[19]=C):C=t[19];let _;return t[20]!==C||t[21]!==a||t[22]!==g?(_=s.jsxs("div",{className:"flex items-start gap-4",children:[a,g,C]}),t[20]=C,t[21]=a,t[22]=g,t[23]=_):_=t[23],_}function Tt(){const e=ne(),{org:t,project:n}=J(),r=le(),[i,l]=O.useState(!1),o=Ne({resolver:Se(Dt),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),m=oe({mutationFn:async d=>{const x={name:d.name,slug:d.slug};d.logo&&(x.logo=d.logo);const a=await me.organization.update({organizationId:t.id,data:x});if(a?.error)throw new Error(a.error.message||"Failed to update organization");return a},onSuccess:d=>{r.invalidateQueries({queryKey:q.organizations()}),r.invalidateQueries({queryKey:q.activeOrganization(t.slug)}),R.success("Organization settings updated successfully"),d?.data?.slug&&d.data.slug!==t.slug&&e({to:"/$org/$project/settings",params:{org:d.data.slug,project:n.slug}})},onError:d=>{R.error(d instanceof Error?d.message:"Failed to update organization")},onSettled:()=>{l(!1)}}),u=d=>{l(!0),m.mutate(d)},f=o.formState.isDirty;return s.jsx(De,{...o,children:s.jsxs("form",{onSubmit:o.handleSubmit(u),className:"space-y-6",children:[s.jsx(Z,{control:o.control,name:"name",render:({field:d})=>s.jsxs(K,{children:[s.jsx(Q,{children:"Organization Name"}),s.jsx(V,{children:s.jsx(ee,{placeholder:"My Organization",...d,disabled:i})}),s.jsx(H,{})]})}),s.jsx(Z,{control:o.control,name:"slug",render:({field:d})=>s.jsxs(K,{children:[s.jsx(Q,{children:"Organization Slug"}),s.jsx(V,{children:s.jsx(ee,{placeholder:"my-organization",...d,disabled:i,onChange:x=>{const a=x.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");d.onChange(a)}})}),s.jsx(ce,{children:"Used in URLs. Only lowercase letters, numbers, and hyphens are allowed."}),s.jsx(H,{})]})}),s.jsx(Z,{control:o.control,name:"logo",render:({field:d})=>s.jsxs(K,{children:[s.jsx(Q,{children:"Logo"}),s.jsx(V,{children:s.jsx(Ot,{value:d.value,onChange:d.onChange,name:o.watch("name")})}),s.jsx(H,{})]})}),s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[s.jsx(U,{type:"submit",disabled:!f||i,className:"min-w-24",children:i?"Saving...":"Save Changes"}),f&&s.jsx(U,{type:"button",variant:"outline",onClick:()=>o.reset(),disabled:i,children:"Cancel"})]})]})})}function At(){const e=z.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Organization"})}),s.jsx(Tt,{})]}),e[0]=t):t=e[0],t}const Ft=ve({name:W().min(1,"Name is required").max(200,"Name is too long"),description:W().max(1e3,"Description is too long").nullable(),themeColor:W().nullable()});function Lt(){const e=z.c(63),{org:t,project:n}=J(),r=le(),i=n.slug===G;let l;e[0]!==t.id?(l={connectionId:fe,orgId:t.id},e[0]=t.id,e[1]=l):l=e[1];const o=xe(l);let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=Se(Ft),e[2]=m):m=e[2];const u=n.name??"",f=n.description??"",d=n.ui?.themeColor??"#60a5fa";let x;e[3]!==u||e[4]!==f||e[5]!==d?(x={resolver:m,values:{name:u,description:f,themeColor:d}},e[3]=u,e[4]=f,e[5]=d,e[6]=x):x=e[6];const a=Ne(x);let g;e[7]!==o||e[8]!==n.id||e[9]!==n.ui?.banner||e[10]!==n.ui?.bannerColor||e[11]!==n.ui?.icon?(g=async k=>{const w=await o.callTool({name:"PROJECT_UPDATE",arguments:{projectId:n.id,name:k.name,description:k.description||null,ui:{themeColor:k.themeColor||null,banner:n.ui?.banner??null,bannerColor:n.ui?.bannerColor??null,icon:n.ui?.icon??null}}});return w.structuredContent??w},e[7]=o,e[8]=n.id,e[9]=n.ui?.banner,e[10]=n.ui?.bannerColor,e[11]=n.ui?.icon,e[12]=g):g=e[12];let j;e[13]!==a||e[14]!==t.id||e[15]!==n.slug||e[16]!==r?(j=()=>{r.invalidateQueries({queryKey:q.project(t.id,n.slug)}),r.invalidateQueries({queryKey:q.projects(t.id)}),a.reset(a.getValues())},e[13]=a,e[14]=t.id,e[15]=n.slug,e[16]=r,e[17]=j):j=e[17];let h;e[18]!==g||e[19]!==j?(h={mutationFn:g,onSuccess:j,onError:Bt},e[18]=g,e[19]=j,e[20]=h):h=e[20];const y=oe(h);let S;e[21]!==y?(S=async k=>{await y.mutateAsync(k)},e[21]=y,e[22]=S):S=e[22];const C=S;let _;e[23]!==a||e[24]!==C?(_=k=>{k(),a.handleSubmit(C)()},e[23]=a,e[24]=C,e[25]=_):_=e[25];const v=_;let c;e[26]!==a||e[27]!==C?(c=a.handleSubmit(C),e[26]=a,e[27]=C,e[28]=c):c=e[28];let p;e[29]!==i||e[30]!==y.isPending||e[31]!==v?(p=k=>{const{field:w}=k;return s.jsxs(K,{children:[s.jsx(Q,{children:"Project Name"}),s.jsx(V,{children:s.jsx(ee,{placeholder:"My Project",...w,onBlur:()=>v(w.onBlur),disabled:i||y.isPending})}),i&&s.jsx(ce,{children:"The organization admin project name cannot be changed."}),s.jsx(H,{})]})},e[29]=i,e[30]=y.isPending,e[31]=v,e[32]=p):p=e[32];let b;e[33]!==a.control||e[34]!==p?(b=s.jsx(Z,{control:a.control,name:"name",render:p}),e[33]=a.control,e[34]=p,e[35]=b):b=e[35];let N;e[36]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Q,{children:"Slug"}),e[36]=N):N=e[36];let P;e[37]!==n.slug?(P=s.jsx(V,{children:s.jsx(ee,{value:n.slug,disabled:!0,className:"bg-muted"})}),e[37]=n.slug,e[38]=P):P=e[38];let I;e[39]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(ce,{children:"The project slug cannot be changed after creation."}),e[39]=I):I=e[39];let E;e[40]!==P?(E=s.jsxs(K,{children:[N,P,I]}),e[40]=P,e[41]=E):E=e[41];let T;e[42]!==y.isPending||e[43]!==v?(T=k=>{const{field:w}=k;return s.jsxs(K,{children:[s.jsx(Q,{children:"Description"}),s.jsx(V,{children:s.jsx(lt,{placeholder:"Optional project description...",rows:3,...w,value:w.value??"",onBlur:()=>v(w.onBlur),disabled:y.isPending})}),s.jsx(H,{})]})},e[42]=y.isPending,e[43]=v,e[44]=T):T=e[44];let $;e[45]!==a.control||e[46]!==T?($=s.jsx(Z,{control:a.control,name:"description",render:T}),e[45]=a.control,e[46]=T,e[47]=$):$=e[47];let D;e[48]!==y.isPending||e[49]!==v?(D=k=>{const{field:w}=k;return s.jsxs(K,{children:[s.jsx(Q,{children:"Color"}),s.jsx(V,{children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"size-9 rounded-md border border-input overflow-hidden cursor-pointer shrink-0",style:{backgroundColor:w.value??"#60a5fa"},children:s.jsx("input",{type:"color",value:w.value??"#60a5fa",onChange:B=>w.onChange(B.target.value),onBlur:()=>v(w.onBlur),disabled:y.isPending,className:"opacity-0 w-full h-full cursor-pointer"})}),s.jsx("span",{className:"font-mono text-sm text-muted-foreground",children:w.value??"#60a5fa"})]})}),s.jsx(H,{})]})},e[48]=y.isPending,e[49]=v,e[50]=D):D=e[50];let A;e[51]!==a.control||e[52]!==D?(A=s.jsx(Z,{control:a.control,name:"themeColor",render:D}),e[51]=a.control,e[52]=D,e[53]=A):A=e[53];let F;e[54]!==c||e[55]!==b||e[56]!==E||e[57]!==$||e[58]!==A?(F=s.jsxs("form",{onSubmit:c,className:"space-y-6",children:[b,E,$,A]}),e[54]=c,e[55]=b,e[56]=E,e[57]=$,e[58]=A,e[59]=F):F=e[59];let L;return e[60]!==a||e[61]!==F?(L=s.jsx("div",{className:"flex flex-col",children:s.jsx(De,{...a,children:F})}),e[60]=a,e[61]=F,e[62]=L):L=e[62],L}function Bt(e){R.error("Failed to update project: "+(e instanceof Error?e.message:"Unknown error"))}function Ae(){const e=z.c(45),{org:t,project:n}=J(),r=ne(),i=le(),[l,o]=O.useState(""),[m,u]=O.useState(!1),f=n.slug===G;let d;e[0]!==t.id?(d={connectionId:fe,orgId:t.id},e[0]=t.id,e[1]=d):d=e[1];const x=xe(d);let a;e[2]!==x||e[3]!==n.id?(a=async()=>{const M=await x.callTool({name:"PROJECT_DELETE",arguments:{projectId:n.id}});return M.structuredContent??M},e[2]=x,e[3]=n.id,e[4]=a):a=e[4];let g;e[5]!==r||e[6]!==t.id||e[7]!==t.slug||e[8]!==i?(g=M=>{M.success?(i.invalidateQueries({queryKey:q.projects(t.id)}),R.success("Project deleted"),r({to:"/$org/$project",params:{org:t.slug,project:G}})):R.error(M.message??"Failed to delete project")},e[5]=r,e[6]=t.id,e[7]=t.slug,e[8]=i,e[9]=g):g=e[9];let j;e[10]!==a||e[11]!==g?(j={mutationFn:a,onSuccess:g,onError:Rt},e[10]=a,e[11]=g,e[12]=j):j=e[12];const h=oe(j);if(f)return null;const y=l===n.name;let S;e[13]!==h?(S=()=>{h.mutate()},e[13]=h,e[14]=S):S=e[14];const C=S;let _;e[15]===Symbol.for("react.memo_cache_sentinel")?(_=M=>{u(M),M||o("")},e[15]=_):_=e[15];const v=_;let c;e[16]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"Danger Zone"}),e[16]=c):c=e[16];let p;e[17]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:"Delete Project"}),s.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Permanently delete this project and all its data. This action cannot be undone."})]}),e[17]=p):p=e[17];let b;e[18]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(rt,{asChild:!0,children:s.jsx(U,{variant:"outline",className:"shrink-0 bg-destructive/10 text-destructive border-0 hover:bg-destructive/15 hover:text-destructive",children:"Delete Project"})}),e[18]=b):b=e[18];let N;e[19]!==n.name?(N=s.jsxs(ot,{children:['Delete "',n.name,'"?']}),e[19]=n.name,e[20]=N):N=e[20];let P;e[21]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(it,{children:"This action cannot be undone. All project data will be permanently deleted."}),e[21]=P):P=e[21];let I;e[22]!==N?(I=s.jsxs(at,{children:[N,P]}),e[22]=N,e[23]=I):I=e[23];let E;e[24]!==n.name?(E=s.jsxs("p",{className:"text-sm mb-2",children:["Type ",s.jsx("strong",{children:n.name})," to confirm:"]}),e[24]=n.name,e[25]=E):E=e[25];let T;e[26]===Symbol.for("react.memo_cache_sentinel")?(T=M=>o(M.target.value),e[26]=T):T=e[26];let $;e[27]!==l||e[28]!==n.name?($=s.jsx(ee,{value:l,onChange:T,placeholder:n.name}),e[27]=l,e[28]=n.name,e[29]=$):$=e[29];let D;e[30]!==E||e[31]!==$?(D=s.jsxs("div",{className:"py-4",children:[E,$]}),e[30]=E,e[31]=$,e[32]=D):D=e[32];let A;e[33]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(ct,{children:"Cancel"}),e[33]=A):A=e[33];const F=!y||h.isPending,L=h.isPending?"Deleting...":"Delete Project";let k;e[34]!==C||e[35]!==F||e[36]!==L?(k=s.jsxs(dt,{children:[A,s.jsx(mt,{onClick:C,disabled:F,className:"bg-destructive/10 text-destructive hover:bg-destructive/15 hover:text-destructive border-0",children:L})]}),e[34]=C,e[35]=F,e[36]=L,e[37]=k):k=e[37];let w;e[38]!==I||e[39]!==D||e[40]!==k?(w=s.jsxs(ut,{children:[I,D,k]}),e[38]=I,e[39]=D,e[40]=k,e[41]=w):w=e[41];let B;return e[42]!==m||e[43]!==w?(B=s.jsxs("div",{className:"flex flex-col",children:[c,s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[p,s.jsxs(ft,{open:m,onOpenChange:v,children:[b,w]})]})]}),e[42]=m,e[43]=w,e[44]=B):B=e[44],B}function Rt(e){R.error("Failed to delete project: "+(e instanceof Error?e.message:"Unknown error"))}function Mt(){const e=z.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"General"}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"flex flex-col",children:[t,s.jsxs("div",{className:"pt-6 flex flex-col gap-6",children:[s.jsx(Lt,{}),s.jsx(Ae,{})]})]}),e[1]=n):n=e[1],n}function Ut({value:e,onValueChange:t,placeholder:n="Select a connection...",binding:r,bindingType:i,onAddNew:l,className:o,disabled:m=!1}){const[u,f]=O.useState(!1),{installByBinding:d,isInstalling:x}=yt(),a=u||x,g=ht(),j=jt({connections:g,binding:typeof r=="string"?r:void 0}),h=!r||!g?g??[]:typeof r=="string"?j:Array.isArray(r)&&r.length>0?g.filter(c=>bt(c,r)):g,y=(()=>{if(!i?.startsWith("@"))return null;const[c,p]=i.replace("@","").split("/");return c&&p?{scope:c,appName:p}:null})(),S=(()=>{let c=h;const p=Array.isArray(r)&&r.length>0;if(y&&!p&&(c=c.filter(b=>{const N=b.app_name,P=b.metadata?.scopeName;return N===y.appName&&P===y.scope})),e&&!c.some(b=>b.id===e)){const b=g?.find(N=>N.id===e);if(b)return[b,...c]}return c})(),C=i?.startsWith("@"),_=async()=>{if(C&&i){f(!0);try{const c=await d(i);c&&t(c.id)}finally{f(!1)}return}l?.()},v=S.find(c=>c.id===e);return s.jsxs(ze,{value:e??"none",onValueChange:c=>t(c==="none"?null:c),disabled:m,children:[s.jsx(Ee,{size:"sm",className:X("w-[200px]",o),children:s.jsx(Xe,{placeholder:n,children:v?s.jsxs("div",{className:"flex items-center gap-2",children:[v.icon?s.jsx("img",{src:v.icon,alt:v.title,className:"w-4 h-4 rounded shrink-0"}):s.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary shrink-0",children:v.title.slice(0,1).toUpperCase()}),s.jsx("span",{className:"truncate",children:v.title})]}):n})}),s.jsxs($e,{children:[s.jsx(Y,{value:"none",children:"No connection"}),S.length===0?s.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:"No compatible connections found"}):S.map(c=>s.jsx(Y,{value:c.id,children:s.jsxs("div",{className:"flex items-center gap-2",children:[c.icon?s.jsx("img",{src:c.icon,alt:c.title,className:"w-4 h-4 rounded"}):s.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:c.title.slice(0,1).toUpperCase()}),s.jsx("span",{children:c.title})]})},c.id)),(l||C)&&s.jsx("div",{className:"border-t border-border",children:s.jsx(U,{onPointerDown:c=>c.stopPropagation(),onClick:c=>{c.preventDefault(),c.stopPropagation(),_()},disabled:a||m,variant:"ghost",className:"w-full justify-start gap-2 px-2 py-2 h-auto hover:bg-muted rounded-md text-sm disabled:opacity-50 disabled:cursor-not-allowed",type:"button",children:a?s.jsxs(s.Fragment,{children:[s.jsx(vt,{size:16,className:"animate-spin"}),s.jsx("span",{children:"Connecting..."})]}):s.jsxs(s.Fragment,{children:[s.jsx(Nt,{size:16}),s.jsx("span",{children:"Add Connection"})]})})})]})]})}const qt=e=>{if(!e||typeof e!="object")return!1;const t=e;return t.type==="text"&&typeof t.text=="string"&&t.text.trim().toLowerCase().startsWith("error")},de=e=>{const t=e.structuredContent??e,n=t&&typeof t=="object"?t:null,r=n?.content?.[0]?.text&&typeof n.content[0].text=="string"?n.content[0].text:null;if(n?.isError)throw new Error(r??"Tool call failed");if(qt(t))throw new Error(t.text);return t};function Gt(e){return e.requiresMcpBinding===!0?!0:e.binding!==void 0}function Kt(e){const t=z.c(57),{plugin:n,isEnabled:r,isSaving:i,pendingBinding:l,description:o,label:m,icon:u,projectId:f,client:d,onBindingChange:x,onToggle:a}=e;let g;t[0]!==n?(g=Gt(n),t[0]=n,t[1]=g):g=t[1];const j=g;let h;t[2]!==n.id||t[3]!==f?(h=q.projectPluginConfig(f??"",n.id),t[2]=n.id,t[3]=f,t[4]=h):h=t[4];let y;t[5]!==d||t[6]!==n.id||t[7]!==f?(y=async()=>{if(!f)throw new Error("Project ID is required to load plugin config.");const B=await d.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:f,pluginId:n.id}});return de(B)},t[5]=d,t[6]=n.id,t[7]=f,t[8]=y):y=t[8];const S=!!f&&j;let C;t[9]!==h||t[10]!==y||t[11]!==S?(C={queryKey:h,queryFn:y,enabled:S},t[9]=h,t[10]=y,t[11]=S,t[12]=C):C=t[12];const{data:_,isLoading:v}=xt(C),c=_?.config?.connectionId??null,p=l!==void 0?l:c;let b;t[13]!==r||t[14]!==i||t[15]!==a||t[16]!==n.id?(b=()=>!i&&a(n.id,!r),t[13]=r,t[14]=i,t[15]=a,t[16]=n.id,t[17]=b):b=t[17];const N=i?void 0:"pointer";let P;t[18]!==N?(P={cursor:N},t[18]=N,t[19]=P):P=t[19];let I;t[20]!==u?(I=u&&s.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0 [&>svg]:size-4",children:u}),t[20]=u,t[21]=I):I=t[21];let E;t[22]!==m?(E=s.jsx("p",{className:"text-sm font-medium text-foreground",children:m}),t[22]=m,t[23]=E):E=t[23];let T;t[24]!==o?(T=o&&s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:o}),t[24]=o,t[25]=T):T=t[25];let $;t[26]!==E||t[27]!==T?($=s.jsxs("div",{className:"min-w-0",children:[E,T]}),t[26]=E,t[27]=T,t[28]=$):$=t[28];let D;t[29]!==$||t[30]!==I?(D=s.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[I,$]}),t[29]=$,t[30]=I,t[31]=D):D=t[31];let A;t[32]!==a||t[33]!==n.id?(A=B=>a(n.id,B),t[32]=a,t[33]=n.id,t[34]=A):A=t[34];let F;t[35]!==r||t[36]!==i||t[37]!==A?(F=s.jsx("div",{onClick:Vt,className:"shrink-0",children:s.jsx(se,{checked:r,onCheckedChange:A,disabled:i})}),t[35]=r,t[36]=i,t[37]=A,t[38]=F):F=t[38];let L;t[39]!==D||t[40]!==F?(L=s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[D,F]}),t[39]=D,t[40]=F,t[41]=L):L=t[41];let k;t[42]!==v||t[43]!==r||t[44]!==i||t[45]!==j||t[46]!==x||t[47]!==n.binding||t[48]!==n.id||t[49]!==p||t[50]!==c?(k=r&&j&&s.jsxs("div",{onClick:Qt,className:"pb-4 pl-7 flex items-center gap-3",children:[s.jsx(gt,{className:"text-xs text-muted-foreground w-24",children:"Connection"}),s.jsx(Ut,{value:p??null,onValueChange:B=>x(n.id,B,c),binding:n.binding,placeholder:"Select connection...",className:"w-56",disabled:i||v})]}),t[42]=v,t[43]=r,t[44]=i,t[45]=j,t[46]=x,t[47]=n.binding,t[48]=n.id,t[49]=p,t[50]=c,t[51]=k):k=t[51];let w;return t[52]!==L||t[53]!==k||t[54]!==b||t[55]!==P?(w=s.jsxs("div",{className:"flex flex-col border-b border-border last:border-0",onClick:b,style:P,children:[L,k]}),t[52]=L,t[53]=k,t[54]=b,t[55]=P,t[56]=w):w=t[56],w}function Qt(e){return e.stopPropagation()}function Vt(e){return e.stopPropagation()}function Jt(){const{org:e,project:t}=J(),n=le(),r=xe({connectionId:fe,orgId:e.id}),[i,l]=O.useState({}),[o,m]=O.useState({}),[u,f]=O.useState(!1),d=t.enabledPlugins??[],x=c=>{const p=i[c];return p!==void 0?p:d.includes(c)},a=()=>{const c=new Set(d);for(const[p,b]of Object.entries(i))b?c.add(p):c.delete(p);return Array.from(c)},g=Object.keys(i).length>0||Object.keys(o).length>0,j=(c,p)=>{const b=d.includes(c);l(p===b?N=>{const{[c]:P,...I}=N;return I}:N=>({...N,[c]:p}))},h=(c,p,b)=>{if(p===b){m(N=>{const{[c]:P,...I}=N;return I});return}m(N=>({...N,[c]:p}))},y=oe({mutationFn:async c=>{const p=[];if(c.updatePlugins){const b=await r.callTool({name:"PROJECT_UPDATE",arguments:{projectId:t.id,enabledPlugins:c.enabledPlugins}});p.push(de(b))}if(c.bindingUpdates.length>0){const b=await Promise.all(c.bindingUpdates.map(async({pluginId:N,connectionId:P})=>{const I=await r.callTool({name:"PROJECT_PLUGIN_CONFIG_UPDATE",arguments:{projectId:t.id,pluginId:N,connectionId:P}});return de(I)}));p.push(...b)}return p},onSuccess:(c,p)=>{p.updatePlugins&&(n.invalidateQueries({queryKey:q.project(e.id,t.slug)}),n.invalidateQueries({queryKey:q.projects(e.id)})),p.bindingUpdates.forEach(({pluginId:b})=>{n.invalidateQueries({queryKey:q.projectPluginConfig(t.id??"",b)})}),l({}),m({}),R.success("Plugins updated successfully")},onError:c=>{R.error("Failed to update plugins: "+(c instanceof Error?c.message:"Unknown error"))},onSettled:()=>{f(!1)}}),S=()=>{f(!0),y.mutate({enabledPlugins:a(),updatePlugins:Object.keys(i).length>0,bindingUpdates:Object.entries(o).map(([c,p])=>({pluginId:c,connectionId:p}))})},C=()=>{l({}),m({})},_=c=>{const p=Be.find(b=>b.pluginId===c);return p?{label:p.label,icon:p.items[0]?.icon}:null},v=c=>re.find(b=>b.id===c)?.description??null;return re.length===0?s.jsx("p",{className:"text-sm text-muted-foreground",children:"No plugins available."}):s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"flex flex-col",children:re.map(c=>{const p=_(c.id),b=v(c.id),N=x(c.id);return s.jsx(Kt,{plugin:c,isEnabled:N,isSaving:u,pendingBinding:o[c.id],description:b,label:p?.label??c.id,icon:p?.icon??s.jsx(pt,{size:14}),projectId:t.id,client:r,onBindingChange:h,onToggle:j},c.id)})}),s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[s.jsx(U,{variant:"outline",onClick:C,disabled:!g||u,children:"Cancel"}),s.jsx(U,{onClick:S,disabled:!g||u,className:"min-w-24",children:u?"Saving...":"Save Changes"})]})]})}function be(){const e=z.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Plugins"})}),s.jsx(Jt,{})]}),e[0]=t):t=e[0],t}function Wt(){const e=z.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Danger Zone"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Irreversible and destructive actions."})]}),s.jsx(Ae,{})]}),e[0]=t):t=e[0],t}function Fe(){const e=z.c(3);let t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(te,{className:"h-6 w-48"}),n=s.jsx(te,{className:"h-4 w-80"}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("div",{className:"flex flex-col gap-4 pt-2",children:[t,n,s.jsxs("div",{className:"mt-4 flex flex-col gap-3",children:[s.jsx(te,{className:"h-12 w-full"}),s.jsx(te,{className:"h-12 w-full"})]})]}),e[2]=r):r=e[2],r}function ye(e){const t=z.c(14),{projectSlug:n,children:r}=e,{org:i}=J(),{data:l,isLoading:o}=_e(i.id,n);if(o||!l){let x;return t[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Fe,{}),t[0]=x):x=t[0],x}const m=n===G;let u;t[1]!==l.description||t[2]!==l.enabledPlugins||t[3]!==l.id||t[4]!==l.name||t[5]!==l.organizationId||t[6]!==l.slug||t[7]!==l.ui||t[8]!==m?(u={id:l.id,organizationId:l.organizationId,slug:l.slug,name:l.name,description:l.description,enabledPlugins:l.enabledPlugins,ui:l.ui,isOrgAdmin:m},t[1]=l.description,t[2]=l.enabledPlugins,t[3]=l.id,t[4]=l.name,t[5]=l.organizationId,t[6]=l.slug,t[7]=l.ui,t[8]=m,t[9]=u):u=t[9];const f=u;let d;return t[10]!==r||t[11]!==f||t[12]!==i?(d=s.jsx(Ce,{org:i,project:f,children:r}),t[10]=r,t[11]=f,t[12]=i,t[13]=d):d=t[13],d}function Zt(e){const t=z.c(19),{section:n}=e;let r;t[0]!==n?(r=ke(n),t[0]=n,t[1]=r):r=t[1];const i=r;if(i){let l;t[2]!==i.sub?(l=i.sub==="general"&&s.jsx(Mt,{}),t[2]=i.sub,t[3]=l):l=t[3];let o;t[4]!==i.sub?(o=i.sub==="plugins"&&s.jsx(be,{}),t[4]=i.sub,t[5]=o):o=t[5];let m;t[6]!==i.sub?(m=i.sub==="danger"&&s.jsx(Wt,{}),t[6]=i.sub,t[7]=m):m=t[7];let u;return t[8]!==i.slug||t[9]!==l||t[10]!==o||t[11]!==m?(u=s.jsxs(ye,{projectSlug:i.slug,children:[l,o,m]}),t[8]=i.slug,t[9]=l,t[10]=o,t[11]=m,t[12]=u):u=t[12],u}switch(n){case"account.profile":{let l;return t[13]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(kt,{}),t[13]=l):l=t[13],l}case"account.preferences":{let l;return t[14]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(he,{}),t[14]=l):l=t[14],l}case"account.experimental":{let l;return t[15]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx($t,{}),t[15]=l):l=t[15],l}case"org.general":{let l;return t[16]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(At,{}),t[16]=l):l=t[16],l}case"org.plugins":{let l;return t[17]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ye,{projectSlug:G,children:s.jsx(be,{})}),t[17]=l):l=t[17],l}default:{let l;return t[18]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(he,{}),t[18]=l):l=t[18],l}}}function Ht(){const e=z.c(23),{isOpen:t,activeSection:n,open:r,close:i}=Ze();let l;e[0]!==i?(l=y=>!y&&i(),e[0]=i,e[1]=l):l=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"w-52 shrink-0 border-r border-border"}),e[2]=o):o=e[2];let m;e[3]!==n||e[4]!==r?(m=s.jsx(O.Suspense,{fallback:o,children:s.jsx(Pt,{activeSection:n,onNavigate:r})}),e[3]=n,e[4]=r,e[5]=m):m=e[5];let u,f;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Pe,{size:16}),f=s.jsx("span",{className:"sr-only",children:"Close"}),e[6]=u,e[7]=f):(u=e[6],f=e[7]);let d;e[8]!==i?(d=s.jsxs("button",{type:"button",onClick:i,className:"absolute top-4 right-4 rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-ring",children:[u,f]}),e[8]=i,e[9]=d):d=e[9];let x;e[10]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Fe,{}),e[10]=x):x=e[10];let a;e[11]!==n?(a=s.jsx(O.Suspense,{fallback:x,children:s.jsx(Zt,{section:n})}),e[11]=n,e[12]=a):a=e[12];let g;e[13]!==d||e[14]!==a?(g=s.jsxs("div",{className:"flex-1 overflow-y-auto p-8 min-w-0 relative",children:[d,a]}),e[13]=d,e[14]=a,e[15]=g):g=e[15];let j;e[16]!==m||e[17]!==g?(j=s.jsx(qe,{className:"sm:max-w-[1100px] h-[85vh] p-0 overflow-hidden flex flex-col gap-0",closeButtonClassName:"hidden",children:s.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[m,g]})}),e[16]=m,e[17]=g,e[18]=j):j=e[18];let h;return e[19]!==t||e[20]!==l||e[21]!==j?(h=s.jsx(Ge,{open:t,onOpenChange:l,children:j}),e[19]=t,e[20]=l,e[21]=j,e[22]=h):h=e[22],h}function Yt(e){const t=z.c(12),{projectSlug:n,orgSlug:r,error:i}=e,l=ne();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("h1",{className:"text-xl font-semibold",children:"Failed to load project"}),t[0]=o):o=t[0];let m;t[1]!==n?(m=s.jsxs("p",{className:"text-muted-foreground text-center",children:['There was an error loading the project "',n,'".']}),t[1]=n,t[2]=m):m=t[2];let u;t[3]!==i.message?(u=s.jsx("p",{className:"text-sm text-muted-foreground",children:i.message}),t[3]=i.message,t[4]=u):u=t[4];let f;t[5]!==l||t[6]!==r?(f=s.jsx(U,{variant:"link",onClick:()=>l({to:"/$org/$project",params:{org:r,project:G}}),children:"Go to organization home"}),t[5]=l,t[6]=r,t[7]=f):f=t[7];let d;return t[8]!==m||t[9]!==u||t[10]!==f?(d=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[o,m,u,f]}),t[8]=m,t[9]=u,t[10]=f,t[11]=d):d=t[11],d}function Xt(e){const t=z.c(9),{projectSlug:n,orgSlug:r}=e,i=ne();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("h1",{className:"text-xl font-semibold",children:"Project not found"}),t[0]=l):l=t[0];let o;t[1]!==n?(o=s.jsxs("p",{className:"text-muted-foreground text-center",children:['The project "',n,'" does not exist in this organization.']}),t[1]=n,t[2]=o):o=t[2];let m;t[3]!==i||t[4]!==r?(m=s.jsx(U,{variant:"link",onClick:()=>i({to:"/$org/$project",params:{org:r,project:G}}),children:"Go to organization home"}),t[3]=i,t[4]=r,t[5]=m):m=t[5];let u;return t[6]!==o||t[7]!==m?(u=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[l,o,m]}),t[6]=o,t[7]=m,t[8]=u):u=t[8],u}function es(){const e=z.c(23);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const n=Re(t),{org:r}=J(),i=n.org,l=n.project,{data:o,isLoading:m,error:u}=_e(r.id,l);if(m){let h;return e[1]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(ae,{}),e[1]=h):h=e[1],h}if(u){let h;return e[2]!==u||e[3]!==i||e[4]!==l?(h=s.jsx(Yt,{projectSlug:l,orgSlug:i,error:u}),e[2]=u,e[3]=i,e[4]=l,e[5]=h):h=e[5],h}if(!o){let h;return e[6]!==i||e[7]!==l?(h=s.jsx(Xt,{projectSlug:l,orgSlug:i}),e[6]=i,e[7]=l,e[8]=h):h=e[8],h}const f=o.slug===G;let d;e[9]!==o.description||e[10]!==o.enabledPlugins||e[11]!==o.id||e[12]!==o.name||e[13]!==o.organizationId||e[14]!==o.slug||e[15]!==o.ui||e[16]!==f?(d={id:o.id,organizationId:o.organizationId,slug:o.slug,name:o.name,description:o.description,enabledPlugins:o.enabledPlugins,ui:o.ui,isOrgAdmin:f},e[9]=o.description,e[10]=o.enabledPlugins,e[11]=o.id,e[12]=o.name,e[13]=o.organizationId,e[14]=o.slug,e[15]=o.ui,e[16]=f,e[17]=d):d=e[17];const x=d;let a,g;e[18]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(O.Suspense,{fallback:s.jsx(ae,{}),children:s.jsx(Me,{})}),g=s.jsx(Ht,{}),e[18]=a,e[19]=g):(a=e[18],g=e[19]);let j;return e[20]!==x||e[21]!==r?(j=s.jsxs(Ce,{org:r,project:x,children:[a,g]}),e[20]=x,e[21]=r,e[22]=j):j=e[22],j}function Rs(){const e=z.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(O.Suspense,{fallback:s.jsx(ae,{}),children:s.jsx(es,{})}),e[0]=t):t=e[0],t}export{Rs as default};
@@ -1,3 +0,0 @@
1
- import{r as O,c as $,j as s,u as ce,b as Ce,by as _e,L as Ie,bG as pt,bF as xt,O as V,H as ht,e as Oe,d as ae,t as le,bH as gt,b6 as jt,m as bt,A as Nt,S as He,f as vt,h as yt,N as St,n as kt,K as Ct,aD as Ue,P as _t}from"./index-CEFIvFnf.js";import{C as X}from"./index-CjOTWUhd.js";import{I as wt}from"./integration-icon-D3KY1sTg.js";import{P as de,u as We,d as ie,e as ee,f as we,g as ge,h as je,i as Be,j as $t,k as zt,l as Ge,m as It,n as Pt,o as At,p as Ot}from"./index-DqBwvK0E.js";import{u as Te,C as Tt,e as Mt,f as Et}from"./use-deco-chat-open-gpgx82-l.js";import{c as B,B as Se}from"./button-COjpHvkK.js";import{d as Lt}from"./constants-D-wlluJ1.js";import{T as Dt,i as Rt,b as Ft}from"./typewriter-title-yszFjZyk.js";import{s as xe}from"./Plus-BgTScIjT.js";import{t as Me}from"./Users03-mLhLYYpx.js";import{i as Pe,a as Ht,b as Ut,T as Wt}from"./tooltip-WTQ1Sf9I.js";import{E as qe}from"./error-boundary-CCf2jUlG.js";import{b as Bt,i as Gt}from"./context-JZ9bzUIC.js";import{C as Ve}from"./create-project-dialog-pcTtT4gK.js";import{u as $e,S as Y}from"./skeleton-B5wseAX1.js";import{t as Ke,u as qt}from"./use-settings-modal-DWpwYi2w.js";import{n as De}from"./CheckDone01-CWio5h0R.js";import{n as Vt}from"./Container-83NFZamb.js";import{e as Kt}from"./Dataflow03-C__zTPE5.js";import{a as Zt}from"./Home02-DUurisPV.js";import{t as ke}from"./Settings01-B3ha2umj.js";import{a as Ze,u as Qe}from"./use-project-Cpu_jAWh.js";import{t as Ye}from"./ChevronDown-DugvEHIv.js";import{A as ue}from"./avatar-De3rgEZe.js";import{c as Z,g as he,d as Qt,e as Yt,f as Jt,b as Je,D as Xe,a as et}from"./dropdown-menu-DFSc-v7C.js";import{i as fe}from"./Check-DYZ8kvzv.js";import{C as Xt}from"./create-organization-dialog-CtvnKlw-.js";import{a as es}from"./Copy01-CqukwIfv.js";import{i as tt}from"./File06-BCPbJ79i.js";import{i as ts}from"./Globe01-C--nEoR6.js";import{n as pe}from"./LinkExternal01-B0wN3aw-.js";import{i as ss}from"./Shield01-CmaBuhqg.js";import{a as rs,P as ns,b as is}from"./popover-CJJX7cOM.js";import{n as Re}from"./Inbox01-BjRCuorQ.js";import{s as os}from"./XClose-CUkPQHX7.js";import{u as st,a as ls}from"./use-organization-settings-BzT6x8GT.js";import{i as as}from"./ChevronRight-B5elpXGa.js";import{u as Ee,L as Le}from"./localstorage-keys-CRTQAB4C.js";import{R as cs,a as rt,b as ms}from"./resizable-BeAVlcw0.js";import"./spinner-JsI3DFrV.js";import"./use-mcp-prompts-VDHthI2F.js";import"./useQuery-DMUhrQv9.js";import"./dialog-DbMPbzlh.js";import"./form-ek51qwAH.js";import"./label-OGiRqcEX.js";import"./input-UPbtT6D5.js";import"./usage-B8eRkRZY.js";import"./ArrowUp-CkjIXBAe.js";import"./Edit01-CO8VRSTn.js";import"./XCircle-DYabZgm3.js";import"./AlertCircle-BvhzS1YT.js";import"./AlertTriangle-BUE7sdod.js";import"./ArrowLeft-BU2sm27g.js";import"./use-copy-DxEdnDUl.js";import"./badge-Dic8iag_.js";import"./Code01-Dv0mdRP8.js";import"./use-virtual-mcp-CzLaRfMK.js";import"./use-connection-Cn_KCAac.js";import"./useMutation-CRJhwh4V.js";import"./SearchMd-qPELZ8ba.js";import"./use-create-virtual-mcp-D2iqPR2G.js";import"./marked.esm-BaswSlok.js";import"./markdown-Ca1p_aAP.js";import"./tools-list-Beeckj80.js";import"./collection-table-wrapper-qfYRj5nQ.js";import"./Grid01-BWlobPSC.js";import"./List-Bm2F0wOt.js";import"./table-C25e3lsO.js";import"./empty-state-CWevsb-G.js";import"./Loading01-DVlzuDXC.js";import"./card-BiC_BjTe.js";import"./Eye-B5D7LmIz.js";import"./Globe02-CaREPjt_.js";import"./RefreshCw01-DlEvV3CS.js";import"./layout-CvVtUUQW.js";import"./generate-id-Dyweu44Y.js";import"./Clock-BWKgsoiG.js";import"./Trash01-BwVrCeYG.js";import"./use-mobile-DZvuCyAg.js";import"./decopilot-events-Brt4gAR6.js";import"./use-llm-1lq-QT_E.js";import"./use-binding-Xiu53R3H.js";import"./binder-kzm2-hR4.js";import"./select-CwgyA5Wi.js";import"./Image01-CiXOk6aA.js";import"./RefreshCcw01-C9q1gCtA.js";import"./useSuspenseInfiniteQuery-CvuCfv37.js";import"./infiniteQueryObserver-B9nwx2aL.js";import"./textarea-BzrbRDMZ.js";import"./alert-dialog-IbckaySD.js";const nt=({size:t=24,color:e="currentColor",...r})=>O.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},O.createElement("path",{d:"M9 7H4.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C3 7.76 3 8.04 3 8.6v10.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 21 4.04 21 4.6 21H9m0 0h6m-6 0V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C9.76 3 10.04 3 10.6 3h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C15 3.76 15 4.04 15 4.6V21m0-10h4.4c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C21 11.76 21 12.04 21 12.6v6.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C20.24 21 19.96 21 19.4 21H15"}));nt.displayName="BarChart10";const it=({size:t=24,color:e="currentColor",...r})=>O.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},O.createElement("path",{d:"M8 14s1.5 2 4 2 4-2 4-2m-1-5h.01M9 9h.01M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-6.5-3a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Zm-6 0a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Z"}));it.displayName="FaceSmile";const ot=({size:t=24,color:e="currentColor",...r})=>O.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},O.createElement("path",{d:"m16 17 5-5m0 0-5-5m5 5H9m0-9H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 21 6.12 21 7.8 21H9"}));ot.displayName="LogOut01";const lt=({size:t=24,color:e="currentColor",...r})=>O.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},O.createElement("path",{d:"M8 9.5h4M8 13h7m-3 8a9 9 0 1 0-8.342-5.616c.081.2.122.3.14.381a.907.907 0 0 1 .024.219c0 .083-.015.173-.045.353l-.593 3.558c-.062.373-.093.56-.035.694a.5.5 0 0 0 .262.262c.135.058.321.027.694-.035l3.558-.593c.18-.03.27-.045.353-.045.081 0 .14.006.219.024.08.018.18.059.38.14A8.973 8.973 0 0 0 12 21Z"}));lt.displayName="MessageTextCircle02";function ds(){const t=$.c(65),{org:e}=ce(),[,r]=Te(),{selectedVirtualMcp:o,modelsConnections:i,isChatEmpty:l,activeThreadId:n,createThread:a,switchToThread:d,threads:c}=Bt();let m;if(t[0]!==n||t[1]!==c){let U;t[3]!==n?(U=G=>G.id===n,t[3]=n,t[4]=U):U=t[4],m=c.find(U),t[0]=n,t[1]=c,t[2]=m}else m=t[2];const f=m,[u,h]=O.useState(!1),[x,g]=O.useTransition();let j;t[5]!==e.id?(j=Lt(e.id),t[5]=e.id,t[6]=j):j=t[6];const p=o??j;let b;t[7]!==a?(b=()=>{g(()=>{a()})},t[7]=a,t[8]=b):b=t[8];const S=b;if(i.length===0){let U;t[9]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(de.Header.Left,{className:"gap-2"}),t[9]=U):U=t[9];let G;t[10]!==r?(G=()=>r(!1),t[10]=r,t[11]=G):G=t[11];let k;t[12]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(Pe,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[12]=k):k=t[12];let q;t[13]!==G?(q=s.jsxs(de.Header,{className:"flex-none",hideSidebarTrigger:!0,children:[U,s.jsx(de.Header.Right,{className:"gap-1",children:s.jsx("button",{type:"button",onClick:G,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:k})})]}),t[13]=G,t[14]=q):q=t[14];let ne;t[15]!==e?(ne=s.jsx(X.Main,{className:"flex flex-col items-center",children:s.jsx(X.EmptyState,{children:s.jsx(X.NoLlmBindingEmptyState,{title:"No model provider connected",description:"Connect to a model provider to unlock AI-powered features.",org:e})})}),t[15]=e,t[16]=ne):ne=t[16];let me;return t[17]!==q||t[18]!==ne?(me=s.jsxs(X,{className:"animate-in fade-in-0 duration-200",children:[q,ne]}),t[17]=q,t[18]=ne,t[19]=me):me=t[19],me}const v=u?"duration-300 opacity-0 -translate-x-4 pointer-events-none":x?"duration-150 opacity-0 pointer-events-none":"duration-300 opacity-100 translate-x-0";let C;t[20]!==v?(C=B("absolute inset-0 flex flex-col transition-[opacity,transform] ease-[var(--ease-out-quart)]",v),t[20]=v,t[21]=C):C=t[21];let N;t[22]!==f||t[23]!==l?(N=!l&&f?.title&&s.jsx(Dt,{text:f.title,className:"text-sm font-medium text-foreground"}),t[22]=f,t[23]=l,t[24]=N):N=t[24];let z;t[25]!==N?(z=s.jsx(de.Header.Left,{className:"gap-2",children:N}),t[25]=N,t[26]=z):z=t[26];let T;t[27]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(xe,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[27]=T):T=t[27];let E;t[28]!==S||t[29]!==x?(E=s.jsx("button",{type:"button",onClick:S,disabled:x,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",title:"New chat",children:T}),t[28]=S,t[29]=x,t[30]=E):E=t[30];let M;t[31]===Symbol.for("react.memo_cache_sentinel")?(M=()=>h(!0),t[31]=M):M=t[31];let W;t[32]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx("button",{type:"button",onClick:M,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"Chat history",children:s.jsx(Rt,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})}),t[32]=W):W=t[32];let D;t[33]!==r?(D=()=>r(!1),t[33]=r,t[34]=D):D=t[34];let R;t[35]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(Pe,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[35]=R):R=t[35];let I;t[36]!==D?(I=s.jsx("button",{type:"button",onClick:D,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:R}),t[36]=D,t[37]=I):I=t[37];let L;t[38]!==I||t[39]!==E?(L=s.jsxs(de.Header.Right,{className:"gap-1",children:[E,W,I]}),t[38]=I,t[39]=E,t[40]=L):L=t[40];let w;t[41]!==L||t[42]!==z?(w=s.jsxs(de.Header,{className:"flex-none",hideSidebarTrigger:!0,children:[z,L]}),t[41]=L,t[42]=z,t[43]=w):w=t[43];let P;t[44]!==p||t[45]!==l?(P=s.jsx(X.Main,{children:l?s.jsx(X.EmptyState,{children:s.jsxs("div",{className:"flex flex-col items-center gap-6 w-full px-4",children:[s.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 p-0 text-center",children:[s.jsx(wt,{icon:p.icon,name:p.title,size:"lg",fallbackIcon:s.jsx(Me,{size:32}),className:"size-[60px]! rounded-[18px]!"}),s.jsx("h3",{className:"text-xl font-medium text-foreground",children:p.title}),s.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:p.description??"Ask anything about configuring model providers or using MCP Mesh."})]}),s.jsx(X.IceBreakers,{})]})}):s.jsx(X.Messages,{})}),t[44]=p,t[45]=l,t[46]=P):P=t[46];let A;t[47]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(X.Footer,{children:s.jsx(X.Input,{})}),t[47]=A):A=t[47];let F;t[48]!==w||t[49]!==P||t[50]!==C?(F=s.jsxs("div",{className:C,children:[w,P,A]}),t[48]=w,t[49]=P,t[50]=C,t[51]=F):F=t[51];const re=u?"opacity-100 translate-x-0":"opacity-0 translate-x-4 pointer-events-none";let te;t[52]!==re?(te=B("absolute inset-0 flex flex-col transition-[opacity,transform] duration-300 ease-[var(--ease-out-quart)]",re),t[52]=re,t[53]=te):te=t[53];let se;t[54]===Symbol.for("react.memo_cache_sentinel")?(se=()=>h(!1),t[54]=se):se=t[54];let K;t[55]!==n||t[56]!==d||t[57]!==c?(K=s.jsx(Ft,{threads:c,activeThreadId:n,onThreadSelect:d,onClose:se}),t[55]=n,t[56]=d,t[57]=c,t[58]=K):K=t[58];let H;t[59]!==te||t[60]!==K?(H=s.jsx("div",{className:te,children:K}),t[59]=te,t[60]=K,t[61]=H):H=t[61];let Q;return t[62]!==F||t[63]!==H?(Q=s.jsxs(X,{className:"relative overflow-hidden animate-in fade-in-0 duration-200",children:[F,H]}),t[62]=F,t[63]=H,t[64]=Q):Q=t[64],Q}function us(){const t=$.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(X.Skeleton,{}),t[0]=e):e=t[0];let r;return t[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(qe,{fallback:e,children:s.jsx(O.Suspense,{fallback:s.jsx(X.Skeleton,{}),children:s.jsx(ds,{})})}),t[1]=r):r=t[1],r}function fs(){const t=$.c(54),[e]=$e(),{locator:r,org:o}=ce(),i=Ce(),l=_e(),{org:n,project:a}=Ie.parse(r),d=Ie.isOrgAdminProject(r),{data:c}=Ze(o.id,a);let m;t[0]!==c?.enabledPlugins?(m=c?.enabledPlugins??[],t[0]=c?.enabledPlugins,t[1]=m):m=t[1];const f=m;let u;t[2]!==f?(u=_=>f.includes(_.pluginId),t[2]=f,t[3]=u):u=t[3];const h=pt.filter(u),x=l.location.pathname,g=`/${n}/${a}`,j=x===g||x===`${g}/`;let y;t[4]!==g||t[5]!==x?(y=_=>x.startsWith(`${g}/${_}`),t[4]=g,t[5]=x,t[6]=y):y=t[6];const p=y;let b;t[7]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Zt,{}),t[7]=b):b=t[7];const S={key:"home",label:"Home",icon:b,isActive:j,onClick:()=>{j?window.dispatchEvent(new CustomEvent("reset-home-view")):i({to:"/$org/$project",params:{org:n,project:a}})}};let v;t[8]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(De,{}),t[8]=v):v=t[8];const C={key:"tasks",label:"Tasks",icon:v,isActive:p("tasks"),onClick:()=>i({to:"/$org/$project/tasks",params:{org:n,project:V}})};let N;t[9]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Vt,{}),t[9]=N):N=t[9];const z={key:"mcps",label:"Connections",icon:N,isActive:p("mcps"),onClick:()=>i({to:"/$org/$project/mcps",params:{org:n,project:V}})};let T;t[10]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(ht,{}),t[10]=T):T=t[10];const E={key:"projects",label:"Projects",icon:T,isActive:p("projects"),onClick:()=>i({to:"/$org/$project/projects",params:{org:n,project:V}})};let M;t[11]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx(Ke,{}),t[11]=M):M=t[11];const W={key:"store",label:"Store",icon:M,isActive:p("store"),onClick:()=>i({to:"/$org/$project/store",params:{org:n,project:V}})};let D;t[12]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Me,{}),t[12]=D):D=t[12];const R={key:"agents",label:"Agents",icon:D,isActive:p("agents"),onClick:()=>i({to:"/$org/$project/agents",params:{org:n,project:V}})};let I;t[13]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(nt,{}),t[13]=I):I=t[13];const L={key:"monitoring",label:"Monitor",icon:I,isActive:p("monitoring"),onClick:()=>i({to:"/$org/$project/monitoring",params:{org:n,project:V}})};let w;t[14]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(it,{}),t[14]=w):w=t[14];const P={key:"members",label:"Members",icon:w,isActive:p("members"),onClick:()=>i({to:"/$org/$project/members",params:{org:n,project:V}})},A=h.map(_=>({key:_.pluginId,label:_.label,icon:_.icon,isActive:p(_.pluginId),onClick:()=>i({to:"/$org/$project/$pluginId",params:{org:n,project:a,pluginId:_.pluginId}})}));let F;t[15]!==f?(F=_=>f.includes(_.pluginId),t[15]=f,t[16]=F):F=t[16];const te=xt.filter(F).map(_=>({type:"group",group:{id:`${_.pluginId}-${_.id}`,label:_.label,items:_.items.map((J,oe)=>({key:`${_.pluginId}-${_.id}-${oe}`,label:J.label,icon:J.icon,isActive:p(_.pluginId),onClick:()=>i({to:"/$org/$project/$pluginId",params:{org:n,project:a,pluginId:_.pluginId}})})),defaultExpanded:_.defaultExpanded??!0}}));if(d){let _;t[17]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(ke,{}),t[17]=_):_=t[17];let J;t[18]!==p?(J=p("settings"),t[18]=p,t[19]=J):J=t[19];let oe;t[20]!==i||t[21]!==n?(oe=()=>i({to:"/$org/$project/settings",params:{org:n,project:V}}),t[20]=i,t[21]=n,t[22]=oe):oe=t[22];let ve;t[23]!==J||t[24]!==oe?(ve={key:"settings",label:"Settings",icon:_,isActive:J,onClick:oe},t[23]=J,t[24]=oe,t[25]=ve):ve=t[25];const ft=ve,ze=[{type:"items",items:[S,...e.experimental_tasks?[C]:[],...e.experimental_projects?[E]:[]]},{type:"group",group:{id:"build",label:"Build",items:[R,z,W],defaultExpanded:!0}},{type:"group",group:{id:"manage",label:"Manage",items:[L,P,ft],defaultExpanded:!0}}];if(A.length>0){let ye;t[26]!==A?(ye={type:"items",items:A},t[26]=A,t[27]=ye):ye=t[27],ze.push(ye)}return te.length>0&&ze.push(...te),ze}let se;t[28]===Symbol.for("react.memo_cache_sentinel")?(se=s.jsx(De,{}),t[28]=se):se=t[28];let K;t[29]!==p?(K=p("tasks"),t[29]=p,t[30]=K):K=t[30];let H;t[31]!==i||t[32]!==n||t[33]!==a?(H=()=>i({to:"/$org/$project/tasks",params:{org:n,project:a}}),t[31]=i,t[32]=n,t[33]=a,t[34]=H):H=t[34];let Q;t[35]!==K||t[36]!==H?(Q={key:"tasks",label:"Tasks",icon:se,isActive:K,onClick:H},t[35]=K,t[36]=H,t[37]=Q):Q=t[37];const U=Q;let G;t[38]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsx(Kt,{}),t[38]=G):G=t[38];let k;t[39]!==p?(k=p("workflows"),t[39]=p,t[40]=k):k=t[40];let q;t[41]!==i||t[42]!==n||t[43]!==a?(q=()=>i({to:"/$org/$project/workflows",params:{org:n,project:a}}),t[41]=i,t[42]=n,t[43]=a,t[44]=q):q=t[44];let ne;t[45]!==k||t[46]!==q?(ne={key:"workflows",label:"Workflows",icon:G,isActive:k,onClick:q},t[45]=k,t[46]=q,t[47]=ne):ne=t[47];const me=ne;let be;t[48]!==e.experimental_tasks||t[49]!==U?(be=e.experimental_tasks?[U]:[],t[48]=e.experimental_tasks,t[49]=U,t[50]=be):be=t[50];const Ne=[{type:"items",items:[S,...be,me]}];if(A.length>0){let _;t[51]===Symbol.for("react.memo_cache_sentinel")?(_={type:"divider"},t[51]=_):_=t[51],Ne.push(_);let J;t[52]!==A?(J={type:"items",items:A},t[52]=A,t[53]=J):J=t[53],Ne.push(J)}return te.length>0&&Ne.push(...te),Ne}function ps(t){const e=$.c(11),{label:r,children:o,defaultExpanded:i}=t,l=i===void 0?!0:i,[n,a]=O.useState(l),{state:d}=We(),c=d==="collapsed";let m;e[0]!==n||e[1]!==c||e[2]!==r?(m=c?s.jsx("div",{className:"flex h-6 items-center",children:s.jsx("div",{className:"h-0.5 w-8 rounded-full bg-sidebar-foreground/15"})}):s.jsx(ie,{children:s.jsx(ee,{children:s.jsxs(we,{className:"h-6 cursor-pointer select-none gap-1 [&>svg]:size-3",onClick:()=>a(!n),children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:r}),s.jsx(Ye,{size:12,className:B("text-muted-foreground transition-transform duration-200",!n&&"-rotate-90")})]})})}),e[0]=n,e[1]=c,e[2]=r,e[3]=m):m=e[3];let f;e[4]!==o||e[5]!==n||e[6]!==c?(f=(c||n)&&s.jsx(ge,{children:s.jsx(ie,{className:"gap-0.5",children:o})}),e[4]=o,e[5]=n,e[6]=c,e[7]=f):f=e[7];let u;return e[8]!==m||e[9]!==f?(u=s.jsxs(je,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[m,f]}),e[8]=m,e[9]=f,e[10]=u):u=e[10],u}function at(t){const e=$.c(13),{item:r}=t;let o;e[0]!==r.icon?(o=s.jsx("span",{className:"[&>svg]:size-4",children:r.icon}),e[0]=r.icon,e[1]=o):o=e[1];let i;e[2]!==r.label?(i=s.jsx("span",{className:"truncate group-data-[collapsible=icon]:hidden",children:r.label}),e[2]=r.label,e[3]=i):i=e[3];let l;e[4]!==r.isActive||e[5]!==r.label||e[6]!==r.onClick||e[7]!==o||e[8]!==i?(l=s.jsxs(we,{onClick:r.onClick,isActive:r.isActive,tooltip:r.label,children:[o,i]}),e[4]=r.isActive,e[5]=r.label,e[6]=r.onClick,e[7]=o,e[8]=i,e[9]=l):l=e[9];let n;return e[10]!==r.key||e[11]!==l?(n=s.jsx(ee,{children:l},r.key),e[10]=r.key,e[11]=l,e[12]=n):n=e[12],n}function xs(t){const e=$.c(12),{section:r}=t;switch(r.type){case"divider":{let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Be,{className:"my-2"}),e[0]=o):o=e[0],o}case"spacer":{let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1"}),e[1]=o):o=e[1],o}case"group":{const o=r.group.label,i=r.group.defaultExpanded;let l;e[2]!==r.group.items?(l=r.group.items.map(gs),e[2]=r.group.items,e[3]=l):l=e[3];let n;return e[4]!==r.group.defaultExpanded||e[5]!==r.group.label||e[6]!==l?(n=s.jsx(ps,{label:o,defaultExpanded:i,children:l}),e[4]=r.group.defaultExpanded,e[5]=r.group.label,e[6]=l,e[7]=n):n=e[7],n}case"items":{let o;e[8]!==r.items?(o=r.items.map(hs),e[8]=r.items,e[9]=o):o=e[9];let i;return e[10]!==o?(i=s.jsx(je,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(ge,{children:s.jsx(ie,{className:"gap-0.5",children:o})})}),e[10]=o,e[11]=i):i=e[11],i}}}function hs(t){return s.jsx(at,{item:t},t.key)}function gs(t){return s.jsx(at,{item:t},t.key)}function ct(t){const e=$.c(14),{sections:r,header:o,footer:i,additionalContent:l,variant:n,collapsible:a,contentClassName:d}=t,c=n===void 0?"sidebar":n,m=a===void 0?"icon":a;let f;e[0]!==d?(f=B("flex flex-col flex-1 overflow-x-hidden mt-1 px-3.5 pb-2 group-data-[collapsible=icon]:px-2",d),e[0]=d,e[1]=f):f=e[1];let u;e[2]!==r?(u=r.map(js),e[2]=r,e[3]=u):u=e[3];let h;e[4]!==l||e[5]!==f||e[6]!==u?(h=s.jsxs($t,{className:f,children:[u,l]}),e[4]=l,e[5]=f,e[6]=u,e[7]=h):h=e[7];let x;return e[8]!==m||e[9]!==i||e[10]!==o||e[11]!==h||e[12]!==c?(x=s.jsxs(zt,{variant:c,collapsible:m,children:[o,h,i]}),e[8]=m,e[9]=i,e[10]=o,e[11]=h,e[12]=c,e[13]=x):x=e[13],x}function js(t,e){return s.jsx(xs,{section:t},e)}ct.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,r)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(Y,{className:"h-full bg-sidebar-accent rounded-md"})},r))})};function bs(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"space-y-0.5 px-1 py-1",children:[s.jsx(Y,{className:"h-8 w-full rounded-lg"}),s.jsx(Y,{className:"h-8 w-full rounded-lg"})]}),t[0]=e):e=t[0],e}function Ns(t){const e=$.c(12),{organizationId:r,currentProjectSlug:o,onSelect:i}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={suspense:!0},e[0]=l):l=e[0];const{data:n}=Qe(r,l);let a,d;if(e[1]!==o||e[2]!==i||e[3]!==n){d=Symbol.for("react.early_return_sentinel");e:{const m=n?.filter(vs)??[];if(m.length===0){let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("div",{className:"px-2 py-3 text-center text-xs text-muted-foreground",children:"No projects yet"}),e[6]=u):u=e[6],d=u;break e}let f;e[7]!==o||e[8]!==i?(f=u=>{const h=o===u.slug,x=u.ui?.themeColor??"#3B82F6";return s.jsxs(Z,{className:B("gap-2.5",h&&"bg-accent"),onClick:()=>i(u.slug),children:[s.jsx("div",{className:"size-6 rounded-md shrink-0 flex items-center justify-center overflow-hidden border border-border/50",style:{backgroundColor:x},children:u.ui?.icon?s.jsx("img",{src:u.ui.icon,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:"text-xs font-semibold text-white",children:u.name.charAt(0).toUpperCase()})}),s.jsx("span",{className:"flex-1 truncate",children:u.name}),h&&s.jsx(fe,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},u.id)},e[7]=o,e[8]=i,e[9]=f):f=e[9],a=m.map(f)}e[1]=o,e[2]=i,e[3]=n,e[4]=a,e[5]=d}else a=e[4],d=e[5];if(d!==Symbol.for("react.early_return_sentinel"))return d;let c;return e[10]!==a?(c=s.jsx(s.Fragment,{children:a}),e[10]=a,e[11]=c):c=e[11],c}function vs(t){return t.slug!==V}function ys(t){let e=0;for(let o=0;o<t.length;o++)e=t.charCodeAt(o)+((e<<5)-e);const r=Math.abs(e)%360;return{backgroundColor:`hsl(${r} 55% 70%)`,color:`hsl(${r} 55% 20%)`}}function mt(t){const e=$.c(44),{isCollapsed:r,onCreateProject:o}=t,i=r===void 0?!1:r;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},e[0]=l):l=e[0];const{org:n,project:a}=Oe(l),{data:d}=ae.useListOrganizations(),c=Ce(),m=d?.find(k=>k.slug===n),[f,u]=O.useState(!1),[h]=$e(),x=h.experimental_projects,g=a===V,{data:j}=Ze(m?.id??"",g?"":a??"");let y;e[1]!==n?(y=(k,q)=>k.slug===n?-1:q.slug===n?1:k.name.localeCompare(q.name),e[1]=n,e[2]=y):y=e[2];const p=[...d??[]].sort(y);let b;e[3]!==c||e[4]!==n?(b=()=>{n&&c({to:"/$org/$project",params:{org:n,project:V}})},e[3]=c,e[4]=n,e[5]=b):b=e[5];const S=b;let v;e[6]!==c||e[7]!==n?(v=k=>{n&&c({to:"/$org/$project",params:{org:n,project:k}})},e[6]=c,e[7]=n,e[8]=v):v=e[8];const C=v;let N;e[9]!==c?(N=k=>{c({to:"/$org/$project",params:{org:k,project:V}})},e[9]=c,e[10]=N):N=e[10];const z=N;let T;e[11]!==o?(T=o?()=>o():void 0,e[11]=o,e[12]=T):T=e[12];const E=T;let M;e[13]!==c||e[14]!==n||e[15]!==a?(M=()=>{if(!n||!a)return;const k=a===V;c({to:"/$org/$project",params:{org:n,project:a},search:q=>({...q,settings:k?"org.general":`project:${a}:general`})})},e[13]=c,e[14]=n,e[15]=a,e[16]=M):M=e[16];const W=M,D=Xe,R=i?"w-auto pr-1.5":"w-full";let I;e[17]!==R?(I=B("flex items-center gap-3 rounded-md p-1.5 pr-2 text-left hover:bg-sidebar-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sidebar-ring min-h-[2.75rem]",R),e[17]=R,e[18]=I):I=e[18];const L=g?s.jsx("div",{className:B("shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden transition-[width,height] duration-300 ease-[var(--ease-out-quart)]",i?"size-6":"size-8"),style:m?.logo?void 0:ys(m?.name??""),children:m?.logo?s.jsx("img",{src:m.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:B("font-semibold leading-none",i?"text-[9px]":"text-xs"),children:(m?.name??"?").slice(0,2).toUpperCase()})}):s.jsx("div",{className:B("shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden transition-[width,height] duration-300 ease-[var(--ease-out-quart)]",i?"size-6":"size-8"),style:{backgroundColor:j?.ui?.themeColor??"#60a5fa"},children:j?.ui?.icon?s.jsx("img",{src:j.ui.icon,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:B("font-semibold text-white",i?"text-xs":"text-lg"),children:(j?.name??a??"?").charAt(0).toUpperCase()})});let w;e[19]!==m?.name||e[20]!==j?.name||e[21]!==x||e[22]!==i||e[23]!==g||e[24]!==a?(w=!i&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:x?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"block text-[11px] text-sidebar-foreground/50 leading-tight truncate",children:m?.name??"Select org"}),s.jsx("span",{className:"block text-sm font-semibold text-sidebar-foreground truncate leading-tight",children:g?"Studio":j?.name??a??""})]}):s.jsx("span",{className:"block text-sm font-semibold text-sidebar-foreground truncate leading-tight",children:m?.name??"Select org"})}),s.jsx(Gt,{size:16,className:"shrink-0 text-sidebar-foreground/40"})]}),e[19]=m?.name,e[20]=j?.name,e[21]=x,e[22]=i,e[23]=g,e[24]=a,e[25]=w):w=e[25];let P;e[26]!==I||e[27]!==L||e[28]!==w?(P=s.jsx(et,{asChild:!0,children:s.jsxs("button",{type:"button",className:I,children:[L,w]})}),e[26]=I,e[27]=L,e[28]=w,e[29]=P):P=e[29];const A=Je,F="start",re="bottom",te="w-64 flex flex-col gap-0.5",se=Ss,K=x?s.jsxs(s.Fragment,{children:[s.jsxs(Z,{className:B("gap-2.5",g&&"bg-accent"),onClick:S,children:[s.jsx(ue,{url:m?.logo??"",fallback:m?.name??"",size:"sm",className:"size-6 rounded-md shrink-0",objectFit:"cover"}),s.jsxs("span",{className:"flex-1 truncate",children:["Studio · ",m?.name]}),g&&s.jsx(fe,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]}),s.jsx("p",{className:"px-2 pt-2 pb-0.5 text-[11px] font-medium text-muted-foreground/50 uppercase tracking-wider",children:"Projects"}),m&&s.jsx(O.Suspense,{fallback:s.jsx(bs,{}),children:s.jsx(Ns,{organizationId:m.id,currentProjectSlug:a,orgSlug:n??"",onSelect:C})}),E&&s.jsxs(Z,{className:"gap-2.5",onClick:E,children:[s.jsx(xe,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Create project"})]}),s.jsx(he,{}),s.jsxs(Qt,{children:[s.jsxs(Yt,{className:"gap-2.5",children:[s.jsx(Ke,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Switch organization"})]}),s.jsxs(Jt,{className:"w-48 flex flex-col gap-0.5",children:[p.map(k=>s.jsxs(Z,{className:B("gap-2.5",k.slug===n&&"bg-accent"),onClick:()=>z(k.slug),children:[s.jsx(ue,{url:k.logo??"",fallback:k.name,size:"xs",className:"size-5 rounded-md shrink-0",objectFit:"cover"}),s.jsx("span",{className:"flex-1 truncate",children:k.name}),k.slug===n&&s.jsx(fe,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},k.id)),s.jsx(he,{}),s.jsxs(Z,{className:"gap-2.5",onClick:()=>u(!0),children:[s.jsx(xe,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Create organization"})]})]})]}),s.jsxs(Z,{className:"gap-2.5",onClick:W,children:[s.jsx(ke,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Settings"})]})]}):s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"px-2 pt-2 pb-0.5 text-[11px] font-medium text-muted-foreground/50 uppercase tracking-wider",children:"Organizations"}),p.map(k=>s.jsxs(Z,{className:B("gap-2.5",k.slug===n&&"bg-accent"),onClick:()=>z(k.slug),children:[s.jsx(ue,{url:k.logo??"",fallback:k.name,size:"sm",className:"size-6 rounded-md shrink-0",objectFit:"cover"}),s.jsx("span",{className:"flex-1 truncate",children:k.name}),k.slug===n&&s.jsx(fe,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},k.id)),s.jsxs(Z,{className:"gap-2.5",onClick:()=>u(!0),children:[s.jsx(xe,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Create organization"})]}),s.jsx(he,{}),s.jsxs(Z,{className:"gap-2.5",onClick:W,children:[s.jsx(ke,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Settings"})]})]});let H;e[30]!==A||e[31]!==se||e[32]!==K?(H=s.jsx(A,{align:F,side:re,className:te,onCloseAutoFocus:se,children:K}),e[30]=A,e[31]=se,e[32]=K,e[33]=H):H=e[33];let Q;e[34]!==D||e[35]!==P||e[36]!==H?(Q=s.jsxs(D,{children:[P,H]}),e[34]=D,e[35]=P,e[36]=H,e[37]=Q):Q=e[37];let U;e[38]!==f||e[39]!==u?(U=s.jsx(Xt,{open:f,onOpenChange:u}),e[38]=f,e[39]=u,e[40]=U):U=e[40];let G;return e[41]!==Q||e[42]!==U?(G=s.jsxs(s.Fragment,{children:[Q,U]}),e[41]=Q,e[42]=U,e[43]=G):G=e[43],G}function Ss(t){return t.preventDefault()}mt.Skeleton=function(){return s.jsxs("div",{className:"flex items-center gap-1.5 h-7 px-1.5 w-full",children:[s.jsx(Y,{className:"size-5 rounded-[5px] shrink-0 bg-sidebar-accent"}),s.jsx(Y,{className:"h-3.5 flex-1 bg-sidebar-accent"})]})};function Ae(t){const e=$.c(23),{onCreateProject:r}=t,{state:o}=We(),i=o==="collapsed",[l,n]=Te();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[0]=a):a=e[0];const{org:d,project:c}=Oe(a),{location:m}=_e(),f=m.pathname===`/${d}/${c}`||m.pathname===`/${d}/${c}/`;let u;e[1]!==n?(u=()=>{n(ks)},e[1]=n,e[2]=u):u=e[2];const h=u;let x;e[3]!==i||e[4]!==r?(x=s.jsx("div",{className:"min-w-0 flex-1",children:s.jsx(mt,{isCollapsed:i,onCreateProject:r})}),e[3]=i,e[4]=r,e[5]=x):x=e[5];const g=i||f?"max-w-0 opacity-0 pointer-events-none":"max-w-[2rem] opacity-100";let j;e[6]!==g?(j=B("flex items-center gap-0.5 shrink-0 overflow-hidden transition-[max-width,opacity] duration-300 ease-[var(--ease-out-quart)]",g),e[6]=g,e[7]=j):j=e[7];const y=l&&"bg-sidebar-accent text-sidebar-foreground";let p;e[8]!==y?(p=B("size-7 hover:bg-sidebar-accent text-sidebar-foreground/50 hover:text-sidebar-foreground",y),e[8]=y,e[9]=p):p=e[9];let b;e[10]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(lt,{size:14,className:"text-inherit"}),e[10]=b):b=e[10];let S;e[11]!==p||e[12]!==h?(S=s.jsx(Ht,{asChild:!0,children:s.jsx(Se,{variant:"ghost",size:"icon",className:p,onClick:h,"aria-label":"Toggle Decopilot",children:b})}),e[11]=p,e[12]=h,e[13]=S):S=e[13];let v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Ut,{side:"bottom",children:"Toggle Decopilot"}),e[14]=v):v=e[14];let C;e[15]!==S?(C=s.jsxs(Wt,{children:[S,v]}),e[15]=S,e[16]=C):C=e[16];let N;e[17]!==C||e[18]!==j?(N=s.jsx("div",{className:j,children:C}),e[17]=C,e[18]=j,e[19]=N):N=e[19];let z;return e[20]!==N||e[21]!==x?(z=s.jsx(Ge,{className:"px-3 group-data-[collapsible=icon]:px-2 animate-in fade-in-0 duration-200",children:s.jsx(ie,{children:s.jsx(ee,{children:s.jsxs("div",{className:"flex items-center justify-between w-full gap-1",children:[x,N]})})})}),e[20]=N,e[21]=x,e[22]=z):z=e[22],z}function ks(t){return!t}Ae.Skeleton=function(){return s.jsx(Ge,{className:"px-3",children:s.jsx(ie,{children:s.jsx(ee,{children:s.jsxs("div",{className:"flex items-center justify-between w-full",children:[s.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1 p-1.5",children:[s.jsx(Y,{className:"size-8 rounded-md shrink-0 bg-sidebar-accent"}),s.jsx(Y,{className:"h-3.5 w-16 bg-sidebar-accent"})]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx(Y,{className:"size-7 rounded-lg bg-sidebar-accent"}),s.jsx(Y,{className:"size-7 rounded-lg bg-sidebar-accent"})]})]})})})})};function Cs(t){const e=$.c(49),{user:r,userImage:o}=t,{open:i}=qt(),[l,n]=O.useState(!1);let a;e[0]!==r.email||e[1]!==r.id||e[2]!==r.name?(a=()=>{const F=`ID: ${r.id}
2
- Name: ${r.name||"N/A"}
3
- Email: ${r.email}`;navigator.clipboard.writeText(F),n(!0),le.success("User info copied to clipboard"),setTimeout(()=>n(!1),2e3)},e[0]=r.email,e[1]=r.id,e[2]=r.name,e[3]=a):a=e[3];const d=a,c=r.name||r.email||"U";let m;e[4]!==c||e[5]!==o?(m=s.jsx(ue,{url:o,fallback:c,shape:"circle",size:"2xs",className:"shrink-0 size-5"}),e[4]=c,e[5]=o,e[6]=m):m=e[6];const f=r.name||"User";let u;e[7]!==f?(u=s.jsx("div",{className:"flex-1 min-w-0 group-data-[collapsible=icon]:hidden",children:s.jsx("div",{className:"text-sm font-medium truncate text-sidebar-foreground leading-none",children:f})}),e[7]=f,e[8]=u):u=e[8];let h;e[9]!==m||e[10]!==u?(h=s.jsx(et,{asChild:!0,children:s.jsxs("button",{className:"flex w-full h-8 items-center gap-2 rounded-md px-1 hover:bg-sidebar-accent transition-colors text-left min-w-0",children:[m,u]})}),e[9]=m,e[10]=u,e[11]=h):h=e[11];const x=r.name||r.email||"U";let g;e[12]!==x||e[13]!==o?(g=s.jsx(ue,{url:o,fallback:x,shape:"circle",size:"sm",className:"shrink-0"}),e[12]=x,e[13]=o,e[14]=g):g=e[14];const j=r.name||"User";let y;e[15]!==j?(y=s.jsx("div",{className:"text-sm font-medium truncate",children:j}),e[15]=j,e[16]=y):y=e[16];let p;e[17]!==r.email?(p=s.jsx("div",{className:"text-xs text-muted-foreground truncate",children:r.email}),e[17]=r.email,e[18]=p):p=e[18];let b;e[19]!==y||e[20]!==p?(b=s.jsxs("div",{className:"flex-1 min-w-0",children:[y,p]}),e[19]=y,e[20]=p,e[21]=b):b=e[21];let S;e[22]!==l?(S=s.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:l?s.jsx(fe,{size:14,className:"text-green-600"}):s.jsx(es,{size:14,className:"text-muted-foreground"})}),e[22]=l,e[23]=S):S=e[23];let v;e[24]!==d||e[25]!==b||e[26]!==S||e[27]!==g?(v=s.jsxs(Z,{onClick:d,className:"gap-2.5 group",children:[g,b,S]}),e[24]=d,e[25]=b,e[26]=S,e[27]=g,e[28]=v):v=e[28];let C;e[29]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(he,{}),e[29]=C):C=e[29];let N;e[30]!==i?(N=()=>i("account.preferences"),e[30]=i,e[31]=N):N=e[31];let z,T;e[32]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(ke,{size:14,className:"shrink-0 text-muted-foreground"}),T=s.jsx("span",{children:"Settings"}),e[32]=z,e[33]=T):(z=e[32],T=e[33]);let E;e[34]!==N?(E=s.jsxs(Z,{className:"gap-2.5",onClick:N,children:[z,T]}),e[34]=N,e[35]=E):E=e[35];let M;e[36]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx(Z,{asChild:!0,children:s.jsxs("a",{href:"https://www.decocms.com/terms-of-use",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx(tt,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"Terms of Use"}),s.jsx(pe,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),e[36]=M):M=e[36];let W;e[37]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(Z,{asChild:!0,children:s.jsxs("a",{href:"https://www.decocms.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx(ss,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"Privacy Policy"}),s.jsx(pe,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),e[37]=W):W=e[37];let D;e[38]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Z,{asChild:!0,children:s.jsxs("a",{href:"https://github.com/decocms/mesh",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx(gt,{className:"w-3.5 h-3.5 shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"decocms/mesh"}),s.jsx(pe,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),e[38]=D):D=e[38];let R;e[39]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(Z,{asChild:!0,children:s.jsxs("a",{href:"https://decocms.com/discord",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx(Me,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"Community"}),s.jsx(pe,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),e[39]=R):R=e[39];let I,L;e[40]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(Z,{asChild:!0,children:s.jsxs("a",{href:"https://decocms.com",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx(ts,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"Homepage"}),s.jsx(pe,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),L=s.jsx(he,{}),e[40]=I,e[41]=L):(I=e[40],L=e[41]);let w;e[42]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsxs(Z,{className:"gap-2.5",onClick:_s,children:[s.jsx(ot,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Sign out"})]}),e[42]=w):w=e[42];let P;e[43]!==v||e[44]!==E?(P=s.jsxs(Je,{side:"top",align:"end",collisionPadding:8,className:"w-64 flex flex-col gap-0.5",onCloseAutoFocus:ws,children:[v,C,E,M,W,D,R,I,L,w]}),e[43]=v,e[44]=E,e[45]=P):P=e[45];let A;return e[46]!==P||e[47]!==h?(A=s.jsxs(Xe,{children:[h,P]}),e[46]=P,e[47]=h,e[48]=A):A=e[48],A}function _s(){return ae.signOut()}function ws(t){return t.preventDefault()}function dt(){const t=$.c(7),{data:e}=ae.useSession();if(!e?.user){let d;return t[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(ue,{url:void 0,fallback:"U",shape:"circle",size:"sm",className:"cursor-pointer h-7 w-7",muted:!0}),t[0]=d):d=t[0],d}const r=e.user,o=r.name??void 0;let i;t[1]!==o||t[2]!==r?(i={...r,name:o},t[1]=o,t[2]=r,t[3]=i):i=t[3];const l=i,n=r.image;let a;return t[4]!==n||t[5]!==l?(a=s.jsx(Cs,{user:l,userImage:n}),t[4]=n,t[5]=l,t[6]=a):a=t[6],a}function $s({invitation:t}){const[e,r]=O.useState(!1),[o,i]=O.useState(!1),l=bt(),n=async()=>{r(!0);try{const d=await ae.organization.acceptInvitation({invitationId:t.id});if(d.error)le.error(d.error.message),r(!1);else{const c=await ae.organization.setActive({organizationId:t.organizationId});le.success("Invitation accepted!");const m=c?.data?.slug;window.location.href=m?`/${m}`:"/"}}catch{le.error("Failed to accept invitation"),r(!1)}},a=async()=>{i(!0);try{const d=await ae.organization.rejectInvitation({invitationId:t.id});d.error?(le.error(d.error.message),i(!1)):(le.success("Invitation declined"),l.invalidateQueries())}catch{le.error("Failed to decline invitation"),i(!1)}};return s.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border last:border-0 hover:bg-muted/25 transition-colors",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"You've been invited to join"}),s.jsx("p",{className:"text-sm font-medium truncate",children:t.organizationName??"Unknown organization"})]}),s.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[s.jsx(Se,{size:"icon",variant:"ghost",className:"size-7 text-green-600 hover:text-green-700 hover:bg-green-50 dark:hover:bg-green-950",onClick:n,disabled:e||o,"aria-label":"Accept invitation",children:s.jsx(fe,{size:14})}),s.jsx(Se,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground hover:text-destructive hover:bg-destructive/10",onClick:a,disabled:e||o,"aria-label":"Decline invitation",children:s.jsx(os,{size:14})})]})]})}function zs(){const t=O.useContext(jt),{data:e}=t.hooks.useListUserInvitations();return(e??[]).filter(o=>o.status==="pending"&&new Date(o.expiresAt)>new Date)}function Is(){const t=$.c(12),e=zs();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(dt,{})}),t[0]=r):r=t[0];let o;t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ns,{asChild:!0,children:s.jsx(Se,{variant:"ghost",size:"icon",className:"size-8 text-sidebar-foreground/50 hover:text-sidebar-foreground hover:bg-sidebar-accent","aria-label":"Open inbox",children:s.jsx(Re,{size:16})})}),t[1]=o):o=t[1];let i;t[2]!==e.length?(i=e.length>0&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-red-500 ring-2 ring-sidebar pointer-events-none"}),t[2]=e.length,t[3]=i):i=t[3];let l;t[4]!==i?(l=s.jsxs("div",{className:"relative",children:[o,i]}),t[4]=i,t[5]=l):l=t[5];let n;t[6]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"px-4 py-3 border-b border-border shrink-0",children:s.jsx("h3",{className:"text-sm font-medium",children:"Inbox"})}),t[6]=n):n=t[6];let a;t[7]!==e?(a=s.jsxs(rs,{side:"right",align:"end",sideOffset:24,className:"w-[400px] p-0 h-[650px] flex flex-col",children:[n,e.length===0?s.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[s.jsx(Re,{size:24,className:"text-muted-foreground/50"}),s.jsx("p",{className:"text-sm font-medium text-foreground",children:"No messages or invites pending"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Messages, workspace and project invitations will appear here"})]}):s.jsx("div",{className:"overflow-y-auto flex-1",children:e.map(Ps)})]}),t[7]=e,t[8]=a):a=t[8];let d;return t[9]!==l||t[10]!==a?(d=s.jsx(It,{className:"px-3.5 pb-3 group-data-[collapsible=icon]:px-2",children:s.jsx(ie,{children:s.jsx(ee,{children:s.jsxs("div",{className:"flex items-center w-full gap-1",children:[r,s.jsx("div",{className:"group-data-[collapsible=icon]:hidden",children:s.jsxs(is,{children:[l,a]})})]})})})}),t[9]=l,t[10]=a,t[11]=d):d=t[11],d}function Ps(t){return s.jsx($s,{invitation:t},t.id)}function ut(t){const e=$.c(4),{children:r}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Be,{className:"my-2"}),e[0]=o):o=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(ee,{children:s.jsx("div",{className:"group-data-[collapsible=icon]:hidden px-2 py-0 text-xs font-medium h-6 text-muted-foreground flex items-center justify-between",children:s.jsx("span",{className:"whitespace-nowrap",children:"Pinned Views"})})}),e[1]=i):i=e[1];let l;return e[2]!==r?(l=s.jsxs(s.Fragment,{children:[o,i,r]}),e[2]=r,e[3]=l):l=e[3],l}function As(t){const e=$.c(26),{item:r}=t,o=Ce(),{org:i}=ce(),l=st(i.id),n=ls(i.id);let a;e[0]!==n.update||e[1]!==r.url||e[2]!==l?.sidebar_items?(a=async()=>{const S=(l?.sidebar_items||[]).filter(v=>v.url!==r.url);await n.update.mutateAsync({sidebar_items:S})},e[0]=n.update,e[1]=r.url,e[2]=l?.sidebar_items,e[3]=a):a=e[3];const d=a;let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=/^https?:\/\/.+/,e[4]=c):c=e[4];let m;e[5]!==r.icon?(m=c.test(r.icon),e[5]=r.icon,e[6]=m):m=e[6];const f=m;let u;e[7]!==r.url||e[8]!==o?(u=()=>{o({to:r.url})},e[7]=r.url,e[8]=o,e[9]=u):u=e[9];const h=r.title;let x;e[10]!==f||e[11]!==r.icon||e[12]!==r.title?(x=s.jsx("div",{className:"flex items-center justify-center shrink-0",children:f?s.jsx("img",{src:r.icon,alt:r.title,className:"h-4 w-4 rounded object-cover"}):s.jsx(tt,{size:16,className:"text-muted-foreground group-hover/item:text-foreground transition-colors"})}),e[10]=f,e[11]=r.icon,e[12]=r.title,e[13]=x):x=e[13];let g;e[14]!==r.title?(g=r.title.toLocaleLowerCase(),e[14]=r.title,e[15]=g):g=e[15];let j;e[16]!==g?(j=s.jsx("div",{className:"flex-1 min-w-0 flex flex-col items-start",children:s.jsx("span",{className:"truncate text-sm w-full capitalize",children:g})}),e[16]=g,e[17]=j):j=e[17];let y;e[18]!==d?(y=s.jsx(Pe,{size:16,className:"text-muted-foreground opacity-0 group-hover/item:opacity-50 hover:opacity-100 cursor-pointer",onClick:b=>{b.preventDefault(),b.stopPropagation(),d()}}),e[18]=d,e[19]=y):y=e[19];let p;return e[20]!==r.title||e[21]!==u||e[22]!==x||e[23]!==j||e[24]!==y?(p=s.jsx(ee,{children:s.jsxs(we,{className:"w-full pr-2 group/item relative cursor-pointer text-foreground/90 hover:text-foreground",onClick:u,tooltip:h,children:[x,j,y]})}),e[20]=r.title,e[21]=u,e[22]=x,e[23]=j,e[24]=y,e[25]=p):p=e[25],p}function Fe(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ee,{children:s.jsx("div",{className:"flex items-center gap-2 px-4 py-2",children:s.jsx(Y,{className:"h-4 flex-1"})})}),t[0]=e):e=t[0],e}function Os(){const t=$.c(4),{org:e}=ce(),o=st(e.id)?.sidebar_items;if(!o?.length)return null;let i;t[0]!==o?(i=o.map(Ts),t[0]=o,t[1]=i):i=t[1];let l;return t[2]!==i?(l=s.jsx(ut,{children:i}),t[2]=i,t[3]=l):l=t[3],l}function Ts(t){return s.jsx(As,{item:t},t.url)}function Ms(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(O.Suspense,{fallback:s.jsxs(ut,{children:[s.jsx(Fe,{}),s.jsx(Fe,{})]}),children:s.jsx(Os,{})}),t[0]=e):e=t[0],e}function Es(t){const e=$.c(11),{project:r}=t,o=r.ui?.themeColor??"#60a5fa";if(r.ui?.icon){let d;return e[0]!==r.ui.icon?(d=s.jsx("img",{src:r.ui.icon,alt:"",className:"size-4 rounded object-cover border border-border/50"}),e[0]=r.ui.icon,e[1]=d):d=e[1],d}let i;e[2]!==o?(i={backgroundColor:o},e[2]=o,e[3]=i):i=e[3];let l;e[4]!==r.name?(l=r.name.charAt(0).toUpperCase(),e[4]=r.name,e[5]=l):l=e[5];let n;e[6]!==l?(n=s.jsx("span",{className:"text-[10px] font-medium text-white",children:l}),e[6]=l,e[7]=n):n=e[7];let a;return e[8]!==i||e[9]!==n?(a=s.jsx("div",{className:"size-4 rounded flex items-center justify-center border border-border/50",style:i,children:n}),e[8]=i,e[9]=n,e[10]=a):a=e[10],a}function Ls(t){const e=$.c(14),{project:r}=t,o=Ce(),{org:i}=ce();let l;e[0]!==o||e[1]!==i.slug||e[2]!==r.slug?(l=()=>{o({to:"/$org/$project",params:{org:i.slug,project:r.slug}})},e[0]=o,e[1]=i.slug,e[2]=r.slug,e[3]=l):l=e[3];let n;e[4]!==r?(n=s.jsx(Es,{project:r}),e[4]=r,e[5]=n):n=e[5];let a;e[6]!==r.name?(a=s.jsx("span",{className:"truncate flex-1 group-data-[collapsible=icon]:hidden",children:r.name}),e[6]=r.name,e[7]=a):a=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(as,{size:12,className:"text-muted-foreground opacity-0 group-hover/item:opacity-100 transition-opacity group-data-[collapsible=icon]:hidden"}),e[8]=d):d=e[8];let c;return e[9]!==r.name||e[10]!==l||e[11]!==n||e[12]!==a?(c=s.jsx(ee,{children:s.jsxs(we,{onClick:l,tooltip:r.name,children:[n,a,d]})}),e[9]=r.name,e[10]=l,e[11]=n,e[12]=a,e[13]=c):c=e[13],c}function Ds(){const t=$.c(55),{org:e}=ce(),{data:r,isLoading:o}=Qe(e.id),[i,l]=O.useState(!0),[n,a]=O.useState(!1);let d,c,m,f,u,h,x,g,j,y,p,b,S;if(t[0]!==o||t[1]!==i||t[2]!==r){S=Symbol.for("react.early_return_sentinel");e:{const D=r?.filter(Fs)??[];if(o){let F;t[16]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(ee,{children:s.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[s.jsx(Y,{className:"h-4 w-4 rounded"}),s.jsx(Y,{className:"h-4 flex-1"})]})}),t[16]=F):F=t[16];let re;t[17]===Symbol.for("react.memo_cache_sentinel")?(re=s.jsx(je,{className:"py-0 px-0",children:s.jsx(ge,{children:s.jsxs(ie,{className:"gap-0.5",children:[F,s.jsx(ee,{children:s.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[s.jsx(Y,{className:"h-4 w-4 rounded"}),s.jsx(Y,{className:"h-4 flex-1"})]})})]})})}),t[17]=re):re=t[17],S=re;break e}b="group/projects-section mt-2",u=Tt,y=i,p=l,f=je,j="py-0 px-0",m=ge,c=ie,x="gap-0.5";let R;t[18]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Projects"}),t[18]=R):R=t[18];const I=!i&&"-rotate-90";let L;t[19]!==I?(L=B("text-muted-foreground shrink-0 transition-transform duration-200",I),t[19]=I,t[20]=L):L=t[20];let w;t[21]!==L?(w=s.jsx(Mt,{asChild:!0,children:s.jsxs("button",{type:"button",className:"flex flex-1 items-center gap-1 cursor-pointer min-w-0",children:[R,s.jsx(Ye,{size:12,className:L})]})}),t[21]=L,t[22]=w):w=t[22];let P;t[23]===Symbol.for("react.memo_cache_sentinel")?(P=()=>a(!0),t[23]=P):P=t[23];let A;t[24]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx("button",{type:"button",onClick:P,title:"Create new project",className:"opacity-0 group-hover/projects-section:opacity-100 transition-opacity text-muted-foreground hover:text-foreground flex items-center justify-center h-4 rounded shrink-0",children:s.jsx(xe,{size:16})}),t[24]=A):A=t[24],t[25]!==w?(g=s.jsx(ee,{className:"group-data-[collapsible=icon]:hidden",children:s.jsxs("div",{className:"flex h-6 w-full items-center gap-1 rounded-md pl-1.5 pr-0.5 hover:bg-sidebar-accent transition-colors",children:[w,A]})}),t[25]=w,t[26]=g):g=t[26],d=Et,h=D.length===0?s.jsx(ee,{children:s.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:"No projects yet"})}):D.map(Rs)}t[0]=o,t[1]=i,t[2]=r,t[3]=d,t[4]=c,t[5]=m,t[6]=f,t[7]=u,t[8]=h,t[9]=x,t[10]=g,t[11]=j,t[12]=y,t[13]=p,t[14]=b,t[15]=S}else d=t[3],c=t[4],m=t[5],f=t[6],u=t[7],h=t[8],x=t[9],g=t[10],j=t[11],y=t[12],p=t[13],b=t[14],S=t[15];if(S!==Symbol.for("react.early_return_sentinel"))return S;let v;t[27]!==d||t[28]!==h?(v=s.jsx(d,{children:h}),t[27]=d,t[28]=h,t[29]=v):v=t[29];let C;t[30]!==c||t[31]!==x||t[32]!==g||t[33]!==v?(C=s.jsxs(c,{className:x,children:[g,v]}),t[30]=c,t[31]=x,t[32]=g,t[33]=v,t[34]=C):C=t[34];let N;t[35]!==m||t[36]!==C?(N=s.jsx(m,{children:C}),t[35]=m,t[36]=C,t[37]=N):N=t[37];let z;t[38]!==f||t[39]!==N||t[40]!==j?(z=s.jsx(f,{className:j,children:N}),t[38]=f,t[39]=N,t[40]=j,t[41]=z):z=t[41];let T;t[42]!==u||t[43]!==z||t[44]!==y||t[45]!==p?(T=s.jsx(u,{open:y,onOpenChange:p,children:z}),t[42]=u,t[43]=z,t[44]=y,t[45]=p,t[46]=T):T=t[46];let E;t[47]!==T||t[48]!==b?(E=s.jsx("div",{className:b,children:T}),t[47]=T,t[48]=b,t[49]=E):E=t[49];let M;t[50]!==n?(M=s.jsx(Ve,{open:n,onOpenChange:a}),t[50]=n,t[51]=M):M=t[51];let W;return t[52]!==E||t[53]!==M?(W=s.jsxs(s.Fragment,{children:[E,M]}),t[52]=E,t[53]=M,t[54]=W):W=t[54],W}function Rs(t){return s.jsx(Ls,{project:t},t.id)}function Fs(t){return t.slug!==V}function Hs(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(O.Suspense,{fallback:s.jsx(je,{className:"py-0 px-0",children:s.jsx(ge,{children:s.jsx(ie,{className:"gap-0.5",children:s.jsx(ee,{children:s.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[s.jsx(Y,{className:"h-4 w-4 rounded"}),s.jsx(Y,{className:"h-4 flex-1"})]})})})})}),children:s.jsx(Ds,{})}),t[0]=e):e=t[0],e}function Us(t){const e=$.c(15),{onCreateProject:r}=t,[o]=$e(),i=fs(),{locator:l}=ce();let n;e[0]!==l?(n=Ie.isOrgAdminProject(l),e[0]=l,e[1]=n):n=e[1];const a=n;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Ae.Skeleton,{}),e[2]=d):d=e[2];let c;e[3]!==r?(c=s.jsx(O.Suspense,{fallback:d,children:s.jsx(Ae,{onCreateProject:r})}),e[3]=r,e[4]=c):c=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Is,{}),e[5]=m):m=e[5];let f;e[6]!==a||e[7]!==o?(f=a?o.experimental_projects?s.jsx(Hs,{}):null:s.jsx(Ms,{}),e[6]=a,e[7]=o,e[8]=f):f=e[8];let u;e[9]!==f?(u=s.jsx(qe,{children:s.jsx(O.Suspense,{fallback:null,children:f})}),e[9]=f,e[10]=u):u=e[10];let h;return e[11]!==i||e[12]!==c||e[13]!==u?(h=s.jsx(ct,{sections:i,header:c,footer:m,additionalContent:u}),e[11]=i,e[12]=c,e[13]=u,e[14]=h):h=e[14],h}function Ws(){const t=$.c(2),r=_e().location.href;let o;return t[0]!==r?(o=s.jsx(St,{to:"/login",search:{next:r},replace:!0}),t[0]=r,t[1]=o):o=t[1],o}function Bs(t){const e=$.c(6),{children:r}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Nt,{children:s.jsx(He,{})}),e[0]=o):o=e[0];let i;e[1]!==r?(i=s.jsx(vt,{children:r}),e[1]=r,e[2]=i):i=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(yt,{children:s.jsx(Ws,{})}),e[3]=l):l=e[3];let n;return e[4]!==i?(n=s.jsxs(s.Fragment,{children:[o,i,l]}),e[4]=i,e[5]=n):n=e[5],n}function Gs(t){const e=$.c(10),{children:r,className:o}=t,[,i]=O.useTransition();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=Le.decoChatPanelWidth(),e[0]=l):l=e[0];const[n,a]=Ee(l,30);let d;e[1]!==a?(d=u=>i(()=>a(u)),e[1]=a,e[2]=d):d=e[2];const c=d;let m;e[3]!==o?(m=B("min-w-0",o),e[3]=o,e[4]=m):m=e[4];let f;return e[5]!==n||e[6]!==r||e[7]!==c||e[8]!==m?(f=s.jsx(rt,{defaultSize:n,minSize:20,className:m,onResize:c,children:r}),e[5]=n,e[6]=r,e[7]=c,e[8]=m,e[9]=f):f=e[9],f}function qs(t){const e=$.c(5),{children:r}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=Le.sidebarOpen(),e[0]=o):o=e[0];const[i,l]=Ee(o,!0);let n;return e[1]!==r||e[2]!==l||e[3]!==i?(n=s.jsx(Pt,{open:i,onOpenChange:l,children:r}),e[1]=r,e[2]=l,e[3]=i,e[4]=n):n=e[4],n}function Vs(t){const e=$.c(24),{isStudio:r,isHomeRoute:o,onCreateProject:i}=t,[l]=Te();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Le.decoChatPanelWidth(),e[0]=n):n=e[0];const[a]=Ee(n,30),[d]=$e(),c=r&&d.experimental_projects?"":void 0,m=`${a}cqi`;let f;e[1]!==m?(f={"--sidebar-width":"13.5rem","--sidebar-width-mobile":"11rem","--chat-panel-w":m},e[1]=m,e[2]=f):f=e[2];const u=f;let h;e[3]!==i?(h=s.jsx(Us,{onCreateProject:i}),e[3]=i,e[4]=h):h=e[4];let x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x={background:"transparent",containerType:"inline-size"},e[5]=x):x=e[5];let g;e[6]===Symbol.for("react.memo_cache_sentinel")?(g={overflow:"visible"},e[6]=g):g=e[6];let j;e[7]===Symbol.for("react.memo_cache_sentinel")?(j={overflow:"visible"},e[7]=j):j=e[7];const y=l&&"rounded-tr-[0.75rem] border-r";let p;e[8]!==y?(p=B("flex flex-col flex-1 min-h-0 bg-card overflow-hidden","border-t border-l border-sidebar-border","rounded-tl-[0.75rem]","transition-[border-radius] duration-200 ease-[var(--ease-out-quart)]",y),e[8]=y,e[9]=p):p=e[9];let b;e[10]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("div",{className:"flex-1 overflow-hidden",children:s.jsx(Ue,{})}),e[10]=b):b=e[10];let S;e[11]!==p?(S=s.jsx(rt,{className:"min-w-0 flex flex-col",style:j,children:s.jsx("div",{className:p,children:b})}),e[11]=p,e[12]=S):S=e[12];let v;e[13]!==l||e[14]!==o?(v=!o&&s.jsxs(s.Fragment,{children:[s.jsx(cs,{className:"bg-sidebar"}),s.jsx(Gs,{className:B("transition-[max-width] duration-200 ease-[var(--ease-out-quart)] overflow-hidden",l?"max-w-[var(--chat-panel-w)] bg-sidebar":"max-w-0"),children:s.jsx("div",{className:"h-full min-w-[var(--chat-panel-w)] pl-1.5 pr-1.5 pb-1.5",children:s.jsx("div",{className:"h-full bg-background rounded-[0.75rem] overflow-hidden border border-sidebar-border shadow-sm",children:s.jsx(us,{})})})})]}),e[13]=l,e[14]=o,e[15]=v):v=e[15];let C;e[16]!==S||e[17]!==v?(C=s.jsx(At,{className:"pt-1.5",style:x,children:s.jsxs(ms,{direction:"horizontal",className:"h-full",style:g,children:[S,v]})}),e[16]=S,e[17]=v,e[18]=C):C=e[18];let N;return e[19]!==C||e[20]!==c||e[21]!==u||e[22]!==h?(N=s.jsxs(Ot,{className:"flex-1 bg-sidebar","data-studio":c,style:u,children:[h,C]}),e[19]=C,e[20]=c,e[21]=u,e[22]=h,e[23]=N):N=e[23],N}function Ks(){const{org:t,project:e}=Oe({strict:!1}),r=_e(),[o,i]=O.useState(!1),l=r.location.pathname===`/${t}/${e}`||r.location.pathname===`/${t}/${e}/`,n=e??V,{data:a}=kt({queryKey:Ct.activeOrganization(t),queryFn:async()=>{if(!t)return null;const{data:m}=await ae.organization.setActive({organizationSlug:t});return{org:m,project:{slug:n,isOrgAdmin:n===V}}},gcTime:1/0,staleTime:1/0,refetchOnWindowFocus:!1,refetchOnMount:!1});if(!a)return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx("header",{className:"h-12 flex items-center justify-end px-4 border-b border-border",children:s.jsx(dt,{})}),s.jsx(Ue,{})]});if(!a.org)return window.location.pathname!=="/"&&(window.location.href="/"),null;const d={...a,project:{...a.project,slug:n,isOrgAdmin:n===V}},c=n===V;return s.jsxs(_t,{...d,children:[s.jsx(qs,{children:s.jsx("div",{className:"flex flex-col h-screen overflow-hidden",children:s.jsx(X.Provider,{children:s.jsx(Vs,{isStudio:c,isHomeRoute:l,onCreateProject:()=>i(!0)})})})}),s.jsx(Ve,{open:o,onOpenChange:i})]})}function On(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Bs,{children:s.jsx(O.Suspense,{fallback:s.jsx(He,{}),children:s.jsx(Ks,{})})}),t[0]=e):e=t[0],e}export{On as default};
@@ -1 +0,0 @@
1
- import{r as S,c as j,b as C,a as v,e as $}from"./index-CEFIvFnf.js";const x=({size:e=24,color:t="currentColor",...r})=>S.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},S.createElement("path",{d:"M15 21v-5.4c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C14.24 14 13.96 14 13.4 14h-2.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C9 14.76 9 15.04 9 15.6V21M3 7a3 3 0 0 0 6 0 3 3 0 1 0 6 0 3 3 0 1 0 6 0M6.2 21h11.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3H6.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21Z"}));x.displayName="Building02";function k(e,t){return`project:${e}:${t}`}const E=new Set(["account.profile","account.preferences","account.experimental","org.general","org.plugins"]);function _(e){if(!e)return!1;if(E.has(e))return!0;const t=e.split(":");return t.length===3&&t[0]==="project"&&!!t[1]&&(t[2]==="general"||t[2]==="plugins"||t[2]==="danger")}function M(e){if(!e.startsWith("project:"))return null;const[,t,r]=e.split(":");return!t||!r?null:{slug:t,sub:r}}function w(){const e=j.c(17),t=C();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const o=v(r);let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[1]=c):c=e[1];const{org:s,project:n}=$(c);let i;e[2]!==o.settings?(i=_(o.settings)?o.settings:void 0,e[2]=o.settings,e[3]=i):i=e[3];const m=i,p=!!m;let a;e[4]!==t||e[5]!==s||e[6]!==n?(a=d=>{!s||!n||t({to:"/$org/$project",params:{org:s,project:n},search:{settings:d}})},e[4]=t,e[5]=s,e[6]=n,e[7]=a):a=e[7];const f=a;let l;e[8]!==t||e[9]!==s||e[10]!==n?(l=()=>{!s||!n||t({to:"/$org/$project",params:{org:s,project:n},search:{}})},e[8]=t,e[9]=s,e[10]=n,e[11]=l):l=e[11];const g=l,h=m??"account.preferences";let u;return e[12]!==g||e[13]!==p||e[14]!==f||e[15]!==h?(u={isOpen:p,activeSection:h,open:f,close:g},e[12]=g,e[13]=p,e[14]=f,e[15]=h,e[16]=u):u=e[16],u}export{k as a,M as p,x as t,w as u};
@@ -1 +0,0 @@
1
- import{I as u}from"./infiniteQueryObserver-B9nwx2aL.js";import{z as i}from"./index-CEFIvFnf.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +0,0 @@
1
- import{z as u,a8 as s}from"./index-CEFIvFnf.js";function o(e,r){return u(e,s,r)}export{o as u};
@@ -1 +0,0 @@
1
- import{I as s}from"./infiniteQueryObserver-B9nwx2aL.js";import{z as u,B as n}from"./index-CEFIvFnf.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};