@decocms/mesh 2.96.1 → 2.96.2

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 (179) hide show
  1. package/dist/client/assets/{AlertCircle-Uhm-vg87.js → AlertCircle-4DBdKyiN.js} +1 -1
  2. package/dist/client/assets/{AlertOctagon-BnG7_0Lj.js → AlertOctagon-CJ4814e4.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-DZdpcFcm.js → ArrowLeft-BbUXsmjT.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-o8GkJfpb.js → ArrowUp-Cf0ZCNqn.js} +1 -1
  5. package/dist/client/assets/{Check-RSjbQD0O.js → Check-DVZrDl7E.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-BabFBaUr.js → CheckCircle-CA3HsvdF.js} +1 -1
  7. package/dist/client/assets/{CheckDone01-TcspZYjj.js → CheckDone01-CDAeIQ63.js} +1 -1
  8. package/dist/client/assets/{ChevronDown-C42nqF2a.js → ChevronDown-BrnUqul2.js} +1 -1
  9. package/dist/client/assets/{ChevronRight-CYPNNnez.js → ChevronRight-lTpPQGwH.js} +1 -1
  10. package/dist/client/assets/{Clock-DXNO1b12.js → Clock-BpIUYvY9.js} +1 -1
  11. package/dist/client/assets/{Code01-n69ilXrX.js → Code01-CgOGThgh.js} +1 -1
  12. package/dist/client/assets/{Container-CS-v1KY-.js → Container-CMQiv6Ns.js} +1 -1
  13. package/dist/client/assets/{Copy01-BCPsfObr.js → Copy01-CMA5_oKx.js} +1 -1
  14. package/dist/client/assets/{Dataflow03-Dh760DjE.js → Dataflow03-CJHUSZDC.js} +1 -1
  15. package/dist/client/assets/{DotsHorizontal-Ctv-gwuL.js → DotsHorizontal-bihG3j6i.js} +1 -1
  16. package/dist/client/assets/{DotsVertical-BAQdtXzK.js → DotsVertical-XqPeTgM4.js} +1 -1
  17. package/dist/client/assets/{Download01-k9Xf7rXk.js → Download01-COYP-wbM.js} +1 -1
  18. package/dist/client/assets/{Edit01-BR94fmFd.js → Edit01-CN-BVNm7.js} +1 -1
  19. package/dist/client/assets/{Eye-BRCzsGxl.js → Eye-DBhpblAN.js} +1 -1
  20. package/dist/client/assets/{File02-Di-6VT8b.js → File02-C2olsFnm.js} +1 -1
  21. package/dist/client/assets/{File06-CSDN93G4.js → File06-CyuQ1kk7.js} +1 -1
  22. package/dist/client/assets/{FilterLines-BqWnRXAG.js → FilterLines-DNMtf_47.js} +1 -1
  23. package/dist/client/assets/{Globe01-Bxre7Rfj.js → Globe01-S1shXduq.js} +1 -1
  24. package/dist/client/assets/{Grid01-pdQxycFL.js → Grid01-BB6GzE_H.js} +1 -1
  25. package/dist/client/assets/{Home02-DKf-8C4k.js → Home02-9-Cl82ip.js} +1 -1
  26. package/dist/client/assets/{Image01-Bsy7A2Dk.js → Image01-Bllq3U2e.js} +1 -1
  27. package/dist/client/assets/{Inbox01-C1fHCz6f.js → Inbox01-_QG6HIJd.js} +1 -1
  28. package/dist/client/assets/{InfoCircle-CLk2ditJ.js → InfoCircle-BzKPKNIV.js} +1 -1
  29. package/dist/client/assets/{Key01-C1I0sRBn.js → Key01-kq7PX1YS.js} +1 -1
  30. package/dist/client/assets/{LinkExternal01-BYZW5cd9.js → LinkExternal01-B7R1mSP2.js} +1 -1
  31. package/dist/client/assets/{List-Dd8vk8oh.js → List-ByKRHbSO.js} +1 -1
  32. package/dist/client/assets/{Loading01-CXnHH69h.js → Loading01-C30bDA9h.js} +1 -1
  33. package/dist/client/assets/{Lock01-JsNkKI7l.js → Lock01-CMTkVFHx.js} +1 -1
  34. package/dist/client/assets/{Pin01-yqsENtKk.js → Pin01-DpTPW-9K.js} +1 -1
  35. package/dist/client/assets/{Play-lOQ1Ymlo.js → Play-BweooOYS.js} +1 -1
  36. package/dist/client/assets/{Plus-D0x-Dibo.js → Plus-q5YWe4us.js} +1 -1
  37. package/dist/client/assets/{RefreshCcw01-h4iMlxqc.js → RefreshCcw01-DRWlmqw5.js} +1 -1
  38. package/dist/client/assets/{RefreshCw01-DMkeO6TB.js → RefreshCw01-Bb8t9XLS.js} +1 -1
  39. package/dist/client/assets/{Save01-B2I-fdos.js → Save01-DXWV5nj4.js} +1 -1
  40. package/dist/client/assets/{SearchMd-vTjANW25.js → SearchMd-hERLZOdx.js} +1 -1
  41. package/dist/client/assets/{Settings01-GQQE44Uf.js → Settings01-K_PXf5Q7.js} +1 -1
  42. package/dist/client/assets/{Settings02-5UGbAEAm.js → Settings02-ZV7r5q4D.js} +1 -1
  43. package/dist/client/assets/{Share07-B1IjUJ7I.js → Share07-Dx2Rb32N.js} +1 -1
  44. package/dist/client/assets/{Terminal-D3JARzN3.js → Terminal-VY7qOx_i.js} +1 -1
  45. package/dist/client/assets/{Tool01-CoNpy80w.js → Tool01-BP_mkdy3.js} +1 -1
  46. package/dist/client/assets/{Trash01-ULZyLlT5.js → Trash01-Dk9pv506.js} +1 -1
  47. package/dist/client/assets/{Upload01-C_yAut88.js → Upload01-BokmTptz.js} +1 -1
  48. package/dist/client/assets/{Users03-CrTVA02D.js → Users03-C_ymlzx3.js} +1 -1
  49. package/dist/client/assets/{X-CMKSGw1c.js → X-BofIsacr.js} +1 -1
  50. package/dist/client/assets/{XClose-fbnekwJM.js → XClose-B9jvydA5.js} +1 -1
  51. package/dist/client/assets/{agent-connections-preview-BATYW9_y.js → agent-connections-preview-CcWJACAV.js} +1 -1
  52. package/dist/client/assets/{agent-detail-DuEm4NiU.js → agent-detail-BTNxaZph.js} +1 -1
  53. package/dist/client/assets/{agents-63xbxJ_E.js → agents-isWhMnyk.js} +1 -1
  54. package/dist/client/assets/{alert-dialog-CqIibzn6.js → alert-dialog-Cl76sYVz.js} +1 -1
  55. package/dist/client/assets/{auth-catchall-DMyukblD.js → auth-catchall-BmUeke0B.js} +1 -1
  56. package/dist/client/assets/{avatar-CNNflJo3.js → avatar-DbtnoOEU.js} +1 -1
  57. package/dist/client/assets/{badge-DEQawiWd.js → badge-D_aixLlt.js} +1 -1
  58. package/dist/client/assets/{binder-Dgk1prvv.js → binder-BeHB3-7Y.js} +1 -1
  59. package/dist/client/assets/{breadcrumb-DLtCbZMJ.js → breadcrumb-ClGbT9Pe.js} +1 -1
  60. package/dist/client/assets/{button-CJa3f3rL.js → button-D-PerQqC.js} +1 -1
  61. package/dist/client/assets/{card-CsxzEYEk.js → card-ZafkYtyj.js} +1 -1
  62. package/dist/client/assets/{checkbox-BCyD8z4q.js → checkbox-DGTMQZYw.js} +1 -1
  63. package/dist/client/assets/{circle-alert-uu9PM4o-.js → circle-alert-B5MH-I2D.js} +1 -1
  64. package/dist/client/assets/{collection-detail-BisjiYIh.js → collection-detail-D7K7KZ3j.js} +1 -1
  65. package/dist/client/assets/{collection-search-BzW9Bci5.js → collection-search-CFO7XWxi.js} +1 -1
  66. package/dist/client/assets/{collection-tab-DNw4-AZ3.js → collection-tab-ZK9qGzbi.js} +1 -1
  67. package/dist/client/assets/{collection-table-wrapper-DuKaQpn1.js → collection-table-wrapper-aEUpSjNT.js} +1 -1
  68. package/dist/client/assets/{collection-tabs-DFXuzfRm.js → collection-tabs-zYgpPtAl.js} +1 -1
  69. package/dist/client/assets/{command-1Xg305EH.js → command-riBVGEeS.js} +1 -1
  70. package/dist/client/assets/{connect-DEAY8vzy.js → connect-CxlD4pzc.js} +1 -1
  71. package/dist/client/assets/{connection-card-Dc-oh5tv.js → connection-card-DibEpgAJ.js} +1 -1
  72. package/dist/client/assets/connection-detail-VawJXFkM.js +1 -0
  73. package/dist/client/assets/{connections-U7rjaHrz.js → connections-rTehwMXP.js} +1 -1
  74. package/dist/client/assets/{constants-LnQa4w9L.js → constants-CH9byiKA.js} +1 -1
  75. package/dist/client/assets/constants-kLsxGUtY.js +1 -0
  76. package/dist/client/assets/{create-organization-dialog-BuI8Z4tH.js → create-organization-dialog-DBHZfDPt.js} +1 -1
  77. package/dist/client/assets/{create-project-dialog-DNH_FaKC.js → create-project-dialog-Yqgc0Gmy.js} +1 -1
  78. package/dist/client/assets/{dialog-Bzq7eXqS.js → dialog-CFptoDdD.js} +1 -1
  79. package/dist/client/assets/{dropdown-menu-DC2vYQhY.js → dropdown-menu-C8QhWQVm.js} +1 -1
  80. package/dist/client/assets/{dynamic-plugin-layout-lKDUzSNP.js → dynamic-plugin-layout-DYwd3Z58.js} +1 -1
  81. package/dist/client/assets/{empty-state-CegLfGmA.js → empty-state-DoBcZdM-.js} +1 -1
  82. package/dist/client/assets/{empty-state-K93degI9.js → empty-state-DyXzPX9E.js} +1 -1
  83. package/dist/client/assets/{env-vars-editor-A56x5u0c.js → env-vars-editor-DyPP_8RR.js} +1 -1
  84. package/dist/client/assets/{error-boundary-BHZBr65c.js → error-boundary-8guJh7VT.js} +1 -1
  85. package/dist/client/assets/{extract-connection-data-Bagxseai.js → extract-connection-data-DkrrvIEC.js} +1 -1
  86. package/dist/client/assets/{file-browser-BcBVgyZ_.js → file-browser-Fvr2IbiZ.js} +2 -2
  87. package/dist/client/assets/{form-BiNvV3_m.js → form-CtFhf1V_.js} +1 -1
  88. package/dist/client/assets/{grid-view-C_FVYERW.js → grid-view-Ce3NoRpj.js} +1 -1
  89. package/dist/client/assets/{home-HO-4OJaE.js → home-BjMglPl-.js} +1 -1
  90. package/dist/client/assets/{index-Dp8TDmPV.js → index-B29giag9.js} +2 -2
  91. package/dist/client/assets/{index-BuinBUAv.js → index-BCTs9n6O.js} +14 -14
  92. package/dist/client/assets/index-BT14xSn0.css +1 -0
  93. package/dist/client/assets/{index-B75ddzLB.js → index-BlBYI35m.js} +1 -1
  94. package/dist/client/assets/{index-CxGA93Pi.js → index-Bourcgd_.js} +1 -1
  95. package/dist/client/assets/{index-CbHJdukr.js → index-CrTEMTct.js} +1 -1
  96. package/dist/client/assets/{index-DQZLC-Ha.js → index-CwR6GYR2.js} +1 -1
  97. package/dist/client/assets/{index-wYRfl08q.js → index-D1S818JH.js} +1 -1
  98. package/dist/client/assets/{index-zbOyivpa.js → index-D8tHe059.js} +1 -1
  99. package/dist/client/assets/{index-DBhC1Bw_.js → index-V777tuW4.js} +1 -1
  100. package/dist/client/assets/{infiniteQueryObserver-D_e-0DLm.js → infiniteQueryObserver-Dzcc9UjY.js} +1 -1
  101. package/dist/client/assets/{input-DNUbpYNz.js → input-Cxci79To.js} +1 -1
  102. package/dist/client/assets/{integration-icon-BrB9FdFC.js → integration-icon-ByKWru2D.js} +1 -1
  103. package/dist/client/assets/{label-SUAIjh3i.js → label-BN7IWnf6.js} +1 -1
  104. package/dist/client/assets/{layout-Co6gOE--.js → layout-DUHhpHXf.js} +1 -1
  105. package/dist/client/assets/{localstorage-keys-DvX9S-u8.js → localstorage-keys-CwGoMvvj.js} +1 -1
  106. package/dist/client/assets/{login-CqtWDfWF.js → login-Ty0R4DxW.js} +1 -1
  107. package/dist/client/assets/{mcp-oauth-BkEfZYjh.js → mcp-oauth-ChVLA9f3.js} +1 -1
  108. package/dist/client/assets/{mcp-server-card-CPLkUd67.js → mcp-server-card-DBYZ33HR.js} +1 -1
  109. package/dist/client/assets/{mcp-server-detail-BqnowxA3.js → mcp-server-detail-Du-GkpxI.js} +2 -2
  110. package/dist/client/assets/{members-C_lwQkhW.js → members-DsiwYbO8.js} +1 -1
  111. package/dist/client/assets/{monitoring-Cura7IdF.js → monitoring-BlxCJU8J.js} +1 -1
  112. package/dist/client/assets/{monitoring-dashboard-edit-DS-AAspi.js → monitoring-dashboard-edit-DSM3xa4Q.js} +1 -1
  113. package/dist/client/assets/{monitoring-dashboard-view-Drr802Ja.js → monitoring-dashboard-view-CJ1f1bB7.js} +1 -1
  114. package/dist/client/assets/{oauth-callback-BjD4G2wX.js → oauth-callback-DmySymdW.js} +1 -1
  115. package/dist/client/assets/page-D0Sa9mFI.js +1 -0
  116. package/dist/client/assets/{page-d0dzeaxa.js → page-Tih4SWMI.js} +1 -1
  117. package/dist/client/assets/{plugin-empty-state-DUWxbNZT.js → plugin-empty-state-D05hsZ5h.js} +1 -1
  118. package/dist/client/assets/{plugin-empty-state--d7z38bx.js → plugin-empty-state-hheYGSVX.js} +1 -1
  119. package/dist/client/assets/{plugin-header-BA3h83Bj.js → plugin-header-CE-bMrP6.js} +1 -1
  120. package/dist/client/assets/{plugin-header-BAHaZxid.js → plugin-header-CmN2-mKw.js} +1 -1
  121. package/dist/client/assets/{popover-NmdUTNcA.js → popover-Bq8aZ27v.js} +1 -1
  122. package/dist/client/assets/{project-layout-BYeS0BnN.js → project-layout-ByRKYVau.js} +1 -1
  123. package/dist/client/assets/{project-settings-SIbKavxy.js → project-settings-ByYa3pFP.js} +1 -1
  124. package/dist/client/assets/{projects-list-Denhxpmm.js → projects-list-CDpKF2Ed.js} +1 -1
  125. package/dist/client/assets/registry-layout-CfGazoo8.js +5 -0
  126. package/dist/client/assets/{registry-utils-DB2T-f6C.js → registry-utils-6Y4tQn0C.js} +1 -1
  127. package/dist/client/assets/{resizable-T_yUYvbE.js → resizable-DfSFqzWY.js} +1 -1
  128. package/dist/client/assets/{save-actions-5R6BlOXt.js → save-actions-htT4YoqX.js} +1 -1
  129. package/dist/client/assets/{scroll-area-CBpNMZKr.js → scroll-area-BJ5bePQ1.js} +1 -1
  130. package/dist/client/assets/{select-C2nUbKfi.js → select-D6oaQfJS.js} +1 -1
  131. package/dist/client/assets/{shell-layout-BhIOsSah.js → shell-layout-GR3VdFoR.js} +3 -3
  132. package/dist/client/assets/{spinner-uWSwEI1n.js → spinner-BstVffOp.js} +1 -1
  133. package/dist/client/assets/{store-invite-NFRL1rLj.js → store-invite-C4VxiywO.js} +1 -1
  134. package/dist/client/assets/{switch-B_mHCx3S.js → switch-Bi5F4S-5.js} +1 -1
  135. package/dist/client/assets/{table-C_SqJ2pz.js → table-C576YCZw.js} +1 -1
  136. package/dist/client/assets/tasks-BDnJjeaX.js +1 -0
  137. package/dist/client/assets/{textarea-CTzgIHFy.js → textarea-DhETf1og.js} +1 -1
  138. package/dist/client/assets/{time-range-picker-DC9mhGh1.js → time-range-picker-CG48KHqL.js} +1 -1
  139. package/dist/client/assets/{toggle-group-Dz6DkmD4.js → toggle-group-BdU9v1nm.js} +1 -1
  140. package/dist/client/assets/{tools-list-plHC71me.js → tools-list-DhfY_SNs.js} +1 -1
  141. package/dist/client/assets/{tooltip-C8pD5y5P.js → tooltip-D-FT-fCa.js} +1 -1
  142. package/dist/client/assets/{topbar-portal-DAwgzTHb.js → topbar-portal-IUe4pf8g.js} +1 -1
  143. package/dist/client/assets/{typewriter-title-e9bmrxry.js → typewriter-title-cc0Pz_LM.js} +1 -1
  144. package/dist/client/assets/{use-binding-BMUJf9fk.js → use-binding-B7W2mOcc.js} +1 -1
  145. package/dist/client/assets/{use-connection-Bpj__KJl.js → use-connection-DrWeJHXu.js} +1 -1
  146. package/dist/client/assets/use-copy-BNoj9l5V.js +1 -0
  147. package/dist/client/assets/{use-create-virtual-mcp-2ig7XE3k.js → use-create-virtual-mcp-DhPfPD_b.js} +1 -1
  148. package/dist/client/assets/{use-deco-chat-open-cRBnqBrA.js → use-deco-chat-open-B0b2QgDS.js} +1 -1
  149. package/dist/client/assets/{use-install-from-registry-C0CQR1XL.js → use-install-from-registry-BMfOY5TA.js} +1 -1
  150. package/dist/client/assets/{use-list-state-j_os04A2.js → use-list-state-qDaPNHfK.js} +1 -1
  151. package/dist/client/assets/{use-llm-C9Qa_Kzo.js → use-llm-DjYTM2HW.js} +1 -1
  152. package/dist/client/assets/{use-mcp-prompts-BgJx9Ng3.js → use-mcp-prompts-BMZQCyj7.js} +1 -1
  153. package/dist/client/assets/{use-mcp-tools-kVBrFVQ_.js → use-mcp-tools-CdAhr98j.js} +1 -1
  154. package/dist/client/assets/{use-mobile-BhG5mqie.js → use-mobile-DcwTOp-X.js} +1 -1
  155. package/dist/client/assets/{use-organization-settings-CrqFuGPr.js → use-organization-settings-6xOluKFM.js} +1 -1
  156. package/dist/client/assets/{use-project-BDU5VGwr.js → use-project-DY_ihdkL.js} +1 -1
  157. package/dist/client/assets/{use-view-mode-B21E886q.js → use-view-mode-CY4TLkHz.js} +1 -1
  158. package/dist/client/assets/{use-virtual-mcp-CamkpUx0.js → use-virtual-mcp-IiP1g_wm.js} +1 -1
  159. package/dist/client/assets/useInfiniteQuery-eF9xXIkq.js +1 -0
  160. package/dist/client/assets/{useMutation-CkwG6xTN.js → useMutation-WNJB1RXH.js} +1 -1
  161. package/dist/client/assets/useQuery-BO0TdkAU.js +1 -0
  162. package/dist/client/assets/useSuspenseInfiniteQuery-DfH90Jor.js +1 -0
  163. package/dist/client/assets/{view-mode-toggle-CkMs1Dwx.js → view-mode-toggle-CRrDEnZy.js} +1 -1
  164. package/dist/client/assets/{workflow-B9m2KhXI.js → workflow-CD5ePGpY.js} +1 -1
  165. package/dist/client/index.html +2 -2
  166. package/dist/server/cli.js +198 -198
  167. package/dist/server/migrate.js +173 -173
  168. package/dist/server/server.js +175 -175
  169. package/package.json +1 -1
  170. package/dist/client/assets/ArrowRight-DDCJ7vCm.js +0 -1
  171. package/dist/client/assets/connection-detail-DimjcjkK.js +0 -1
  172. package/dist/client/assets/constants-CXdUDujD.js +0 -1
  173. package/dist/client/assets/index-hnZfQSPC.css +0 -1
  174. package/dist/client/assets/page-MGUA0r79.js +0 -1
  175. package/dist/client/assets/registry-layout-CPldmLnW.js +0 -5
  176. package/dist/client/assets/tasks-DvY2XPl_.js +0 -1
  177. package/dist/client/assets/useInfiniteQuery-R7yz1vmu.js +0 -1
  178. package/dist/client/assets/useQuery-DCx9kDUK.js +0 -1
  179. package/dist/client/assets/useSuspenseInfiniteQuery-CYwzFakG.js +0 -1
@@ -1,8 +1,8 @@
1
- import{r as w,c as N,j as n,u as ae,m as xe,bz as We,L as ze,bv as rs,bI as ls,O as ee,I as gt,v as os,y as is,g as ie,t as de,b6 as as,bJ as jt,a as tt,bK as cs,bp as bt,bL as $e,A as ds,S as vt,b as ms,e as fs,N as us,n as ps,K as xs,l as Nt,P as hs}from"./index-Dp8TDmPV.js";import{C as le,i as gs}from"./index-BuinBUAv.js";import{I as js}from"./integration-icon-BrB9FdFC.js";import{P as _e}from"./index-DQZLC-Ha.js";import{e as Ve,u as bs,S as te,g as St,C as vs,f as Ns,h as Ss}from"./use-deco-chat-open-cRBnqBrA.js";import{c as z,B as se}from"./button-CJa3f3rL.js";import{d as ys}from"./constants-LnQa4w9L.js";import{T as ws,i as Cs,b as ks,S as _s,c as zs,d as $s,e as Is,f as Os,t as yt}from"./typewriter-title-e9bmrxry.js";import{s as Ke}from"./Plus-D0x-Dibo.js";import{t as wt}from"./Users03-CrTVA02D.js";import{i as He}from"./X-CMKSGw1c.js";import{E as Ct}from"./error-boundary-BHZBr65c.js";import{C as kt}from"./create-project-dialog-DNH_FaKC.js";import{u as st,L as nt}from"./localstorage-keys-DvX9S-u8.js";import{n as _t}from"./CheckDone01-TcspZYjj.js";import{n as Ps}from"./Container-CS-v1KY-.js";import{e as dt}from"./Dataflow03-Dh760DjE.js";import{a as Ts}from"./Home02-DKf-8C4k.js";import{u as Es,a as zt}from"./use-project-BDU5VGwr.js";import{u as Ee}from"./use-mobile-BhG5mqie.js";import{a as Ue,c as $t,T as Be,b as Fe}from"./tooltip-C8pD5y5P.js";import{t as rt}from"./ChevronDown-C42nqF2a.js";import{A as me}from"./avatar-CNNflJo3.js";import{b as lt,P as ot,a as it}from"./popover-NmdUTNcA.js";import{n as mt}from"./Inbox01-C1fHCz6f.js";import{B as ft}from"./badge-DEQawiWd.js";import{i as Oe}from"./Check-RSjbQD0O.js";import{s as ut}from"./XClose-fbnekwJM.js";import{i as It}from"./ChevronRight-CYPNNnez.js";import{a as at}from"./Settings02-5UGbAEAm.js";import{C as Ot}from"./create-organization-dialog-BuI8Z4tH.js";import{c as As,b as Ms,g as Ls,a as Ds,D as Rs}from"./dialog-Bzq7eXqS.js";import{L as qe}from"./label-SUAIjh3i.js";import{S as Je}from"./switch-B_mHCx3S.js";import{i as Hs}from"./Code01-n69ilXrX.js";import{a as Pt}from"./Copy01-BCPsfObr.js";import{u as Tt,a as Us}from"./use-organization-settings-CrqFuGPr.js";import{i as Bs}from"./File06-CSDN93G4.js";import{I as Fs}from"./input-DNUbpYNz.js";import{c as Ws}from"./Grid01-pdQxycFL.js";import{a as Vs,T as Ks}from"./topbar-portal-DAwgzTHb.js";import{a as Gs,b as Zs,D as Ys,c as qs,g as pt}from"./dropdown-menu-DC2vYQhY.js";import{i as Js}from"./Globe01-Bxre7Rfj.js";import{n as xt}from"./LinkExternal01-BYZW5cd9.js";import{t as Xs}from"./Settings01-GQQE44Uf.js";import{R as Qs,a as Et,b as en}from"./resizable-T_yUYvbE.js";import"./spinner-uWSwEI1n.js";import"./use-mcp-prompts-BgJx9Ng3.js";import"./useQuery-DCx9kDUK.js";import"./form-BiNvV3_m.js";import"./ArrowUp-o8GkJfpb.js";import"./Edit01-BR94fmFd.js";import"./AlertCircle-Uhm-vg87.js";import"./ArrowLeft-DZdpcFcm.js";import"./ArrowRight-DDCJ7vCm.js";import"./use-virtual-mcp-CamkpUx0.js";import"./use-connection-Bpj__KJl.js";import"./useMutation-CkwG6xTN.js";import"./SearchMd-vTjANW25.js";import"./use-create-virtual-mcp-2ig7XE3k.js";import"./usage-B8eRkRZY.js";import"./marked.esm-BaswSlok.js";import"./empty-state-CegLfGmA.js";import"./generate-id-Dyweu44Y.js";import"./Clock-DXNO1b12.js";import"./Trash01-ULZyLlT5.js";import"./use-llm-C9Qa_Kzo.js";import"./use-binding-BMUJf9fk.js";import"./binder-Dgk1prvv.js";import"./select-C2nUbKfi.js";import"./index-DBhC1Bw_.js";import"./Image01-Bsy7A2Dk.js";import"./RefreshCcw01-h4iMlxqc.js";import"./useSuspenseInfiniteQuery-CYwzFakG.js";import"./infiniteQueryObserver-D_e-0DLm.js";import"./textarea-CTzgIHFy.js";import"./alert-dialog-CqIibzn6.js";const Xe=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"M7 17 17 7m0 0H7m10 0v10"}));Xe.displayName="ArrowUpRight";const At=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.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"}));At.displayName="BarChart10";const Mt=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"m12 21-.1-.15c-.695-1.042-1.042-1.563-1.5-1.94a4 4 0 0 0-1.378-.737C8.453 18 7.827 18 6.575 18H5.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C2 16.48 2 15.92 2 14.8V6.2c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C3.52 3 4.08 3 5.2 3h.4c2.24 0 3.36 0 4.216.436a4 4 0 0 1 1.748 1.748C12 6.04 12 7.16 12 9.4M12 21V9.4M12 21l.1-.15c.695-1.042 1.042-1.563 1.5-1.94a3.999 3.999 0 0 1 1.378-.737C15.547 18 16.173 18 17.425 18H18.8c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 16.48 22 15.92 22 14.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 3 19.92 3 18.8 3h-.4c-2.24 0-3.36 0-4.216.436a4 4 0 0 0-1.748 1.748C12 6.04 12 7.16 12 9.4"}));Mt.displayName="BookOpen01";const Lt=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.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"}));Lt.displayName="Building02";const Dt=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"m18 17-5-5 5-5m-7 10-5-5 5-5"}));Dt.displayName="ChevronLeftDouble";const Rt=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"m6 17 5-5-5-5m7 10 5-5-5-5"}));Rt.displayName="ChevronRightDouble";const Ht=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.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"}));Ht.displayName="FaceSmile";const Ut=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"M15 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3Z"}));Ut.displayName="LayoutRight";const Bt=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.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"}));Bt.displayName="LogOut01";const Ft=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"m16 17 5-5m0 0-5-5m5 5H9m3 5c0 .93 0 1.395-.102 1.776a3 3 0 0 1-2.122 2.122C9.395 21 8.93 21 8 21h-.5c-1.398 0-2.097 0-2.648-.228a3 3 0 0 1-1.624-1.624C3 18.597 3 17.898 3 16.5v-9c0-1.398 0-2.097.228-2.648a3 3 0 0 1 1.624-1.624C5.403 3 6.102 3 7.5 3H8c.93 0 1.395 0 1.776.102a3 3 0 0 1 2.122 2.122C12 5.605 12 6.07 12 7"}));Ft.displayName="LogOut02";const Wt=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"m2 7 8.165 5.715c.661.463.992.695 1.351.784a2 2 0 0 0 .968 0c.36-.09.69-.32 1.351-.784L22 7M6.8 20h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 17.72 22 16.88 22 15.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 4 18.88 4 17.2 4H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 6.28 2 7.12 2 8.8v6.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 20 5.12 20 6.8 20Z"}));Wt.displayName="Mail01";const Vt=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"M3 8h12m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0Zm-6 8h12M9 16a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}));Vt.displayName="Settings04";function tn(){const t=N.c(65),{org:e}=ae(),[,s]=Ve(),{selectedVirtualMcp:r,modelsConnections:l,isChatEmpty:o,activeThreadId:i,createThread:a,switchToThread:c,threads:d}=bs();let m;if(t[0]!==i||t[1]!==d){let K;t[3]!==i?(K=G=>G.id===i,t[3]=i,t[4]=K):K=t[4],m=d.find(K),t[0]=i,t[1]=d,t[2]=m}else m=t[2];const f=m,[u,p]=w.useState(!1),[x,h]=w.useTransition();let j;t[5]!==e.id?(j=ys(e.id),t[5]=e.id,t[6]=j):j=t[6];const g=r??j;let v;t[7]!==a?(v=()=>{h(()=>{a()})},t[7]=a,t[8]=v):v=t[8];const S=v;if(l.length===0){let K;t[9]===Symbol.for("react.memo_cache_sentinel")?(K=n.jsx(_e.Header.Left,{className:"gap-2"}),t[9]=K):K=t[9];let G;t[10]!==s?(G=()=>s(!1),t[10]=s,t[11]=G):G=t[11];let X;t[12]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx(He,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[12]=X):X=t[12];let Y;t[13]!==G?(Y=n.jsxs(_e.Header,{className:"flex-none",children:[K,n.jsx(_e.Header.Right,{className:"gap-1",children:n.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:X})})]}),t[13]=G,t[14]=Y):Y=t[14];let O;t[15]!==e?(O=n.jsx(le.Main,{className:"flex flex-col items-center",children:n.jsx(le.EmptyState,{children:n.jsx(le.NoLlmBindingEmptyState,{title:"No model provider connected",description:"Connect to a model provider to unlock AI-powered features.",org:e})})}),t[15]=e,t[16]=O):O=t[16];let L;return t[17]!==Y||t[18]!==O?(L=n.jsxs(le,{children:[Y,O]}),t[17]=Y,t[18]=O,t[19]=L):L=t[19],L}const C=u?"duration-300 opacity-0 -translate-x-4 pointer-events-none":x?"duration-200 opacity-0 pointer-events-none":"duration-300 opacity-100 translate-x-0";let y;t[20]!==C?(y=z("absolute inset-0 flex flex-col transition-all ease-in-out",C),t[20]=C,t[21]=y):y=t[21];let _;t[22]!==f||t[23]!==o?(_=!o&&f?.title&&n.jsx(ws,{text:f.title,className:"text-sm font-medium text-foreground"}),t[22]=f,t[23]=o,t[24]=_):_=t[24];let P;t[25]!==_?(P=n.jsx(_e.Header.Left,{className:"gap-2",children:_}),t[25]=_,t[26]=P):P=t[26];let k;t[27]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(Ke,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[27]=k):k=t[27];let $;t[28]!==S||t[29]!==x?($=n.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:k}),t[28]=S,t[29]=x,t[30]=$):$=t[30];let I;t[31]===Symbol.for("react.memo_cache_sentinel")?(I=()=>p(!0),t[31]=I):I=t[31];let E;t[32]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx("button",{type:"button",onClick:I,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"Chat history",children:n.jsx(Cs,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})}),t[32]=E):E=t[32];let T;t[33]!==s?(T=()=>s(!1),t[33]=s,t[34]=T):T=t[34];let B;t[35]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsx(He,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[35]=B):B=t[35];let A;t[36]!==T?(A=n.jsx("button",{type:"button",onClick:T,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:B}),t[36]=T,t[37]=A):A=t[37];let D;t[38]!==A||t[39]!==$?(D=n.jsxs(_e.Header.Right,{className:"gap-1",children:[$,E,A]}),t[38]=A,t[39]=$,t[40]=D):D=t[40];let R;t[41]!==D||t[42]!==P?(R=n.jsxs(_e.Header,{className:"flex-none",children:[P,D]}),t[41]=D,t[42]=P,t[43]=R):R=t[43];let M;t[44]!==g||t[45]!==o?(M=n.jsx(le.Main,{children:o?n.jsx(le.EmptyState,{children:n.jsxs("div",{className:"flex flex-col items-center gap-6 w-full px-4",children:[n.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 p-0 text-center",children:[n.jsx(js,{icon:g.icon,name:g.title,size:"lg",fallbackIcon:n.jsx(wt,{size:32}),className:"size-[60px]! rounded-[18px]!"}),n.jsx("h3",{className:"text-xl font-medium text-foreground",children:g.title}),n.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:g.description??"Ask anything about configuring model providers or using MCP Mesh."})]}),n.jsx(le.IceBreakers,{})]})}):n.jsx(le.Messages,{})}),t[44]=g,t[45]=o,t[46]=M):M=t[46];let H;t[47]===Symbol.for("react.memo_cache_sentinel")?(H=n.jsx(le.Footer,{children:n.jsx(le.Input,{})}),t[47]=H):H=t[47];let F;t[48]!==R||t[49]!==M||t[50]!==y?(F=n.jsxs("div",{className:y,children:[R,M,H]}),t[48]=R,t[49]=M,t[50]=y,t[51]=F):F=t[51];const U=u?"opacity-100 translate-x-0":"opacity-0 translate-x-4 pointer-events-none";let W;t[52]!==U?(W=z("absolute inset-0 flex flex-col transition-all duration-300 ease-in-out",U),t[52]=U,t[53]=W):W=t[53];let V;t[54]===Symbol.for("react.memo_cache_sentinel")?(V=()=>p(!1),t[54]=V):V=t[54];let Z;t[55]!==i||t[56]!==c||t[57]!==d?(Z=n.jsx(ks,{threads:d,activeThreadId:i,onThreadSelect:c,onClose:V}),t[55]=i,t[56]=c,t[57]=d,t[58]=Z):Z=t[58];let q;t[59]!==W||t[60]!==Z?(q=n.jsx("div",{className:W,children:Z}),t[59]=W,t[60]=Z,t[61]=q):q=t[61];let J;return t[62]!==F||t[63]!==q?(J=n.jsxs(le,{className:"relative overflow-hidden",children:[F,q]}),t[62]=F,t[63]=q,t[64]=J):J=t[64],J}function sn(){const t=N.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(le.Skeleton,{}),t[0]=e):e=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(Ct,{fallback:e,children:n.jsx(w.Suspense,{fallback:n.jsx(le.Skeleton,{}),children:n.jsx(tn,{})})}),t[1]=s):s=t[1],s}const nn={devMode:!1,experimental_projects:!1,experimental_tasks:!1};function Ge(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=nt.preferences(),t[0]=e):e=t[0],st(e,nn)}function rn(){const t=N.c(36),[e]=Ge(),{locator:s,org:r}=ae(),l=xe(),o=We(),{org:i,project:a}=ze.parse(s),c=ze.isOrgAdminProject(s),{data:d}=Es(r.id,a);let m;t[0]!==d?.enabledPlugins?(m=d?.enabledPlugins??[],t[0]=d?.enabledPlugins,t[1]=m):m=t[1];const f=m;let u;t[2]!==f?(u=O=>f.includes(O.pluginId),t[2]=f,t[3]=u):u=t[3];const p=rs.filter(u),x=o.location.pathname===`/${i}/${a}`||o.location.pathname===`/${i}/${a}/`;let h;t[4]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Ts,{}),t[4]=h):h=t[4];const j={key:"home",label:"Home",icon:h,onClick:()=>{x?window.dispatchEvent(new CustomEvent("reset-home-view")):l({to:"/$org/$project",params:{org:i,project:a}})}};let b;t[5]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(_t,{}),t[5]=b):b=t[5];const g={key:"tasks",label:"Tasks",icon:b,onClick:()=>l({to:"/$org/$project/tasks",params:{org:i,project:ee}})};let v;t[6]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(Ps,{}),t[6]=v):v=t[6];const S={key:"mcps",label:"Connections",icon:v,onClick:()=>l({to:"/$org/$project/mcps",params:{org:i,project:ee}})};let C;t[7]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(gt,{}),t[7]=C):C=t[7];const y={key:"projects",label:"Projects",icon:C,onClick:()=>l({to:"/$org/$project/projects",params:{org:i,project:ee}})};let _;t[8]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(Lt,{}),t[8]=_):_=t[8];const P={key:"store",label:"Store",icon:_,onClick:()=>l({to:"/$org/$project/store",params:{org:i,project:ee}})};let k;t[9]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(wt,{}),t[9]=k):k=t[9];const $={key:"agents",label:"Agents",icon:k,onClick:()=>l({to:"/$org/$project/agents",params:{org:i,project:ee}})};let I;t[10]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsx(At,{}),t[10]=I):I=t[10];const E={key:"monitoring",label:"Monitor",icon:I,onClick:()=>l({to:"/$org/$project/monitoring",params:{org:i,project:ee}})};let T;t[11]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(dt,{}),t[11]=T):T=t[11];const B={key:"workflows",label:"Workflows",icon:T,onClick:()=>l({to:"/$org/$project/workflows",params:{org:i,project:ee}})};let A;t[12]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(Ht,{}),t[12]=A):A=t[12];const D={key:"members",label:"Members",icon:A,onClick:()=>l({to:"/$org/$project/members",params:{org:i,project:ee}})},R=[...e.experimental_tasks?[g]:[],S,B,...e.experimental_projects?[y]:[],P,$,E,D],M=p.map(O=>({key:O.pluginId,label:O.label,icon:O.icon,onClick:()=>l({to:"/$org/$project/$pluginId",params:{org:i,project:a,pluginId:O.pluginId}})}));let H;t[13]!==f?(H=O=>f.includes(O.pluginId),t[13]=f,t[14]=H):H=t[14];const U=ls.filter(H).map(O=>({type:"group",group:{id:`${O.pluginId}-${O.id}`,label:O.label,items:O.items.map((L,Q)=>({key:`${O.pluginId}-${O.id}-${Q}`,label:L.label,icon:L.icon,onClick:()=>l({to:"/$org/$project/$pluginId",params:{org:i,project:a,pluginId:O.pluginId}})})),defaultExpanded:O.defaultExpanded??!0}}));if(c){const O=[{type:"items",items:[j,...R]}];if(M.length>0){let L;t[15]===Symbol.for("react.memo_cache_sentinel")?(L={type:"divider"},t[15]=L):L=t[15],O.push(L);let Q;t[16]!==M?(Q={type:"items",items:M},t[16]=M,t[17]=Q):Q=t[17],O.push(Q)}if(U.length>0){if(M.length===0){let L;t[18]===Symbol.for("react.memo_cache_sentinel")?(L={type:"divider"},t[18]=L):L=t[18],O.push(L)}O.push(...U)}return O}let W;t[19]===Symbol.for("react.memo_cache_sentinel")?(W=n.jsx(gs,{}),t[19]=W):W=t[19];let V;t[20]!==l||t[21]!==i||t[22]!==a?(V={key:"tasks",label:"Tasks",icon:W,onClick:()=>l({to:"/$org/$project/tasks",params:{org:i,project:a}})},t[20]=l,t[21]=i,t[22]=a,t[23]=V):V=t[23];const Z=V;let q;t[24]===Symbol.for("react.memo_cache_sentinel")?(q=n.jsx(dt,{}),t[24]=q):q=t[24];let J;t[25]!==l||t[26]!==i||t[27]!==a?(J={key:"workflows",label:"Workflows",icon:q,onClick:()=>l({to:"/$org/$project/workflows",params:{org:i,project:a}})},t[25]=l,t[26]=i,t[27]=a,t[28]=J):J=t[28];const K=J;let G;t[29]!==e.experimental_tasks||t[30]!==Z?(G=e.experimental_tasks?[Z]:[],t[29]=e.experimental_tasks,t[30]=Z,t[31]=G):G=t[31];const Y=[{type:"items",items:[j,...G,K]}];if(M.length>0){let O;t[32]===Symbol.for("react.memo_cache_sentinel")?(O={type:"divider"},t[32]=O):O=t[32],Y.push(O);let L;t[33]!==M?(L={type:"items",items:M},t[33]=M,t[34]=L):L=t[34],Y.push(L)}if(U.length>0){if(M.length===0){let O;t[35]===Symbol.for("react.memo_cache_sentinel")?(O={type:"divider"},t[35]=O):O=t[35],Y.push(O)}Y.push(...U)}return Y}const ln="sidebar_state",on=3600*24*7,an="16rem",cn="18rem",dn="3rem",mn="b",Kt=w.createContext(null);function Ze(){const t=w.useContext(Kt);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function fn(t){const e=N.c(21),{defaultOpen:s,open:r,onOpenChange:l,children:o}=t,i=s===void 0?!0:s,a=Ee(),[c,d]=w.useState(!1),[m,f]=w.useState(i),u=r??m;let p;e[0]!==u||e[1]!==l?(p=P=>{const k=typeof P=="function"?P(u):P;l?l(k):f(k),document.cookie=`${ln}=${k}; path=/; max-age=${on}`},e[0]=u,e[1]=l,e[2]=p):p=e[2];const x=p;let h;e[3]!==a||e[4]!==x?(h=()=>a?d(pn):x(un),e[3]=a,e[4]=x,e[5]=h):h=e[5];const j=h;let b,g;e[6]!==j?(b=()=>{const P=k=>{if(k.key===mn&&(k.metaKey||k.ctrlKey)){const $=k.target;if($.tagName==="INPUT"||$.tagName==="TEXTAREA"||$.isContentEditable)return;k.preventDefault(),j()}};return globalThis.addEventListener("keydown",P),()=>globalThis.removeEventListener("keydown",P)},g=[j],e[6]=j,e[7]=b,e[8]=g):(b=e[7],g=e[8]),w.useEffect(b,g);const v=u?"expanded":"collapsed";let S;e[9]!==a||e[10]!==u||e[11]!==c||e[12]!==x||e[13]!==v||e[14]!==j?(S={state:v,open:u,setOpen:x,isMobile:a,openMobile:c,setOpenMobile:d,toggleSidebar:j},e[9]=a,e[10]=u,e[11]=c,e[12]=x,e[13]=v,e[14]=j,e[15]=S):S=e[15];const C=S;let y;e[16]!==o?(y=n.jsx($t,{delayDuration:0,children:o}),e[16]=o,e[17]=y):y=e[17];let _;return e[18]!==C||e[19]!==y?(_=n.jsx(Kt.Provider,{value:C,children:y}),e[18]=C,e[19]=y,e[20]=_):_=e[20],_}function un(t){return!t}function pn(t){return!t}function xn(t){const e=N.c(14);let s,r,l,o;e[0]!==t?({className:r,style:o,children:s,...l}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o):(s=e[1],r=e[2],l=e[3],o=e[4]);let i;e[5]!==o?(i={"--sidebar-width":an,"--sidebar-width-icon":dn,...o},e[5]=o,e[6]=i):i=e[6];const a=i;let c;e[7]!==r?(c=z("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",r),e[7]=r,e[8]=c):c=e[8];let d;return e[9]!==s||e[10]!==l||e[11]!==a||e[12]!==c?(d=n.jsx("div",{"data-slot":"sidebar-wrapper",style:a,className:c,...l,children:s}),e[9]=s,e[10]=l,e[11]=a,e[12]=c,e[13]=d):d=e[13],d}function hn(t){const e=N.c(46);let s,r,l,o,i,a;e[0]!==t?({side:o,variant:i,collapsible:a,className:r,children:s,...l}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o,e[5]=i,e[6]=a):(s=e[1],r=e[2],l=e[3],o=e[4],i=e[5],a=e[6]);const c=o===void 0?"left":o,d=i===void 0?"sidebar":i,m=a===void 0?"offcanvas":a,{isMobile:f,state:u,openMobile:p,setOpenMobile:x}=Ze();if(m==="none"){let k;e[7]!==r?(k=z("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),e[7]=r,e[8]=k):k=e[8];let $;return e[9]!==s||e[10]!==l||e[11]!==k?($=n.jsx("div",{"data-slot":"sidebar",className:k,...l,children:s}),e[9]=s,e[10]=l,e[11]=k,e[12]=$):$=e[12],$}if(f){let k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k={"--sidebar-width":cn},e[13]=k):k=e[13];let $;e[14]===Symbol.for("react.memo_cache_sentinel")?($=n.jsxs(zs,{className:"sr-only",children:[n.jsx($s,{children:"Sidebar"}),n.jsx(Is,{children:"Displays the mobile sidebar."})]}),e[14]=$):$=e[14];let I;e[15]!==s?(I=n.jsx("div",{className:"flex h-full w-full flex-col",children:s}),e[15]=s,e[16]=I):I=e[16];let E;e[17]!==c||e[18]!==I?(E=n.jsxs(Os,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:k,side:c,children:[$,I]}),e[17]=c,e[18]=I,e[19]=E):E=e[19];let T;return e[20]!==p||e[21]!==l||e[22]!==x||e[23]!==E?(T=n.jsx(_s,{open:p,onOpenChange:x,...l,children:E}),e[20]=p,e[21]=l,e[22]=x,e[23]=E,e[24]=T):T=e[24],T}const h=u==="collapsed"?m:"",j=d==="floating"||d==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let b;e[25]!==j?(b=z("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",j),e[25]=j,e[26]=b):b=e[26];let g;e[27]!==b?(g=n.jsx("div",{"data-slot":"sidebar-gap",className:b}),e[27]=b,e[28]=g):g=e[28];const v=c==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",S=d==="floating"||d==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let C;e[29]!==r||e[30]!==v||e[31]!==S?(C=z("fixed top-12 bottom-0 z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",v,S,r),e[29]=r,e[30]=v,e[31]=S,e[32]=C):C=e[32];let y;e[33]!==s?(y=n.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border pt-2 flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:s}),e[33]=s,e[34]=y):y=e[34];let _;e[35]!==l||e[36]!==C||e[37]!==y?(_=n.jsx("div",{"data-slot":"sidebar-container",className:C,...l,children:y}),e[35]=l,e[36]=C,e[37]=y,e[38]=_):_=e[38];let P;return e[39]!==c||e[40]!==u||e[41]!==_||e[42]!==h||e[43]!==g||e[44]!==d?(P=n.jsxs("div",{className:"group peer text-foreground hidden md:block","data-state":u,"data-collapsible":h,"data-variant":d,"data-side":c,"data-slot":"sidebar",children:[g,_]}),e[39]=c,e[40]=u,e[41]=_,e[42]=h,e[43]=g,e[44]=d,e[45]=P):P=e[45],P}function gn(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("main",{"data-slot":"sidebar-inset",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Gt(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex flex-col gap-2 p-2",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function jn(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex flex-col gap-2 px-2 items-start justify-start",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function ct(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("h-4 m-0! w-full",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-sidebar":"separator",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function bn(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Pe(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Te(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("w-full text-sm",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function pe(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex w-full min-w-0 flex-col gap-1",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function oe(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("group/menu-item relative",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}const vn=is("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg px-2 py-1.5 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding,colors] transition-colors duration-150 ease-out hover:transition-none focus-visible:ring-2 active:bg-sidebar-accent/75 disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent/75 [&>span:last-child]:truncate [&>svg]:size-[18px] [&>svg]:shrink-0 [&>svg]:text-muted-foreground",{variants:{variant:{default:"hover:bg-sidebar-accent text-sidebar-foreground/80 active:text-sidebar-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-7 text-sm font-[450]",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Ae(t){const e=N.c(28);let s,r,l,o,i,a,c;e[0]!==t?({asChild:l,isActive:o,variant:i,size:a,tooltip:c,className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o,e[5]=i,e[6]=a,e[7]=c):(s=e[1],r=e[2],l=e[3],o=e[4],i=e[5],a=e[6],c=e[7]);const d=l===void 0?!1:l,m=o===void 0?!1:o,f=i===void 0?"default":i,u=a===void 0?"default":a,p=d?os:"button",{isMobile:x,state:h}=Ze();let j;e[8]!==s||e[9]!==u||e[10]!==f?(j=z(vn({variant:f,size:u}),s),e[8]=s,e[9]=u,e[10]=f,e[11]=j):j=e[11];let b;e[12]!==p||e[13]!==m||e[14]!==r||e[15]!==u||e[16]!==j?(b=n.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":u,"data-active":m,className:j,...r}),e[12]=p,e[13]=m,e[14]=r,e[15]=u,e[16]=j,e[17]=b):b=e[17];const g=b;if(!c)return g;if(typeof c=="string"){let _;e[18]!==c?(_={children:c},e[18]=c,e[19]=_):_=e[19],c=_}let v;e[20]!==g?(v=n.jsx(Be,{asChild:!0,children:g}),e[20]=g,e[21]=v):v=e[21];const S=h!=="collapsed"||x;let C;e[22]!==S||e[23]!==c?(C=n.jsx(Ue,{side:"right",align:"center",hidden:S,...c}),e[22]=S,e[23]=c,e[24]=C):C=e[24];let y;return e[25]!==v||e[26]!==C?(y=n.jsxs(Fe,{children:[v,C]}),e[25]=v,e[26]=C,e[27]=y):y=e[27],y}function Nn(t){const e=N.c(18),{label:s,children:r,defaultExpanded:l}=t,o=l===void 0?!0:l,[i,a]=w.useState(o);let c;e[0]!==i?(c=()=>a(!i),e[0]=i,e[1]=c):c=e[1];let d;e[2]!==s?(d=n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s}),e[2]=s,e[3]=d):d=e[3];const m=!i&&"-rotate-90";let f;e[4]!==m?(f=z("text-muted-foreground transition-transform duration-200",m),e[4]=m,e[5]=f):f=e[5];let u;e[6]!==f?(u=n.jsx(rt,{size:12,className:f}),e[6]=f,e[7]=u):u=e[7];let p;e[8]!==c||e[9]!==d||e[10]!==u?(p=n.jsx(pe,{children:n.jsx(oe,{children:n.jsxs(Ae,{className:"h-6 cursor-pointer select-none",onClick:c,children:[d,u]})})}),e[8]=c,e[9]=d,e[10]=u,e[11]=p):p=e[11];let x;e[12]!==r||e[13]!==i?(x=i&&n.jsx(Te,{children:n.jsx(pe,{className:"gap-0.5",children:r})}),e[12]=r,e[13]=i,e[14]=x):x=e[14];let h;return e[15]!==p||e[16]!==x?(h=n.jsxs(Pe,{className:"py-0",children:[p,x]}),e[15]=p,e[16]=x,e[17]=h):h=e[17],h}function Zt(t){const e=N.c(13),{item:s}=t;let r;e[0]!==s.icon?(r=n.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:s.icon}),e[0]=s.icon,e[1]=r):r=e[1];let l;e[2]!==s.label?(l=n.jsx("span",{className:"truncate",children:s.label}),e[2]=s.label,e[3]=l):l=e[3];let o;e[4]!==s.isActive||e[5]!==s.label||e[6]!==s.onClick||e[7]!==r||e[8]!==l?(o=n.jsxs(Ae,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:s.onClick,isActive:s.isActive,tooltip:s.label,children:[r,l]}),e[4]=s.isActive,e[5]=s.label,e[6]=s.onClick,e[7]=r,e[8]=l,e[9]=o):o=e[9];let i;return e[10]!==s.key||e[11]!==o?(i=n.jsx(oe,{children:o},s.key),e[10]=s.key,e[11]=o,e[12]=i):i=e[12],i}function Sn(t){const e=N.c(12),{section:s}=t;switch(s.type){case"divider":{let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ct,{className:"my-2"}),e[0]=r):r=e[0],r}case"spacer":{let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("div",{className:"flex-1"}),e[1]=r):r=e[1],r}case"group":{const r=s.group.label,l=s.group.defaultExpanded;let o;e[2]!==s.group.items?(o=s.group.items.map(wn),e[2]=s.group.items,e[3]=o):o=e[3];let i;return e[4]!==s.group.defaultExpanded||e[5]!==s.group.label||e[6]!==o?(i=n.jsx(Nn,{label:r,defaultExpanded:l,children:o}),e[4]=s.group.defaultExpanded,e[5]=s.group.label,e[6]=o,e[7]=i):i=e[7],i}case"items":{let r;e[8]!==s.items?(r=s.items.map(yn),e[8]=s.items,e[9]=r):r=e[9];let l;return e[10]!==r?(l=n.jsx(Pe,{className:"py-0",children:n.jsx(Te,{children:n.jsx(pe,{className:"gap-0.5",children:r})})}),e[10]=r,e[11]=l):l=e[11],l}}}function yn(t){return n.jsx(Zt,{item:t},t.key)}function wn(t){return n.jsx(Zt,{item:t},t.key)}function Yt(t){const e=N.c(14),{sections:s,header:r,footer:l,additionalContent:o,variant:i,collapsible:a,contentClassName:c}=t,d=i===void 0?"sidebar":i,m=a===void 0?"icon":a;let f;e[0]!==c?(f=z("flex flex-col flex-1 overflow-x-hidden font-medium border-r pb-2",c),e[0]=c,e[1]=f):f=e[1];let u;e[2]!==s?(u=s.map(Cn),e[2]=s,e[3]=u):u=e[3];let p;e[4]!==o||e[5]!==f||e[6]!==u?(p=n.jsxs(bn,{className:f,children:[u,o]}),e[4]=o,e[5]=f,e[6]=u,e[7]=p):p=e[7];let x;return e[8]!==m||e[9]!==l||e[10]!==r||e[11]!==p||e[12]!==d?(x=n.jsxs(hn,{variant:d,collapsible:m,children:[r,p,l]}),e[8]=m,e[9]=l,e[10]=r,e[11]=p,e[12]=d,e[13]=x):x=e[13],x}function Cn(t,e){return n.jsx(Sn,{section:t},e)}Yt.Skeleton=function(){return n.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,s)=>n.jsx("div",{className:"w-full h-8",children:n.jsx(te,{className:"h-full bg-sidebar-accent rounded-md"})},s))})};const kn="w-full h-8 justify-start gap-2 px-2 text-sm font-[450] text-sidebar-foreground hover:text-sidebar-foreground hover:bg-sidebar-accent active:bg-sidebar-accent/75 [&>svg]:size-[18px] [&>svg]:text-muted-foreground hover:[&>svg]:text-sidebar-foreground";function Ie(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z(kn,s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx(se,{variant:"ghost",size:"sm",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function _n({invitation:t,onStatusChange:e}){const[s,r]=w.useState(!1),[l,o]=w.useState(!1),i=xe(),a=async()=>{r(!0);try{const p=await ie.organization.acceptInvitation({invitationId:t.id});if(p.error)de.error(p.error.message),r(!1);else{e(t.id,"accepted");const x=await ie.organization.setActive({organizationId:t.organizationId});x?.data?.slug?(de.success("Invitation accepted!"),i({to:"/$org",params:{org:x.data.slug}})):(de.success("Invitation accepted! Redirecting..."),i({to:"/"}))}}catch{de.error("Failed to accept invitation"),r(!1)}},c=async()=>{o(!0);try{const p=await ie.organization.rejectInvitation({invitationId:t.id});p.error?(de.error(p.error.message),o(!1)):(de.success("Invitation rejected"),e(t.id,"rejected"),o(!1))}catch{de.error("Failed to reject invitation"),o(!1)}},d=t.organizationName||t.organizationId,m=t.status==="pending",f=t.status==="accepted",u=t.status==="rejected";return n.jsxs("div",{className:z("flex items-center gap-3 px-3 py-2 h-12 border-b border-border/50 last:border-b-0",!m&&"opacity-50"),children:[n.jsx("div",{className:"shrink-0 size-5 flex items-center justify-center",children:n.jsx(Wt,{size:16,className:"text-muted-foreground"})}),n.jsxs("p",{className:"flex-1 text-sm text-foreground min-w-0 whitespace-nowrap overflow-hidden",children:["You have been invited to ",n.jsx("span",{className:"font-semibold inline-block max-w-[200px] truncate align-bottom",children:d})]}),n.jsx("div",{className:"flex items-center gap-1 shrink-0",children:m?n.jsxs(n.Fragment,{children:[n.jsx(se,{variant:"ghost",size:"icon",onClick:c,disabled:s||l,className:"h-8 w-8",children:n.jsx(ut,{size:14})}),n.jsx(se,{variant:"outline",size:"icon",onClick:a,disabled:s||l,className:"h-8 w-8",children:n.jsx(Oe,{size:14})})]}):f?n.jsxs(ft,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx(Oe,{size:12}),"Accepted"]}):u?n.jsxs(ft,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx(ut,{size:12}),"Declined"]}):null})]})}function zn(){const[t,e]=w.useState(!1),s=w.useContext(as),{data:r}=s.hooks.useListUserInvitations(),{data:l}=ie.useListOrganizations(),[o,i]=w.useState({}),m=(r??[]).filter(h=>new Date(h.expiresAt)>new Date).map(h=>{const j=(l??[]).find(b=>b.id===h.organizationId);return{...h,organizationSlug:j?.slug||h.organizationSlug,organizationName:j?.name||h.organizationName}}).map(h=>({...h,status:o[h.id]||h.status})),f=[...m].sort((h,j)=>{const b={pending:0,accepted:1,rejected:2};return(b[h.status]??999)-(b[j.status]??999)}),p=m.filter(h=>h.status==="pending").length>0,x=(h,j)=>{i(b=>({...b,[h]:j}))};return n.jsxs(lt,{open:t,onOpenChange:e,children:[n.jsx(ot,{asChild:!0,children:n.jsxs(Ie,{children:[n.jsx(mt,{size:18}),"Inbox",p&&n.jsx("span",{className:"ml-auto h-2 w-2 rounded-full bg-destructive"})]})}),n.jsxs(it,{side:"right",align:"start",className:"w-[400px] p-0 overflow-hidden",children:[n.jsx("div",{className:"px-4 py-3 border-b border-border",children:n.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Inbox"})}),n.jsx("div",{className:"max-h-96 overflow-auto",children:f.length>0?f.map(h=>n.jsx(_n,{invitation:h,onStatusChange:x},h.id)):n.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[n.jsx(mt,{size:32,className:"text-muted-foreground/40 mb-2"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"No invitations at the moment"})]})})]})]})}function $n(t){const e=N.c(29),{user:s,userImage:r,onOpenSettings:l}=t;let o;e[0]!==s?(o=async()=>{if(!s)return;const _=`ID: ${s.id}
1
+ import{r as w,c as N,j as n,u as ae,m as xe,bz as We,L as ze,bv as rs,bI as ls,O as ee,I as gt,v as os,y as is,g as ie,t as de,b6 as as,bJ as jt,a as tt,bK as cs,bp as bt,bL as $e,A as ds,S as vt,b as ms,e as fs,N as us,n as ps,K as xs,l as Nt,P as hs}from"./index-B29giag9.js";import{C as le,i as gs}from"./index-BCTs9n6O.js";import{I as js}from"./integration-icon-ByKWru2D.js";import{P as _e}from"./index-CwR6GYR2.js";import{e as Ve,u as bs,S as te,g as St,C as vs,f as Ns,h as Ss}from"./use-deco-chat-open-B0b2QgDS.js";import{c as z,B as se}from"./button-D-PerQqC.js";import{d as ys}from"./constants-CH9byiKA.js";import{T as ws,i as Cs,b as ks,S as _s,c as zs,d as $s,e as Is,f as Os,t as yt}from"./typewriter-title-cc0Pz_LM.js";import{s as Ke}from"./Plus-q5YWe4us.js";import{t as wt}from"./Users03-C_ymlzx3.js";import{i as He}from"./X-BofIsacr.js";import{E as Ct}from"./error-boundary-8guJh7VT.js";import{C as kt}from"./create-project-dialog-Yqgc0Gmy.js";import{u as st,L as nt}from"./localstorage-keys-CwGoMvvj.js";import{n as _t}from"./CheckDone01-CDAeIQ63.js";import{n as Ps}from"./Container-CMQiv6Ns.js";import{e as dt}from"./Dataflow03-CJHUSZDC.js";import{a as Ts}from"./Home02-9-Cl82ip.js";import{u as Es,a as zt}from"./use-project-DY_ihdkL.js";import{u as Ee}from"./use-mobile-DcwTOp-X.js";import{a as Ue,c as $t,T as Be,b as Fe}from"./tooltip-D-FT-fCa.js";import{t as rt}from"./ChevronDown-BrnUqul2.js";import{A as me}from"./avatar-DbtnoOEU.js";import{b as lt,P as ot,a as it}from"./popover-Bq8aZ27v.js";import{n as mt}from"./Inbox01-_QG6HIJd.js";import{B as ft}from"./badge-D_aixLlt.js";import{i as Oe}from"./Check-DVZrDl7E.js";import{s as ut}from"./XClose-B9jvydA5.js";import{i as It}from"./ChevronRight-lTpPQGwH.js";import{a as at}from"./Settings02-ZV7r5q4D.js";import{C as Ot}from"./create-organization-dialog-DBHZfDPt.js";import{c as As,b as Ms,g as Ls,a as Ds,D as Rs}from"./dialog-CFptoDdD.js";import{L as qe}from"./label-BN7IWnf6.js";import{S as Je}from"./switch-Bi5F4S-5.js";import{i as Hs}from"./Code01-CgOGThgh.js";import{a as Pt}from"./Copy01-CMA5_oKx.js";import{u as Tt,a as Us}from"./use-organization-settings-6xOluKFM.js";import{i as Bs}from"./File06-CyuQ1kk7.js";import{I as Fs}from"./input-Cxci79To.js";import{c as Ws}from"./Grid01-BB6GzE_H.js";import{a as Vs,T as Ks}from"./topbar-portal-IUe4pf8g.js";import{a as Gs,b as Zs,D as Ys,c as qs,g as pt}from"./dropdown-menu-C8QhWQVm.js";import{i as Js}from"./Globe01-S1shXduq.js";import{n as xt}from"./LinkExternal01-B7R1mSP2.js";import{t as Xs}from"./Settings01-K_PXf5Q7.js";import{R as Qs,a as Et,b as en}from"./resizable-DfSFqzWY.js";import"./spinner-BstVffOp.js";import"./use-mcp-prompts-BMZQCyj7.js";import"./useQuery-BO0TdkAU.js";import"./form-CtFhf1V_.js";import"./ArrowUp-Cf0ZCNqn.js";import"./Edit01-CN-BVNm7.js";import"./use-copy-BNoj9l5V.js";import"./AlertCircle-4DBdKyiN.js";import"./ArrowLeft-BbUXsmjT.js";import"./use-virtual-mcp-IiP1g_wm.js";import"./use-connection-DrWeJHXu.js";import"./useMutation-WNJB1RXH.js";import"./SearchMd-hERLZOdx.js";import"./use-create-virtual-mcp-DhPfPD_b.js";import"./usage-B8eRkRZY.js";import"./marked.esm-BaswSlok.js";import"./empty-state-DoBcZdM-.js";import"./generate-id-Dyweu44Y.js";import"./Clock-BpIUYvY9.js";import"./Trash01-Dk9pv506.js";import"./use-llm-DjYTM2HW.js";import"./use-binding-B7W2mOcc.js";import"./binder-BeHB3-7Y.js";import"./select-D6oaQfJS.js";import"./index-V777tuW4.js";import"./Image01-Bllq3U2e.js";import"./RefreshCcw01-DRWlmqw5.js";import"./useSuspenseInfiniteQuery-DfH90Jor.js";import"./infiniteQueryObserver-Dzcc9UjY.js";import"./textarea-DhETf1og.js";import"./alert-dialog-Cl76sYVz.js";const Xe=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"M7 17 17 7m0 0H7m10 0v10"}));Xe.displayName="ArrowUpRight";const At=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.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"}));At.displayName="BarChart10";const Mt=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"m12 21-.1-.15c-.695-1.042-1.042-1.563-1.5-1.94a4 4 0 0 0-1.378-.737C8.453 18 7.827 18 6.575 18H5.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C2 16.48 2 15.92 2 14.8V6.2c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C3.52 3 4.08 3 5.2 3h.4c2.24 0 3.36 0 4.216.436a4 4 0 0 1 1.748 1.748C12 6.04 12 7.16 12 9.4M12 21V9.4M12 21l.1-.15c.695-1.042 1.042-1.563 1.5-1.94a3.999 3.999 0 0 1 1.378-.737C15.547 18 16.173 18 17.425 18H18.8c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 16.48 22 15.92 22 14.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 3 19.92 3 18.8 3h-.4c-2.24 0-3.36 0-4.216.436a4 4 0 0 0-1.748 1.748C12 6.04 12 7.16 12 9.4"}));Mt.displayName="BookOpen01";const Lt=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.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"}));Lt.displayName="Building02";const Dt=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"m18 17-5-5 5-5m-7 10-5-5 5-5"}));Dt.displayName="ChevronLeftDouble";const Rt=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"m6 17 5-5-5-5m7 10 5-5-5-5"}));Rt.displayName="ChevronRightDouble";const Ht=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.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"}));Ht.displayName="FaceSmile";const Ut=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"M15 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3Z"}));Ut.displayName="LayoutRight";const Bt=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.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"}));Bt.displayName="LogOut01";const Ft=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"m16 17 5-5m0 0-5-5m5 5H9m3 5c0 .93 0 1.395-.102 1.776a3 3 0 0 1-2.122 2.122C9.395 21 8.93 21 8 21h-.5c-1.398 0-2.097 0-2.648-.228a3 3 0 0 1-1.624-1.624C3 18.597 3 17.898 3 16.5v-9c0-1.398 0-2.097.228-2.648a3 3 0 0 1 1.624-1.624C5.403 3 6.102 3 7.5 3H8c.93 0 1.395 0 1.776.102a3 3 0 0 1 2.122 2.122C12 5.605 12 6.07 12 7"}));Ft.displayName="LogOut02";const Wt=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"m2 7 8.165 5.715c.661.463.992.695 1.351.784a2 2 0 0 0 .968 0c.36-.09.69-.32 1.351-.784L22 7M6.8 20h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 17.72 22 16.88 22 15.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 4 18.88 4 17.2 4H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 6.28 2 7.12 2 8.8v6.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 20 5.12 20 6.8 20Z"}));Wt.displayName="Mail01";const Vt=({size:t=24,color:e="currentColor",...s})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},w.createElement("path",{d:"M3 8h12m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0Zm-6 8h12M9 16a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}));Vt.displayName="Settings04";function tn(){const t=N.c(65),{org:e}=ae(),[,s]=Ve(),{selectedVirtualMcp:r,modelsConnections:l,isChatEmpty:o,activeThreadId:i,createThread:a,switchToThread:c,threads:d}=bs();let m;if(t[0]!==i||t[1]!==d){let K;t[3]!==i?(K=G=>G.id===i,t[3]=i,t[4]=K):K=t[4],m=d.find(K),t[0]=i,t[1]=d,t[2]=m}else m=t[2];const f=m,[u,p]=w.useState(!1),[x,h]=w.useTransition();let j;t[5]!==e.id?(j=ys(e.id),t[5]=e.id,t[6]=j):j=t[6];const g=r??j;let v;t[7]!==a?(v=()=>{h(()=>{a()})},t[7]=a,t[8]=v):v=t[8];const S=v;if(l.length===0){let K;t[9]===Symbol.for("react.memo_cache_sentinel")?(K=n.jsx(_e.Header.Left,{className:"gap-2"}),t[9]=K):K=t[9];let G;t[10]!==s?(G=()=>s(!1),t[10]=s,t[11]=G):G=t[11];let X;t[12]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx(He,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[12]=X):X=t[12];let Y;t[13]!==G?(Y=n.jsxs(_e.Header,{className:"flex-none",children:[K,n.jsx(_e.Header.Right,{className:"gap-1",children:n.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:X})})]}),t[13]=G,t[14]=Y):Y=t[14];let O;t[15]!==e?(O=n.jsx(le.Main,{className:"flex flex-col items-center",children:n.jsx(le.EmptyState,{children:n.jsx(le.NoLlmBindingEmptyState,{title:"No model provider connected",description:"Connect to a model provider to unlock AI-powered features.",org:e})})}),t[15]=e,t[16]=O):O=t[16];let L;return t[17]!==Y||t[18]!==O?(L=n.jsxs(le,{children:[Y,O]}),t[17]=Y,t[18]=O,t[19]=L):L=t[19],L}const C=u?"duration-300 opacity-0 -translate-x-4 pointer-events-none":x?"duration-200 opacity-0 pointer-events-none":"duration-300 opacity-100 translate-x-0";let y;t[20]!==C?(y=z("absolute inset-0 flex flex-col transition-all ease-in-out",C),t[20]=C,t[21]=y):y=t[21];let _;t[22]!==f||t[23]!==o?(_=!o&&f?.title&&n.jsx(ws,{text:f.title,className:"text-sm font-medium text-foreground"}),t[22]=f,t[23]=o,t[24]=_):_=t[24];let P;t[25]!==_?(P=n.jsx(_e.Header.Left,{className:"gap-2",children:_}),t[25]=_,t[26]=P):P=t[26];let k;t[27]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(Ke,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[27]=k):k=t[27];let $;t[28]!==S||t[29]!==x?($=n.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:k}),t[28]=S,t[29]=x,t[30]=$):$=t[30];let I;t[31]===Symbol.for("react.memo_cache_sentinel")?(I=()=>p(!0),t[31]=I):I=t[31];let E;t[32]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx("button",{type:"button",onClick:I,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"Chat history",children:n.jsx(Cs,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})}),t[32]=E):E=t[32];let T;t[33]!==s?(T=()=>s(!1),t[33]=s,t[34]=T):T=t[34];let B;t[35]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsx(He,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[35]=B):B=t[35];let A;t[36]!==T?(A=n.jsx("button",{type:"button",onClick:T,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:B}),t[36]=T,t[37]=A):A=t[37];let D;t[38]!==A||t[39]!==$?(D=n.jsxs(_e.Header.Right,{className:"gap-1",children:[$,E,A]}),t[38]=A,t[39]=$,t[40]=D):D=t[40];let R;t[41]!==D||t[42]!==P?(R=n.jsxs(_e.Header,{className:"flex-none",children:[P,D]}),t[41]=D,t[42]=P,t[43]=R):R=t[43];let M;t[44]!==g||t[45]!==o?(M=n.jsx(le.Main,{children:o?n.jsx(le.EmptyState,{children:n.jsxs("div",{className:"flex flex-col items-center gap-6 w-full px-4",children:[n.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 p-0 text-center",children:[n.jsx(js,{icon:g.icon,name:g.title,size:"lg",fallbackIcon:n.jsx(wt,{size:32}),className:"size-[60px]! rounded-[18px]!"}),n.jsx("h3",{className:"text-xl font-medium text-foreground",children:g.title}),n.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:g.description??"Ask anything about configuring model providers or using MCP Mesh."})]}),n.jsx(le.IceBreakers,{})]})}):n.jsx(le.Messages,{})}),t[44]=g,t[45]=o,t[46]=M):M=t[46];let H;t[47]===Symbol.for("react.memo_cache_sentinel")?(H=n.jsx(le.Footer,{children:n.jsx(le.Input,{})}),t[47]=H):H=t[47];let F;t[48]!==R||t[49]!==M||t[50]!==y?(F=n.jsxs("div",{className:y,children:[R,M,H]}),t[48]=R,t[49]=M,t[50]=y,t[51]=F):F=t[51];const U=u?"opacity-100 translate-x-0":"opacity-0 translate-x-4 pointer-events-none";let W;t[52]!==U?(W=z("absolute inset-0 flex flex-col transition-all duration-300 ease-in-out",U),t[52]=U,t[53]=W):W=t[53];let V;t[54]===Symbol.for("react.memo_cache_sentinel")?(V=()=>p(!1),t[54]=V):V=t[54];let Z;t[55]!==i||t[56]!==c||t[57]!==d?(Z=n.jsx(ks,{threads:d,activeThreadId:i,onThreadSelect:c,onClose:V}),t[55]=i,t[56]=c,t[57]=d,t[58]=Z):Z=t[58];let q;t[59]!==W||t[60]!==Z?(q=n.jsx("div",{className:W,children:Z}),t[59]=W,t[60]=Z,t[61]=q):q=t[61];let J;return t[62]!==F||t[63]!==q?(J=n.jsxs(le,{className:"relative overflow-hidden",children:[F,q]}),t[62]=F,t[63]=q,t[64]=J):J=t[64],J}function sn(){const t=N.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(le.Skeleton,{}),t[0]=e):e=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(Ct,{fallback:e,children:n.jsx(w.Suspense,{fallback:n.jsx(le.Skeleton,{}),children:n.jsx(tn,{})})}),t[1]=s):s=t[1],s}const nn={devMode:!1,experimental_projects:!1,experimental_tasks:!1};function Ge(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=nt.preferences(),t[0]=e):e=t[0],st(e,nn)}function rn(){const t=N.c(36),[e]=Ge(),{locator:s,org:r}=ae(),l=xe(),o=We(),{org:i,project:a}=ze.parse(s),c=ze.isOrgAdminProject(s),{data:d}=Es(r.id,a);let m;t[0]!==d?.enabledPlugins?(m=d?.enabledPlugins??[],t[0]=d?.enabledPlugins,t[1]=m):m=t[1];const f=m;let u;t[2]!==f?(u=O=>f.includes(O.pluginId),t[2]=f,t[3]=u):u=t[3];const p=rs.filter(u),x=o.location.pathname===`/${i}/${a}`||o.location.pathname===`/${i}/${a}/`;let h;t[4]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Ts,{}),t[4]=h):h=t[4];const j={key:"home",label:"Home",icon:h,onClick:()=>{x?window.dispatchEvent(new CustomEvent("reset-home-view")):l({to:"/$org/$project",params:{org:i,project:a}})}};let b;t[5]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(_t,{}),t[5]=b):b=t[5];const g={key:"tasks",label:"Tasks",icon:b,onClick:()=>l({to:"/$org/$project/tasks",params:{org:i,project:ee}})};let v;t[6]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(Ps,{}),t[6]=v):v=t[6];const S={key:"mcps",label:"Connections",icon:v,onClick:()=>l({to:"/$org/$project/mcps",params:{org:i,project:ee}})};let C;t[7]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(gt,{}),t[7]=C):C=t[7];const y={key:"projects",label:"Projects",icon:C,onClick:()=>l({to:"/$org/$project/projects",params:{org:i,project:ee}})};let _;t[8]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(Lt,{}),t[8]=_):_=t[8];const P={key:"store",label:"Store",icon:_,onClick:()=>l({to:"/$org/$project/store",params:{org:i,project:ee}})};let k;t[9]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(wt,{}),t[9]=k):k=t[9];const $={key:"agents",label:"Agents",icon:k,onClick:()=>l({to:"/$org/$project/agents",params:{org:i,project:ee}})};let I;t[10]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsx(At,{}),t[10]=I):I=t[10];const E={key:"monitoring",label:"Monitor",icon:I,onClick:()=>l({to:"/$org/$project/monitoring",params:{org:i,project:ee}})};let T;t[11]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(dt,{}),t[11]=T):T=t[11];const B={key:"workflows",label:"Workflows",icon:T,onClick:()=>l({to:"/$org/$project/workflows",params:{org:i,project:ee}})};let A;t[12]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(Ht,{}),t[12]=A):A=t[12];const D={key:"members",label:"Members",icon:A,onClick:()=>l({to:"/$org/$project/members",params:{org:i,project:ee}})},R=[...e.experimental_tasks?[g]:[],S,B,...e.experimental_projects?[y]:[],P,$,E,D],M=p.map(O=>({key:O.pluginId,label:O.label,icon:O.icon,onClick:()=>l({to:"/$org/$project/$pluginId",params:{org:i,project:a,pluginId:O.pluginId}})}));let H;t[13]!==f?(H=O=>f.includes(O.pluginId),t[13]=f,t[14]=H):H=t[14];const U=ls.filter(H).map(O=>({type:"group",group:{id:`${O.pluginId}-${O.id}`,label:O.label,items:O.items.map((L,Q)=>({key:`${O.pluginId}-${O.id}-${Q}`,label:L.label,icon:L.icon,onClick:()=>l({to:"/$org/$project/$pluginId",params:{org:i,project:a,pluginId:O.pluginId}})})),defaultExpanded:O.defaultExpanded??!0}}));if(c){const O=[{type:"items",items:[j,...R]}];if(M.length>0){let L;t[15]===Symbol.for("react.memo_cache_sentinel")?(L={type:"divider"},t[15]=L):L=t[15],O.push(L);let Q;t[16]!==M?(Q={type:"items",items:M},t[16]=M,t[17]=Q):Q=t[17],O.push(Q)}if(U.length>0){if(M.length===0){let L;t[18]===Symbol.for("react.memo_cache_sentinel")?(L={type:"divider"},t[18]=L):L=t[18],O.push(L)}O.push(...U)}return O}let W;t[19]===Symbol.for("react.memo_cache_sentinel")?(W=n.jsx(gs,{}),t[19]=W):W=t[19];let V;t[20]!==l||t[21]!==i||t[22]!==a?(V={key:"tasks",label:"Tasks",icon:W,onClick:()=>l({to:"/$org/$project/tasks",params:{org:i,project:a}})},t[20]=l,t[21]=i,t[22]=a,t[23]=V):V=t[23];const Z=V;let q;t[24]===Symbol.for("react.memo_cache_sentinel")?(q=n.jsx(dt,{}),t[24]=q):q=t[24];let J;t[25]!==l||t[26]!==i||t[27]!==a?(J={key:"workflows",label:"Workflows",icon:q,onClick:()=>l({to:"/$org/$project/workflows",params:{org:i,project:a}})},t[25]=l,t[26]=i,t[27]=a,t[28]=J):J=t[28];const K=J;let G;t[29]!==e.experimental_tasks||t[30]!==Z?(G=e.experimental_tasks?[Z]:[],t[29]=e.experimental_tasks,t[30]=Z,t[31]=G):G=t[31];const Y=[{type:"items",items:[j,...G,K]}];if(M.length>0){let O;t[32]===Symbol.for("react.memo_cache_sentinel")?(O={type:"divider"},t[32]=O):O=t[32],Y.push(O);let L;t[33]!==M?(L={type:"items",items:M},t[33]=M,t[34]=L):L=t[34],Y.push(L)}if(U.length>0){if(M.length===0){let O;t[35]===Symbol.for("react.memo_cache_sentinel")?(O={type:"divider"},t[35]=O):O=t[35],Y.push(O)}Y.push(...U)}return Y}const ln="sidebar_state",on=3600*24*7,an="16rem",cn="18rem",dn="3rem",mn="b",Kt=w.createContext(null);function Ze(){const t=w.useContext(Kt);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function fn(t){const e=N.c(21),{defaultOpen:s,open:r,onOpenChange:l,children:o}=t,i=s===void 0?!0:s,a=Ee(),[c,d]=w.useState(!1),[m,f]=w.useState(i),u=r??m;let p;e[0]!==u||e[1]!==l?(p=P=>{const k=typeof P=="function"?P(u):P;l?l(k):f(k),document.cookie=`${ln}=${k}; path=/; max-age=${on}`},e[0]=u,e[1]=l,e[2]=p):p=e[2];const x=p;let h;e[3]!==a||e[4]!==x?(h=()=>a?d(pn):x(un),e[3]=a,e[4]=x,e[5]=h):h=e[5];const j=h;let b,g;e[6]!==j?(b=()=>{const P=k=>{if(k.key===mn&&(k.metaKey||k.ctrlKey)){const $=k.target;if($.tagName==="INPUT"||$.tagName==="TEXTAREA"||$.isContentEditable)return;k.preventDefault(),j()}};return globalThis.addEventListener("keydown",P),()=>globalThis.removeEventListener("keydown",P)},g=[j],e[6]=j,e[7]=b,e[8]=g):(b=e[7],g=e[8]),w.useEffect(b,g);const v=u?"expanded":"collapsed";let S;e[9]!==a||e[10]!==u||e[11]!==c||e[12]!==x||e[13]!==v||e[14]!==j?(S={state:v,open:u,setOpen:x,isMobile:a,openMobile:c,setOpenMobile:d,toggleSidebar:j},e[9]=a,e[10]=u,e[11]=c,e[12]=x,e[13]=v,e[14]=j,e[15]=S):S=e[15];const C=S;let y;e[16]!==o?(y=n.jsx($t,{delayDuration:0,children:o}),e[16]=o,e[17]=y):y=e[17];let _;return e[18]!==C||e[19]!==y?(_=n.jsx(Kt.Provider,{value:C,children:y}),e[18]=C,e[19]=y,e[20]=_):_=e[20],_}function un(t){return!t}function pn(t){return!t}function xn(t){const e=N.c(14);let s,r,l,o;e[0]!==t?({className:r,style:o,children:s,...l}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o):(s=e[1],r=e[2],l=e[3],o=e[4]);let i;e[5]!==o?(i={"--sidebar-width":an,"--sidebar-width-icon":dn,...o},e[5]=o,e[6]=i):i=e[6];const a=i;let c;e[7]!==r?(c=z("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",r),e[7]=r,e[8]=c):c=e[8];let d;return e[9]!==s||e[10]!==l||e[11]!==a||e[12]!==c?(d=n.jsx("div",{"data-slot":"sidebar-wrapper",style:a,className:c,...l,children:s}),e[9]=s,e[10]=l,e[11]=a,e[12]=c,e[13]=d):d=e[13],d}function hn(t){const e=N.c(46);let s,r,l,o,i,a;e[0]!==t?({side:o,variant:i,collapsible:a,className:r,children:s,...l}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o,e[5]=i,e[6]=a):(s=e[1],r=e[2],l=e[3],o=e[4],i=e[5],a=e[6]);const c=o===void 0?"left":o,d=i===void 0?"sidebar":i,m=a===void 0?"offcanvas":a,{isMobile:f,state:u,openMobile:p,setOpenMobile:x}=Ze();if(m==="none"){let k;e[7]!==r?(k=z("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),e[7]=r,e[8]=k):k=e[8];let $;return e[9]!==s||e[10]!==l||e[11]!==k?($=n.jsx("div",{"data-slot":"sidebar",className:k,...l,children:s}),e[9]=s,e[10]=l,e[11]=k,e[12]=$):$=e[12],$}if(f){let k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k={"--sidebar-width":cn},e[13]=k):k=e[13];let $;e[14]===Symbol.for("react.memo_cache_sentinel")?($=n.jsxs(zs,{className:"sr-only",children:[n.jsx($s,{children:"Sidebar"}),n.jsx(Is,{children:"Displays the mobile sidebar."})]}),e[14]=$):$=e[14];let I;e[15]!==s?(I=n.jsx("div",{className:"flex h-full w-full flex-col",children:s}),e[15]=s,e[16]=I):I=e[16];let E;e[17]!==c||e[18]!==I?(E=n.jsxs(Os,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:k,side:c,children:[$,I]}),e[17]=c,e[18]=I,e[19]=E):E=e[19];let T;return e[20]!==p||e[21]!==l||e[22]!==x||e[23]!==E?(T=n.jsx(_s,{open:p,onOpenChange:x,...l,children:E}),e[20]=p,e[21]=l,e[22]=x,e[23]=E,e[24]=T):T=e[24],T}const h=u==="collapsed"?m:"",j=d==="floating"||d==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let b;e[25]!==j?(b=z("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",j),e[25]=j,e[26]=b):b=e[26];let g;e[27]!==b?(g=n.jsx("div",{"data-slot":"sidebar-gap",className:b}),e[27]=b,e[28]=g):g=e[28];const v=c==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",S=d==="floating"||d==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let C;e[29]!==r||e[30]!==v||e[31]!==S?(C=z("fixed top-12 bottom-0 z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",v,S,r),e[29]=r,e[30]=v,e[31]=S,e[32]=C):C=e[32];let y;e[33]!==s?(y=n.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border pt-2 flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:s}),e[33]=s,e[34]=y):y=e[34];let _;e[35]!==l||e[36]!==C||e[37]!==y?(_=n.jsx("div",{"data-slot":"sidebar-container",className:C,...l,children:y}),e[35]=l,e[36]=C,e[37]=y,e[38]=_):_=e[38];let P;return e[39]!==c||e[40]!==u||e[41]!==_||e[42]!==h||e[43]!==g||e[44]!==d?(P=n.jsxs("div",{className:"group peer text-foreground hidden md:block","data-state":u,"data-collapsible":h,"data-variant":d,"data-side":c,"data-slot":"sidebar",children:[g,_]}),e[39]=c,e[40]=u,e[41]=_,e[42]=h,e[43]=g,e[44]=d,e[45]=P):P=e[45],P}function gn(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("main",{"data-slot":"sidebar-inset",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Gt(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex flex-col gap-2 p-2",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function jn(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex flex-col gap-2 px-2 items-start justify-start",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function ct(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("h-4 m-0! w-full",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-sidebar":"separator",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function bn(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Pe(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Te(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("w-full text-sm",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function pe(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex w-full min-w-0 flex-col gap-1",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function oe(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("group/menu-item relative",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}const vn=is("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg px-2 py-1.5 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding,colors] transition-colors duration-150 ease-out hover:transition-none focus-visible:ring-2 active:bg-sidebar-accent/75 disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent/75 [&>span:last-child]:truncate [&>svg]:size-[18px] [&>svg]:shrink-0 [&>svg]:text-muted-foreground",{variants:{variant:{default:"hover:bg-sidebar-accent text-sidebar-foreground/80 active:text-sidebar-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-7 text-sm font-[450]",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Ae(t){const e=N.c(28);let s,r,l,o,i,a,c;e[0]!==t?({asChild:l,isActive:o,variant:i,size:a,tooltip:c,className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o,e[5]=i,e[6]=a,e[7]=c):(s=e[1],r=e[2],l=e[3],o=e[4],i=e[5],a=e[6],c=e[7]);const d=l===void 0?!1:l,m=o===void 0?!1:o,f=i===void 0?"default":i,u=a===void 0?"default":a,p=d?os:"button",{isMobile:x,state:h}=Ze();let j;e[8]!==s||e[9]!==u||e[10]!==f?(j=z(vn({variant:f,size:u}),s),e[8]=s,e[9]=u,e[10]=f,e[11]=j):j=e[11];let b;e[12]!==p||e[13]!==m||e[14]!==r||e[15]!==u||e[16]!==j?(b=n.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":u,"data-active":m,className:j,...r}),e[12]=p,e[13]=m,e[14]=r,e[15]=u,e[16]=j,e[17]=b):b=e[17];const g=b;if(!c)return g;if(typeof c=="string"){let _;e[18]!==c?(_={children:c},e[18]=c,e[19]=_):_=e[19],c=_}let v;e[20]!==g?(v=n.jsx(Be,{asChild:!0,children:g}),e[20]=g,e[21]=v):v=e[21];const S=h!=="collapsed"||x;let C;e[22]!==S||e[23]!==c?(C=n.jsx(Ue,{side:"right",align:"center",hidden:S,...c}),e[22]=S,e[23]=c,e[24]=C):C=e[24];let y;return e[25]!==v||e[26]!==C?(y=n.jsxs(Fe,{children:[v,C]}),e[25]=v,e[26]=C,e[27]=y):y=e[27],y}function Nn(t){const e=N.c(18),{label:s,children:r,defaultExpanded:l}=t,o=l===void 0?!0:l,[i,a]=w.useState(o);let c;e[0]!==i?(c=()=>a(!i),e[0]=i,e[1]=c):c=e[1];let d;e[2]!==s?(d=n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s}),e[2]=s,e[3]=d):d=e[3];const m=!i&&"-rotate-90";let f;e[4]!==m?(f=z("text-muted-foreground transition-transform duration-200",m),e[4]=m,e[5]=f):f=e[5];let u;e[6]!==f?(u=n.jsx(rt,{size:12,className:f}),e[6]=f,e[7]=u):u=e[7];let p;e[8]!==c||e[9]!==d||e[10]!==u?(p=n.jsx(pe,{children:n.jsx(oe,{children:n.jsxs(Ae,{className:"h-6 cursor-pointer select-none",onClick:c,children:[d,u]})})}),e[8]=c,e[9]=d,e[10]=u,e[11]=p):p=e[11];let x;e[12]!==r||e[13]!==i?(x=i&&n.jsx(Te,{children:n.jsx(pe,{className:"gap-0.5",children:r})}),e[12]=r,e[13]=i,e[14]=x):x=e[14];let h;return e[15]!==p||e[16]!==x?(h=n.jsxs(Pe,{className:"py-0",children:[p,x]}),e[15]=p,e[16]=x,e[17]=h):h=e[17],h}function Zt(t){const e=N.c(13),{item:s}=t;let r;e[0]!==s.icon?(r=n.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:s.icon}),e[0]=s.icon,e[1]=r):r=e[1];let l;e[2]!==s.label?(l=n.jsx("span",{className:"truncate",children:s.label}),e[2]=s.label,e[3]=l):l=e[3];let o;e[4]!==s.isActive||e[5]!==s.label||e[6]!==s.onClick||e[7]!==r||e[8]!==l?(o=n.jsxs(Ae,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:s.onClick,isActive:s.isActive,tooltip:s.label,children:[r,l]}),e[4]=s.isActive,e[5]=s.label,e[6]=s.onClick,e[7]=r,e[8]=l,e[9]=o):o=e[9];let i;return e[10]!==s.key||e[11]!==o?(i=n.jsx(oe,{children:o},s.key),e[10]=s.key,e[11]=o,e[12]=i):i=e[12],i}function Sn(t){const e=N.c(12),{section:s}=t;switch(s.type){case"divider":{let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ct,{className:"my-2"}),e[0]=r):r=e[0],r}case"spacer":{let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("div",{className:"flex-1"}),e[1]=r):r=e[1],r}case"group":{const r=s.group.label,l=s.group.defaultExpanded;let o;e[2]!==s.group.items?(o=s.group.items.map(wn),e[2]=s.group.items,e[3]=o):o=e[3];let i;return e[4]!==s.group.defaultExpanded||e[5]!==s.group.label||e[6]!==o?(i=n.jsx(Nn,{label:r,defaultExpanded:l,children:o}),e[4]=s.group.defaultExpanded,e[5]=s.group.label,e[6]=o,e[7]=i):i=e[7],i}case"items":{let r;e[8]!==s.items?(r=s.items.map(yn),e[8]=s.items,e[9]=r):r=e[9];let l;return e[10]!==r?(l=n.jsx(Pe,{className:"py-0",children:n.jsx(Te,{children:n.jsx(pe,{className:"gap-0.5",children:r})})}),e[10]=r,e[11]=l):l=e[11],l}}}function yn(t){return n.jsx(Zt,{item:t},t.key)}function wn(t){return n.jsx(Zt,{item:t},t.key)}function Yt(t){const e=N.c(14),{sections:s,header:r,footer:l,additionalContent:o,variant:i,collapsible:a,contentClassName:c}=t,d=i===void 0?"sidebar":i,m=a===void 0?"icon":a;let f;e[0]!==c?(f=z("flex flex-col flex-1 overflow-x-hidden font-medium border-r pb-2",c),e[0]=c,e[1]=f):f=e[1];let u;e[2]!==s?(u=s.map(Cn),e[2]=s,e[3]=u):u=e[3];let p;e[4]!==o||e[5]!==f||e[6]!==u?(p=n.jsxs(bn,{className:f,children:[u,o]}),e[4]=o,e[5]=f,e[6]=u,e[7]=p):p=e[7];let x;return e[8]!==m||e[9]!==l||e[10]!==r||e[11]!==p||e[12]!==d?(x=n.jsxs(hn,{variant:d,collapsible:m,children:[r,p,l]}),e[8]=m,e[9]=l,e[10]=r,e[11]=p,e[12]=d,e[13]=x):x=e[13],x}function Cn(t,e){return n.jsx(Sn,{section:t},e)}Yt.Skeleton=function(){return n.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,s)=>n.jsx("div",{className:"w-full h-8",children:n.jsx(te,{className:"h-full bg-sidebar-accent rounded-md"})},s))})};const kn="w-full h-8 justify-start gap-2 px-2 text-sm font-[450] text-sidebar-foreground hover:text-sidebar-foreground hover:bg-sidebar-accent active:bg-sidebar-accent/75 [&>svg]:size-[18px] [&>svg]:text-muted-foreground hover:[&>svg]:text-sidebar-foreground";function Ie(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z(kn,s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx(se,{variant:"ghost",size:"sm",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function _n({invitation:t,onStatusChange:e}){const[s,r]=w.useState(!1),[l,o]=w.useState(!1),i=xe(),a=async()=>{r(!0);try{const p=await ie.organization.acceptInvitation({invitationId:t.id});if(p.error)de.error(p.error.message),r(!1);else{e(t.id,"accepted");const x=await ie.organization.setActive({organizationId:t.organizationId});x?.data?.slug?(de.success("Invitation accepted!"),i({to:"/$org",params:{org:x.data.slug}})):(de.success("Invitation accepted! Redirecting..."),i({to:"/"}))}}catch{de.error("Failed to accept invitation"),r(!1)}},c=async()=>{o(!0);try{const p=await ie.organization.rejectInvitation({invitationId:t.id});p.error?(de.error(p.error.message),o(!1)):(de.success("Invitation rejected"),e(t.id,"rejected"),o(!1))}catch{de.error("Failed to reject invitation"),o(!1)}},d=t.organizationName||t.organizationId,m=t.status==="pending",f=t.status==="accepted",u=t.status==="rejected";return n.jsxs("div",{className:z("flex items-center gap-3 px-3 py-2 h-12 border-b border-border/50 last:border-b-0",!m&&"opacity-50"),children:[n.jsx("div",{className:"shrink-0 size-5 flex items-center justify-center",children:n.jsx(Wt,{size:16,className:"text-muted-foreground"})}),n.jsxs("p",{className:"flex-1 text-sm text-foreground min-w-0 whitespace-nowrap overflow-hidden",children:["You have been invited to ",n.jsx("span",{className:"font-semibold inline-block max-w-[200px] truncate align-bottom",children:d})]}),n.jsx("div",{className:"flex items-center gap-1 shrink-0",children:m?n.jsxs(n.Fragment,{children:[n.jsx(se,{variant:"ghost",size:"icon",onClick:c,disabled:s||l,className:"h-8 w-8",children:n.jsx(ut,{size:14})}),n.jsx(se,{variant:"outline",size:"icon",onClick:a,disabled:s||l,className:"h-8 w-8",children:n.jsx(Oe,{size:14})})]}):f?n.jsxs(ft,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx(Oe,{size:12}),"Accepted"]}):u?n.jsxs(ft,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx(ut,{size:12}),"Declined"]}):null})]})}function zn(){const[t,e]=w.useState(!1),s=w.useContext(as),{data:r}=s.hooks.useListUserInvitations(),{data:l}=ie.useListOrganizations(),[o,i]=w.useState({}),m=(r??[]).filter(h=>new Date(h.expiresAt)>new Date).map(h=>{const j=(l??[]).find(b=>b.id===h.organizationId);return{...h,organizationSlug:j?.slug||h.organizationSlug,organizationName:j?.name||h.organizationName}}).map(h=>({...h,status:o[h.id]||h.status})),f=[...m].sort((h,j)=>{const b={pending:0,accepted:1,rejected:2};return(b[h.status]??999)-(b[j.status]??999)}),p=m.filter(h=>h.status==="pending").length>0,x=(h,j)=>{i(b=>({...b,[h]:j}))};return n.jsxs(lt,{open:t,onOpenChange:e,children:[n.jsx(ot,{asChild:!0,children:n.jsxs(Ie,{children:[n.jsx(mt,{size:18}),"Inbox",p&&n.jsx("span",{className:"ml-auto h-2 w-2 rounded-full bg-destructive"})]})}),n.jsxs(it,{side:"right",align:"start",className:"w-[400px] p-0 overflow-hidden",children:[n.jsx("div",{className:"px-4 py-3 border-b border-border",children:n.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Inbox"})}),n.jsx("div",{className:"max-h-96 overflow-auto",children:f.length>0?f.map(h=>n.jsx(_n,{invitation:h,onStatusChange:x},h.id)):n.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[n.jsx(mt,{size:32,className:"text-muted-foreground/40 mb-2"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"No invitations at the moment"})]})})]})]})}function $n(t){const e=N.c(29),{user:s,userImage:r,onOpenSettings:l}=t;let o;e[0]!==s?(o=async()=>{if(!s)return;const _=`ID: ${s.id}
2
2
  Name: ${s.name||"N/A"}
3
- Email: ${s.email}`;try{await navigator.clipboard.writeText(_),de.success("User info copied to clipboard")}catch{de.error("Failed to copy user info to clipboard")}},e[0]=s,e[1]=o):o=e[1];const i=o,a=s.name||s.email||"U";let c;e[2]!==a||e[3]!==r?(c=n.jsx(me,{url:r,fallback:a,shape:"circle",size:"sm",className:"size-8 shrink-0"}),e[2]=a,e[3]=r,e[4]=c):c=e[4];const d=s.name||"User";let m;e[5]!==d?(m=n.jsx("span",{className:"text-sm text-sidebar-foreground truncate font-[450]",children:d}),e[5]=d,e[6]=m):m=e[6];let f;e[7]!==s.email?(f=n.jsx("span",{className:"text-xs text-muted-foreground truncate font-normal",children:s.email}),e[7]=s.email,e[8]=f):f=e[8];let u;e[9]!==m||e[10]!==f?(u=n.jsxs("div",{className:"flex flex-col min-w-0 text-left",children:[m,f]}),e[9]=m,e[10]=f,e[11]=u):u=e[11];let p;e[12]!==i||e[13]!==c||e[14]!==u?(p=n.jsxs(se,{variant:"ghost",onClick:i,className:"h-auto p-2 m-1 mb-0 justify-start gap-2 hover:bg-sidebar-accent hover:text-inherit active:bg-sidebar-accent/75",children:[c,u]}),e[12]=i,e[13]=c,e[14]=u,e[15]=p):p=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(zn,{}),e[16]=x):x=e[16];let h;e[17]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Vt,{size:18}),e[17]=h):h=e[17];let j;e[18]!==l?(j=n.jsxs(Ie,{onClick:l,children:[h,"Preferences"]}),e[18]=l,e[19]=j):j=e[19];let b;e[20]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(Ie,{asChild:!0,children:n.jsxs("a",{href:"https://www.decocms.com/terms-of-use",target:"_blank",rel:"noopener noreferrer",children:[n.jsx(Mt,{size:18}),n.jsx("span",{className:"flex-1",children:"Terms & Conditions"}),n.jsx(Xe,{size:14})]})}),e[20]=b):b=e[20];let g;e[21]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(Ie,{asChild:!0,children:n.jsxs("a",{href:"https://github.com/decocms/mesh",target:"_blank",rel:"noopener noreferrer",children:[n.jsx(jt,{className:"size-[18px]"}),n.jsx("span",{className:"flex-1",children:"decocms/mesh"}),n.jsx(Xe,{size:14})]})}),e[21]=g):g=e[21];let v;e[22]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsxs(Ie,{onClick:In,children:[n.jsx(Ft,{size:18}),"Log out"]}),e[22]=v):v=e[22];let S;e[23]!==j?(S=n.jsxs("div",{className:"p-1 flex flex-col",children:[x,j,b,g,v]}),e[23]=j,e[24]=S):S=e[24];let C;e[25]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx("div",{className:"mt-auto px-3 py-2 border-t border-border",children:n.jsxs("span",{className:"text-[11px] text-muted-foreground/75",children:["v","2.96.1"]})}),e[25]=C):C=e[25];let y;return e[26]!==S||e[27]!==p?(y=n.jsx(n.Fragment,{children:n.jsxs("div",{className:"flex flex-col gap-0.5 bg-sidebar min-w-[250px]",children:[p,S,C]})}),e[26]=S,e[27]=p,e[28]=y):y=e[28],y}function In(){return ie.signOut()}function On(t){const e=N.c(26),{org:s,isActive:r,isHovered:l,onClick:o,onSettings:i,onHover:a}=t,c=r,d=l&&!r,m=l&&"bg-accent/50",f=r&&!l&&"bg-accent hover:bg-accent";let u;e[0]!==m||e[1]!==f?(u=z("flex items-center gap-2 w-full justify-start font-normal h-10 px-2 rounded-lg cursor-pointer transition-colors",m,f),e[0]=m,e[1]=f,e[2]=u):u=e[2];let p;e[3]!==o?(p=S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),o?.())},e[3]=o,e[4]=p):p=e[4];let x;e[5]!==a||e[6]!==s.id?(x=()=>a?.(s.id),e[5]=a,e[6]=s.id,e[7]=x):x=e[7];const h=s.logo??void 0;let j;e[8]!==s.name||e[9]!==h?(j=n.jsx(me,{url:h,fallback:s.name,size:"sm",className:"size-6 shrink-0 rounded-md",objectFit:"cover"}),e[8]=s.name,e[9]=h,e[10]=j):j=e[10];let b;e[11]!==s.name?(b=n.jsx("span",{className:"flex-1 text-sm text-foreground truncate text-left min-w-0",children:s.name}),e[11]=s.name,e[12]=b):b=e[12];let g;e[13]!==i||e[14]!==s.name||e[15]!==d||e[16]!==c?(g=i&&c?n.jsx("button",{type:"button","aria-label":`${s.name} settings`,className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:S=>{S.stopPropagation(),i()},children:n.jsx(at,{size:16,className:"text-muted-foreground"})}):d?n.jsx(It,{size:16,className:"text-muted-foreground shrink-0"}):n.jsx("span",{className:"size-5 shrink-0","aria-hidden":"true"}),e[13]=i,e[14]=s.name,e[15]=d,e[16]=c,e[17]=g):g=e[17];let v;return e[18]!==o||e[19]!==u||e[20]!==p||e[21]!==x||e[22]!==j||e[23]!==b||e[24]!==g?(v=n.jsxs("div",{role:"button",tabIndex:0,className:u,onClick:o,onKeyDown:p,onMouseEnter:x,children:[j,b,g]}),e[18]=o,e[19]=u,e[20]=p,e[21]=x,e[22]=j,e[23]=b,e[24]=g,e[25]=v):v=e[25],v}function Pn(t){const e=N.c(34),{currentOrgSlug:s,hoveredOrgId:r,onOrgSelect:l,onOrgSettings:o,onPopoverClose:i,onCreateOrganization:a,onOrgHover:c}=t,{data:d}=ie.useListOrganizations();let m,f,u,p;if(e[0]!==s||e[1]!==r||e[2]!==a||e[3]!==c||e[4]!==l||e[5]!==o||e[6]!==i||e[7]!==d){let j;e[12]!==s?(j=(y,_)=>y.slug===s?-1:_.slug===s?1:y.name.localeCompare(_.name),e[12]=s,e[13]=j):j=e[13];const b=[...d??[]].sort(j);u="flex flex-col min-w-[240px] border-l border-border";let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx("span",{className:"text-xs text-muted-foreground truncate",children:"Your Organizations"}),e[14]=g):g=e[14];let v;e[15]!==a||e[16]!==i?(v=()=>{i(),a()},e[15]=a,e[16]=i,e[17]=v):v=e[17];let S;e[18]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(Ke,{size:16,className:"text-muted-foreground"}),e[18]=S):S=e[18],e[19]!==v?(p=n.jsxs("div",{className:"flex items-center justify-between h-10 px-3 border-b border-border",children:[g,n.jsx(se,{variant:"ghost",size:"icon",className:"size-5",onClick:v,children:S})]}),e[19]=v,e[20]=p):p=e[20],m="flex flex-col gap-0.5 p-1 flex-1 overflow-y-auto";let C;e[21]!==s||e[22]!==r||e[23]!==c||e[24]!==l||e[25]!==o?(C=y=>n.jsx(On,{org:y,isActive:y.slug===s,isHovered:y.id===r,onClick:()=>l(y.slug),onSettings:()=>o(y.slug),onHover:c},y.slug),e[21]=s,e[22]=r,e[23]=c,e[24]=l,e[25]=o,e[26]=C):C=e[26],f=b.map(C),e[0]=s,e[1]=r,e[2]=a,e[3]=c,e[4]=l,e[5]=o,e[6]=i,e[7]=d,e[8]=m,e[9]=f,e[10]=u,e[11]=p}else m=e[8],f=e[9],u=e[10],p=e[11];let x;e[27]!==m||e[28]!==f?(x=n.jsx("div",{className:m,children:f}),e[27]=m,e[28]=f,e[29]=x):x=e[29];let h;return e[30]!==u||e[31]!==p||e[32]!==x?(h=n.jsxs("div",{className:u,children:[p,x]}),e[30]=u,e[31]=p,e[32]=x,e[33]=h):h=e[33],h}function Tn(t){const e=N.c(27),{project:s,isActive:r,onClick:l,onSettings:o}=t,[i,a]=w.useState(!1),c=r||i,d=s.ui?.themeColor??"#3B82F6",m=r&&"bg-accent hover:bg-accent";let f;e[0]!==m?(f=z("flex items-center gap-2 w-full justify-start font-normal h-10 px-2 rounded-lg cursor-pointer transition-colors hover:bg-accent/50",m),e[0]=m,e[1]=f):f=e[1];let u;e[2]!==l?(u=S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),l?.())},e[2]=l,e[3]=u):u=e[3];let p,x;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=()=>a(!0),x=()=>a(!1),e[4]=p,e[5]=x):(p=e[4],x=e[5]);let h;e[6]!==s.name||e[7]!==s.ui||e[8]!==d?(h=s.ui?.icon?n.jsx("img",{src:s.ui.icon,alt:"",className:"size-6 rounded-md object-cover shrink-0"}):n.jsx(me,{fallback:s.name,size:"sm",shape:"square",className:"size-6 shrink-0 rounded-md",style:{backgroundColor:d}}),e[6]=s.name,e[7]=s.ui,e[8]=d,e[9]=h):h=e[9];let j;e[10]!==s.name?(j=n.jsx("span",{className:"flex-1 text-sm text-foreground truncate text-left min-w-0",children:s.name}),e[10]=s.name,e[11]=j):j=e[11];let b;e[12]!==r?(b=r&&n.jsx(Oe,{size:16,className:"text-muted-foreground shrink-0"}),e[12]=r,e[13]=b):b=e[13];let g;e[14]!==r||e[15]!==o||e[16]!==s.name||e[17]!==c?(g=o&&c&&!r?n.jsx("button",{type:"button","aria-label":`${s.name} settings`,className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:S=>{S.stopPropagation(),o()},children:n.jsx(at,{size:16,className:"text-muted-foreground"})}):r?null:n.jsx("span",{className:"size-5 shrink-0","aria-hidden":"true"}),e[14]=r,e[15]=o,e[16]=s.name,e[17]=c,e[18]=g):g=e[18];let v;return e[19]!==l||e[20]!==f||e[21]!==u||e[22]!==h||e[23]!==j||e[24]!==b||e[25]!==g?(v=n.jsxs("div",{role:"button",tabIndex:0,className:f,onClick:l,onKeyDown:u,onMouseEnter:p,onMouseLeave:x,children:[h,j,b,g]}),e[19]=l,e[20]=f,e[21]=u,e[22]=h,e[23]=j,e[24]=b,e[25]=g,e[26]=v):v=e[26],v}function En(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsxs("div",{className:"space-y-1 px-2 py-1",children:[n.jsx(te,{className:"h-10 w-full"}),n.jsx(te,{className:"h-10 w-full"})]}),t[0]=e):e=t[0],e}function An(t){const e=N.c(16),{organizationId:s,currentProjectSlug:r,onProjectSelect:l,onProjectSettings:o,orgSlug:i}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={suspense:!0},e[0]=a):a=e[0];const{data:c}=zt(s,a);let d,m;if(e[1]!==r||e[2]!==l||e[3]!==o||e[4]!==i||e[5]!==c){m=Symbol.for("react.early_return_sentinel");e:{const u=c?.filter(Mn)??[];if(u.length===0){let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx("div",{className:"px-3 py-4 text-center text-sm text-muted-foreground",children:"No projects yet"}),e[8]=x):x=e[8],m=x;break e}let p;e[9]!==r||e[10]!==l||e[11]!==o||e[12]!==i?(p=x=>n.jsx(Tn,{project:x,isActive:r===x.slug,onClick:()=>l(i,x.slug),onSettings:o?()=>o(i,x.slug):void 0},x.id),e[9]=r,e[10]=l,e[11]=o,e[12]=i,e[13]=p):p=e[13],d=u.map(p)}e[1]=r,e[2]=l,e[3]=o,e[4]=i,e[5]=c,e[6]=d,e[7]=m}else d=e[6],m=e[7];if(m!==Symbol.for("react.early_return_sentinel"))return m;let f;return e[14]!==d?(f=n.jsx(n.Fragment,{children:d}),e[14]=d,e[15]=f):f=e[15],f}function Mn(t){return t.slug!==ee}function Ln(t){const e=N.c(17),{organizationId:s,organizationName:r,currentProjectSlug:l,onProjectSelect:o,onProjectSettings:i,onCreateProject:a,orgSlug:c}=t;let d;e[0]!==r?(d=n.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["Projects in ",r]}),e[0]=r,e[1]=d):d=e[1];let m;e[2]!==a?(m=a&&n.jsx("button",{type:"button",className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:a,"aria-label":"Create project",children:n.jsx(Ke,{size:16,className:"text-muted-foreground"})}),e[2]=a,e[3]=m):m=e[3];let f;e[4]!==d||e[5]!==m?(f=n.jsxs("div",{className:"flex items-center justify-between h-10 px-3 border-b border-border",children:[d,m]}),e[4]=d,e[5]=m,e[6]=f):f=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(En,{}),e[7]=u):u=e[7];let p;e[8]!==l||e[9]!==o||e[10]!==i||e[11]!==c||e[12]!==s?(p=n.jsx("div",{className:"flex flex-col gap-0.5 p-1 flex-1 overflow-y-auto",children:n.jsx(w.Suspense,{fallback:u,children:n.jsx(An,{organizationId:s,currentProjectSlug:l,onProjectSelect:o,onProjectSettings:i,orgSlug:c})})}),e[8]=l,e[9]=o,e[10]=i,e[11]=c,e[12]=s,e[13]=p):p=e[13];let x;return e[14]!==f||e[15]!==p?(x=n.jsxs("div",{className:"flex flex-col min-w-[250px] border-l border-border",children:[f,p]}),e[14]=f,e[15]=p,e[16]=x):x=e[16],x}function qt(t){const e=N.c(81),{open:s,onOpenChange:r,user:l,userImage:o}=t,[i,a]=Ge(),[c,d]=w.useState(!1);let m;e[0]!==l.id?(m=()=>{navigator.clipboard.writeText(l.id),d(!0),setTimeout(()=>d(!1),2e3)},e[0]=l.id,e[1]=m):m=e[1];const f=m;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(As,{className:"text-base",children:"Profile Settings"}),e[2]=u):u=e[2];let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsxs(Ms,{className:"px-6 pt-6 pb-4 border-b border-border shrink-0 relative",children:[u,n.jsxs(Ls,{className:"absolute top-1/2 right-4 -translate-y-1/2 cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[n.jsx(He,{size:16}),n.jsx("span",{className:"sr-only",children:"Close"})]})]}),e[3]=p):p=e[3];const x=l.name||"U";let h;e[4]!==x||e[5]!==o?(h=n.jsx(me,{url:o,fallback:x,shape:"circle",size:"xl",className:"h-16 w-16"}),e[4]=x,e[5]=o,e[6]=h):h=e[6];const j=l.name||"User";let b;e[7]!==j?(b=n.jsx("span",{className:"text-base font-medium text-foreground",children:j}),e[7]=j,e[8]=b):b=e[8];let g;e[9]!==l.email?(g=n.jsx("span",{className:"text-sm text-muted-foreground",children:l.email}),e[9]=l.email,e[10]=g):g=e[10];let v;e[11]!==b||e[12]!==g?(v=n.jsxs("div",{className:"flex flex-col gap-1",children:[b,g]}),e[11]=b,e[12]=g,e[13]=v):v=e[13];let S;e[14]!==h||e[15]!==v?(S=n.jsxs("div",{className:"flex items-center gap-4",children:[h,v]}),e[14]=h,e[15]=v,e[16]=S):S=e[16];let C;e[17]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Preferences"}),e[17]=C):C=e[17];let y;e[18]!==a?(y=()=>a(Fn),e[18]=a,e[19]=y):y=e[19];let _;e[20]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[n.jsxs(qe,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[n.jsx(Hs,{size:16,className:"text-muted-foreground"}),"Developer Mode"]}),n.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Show technical details like JSON input/output for tool calls"})]}),e[20]=_):_=e[20];let P;e[21]!==a?(P=fe=>a(ue=>({...ue,devMode:fe})),e[21]=a,e[22]=P):P=e[22];let k;e[23]!==i.devMode||e[24]!==P?(k=n.jsx("div",{onClick:Bn,children:n.jsx(Je,{checked:i.devMode,onCheckedChange:P})}),e[23]=i.devMode,e[24]=P,e[25]=k):k=e[25];let $;e[26]!==y||e[27]!==k?($=n.jsxs("div",{className:"flex flex-col gap-2",children:[C,n.jsxs("button",{type:"button",onClick:y,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[_,k]})]}),e[26]=y,e[27]=k,e[28]=$):$=e[28];let I,E;e[29]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Experimental"}),E=n.jsx("p",{className:"text-xs text-muted-foreground",children:"Experimental features are unstable and may change or stop working at any time."}),e[29]=I,e[30]=E):(I=e[29],E=e[30]);let T;e[31]!==a?(T=()=>a(Un),e[31]=a,e[32]=T):T=e[32];let B;e[33]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[n.jsxs(qe,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[n.jsx(gt,{size:16,className:"text-muted-foreground"}),"Projects"]}),n.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Enable the projects feature in the sidebar"})]}),e[33]=B):B=e[33];let A;e[34]!==a?(A=fe=>a(ue=>({...ue,experimental_projects:fe})),e[34]=a,e[35]=A):A=e[35];let D;e[36]!==i.experimental_projects||e[37]!==A?(D=n.jsx("div",{onClick:Hn,children:n.jsx(Je,{checked:i.experimental_projects,onCheckedChange:A})}),e[36]=i.experimental_projects,e[37]=A,e[38]=D):D=e[38];let R;e[39]!==T||e[40]!==D?(R=n.jsxs("button",{type:"button",onClick:T,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[B,D]}),e[39]=T,e[40]=D,e[41]=R):R=e[41];let M;e[42]!==a?(M=()=>a(Rn),e[42]=a,e[43]=M):M=e[43];let H;e[44]===Symbol.for("react.memo_cache_sentinel")?(H=n.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[n.jsxs(qe,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[n.jsx(_t,{size:16,className:"text-muted-foreground"}),"Tasks"]}),n.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Enable the tasks feature in the sidebar"})]}),e[44]=H):H=e[44];let F;e[45]!==a?(F=fe=>a(ue=>({...ue,experimental_tasks:fe})),e[45]=a,e[46]=F):F=e[46];let U;e[47]!==i.experimental_tasks||e[48]!==F?(U=n.jsx("div",{onClick:Dn,children:n.jsx(Je,{checked:i.experimental_tasks,onCheckedChange:F})}),e[47]=i.experimental_tasks,e[48]=F,e[49]=U):U=e[49];let W;e[50]!==M||e[51]!==U?(W=n.jsxs("button",{type:"button",onClick:M,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[H,U]}),e[50]=M,e[51]=U,e[52]=W):W=e[52];let V;e[53]!==R||e[54]!==W?(V=n.jsxs("div",{className:"flex flex-col gap-2",children:[I,E,R,W]}),e[53]=R,e[54]=W,e[55]=V):V=e[55];let Z;e[56]!==S||e[57]!==$||e[58]!==V?(Z=n.jsxs("div",{className:"p-5 space-y-6 min-h-[225px]",children:[S,$,V]}),e[56]=S,e[57]=$,e[58]=V,e[59]=Z):Z=e[59];let q;e[60]!==l.id?(q=n.jsx("span",{className:"font-mono text-xs",children:l.id}),e[60]=l.id,e[61]=q):q=e[61];let J;e[62]!==c?(J=c?n.jsx(Oe,{size:14,className:"text-green-600"}):n.jsx(Pt,{size:14,className:"opacity-0 group-hover:opacity-100 transition-opacity"}),e[62]=c,e[63]=J):J=e[63];let K;e[64]!==f||e[65]!==q||e[66]!==J?(K=n.jsx(Be,{asChild:!0,children:n.jsxs("button",{type:"button",onClick:f,className:"group flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[q,J]})}),e[64]=f,e[65]=q,e[66]=J,e[67]=K):K=e[67];let G;e[68]===Symbol.for("react.memo_cache_sentinel")?(G=n.jsx(Ue,{side:"top",children:n.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[68]=G):G=e[68];let X;e[69]!==K?(X=n.jsx($t,{children:n.jsxs(Fe,{children:[K,G]})}),e[69]=K,e[70]=X):X=e[70];let Y;e[71]===Symbol.for("react.memo_cache_sentinel")?(Y=n.jsxs("span",{className:"text-xs text-muted-foreground/75",children:["v","2.96.1"]}),e[71]=Y):Y=e[71];let O;e[72]!==X?(O=n.jsxs("div",{className:"border-t border-border px-5 py-4 flex items-center justify-between shrink-0",children:[X,Y]}),e[72]=X,e[73]=O):O=e[73];let L;e[74]!==Z||e[75]!==O?(L=n.jsxs(Ds,{className:"sm:max-w-lg sm:max-h-[85vh] p-0 flex flex-col",closeButtonClassName:"hidden",children:[p,n.jsxs("div",{className:"flex flex-col",children:[Z,O]})]}),e[74]=Z,e[75]=O,e[76]=L):L=e[76];let Q;return e[77]!==r||e[78]!==s||e[79]!==L?(Q=n.jsx(Rs,{open:s,onOpenChange:r,children:L}),e[77]=r,e[78]=s,e[79]=L,e[80]=Q):Q=e[80],Q}function Dn(t){return t.stopPropagation()}function Rn(t){return{...t,experimental_tasks:!t.experimental_tasks}}function Hn(t){return t.stopPropagation()}function Un(t){return{...t,experimental_projects:!t.experimental_projects}}function Bn(t){return t.stopPropagation()}function Fn(t){return{...t,devMode:!t.devMode}}function Jt(t){const e=N.c(77),{isCollapsed:s,variant:r,onCreateProject:l}=t,o=s===void 0?!1:s,i=r===void 0?"light":r,[a]=Ge();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[0]=c):c=e[0];const{org:d,project:m}=tt(c),{data:f}=ie.useListOrganizations(),{data:u}=ie.useSession(),p=xe(),x=i==="dark",j=ae()?.project;let b;e[1]!==d||e[2]!==f?(b=f?.find(ne=>ne.slug===d),e[1]=d,e[2]=f,e[3]=b):b=e[3];const g=b,[v,S]=w.useState(!1),[C,y]=w.useState(!1),[_,P]=w.useState(!1),[k,$]=w.useState(null),I=u?.user,E=I?.image;let T;e[4]!==g||e[5]!==k||e[6]!==f?(T=k?f?.find(ne=>ne.id===k):g,e[4]=g,e[5]=k,e[6]=f,e[7]=T):T=e[7];const B=T;let A;e[8]!==p?(A=ne=>{S(!1),p({to:"/$org/$project/settings",params:{org:ne,project:ee}})},e[8]=p,e[9]=A):A=e[9];const D=A;let R;e[10]!==p?(R=ne=>{S(!1),p({to:"/$org/$project",params:{org:ne,project:ee}})},e[10]=p,e[11]=R):R=e[11];const M=R;let H;e[12]!==p?(H=(ne,Ye)=>{S(!1),p({to:"/$org/$project",params:{org:ne,project:Ye}})},e[12]=p,e[13]=H):H=e[13];const F=H;let U;e[14]!==p?(U=(ne,Ye)=>{S(!1),p({to:"/$org/$project/settings",params:{org:ne,project:Ye}})},e[14]=p,e[15]=U):U=e[15];const W=U;let V;e[16]!==l?(V=l?()=>{S(!1),l()}:void 0,e[16]=l,e[17]=V):V=e[17];const Z=V;let q;e[18]===Symbol.for("react.memo_cache_sentinel")?(q=ne=>{S(ne),ne||$(null)},e[18]=q):q=e[18];const J=q;let K;e[19]!==g?(K=()=>{g&&$(g.id)},e[19]=g,e[20]=K):K=e[20];const G=K,X=x?"hover:bg-zinc-800 text-white":"hover:bg-sidebar-accent",Y=o?"justify-center":"justify-start",O=o?"":"pl-0.5! px-1.5 gap-1.5";let L;e[21]!==X||e[22]!==Y||e[23]!==O?(L=z("h-7 min-w-0 max-w-full",X,Y,O),e[21]=X,e[22]=Y,e[23]=O,e[24]=L):L=e[24];const Q=g?.logo??"",fe=g?.name??"",ue=x&&"border-none";let he;e[25]!==ue?(he=z("shrink-0 rounded-[5px]",ue),e[25]=ue,e[26]=he):he=e[26];let ge;e[27]!==Q||e[28]!==fe||e[29]!==he?(ge=n.jsx(me,{url:Q,fallback:fe,size:"xs",className:he,objectFit:"cover"}),e[27]=Q,e[28]=fe,e[29]=he,e[30]=ge):ge=e[30];let je;e[31]!==g?.name||e[32]!==j||e[33]!==o||e[34]!==x?(je=!o&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"min-w-0 flex-1 text-left",children:x&&j?n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"text-[10px] text-zinc-500 leading-none truncate",children:g?.name??"Select org"}),n.jsx("p",{className:"text-sm text-white font-normal leading-tight mt-0.5 truncate",children:j.name??j.slug})]}):n.jsx("span",{className:"block truncate text-[14px] tracking-[-0.00625rem] font-medium text-foreground",children:g?.name??"Select org"})}),x?n.jsx(St,{className:"size-3 text-zinc-500 shrink-0"}):n.jsx(rt,{className:"size-3.5 text-muted-foreground shrink-0"})]}),e[31]=g?.name,e[32]=j,e[33]=o,e[34]=x,e[35]=je):je=e[35];let be;e[36]!==G||e[37]!==L||e[38]!==ge||e[39]!==je?(be=n.jsx(ot,{asChild:!0,children:n.jsxs(se,{variant:"ghost",size:"sm",onClick:G,className:L,children:[ge,je]})}),e[36]=G,e[37]=L,e[38]=ge,e[39]=je,e[40]=be):be=e[40];let ve;e[41]!==I||e[42]!==E?(ve=I&&n.jsx($n,{user:I,userImage:E,onOpenSettings:()=>{y(!0),S(!1)}}),e[41]=I,e[42]=E,e[43]=ve):ve=e[43];let Me,Le;e[44]===Symbol.for("react.memo_cache_sentinel")?(Me=()=>S(!1),Le=()=>P(!0),e[44]=Me,e[45]=Le):(Me=e[44],Le=e[45]);let Ne;e[46]!==D||e[47]!==M||e[48]!==k||e[49]!==d?(Ne=n.jsx(Pn,{currentOrgSlug:d,hoveredOrgId:k,onOrgSelect:M,onOrgSettings:D,onPopoverClose:Me,onCreateOrganization:Le,onOrgHover:$}),e[46]=D,e[47]=M,e[48]=k,e[49]=d,e[50]=Ne):Ne=e[50];let Se;e[51]!==Z||e[52]!==W||e[53]!==F||e[54]!==B||e[55]!==d||e[56]!==a.experimental_projects||e[57]!==m?(Se=a.experimental_projects&&B&&n.jsx(Ln,{organizationId:B.id,organizationName:B.name,orgSlug:B.slug,currentProjectSlug:B.slug===d?m:void 0,onProjectSelect:F,onProjectSettings:W,onCreateProject:Z}),e[51]=Z,e[52]=W,e[53]=F,e[54]=B,e[55]=d,e[56]=a.experimental_projects,e[57]=m,e[58]=Se):Se=e[58];let ye;e[59]!==ve||e[60]!==Ne||e[61]!==Se?(ye=n.jsxs(it,{align:"start",side:"bottom",className:"p-0 flex w-auto h-88 overflow-hidden",children:[ve,Ne,Se]}),e[59]=ve,e[60]=Ne,e[61]=Se,e[62]=ye):ye=e[62];let we;e[63]!==v||e[64]!==be||e[65]!==ye?(we=n.jsxs(lt,{open:v,onOpenChange:J,children:[be,ye]}),e[63]=v,e[64]=be,e[65]=ye,e[66]=we):we=e[66];let Ce;e[67]!==C||e[68]!==I||e[69]!==E?(Ce=I&&C&&I.email&&n.jsx(qt,{open:C,onOpenChange:y,user:{...I,name:I.name??void 0,email:I.email},userImage:E}),e[67]=C,e[68]=I,e[69]=E,e[70]=Ce):Ce=e[70];let ke;e[71]!==_?(ke=n.jsx(Ot,{open:_,onOpenChange:P}),e[71]=_,e[72]=ke):ke=e[72];let De;return e[73]!==we||e[74]!==Ce||e[75]!==ke?(De=n.jsxs(n.Fragment,{children:[we,Ce,ke]}),e[73]=we,e[74]=Ce,e[75]=ke,e[76]=De):De=e[76],De}Jt.Skeleton=function({variant:e="light"}){const s=e==="dark";return n.jsxs("div",{className:z("flex items-center gap-1.5 h-7 px-1.5 w-full",s&&"text-white"),children:[n.jsx(te,{className:z("size-5 rounded-[5px] shrink-0",s&&"bg-zinc-800")}),n.jsx(te,{className:z("h-3.5 flex-1",s&&"bg-zinc-800")})]})};function Qe(t){const e=N.c(71),{onCreateProject:s}=t,{state:r,toggleSidebar:l}=Ze(),o=r==="collapsed",[i,a]=Ve(),{locator:c}=ae();let d;e[0]!==c?(d=ze.isOrgAdminProject(c),e[0]=c,e[1]=d):d=e[1];const f=!d;let u;e[2]!==a?(u=()=>{a(Wn)},e[2]=a,e[3]=u):u=e[3];const p=u,x=f&&"bg-[#030302] border-b border-zinc-800";let h;e[4]!==x?(h=z("h-12 gap-0 pt-0 border-r",x),e[4]=x,e[5]=h):h=e[5];const j=o&&"group-hover/switcher:opacity-0 group-hover/switcher:pointer-events-none group-hover/switcher:invisible";let b;e[6]!==j?(b=z("w-full min-w-0 transition-opacity",j),e[6]=j,e[7]=b):b=e[7];const g=f?"dark":"light";let v;e[8]!==o||e[9]!==s||e[10]!==g?(v=n.jsx(Jt,{isCollapsed:o,variant:g,onCreateProject:s}),e[8]=o,e[9]=s,e[10]=g,e[11]=v):v=e[11];let S;e[12]!==b||e[13]!==v?(S=n.jsx("div",{className:b,children:v}),e[12]=b,e[13]=v,e[14]=S):S=e[14];const C=f?"hover:bg-zinc-800 text-zinc-400":"hover:bg-sidebar-accent",y=o?"opacity-0 invisible pointer-events-none group-hover/switcher:opacity-100 group-hover/switcher:visible group-hover/switcher:pointer-events-auto":"opacity-0 invisible pointer-events-none";let _;e[15]!==C||e[16]!==y?(_=z("absolute inset-0 m-auto size-7 transition-opacity",C,y),e[15]=C,e[16]=y,e[17]=_):_=e[17];const P=!o,k=f?"text-zinc-400":"text-muted-foreground";let $;e[18]!==k?($=z("size-4 shrink-0",k),e[18]=k,e[19]=$):$=e[19];let I;e[20]!==$?(I=n.jsx(Rt,{className:$}),e[20]=$,e[21]=I):I=e[21];let E;e[22]!==_||e[23]!==P||e[24]!==I||e[25]!==l?(E=n.jsx(se,{variant:"ghost",size:"icon",className:_,onClick:l,"aria-label":"Expand sidebar",disabled:P,children:I}),e[22]=_,e[23]=P,e[24]=I,e[25]=l,e[26]=E):E=e[26];let T;e[27]!==E||e[28]!==S?(T=n.jsxs("div",{className:"group/switcher relative flex items-center justify-center gap-1.5 min-w-0 flex-1 overflow-hidden",children:[S,E]}),e[27]=E,e[28]=S,e[29]=T):T=e[29];const B=o&&"hidden";let A;e[30]!==B?(A=z("flex items-center gap-0.5 shrink-0",B),e[30]=B,e[31]=A):A=e[31];const D=f?"hover:bg-zinc-800 text-zinc-400 hover:text-white":"hover:bg-sidebar-accent";let R;e[32]!==D?(R=z("size-7",D),e[32]=D,e[33]=R):R=e[33];const M=f?"text-zinc-400":"text-muted-foreground";let H;e[34]!==M?(H=z("size-4",M),e[34]=M,e[35]=H):H=e[35];let F;e[36]!==H?(F=n.jsx(Dt,{className:H}),e[36]=H,e[37]=F):F=e[37];let U;e[38]!==o||e[39]!==R||e[40]!==F||e[41]!==l?(U=n.jsx(Be,{asChild:!0,children:n.jsx(se,{variant:"ghost",size:"icon",className:R,onClick:l,"aria-label":"Collapse sidebar",disabled:o,children:F})}),e[38]=o,e[39]=R,e[40]=F,e[41]=l,e[42]=U):U=e[42];let W;e[43]===Symbol.for("react.memo_cache_sentinel")?(W=n.jsx(Ue,{side:"bottom",children:"Collapse sidebar"}),e[43]=W):W=e[43];let V;e[44]!==U?(V=n.jsxs(Fe,{children:[U,W]}),e[44]=U,e[45]=V):V=e[45];let Z;e[46]!==i||e[47]!==f?(Z=z("size-7",f?z("hover:bg-zinc-800 text-zinc-400 hover:text-white",i&&"bg-zinc-800 text-white"):z("hover:bg-sidebar-accent",i&&"bg-sidebar-accent")),e[46]=i,e[47]=f,e[48]=Z):Z=e[48];const q=f?"text-inherit":"text-muted-foreground";let J;e[49]!==q?(J=z(q),e[49]=q,e[50]=J):J=e[50];let K;e[51]!==J?(K=n.jsx(yt,{size:11,className:J}),e[51]=J,e[52]=K):K=e[52];let G;e[53]!==o||e[54]!==Z||e[55]!==K||e[56]!==p?(G=n.jsx(Be,{asChild:!0,children:n.jsx(se,{variant:"ghost",size:"icon",className:Z,onClick:p,"aria-label":"Toggle Decopilot",disabled:o,children:K})}),e[53]=o,e[54]=Z,e[55]=K,e[56]=p,e[57]=G):G=e[57];let X;e[58]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx(Ue,{side:"bottom",children:"Toggle Decopilot"}),e[58]=X):X=e[58];let Y;e[59]!==G?(Y=n.jsxs(Fe,{children:[G,X]}),e[59]=G,e[60]=Y):Y=e[60];let O;e[61]!==A||e[62]!==V||e[63]!==Y?(O=n.jsxs("div",{className:A,children:[V,Y]}),e[61]=A,e[62]=V,e[63]=Y,e[64]=O):O=e[64];let L;e[65]!==T||e[66]!==O?(L=n.jsx(pe,{children:n.jsx(oe,{children:n.jsxs("div",{className:"flex items-center justify-between w-full h-12",children:[T,O]})})}),e[65]=T,e[66]=O,e[67]=L):L=e[67];let Q;return e[68]!==L||e[69]!==h?(Q=n.jsx(Gt,{className:h,children:L}),e[68]=L,e[69]=h,e[70]=Q):Q=e[70],Q}function Wn(t){return!t}Qe.Skeleton=function({isDark:e=!1}){return n.jsx(Gt,{className:z("h-12 gap-0 pt-0",e&&"bg-[#030302] border-b border-zinc-800"),children:n.jsx(pe,{children:n.jsx(oe,{children:n.jsxs("div",{className:"flex items-center justify-between w-full h-12",children:[n.jsxs("div",{className:"flex items-center gap-1.5 min-w-0 flex-1 px-1.5",children:[n.jsx(te,{className:z("size-5 rounded-[5px] shrink-0",e&&"bg-zinc-800")}),n.jsx(te,{className:z("h-3.5 w-16",e&&"bg-zinc-800")})]}),n.jsxs("div",{className:"flex items-center gap-0.5",children:[n.jsx(te,{className:z("size-7 rounded-lg",e&&"bg-zinc-800")}),n.jsx(te,{className:z("size-7 rounded-lg",e&&"bg-zinc-800")})]})]})})})})};function Vn(){const t=N.c(10),{locator:e}=ae(),s=xe(),l=We().location.pathname;let o;t[0]!==l?(o=l.includes("/settings"),t[0]=l,t[1]=o):o=t[1];const i=o;let a;t[2]!==e||t[3]!==s?(a=()=>{s({to:"/$org/$project/settings",params:ze.parse(e)})},t[2]=e,t[3]=s,t[4]=a):a=t[4];const c=a;let d,m;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:n.jsx(at,{})}),m=n.jsx("span",{className:"truncate",children:"Settings"}),t[5]=d,t[6]=m):(d=t[5],m=t[6]);let f;return t[7]!==c||t[8]!==i?(f=n.jsx(jn,{className:"py-2 border-r",children:n.jsx(pe,{children:n.jsx(oe,{children:n.jsxs(Ae,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:c,isActive:i,tooltip:"Settings",children:[d,m]})})})}),t[7]=c,t[8]=i,t[9]=f):f=t[9],f}function Xt(t){const e=N.c(4),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ct,{className:"my-2 -ml-1"}),e[0]=r):r=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(oe,{children:n.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:n.jsx("span",{className:"whitespace-nowrap",children:"Pinned Views"})})}),e[1]=l):l=e[1];let o;return e[2]!==s?(o=n.jsxs(n.Fragment,{children:[r,l,s]}),e[2]=s,e[3]=o):o=e[3],o}function Kn(t){const e=N.c(26),{item:s}=t,r=xe(),{org:l}=ae(),o=Tt(l.id),i=Us(l.id);let a;e[0]!==i.update||e[1]!==s.url||e[2]!==o?.sidebar_items?(a=async()=>{const S=(o?.sidebar_items||[]).filter(C=>C.url!==s.url);await i.update.mutateAsync({sidebar_items:S})},e[0]=i.update,e[1]=s.url,e[2]=o?.sidebar_items,e[3]=a):a=e[3];const c=a;let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=/^https?:\/\/.+/,e[4]=d):d=e[4];let m;e[5]!==s.icon?(m=d.test(s.icon),e[5]=s.icon,e[6]=m):m=e[6];const f=m;let u;e[7]!==s.url||e[8]!==r?(u=()=>{r({to:s.url})},e[7]=s.url,e[8]=r,e[9]=u):u=e[9];const p=s.title;let x;e[10]!==f||e[11]!==s.icon||e[12]!==s.title?(x=n.jsx("div",{className:"flex items-center justify-center shrink-0",children:f?n.jsx("img",{src:s.icon,alt:s.title,className:"h-4 w-4 rounded object-cover"}):n.jsx(Bs,{size:16,className:"text-muted-foreground group-hover/item:text-foreground transition-colors"})}),e[10]=f,e[11]=s.icon,e[12]=s.title,e[13]=x):x=e[13];let h;e[14]!==s.title?(h=s.title.toLocaleLowerCase(),e[14]=s.title,e[15]=h):h=e[15];let j;e[16]!==h?(j=n.jsx("div",{className:"flex-1 min-w-0 flex flex-col items-start",children:n.jsx("span",{className:"truncate text-sm w-full capitalize",children:h})}),e[16]=h,e[17]=j):j=e[17];let b;e[18]!==c?(b=n.jsx(He,{size:16,className:"text-muted-foreground opacity-0 group-hover/item:opacity-50 hover:opacity-100 cursor-pointer",onClick:v=>{v.preventDefault(),v.stopPropagation(),c()}}),e[18]=c,e[19]=b):b=e[19];let g;return e[20]!==s.title||e[21]!==u||e[22]!==x||e[23]!==j||e[24]!==b?(g=n.jsx(oe,{children:n.jsxs(Ae,{className:"w-full pr-2 group/item relative cursor-pointer text-foreground/90 hover:text-foreground",onClick:u,tooltip:p,children:[x,j,b]})}),e[20]=s.title,e[21]=u,e[22]=x,e[23]=j,e[24]=b,e[25]=g):g=e[25],g}function ht(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(oe,{children:n.jsx("div",{className:"flex items-center gap-2 px-4 py-2",children:n.jsx(te,{className:"h-4 flex-1"})})}),t[0]=e):e=t[0],e}function Gn(){const t=N.c(4),{org:e}=ae(),r=Tt(e.id)?.sidebar_items;if(!r?.length)return null;let l;t[0]!==r?(l=r.map(Zn),t[0]=r,t[1]=l):l=t[1];let o;return t[2]!==l?(o=n.jsx(Xt,{children:l}),t[2]=l,t[3]=o):o=t[3],o}function Zn(t){return n.jsx(Kn,{item:t},t.url)}function Yn(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(w.Suspense,{fallback:n.jsxs(Xt,{children:[n.jsx(ht,{}),n.jsx(ht,{})]}),children:n.jsx(Gn,{})}),t[0]=e):e=t[0],e}function qn(t){const e=N.c(11),{project:s}=t,r=s.ui?.themeColor??"#60a5fa";if(s.ui?.icon){let c;return e[0]!==s.ui.icon?(c=n.jsx("img",{src:s.ui.icon,alt:"",className:"size-4 rounded object-cover border border-border/50"}),e[0]=s.ui.icon,e[1]=c):c=e[1],c}let l;e[2]!==r?(l={backgroundColor:r},e[2]=r,e[3]=l):l=e[3];let o;e[4]!==s.name?(o=s.name.charAt(0).toUpperCase(),e[4]=s.name,e[5]=o):o=e[5];let i;e[6]!==o?(i=n.jsx("span",{className:"text-[10px] font-medium text-white",children:o}),e[6]=o,e[7]=i):i=e[7];let a;return e[8]!==l||e[9]!==i?(a=n.jsx("div",{className:"size-4 rounded flex items-center justify-center border border-border/50",style:l,children:i}),e[8]=l,e[9]=i,e[10]=a):a=e[10],a}function Jn(t){const e=N.c(14),{project:s}=t,r=xe(),{org:l}=ae();let o;e[0]!==r||e[1]!==l.slug||e[2]!==s.slug?(o=()=>{r({to:"/$org/$project",params:{org:l.slug,project:s.slug}})},e[0]=r,e[1]=l.slug,e[2]=s.slug,e[3]=o):o=e[3];let i;e[4]!==s?(i=n.jsx(qn,{project:s}),e[4]=s,e[5]=i):i=e[5];let a;e[6]!==s.name?(a=n.jsx("span",{className:"truncate flex-1",children:s.name}),e[6]=s.name,e[7]=a):a=e[7];let c;e[8]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(It,{size:12,className:"text-muted-foreground opacity-0 group-hover/item:opacity-100 transition-opacity"}),e[8]=c):c=e[8];let d;return e[9]!==s.name||e[10]!==o||e[11]!==i||e[12]!==a?(d=n.jsx(oe,{children:n.jsxs(Ae,{className:"group/item cursor-pointer text-foreground/90 hover:text-foreground",onClick:o,tooltip:s.name,children:[i,a,c]})}),e[9]=s.name,e[10]=o,e[11]=i,e[12]=a,e[13]=d):d=e[13],d}function Xn(){const t=N.c(54),{org:e}=ae(),{data:s,isLoading:r}=zt(e.id),[l,o]=w.useState(!0),[i,a]=w.useState(!1);let c,d,m,f,u,p,x,h,j,b,g,v,S;if(t[0]!==r||t[1]!==l||t[2]!==s){S=Symbol.for("react.early_return_sentinel");e:{const E=s?.filter(er)??[];if(r){let H;t[16]===Symbol.for("react.memo_cache_sentinel")?(H=n.jsx(oe,{children:n.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[n.jsx(te,{className:"h-4 w-4 rounded"}),n.jsx(te,{className:"h-4 flex-1"})]})}),t[16]=H):H=t[16];let F;t[17]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsx(Pe,{className:"py-0",children:n.jsx(Te,{children:n.jsxs(pe,{className:"gap-0.5",children:[H,n.jsx(oe,{children:n.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[n.jsx(te,{className:"h-4 w-4 rounded"}),n.jsx(te,{className:"h-4 flex-1"})]})})]})})}),t[17]=F):F=t[17],S=F;break e}t[18]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(ct,{className:"my-2"}),t[18]=v):v=t[18],u=vs,b=l,g=o,f=Pe,j="py-0",m=Te,d=pe,x="gap-0.5";let T;t[19]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx("span",{children:"Projects"}),t[19]=T):T=t[19];const B=!l&&"-rotate-90";let A;t[20]!==B?(A=z("transition-transform",B),t[20]=B,t[21]=A):A=t[21];let D;t[22]!==A?(D=n.jsx(Ns,{asChild:!0,children:n.jsxs("button",{type:"button",className:"flex items-center gap-1 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors",children:[T,n.jsx(rt,{size:12,className:A})]})}),t[22]=A,t[23]=D):D=t[23];let R;t[24]===Symbol.for("react.memo_cache_sentinel")?(R=()=>a(!0),t[24]=R):R=t[24];let M;t[25]===Symbol.for("react.memo_cache_sentinel")?(M=n.jsx("button",{type:"button",onClick:R,className:"text-muted-foreground hover:text-foreground transition-colors p-0.5 rounded hover:bg-accent",title:"Create new project",children:n.jsx(Ke,{size:16})}),t[25]=M):M=t[25],t[26]!==D?(h=n.jsx(oe,{children:n.jsxs("div",{className:"flex items-center justify-between px-2 h-6",children:[D,M]})}),t[26]=D,t[27]=h):h=t[27],c=Ss,p=E.length===0?n.jsx(oe,{children:n.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:"No projects yet"})}):E.map(Qn)}t[0]=r,t[1]=l,t[2]=s,t[3]=c,t[4]=d,t[5]=m,t[6]=f,t[7]=u,t[8]=p,t[9]=x,t[10]=h,t[11]=j,t[12]=b,t[13]=g,t[14]=v,t[15]=S}else c=t[3],d=t[4],m=t[5],f=t[6],u=t[7],p=t[8],x=t[9],h=t[10],j=t[11],b=t[12],g=t[13],v=t[14],S=t[15];if(S!==Symbol.for("react.early_return_sentinel"))return S;let C;t[28]!==c||t[29]!==p?(C=n.jsx(c,{children:p}),t[28]=c,t[29]=p,t[30]=C):C=t[30];let y;t[31]!==d||t[32]!==x||t[33]!==h||t[34]!==C?(y=n.jsxs(d,{className:x,children:[h,C]}),t[31]=d,t[32]=x,t[33]=h,t[34]=C,t[35]=y):y=t[35];let _;t[36]!==m||t[37]!==y?(_=n.jsx(m,{children:y}),t[36]=m,t[37]=y,t[38]=_):_=t[38];let P;t[39]!==f||t[40]!==_||t[41]!==j?(P=n.jsx(f,{className:j,children:_}),t[39]=f,t[40]=_,t[41]=j,t[42]=P):P=t[42];let k;t[43]!==u||t[44]!==P||t[45]!==b||t[46]!==g?(k=n.jsx(u,{open:b,onOpenChange:g,children:P}),t[43]=u,t[44]=P,t[45]=b,t[46]=g,t[47]=k):k=t[47];let $;t[48]!==i?($=n.jsx(kt,{open:i,onOpenChange:a}),t[48]=i,t[49]=$):$=t[49];let I;return t[50]!==k||t[51]!==$||t[52]!==v?(I=n.jsxs(n.Fragment,{children:[v,k,$]}),t[50]=k,t[51]=$,t[52]=v,t[53]=I):I=t[53],I}function Qn(t){return n.jsx(Jn,{project:t},t.id)}function er(t){return t.slug!==ee}function tr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(w.Suspense,{fallback:n.jsx(Pe,{className:"py-0",children:n.jsx(Te,{children:n.jsx(pe,{className:"gap-0.5",children:n.jsx(oe,{children:n.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[n.jsx(te,{className:"h-4 w-4 rounded"}),n.jsx(te,{className:"h-4 flex-1"})]})})})})}),children:n.jsx(Xn,{})}),t[0]=e):e=t[0],e}function sr(t){const e=N.c(16),{onCreateProject:s}=t,[r]=Ge(),l=rn(),{locator:o}=ae();let i;e[0]!==o?(i=ze.isOrgAdminProject(o),e[0]=o,e[1]=i):i=e[1];const a=i;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Qe.Skeleton,{}),e[2]=c):c=e[2];let d;e[3]!==s?(d=n.jsx(w.Suspense,{fallback:c,children:n.jsx(Qe,{onCreateProject:s})}),e[3]=s,e[4]=d):d=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(Vn,{}),e[5]=m):m=e[5];let f;e[6]!==a||e[7]!==r?(f=a?r.experimental_projects?n.jsx(tr,{}):null:n.jsx(Yn,{}),e[6]=a,e[7]=r,e[8]=f):f=e[8];let u;e[9]!==f?(u=n.jsx(Ct,{children:n.jsx(w.Suspense,{fallback:null,children:f})}),e[9]=f,e[10]=u):u=e[10];const p=a?void 0:"pt-3";let x;return e[11]!==l||e[12]!==d||e[13]!==u||e[14]!==p?(x=n.jsx(Yt,{sections:l,header:d,footer:m,additionalContent:u,contentClassName:p}),e[11]=l,e[12]=d,e[13]=u,e[14]=p,e[15]=x):x=e[15],x}function nr(t){const e=N.c(12);let s,r,l,o;e[0]!==t?({className:s,orientation:l,decorative:o,...r}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o):(s=e[1],r=e[2],l=e[3],o=e[4]);const i=l===void 0?"horizontal":l,a=o===void 0?!0:o;let c;e[5]!==s?(c=z("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",s),e[5]=s,e[6]=c):c=e[6];let d;return e[7]!==a||e[8]!==i||e[9]!==r||e[10]!==c?(d=n.jsx(cs,{"data-slot":"separator-root",decorative:a,orientation:i,className:c,...r}),e[7]=a,e[8]=i,e[9]=r,e[10]=c,e[11]=d):d=e[11],d}const Qt=w.createContext(null);function rr(){const t=w.useContext(Qt);if(!t)throw new Error("TopbarSwitcher compound components must be used within TopbarSwitcher.Root");return t}function lr(t){const e=N.c(10),{children:s,onItemHover:r}=t,[l,o]=w.useState(null);let i;e[0]!==r?(i=f=>{o(f),r?.(f)},e[0]=r,e[1]=i):i=e[1];const a=i;let c;e[2]!==l||e[3]!==a?(c={hoveredItem:l,setHoveredItem:a},e[2]=l,e[3]=a,e[4]=c):c=e[4];let d;e[5]!==s?(d=n.jsx(lt,{children:s}),e[5]=s,e[6]=d):d=e[6];let m;return e[7]!==c||e[8]!==d?(m=n.jsx(Qt.Provider,{value:c,children:d}),e[7]=c,e[8]=d,e[9]=m):m=e[9],m}function or(t){const e=N.c(6),{children:s,onClick:r}=t;let l;e[0]!==s||e[1]!==r?(l=n.jsx(se,{variant:"link",className:"p-0.5 h-auto",onClick:r,type:"button",children:s}),e[0]=s,e[1]=r,e[2]=l):l=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(ot,{asChild:!0,children:n.jsx(se,{size:"icon",variant:"ghost",className:"w-6 h-6 p-0",children:n.jsx(St,{size:16,className:"opacity-50"})})}),e[3]=o):o=e[3];let i;return e[4]!==l?(i=n.jsxs("div",{className:"flex items-center gap-1",children:[l,o]}),e[4]=l,e[5]=i):i=e[5],i}function ir(t){const e=N.c(8),{item:s,fallback:r}=t,l=r===void 0?"":r,o=s?.avatarUrl??"",i=s?.name??l;let a;e[0]!==o||e[1]!==i?(a=n.jsx(me,{url:o,fallback:i,size:"xs",objectFit:"contain"}),e[0]=o,e[1]=i,e[2]=a):a=e[2];const c=s?.name??l;let d;e[3]!==c?(d=n.jsx("span",{children:c}),e[3]=c,e[4]=d):d=e[4];let m;return e[5]!==a||e[6]!==d?(m=n.jsxs("div",{className:"flex items-center gap-2",children:[a,d]}),e[5]=a,e[6]=d,e[7]=m):m=e[7],m}function ar(t){const e=N.c(6),{children:s,align:r}=t,l=r===void 0?"start":r,i=w.Children.toArray(s).filter(cr).length===1?"280px":"480px";let a;e[0]!==i?(a={width:i},e[0]=i,e[1]=a):a=e[1];let c;return e[2]!==l||e[3]!==s||e[4]!==a?(c=n.jsx(it,{align:l,className:"p-0 flex items-start",style:a,children:s}),e[2]=l,e[3]=s,e[4]=a,e[5]=c):c=e[5],c}function cr(t){return w.isValidElement(t)&&(t.type===ts||t.type===es)}function es(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex flex-col border-border w-[240px] border-r last:border-r-0 last:w-full",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}const ts=es;function dr(t){const e=N.c(6),{placeholder:s,value:r,onChange:l}=t,o=s===void 0?"Search...":s;let i;e[0]!==l?(i=c=>l(c.target.value),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==o||e[3]!==i||e[4]!==r?(a=n.jsx(Fs,{placeholder:o,value:r,onChange:i,className:"rounded-none border-t-0 border-x-0 focus-visible:border-border focus-visible:ring-0"}),e[2]=o,e[3]=i,e[4]=r,e[5]=a):a=e[5],a}function mr(t){const e=N.c(6),{children:s,emptyMessage:r}=t,l=r===void 0?"No items found.":r,o=w.Children.count(s)>0;let i;e[0]!==l||e[1]!==o?(i=!o&&n.jsx("div",{className:"text-muted-foreground text-sm px-1 py-8 text-center",children:l}),e[0]=l,e[1]=o,e[2]=i):i=e[2];let a;return e[3]!==s||e[4]!==i?(a=n.jsxs("div",{className:"flex flex-col gap-0.5 p-1 max-h-44 overflow-y-auto",children:[i,s]}),e[3]=s,e[4]=i,e[5]=a):a=e[5],a}function fr(t){const e=N.c(15),{item:s,onClick:r,onHover:l,children:o}=t,i=rr();let a;e[0]!==i||e[1]!==s||e[2]!==l?(a=()=>{i.setHoveredItem(s.slug),l?.(s)},e[0]=i,e[1]=s,e[2]=l,e[3]=a):a=e[3];const c=a;let d;e[4]!==s||e[5]!==r?(d=()=>r(s),e[4]=s,e[5]=r,e[6]=d):d=e[6];let m;e[7]!==o||e[8]!==s.avatarUrl||e[9]!==s.name?(m=o||n.jsxs(n.Fragment,{children:[n.jsx(me,{url:s.avatarUrl??"",fallback:s.name,size:"xs",className:"w-[22px]! h-[22px]!",objectFit:"contain"}),n.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:s.name})]}),e[7]=o,e[8]=s.avatarUrl,e[9]=s.name,e[10]=m):m=e[10];let f;return e[11]!==c||e[12]!==d||e[13]!==m?(f=n.jsx(se,{onClick:d,onMouseEnter:c,variant:"ghost",size:"sm",className:"w-full justify-start font-normal",children:m}),e[11]=c,e[12]=d,e[13]=m,e[14]=f):f=e[14],f}function ur(t){const e=N.c(2),{children:s}=t;let r;return e[0]!==s?(r=n.jsx("div",{className:"px-1 pb-1 pt-0.5",children:s}),e[0]=s,e[1]=r):r=e[1],r}function pr(t){const e=N.c(11),{onClick:s,icon:r,children:l,variant:o}=t,a=(o===void 0?"default":o)==="muted"&&"text-muted-foreground";let c;e[0]!==a?(c=z("w-full justify-start font-normal",a),e[0]=a,e[1]=c):c=e[1];let d;e[2]!==r?(d=r&&n.jsx("span",{className:"[&>svg]:size-4",children:r}),e[2]=r,e[3]=d):d=e[3];let m;e[4]!==l?(m=n.jsx("span",{children:l}),e[4]=l,e[5]=m):m=e[5];let f;return e[6]!==s||e[7]!==c||e[8]!==d||e[9]!==m?(f=n.jsxs(se,{variant:"ghost",size:"sm",className:c,onClick:s,children:[d,m]}),e[6]=s,e[7]=c,e[8]=d,e[9]=m,e[10]=f):f=e[10],f}function xr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(nr,{}),t[0]=e):e=t[0],e}function hr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"h-4 w-16 bg-accent rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const re=Object.assign(lr,{Trigger:or,CurrentItem:ir,Content:ar,Panel:ts,Search:dr,Items:mr,Item:fr,Actions:ur,Action:pr,Separator:xr,Skeleton:hr});function et(){const t=N.c(59);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:s}=tt(e),{data:r}=ie.useListOrganizations(),l=xe();let o;t[1]!==s||t[2]!==r?(o=r?.find(B=>B.slug===s),t[1]=s,t[2]=r,t[3]=o):o=t[3];const i=o,[a,c]=w.useState(""),[d,m]=w.useState(!1);let f,u,p,x,h,j,b,g;if(t[4]!==i||t[5]!==l||t[6]!==s||t[7]!==a||t[8]!==r){const A=(r?(()=>{const U=r.filter(W=>W.name.toLowerCase().includes(a.toLowerCase()));if(s){const W=U.findIndex(V=>V.slug===s);if(W>0){const V=U[W];V&&(U.splice(W,1),U.unshift(V))}}return U})():[]).map(gr);let D;t[17]!==i?(D=i?{slug:i.slug,name:i.name,avatarUrl:i.logo}:void 0,t[17]=i,t[18]=D):D=t[18];const R=D;x=re;let M;t[19]!==l||t[20]!==s?(M=()=>l({to:"/$org",params:{org:s??""}}),t[19]=l,t[20]=s,t[21]=M):M=t[21];let H;t[22]!==R?(H=n.jsx(re.CurrentItem,{item:R}),t[22]=R,t[23]=H):H=t[23],t[24]!==M||t[25]!==H?(g=n.jsx(re.Trigger,{onClick:M,children:H}),t[24]=M,t[25]=H,t[26]=g):g=t[26],p=re.Content,u=re.Panel,t[27]!==a?(b=n.jsx(re.Search,{placeholder:"Search organizations...",value:a,onChange:c}),t[27]=a,t[28]=b):b=t[28],f=re.Items,h="No organizations found.";let F;t[29]!==l?(F=U=>n.jsx(re.Item,{item:U,onClick:W=>l({to:"/$org",params:{org:W.slug}})},U.slug),t[29]=l,t[30]=F):F=t[30],j=A.map(F),t[4]=i,t[5]=l,t[6]=s,t[7]=a,t[8]=r,t[9]=f,t[10]=u,t[11]=p,t[12]=x,t[13]=h,t[14]=j,t[15]=b,t[16]=g}else f=t[9],u=t[10],p=t[11],x=t[12],h=t[13],j=t[14],b=t[15],g=t[16];let v;t[31]!==f||t[32]!==h||t[33]!==j?(v=n.jsx(f,{emptyMessage:h,children:j}),t[31]=f,t[32]=h,t[33]=j,t[34]=v):v=t[34];let S,C;t[35]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(re.Actions,{children:n.jsx(re.Action,{onClick:()=>m(!0),variant:"muted",children:"+ Create organization"})}),C=n.jsx(re.Separator,{}),t[35]=S,t[36]=C):(S=t[35],C=t[36]);let y;t[37]!==l?(y=()=>l({to:"/"}),t[37]=l,t[38]=y):y=t[38];let _;t[39]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(Ws,{}),t[39]=_):_=t[39];let P;t[40]!==y?(P=n.jsx(re.Actions,{children:n.jsx(re.Action,{onClick:y,icon:_,children:"See all organizations"})}),t[40]=y,t[41]=P):P=t[41];let k;t[42]!==u||t[43]!==P||t[44]!==b||t[45]!==v?(k=n.jsxs(u,{children:[b,v,S,C,P]}),t[42]=u,t[43]=P,t[44]=b,t[45]=v,t[46]=k):k=t[46];let $;t[47]!==p||t[48]!==k?($=n.jsx(p,{children:k}),t[47]=p,t[48]=k,t[49]=$):$=t[49];let I;t[50]!==x||t[51]!==$||t[52]!==g?(I=n.jsxs(x,{children:[g,$]}),t[50]=x,t[51]=$,t[52]=g,t[53]=I):I=t[53];let E;t[54]!==d?(E=n.jsx(Ot,{open:d,onOpenChange:m}),t[54]=d,t[55]=E):E=t[55];let T;return t[56]!==I||t[57]!==E?(T=n.jsxs(n.Fragment,{children:[I,E]}),t[56]=I,t[57]=E,t[58]=T):T=t[58],T}function gr(t){return{slug:t.slug,name:t.name,avatarUrl:t.logo}}et.Skeleton=re.Skeleton;function jr(){const t=N.c(10),{locator:e}=ae(),s=Vs();if(ze.isOrgAdminProject(e))return null;const l=s?.leftRef;let o;t[0]!==l?(o=n.jsx("div",{ref:l,className:"flex items-center gap-2 flex-1 min-w-0"}),t[0]=l,t[1]=o):o=t[1];const i=s?.centerRef;let a;t[2]!==i?(a=n.jsx("div",{ref:i,className:"flex flex-1 h-full items-center justify-center px-4 min-w-0 [&:empty]:hidden"}),t[2]=i,t[3]=a):a=t[3];const c=s?.rightRef;let d;t[4]!==c?(d=n.jsx("div",{ref:c,className:"flex flex-1 gap-2 h-full items-center justify-end min-w-0 [&:empty]:hidden"}),t[4]=c,t[5]=d):d=t[5];let m;return t[6]!==o||t[7]!==a||t[8]!==d?(m=n.jsx("div",{className:"dark",children:n.jsxs("header",{className:"sticky top-0 z-50 h-12 bg-background flex items-center px-4 shrink-0",children:[o,a,d]})}),t[6]=o,t[7]=a,t[8]=d,t[9]=m):m=t[9],m}function br({prop:t,defaultProp:e,onChange:s=()=>{}}){const[r,l]=vr({defaultProp:e,onChange:s}),o=t!==void 0,i=o?t:r,a=bt(s),c=w.useCallback(d=>{if(o){const f=typeof d=="function"?d(t):d;f!==t&&a(f)}else l(d)},[o,t,l,a]);return[i,c]}function vr({defaultProp:t,onChange:e}){const s=w.useState(t),[r]=s,l=w.useRef(r),o=bt(e);return w.useEffect(()=>{l.current!==r&&(o(r),l.current=r)},[r,l,o]),s}function Nr(t){const e=N.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let r;return e[2]!==s?(r=n.jsx($e.Root,{"data-slot":"drawer",...s}),e[2]=s,e[3]=r):r=e[3],r}function Sr(t){const e=N.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let r;return e[2]!==s?(r=n.jsx($e.Trigger,{"data-slot":"drawer-trigger",...s}),e[2]=s,e[3]=r):r=e[3],r}function yr(t){const e=N.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let r;return e[2]!==s?(r=n.jsx($e.Portal,{"data-slot":"drawer-portal",...s}),e[2]=s,e[3]=r):r=e[3],r}function wr(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx($e.Overlay,{"data-slot":"drawer-overlay",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Cr(t){const e=N.c(12);let s,r,l;e[0]!==t?({className:r,children:s,...l}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l):(s=e[1],r=e[2],l=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(wr,{}),e[4]=o):o=e[4];let i;e[5]!==r?(i=z("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",r),e[5]=r,e[6]=i):i=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=a):a=e[7];let c;return e[8]!==s||e[9]!==l||e[10]!==i?(c=n.jsxs(yr,{"data-slot":"drawer-portal",children:[o,n.jsxs($e.Content,{"data-slot":"drawer-content",className:i,...l,children:[a,s]})]}),e[8]=s,e[9]=l,e[10]=i,e[11]=c):c=e[11],c}function kr(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex flex-col gap-1.5 px-4 py-2",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"drawer-header",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function _r(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("text-foreground font-semibold",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx($e.Title,{"data-slot":"drawer-title",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}const ss=w.createContext({setOpen:()=>{}}),zr=()=>w.useContext(ss),$r=t=>{const e=N.c(25);let s,r,l,o,i;e[0]!==t?({children:s,defaultOpen:r,open:o,onOpenChange:l,...i}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o,e[5]=i):(s=e[1],r=e[2],l=e[3],o=e[4],i=e[5]);const a=r??!1;let c;e[6]!==l||e[7]!==o||e[8]!==a?(c={prop:o,defaultProp:a,onChange:l},e[6]=l,e[7]=o,e[8]=a,e[9]=c):c=e[9];const[d,m]=br(c);let f;e[10]!==m?(f={setOpen:m},e[10]=m,e[11]=f):f=e[11];let u;e[12]!==s||e[13]!==d||e[14]!==i||e[15]!==m?(u=n.jsx(Nr,{open:d,onOpenChange:m,...i,children:s}),e[12]=s,e[13]=d,e[14]=i,e[15]=m,e[16]=u):u=e[16];let p;e[17]!==d||e[18]!==i||e[19]!==m||e[20]!==u?(p=n.jsx(Ys,{open:d,onOpenChange:m,...i,children:u}),e[17]=d,e[18]=i,e[19]=m,e[20]=u,e[21]=p):p=e[21];let x;return e[22]!==f||e[23]!==p?(x=n.jsx(ss.Provider,{value:f,children:p}),e[22]=f,e[23]=p,e[24]=x):x=e[24],x},Ir=t=>{const{children:e,title:s,...r}=t,l=Ee(),{className:o,...i}=r;return l?n.jsxs(Cr,{...i,children:[n.jsx(kr,{className:"hidden",children:n.jsx(_r,{children:s})}),n.jsx("div",{className:z("flex flex-col gap-2 p-2 py-4",o),children:e})]}):n.jsx(Zs,{...r,children:e})},Or=t=>{const{children:e,...s}=t,{setOpen:r}=zr(),l=Ee(),{className:o,...i}=s;return l?n.jsx("div",{...i,onClick:a=>{r(!1);const{onClick:c}=i;c?.(a)},className:z("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),children:e}):n.jsx(qs,{...s,children:e})},Pr=t=>{const e=N.c(7);let s,r;e[0]!==t?({children:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);const l=Ee();let o;return e[3]!==s||e[4]!==l||e[5]!==r?(o=l?n.jsx(Sr,{asChild:!0,children:s}):n.jsx(Gs,{...r,children:s}),e[3]=s,e[4]=l,e[5]=r,e[6]=o):o=e[6],o},Tr=t=>{const e=N.c(7);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);const l=Ee();let o;return e[3]!==s||e[4]!==l||e[5]!==r?(o=l?n.jsx(pt,{className:z(s),...r}):n.jsx(pt,{className:z(s),...r}),e[3]=s,e[4]=l,e[5]=r,e[6]=o):o=e[6],o};function Er(t){const e=N.c(11),{user:s,trigger:r,align:l,children:o}=t,i=l===void 0?"start":l;let a;e[0]!==r||e[1]!==s?(a=r(s),e[0]=r,e[1]=s,e[2]=a):a=e[2];let c;e[3]!==a?(c=n.jsx(Pr,{asChild:!0,children:n.jsx("div",{children:a})}),e[3]=a,e[4]=c):c=e[4];let d;e[5]!==i||e[6]!==o?(d=n.jsx(Ir,{side:"top",align:i,className:"md:w-[240px]",children:o}),e[5]=i,e[6]=o,e[7]=d):d=e[7];let m;return e[8]!==c||e[9]!==d?(m=n.jsxs($r,{children:[c,d]}),e[8]=c,e[9]=d,e[10]=m):m=e[10],m}function Ar(t){const e=N.c(8),{children:s,onClick:r,className:l,asChild:o}=t;let i;e[0]!==o||e[1]!==s||e[2]!==r?(i=o?s:n.jsx("button",{type:"button",className:"flex items-center gap-2 text-sm w-full cursor-pointer",onClick:r,children:s}),e[0]=o,e[1]=s,e[2]=r,e[3]=i):i=e[3];let a;return e[4]!==o||e[5]!==l||e[6]!==i?(a=n.jsx(Or,{asChild:o,className:l,children:i}),e[4]=o,e[5]=l,e[6]=i,e[7]=a):a=e[7],a}function Mr(t){const e=N.c(2),{className:s}=t;let r;return e[0]!==s?(r=n.jsx(Tr,{className:s}),e[0]=s,e[1]=r):r=e[1],r}function Lr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const ce=Object.assign(Er,{Item:Ar,Separator:Mr,Skeleton:Lr});function Dr(t){const e=N.c(49),{user:s,userImage:r}=t,[l,o]=w.useState(!1),[i,a]=w.useState(!1);let c;e[0]!==s.email||e[1]!==s.id||e[2]!==s.name?(c=()=>{const M=`ID: ${s.id}
3
+ Email: ${s.email}`;try{await navigator.clipboard.writeText(_),de.success("User info copied to clipboard")}catch{de.error("Failed to copy user info to clipboard")}},e[0]=s,e[1]=o):o=e[1];const i=o,a=s.name||s.email||"U";let c;e[2]!==a||e[3]!==r?(c=n.jsx(me,{url:r,fallback:a,shape:"circle",size:"sm",className:"size-8 shrink-0"}),e[2]=a,e[3]=r,e[4]=c):c=e[4];const d=s.name||"User";let m;e[5]!==d?(m=n.jsx("span",{className:"text-sm text-sidebar-foreground truncate font-[450]",children:d}),e[5]=d,e[6]=m):m=e[6];let f;e[7]!==s.email?(f=n.jsx("span",{className:"text-xs text-muted-foreground truncate font-normal",children:s.email}),e[7]=s.email,e[8]=f):f=e[8];let u;e[9]!==m||e[10]!==f?(u=n.jsxs("div",{className:"flex flex-col min-w-0 text-left",children:[m,f]}),e[9]=m,e[10]=f,e[11]=u):u=e[11];let p;e[12]!==i||e[13]!==c||e[14]!==u?(p=n.jsxs(se,{variant:"ghost",onClick:i,className:"h-auto p-2 m-1 mb-0 justify-start gap-2 hover:bg-sidebar-accent hover:text-inherit active:bg-sidebar-accent/75",children:[c,u]}),e[12]=i,e[13]=c,e[14]=u,e[15]=p):p=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(zn,{}),e[16]=x):x=e[16];let h;e[17]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Vt,{size:18}),e[17]=h):h=e[17];let j;e[18]!==l?(j=n.jsxs(Ie,{onClick:l,children:[h,"Preferences"]}),e[18]=l,e[19]=j):j=e[19];let b;e[20]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(Ie,{asChild:!0,children:n.jsxs("a",{href:"https://www.decocms.com/terms-of-use",target:"_blank",rel:"noopener noreferrer",children:[n.jsx(Mt,{size:18}),n.jsx("span",{className:"flex-1",children:"Terms & Conditions"}),n.jsx(Xe,{size:14})]})}),e[20]=b):b=e[20];let g;e[21]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(Ie,{asChild:!0,children:n.jsxs("a",{href:"https://github.com/decocms/mesh",target:"_blank",rel:"noopener noreferrer",children:[n.jsx(jt,{className:"size-[18px]"}),n.jsx("span",{className:"flex-1",children:"decocms/mesh"}),n.jsx(Xe,{size:14})]})}),e[21]=g):g=e[21];let v;e[22]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsxs(Ie,{onClick:In,children:[n.jsx(Ft,{size:18}),"Log out"]}),e[22]=v):v=e[22];let S;e[23]!==j?(S=n.jsxs("div",{className:"p-1 flex flex-col",children:[x,j,b,g,v]}),e[23]=j,e[24]=S):S=e[24];let C;e[25]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx("div",{className:"mt-auto px-3 py-2 border-t border-border",children:n.jsxs("span",{className:"text-[11px] text-muted-foreground/75",children:["v","2.96.2"]})}),e[25]=C):C=e[25];let y;return e[26]!==S||e[27]!==p?(y=n.jsx(n.Fragment,{children:n.jsxs("div",{className:"flex flex-col gap-0.5 bg-sidebar min-w-[250px]",children:[p,S,C]})}),e[26]=S,e[27]=p,e[28]=y):y=e[28],y}function In(){return ie.signOut()}function On(t){const e=N.c(26),{org:s,isActive:r,isHovered:l,onClick:o,onSettings:i,onHover:a}=t,c=r,d=l&&!r,m=l&&"bg-accent/50",f=r&&!l&&"bg-accent hover:bg-accent";let u;e[0]!==m||e[1]!==f?(u=z("flex items-center gap-2 w-full justify-start font-normal h-10 px-2 rounded-lg cursor-pointer transition-colors",m,f),e[0]=m,e[1]=f,e[2]=u):u=e[2];let p;e[3]!==o?(p=S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),o?.())},e[3]=o,e[4]=p):p=e[4];let x;e[5]!==a||e[6]!==s.id?(x=()=>a?.(s.id),e[5]=a,e[6]=s.id,e[7]=x):x=e[7];const h=s.logo??void 0;let j;e[8]!==s.name||e[9]!==h?(j=n.jsx(me,{url:h,fallback:s.name,size:"sm",className:"size-6 shrink-0 rounded-md",objectFit:"cover"}),e[8]=s.name,e[9]=h,e[10]=j):j=e[10];let b;e[11]!==s.name?(b=n.jsx("span",{className:"flex-1 text-sm text-foreground truncate text-left min-w-0",children:s.name}),e[11]=s.name,e[12]=b):b=e[12];let g;e[13]!==i||e[14]!==s.name||e[15]!==d||e[16]!==c?(g=i&&c?n.jsx("button",{type:"button","aria-label":`${s.name} settings`,className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:S=>{S.stopPropagation(),i()},children:n.jsx(at,{size:16,className:"text-muted-foreground"})}):d?n.jsx(It,{size:16,className:"text-muted-foreground shrink-0"}):n.jsx("span",{className:"size-5 shrink-0","aria-hidden":"true"}),e[13]=i,e[14]=s.name,e[15]=d,e[16]=c,e[17]=g):g=e[17];let v;return e[18]!==o||e[19]!==u||e[20]!==p||e[21]!==x||e[22]!==j||e[23]!==b||e[24]!==g?(v=n.jsxs("div",{role:"button",tabIndex:0,className:u,onClick:o,onKeyDown:p,onMouseEnter:x,children:[j,b,g]}),e[18]=o,e[19]=u,e[20]=p,e[21]=x,e[22]=j,e[23]=b,e[24]=g,e[25]=v):v=e[25],v}function Pn(t){const e=N.c(34),{currentOrgSlug:s,hoveredOrgId:r,onOrgSelect:l,onOrgSettings:o,onPopoverClose:i,onCreateOrganization:a,onOrgHover:c}=t,{data:d}=ie.useListOrganizations();let m,f,u,p;if(e[0]!==s||e[1]!==r||e[2]!==a||e[3]!==c||e[4]!==l||e[5]!==o||e[6]!==i||e[7]!==d){let j;e[12]!==s?(j=(y,_)=>y.slug===s?-1:_.slug===s?1:y.name.localeCompare(_.name),e[12]=s,e[13]=j):j=e[13];const b=[...d??[]].sort(j);u="flex flex-col min-w-[240px] border-l border-border";let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx("span",{className:"text-xs text-muted-foreground truncate",children:"Your Organizations"}),e[14]=g):g=e[14];let v;e[15]!==a||e[16]!==i?(v=()=>{i(),a()},e[15]=a,e[16]=i,e[17]=v):v=e[17];let S;e[18]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(Ke,{size:16,className:"text-muted-foreground"}),e[18]=S):S=e[18],e[19]!==v?(p=n.jsxs("div",{className:"flex items-center justify-between h-10 px-3 border-b border-border",children:[g,n.jsx(se,{variant:"ghost",size:"icon",className:"size-5",onClick:v,children:S})]}),e[19]=v,e[20]=p):p=e[20],m="flex flex-col gap-0.5 p-1 flex-1 overflow-y-auto";let C;e[21]!==s||e[22]!==r||e[23]!==c||e[24]!==l||e[25]!==o?(C=y=>n.jsx(On,{org:y,isActive:y.slug===s,isHovered:y.id===r,onClick:()=>l(y.slug),onSettings:()=>o(y.slug),onHover:c},y.slug),e[21]=s,e[22]=r,e[23]=c,e[24]=l,e[25]=o,e[26]=C):C=e[26],f=b.map(C),e[0]=s,e[1]=r,e[2]=a,e[3]=c,e[4]=l,e[5]=o,e[6]=i,e[7]=d,e[8]=m,e[9]=f,e[10]=u,e[11]=p}else m=e[8],f=e[9],u=e[10],p=e[11];let x;e[27]!==m||e[28]!==f?(x=n.jsx("div",{className:m,children:f}),e[27]=m,e[28]=f,e[29]=x):x=e[29];let h;return e[30]!==u||e[31]!==p||e[32]!==x?(h=n.jsxs("div",{className:u,children:[p,x]}),e[30]=u,e[31]=p,e[32]=x,e[33]=h):h=e[33],h}function Tn(t){const e=N.c(27),{project:s,isActive:r,onClick:l,onSettings:o}=t,[i,a]=w.useState(!1),c=r||i,d=s.ui?.themeColor??"#3B82F6",m=r&&"bg-accent hover:bg-accent";let f;e[0]!==m?(f=z("flex items-center gap-2 w-full justify-start font-normal h-10 px-2 rounded-lg cursor-pointer transition-colors hover:bg-accent/50",m),e[0]=m,e[1]=f):f=e[1];let u;e[2]!==l?(u=S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),l?.())},e[2]=l,e[3]=u):u=e[3];let p,x;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=()=>a(!0),x=()=>a(!1),e[4]=p,e[5]=x):(p=e[4],x=e[5]);let h;e[6]!==s.name||e[7]!==s.ui||e[8]!==d?(h=s.ui?.icon?n.jsx("img",{src:s.ui.icon,alt:"",className:"size-6 rounded-md object-cover shrink-0"}):n.jsx(me,{fallback:s.name,size:"sm",shape:"square",className:"size-6 shrink-0 rounded-md",style:{backgroundColor:d}}),e[6]=s.name,e[7]=s.ui,e[8]=d,e[9]=h):h=e[9];let j;e[10]!==s.name?(j=n.jsx("span",{className:"flex-1 text-sm text-foreground truncate text-left min-w-0",children:s.name}),e[10]=s.name,e[11]=j):j=e[11];let b;e[12]!==r?(b=r&&n.jsx(Oe,{size:16,className:"text-muted-foreground shrink-0"}),e[12]=r,e[13]=b):b=e[13];let g;e[14]!==r||e[15]!==o||e[16]!==s.name||e[17]!==c?(g=o&&c&&!r?n.jsx("button",{type:"button","aria-label":`${s.name} settings`,className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:S=>{S.stopPropagation(),o()},children:n.jsx(at,{size:16,className:"text-muted-foreground"})}):r?null:n.jsx("span",{className:"size-5 shrink-0","aria-hidden":"true"}),e[14]=r,e[15]=o,e[16]=s.name,e[17]=c,e[18]=g):g=e[18];let v;return e[19]!==l||e[20]!==f||e[21]!==u||e[22]!==h||e[23]!==j||e[24]!==b||e[25]!==g?(v=n.jsxs("div",{role:"button",tabIndex:0,className:f,onClick:l,onKeyDown:u,onMouseEnter:p,onMouseLeave:x,children:[h,j,b,g]}),e[19]=l,e[20]=f,e[21]=u,e[22]=h,e[23]=j,e[24]=b,e[25]=g,e[26]=v):v=e[26],v}function En(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsxs("div",{className:"space-y-1 px-2 py-1",children:[n.jsx(te,{className:"h-10 w-full"}),n.jsx(te,{className:"h-10 w-full"})]}),t[0]=e):e=t[0],e}function An(t){const e=N.c(16),{organizationId:s,currentProjectSlug:r,onProjectSelect:l,onProjectSettings:o,orgSlug:i}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={suspense:!0},e[0]=a):a=e[0];const{data:c}=zt(s,a);let d,m;if(e[1]!==r||e[2]!==l||e[3]!==o||e[4]!==i||e[5]!==c){m=Symbol.for("react.early_return_sentinel");e:{const u=c?.filter(Mn)??[];if(u.length===0){let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx("div",{className:"px-3 py-4 text-center text-sm text-muted-foreground",children:"No projects yet"}),e[8]=x):x=e[8],m=x;break e}let p;e[9]!==r||e[10]!==l||e[11]!==o||e[12]!==i?(p=x=>n.jsx(Tn,{project:x,isActive:r===x.slug,onClick:()=>l(i,x.slug),onSettings:o?()=>o(i,x.slug):void 0},x.id),e[9]=r,e[10]=l,e[11]=o,e[12]=i,e[13]=p):p=e[13],d=u.map(p)}e[1]=r,e[2]=l,e[3]=o,e[4]=i,e[5]=c,e[6]=d,e[7]=m}else d=e[6],m=e[7];if(m!==Symbol.for("react.early_return_sentinel"))return m;let f;return e[14]!==d?(f=n.jsx(n.Fragment,{children:d}),e[14]=d,e[15]=f):f=e[15],f}function Mn(t){return t.slug!==ee}function Ln(t){const e=N.c(17),{organizationId:s,organizationName:r,currentProjectSlug:l,onProjectSelect:o,onProjectSettings:i,onCreateProject:a,orgSlug:c}=t;let d;e[0]!==r?(d=n.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["Projects in ",r]}),e[0]=r,e[1]=d):d=e[1];let m;e[2]!==a?(m=a&&n.jsx("button",{type:"button",className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:a,"aria-label":"Create project",children:n.jsx(Ke,{size:16,className:"text-muted-foreground"})}),e[2]=a,e[3]=m):m=e[3];let f;e[4]!==d||e[5]!==m?(f=n.jsxs("div",{className:"flex items-center justify-between h-10 px-3 border-b border-border",children:[d,m]}),e[4]=d,e[5]=m,e[6]=f):f=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(En,{}),e[7]=u):u=e[7];let p;e[8]!==l||e[9]!==o||e[10]!==i||e[11]!==c||e[12]!==s?(p=n.jsx("div",{className:"flex flex-col gap-0.5 p-1 flex-1 overflow-y-auto",children:n.jsx(w.Suspense,{fallback:u,children:n.jsx(An,{organizationId:s,currentProjectSlug:l,onProjectSelect:o,onProjectSettings:i,orgSlug:c})})}),e[8]=l,e[9]=o,e[10]=i,e[11]=c,e[12]=s,e[13]=p):p=e[13];let x;return e[14]!==f||e[15]!==p?(x=n.jsxs("div",{className:"flex flex-col min-w-[250px] border-l border-border",children:[f,p]}),e[14]=f,e[15]=p,e[16]=x):x=e[16],x}function qt(t){const e=N.c(81),{open:s,onOpenChange:r,user:l,userImage:o}=t,[i,a]=Ge(),[c,d]=w.useState(!1);let m;e[0]!==l.id?(m=()=>{navigator.clipboard.writeText(l.id),d(!0),setTimeout(()=>d(!1),2e3)},e[0]=l.id,e[1]=m):m=e[1];const f=m;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(As,{className:"text-base",children:"Profile Settings"}),e[2]=u):u=e[2];let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsxs(Ms,{className:"px-6 pt-6 pb-4 border-b border-border shrink-0 relative",children:[u,n.jsxs(Ls,{className:"absolute top-1/2 right-4 -translate-y-1/2 cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[n.jsx(He,{size:16}),n.jsx("span",{className:"sr-only",children:"Close"})]})]}),e[3]=p):p=e[3];const x=l.name||"U";let h;e[4]!==x||e[5]!==o?(h=n.jsx(me,{url:o,fallback:x,shape:"circle",size:"xl",className:"h-16 w-16"}),e[4]=x,e[5]=o,e[6]=h):h=e[6];const j=l.name||"User";let b;e[7]!==j?(b=n.jsx("span",{className:"text-base font-medium text-foreground",children:j}),e[7]=j,e[8]=b):b=e[8];let g;e[9]!==l.email?(g=n.jsx("span",{className:"text-sm text-muted-foreground",children:l.email}),e[9]=l.email,e[10]=g):g=e[10];let v;e[11]!==b||e[12]!==g?(v=n.jsxs("div",{className:"flex flex-col gap-1",children:[b,g]}),e[11]=b,e[12]=g,e[13]=v):v=e[13];let S;e[14]!==h||e[15]!==v?(S=n.jsxs("div",{className:"flex items-center gap-4",children:[h,v]}),e[14]=h,e[15]=v,e[16]=S):S=e[16];let C;e[17]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Preferences"}),e[17]=C):C=e[17];let y;e[18]!==a?(y=()=>a(Fn),e[18]=a,e[19]=y):y=e[19];let _;e[20]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[n.jsxs(qe,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[n.jsx(Hs,{size:16,className:"text-muted-foreground"}),"Developer Mode"]}),n.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Show technical details like JSON input/output for tool calls"})]}),e[20]=_):_=e[20];let P;e[21]!==a?(P=fe=>a(ue=>({...ue,devMode:fe})),e[21]=a,e[22]=P):P=e[22];let k;e[23]!==i.devMode||e[24]!==P?(k=n.jsx("div",{onClick:Bn,children:n.jsx(Je,{checked:i.devMode,onCheckedChange:P})}),e[23]=i.devMode,e[24]=P,e[25]=k):k=e[25];let $;e[26]!==y||e[27]!==k?($=n.jsxs("div",{className:"flex flex-col gap-2",children:[C,n.jsxs("button",{type:"button",onClick:y,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[_,k]})]}),e[26]=y,e[27]=k,e[28]=$):$=e[28];let I,E;e[29]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Experimental"}),E=n.jsx("p",{className:"text-xs text-muted-foreground",children:"Experimental features are unstable and may change or stop working at any time."}),e[29]=I,e[30]=E):(I=e[29],E=e[30]);let T;e[31]!==a?(T=()=>a(Un),e[31]=a,e[32]=T):T=e[32];let B;e[33]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[n.jsxs(qe,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[n.jsx(gt,{size:16,className:"text-muted-foreground"}),"Projects"]}),n.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Enable the projects feature in the sidebar"})]}),e[33]=B):B=e[33];let A;e[34]!==a?(A=fe=>a(ue=>({...ue,experimental_projects:fe})),e[34]=a,e[35]=A):A=e[35];let D;e[36]!==i.experimental_projects||e[37]!==A?(D=n.jsx("div",{onClick:Hn,children:n.jsx(Je,{checked:i.experimental_projects,onCheckedChange:A})}),e[36]=i.experimental_projects,e[37]=A,e[38]=D):D=e[38];let R;e[39]!==T||e[40]!==D?(R=n.jsxs("button",{type:"button",onClick:T,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[B,D]}),e[39]=T,e[40]=D,e[41]=R):R=e[41];let M;e[42]!==a?(M=()=>a(Rn),e[42]=a,e[43]=M):M=e[43];let H;e[44]===Symbol.for("react.memo_cache_sentinel")?(H=n.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[n.jsxs(qe,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[n.jsx(_t,{size:16,className:"text-muted-foreground"}),"Tasks"]}),n.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Enable the tasks feature in the sidebar"})]}),e[44]=H):H=e[44];let F;e[45]!==a?(F=fe=>a(ue=>({...ue,experimental_tasks:fe})),e[45]=a,e[46]=F):F=e[46];let U;e[47]!==i.experimental_tasks||e[48]!==F?(U=n.jsx("div",{onClick:Dn,children:n.jsx(Je,{checked:i.experimental_tasks,onCheckedChange:F})}),e[47]=i.experimental_tasks,e[48]=F,e[49]=U):U=e[49];let W;e[50]!==M||e[51]!==U?(W=n.jsxs("button",{type:"button",onClick:M,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[H,U]}),e[50]=M,e[51]=U,e[52]=W):W=e[52];let V;e[53]!==R||e[54]!==W?(V=n.jsxs("div",{className:"flex flex-col gap-2",children:[I,E,R,W]}),e[53]=R,e[54]=W,e[55]=V):V=e[55];let Z;e[56]!==S||e[57]!==$||e[58]!==V?(Z=n.jsxs("div",{className:"p-5 space-y-6 min-h-[225px]",children:[S,$,V]}),e[56]=S,e[57]=$,e[58]=V,e[59]=Z):Z=e[59];let q;e[60]!==l.id?(q=n.jsx("span",{className:"font-mono text-xs",children:l.id}),e[60]=l.id,e[61]=q):q=e[61];let J;e[62]!==c?(J=c?n.jsx(Oe,{size:14,className:"text-green-600"}):n.jsx(Pt,{size:14,className:"opacity-0 group-hover:opacity-100 transition-opacity"}),e[62]=c,e[63]=J):J=e[63];let K;e[64]!==f||e[65]!==q||e[66]!==J?(K=n.jsx(Be,{asChild:!0,children:n.jsxs("button",{type:"button",onClick:f,className:"group flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[q,J]})}),e[64]=f,e[65]=q,e[66]=J,e[67]=K):K=e[67];let G;e[68]===Symbol.for("react.memo_cache_sentinel")?(G=n.jsx(Ue,{side:"top",children:n.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[68]=G):G=e[68];let X;e[69]!==K?(X=n.jsx($t,{children:n.jsxs(Fe,{children:[K,G]})}),e[69]=K,e[70]=X):X=e[70];let Y;e[71]===Symbol.for("react.memo_cache_sentinel")?(Y=n.jsxs("span",{className:"text-xs text-muted-foreground/75",children:["v","2.96.2"]}),e[71]=Y):Y=e[71];let O;e[72]!==X?(O=n.jsxs("div",{className:"border-t border-border px-5 py-4 flex items-center justify-between shrink-0",children:[X,Y]}),e[72]=X,e[73]=O):O=e[73];let L;e[74]!==Z||e[75]!==O?(L=n.jsxs(Ds,{className:"sm:max-w-lg sm:max-h-[85vh] p-0 flex flex-col",closeButtonClassName:"hidden",children:[p,n.jsxs("div",{className:"flex flex-col",children:[Z,O]})]}),e[74]=Z,e[75]=O,e[76]=L):L=e[76];let Q;return e[77]!==r||e[78]!==s||e[79]!==L?(Q=n.jsx(Rs,{open:s,onOpenChange:r,children:L}),e[77]=r,e[78]=s,e[79]=L,e[80]=Q):Q=e[80],Q}function Dn(t){return t.stopPropagation()}function Rn(t){return{...t,experimental_tasks:!t.experimental_tasks}}function Hn(t){return t.stopPropagation()}function Un(t){return{...t,experimental_projects:!t.experimental_projects}}function Bn(t){return t.stopPropagation()}function Fn(t){return{...t,devMode:!t.devMode}}function Jt(t){const e=N.c(77),{isCollapsed:s,variant:r,onCreateProject:l}=t,o=s===void 0?!1:s,i=r===void 0?"light":r,[a]=Ge();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[0]=c):c=e[0];const{org:d,project:m}=tt(c),{data:f}=ie.useListOrganizations(),{data:u}=ie.useSession(),p=xe(),x=i==="dark",j=ae()?.project;let b;e[1]!==d||e[2]!==f?(b=f?.find(ne=>ne.slug===d),e[1]=d,e[2]=f,e[3]=b):b=e[3];const g=b,[v,S]=w.useState(!1),[C,y]=w.useState(!1),[_,P]=w.useState(!1),[k,$]=w.useState(null),I=u?.user,E=I?.image;let T;e[4]!==g||e[5]!==k||e[6]!==f?(T=k?f?.find(ne=>ne.id===k):g,e[4]=g,e[5]=k,e[6]=f,e[7]=T):T=e[7];const B=T;let A;e[8]!==p?(A=ne=>{S(!1),p({to:"/$org/$project/settings",params:{org:ne,project:ee}})},e[8]=p,e[9]=A):A=e[9];const D=A;let R;e[10]!==p?(R=ne=>{S(!1),p({to:"/$org/$project",params:{org:ne,project:ee}})},e[10]=p,e[11]=R):R=e[11];const M=R;let H;e[12]!==p?(H=(ne,Ye)=>{S(!1),p({to:"/$org/$project",params:{org:ne,project:Ye}})},e[12]=p,e[13]=H):H=e[13];const F=H;let U;e[14]!==p?(U=(ne,Ye)=>{S(!1),p({to:"/$org/$project/settings",params:{org:ne,project:Ye}})},e[14]=p,e[15]=U):U=e[15];const W=U;let V;e[16]!==l?(V=l?()=>{S(!1),l()}:void 0,e[16]=l,e[17]=V):V=e[17];const Z=V;let q;e[18]===Symbol.for("react.memo_cache_sentinel")?(q=ne=>{S(ne),ne||$(null)},e[18]=q):q=e[18];const J=q;let K;e[19]!==g?(K=()=>{g&&$(g.id)},e[19]=g,e[20]=K):K=e[20];const G=K,X=x?"hover:bg-zinc-800 text-white":"hover:bg-sidebar-accent",Y=o?"justify-center":"justify-start",O=o?"":"pl-0.5! px-1.5 gap-1.5";let L;e[21]!==X||e[22]!==Y||e[23]!==O?(L=z("h-7 min-w-0 max-w-full",X,Y,O),e[21]=X,e[22]=Y,e[23]=O,e[24]=L):L=e[24];const Q=g?.logo??"",fe=g?.name??"",ue=x&&"border-none";let he;e[25]!==ue?(he=z("shrink-0 rounded-[5px]",ue),e[25]=ue,e[26]=he):he=e[26];let ge;e[27]!==Q||e[28]!==fe||e[29]!==he?(ge=n.jsx(me,{url:Q,fallback:fe,size:"xs",className:he,objectFit:"cover"}),e[27]=Q,e[28]=fe,e[29]=he,e[30]=ge):ge=e[30];let je;e[31]!==g?.name||e[32]!==j||e[33]!==o||e[34]!==x?(je=!o&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"min-w-0 flex-1 text-left",children:x&&j?n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"text-[10px] text-zinc-500 leading-none truncate",children:g?.name??"Select org"}),n.jsx("p",{className:"text-sm text-white font-normal leading-tight mt-0.5 truncate",children:j.name??j.slug})]}):n.jsx("span",{className:"block truncate text-[14px] tracking-[-0.00625rem] font-medium text-foreground",children:g?.name??"Select org"})}),x?n.jsx(St,{className:"size-3 text-zinc-500 shrink-0"}):n.jsx(rt,{className:"size-3.5 text-muted-foreground shrink-0"})]}),e[31]=g?.name,e[32]=j,e[33]=o,e[34]=x,e[35]=je):je=e[35];let be;e[36]!==G||e[37]!==L||e[38]!==ge||e[39]!==je?(be=n.jsx(ot,{asChild:!0,children:n.jsxs(se,{variant:"ghost",size:"sm",onClick:G,className:L,children:[ge,je]})}),e[36]=G,e[37]=L,e[38]=ge,e[39]=je,e[40]=be):be=e[40];let ve;e[41]!==I||e[42]!==E?(ve=I&&n.jsx($n,{user:I,userImage:E,onOpenSettings:()=>{y(!0),S(!1)}}),e[41]=I,e[42]=E,e[43]=ve):ve=e[43];let Me,Le;e[44]===Symbol.for("react.memo_cache_sentinel")?(Me=()=>S(!1),Le=()=>P(!0),e[44]=Me,e[45]=Le):(Me=e[44],Le=e[45]);let Ne;e[46]!==D||e[47]!==M||e[48]!==k||e[49]!==d?(Ne=n.jsx(Pn,{currentOrgSlug:d,hoveredOrgId:k,onOrgSelect:M,onOrgSettings:D,onPopoverClose:Me,onCreateOrganization:Le,onOrgHover:$}),e[46]=D,e[47]=M,e[48]=k,e[49]=d,e[50]=Ne):Ne=e[50];let Se;e[51]!==Z||e[52]!==W||e[53]!==F||e[54]!==B||e[55]!==d||e[56]!==a.experimental_projects||e[57]!==m?(Se=a.experimental_projects&&B&&n.jsx(Ln,{organizationId:B.id,organizationName:B.name,orgSlug:B.slug,currentProjectSlug:B.slug===d?m:void 0,onProjectSelect:F,onProjectSettings:W,onCreateProject:Z}),e[51]=Z,e[52]=W,e[53]=F,e[54]=B,e[55]=d,e[56]=a.experimental_projects,e[57]=m,e[58]=Se):Se=e[58];let ye;e[59]!==ve||e[60]!==Ne||e[61]!==Se?(ye=n.jsxs(it,{align:"start",side:"bottom",className:"p-0 flex w-auto h-88 overflow-hidden",children:[ve,Ne,Se]}),e[59]=ve,e[60]=Ne,e[61]=Se,e[62]=ye):ye=e[62];let we;e[63]!==v||e[64]!==be||e[65]!==ye?(we=n.jsxs(lt,{open:v,onOpenChange:J,children:[be,ye]}),e[63]=v,e[64]=be,e[65]=ye,e[66]=we):we=e[66];let Ce;e[67]!==C||e[68]!==I||e[69]!==E?(Ce=I&&C&&I.email&&n.jsx(qt,{open:C,onOpenChange:y,user:{...I,name:I.name??void 0,email:I.email},userImage:E}),e[67]=C,e[68]=I,e[69]=E,e[70]=Ce):Ce=e[70];let ke;e[71]!==_?(ke=n.jsx(Ot,{open:_,onOpenChange:P}),e[71]=_,e[72]=ke):ke=e[72];let De;return e[73]!==we||e[74]!==Ce||e[75]!==ke?(De=n.jsxs(n.Fragment,{children:[we,Ce,ke]}),e[73]=we,e[74]=Ce,e[75]=ke,e[76]=De):De=e[76],De}Jt.Skeleton=function({variant:e="light"}){const s=e==="dark";return n.jsxs("div",{className:z("flex items-center gap-1.5 h-7 px-1.5 w-full",s&&"text-white"),children:[n.jsx(te,{className:z("size-5 rounded-[5px] shrink-0",s&&"bg-zinc-800")}),n.jsx(te,{className:z("h-3.5 flex-1",s&&"bg-zinc-800")})]})};function Qe(t){const e=N.c(71),{onCreateProject:s}=t,{state:r,toggleSidebar:l}=Ze(),o=r==="collapsed",[i,a]=Ve(),{locator:c}=ae();let d;e[0]!==c?(d=ze.isOrgAdminProject(c),e[0]=c,e[1]=d):d=e[1];const f=!d;let u;e[2]!==a?(u=()=>{a(Wn)},e[2]=a,e[3]=u):u=e[3];const p=u,x=f&&"bg-[#030302] border-b border-zinc-800";let h;e[4]!==x?(h=z("h-12 gap-0 pt-0 border-r",x),e[4]=x,e[5]=h):h=e[5];const j=o&&"group-hover/switcher:opacity-0 group-hover/switcher:pointer-events-none group-hover/switcher:invisible";let b;e[6]!==j?(b=z("w-full min-w-0 transition-opacity",j),e[6]=j,e[7]=b):b=e[7];const g=f?"dark":"light";let v;e[8]!==o||e[9]!==s||e[10]!==g?(v=n.jsx(Jt,{isCollapsed:o,variant:g,onCreateProject:s}),e[8]=o,e[9]=s,e[10]=g,e[11]=v):v=e[11];let S;e[12]!==b||e[13]!==v?(S=n.jsx("div",{className:b,children:v}),e[12]=b,e[13]=v,e[14]=S):S=e[14];const C=f?"hover:bg-zinc-800 text-zinc-400":"hover:bg-sidebar-accent",y=o?"opacity-0 invisible pointer-events-none group-hover/switcher:opacity-100 group-hover/switcher:visible group-hover/switcher:pointer-events-auto":"opacity-0 invisible pointer-events-none";let _;e[15]!==C||e[16]!==y?(_=z("absolute inset-0 m-auto size-7 transition-opacity",C,y),e[15]=C,e[16]=y,e[17]=_):_=e[17];const P=!o,k=f?"text-zinc-400":"text-muted-foreground";let $;e[18]!==k?($=z("size-4 shrink-0",k),e[18]=k,e[19]=$):$=e[19];let I;e[20]!==$?(I=n.jsx(Rt,{className:$}),e[20]=$,e[21]=I):I=e[21];let E;e[22]!==_||e[23]!==P||e[24]!==I||e[25]!==l?(E=n.jsx(se,{variant:"ghost",size:"icon",className:_,onClick:l,"aria-label":"Expand sidebar",disabled:P,children:I}),e[22]=_,e[23]=P,e[24]=I,e[25]=l,e[26]=E):E=e[26];let T;e[27]!==E||e[28]!==S?(T=n.jsxs("div",{className:"group/switcher relative flex items-center justify-center gap-1.5 min-w-0 flex-1 overflow-hidden",children:[S,E]}),e[27]=E,e[28]=S,e[29]=T):T=e[29];const B=o&&"hidden";let A;e[30]!==B?(A=z("flex items-center gap-0.5 shrink-0",B),e[30]=B,e[31]=A):A=e[31];const D=f?"hover:bg-zinc-800 text-zinc-400 hover:text-white":"hover:bg-sidebar-accent";let R;e[32]!==D?(R=z("size-7",D),e[32]=D,e[33]=R):R=e[33];const M=f?"text-zinc-400":"text-muted-foreground";let H;e[34]!==M?(H=z("size-4",M),e[34]=M,e[35]=H):H=e[35];let F;e[36]!==H?(F=n.jsx(Dt,{className:H}),e[36]=H,e[37]=F):F=e[37];let U;e[38]!==o||e[39]!==R||e[40]!==F||e[41]!==l?(U=n.jsx(Be,{asChild:!0,children:n.jsx(se,{variant:"ghost",size:"icon",className:R,onClick:l,"aria-label":"Collapse sidebar",disabled:o,children:F})}),e[38]=o,e[39]=R,e[40]=F,e[41]=l,e[42]=U):U=e[42];let W;e[43]===Symbol.for("react.memo_cache_sentinel")?(W=n.jsx(Ue,{side:"bottom",children:"Collapse sidebar"}),e[43]=W):W=e[43];let V;e[44]!==U?(V=n.jsxs(Fe,{children:[U,W]}),e[44]=U,e[45]=V):V=e[45];let Z;e[46]!==i||e[47]!==f?(Z=z("size-7",f?z("hover:bg-zinc-800 text-zinc-400 hover:text-white",i&&"bg-zinc-800 text-white"):z("hover:bg-sidebar-accent",i&&"bg-sidebar-accent")),e[46]=i,e[47]=f,e[48]=Z):Z=e[48];const q=f?"text-inherit":"text-muted-foreground";let J;e[49]!==q?(J=z(q),e[49]=q,e[50]=J):J=e[50];let K;e[51]!==J?(K=n.jsx(yt,{size:11,className:J}),e[51]=J,e[52]=K):K=e[52];let G;e[53]!==o||e[54]!==Z||e[55]!==K||e[56]!==p?(G=n.jsx(Be,{asChild:!0,children:n.jsx(se,{variant:"ghost",size:"icon",className:Z,onClick:p,"aria-label":"Toggle Decopilot",disabled:o,children:K})}),e[53]=o,e[54]=Z,e[55]=K,e[56]=p,e[57]=G):G=e[57];let X;e[58]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx(Ue,{side:"bottom",children:"Toggle Decopilot"}),e[58]=X):X=e[58];let Y;e[59]!==G?(Y=n.jsxs(Fe,{children:[G,X]}),e[59]=G,e[60]=Y):Y=e[60];let O;e[61]!==A||e[62]!==V||e[63]!==Y?(O=n.jsxs("div",{className:A,children:[V,Y]}),e[61]=A,e[62]=V,e[63]=Y,e[64]=O):O=e[64];let L;e[65]!==T||e[66]!==O?(L=n.jsx(pe,{children:n.jsx(oe,{children:n.jsxs("div",{className:"flex items-center justify-between w-full h-12",children:[T,O]})})}),e[65]=T,e[66]=O,e[67]=L):L=e[67];let Q;return e[68]!==L||e[69]!==h?(Q=n.jsx(Gt,{className:h,children:L}),e[68]=L,e[69]=h,e[70]=Q):Q=e[70],Q}function Wn(t){return!t}Qe.Skeleton=function({isDark:e=!1}){return n.jsx(Gt,{className:z("h-12 gap-0 pt-0",e&&"bg-[#030302] border-b border-zinc-800"),children:n.jsx(pe,{children:n.jsx(oe,{children:n.jsxs("div",{className:"flex items-center justify-between w-full h-12",children:[n.jsxs("div",{className:"flex items-center gap-1.5 min-w-0 flex-1 px-1.5",children:[n.jsx(te,{className:z("size-5 rounded-[5px] shrink-0",e&&"bg-zinc-800")}),n.jsx(te,{className:z("h-3.5 w-16",e&&"bg-zinc-800")})]}),n.jsxs("div",{className:"flex items-center gap-0.5",children:[n.jsx(te,{className:z("size-7 rounded-lg",e&&"bg-zinc-800")}),n.jsx(te,{className:z("size-7 rounded-lg",e&&"bg-zinc-800")})]})]})})})})};function Vn(){const t=N.c(10),{locator:e}=ae(),s=xe(),l=We().location.pathname;let o;t[0]!==l?(o=l.includes("/settings"),t[0]=l,t[1]=o):o=t[1];const i=o;let a;t[2]!==e||t[3]!==s?(a=()=>{s({to:"/$org/$project/settings",params:ze.parse(e)})},t[2]=e,t[3]=s,t[4]=a):a=t[4];const c=a;let d,m;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:n.jsx(at,{})}),m=n.jsx("span",{className:"truncate",children:"Settings"}),t[5]=d,t[6]=m):(d=t[5],m=t[6]);let f;return t[7]!==c||t[8]!==i?(f=n.jsx(jn,{className:"py-2 border-r",children:n.jsx(pe,{children:n.jsx(oe,{children:n.jsxs(Ae,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:c,isActive:i,tooltip:"Settings",children:[d,m]})})})}),t[7]=c,t[8]=i,t[9]=f):f=t[9],f}function Xt(t){const e=N.c(4),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ct,{className:"my-2 -ml-1"}),e[0]=r):r=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(oe,{children:n.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:n.jsx("span",{className:"whitespace-nowrap",children:"Pinned Views"})})}),e[1]=l):l=e[1];let o;return e[2]!==s?(o=n.jsxs(n.Fragment,{children:[r,l,s]}),e[2]=s,e[3]=o):o=e[3],o}function Kn(t){const e=N.c(26),{item:s}=t,r=xe(),{org:l}=ae(),o=Tt(l.id),i=Us(l.id);let a;e[0]!==i.update||e[1]!==s.url||e[2]!==o?.sidebar_items?(a=async()=>{const S=(o?.sidebar_items||[]).filter(C=>C.url!==s.url);await i.update.mutateAsync({sidebar_items:S})},e[0]=i.update,e[1]=s.url,e[2]=o?.sidebar_items,e[3]=a):a=e[3];const c=a;let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=/^https?:\/\/.+/,e[4]=d):d=e[4];let m;e[5]!==s.icon?(m=d.test(s.icon),e[5]=s.icon,e[6]=m):m=e[6];const f=m;let u;e[7]!==s.url||e[8]!==r?(u=()=>{r({to:s.url})},e[7]=s.url,e[8]=r,e[9]=u):u=e[9];const p=s.title;let x;e[10]!==f||e[11]!==s.icon||e[12]!==s.title?(x=n.jsx("div",{className:"flex items-center justify-center shrink-0",children:f?n.jsx("img",{src:s.icon,alt:s.title,className:"h-4 w-4 rounded object-cover"}):n.jsx(Bs,{size:16,className:"text-muted-foreground group-hover/item:text-foreground transition-colors"})}),e[10]=f,e[11]=s.icon,e[12]=s.title,e[13]=x):x=e[13];let h;e[14]!==s.title?(h=s.title.toLocaleLowerCase(),e[14]=s.title,e[15]=h):h=e[15];let j;e[16]!==h?(j=n.jsx("div",{className:"flex-1 min-w-0 flex flex-col items-start",children:n.jsx("span",{className:"truncate text-sm w-full capitalize",children:h})}),e[16]=h,e[17]=j):j=e[17];let b;e[18]!==c?(b=n.jsx(He,{size:16,className:"text-muted-foreground opacity-0 group-hover/item:opacity-50 hover:opacity-100 cursor-pointer",onClick:v=>{v.preventDefault(),v.stopPropagation(),c()}}),e[18]=c,e[19]=b):b=e[19];let g;return e[20]!==s.title||e[21]!==u||e[22]!==x||e[23]!==j||e[24]!==b?(g=n.jsx(oe,{children:n.jsxs(Ae,{className:"w-full pr-2 group/item relative cursor-pointer text-foreground/90 hover:text-foreground",onClick:u,tooltip:p,children:[x,j,b]})}),e[20]=s.title,e[21]=u,e[22]=x,e[23]=j,e[24]=b,e[25]=g):g=e[25],g}function ht(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(oe,{children:n.jsx("div",{className:"flex items-center gap-2 px-4 py-2",children:n.jsx(te,{className:"h-4 flex-1"})})}),t[0]=e):e=t[0],e}function Gn(){const t=N.c(4),{org:e}=ae(),r=Tt(e.id)?.sidebar_items;if(!r?.length)return null;let l;t[0]!==r?(l=r.map(Zn),t[0]=r,t[1]=l):l=t[1];let o;return t[2]!==l?(o=n.jsx(Xt,{children:l}),t[2]=l,t[3]=o):o=t[3],o}function Zn(t){return n.jsx(Kn,{item:t},t.url)}function Yn(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(w.Suspense,{fallback:n.jsxs(Xt,{children:[n.jsx(ht,{}),n.jsx(ht,{})]}),children:n.jsx(Gn,{})}),t[0]=e):e=t[0],e}function qn(t){const e=N.c(11),{project:s}=t,r=s.ui?.themeColor??"#60a5fa";if(s.ui?.icon){let c;return e[0]!==s.ui.icon?(c=n.jsx("img",{src:s.ui.icon,alt:"",className:"size-4 rounded object-cover border border-border/50"}),e[0]=s.ui.icon,e[1]=c):c=e[1],c}let l;e[2]!==r?(l={backgroundColor:r},e[2]=r,e[3]=l):l=e[3];let o;e[4]!==s.name?(o=s.name.charAt(0).toUpperCase(),e[4]=s.name,e[5]=o):o=e[5];let i;e[6]!==o?(i=n.jsx("span",{className:"text-[10px] font-medium text-white",children:o}),e[6]=o,e[7]=i):i=e[7];let a;return e[8]!==l||e[9]!==i?(a=n.jsx("div",{className:"size-4 rounded flex items-center justify-center border border-border/50",style:l,children:i}),e[8]=l,e[9]=i,e[10]=a):a=e[10],a}function Jn(t){const e=N.c(14),{project:s}=t,r=xe(),{org:l}=ae();let o;e[0]!==r||e[1]!==l.slug||e[2]!==s.slug?(o=()=>{r({to:"/$org/$project",params:{org:l.slug,project:s.slug}})},e[0]=r,e[1]=l.slug,e[2]=s.slug,e[3]=o):o=e[3];let i;e[4]!==s?(i=n.jsx(qn,{project:s}),e[4]=s,e[5]=i):i=e[5];let a;e[6]!==s.name?(a=n.jsx("span",{className:"truncate flex-1",children:s.name}),e[6]=s.name,e[7]=a):a=e[7];let c;e[8]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(It,{size:12,className:"text-muted-foreground opacity-0 group-hover/item:opacity-100 transition-opacity"}),e[8]=c):c=e[8];let d;return e[9]!==s.name||e[10]!==o||e[11]!==i||e[12]!==a?(d=n.jsx(oe,{children:n.jsxs(Ae,{className:"group/item cursor-pointer text-foreground/90 hover:text-foreground",onClick:o,tooltip:s.name,children:[i,a,c]})}),e[9]=s.name,e[10]=o,e[11]=i,e[12]=a,e[13]=d):d=e[13],d}function Xn(){const t=N.c(54),{org:e}=ae(),{data:s,isLoading:r}=zt(e.id),[l,o]=w.useState(!0),[i,a]=w.useState(!1);let c,d,m,f,u,p,x,h,j,b,g,v,S;if(t[0]!==r||t[1]!==l||t[2]!==s){S=Symbol.for("react.early_return_sentinel");e:{const E=s?.filter(er)??[];if(r){let H;t[16]===Symbol.for("react.memo_cache_sentinel")?(H=n.jsx(oe,{children:n.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[n.jsx(te,{className:"h-4 w-4 rounded"}),n.jsx(te,{className:"h-4 flex-1"})]})}),t[16]=H):H=t[16];let F;t[17]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsx(Pe,{className:"py-0",children:n.jsx(Te,{children:n.jsxs(pe,{className:"gap-0.5",children:[H,n.jsx(oe,{children:n.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[n.jsx(te,{className:"h-4 w-4 rounded"}),n.jsx(te,{className:"h-4 flex-1"})]})})]})})}),t[17]=F):F=t[17],S=F;break e}t[18]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(ct,{className:"my-2"}),t[18]=v):v=t[18],u=vs,b=l,g=o,f=Pe,j="py-0",m=Te,d=pe,x="gap-0.5";let T;t[19]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx("span",{children:"Projects"}),t[19]=T):T=t[19];const B=!l&&"-rotate-90";let A;t[20]!==B?(A=z("transition-transform",B),t[20]=B,t[21]=A):A=t[21];let D;t[22]!==A?(D=n.jsx(Ns,{asChild:!0,children:n.jsxs("button",{type:"button",className:"flex items-center gap-1 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors",children:[T,n.jsx(rt,{size:12,className:A})]})}),t[22]=A,t[23]=D):D=t[23];let R;t[24]===Symbol.for("react.memo_cache_sentinel")?(R=()=>a(!0),t[24]=R):R=t[24];let M;t[25]===Symbol.for("react.memo_cache_sentinel")?(M=n.jsx("button",{type:"button",onClick:R,className:"text-muted-foreground hover:text-foreground transition-colors p-0.5 rounded hover:bg-accent",title:"Create new project",children:n.jsx(Ke,{size:16})}),t[25]=M):M=t[25],t[26]!==D?(h=n.jsx(oe,{children:n.jsxs("div",{className:"flex items-center justify-between px-2 h-6",children:[D,M]})}),t[26]=D,t[27]=h):h=t[27],c=Ss,p=E.length===0?n.jsx(oe,{children:n.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:"No projects yet"})}):E.map(Qn)}t[0]=r,t[1]=l,t[2]=s,t[3]=c,t[4]=d,t[5]=m,t[6]=f,t[7]=u,t[8]=p,t[9]=x,t[10]=h,t[11]=j,t[12]=b,t[13]=g,t[14]=v,t[15]=S}else c=t[3],d=t[4],m=t[5],f=t[6],u=t[7],p=t[8],x=t[9],h=t[10],j=t[11],b=t[12],g=t[13],v=t[14],S=t[15];if(S!==Symbol.for("react.early_return_sentinel"))return S;let C;t[28]!==c||t[29]!==p?(C=n.jsx(c,{children:p}),t[28]=c,t[29]=p,t[30]=C):C=t[30];let y;t[31]!==d||t[32]!==x||t[33]!==h||t[34]!==C?(y=n.jsxs(d,{className:x,children:[h,C]}),t[31]=d,t[32]=x,t[33]=h,t[34]=C,t[35]=y):y=t[35];let _;t[36]!==m||t[37]!==y?(_=n.jsx(m,{children:y}),t[36]=m,t[37]=y,t[38]=_):_=t[38];let P;t[39]!==f||t[40]!==_||t[41]!==j?(P=n.jsx(f,{className:j,children:_}),t[39]=f,t[40]=_,t[41]=j,t[42]=P):P=t[42];let k;t[43]!==u||t[44]!==P||t[45]!==b||t[46]!==g?(k=n.jsx(u,{open:b,onOpenChange:g,children:P}),t[43]=u,t[44]=P,t[45]=b,t[46]=g,t[47]=k):k=t[47];let $;t[48]!==i?($=n.jsx(kt,{open:i,onOpenChange:a}),t[48]=i,t[49]=$):$=t[49];let I;return t[50]!==k||t[51]!==$||t[52]!==v?(I=n.jsxs(n.Fragment,{children:[v,k,$]}),t[50]=k,t[51]=$,t[52]=v,t[53]=I):I=t[53],I}function Qn(t){return n.jsx(Jn,{project:t},t.id)}function er(t){return t.slug!==ee}function tr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(w.Suspense,{fallback:n.jsx(Pe,{className:"py-0",children:n.jsx(Te,{children:n.jsx(pe,{className:"gap-0.5",children:n.jsx(oe,{children:n.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[n.jsx(te,{className:"h-4 w-4 rounded"}),n.jsx(te,{className:"h-4 flex-1"})]})})})})}),children:n.jsx(Xn,{})}),t[0]=e):e=t[0],e}function sr(t){const e=N.c(16),{onCreateProject:s}=t,[r]=Ge(),l=rn(),{locator:o}=ae();let i;e[0]!==o?(i=ze.isOrgAdminProject(o),e[0]=o,e[1]=i):i=e[1];const a=i;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Qe.Skeleton,{}),e[2]=c):c=e[2];let d;e[3]!==s?(d=n.jsx(w.Suspense,{fallback:c,children:n.jsx(Qe,{onCreateProject:s})}),e[3]=s,e[4]=d):d=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(Vn,{}),e[5]=m):m=e[5];let f;e[6]!==a||e[7]!==r?(f=a?r.experimental_projects?n.jsx(tr,{}):null:n.jsx(Yn,{}),e[6]=a,e[7]=r,e[8]=f):f=e[8];let u;e[9]!==f?(u=n.jsx(Ct,{children:n.jsx(w.Suspense,{fallback:null,children:f})}),e[9]=f,e[10]=u):u=e[10];const p=a?void 0:"pt-3";let x;return e[11]!==l||e[12]!==d||e[13]!==u||e[14]!==p?(x=n.jsx(Yt,{sections:l,header:d,footer:m,additionalContent:u,contentClassName:p}),e[11]=l,e[12]=d,e[13]=u,e[14]=p,e[15]=x):x=e[15],x}function nr(t){const e=N.c(12);let s,r,l,o;e[0]!==t?({className:s,orientation:l,decorative:o,...r}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o):(s=e[1],r=e[2],l=e[3],o=e[4]);const i=l===void 0?"horizontal":l,a=o===void 0?!0:o;let c;e[5]!==s?(c=z("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",s),e[5]=s,e[6]=c):c=e[6];let d;return e[7]!==a||e[8]!==i||e[9]!==r||e[10]!==c?(d=n.jsx(cs,{"data-slot":"separator-root",decorative:a,orientation:i,className:c,...r}),e[7]=a,e[8]=i,e[9]=r,e[10]=c,e[11]=d):d=e[11],d}const Qt=w.createContext(null);function rr(){const t=w.useContext(Qt);if(!t)throw new Error("TopbarSwitcher compound components must be used within TopbarSwitcher.Root");return t}function lr(t){const e=N.c(10),{children:s,onItemHover:r}=t,[l,o]=w.useState(null);let i;e[0]!==r?(i=f=>{o(f),r?.(f)},e[0]=r,e[1]=i):i=e[1];const a=i;let c;e[2]!==l||e[3]!==a?(c={hoveredItem:l,setHoveredItem:a},e[2]=l,e[3]=a,e[4]=c):c=e[4];let d;e[5]!==s?(d=n.jsx(lt,{children:s}),e[5]=s,e[6]=d):d=e[6];let m;return e[7]!==c||e[8]!==d?(m=n.jsx(Qt.Provider,{value:c,children:d}),e[7]=c,e[8]=d,e[9]=m):m=e[9],m}function or(t){const e=N.c(6),{children:s,onClick:r}=t;let l;e[0]!==s||e[1]!==r?(l=n.jsx(se,{variant:"link",className:"p-0.5 h-auto",onClick:r,type:"button",children:s}),e[0]=s,e[1]=r,e[2]=l):l=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(ot,{asChild:!0,children:n.jsx(se,{size:"icon",variant:"ghost",className:"w-6 h-6 p-0",children:n.jsx(St,{size:16,className:"opacity-50"})})}),e[3]=o):o=e[3];let i;return e[4]!==l?(i=n.jsxs("div",{className:"flex items-center gap-1",children:[l,o]}),e[4]=l,e[5]=i):i=e[5],i}function ir(t){const e=N.c(8),{item:s,fallback:r}=t,l=r===void 0?"":r,o=s?.avatarUrl??"",i=s?.name??l;let a;e[0]!==o||e[1]!==i?(a=n.jsx(me,{url:o,fallback:i,size:"xs",objectFit:"contain"}),e[0]=o,e[1]=i,e[2]=a):a=e[2];const c=s?.name??l;let d;e[3]!==c?(d=n.jsx("span",{children:c}),e[3]=c,e[4]=d):d=e[4];let m;return e[5]!==a||e[6]!==d?(m=n.jsxs("div",{className:"flex items-center gap-2",children:[a,d]}),e[5]=a,e[6]=d,e[7]=m):m=e[7],m}function ar(t){const e=N.c(6),{children:s,align:r}=t,l=r===void 0?"start":r,i=w.Children.toArray(s).filter(cr).length===1?"280px":"480px";let a;e[0]!==i?(a={width:i},e[0]=i,e[1]=a):a=e[1];let c;return e[2]!==l||e[3]!==s||e[4]!==a?(c=n.jsx(it,{align:l,className:"p-0 flex items-start",style:a,children:s}),e[2]=l,e[3]=s,e[4]=a,e[5]=c):c=e[5],c}function cr(t){return w.isValidElement(t)&&(t.type===ts||t.type===es)}function es(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex flex-col border-border w-[240px] border-r last:border-r-0 last:w-full",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}const ts=es;function dr(t){const e=N.c(6),{placeholder:s,value:r,onChange:l}=t,o=s===void 0?"Search...":s;let i;e[0]!==l?(i=c=>l(c.target.value),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==o||e[3]!==i||e[4]!==r?(a=n.jsx(Fs,{placeholder:o,value:r,onChange:i,className:"rounded-none border-t-0 border-x-0 focus-visible:border-border focus-visible:ring-0"}),e[2]=o,e[3]=i,e[4]=r,e[5]=a):a=e[5],a}function mr(t){const e=N.c(6),{children:s,emptyMessage:r}=t,l=r===void 0?"No items found.":r,o=w.Children.count(s)>0;let i;e[0]!==l||e[1]!==o?(i=!o&&n.jsx("div",{className:"text-muted-foreground text-sm px-1 py-8 text-center",children:l}),e[0]=l,e[1]=o,e[2]=i):i=e[2];let a;return e[3]!==s||e[4]!==i?(a=n.jsxs("div",{className:"flex flex-col gap-0.5 p-1 max-h-44 overflow-y-auto",children:[i,s]}),e[3]=s,e[4]=i,e[5]=a):a=e[5],a}function fr(t){const e=N.c(15),{item:s,onClick:r,onHover:l,children:o}=t,i=rr();let a;e[0]!==i||e[1]!==s||e[2]!==l?(a=()=>{i.setHoveredItem(s.slug),l?.(s)},e[0]=i,e[1]=s,e[2]=l,e[3]=a):a=e[3];const c=a;let d;e[4]!==s||e[5]!==r?(d=()=>r(s),e[4]=s,e[5]=r,e[6]=d):d=e[6];let m;e[7]!==o||e[8]!==s.avatarUrl||e[9]!==s.name?(m=o||n.jsxs(n.Fragment,{children:[n.jsx(me,{url:s.avatarUrl??"",fallback:s.name,size:"xs",className:"w-[22px]! h-[22px]!",objectFit:"contain"}),n.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:s.name})]}),e[7]=o,e[8]=s.avatarUrl,e[9]=s.name,e[10]=m):m=e[10];let f;return e[11]!==c||e[12]!==d||e[13]!==m?(f=n.jsx(se,{onClick:d,onMouseEnter:c,variant:"ghost",size:"sm",className:"w-full justify-start font-normal",children:m}),e[11]=c,e[12]=d,e[13]=m,e[14]=f):f=e[14],f}function ur(t){const e=N.c(2),{children:s}=t;let r;return e[0]!==s?(r=n.jsx("div",{className:"px-1 pb-1 pt-0.5",children:s}),e[0]=s,e[1]=r):r=e[1],r}function pr(t){const e=N.c(11),{onClick:s,icon:r,children:l,variant:o}=t,a=(o===void 0?"default":o)==="muted"&&"text-muted-foreground";let c;e[0]!==a?(c=z("w-full justify-start font-normal",a),e[0]=a,e[1]=c):c=e[1];let d;e[2]!==r?(d=r&&n.jsx("span",{className:"[&>svg]:size-4",children:r}),e[2]=r,e[3]=d):d=e[3];let m;e[4]!==l?(m=n.jsx("span",{children:l}),e[4]=l,e[5]=m):m=e[5];let f;return e[6]!==s||e[7]!==c||e[8]!==d||e[9]!==m?(f=n.jsxs(se,{variant:"ghost",size:"sm",className:c,onClick:s,children:[d,m]}),e[6]=s,e[7]=c,e[8]=d,e[9]=m,e[10]=f):f=e[10],f}function xr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(nr,{}),t[0]=e):e=t[0],e}function hr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"h-4 w-16 bg-accent rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const re=Object.assign(lr,{Trigger:or,CurrentItem:ir,Content:ar,Panel:ts,Search:dr,Items:mr,Item:fr,Actions:ur,Action:pr,Separator:xr,Skeleton:hr});function et(){const t=N.c(59);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:s}=tt(e),{data:r}=ie.useListOrganizations(),l=xe();let o;t[1]!==s||t[2]!==r?(o=r?.find(B=>B.slug===s),t[1]=s,t[2]=r,t[3]=o):o=t[3];const i=o,[a,c]=w.useState(""),[d,m]=w.useState(!1);let f,u,p,x,h,j,b,g;if(t[4]!==i||t[5]!==l||t[6]!==s||t[7]!==a||t[8]!==r){const A=(r?(()=>{const U=r.filter(W=>W.name.toLowerCase().includes(a.toLowerCase()));if(s){const W=U.findIndex(V=>V.slug===s);if(W>0){const V=U[W];V&&(U.splice(W,1),U.unshift(V))}}return U})():[]).map(gr);let D;t[17]!==i?(D=i?{slug:i.slug,name:i.name,avatarUrl:i.logo}:void 0,t[17]=i,t[18]=D):D=t[18];const R=D;x=re;let M;t[19]!==l||t[20]!==s?(M=()=>l({to:"/$org",params:{org:s??""}}),t[19]=l,t[20]=s,t[21]=M):M=t[21];let H;t[22]!==R?(H=n.jsx(re.CurrentItem,{item:R}),t[22]=R,t[23]=H):H=t[23],t[24]!==M||t[25]!==H?(g=n.jsx(re.Trigger,{onClick:M,children:H}),t[24]=M,t[25]=H,t[26]=g):g=t[26],p=re.Content,u=re.Panel,t[27]!==a?(b=n.jsx(re.Search,{placeholder:"Search organizations...",value:a,onChange:c}),t[27]=a,t[28]=b):b=t[28],f=re.Items,h="No organizations found.";let F;t[29]!==l?(F=U=>n.jsx(re.Item,{item:U,onClick:W=>l({to:"/$org",params:{org:W.slug}})},U.slug),t[29]=l,t[30]=F):F=t[30],j=A.map(F),t[4]=i,t[5]=l,t[6]=s,t[7]=a,t[8]=r,t[9]=f,t[10]=u,t[11]=p,t[12]=x,t[13]=h,t[14]=j,t[15]=b,t[16]=g}else f=t[9],u=t[10],p=t[11],x=t[12],h=t[13],j=t[14],b=t[15],g=t[16];let v;t[31]!==f||t[32]!==h||t[33]!==j?(v=n.jsx(f,{emptyMessage:h,children:j}),t[31]=f,t[32]=h,t[33]=j,t[34]=v):v=t[34];let S,C;t[35]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(re.Actions,{children:n.jsx(re.Action,{onClick:()=>m(!0),variant:"muted",children:"+ Create organization"})}),C=n.jsx(re.Separator,{}),t[35]=S,t[36]=C):(S=t[35],C=t[36]);let y;t[37]!==l?(y=()=>l({to:"/"}),t[37]=l,t[38]=y):y=t[38];let _;t[39]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(Ws,{}),t[39]=_):_=t[39];let P;t[40]!==y?(P=n.jsx(re.Actions,{children:n.jsx(re.Action,{onClick:y,icon:_,children:"See all organizations"})}),t[40]=y,t[41]=P):P=t[41];let k;t[42]!==u||t[43]!==P||t[44]!==b||t[45]!==v?(k=n.jsxs(u,{children:[b,v,S,C,P]}),t[42]=u,t[43]=P,t[44]=b,t[45]=v,t[46]=k):k=t[46];let $;t[47]!==p||t[48]!==k?($=n.jsx(p,{children:k}),t[47]=p,t[48]=k,t[49]=$):$=t[49];let I;t[50]!==x||t[51]!==$||t[52]!==g?(I=n.jsxs(x,{children:[g,$]}),t[50]=x,t[51]=$,t[52]=g,t[53]=I):I=t[53];let E;t[54]!==d?(E=n.jsx(Ot,{open:d,onOpenChange:m}),t[54]=d,t[55]=E):E=t[55];let T;return t[56]!==I||t[57]!==E?(T=n.jsxs(n.Fragment,{children:[I,E]}),t[56]=I,t[57]=E,t[58]=T):T=t[58],T}function gr(t){return{slug:t.slug,name:t.name,avatarUrl:t.logo}}et.Skeleton=re.Skeleton;function jr(){const t=N.c(10),{locator:e}=ae(),s=Vs();if(ze.isOrgAdminProject(e))return null;const l=s?.leftRef;let o;t[0]!==l?(o=n.jsx("div",{ref:l,className:"flex items-center gap-2 flex-1 min-w-0"}),t[0]=l,t[1]=o):o=t[1];const i=s?.centerRef;let a;t[2]!==i?(a=n.jsx("div",{ref:i,className:"flex flex-1 h-full items-center justify-center px-4 min-w-0 [&:empty]:hidden"}),t[2]=i,t[3]=a):a=t[3];const c=s?.rightRef;let d;t[4]!==c?(d=n.jsx("div",{ref:c,className:"flex flex-1 gap-2 h-full items-center justify-end min-w-0 [&:empty]:hidden"}),t[4]=c,t[5]=d):d=t[5];let m;return t[6]!==o||t[7]!==a||t[8]!==d?(m=n.jsx("div",{className:"dark",children:n.jsxs("header",{className:"sticky top-0 z-50 h-12 bg-background flex items-center px-4 shrink-0",children:[o,a,d]})}),t[6]=o,t[7]=a,t[8]=d,t[9]=m):m=t[9],m}function br({prop:t,defaultProp:e,onChange:s=()=>{}}){const[r,l]=vr({defaultProp:e,onChange:s}),o=t!==void 0,i=o?t:r,a=bt(s),c=w.useCallback(d=>{if(o){const f=typeof d=="function"?d(t):d;f!==t&&a(f)}else l(d)},[o,t,l,a]);return[i,c]}function vr({defaultProp:t,onChange:e}){const s=w.useState(t),[r]=s,l=w.useRef(r),o=bt(e);return w.useEffect(()=>{l.current!==r&&(o(r),l.current=r)},[r,l,o]),s}function Nr(t){const e=N.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let r;return e[2]!==s?(r=n.jsx($e.Root,{"data-slot":"drawer",...s}),e[2]=s,e[3]=r):r=e[3],r}function Sr(t){const e=N.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let r;return e[2]!==s?(r=n.jsx($e.Trigger,{"data-slot":"drawer-trigger",...s}),e[2]=s,e[3]=r):r=e[3],r}function yr(t){const e=N.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let r;return e[2]!==s?(r=n.jsx($e.Portal,{"data-slot":"drawer-portal",...s}),e[2]=s,e[3]=r):r=e[3],r}function wr(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx($e.Overlay,{"data-slot":"drawer-overlay",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Cr(t){const e=N.c(12);let s,r,l;e[0]!==t?({className:r,children:s,...l}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l):(s=e[1],r=e[2],l=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(wr,{}),e[4]=o):o=e[4];let i;e[5]!==r?(i=z("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",r),e[5]=r,e[6]=i):i=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=a):a=e[7];let c;return e[8]!==s||e[9]!==l||e[10]!==i?(c=n.jsxs(yr,{"data-slot":"drawer-portal",children:[o,n.jsxs($e.Content,{"data-slot":"drawer-content",className:i,...l,children:[a,s]})]}),e[8]=s,e[9]=l,e[10]=i,e[11]=c):c=e[11],c}function kr(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex flex-col gap-1.5 px-4 py-2",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"drawer-header",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function _r(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("text-foreground font-semibold",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx($e.Title,{"data-slot":"drawer-title",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}const ss=w.createContext({setOpen:()=>{}}),zr=()=>w.useContext(ss),$r=t=>{const e=N.c(25);let s,r,l,o,i;e[0]!==t?({children:s,defaultOpen:r,open:o,onOpenChange:l,...i}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o,e[5]=i):(s=e[1],r=e[2],l=e[3],o=e[4],i=e[5]);const a=r??!1;let c;e[6]!==l||e[7]!==o||e[8]!==a?(c={prop:o,defaultProp:a,onChange:l},e[6]=l,e[7]=o,e[8]=a,e[9]=c):c=e[9];const[d,m]=br(c);let f;e[10]!==m?(f={setOpen:m},e[10]=m,e[11]=f):f=e[11];let u;e[12]!==s||e[13]!==d||e[14]!==i||e[15]!==m?(u=n.jsx(Nr,{open:d,onOpenChange:m,...i,children:s}),e[12]=s,e[13]=d,e[14]=i,e[15]=m,e[16]=u):u=e[16];let p;e[17]!==d||e[18]!==i||e[19]!==m||e[20]!==u?(p=n.jsx(Ys,{open:d,onOpenChange:m,...i,children:u}),e[17]=d,e[18]=i,e[19]=m,e[20]=u,e[21]=p):p=e[21];let x;return e[22]!==f||e[23]!==p?(x=n.jsx(ss.Provider,{value:f,children:p}),e[22]=f,e[23]=p,e[24]=x):x=e[24],x},Ir=t=>{const{children:e,title:s,...r}=t,l=Ee(),{className:o,...i}=r;return l?n.jsxs(Cr,{...i,children:[n.jsx(kr,{className:"hidden",children:n.jsx(_r,{children:s})}),n.jsx("div",{className:z("flex flex-col gap-2 p-2 py-4",o),children:e})]}):n.jsx(Zs,{...r,children:e})},Or=t=>{const{children:e,...s}=t,{setOpen:r}=zr(),l=Ee(),{className:o,...i}=s;return l?n.jsx("div",{...i,onClick:a=>{r(!1);const{onClick:c}=i;c?.(a)},className:z("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),children:e}):n.jsx(qs,{...s,children:e})},Pr=t=>{const e=N.c(7);let s,r;e[0]!==t?({children:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);const l=Ee();let o;return e[3]!==s||e[4]!==l||e[5]!==r?(o=l?n.jsx(Sr,{asChild:!0,children:s}):n.jsx(Gs,{...r,children:s}),e[3]=s,e[4]=l,e[5]=r,e[6]=o):o=e[6],o},Tr=t=>{const e=N.c(7);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);const l=Ee();let o;return e[3]!==s||e[4]!==l||e[5]!==r?(o=l?n.jsx(pt,{className:z(s),...r}):n.jsx(pt,{className:z(s),...r}),e[3]=s,e[4]=l,e[5]=r,e[6]=o):o=e[6],o};function Er(t){const e=N.c(11),{user:s,trigger:r,align:l,children:o}=t,i=l===void 0?"start":l;let a;e[0]!==r||e[1]!==s?(a=r(s),e[0]=r,e[1]=s,e[2]=a):a=e[2];let c;e[3]!==a?(c=n.jsx(Pr,{asChild:!0,children:n.jsx("div",{children:a})}),e[3]=a,e[4]=c):c=e[4];let d;e[5]!==i||e[6]!==o?(d=n.jsx(Ir,{side:"top",align:i,className:"md:w-[240px]",children:o}),e[5]=i,e[6]=o,e[7]=d):d=e[7];let m;return e[8]!==c||e[9]!==d?(m=n.jsxs($r,{children:[c,d]}),e[8]=c,e[9]=d,e[10]=m):m=e[10],m}function Ar(t){const e=N.c(8),{children:s,onClick:r,className:l,asChild:o}=t;let i;e[0]!==o||e[1]!==s||e[2]!==r?(i=o?s:n.jsx("button",{type:"button",className:"flex items-center gap-2 text-sm w-full cursor-pointer",onClick:r,children:s}),e[0]=o,e[1]=s,e[2]=r,e[3]=i):i=e[3];let a;return e[4]!==o||e[5]!==l||e[6]!==i?(a=n.jsx(Or,{asChild:o,className:l,children:i}),e[4]=o,e[5]=l,e[6]=i,e[7]=a):a=e[7],a}function Mr(t){const e=N.c(2),{className:s}=t;let r;return e[0]!==s?(r=n.jsx(Tr,{className:s}),e[0]=s,e[1]=r):r=e[1],r}function Lr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const ce=Object.assign(Er,{Item:Ar,Separator:Mr,Skeleton:Lr});function Dr(t){const e=N.c(49),{user:s,userImage:r}=t,[l,o]=w.useState(!1),[i,a]=w.useState(!1);let c;e[0]!==s.email||e[1]!==s.id||e[2]!==s.name?(c=()=>{const M=`ID: ${s.id}
4
4
  Name: ${s.name||"N/A"}
5
- Email: ${s.email}`;navigator.clipboard.writeText(M),a(!0),de.success("User info copied to clipboard"),setTimeout(()=>a(!1),2e3)},e[0]=s.email,e[1]=s.id,e[2]=s.name,e[3]=c):c=e[3];const d=c;let m;e[4]!==s.email||e[5]!==s.name||e[6]!==r?(m=()=>n.jsx(me,{url:r,fallback:s.name||s.email||"U",shape:"circle",size:"sm",className:"cursor-pointer hover:ring-2 ring-muted-foreground transition-all h-7 w-7"}),e[4]=s.email,e[5]=s.name,e[6]=r,e[7]=m):m=e[7];const f=s.name||s.email||"U";let u;e[8]!==f||e[9]!==r?(u=n.jsx(me,{url:r,fallback:f,shape:"circle",size:"sm"}),e[8]=f,e[9]=r,e[10]=u):u=e[10];const p=s.name||"User";let x;e[11]!==p?(x=n.jsx("div",{className:"text-sm font-medium truncate",children:p}),e[11]=p,e[12]=x):x=e[12];let h;e[13]!==s.email?(h=n.jsx("div",{className:"text-xs text-muted-foreground truncate",children:s.email}),e[13]=s.email,e[14]=h):h=e[14];let j;e[15]!==x||e[16]!==h?(j=n.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[x,h]}),e[15]=x,e[16]=h,e[17]=j):j=e[17];let b;e[18]!==i?(b=n.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:i?n.jsx(Oe,{size:16,className:"text-green-600"}):n.jsx(Pt,{size:16,className:"text-muted-foreground"})}),e[18]=i,e[19]=b):b=e[19];let g;e[20]!==u||e[21]!==j||e[22]!==b?(g=n.jsxs("div",{className:"group flex items-center gap-3 w-full py-1",children:[u,j,b]}),e[20]=u,e[21]=j,e[22]=b,e[23]=g):g=e[23];let v;e[24]!==d||e[25]!==g?(v=n.jsx(ce.Item,{onClick:d,children:g}),e[24]=d,e[25]=g,e[26]=v):v=e[26];let S;e[27]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(ce.Separator,{}),e[27]=S):S=e[27];let C,y;e[28]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsxs(ce.Item,{onClick:()=>o(!0),children:[n.jsx(Xs,{className:"text-muted-foreground",size:18}),"Profile Settings"]}),y=n.jsx(ce.Separator,{}),e[28]=C,e[29]=y):(C=e[28],y=e[29]);let _;e[30]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(jt,{className:"w-4 h-4 text-muted-foreground"}),e[30]=_):_=e[30];let P;e[31]===Symbol.for("react.memo_cache_sentinel")?(P=n.jsx(ce.Item,{asChild:!0,children:n.jsxs("a",{href:"https://github.com/decocms/admin",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[_,"decocms/admin",n.jsx(xt,{size:18,className:"text-muted-foreground ml-auto"})]})}),e[31]=P):P=e[31];let k;e[32]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(Js,{className:"text-muted-foreground",size:18}),e[32]=k):k=e[32];let $,I;e[33]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx(ce.Item,{asChild:!0,children:n.jsxs("a",{href:"https://decocms.com",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[k,"Homepage",n.jsx(xt,{size:18,className:"ml-auto text-muted-foreground"})]})}),I=n.jsx(ce.Separator,{}),e[33]=$,e[34]=I):($=e[33],I=e[34]);let E,T,B;e[35]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsxs(ce.Item,{onClick:Rr,children:[n.jsx(Bt,{size:18,className:"text-muted-foreground"}),"Log out"]}),T=n.jsx(ce.Separator,{}),B=n.jsxs("div",{className:"px-2 py-1.5 text-[11px] text-muted-foreground/75",children:["v","2.96.1"]}),e[35]=E,e[36]=T,e[37]=B):(E=e[35],T=e[36],B=e[37]);let A;e[38]!==v||e[39]!==m||e[40]!==s?(A=n.jsxs(ce,{user:s,trigger:m,align:"end",children:[v,S,C,y,P,$,I,E,T,B]}),e[38]=v,e[39]=m,e[40]=s,e[41]=A):A=e[41];let D;e[42]!==l||e[43]!==s||e[44]!==r?(D=l&&n.jsx(qt,{open:l,onOpenChange:o,user:s,userImage:r}),e[42]=l,e[43]=s,e[44]=r,e[45]=D):D=e[45];let R;return e[46]!==A||e[47]!==D?(R=n.jsxs(n.Fragment,{children:[A,D]}),e[46]=A,e[47]=D,e[48]=R):R=e[48],R}function Rr(){return ie.signOut()}function Hr(){const t=N.c(7),{data:e}=ie.useSession();if(!e?.user){let c;return t[0]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(me,{url:void 0,fallback:"U",shape:"circle",size:"sm",className:"cursor-pointer h-7 w-7",muted:!0}),t[0]=c):c=t[0],c}const s=e.user,r=s.name??void 0;let l;t[1]!==r||t[2]!==s?(l={...s,name:r},t[1]=r,t[2]=s,t[3]=l):l=t[3];const o=l,i=s.image;let a;return t[4]!==i||t[5]!==o?(a=n.jsx(Dr,{user:o,userImage:i}),t[4]=i,t[5]=o,t[6]=a):a=t[6],a}function Ur(){const t=N.c(2),s=We().location.href;let r;return t[0]!==s?(r=n.jsx(us,{to:"/login",search:{next:s},replace:!0}),t[0]=s,t[1]=r):r=t[1],r}function Br(t){const e=N.c(6),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ds,{children:n.jsx(vt,{})}),e[0]=r):r=e[0];let l;e[1]!==s?(l=n.jsx(ms,{children:s}),e[1]=s,e[2]=l):l=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(fs,{children:n.jsx(Ur,{})}),e[3]=o):o=e[3];let i;return e[4]!==l?(i=n.jsxs(n.Fragment,{children:[r,l,o]}),e[4]=l,e[5]=i):i=e[5],i}function Fr(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("fixed top-0 left-0 right-0 z-20 bg-background flex items-center w-full h-12 border-b border-border",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Wr(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex items-center justify-center px-2.5 h-full border-r border-border",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Vr(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex items-center gap-2 px-2 h-full",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Kr(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex items-center gap-2 px-2 h-full flex-1",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Gr(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex items-center gap-2 px-2 h-full ml-auto",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Zr(){const t=N.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex items-center justify-center px-2 h-full border-r border-border",children:n.jsx("div",{className:"w-8 h-8 bg-muted rounded-md animate-pulse"})}),t[0]=e):e=t[0];let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx("div",{className:"flex items-center gap-2 px-2 h-full",children:n.jsx("div",{className:"w-32 h-6 bg-muted rounded-md animate-pulse"})}),t[1]=s):s=t[1];let r;return t[2]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsxs("div",{className:"fixed top-0 left-0 right-0 z-20 bg-background flex items-center w-full h-12 border-b border-border",children:[e,s,n.jsx("div",{className:"flex items-center gap-2 px-2 h-full ml-auto",children:n.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"})})]}),t[2]=r):r=t[2],r}const Re=Object.assign(Fr,{Sidebar:Wr,Left:Vr,Center:Kr,Right:Gr,Skeleton:Zr});function ns(){const t=N.c(3),{toggleSidebar:e}=Ze();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(Ut,{className:"text-muted-foreground/85 group-hover:text-foreground transition-colors",size:18}),t[0]=s):s=t[0];let r;return t[1]!==e?(r=n.jsx(n.Fragment,{children:n.jsx(se,{onClick:e,size:"icon",variant:"ghost",className:"w-7 h-7 rounded-md",children:s})}),t[1]=e,t[2]=r):r=t[2],r}ns.Skeleton=function(){return n.jsx("div",{className:"w-7 h-7 bg-muted rounded-md animate-pulse"})};function Yr({showSidebarToggle:t=!1,showOrgSwitcher:e=!1,showDecoChat:s=!1,disableDecoChat:r=!1}){const[l,o]=Ve(),i=w.useRef(r);r&&l&&i.current!==r&&o(!1),i.current=r;const a=()=>{r||o(c=>!c)};return n.jsxs(Re,{children:[t&&n.jsx(Re.Sidebar,{children:n.jsx(ns,{})}),n.jsx(Re.Left,{children:e&&n.jsx(w.Suspense,{fallback:n.jsx(et.Skeleton,{}),children:n.jsx(et,{})})}),n.jsxs(Re.Right,{className:"gap-2",children:[s&&!r&&n.jsxs(se,{size:"sm",variant:"default",onClick:a,className:"h-7 gap-2",children:[n.jsx(yt,{size:16}),"Chat"]}),n.jsx(Hr,{})]})]})}function qr(t){const e=N.c(10),{children:s,className:r}=t,[,l]=w.useTransition();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=nt.decoChatPanelWidth(),e[0]=o):o=e[0];const[i,a]=st(o,30);let c;e[1]!==a?(c=u=>l(()=>a(u)),e[1]=a,e[2]=c):c=e[2];const d=c;let m;e[3]!==r?(m=z("min-w-0",r),e[3]=r,e[4]=m):m=e[4];let f;return e[5]!==i||e[6]!==s||e[7]!==d||e[8]!==m?(f=n.jsx(Et,{defaultSize:i,minSize:20,className:m,onResize:d,children:s}),e[5]=i,e[6]=s,e[7]=d,e[8]=m,e[9]=f):f=e[9],f}function Jr(t){const e=N.c(5),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=nt.sidebarOpen(),e[0]=r):r=e[0];const[l,o]=st(r,!0);let i;return e[1]!==s||e[2]!==o||e[3]!==l?(i=n.jsx(fn,{open:l,onOpenChange:o,children:s}),e[1]=s,e[2]=o,e[3]=l,e[4]=i):i=e[4],i}function Xr(t){const e=N.c(6),{disableChat:s}=t,r=s===void 0?!1:s,[l]=Ve();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Et,{className:"bg-background",children:n.jsx(Nt,{})}),e[0]=o):o=e[0];let i;e[1]!==l||e[2]!==r?(i=!r&&n.jsxs(n.Fragment,{children:[n.jsx(Qs,{withHandle:l}),n.jsx(qr,{className:z(l?"max-w-none":"max-w-0"),children:n.jsx(sn,{})})]}),e[1]=l,e[2]=r,e[3]=i):i=e[3];let a;return e[4]!==i?(a=n.jsxs(en,{direction:"horizontal",children:[o,i]}),e[4]=i,e[5]=a):a=e[5],a}function Qr(){const{org:t,project:e}=tt({strict:!1}),s=We(),[r,l]=w.useState(!1),o=s.location.pathname===`/${t}/${e}`||s.location.pathname===`/${t}/${e}/`,i=e??ee,{data:a}=ps({queryKey:xs.activeOrganization(t),queryFn:async()=>{if(!t)return null;const{data:d}=await ie.organization.setActive({organizationSlug:t});return{org:d,project:{slug:i,isOrgAdmin:i===ee}}},gcTime:1/0,staleTime:1/0,refetchOnWindowFocus:!1,refetchOnMount:!1});if(!a)return n.jsxs("div",{className:"min-h-screen bg-background",children:[n.jsx(Yr,{}),n.jsx("div",{className:"pt-12",children:n.jsx(Nt,{})})]});if(!a.org)return window.location.pathname!=="/"&&(window.location.href="/"),null;const c={...a,project:{...a.project,slug:i,isOrgAdmin:i===ee}};return n.jsxs(hs,{...c,children:[n.jsx(Jr,{children:n.jsxs("div",{className:"flex flex-col h-screen",style:{"--project-topbar-height":i===ee?"0px":"48px"},children:[n.jsx("style",{children:`
5
+ Email: ${s.email}`;navigator.clipboard.writeText(M),a(!0),de.success("User info copied to clipboard"),setTimeout(()=>a(!1),2e3)},e[0]=s.email,e[1]=s.id,e[2]=s.name,e[3]=c):c=e[3];const d=c;let m;e[4]!==s.email||e[5]!==s.name||e[6]!==r?(m=()=>n.jsx(me,{url:r,fallback:s.name||s.email||"U",shape:"circle",size:"sm",className:"cursor-pointer hover:ring-2 ring-muted-foreground transition-all h-7 w-7"}),e[4]=s.email,e[5]=s.name,e[6]=r,e[7]=m):m=e[7];const f=s.name||s.email||"U";let u;e[8]!==f||e[9]!==r?(u=n.jsx(me,{url:r,fallback:f,shape:"circle",size:"sm"}),e[8]=f,e[9]=r,e[10]=u):u=e[10];const p=s.name||"User";let x;e[11]!==p?(x=n.jsx("div",{className:"text-sm font-medium truncate",children:p}),e[11]=p,e[12]=x):x=e[12];let h;e[13]!==s.email?(h=n.jsx("div",{className:"text-xs text-muted-foreground truncate",children:s.email}),e[13]=s.email,e[14]=h):h=e[14];let j;e[15]!==x||e[16]!==h?(j=n.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[x,h]}),e[15]=x,e[16]=h,e[17]=j):j=e[17];let b;e[18]!==i?(b=n.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:i?n.jsx(Oe,{size:16,className:"text-green-600"}):n.jsx(Pt,{size:16,className:"text-muted-foreground"})}),e[18]=i,e[19]=b):b=e[19];let g;e[20]!==u||e[21]!==j||e[22]!==b?(g=n.jsxs("div",{className:"group flex items-center gap-3 w-full py-1",children:[u,j,b]}),e[20]=u,e[21]=j,e[22]=b,e[23]=g):g=e[23];let v;e[24]!==d||e[25]!==g?(v=n.jsx(ce.Item,{onClick:d,children:g}),e[24]=d,e[25]=g,e[26]=v):v=e[26];let S;e[27]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(ce.Separator,{}),e[27]=S):S=e[27];let C,y;e[28]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsxs(ce.Item,{onClick:()=>o(!0),children:[n.jsx(Xs,{className:"text-muted-foreground",size:18}),"Profile Settings"]}),y=n.jsx(ce.Separator,{}),e[28]=C,e[29]=y):(C=e[28],y=e[29]);let _;e[30]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(jt,{className:"w-4 h-4 text-muted-foreground"}),e[30]=_):_=e[30];let P;e[31]===Symbol.for("react.memo_cache_sentinel")?(P=n.jsx(ce.Item,{asChild:!0,children:n.jsxs("a",{href:"https://github.com/decocms/admin",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[_,"decocms/admin",n.jsx(xt,{size:18,className:"text-muted-foreground ml-auto"})]})}),e[31]=P):P=e[31];let k;e[32]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(Js,{className:"text-muted-foreground",size:18}),e[32]=k):k=e[32];let $,I;e[33]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx(ce.Item,{asChild:!0,children:n.jsxs("a",{href:"https://decocms.com",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[k,"Homepage",n.jsx(xt,{size:18,className:"ml-auto text-muted-foreground"})]})}),I=n.jsx(ce.Separator,{}),e[33]=$,e[34]=I):($=e[33],I=e[34]);let E,T,B;e[35]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsxs(ce.Item,{onClick:Rr,children:[n.jsx(Bt,{size:18,className:"text-muted-foreground"}),"Log out"]}),T=n.jsx(ce.Separator,{}),B=n.jsxs("div",{className:"px-2 py-1.5 text-[11px] text-muted-foreground/75",children:["v","2.96.2"]}),e[35]=E,e[36]=T,e[37]=B):(E=e[35],T=e[36],B=e[37]);let A;e[38]!==v||e[39]!==m||e[40]!==s?(A=n.jsxs(ce,{user:s,trigger:m,align:"end",children:[v,S,C,y,P,$,I,E,T,B]}),e[38]=v,e[39]=m,e[40]=s,e[41]=A):A=e[41];let D;e[42]!==l||e[43]!==s||e[44]!==r?(D=l&&n.jsx(qt,{open:l,onOpenChange:o,user:s,userImage:r}),e[42]=l,e[43]=s,e[44]=r,e[45]=D):D=e[45];let R;return e[46]!==A||e[47]!==D?(R=n.jsxs(n.Fragment,{children:[A,D]}),e[46]=A,e[47]=D,e[48]=R):R=e[48],R}function Rr(){return ie.signOut()}function Hr(){const t=N.c(7),{data:e}=ie.useSession();if(!e?.user){let c;return t[0]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(me,{url:void 0,fallback:"U",shape:"circle",size:"sm",className:"cursor-pointer h-7 w-7",muted:!0}),t[0]=c):c=t[0],c}const s=e.user,r=s.name??void 0;let l;t[1]!==r||t[2]!==s?(l={...s,name:r},t[1]=r,t[2]=s,t[3]=l):l=t[3];const o=l,i=s.image;let a;return t[4]!==i||t[5]!==o?(a=n.jsx(Dr,{user:o,userImage:i}),t[4]=i,t[5]=o,t[6]=a):a=t[6],a}function Ur(){const t=N.c(2),s=We().location.href;let r;return t[0]!==s?(r=n.jsx(us,{to:"/login",search:{next:s},replace:!0}),t[0]=s,t[1]=r):r=t[1],r}function Br(t){const e=N.c(6),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ds,{children:n.jsx(vt,{})}),e[0]=r):r=e[0];let l;e[1]!==s?(l=n.jsx(ms,{children:s}),e[1]=s,e[2]=l):l=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(fs,{children:n.jsx(Ur,{})}),e[3]=o):o=e[3];let i;return e[4]!==l?(i=n.jsxs(n.Fragment,{children:[r,l,o]}),e[4]=l,e[5]=i):i=e[5],i}function Fr(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("fixed top-0 left-0 right-0 z-20 bg-background flex items-center w-full h-12 border-b border-border",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Wr(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex items-center justify-center px-2.5 h-full border-r border-border",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Vr(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex items-center gap-2 px-2 h-full",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Kr(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex items-center gap-2 px-2 h-full flex-1",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Gr(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex items-center gap-2 px-2 h-full ml-auto",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Zr(){const t=N.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex items-center justify-center px-2 h-full border-r border-border",children:n.jsx("div",{className:"w-8 h-8 bg-muted rounded-md animate-pulse"})}),t[0]=e):e=t[0];let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx("div",{className:"flex items-center gap-2 px-2 h-full",children:n.jsx("div",{className:"w-32 h-6 bg-muted rounded-md animate-pulse"})}),t[1]=s):s=t[1];let r;return t[2]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsxs("div",{className:"fixed top-0 left-0 right-0 z-20 bg-background flex items-center w-full h-12 border-b border-border",children:[e,s,n.jsx("div",{className:"flex items-center gap-2 px-2 h-full ml-auto",children:n.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"})})]}),t[2]=r):r=t[2],r}const Re=Object.assign(Fr,{Sidebar:Wr,Left:Vr,Center:Kr,Right:Gr,Skeleton:Zr});function ns(){const t=N.c(3),{toggleSidebar:e}=Ze();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(Ut,{className:"text-muted-foreground/85 group-hover:text-foreground transition-colors",size:18}),t[0]=s):s=t[0];let r;return t[1]!==e?(r=n.jsx(n.Fragment,{children:n.jsx(se,{onClick:e,size:"icon",variant:"ghost",className:"w-7 h-7 rounded-md",children:s})}),t[1]=e,t[2]=r):r=t[2],r}ns.Skeleton=function(){return n.jsx("div",{className:"w-7 h-7 bg-muted rounded-md animate-pulse"})};function Yr({showSidebarToggle:t=!1,showOrgSwitcher:e=!1,showDecoChat:s=!1,disableDecoChat:r=!1}){const[l,o]=Ve(),i=w.useRef(r);r&&l&&i.current!==r&&o(!1),i.current=r;const a=()=>{r||o(c=>!c)};return n.jsxs(Re,{children:[t&&n.jsx(Re.Sidebar,{children:n.jsx(ns,{})}),n.jsx(Re.Left,{children:e&&n.jsx(w.Suspense,{fallback:n.jsx(et.Skeleton,{}),children:n.jsx(et,{})})}),n.jsxs(Re.Right,{className:"gap-2",children:[s&&!r&&n.jsxs(se,{size:"sm",variant:"default",onClick:a,className:"h-7 gap-2",children:[n.jsx(yt,{size:16}),"Chat"]}),n.jsx(Hr,{})]})]})}function qr(t){const e=N.c(10),{children:s,className:r}=t,[,l]=w.useTransition();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=nt.decoChatPanelWidth(),e[0]=o):o=e[0];const[i,a]=st(o,30);let c;e[1]!==a?(c=u=>l(()=>a(u)),e[1]=a,e[2]=c):c=e[2];const d=c;let m;e[3]!==r?(m=z("min-w-0",r),e[3]=r,e[4]=m):m=e[4];let f;return e[5]!==i||e[6]!==s||e[7]!==d||e[8]!==m?(f=n.jsx(Et,{defaultSize:i,minSize:20,className:m,onResize:d,children:s}),e[5]=i,e[6]=s,e[7]=d,e[8]=m,e[9]=f):f=e[9],f}function Jr(t){const e=N.c(5),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=nt.sidebarOpen(),e[0]=r):r=e[0];const[l,o]=st(r,!0);let i;return e[1]!==s||e[2]!==o||e[3]!==l?(i=n.jsx(fn,{open:l,onOpenChange:o,children:s}),e[1]=s,e[2]=o,e[3]=l,e[4]=i):i=e[4],i}function Xr(t){const e=N.c(6),{disableChat:s}=t,r=s===void 0?!1:s,[l]=Ve();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Et,{className:"bg-background",children:n.jsx(Nt,{})}),e[0]=o):o=e[0];let i;e[1]!==l||e[2]!==r?(i=!r&&n.jsxs(n.Fragment,{children:[n.jsx(Qs,{withHandle:l}),n.jsx(qr,{className:z(l?"max-w-none":"max-w-0"),children:n.jsx(sn,{})})]}),e[1]=l,e[2]=r,e[3]=i):i=e[3];let a;return e[4]!==i?(a=n.jsxs(en,{direction:"horizontal",children:[o,i]}),e[4]=i,e[5]=a):a=e[5],a}function Qr(){const{org:t,project:e}=tt({strict:!1}),s=We(),[r,l]=w.useState(!1),o=s.location.pathname===`/${t}/${e}`||s.location.pathname===`/${t}/${e}/`,i=e??ee,{data:a}=ps({queryKey:xs.activeOrganization(t),queryFn:async()=>{if(!t)return null;const{data:d}=await ie.organization.setActive({organizationSlug:t});return{org:d,project:{slug:i,isOrgAdmin:i===ee}}},gcTime:1/0,staleTime:1/0,refetchOnWindowFocus:!1,refetchOnMount:!1});if(!a)return n.jsxs("div",{className:"min-h-screen bg-background",children:[n.jsx(Yr,{}),n.jsx("div",{className:"pt-12",children:n.jsx(Nt,{})})]});if(!a.org)return window.location.pathname!=="/"&&(window.location.href="/"),null;const c={...a,project:{...a.project,slug:i,isOrgAdmin:i===ee}};return n.jsxs(hs,{...c,children:[n.jsx(Jr,{children:n.jsxs("div",{className:"flex flex-col h-screen",style:{"--project-topbar-height":i===ee?"0px":"48px"},children:[n.jsx("style",{children:`
6
6
  [data-slot="sidebar-container"] {
7
7
  top: 0 !important;
8
8
  }
@@ -1 +1 @@
1
- import{c as C,y as d,j as a}from"./index-Dp8TDmPV.js";import{c as m}from"./button-CJa3f3rL.js";const u=d("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",special:"fill-special text-backround"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function h(f){const e=C.c(10),{variant:c,size:o}=f;let t;e[0]!==o||e[1]!==c?(t=m(u({variant:c,size:o})),e[0]=o,e[1]=c,e[2]=t):t=e[2];let l,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),i=a.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=l,e[4]=i):(l=e[3],i=e[4]);let s;e[5]!==t?(s=a.jsxs("svg",{"aria-hidden":"true",className:t,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l,i]}),e[5]=t,e[6]=s):s=e[6];let r;e[7]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=r):r=e[7];let n;return e[8]!==s?(n=a.jsxs("div",{role:"status",children:[s,r]}),e[8]=s,e[9]=n):n=e[9],n}export{h as S};
1
+ import{c as C,y as d,j as a}from"./index-B29giag9.js";import{c as m}from"./button-D-PerQqC.js";const u=d("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",special:"fill-special text-backround"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function h(f){const e=C.c(10),{variant:c,size:o}=f;let t;e[0]!==o||e[1]!==c?(t=m(u({variant:c,size:o})),e[0]=o,e[1]=c,e[2]=t):t=e[2];let l,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),i=a.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=l,e[4]=i):(l=e[3],i=e[4]);let s;e[5]!==t?(s=a.jsxs("svg",{"aria-hidden":"true",className:t,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l,i]}),e[5]=t,e[6]=s):s=e[6];let r;e[7]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=r):r=e[7];let n;return e[8]!==s?(n=a.jsxs("div",{role:"status",children:[s,r]}),e[8]=s,e[9]=n):n=e[9],n}export{h as S};
@@ -1 +1 @@
1
- import{c as h,a as S,j as o,A as x,S as g,b as j,e as b,f as _,g as y,O as N,N as p}from"./index-Dp8TDmPV.js";function R(e){const t=h.c(5),{appName:l}=e;let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},t[0]=s):s=t[0];const n=_(s);let a;if(t[1]!==n){const r=new URLSearchParams;for(const[d,u]of Object.entries(n))u!=null&&r.set(d,String(u));a=r.toString(),t[1]=n,t[2]=a}else a=t[2];const f=a,c=`/store/${encodeURIComponent(l)}${f?`?${f}`:""}`;let i;return t[3]!==c?(i=o.jsx(p,{to:"/login",search:{next:c},replace:!0}),t[3]=c,t[4]=i):i=t[4],i}function $(){const e=h.c(10);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const{appName:l}=S(t);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},e[1]=s):s=e[1];const n=_(s),{data:a,isPending:f}=y.useListOrganizations();if(f){let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(g,{}),e[2]=r):r=e[2],r}const m=a?.[0];if(!m){let r;return e[3]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(p,{to:"/",replace:!0}),e[3]=r):r=e[3],r}let c;e[4]!==l||e[5]!==m.slug?(c={org:m.slug,project:N,appName:l},e[4]=l,e[5]=m.slug,e[6]=c):c=e[6];let i;return e[7]!==n||e[8]!==c?(i=o.jsx(p,{to:"/$org/$project/store/$appName",params:c,search:n,replace:!0}),e[7]=n,e[8]=c,e[9]=i):i=e[9],i}function v(){const e=h.c(5);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const{appName:l}=S(t);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(x,{children:o.jsx(g,{})}),e[1]=s):s=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx(j,{children:o.jsx($,{})}),e[2]=n):n=e[2];let a;return e[3]!==l?(a=o.jsxs(o.Fragment,{children:[s,n,o.jsx(b,{children:o.jsx(R,{appName:l})})]}),e[3]=l,e[4]=a):a=e[4],a}export{v as default};
1
+ import{c as h,a as S,j as o,A as x,S as g,b as j,e as b,f as _,g as y,O as N,N as p}from"./index-B29giag9.js";function R(e){const t=h.c(5),{appName:l}=e;let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},t[0]=s):s=t[0];const n=_(s);let a;if(t[1]!==n){const r=new URLSearchParams;for(const[d,u]of Object.entries(n))u!=null&&r.set(d,String(u));a=r.toString(),t[1]=n,t[2]=a}else a=t[2];const f=a,c=`/store/${encodeURIComponent(l)}${f?`?${f}`:""}`;let i;return t[3]!==c?(i=o.jsx(p,{to:"/login",search:{next:c},replace:!0}),t[3]=c,t[4]=i):i=t[4],i}function $(){const e=h.c(10);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const{appName:l}=S(t);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},e[1]=s):s=e[1];const n=_(s),{data:a,isPending:f}=y.useListOrganizations();if(f){let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(g,{}),e[2]=r):r=e[2],r}const m=a?.[0];if(!m){let r;return e[3]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(p,{to:"/",replace:!0}),e[3]=r):r=e[3],r}let c;e[4]!==l||e[5]!==m.slug?(c={org:m.slug,project:N,appName:l},e[4]=l,e[5]=m.slug,e[6]=c):c=e[6];let i;return e[7]!==n||e[8]!==c?(i=o.jsx(p,{to:"/$org/$project/store/$appName",params:c,search:n,replace:!0}),e[7]=n,e[8]=c,e[9]=i):i=e[9],i}function v(){const e=h.c(5);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const{appName:l}=S(t);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(x,{children:o.jsx(g,{})}),e[1]=s):s=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx(j,{children:o.jsx($,{})}),e[2]=n):n=e[2];let a;return e[3]!==l?(a=o.jsxs(o.Fragment,{children:[s,n,o.jsx(b,{children:o.jsx(R,{appName:l})})]}),e[3]=l,e[4]=a):a=e[4],a}export{v as default};