@decocms/mesh 2.109.1 → 2.110.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/dist/client/assets/{AlertCircle-BNHu4U_w.js → AlertCircle-54XkBG75.js} +1 -1
  2. package/dist/client/assets/{AlertOctagon-B_77zMvV.js → AlertOctagon-D-n2_Ity.js} +1 -1
  3. package/dist/client/assets/{AlertTriangle-B3iutOXb.js → AlertTriangle-ZoXqH5xx.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-BCoINK1a.js → ArrowLeft-CYxjro91.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-BfLZrH4Z.js → ArrowUp-DRhMKIK5.js} +1 -1
  6. package/dist/client/assets/{Check-DG5LOfHE.js → Check-BHtow5c6.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-DXUyPLGJ.js → CheckCircle-DaStCoYU.js} +1 -1
  8. package/dist/client/assets/{CheckDone01-BVECQ061.js → CheckDone01-BkzpeEp8.js} +1 -1
  9. package/dist/client/assets/{ChevronDown-P4XeJ9w5.js → ChevronDown-DIu5de-X.js} +1 -1
  10. package/dist/client/assets/{ChevronRight-CHS1psX7.js → ChevronRight-Ds0FvHp6.js} +1 -1
  11. package/dist/client/assets/{Clock-DbrHehdf.js → Clock-CwhFkG9v.js} +1 -1
  12. package/dist/client/assets/{Code01-Dte9rLPH.js → Code01-CfpShGlI.js} +1 -1
  13. package/dist/client/assets/{Container-DZJok7qt.js → Container-DZaD5nKa.js} +1 -1
  14. package/dist/client/assets/{Copy01-CBdgbqFW.js → Copy01-qW8IV1YX.js} +1 -1
  15. package/dist/client/assets/{Dataflow03-WvCvIAmM.js → Dataflow03-1bin_Ob0.js} +1 -1
  16. package/dist/client/assets/{DotsHorizontal-x234Trom.js → DotsHorizontal-BU6_dxo0.js} +1 -1
  17. package/dist/client/assets/{DotsVertical-BAfOGQhL.js → DotsVertical-BRM5SG1z.js} +1 -1
  18. package/dist/client/assets/{Download01-B_ClGnf8.js → Download01-C-bkrJJ_.js} +1 -1
  19. package/dist/client/assets/{Edit01-BtQjuTbw.js → Edit01-BFKPZm51.js} +1 -1
  20. package/dist/client/assets/{Eye-HNj86q6R.js → Eye-Ci58n8nv.js} +1 -1
  21. package/dist/client/assets/{File02-D7uMen2N.js → File02-nqEm0je3.js} +1 -1
  22. package/dist/client/assets/{File06-CqEjxUxt.js → File06-BrnW1ZQ1.js} +1 -1
  23. package/dist/client/assets/{FilterLines-bS8_Yh-E.js → FilterLines-PVC9VLDF.js} +1 -1
  24. package/dist/client/assets/{Globe01-BijbXV_r.js → Globe01-7CpfXn5N.js} +1 -1
  25. package/dist/client/assets/{Globe02-DKIs5RjV.js → Globe02-B27PYM5b.js} +1 -1
  26. package/dist/client/assets/{Grid01-CgP_l9be.js → Grid01-CCE4xs16.js} +1 -1
  27. package/dist/client/assets/{Home02-SUAjW3nz.js → Home02-BfUb9zF_.js} +1 -1
  28. package/dist/client/assets/{Image01-CTxAUEpv.js → Image01-CbvGPZGr.js} +1 -1
  29. package/dist/client/assets/{Inbox01-IqJkaMzy.js → Inbox01-B8fBrw9y.js} +1 -1
  30. package/dist/client/assets/{InfoCircle-Bb5NzZd-.js → InfoCircle-7KhXK-2T.js} +1 -1
  31. package/dist/client/assets/{Key01-BB3q5OcJ.js → Key01-ZjbbdeBE.js} +1 -1
  32. package/dist/client/assets/{LinkExternal01-BTGVW1Qi.js → LinkExternal01-C6wGiaKd.js} +1 -1
  33. package/dist/client/assets/{List-RSBUWz52.js → List-CnAhQJaO.js} +1 -1
  34. package/dist/client/assets/{Loading01-D-iQ3x6B.js → Loading01-CQxnYIyy.js} +1 -1
  35. package/dist/client/assets/{Lock01-BCf2m01i.js → Lock01-BXsNu63z.js} +1 -1
  36. package/dist/client/assets/{Pin01-I9LdYIlC.js → Pin01-CQimXkz7.js} +1 -1
  37. package/dist/client/assets/{Play-DqomGUHs.js → Play-CCFAjpE1.js} +1 -1
  38. package/dist/client/assets/{Plus-B8rm50Ox.js → Plus-ldykr1Qs.js} +1 -1
  39. package/dist/client/assets/{RefreshCcw01-ByoHxPlX.js → RefreshCcw01-DH9n4JeZ.js} +1 -1
  40. package/dist/client/assets/{RefreshCw01-D5lhZ8mX.js → RefreshCw01-DsWpmHoM.js} +1 -1
  41. package/dist/client/assets/{Save01-9tV2ohjl.js → Save01-DYGYdg7I.js} +1 -1
  42. package/dist/client/assets/{SearchMd-DWE3UxU2.js → SearchMd-CJBYDik4.js} +1 -1
  43. package/dist/client/assets/{Settings01-DKrG7yMR.js → Settings01-DZTt6EoC.js} +1 -1
  44. package/dist/client/assets/{Settings02-OMvHwhZ2.js → Settings02-By12van4.js} +1 -1
  45. package/dist/client/assets/{Share07-DK8c-5Z6.js → Share07-lImhPS0j.js} +1 -1
  46. package/dist/client/assets/{Terminal-DKHY5zjy.js → Terminal-DVM8ToJY.js} +1 -1
  47. package/dist/client/assets/{Tool01-BAR4Pm87.js → Tool01-CKCbyA0K.js} +1 -1
  48. package/dist/client/assets/{Trash01-DOoBIHb_.js → Trash01-DTuEjPqc.js} +1 -1
  49. package/dist/client/assets/{Upload01-DCltlStQ.js → Upload01-CbgKMs6Z.js} +1 -1
  50. package/dist/client/assets/{Users03-Bf7uxoC5.js → Users03-Bn4RTBQO.js} +1 -1
  51. package/dist/client/assets/{X-DA2sDUV2.js → X-PXGrxqUi.js} +1 -1
  52. package/dist/client/assets/{XCircle-D6Zk67At.js → XCircle-DkU1KZH1.js} +1 -1
  53. package/dist/client/assets/{XClose-D-0Eqw-_.js → XClose-CwEytWmM.js} +1 -1
  54. package/dist/client/assets/{agent-connections-preview-N_Bygs3y.js → agent-connections-preview-gRx2v-zj.js} +1 -1
  55. package/dist/client/assets/{agent-detail-B6enUst-.js → agent-detail-xJqhPPyM.js} +1 -1
  56. package/dist/client/assets/{agents-CF1_nQU-.js → agents-U0juIVTU.js} +1 -1
  57. package/dist/client/assets/alert-dialog-DeTFKcxV.js +7 -0
  58. package/dist/client/assets/{auth-catchall-D97a-l8D.js → auth-catchall-BGozAjlz.js} +1 -1
  59. package/dist/client/assets/{avatar-B37qTwXF.js → avatar-BwRAYU0T.js} +1 -1
  60. package/dist/client/assets/{badge-CbuZxOhE.js → badge-D7RdE5x4.js} +1 -1
  61. package/dist/client/assets/{binder-BzuI_xjk.js → binder-D1ZOF1Sc.js} +1 -1
  62. package/dist/client/assets/{breadcrumb-B9K_bdts.js → breadcrumb-C8b5zMor.js} +1 -1
  63. package/dist/client/assets/{button-KbFW4XuN.js → button-B1_AjrAy.js} +1 -1
  64. package/dist/client/assets/{card-CIHNFHDM.js → card-CuDdPQFh.js} +1 -1
  65. package/dist/client/assets/{checkbox-BgvZYkw3.js → checkbox-BAHzYzRq.js} +1 -1
  66. package/dist/client/assets/{circle-alert-Ccks-MAu.js → circle-alert-D8AbrLxa.js} +1 -1
  67. package/dist/client/assets/{collection-detail-C_N0geWQ.js → collection-detail-Dy_G4wsA.js} +1 -1
  68. package/dist/client/assets/{collection-tab-C-RG3I-p.js → collection-tab-aDh_bgum.js} +1 -1
  69. package/dist/client/assets/{collection-table-wrapper-CTALYkV9.js → collection-table-wrapper-7diw-YMI.js} +1 -1
  70. package/dist/client/assets/{collection-tabs-DRICSlCe.js → collection-tabs-CR2V6cwH.js} +1 -1
  71. package/dist/client/assets/{command-TRqwLhQ_.js → command-CgyAO0Ne.js} +1 -1
  72. package/dist/client/assets/{connect-DWSDNHqf.js → connect-tVhvROi8.js} +1 -1
  73. package/dist/client/assets/{connection-card-BBZJ8W3M.js → connection-card-Cg4aLOaW.js} +1 -1
  74. package/dist/client/assets/{connection-detail-BL7CKfM7.js → connection-detail-CPywuZSh.js} +1 -1
  75. package/dist/client/assets/{connections-CTHmnJaG.js → connections-CPTTerhe.js} +1 -1
  76. package/dist/client/assets/{constants-C56FepeM.js → constants-D3TKhQyR.js} +1 -1
  77. package/dist/client/assets/constants-DfKBjJcd.js +1 -0
  78. package/dist/client/assets/{create-organization-dialog-BOVQgbie.js → create-organization-dialog-C5Cn0159.js} +1 -1
  79. package/dist/client/assets/{create-project-dialog-Cbp27b9r.js → create-project-dialog-CbnOarMk.js} +1 -1
  80. package/dist/client/assets/{dialog-CTzYyOCo.js → dialog-BIx4eChJ.js} +1 -1
  81. package/dist/client/assets/{dropdown-menu-COB17A0Z.js → dropdown-menu-Bqe_ZQT7.js} +1 -1
  82. package/dist/client/assets/{dynamic-plugin-layout-CU_9kBh0.js → dynamic-plugin-layout-daiqbOX4.js} +1 -1
  83. package/dist/client/assets/{empty-state-DbrAwFcx.js → empty-state-3DPCxrDd.js} +1 -1
  84. package/dist/client/assets/{empty-state-DYt7iyWe.js → empty-state-BRTEyQic.js} +1 -1
  85. package/dist/client/assets/{env-vars-editor-Dy_wYHf8.js → env-vars-editor-BnFnFKjL.js} +1 -1
  86. package/dist/client/assets/{error-boundary-CNsxzBU5.js → error-boundary-D3lg8C_F.js} +1 -1
  87. package/dist/client/assets/{extract-connection-data-JqSd5LuK.js → extract-connection-data-D-KC8N1g.js} +1 -1
  88. package/dist/client/assets/{file-browser-ZLEw2qLV.js → file-browser-DYQzip2l.js} +2 -2
  89. package/dist/client/assets/{form-3k69lugl.js → form-CSMGXcSP.js} +1 -1
  90. package/dist/client/assets/{grid-view-D__vcP1M.js → grid-view-CvriK_Te.js} +1 -1
  91. package/dist/client/assets/{home-BOWI6wWW.js → home-BHmXDNE_.js} +1 -1
  92. package/dist/client/assets/{index-m3V673uZ.js → index-BEXpTjUJ.js} +6 -6
  93. package/dist/client/assets/{index-BhWwwe4k.js → index-BoIFTJw3.js} +1 -1
  94. package/dist/client/assets/{index-BaKw5S62.js → index-CEEGRjv-.js} +1 -1
  95. package/dist/client/assets/{index-CEBU5ikU.js → index-D0P8wRBl.js} +1 -1
  96. package/dist/client/assets/{index-Db6r-OFW.js → index-D291fSpc.js} +1 -1
  97. package/dist/client/assets/{index-1ZfnT2oW.js → index-DGQeUY5q.js} +1 -1
  98. package/dist/client/assets/{index-52ezqwYc.js → index-DWPOfnC9.js} +1 -1
  99. package/dist/client/assets/{index-CuIrPKu9.js → index-DXIsw0zh.js} +3 -3
  100. package/dist/client/assets/{index-Bs7FV238.js → index-PQ5Y9l5r.js} +1 -1
  101. package/dist/client/assets/{infiniteQueryObserver-60Pvs7lk.js → infiniteQueryObserver-BEZRxvfD.js} +1 -1
  102. package/dist/client/assets/{input-g5LrnBay.js → input-CBsHg1ZU.js} +1 -1
  103. package/dist/client/assets/{integration-icon-CgM-an9b.js → integration-icon-B6mCYbtH.js} +1 -1
  104. package/dist/client/assets/{label-BRqnACHD.js → label-BAn78i4V.js} +1 -1
  105. package/dist/client/assets/{layout-veX2bHTO.js → layout-CJ8IA4Pt.js} +1 -1
  106. package/dist/client/assets/{localstorage-keys-DVialVZJ.js → localstorage-keys-5bqIWFww.js} +1 -1
  107. package/dist/client/assets/{login-Bo_vv91H.js → login-W6QtfXRU.js} +1 -1
  108. package/dist/client/assets/{markdown-B9MVxSX8.js → markdown-CGk5zbs1.js} +1 -1
  109. package/dist/client/assets/{mcp-oauth-CqxFiNor.js → mcp-oauth-CZMbNN44.js} +1 -1
  110. package/dist/client/assets/{mcp-server-card-B7R2dxPn.js → mcp-server-card-e0XUR5Yq.js} +1 -1
  111. package/dist/client/assets/{mcp-server-detail-CgW9CI19.js → mcp-server-detail-Caq-098C.js} +2 -2
  112. package/dist/client/assets/{members-R5hOA6Ln.js → members-zrxPuh2o.js} +1 -1
  113. package/dist/client/assets/{monitoring-C0HiMyW6.js → monitoring-_ny0UhM9.js} +2 -2
  114. package/dist/client/assets/{monitoring-dashboard-edit-CXDrAMd6.js → monitoring-dashboard-edit-DRWSHAcl.js} +1 -1
  115. package/dist/client/assets/{monitoring-dashboard-view-DIquPtHE.js → monitoring-dashboard-view-Dg5Q-4l_.js} +1 -1
  116. package/dist/client/assets/{oauth-callback-C7CG4TvZ.js → oauth-callback-DF4NcQuR.js} +1 -1
  117. package/dist/client/assets/{page-BBuPAnYW.js → page-B6wNBPH1.js} +1 -1
  118. package/dist/client/assets/{page-CmdabCF-.js → page-CuOig4S9.js} +1 -1
  119. package/dist/client/assets/{plugin-empty-state-DB5GFJQB.js → plugin-empty-state-BU6c0L07.js} +1 -1
  120. package/dist/client/assets/{plugin-empty-state-BjravhmS.js → plugin-empty-state-DmaS8xBx.js} +1 -1
  121. package/dist/client/assets/{plugin-header-BoBMp38h.js → plugin-header-Dj0RMbq4.js} +1 -1
  122. package/dist/client/assets/{plugin-header-D4-3EhvX.js → plugin-header-DnM-ONcb.js} +1 -1
  123. package/dist/client/assets/{popover-VJKeuwbC.js → popover-Bb6R9icK.js} +1 -1
  124. package/dist/client/assets/{project-layout-B-2nzLyc.js → project-layout-Dn_PaFa7.js} +1 -1
  125. package/dist/client/assets/{project-settings-Cv631PiB.js → project-settings-C1t3TKB3.js} +1 -1
  126. package/dist/client/assets/{projects-list-VqhVqmHW.js → projects-list-DwR0s7rf.js} +1 -1
  127. package/dist/client/assets/{readme-viewer-CYxESlX8.js → readme-viewer-Dw7Qf_Tx.js} +1 -1
  128. package/dist/client/assets/{registry-layout-DSELVp8O.js → registry-layout-JBbhTkeO.js} +1 -1
  129. package/dist/client/assets/{registry-utils-BDP3t_m0.js → registry-utils-CqH2sLA9.js} +1 -1
  130. package/dist/client/assets/{reports-layout-chWgOVY4.js → reports-layout-CmFSnl69.js} +2 -2
  131. package/dist/client/assets/{reset-password-BepKS7QP.js → reset-password-CVTGYB35.js} +1 -1
  132. package/dist/client/assets/{resizable-DzVs9cF1.js → resizable-CTqqQjcd.js} +1 -1
  133. package/dist/client/assets/{save-actions-C432uq2M.js → save-actions-CwdkcgkS.js} +1 -1
  134. package/dist/client/assets/{scroll-area-BppB61vI.js → scroll-area-CchW-N3-.js} +1 -1
  135. package/dist/client/assets/{select-CjbCdlbs.js → select-Dtkbt4-O.js} +1 -1
  136. package/dist/client/assets/{shell-layout-BNTceB-j.js → shell-layout-eLdU35ux.js} +3 -3
  137. package/dist/client/assets/{spinner-Ys0MZVWU.js → spinner-CQv4OdiY.js} +1 -1
  138. package/dist/client/assets/{store-invite-wi4-CXmp.js → store-invite-D-J92Dqo.js} +1 -1
  139. package/dist/client/assets/{switch-mZQ9VTrI.js → switch-RGSyl6UC.js} +1 -1
  140. package/dist/client/assets/{table-50O0LiWw.js → table-D_QygT6-.js} +1 -1
  141. package/dist/client/assets/{tasks-Knr19XiW.js → tasks-CYirgWP_.js} +1 -1
  142. package/dist/client/assets/{textarea-CaReVd_T.js → textarea-Bs1SDhbD.js} +1 -1
  143. package/dist/client/assets/{time-range-picker-CmEKwRJx.js → time-range-picker-9QegZlTC.js} +1 -1
  144. package/dist/client/assets/{toggle-group-igEKa_l0.js → toggle-group-BMOUBfIJ.js} +1 -1
  145. package/dist/client/assets/{tools-list-DXmYEuhW.js → tools-list-B0vbhECW.js} +1 -1
  146. package/dist/client/assets/{tooltip-0WAr9Tnd.js → tooltip-Dp5lhZb-.js} +1 -1
  147. package/dist/client/assets/{topbar-portal-A-r6dcXk.js → topbar-portal-BMMpyuIo.js} +1 -1
  148. package/dist/client/assets/{typewriter-title-0Ps8bNiF.js → typewriter-title-C_l4tadT.js} +1 -1
  149. package/dist/client/assets/{use-binding-DHUPD73-.js → use-binding-CCMbm9JJ.js} +1 -1
  150. package/dist/client/assets/{use-connection-h_6wlDvG.js → use-connection-BQuQwDk4.js} +1 -1
  151. package/dist/client/assets/{use-copy-DzbutdJX.js → use-copy-B35KQJbq.js} +1 -1
  152. package/dist/client/assets/{use-create-virtual-mcp-BEYGEKPm.js → use-create-virtual-mcp-CExHv6Kc.js} +1 -1
  153. package/dist/client/assets/{use-deco-chat-open-QCitD2jP.js → use-deco-chat-open-XtGRSas5.js} +6 -6
  154. package/dist/client/assets/{use-install-from-registry-CKNWgTjl.js → use-install-from-registry-szNBcx44.js} +1 -1
  155. package/dist/client/assets/{use-list-state-QuR-uYrt.js → use-list-state-qVi7m5eK.js} +1 -1
  156. package/dist/client/assets/{use-llm-BiV3ohz2.js → use-llm-DjuAxzNV.js} +1 -1
  157. package/dist/client/assets/{use-mcp-prompts-BfBaVKeH.js → use-mcp-prompts-BVHx-kiG.js} +1 -1
  158. package/dist/client/assets/{use-mcp-tools-9-0ktUQU.js → use-mcp-tools-DqcNzzRD.js} +1 -1
  159. package/dist/client/assets/{use-mobile-DBbPwq5K.js → use-mobile-DIAoFlrU.js} +1 -1
  160. package/dist/client/assets/{use-organization-settings-Di-WJ99L.js → use-organization-settings-W2sWkYV6.js} +1 -1
  161. package/dist/client/assets/{use-project-CQC3Fx2l.js → use-project-gbXgodP7.js} +1 -1
  162. package/dist/client/assets/{use-view-mode-C4TZAKDl.js → use-view-mode-BBke-t6c.js} +1 -1
  163. package/dist/client/assets/{use-virtual-mcp-B5taJWCy.js → use-virtual-mcp-DaDbSDv1.js} +1 -1
  164. package/dist/client/assets/useInfiniteQuery-1kxc2B4E.js +1 -0
  165. package/dist/client/assets/{useMutation-Zw-bAGx2.js → useMutation-B0HsJHYQ.js} +1 -1
  166. package/dist/client/assets/useQuery-BB1xkDqD.js +1 -0
  167. package/dist/client/assets/useSuspenseInfiniteQuery-NieK84q6.js +1 -0
  168. package/dist/client/assets/{workflow-BrwP_xN6.js → workflow-BJgxWVo7.js} +1 -1
  169. package/dist/client/index.html +1 -1
  170. package/dist/server/cli.js +192 -192
  171. package/dist/server/migrate.js +3 -3
  172. package/dist/server/server.js +174 -174
  173. package/package.json +1 -1
  174. package/dist/client/assets/alert-dialog-Bow6SDVm.js +0 -7
  175. package/dist/client/assets/constants-C6KVRSAR.js +0 -1
  176. package/dist/client/assets/useInfiniteQuery-CGBDp2t8.js +0 -1
  177. package/dist/client/assets/useQuery-eogqvd42.js +0 -1
  178. package/dist/client/assets/useSuspenseInfiniteQuery-DAyAVWU_.js +0 -1
@@ -1,8 +1,8 @@
1
- import{r as w,c as N,j as s,u as Se,b as $e,bz as Ge,L as Oe,bv as ls,bL as os,O as ne,I as xt,v as is,y as as,d as he,t as ye,b6 as cs,bM as ht,e as st,bN as ds,bp as gt,bO as Pe,A as ms,S as jt,f as fs,h as us,N as ps,n as xs,K as hs,m as bt,P as gs}from"./index-CuIrPKu9.js";import{C as oe,i as js}from"./index-52ezqwYc.js";import{I as bs}from"./integration-icon-CgM-an9b.js";import{P as Ie}from"./index-CEBU5ikU.js";import{e as Ke,u as vs,g as Ze,S as ee,h as vt,C as Ns,f as ys,j as Ss}from"./use-deco-chat-open-QCitD2jP.js";import{c as z,B as re}from"./button-KbFW4XuN.js";import{d as ws}from"./constants-C56FepeM.js";import{T as Cs,i as ks,b as _s,S as zs,c as $s,d as Is,e as Os,f as Ps,t as Nt}from"./typewriter-title-0Ps8bNiF.js";import{s as qe}from"./Plus-B8rm50Ox.js";import{t as yt}from"./Users03-Bf7uxoC5.js";import{i as Be}from"./X-DA2sDUV2.js";import{E as St}from"./error-boundary-CNsxzBU5.js";import{C as wt}from"./create-project-dialog-Cbp27b9r.js";import{n as Ct}from"./CheckDone01-BVECQ061.js";import{n as Ts}from"./Container-DZJok7qt.js";import{e as As}from"./Dataflow03-WvCvIAmM.js";import{a as Ms}from"./Home02-SUAjW3nz.js";import{u as Es,a as kt}from"./use-project-CQC3Fx2l.js";import{u as De}from"./use-mobile-DBbPwq5K.js";import{b as Fe,c as _t,a as We,T as Ve}from"./tooltip-0WAr9Tnd.js";import{t as nt}from"./ChevronDown-P4XeJ9w5.js";import{A as ke}from"./avatar-B37qTwXF.js";import{b as rt,P as lt,a as ot}from"./popover-VJKeuwbC.js";import{n as ct}from"./Inbox01-IqJkaMzy.js";import{B as dt}from"./badge-CbuZxOhE.js";import{i as Me}from"./Check-DG5LOfHE.js";import{s as mt}from"./XClose-D-0Eqw-_.js";import{i as zt}from"./ChevronRight-CHS1psX7.js";import{a as it}from"./Settings02-OMvHwhZ2.js";import{C as $t}from"./create-organization-dialog-BOVQgbie.js";import{c as Ls,b as Ds,g as Rs,a as Hs,D as Us}from"./dialog-CTzYyOCo.js";import{L as Te}from"./label-BRqnACHD.js";import{S as Bs,a as Fs,b as Ws,d as Xe,c as Vs}from"./select-CjbCdlbs.js";import{S as He}from"./switch-mZQ9VTrI.js";import{i as Gs}from"./Code01-Dte9rLPH.js";import{a as It}from"./Copy01-CBdgbqFW.js";import{u as Ot,a as Ks}from"./use-organization-settings-Di-WJ99L.js";import{i as Zs}from"./File06-CqEjxUxt.js";import{I as qs}from"./input-g5LrnBay.js";import{c as Ys}from"./Grid01-CgP_l9be.js";import{a as Js,T as Xs}from"./topbar-portal-A-r6dcXk.js";import{a as Qs,b as en,D as tn,c as sn,g as ft}from"./dropdown-menu-COB17A0Z.js";import{i as nn}from"./Globe01-BijbXV_r.js";import{n as ut}from"./LinkExternal01-BTGVW1Qi.js";import{t as rn}from"./Settings01-DKrG7yMR.js";import{u as Pt,L as Tt}from"./localstorage-keys-DVialVZJ.js";import{R as ln,a as At,b as on}from"./resizable-DzVs9cF1.js";import"./spinner-Ys0MZVWU.js";import"./use-mcp-prompts-BfBaVKeH.js";import"./useQuery-eogqvd42.js";import"./form-3k69lugl.js";import"./usage-B8eRkRZY.js";import"./ArrowUp-BfLZrH4Z.js";import"./Edit01-BtQjuTbw.js";import"./XCircle-D6Zk67At.js";import"./AlertCircle-BNHu4U_w.js";import"./AlertTriangle-B3iutOXb.js";import"./ArrowLeft-BCoINK1a.js";import"./use-copy-DzbutdJX.js";import"./use-virtual-mcp-B5taJWCy.js";import"./use-connection-h_6wlDvG.js";import"./useMutation-Zw-bAGx2.js";import"./SearchMd-DWE3UxU2.js";import"./use-create-virtual-mcp-BEYGEKPm.js";import"./marked.esm-BaswSlok.js";import"./markdown-B9MVxSX8.js";import"./tools-list-DXmYEuhW.js";import"./collection-table-wrapper-CTALYkV9.js";import"./List-RSBUWz52.js";import"./table-50O0LiWw.js";import"./empty-state-DYt7iyWe.js";import"./Loading01-D-iQ3x6B.js";import"./card-CIHNFHDM.js";import"./Eye-HNj86q6R.js";import"./Globe02-DKIs5RjV.js";import"./RefreshCw01-D5lhZ8mX.js";import"./layout-veX2bHTO.js";import"./generate-id-Dyweu44Y.js";import"./Clock-DbrHehdf.js";import"./Trash01-DOoBIHb_.js";import"./use-llm-BiV3ohz2.js";import"./use-binding-DHUPD73-.js";import"./binder-BzuI_xjk.js";import"./Image01-CTxAUEpv.js";import"./RefreshCcw01-ByoHxPlX.js";import"./useSuspenseInfiniteQuery-DAyAVWU_.js";import"./infiniteQueryObserver-60Pvs7lk.js";import"./textarea-CaReVd_T.js";import"./index-1ZfnT2oW.js";import"./alert-dialog-Bow6SDVm.js";const Qe=({size:t=24,color:e="currentColor",...n})=>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",...n},w.createElement("path",{d:"M7 17 17 7m0 0H7m10 0v10"}));Qe.displayName="ArrowUpRight";const Mt=({size:t=24,color:e="currentColor",...n})=>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",...n},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"}));Mt.displayName="BarChart10";const Et=({size:t=24,color:e="currentColor",...n})=>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",...n},w.createElement("path",{d:"M9.354 21c.705.622 1.632 1 2.646 1s1.94-.378 2.646-1M18 8A6 6 0 1 0 6 8c0 3.09-.78 5.206-1.65 6.605-.735 1.18-1.102 1.771-1.089 1.936.015.182.054.252.2.36.133.099.732.099 1.928.099H18.61c1.196 0 1.795 0 1.927-.098.147-.11.186-.179.2-.361.014-.165-.353-.755-1.088-1.936C18.78 13.206 18 11.09 18 8Z"}));Et.displayName="Bell01";const Lt=({size:t=24,color:e="currentColor",...n})=>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",...n},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"}));Lt.displayName="BookOpen01";const Dt=({size:t=24,color:e="currentColor",...n})=>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",...n},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"}));Dt.displayName="Building02";const Rt=({size:t=24,color:e="currentColor",...n})=>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",...n},w.createElement("path",{d:"m18 17-5-5 5-5m-7 10-5-5 5-5"}));Rt.displayName="ChevronLeftDouble";const Ht=({size:t=24,color:e="currentColor",...n})=>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",...n},w.createElement("path",{d:"m6 17 5-5-5-5m7 10 5-5-5-5"}));Ht.displayName="ChevronRightDouble";const Ut=({size:t=24,color:e="currentColor",...n})=>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",...n},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"}));Ut.displayName="FaceSmile";const Bt=({size:t=24,color:e="currentColor",...n})=>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",...n},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"}));Bt.displayName="LayoutRight";const Ft=({size:t=24,color:e="currentColor",...n})=>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",...n},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"}));Ft.displayName="LogOut01";const Wt=({size:t=24,color:e="currentColor",...n})=>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",...n},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"}));Wt.displayName="LogOut02";const Vt=({size:t=24,color:e="currentColor",...n})=>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",...n},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"}));Vt.displayName="Mail01";const Gt=({size:t=24,color:e="currentColor",...n})=>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",...n},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"}));Gt.displayName="Settings04";function an(){const t=N.c(65),{org:e}=Se(),[,n]=Ke(),{selectedVirtualMcp:r,modelsConnections:l,isChatEmpty:o,activeThreadId:i,createThread:a,switchToThread:c,threads:d}=vs();let m;if(t[0]!==i||t[1]!==d){let q;t[3]!==i?(q=V=>V.id===i,t[3]=i,t[4]=q):q=t[4],m=d.find(q),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 g;t[5]!==e.id?(g=ws(e.id),t[5]=e.id,t[6]=g):g=t[6];const b=r??g;let v;t[7]!==a?(v=()=>{h(()=>{a()})},t[7]=a,t[8]=v):v=t[8];const y=v;if(l.length===0){let q;t[9]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(Ie.Header.Left,{className:"gap-2"}),t[9]=q):q=t[9];let V;t[10]!==n?(V=()=>n(!1),t[10]=n,t[11]=V):V=t[11];let P;t[12]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(Be,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[12]=P):P=t[12];let D;t[13]!==V?(D=s.jsxs(Ie.Header,{className:"flex-none",children:[q,s.jsx(Ie.Header.Right,{className:"gap-1",children:s.jsx("button",{type:"button",onClick:V,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:P})})]}),t[13]=V,t[14]=D):D=t[14];let K;t[15]!==e?(K=s.jsx(oe.Main,{className:"flex flex-col items-center",children:s.jsx(oe.EmptyState,{children:s.jsx(oe.NoLlmBindingEmptyState,{title:"No model provider connected",description:"Connect to a model provider to unlock AI-powered features.",org:e})})}),t[15]=e,t[16]=K):K=t[16];let Y;return t[17]!==D||t[18]!==K?(Y=s.jsxs(oe,{children:[D,K]}),t[17]=D,t[18]=K,t[19]=Y):Y=t[19],Y}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 S;t[20]!==C?(S=z("absolute inset-0 flex flex-col transition-all ease-in-out",C),t[20]=C,t[21]=S):S=t[21];let _;t[22]!==f||t[23]!==o?(_=!o&&f?.title&&s.jsx(Cs,{text:f.title,className:"text-sm font-medium text-foreground"}),t[22]=f,t[23]=o,t[24]=_):_=t[24];let O;t[25]!==_?(O=s.jsx(Ie.Header.Left,{className:"gap-2",children:_}),t[25]=_,t[26]=O):O=t[26];let k;t[27]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(qe,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[27]=k):k=t[27];let I;t[28]!==y||t[29]!==x?(I=s.jsx("button",{type:"button",onClick:y,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]=y,t[29]=x,t[30]=I):I=t[30];let $;t[31]===Symbol.for("react.memo_cache_sentinel")?($=()=>p(!0),t[31]=$):$=t[31];let M;t[32]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx("button",{type:"button",onClick:$,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"Chat history",children:s.jsx(ks,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})}),t[32]=M):M=t[32];let A;t[33]!==n?(A=()=>n(!1),t[33]=n,t[34]=A):A=t[34];let U;t[35]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(Be,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[35]=U):U=t[35];let L;t[36]!==A?(L=s.jsx("button",{type:"button",onClick:A,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:U}),t[36]=A,t[37]=L):L=t[37];let T;t[38]!==L||t[39]!==I?(T=s.jsxs(Ie.Header.Right,{className:"gap-1",children:[I,M,L]}),t[38]=L,t[39]=I,t[40]=T):T=t[40];let E;t[41]!==T||t[42]!==O?(E=s.jsxs(Ie.Header,{className:"flex-none",children:[O,T]}),t[41]=T,t[42]=O,t[43]=E):E=t[43];let B;t[44]!==b||t[45]!==o?(B=s.jsx(oe.Main,{children:o?s.jsx(oe.EmptyState,{children:s.jsxs("div",{className:"flex flex-col items-center gap-6 w-full px-4",children:[s.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 p-0 text-center",children:[s.jsx(bs,{icon:b.icon,name:b.title,size:"lg",fallbackIcon:s.jsx(yt,{size:32}),className:"size-[60px]! rounded-[18px]!"}),s.jsx("h3",{className:"text-xl font-medium text-foreground",children:b.title}),s.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:b.description??"Ask anything about configuring model providers or using MCP Mesh."})]}),s.jsx(oe.IceBreakers,{})]})}):s.jsx(oe.Messages,{})}),t[44]=b,t[45]=o,t[46]=B):B=t[46];let H;t[47]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(oe.Footer,{children:s.jsx(oe.Input,{})}),t[47]=H):H=t[47];let R;t[48]!==E||t[49]!==B||t[50]!==S?(R=s.jsxs("div",{className:S,children:[E,B,H]}),t[48]=E,t[49]=B,t[50]=S,t[51]=R):R=t[51];const F=u?"opacity-100 translate-x-0":"opacity-0 translate-x-4 pointer-events-none";let W;t[52]!==F?(W=z("absolute inset-0 flex flex-col transition-all duration-300 ease-in-out",F),t[52]=F,t[53]=W):W=t[53];let G;t[54]===Symbol.for("react.memo_cache_sentinel")?(G=()=>p(!1),t[54]=G):G=t[54];let Z;t[55]!==i||t[56]!==c||t[57]!==d?(Z=s.jsx(_s,{threads:d,activeThreadId:i,onThreadSelect:c,onClose:G}),t[55]=i,t[56]=c,t[57]=d,t[58]=Z):Z=t[58];let X;t[59]!==W||t[60]!==Z?(X=s.jsx("div",{className:W,children:Z}),t[59]=W,t[60]=Z,t[61]=X):X=t[61];let Q;return t[62]!==R||t[63]!==X?(Q=s.jsxs(oe,{className:"relative overflow-hidden",children:[R,X]}),t[62]=R,t[63]=X,t[64]=Q):Q=t[64],Q}function cn(){const t=N.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(oe.Skeleton,{}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(St,{fallback:e,children:s.jsx(w.Suspense,{fallback:s.jsx(oe.Skeleton,{}),children:s.jsx(an,{})})}),t[1]=n):n=t[1],n}function dn(){const t=N.c(35),[e]=Ze(),{locator:n,org:r}=Se(),l=$e(),o=Ge(),{org:i,project:a}=Oe.parse(n),c=Oe.isOrgAdminProject(n),{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=P=>f.includes(P.pluginId),t[2]=f,t[3]=u):u=t[3];const p=ls.filter(u),x=o.location.pathname===`/${i}/${a}`||o.location.pathname===`/${i}/${a}/`;let h;t[4]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Ms,{}),t[4]=h):h=t[4];const g={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 j;t[5]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Ct,{}),t[5]=j):j=t[5];const b={key:"tasks",label:"Tasks",icon:j,onClick:()=>l({to:"/$org/$project/tasks",params:{org:i,project:ne}})};let v;t[6]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Ts,{}),t[6]=v):v=t[6];const y={key:"mcps",label:"Connections",icon:v,onClick:()=>l({to:"/$org/$project/mcps",params:{org:i,project:ne}})};let C;t[7]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(xt,{}),t[7]=C):C=t[7];const S={key:"projects",label:"Projects",icon:C,onClick:()=>l({to:"/$org/$project/projects",params:{org:i,project:ne}})};let _;t[8]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Dt,{}),t[8]=_):_=t[8];const O={key:"store",label:"Store",icon:_,onClick:()=>l({to:"/$org/$project/store",params:{org:i,project:ne}})};let k;t[9]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(yt,{}),t[9]=k):k=t[9];const I={key:"agents",label:"Agents",icon:k,onClick:()=>l({to:"/$org/$project/agents",params:{org:i,project:ne}})};let $;t[10]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(Mt,{}),t[10]=$):$=t[10];const M={key:"monitoring",label:"Monitor",icon:$,onClick:()=>l({to:"/$org/$project/monitoring",params:{org:i,project:ne}})};let A;t[11]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(Ut,{}),t[11]=A):A=t[11];const U={key:"members",label:"Members",icon:A,onClick:()=>l({to:"/$org/$project/members",params:{org:i,project:ne}})},L=[...e.experimental_tasks?[b]:[],y,...e.experimental_projects?[S]:[],O,I,M,U],T=p.map(P=>({key:P.pluginId,label:P.label,icon:P.icon,onClick:()=>l({to:"/$org/$project/$pluginId",params:{org:i,project:a,pluginId:P.pluginId}})}));let E;t[12]!==f?(E=P=>f.includes(P.pluginId),t[12]=f,t[13]=E):E=t[13];const H=os.filter(E).map(P=>({type:"group",group:{id:`${P.pluginId}-${P.id}`,label:P.label,items:P.items.map((D,K)=>({key:`${P.pluginId}-${P.id}-${K}`,label:D.label,icon:D.icon,onClick:()=>l({to:"/$org/$project/$pluginId",params:{org:i,project:a,pluginId:P.pluginId}})})),defaultExpanded:P.defaultExpanded??!0}}));if(c){const P=[{type:"items",items:[g,...L]}];if(T.length>0){let D;t[14]===Symbol.for("react.memo_cache_sentinel")?(D={type:"divider"},t[14]=D):D=t[14],P.push(D);let K;t[15]!==T?(K={type:"items",items:T},t[15]=T,t[16]=K):K=t[16],P.push(K)}if(H.length>0){if(T.length===0){let D;t[17]===Symbol.for("react.memo_cache_sentinel")?(D={type:"divider"},t[17]=D):D=t[17],P.push(D)}P.push(...H)}return P}let R;t[18]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(js,{}),t[18]=R):R=t[18];let F;t[19]!==l||t[20]!==i||t[21]!==a?(F={key:"tasks",label:"Tasks",icon:R,onClick:()=>l({to:"/$org/$project/tasks",params:{org:i,project:a}})},t[19]=l,t[20]=i,t[21]=a,t[22]=F):F=t[22];const W=F;let G;t[23]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsx(As,{}),t[23]=G):G=t[23];let Z;t[24]!==l||t[25]!==i||t[26]!==a?(Z={key:"workflows",label:"Workflows",icon:G,onClick:()=>l({to:"/$org/$project/workflows",params:{org:i,project:a}})},t[24]=l,t[25]=i,t[26]=a,t[27]=Z):Z=t[27];const X=Z;let Q;t[28]!==e.experimental_tasks||t[29]!==W?(Q=e.experimental_tasks?[W]:[],t[28]=e.experimental_tasks,t[29]=W,t[30]=Q):Q=t[30];const V=[{type:"items",items:[g,...Q,X]}];if(T.length>0){let P;t[31]===Symbol.for("react.memo_cache_sentinel")?(P={type:"divider"},t[31]=P):P=t[31],V.push(P);let D;t[32]!==T?(D={type:"items",items:T},t[32]=T,t[33]=D):D=t[33],V.push(D)}if(H.length>0){if(T.length===0){let P;t[34]===Symbol.for("react.memo_cache_sentinel")?(P={type:"divider"},t[34]=P):P=t[34],V.push(P)}V.push(...H)}return V}const mn="sidebar_state",fn=3600*24*7,un="16rem",pn="18rem",xn="3rem",hn="b",Kt=w.createContext(null);function Ye(){const t=w.useContext(Kt);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function gn(t){const e=N.c(21),{defaultOpen:n,open:r,onOpenChange:l,children:o}=t,i=n===void 0?!0:n,a=De(),[c,d]=w.useState(!1),[m,f]=w.useState(i),u=r??m;let p;e[0]!==u||e[1]!==l?(p=O=>{const k=typeof O=="function"?O(u):O;l?l(k):f(k),document.cookie=`${mn}=${k}; path=/; max-age=${fn}`},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(bn):x(jn),e[3]=a,e[4]=x,e[5]=h):h=e[5];const g=h;let j,b;e[6]!==g?(j=()=>{const O=k=>{if(k.key===hn&&(k.metaKey||k.ctrlKey)){const I=k.target;if(I.tagName==="INPUT"||I.tagName==="TEXTAREA"||I.isContentEditable)return;k.preventDefault(),g()}};return globalThis.addEventListener("keydown",O),()=>globalThis.removeEventListener("keydown",O)},b=[g],e[6]=g,e[7]=j,e[8]=b):(j=e[7],b=e[8]),w.useEffect(j,b);const v=u?"expanded":"collapsed";let y;e[9]!==a||e[10]!==u||e[11]!==c||e[12]!==x||e[13]!==v||e[14]!==g?(y={state:v,open:u,setOpen:x,isMobile:a,openMobile:c,setOpenMobile:d,toggleSidebar:g},e[9]=a,e[10]=u,e[11]=c,e[12]=x,e[13]=v,e[14]=g,e[15]=y):y=e[15];const C=y;let S;e[16]!==o?(S=s.jsx(_t,{delayDuration:0,children:o}),e[16]=o,e[17]=S):S=e[17];let _;return e[18]!==C||e[19]!==S?(_=s.jsx(Kt.Provider,{value:C,children:S}),e[18]=C,e[19]=S,e[20]=_):_=e[20],_}function jn(t){return!t}function bn(t){return!t}function vn(t){const e=N.c(14);let n,r,l,o;e[0]!==t?({className:r,style:o,children:n,...l}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=l,e[4]=o):(n=e[1],r=e[2],l=e[3],o=e[4]);let i;e[5]!==o?(i={"--sidebar-width":un,"--sidebar-width-icon":xn,...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]!==n||e[10]!==l||e[11]!==a||e[12]!==c?(d=s.jsx("div",{"data-slot":"sidebar-wrapper",style:a,className:c,...l,children:n}),e[9]=n,e[10]=l,e[11]=a,e[12]=c,e[13]=d):d=e[13],d}function Nn(t){const e=N.c(46);let n,r,l,o,i,a;e[0]!==t?({side:o,variant:i,collapsible:a,className:r,children:n,...l}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=l,e[4]=o,e[5]=i,e[6]=a):(n=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}=Ye();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 I;return e[9]!==n||e[10]!==l||e[11]!==k?(I=s.jsx("div",{"data-slot":"sidebar",className:k,...l,children:n}),e[9]=n,e[10]=l,e[11]=k,e[12]=I):I=e[12],I}if(f){let k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k={"--sidebar-width":pn},e[13]=k):k=e[13];let I;e[14]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsxs($s,{className:"sr-only",children:[s.jsx(Is,{children:"Sidebar"}),s.jsx(Os,{children:"Displays the mobile sidebar."})]}),e[14]=I):I=e[14];let $;e[15]!==n?($=s.jsx("div",{className:"flex h-full w-full flex-col",children:n}),e[15]=n,e[16]=$):$=e[16];let M;e[17]!==c||e[18]!==$?(M=s.jsxs(Ps,{"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]=$,e[19]=M):M=e[19];let A;return e[20]!==p||e[21]!==l||e[22]!==x||e[23]!==M?(A=s.jsx(zs,{open:p,onOpenChange:x,...l,children:M}),e[20]=p,e[21]=l,e[22]=x,e[23]=M,e[24]=A):A=e[24],A}const h=u==="collapsed"?m:"",g=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 j;e[25]!==g?(j=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",g),e[25]=g,e[26]=j):j=e[26];let b;e[27]!==j?(b=s.jsx("div",{"data-slot":"sidebar-gap",className:j}),e[27]=j,e[28]=b):b=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)]",y=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]!==y?(C=z("fixed top-12 bottom-0 z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",v,y,r),e[29]=r,e[30]=v,e[31]=y,e[32]=C):C=e[32];let S;e[33]!==n?(S=s.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:n}),e[33]=n,e[34]=S):S=e[34];let _;e[35]!==l||e[36]!==C||e[37]!==S?(_=s.jsx("div",{"data-slot":"sidebar-container",className:C,...l,children:S}),e[35]=l,e[36]=C,e[37]=S,e[38]=_):_=e[38];let O;return e[39]!==c||e[40]!==u||e[41]!==_||e[42]!==h||e[43]!==b||e[44]!==d?(O=s.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:[b,_]}),e[39]=c,e[40]=u,e[41]=_,e[42]=h,e[43]=b,e[44]=d,e[45]=O):O=e[45],O}function yn(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(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",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.jsx("main",{"data-slot":"sidebar-inset",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Zt(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("flex flex-col gap-2 p-2",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.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 Sn(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("flex flex-col gap-2 px-2 items-start justify-start",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.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 at(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("h-4 m-0! w-full",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.jsx("div",{"data-sidebar":"separator",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function wn(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.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 Ee(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.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 Le(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("w-full text-sm",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.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 _e(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("flex w-full min-w-0 flex-col gap-1",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.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 ie(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("group/menu-item relative",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.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 Cn=as("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 Re(t){const e=N.c(28);let n,r,l,o,i,a,c;e[0]!==t?({asChild:l,isActive:o,variant:i,size:a,tooltip:c,className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=l,e[4]=o,e[5]=i,e[6]=a,e[7]=c):(n=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?is:"button",{isMobile:x,state:h}=Ye();let g;e[8]!==n||e[9]!==u||e[10]!==f?(g=z(Cn({variant:f,size:u}),n),e[8]=n,e[9]=u,e[10]=f,e[11]=g):g=e[11];let j;e[12]!==p||e[13]!==m||e[14]!==r||e[15]!==u||e[16]!==g?(j=s.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":u,"data-active":m,className:g,...r}),e[12]=p,e[13]=m,e[14]=r,e[15]=u,e[16]=g,e[17]=j):j=e[17];const b=j;if(!c)return b;if(typeof c=="string"){let _;e[18]!==c?(_={children:c},e[18]=c,e[19]=_):_=e[19],c=_}let v;e[20]!==b?(v=s.jsx(We,{asChild:!0,children:b}),e[20]=b,e[21]=v):v=e[21];const y=h!=="collapsed"||x;let C;e[22]!==y||e[23]!==c?(C=s.jsx(Fe,{side:"right",align:"center",hidden:y,...c}),e[22]=y,e[23]=c,e[24]=C):C=e[24];let S;return e[25]!==v||e[26]!==C?(S=s.jsxs(Ve,{children:[v,C]}),e[25]=v,e[26]=C,e[27]=S):S=e[27],S}function kn(t){const e=N.c(18),{label:n,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]!==n?(d=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n}),e[2]=n,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=s.jsx(nt,{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=s.jsx(_e,{children:s.jsx(ie,{children:s.jsxs(Re,{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&&s.jsx(Le,{children:s.jsx(_e,{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=s.jsxs(Ee,{className:"py-0",children:[p,x]}),e[15]=p,e[16]=x,e[17]=h):h=e[17],h}function qt(t){const e=N.c(13),{item:n}=t;let r;e[0]!==n.icon?(r=s.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:n.icon}),e[0]=n.icon,e[1]=r):r=e[1];let l;e[2]!==n.label?(l=s.jsx("span",{className:"truncate",children:n.label}),e[2]=n.label,e[3]=l):l=e[3];let o;e[4]!==n.isActive||e[5]!==n.label||e[6]!==n.onClick||e[7]!==r||e[8]!==l?(o=s.jsxs(Re,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:n.onClick,isActive:n.isActive,tooltip:n.label,children:[r,l]}),e[4]=n.isActive,e[5]=n.label,e[6]=n.onClick,e[7]=r,e[8]=l,e[9]=o):o=e[9];let i;return e[10]!==n.key||e[11]!==o?(i=s.jsx(ie,{children:o},n.key),e[10]=n.key,e[11]=o,e[12]=i):i=e[12],i}function _n(t){const e=N.c(12),{section:n}=t;switch(n.type){case"divider":{let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(at,{className:"my-2"}),e[0]=r):r=e[0],r}case"spacer":{let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex-1"}),e[1]=r):r=e[1],r}case"group":{const r=n.group.label,l=n.group.defaultExpanded;let o;e[2]!==n.group.items?(o=n.group.items.map($n),e[2]=n.group.items,e[3]=o):o=e[3];let i;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==o?(i=s.jsx(kn,{label:r,defaultExpanded:l,children:o}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=o,e[7]=i):i=e[7],i}case"items":{let r;e[8]!==n.items?(r=n.items.map(zn),e[8]=n.items,e[9]=r):r=e[9];let l;return e[10]!==r?(l=s.jsx(Ee,{className:"py-0",children:s.jsx(Le,{children:s.jsx(_e,{className:"gap-0.5",children:r})})}),e[10]=r,e[11]=l):l=e[11],l}}}function zn(t){return s.jsx(qt,{item:t},t.key)}function $n(t){return s.jsx(qt,{item:t},t.key)}function Yt(t){const e=N.c(14),{sections:n,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]!==n?(u=n.map(In),e[2]=n,e[3]=u):u=e[3];let p;e[4]!==o||e[5]!==f||e[6]!==u?(p=s.jsxs(wn,{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=s.jsxs(Nn,{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 In(t,e){return s.jsx(_n,{section:t},e)}Yt.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,n)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(ee,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};const On="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 Ae(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z(On,n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.jsx(re,{variant:"ghost",size:"sm",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Pn({invitation:t,onStatusChange:e}){const[n,r]=w.useState(!1),[l,o]=w.useState(!1),i=$e(),a=async()=>{r(!0);try{const p=await he.organization.acceptInvitation({invitationId:t.id});if(p.error)ye.error(p.error.message),r(!1);else{e(t.id,"accepted");const x=await he.organization.setActive({organizationId:t.organizationId});x?.data?.slug?(ye.success("Invitation accepted!"),i({to:"/$org",params:{org:x.data.slug}})):(ye.success("Invitation accepted! Redirecting..."),i({to:"/"}))}}catch{ye.error("Failed to accept invitation"),r(!1)}},c=async()=>{o(!0);try{const p=await he.organization.rejectInvitation({invitationId:t.id});p.error?(ye.error(p.error.message),o(!1)):(ye.success("Invitation rejected"),e(t.id,"rejected"),o(!1))}catch{ye.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 s.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:[s.jsx("div",{className:"shrink-0 size-5 flex items-center justify-center",children:s.jsx(Vt,{size:16,className:"text-muted-foreground"})}),s.jsxs("p",{className:"flex-1 text-sm text-foreground min-w-0 whitespace-nowrap overflow-hidden",children:["You have been invited to ",s.jsx("span",{className:"font-semibold inline-block max-w-[200px] truncate align-bottom",children:d})]}),s.jsx("div",{className:"flex items-center gap-1 shrink-0",children:m?s.jsxs(s.Fragment,{children:[s.jsx(re,{variant:"ghost",size:"icon",onClick:c,disabled:n||l,className:"h-8 w-8",children:s.jsx(mt,{size:14})}),s.jsx(re,{variant:"outline",size:"icon",onClick:a,disabled:n||l,className:"h-8 w-8",children:s.jsx(Me,{size:14})})]}):f?s.jsxs(dt,{variant:"outline",className:"h-6 px-2 text-xs",children:[s.jsx(Me,{size:12}),"Accepted"]}):u?s.jsxs(dt,{variant:"outline",className:"h-6 px-2 text-xs",children:[s.jsx(mt,{size:12}),"Declined"]}):null})]})}function Tn(){const[t,e]=w.useState(!1),n=w.useContext(cs),{data:r}=n.hooks.useListUserInvitations(),{data:l}=he.useListOrganizations(),[o,i]=w.useState({}),m=(r??[]).filter(h=>new Date(h.expiresAt)>new Date).map(h=>{const g=(l??[]).find(j=>j.id===h.organizationId);return{...h,organizationSlug:g?.slug||h.organizationSlug,organizationName:g?.name||h.organizationName}}).map(h=>({...h,status:o[h.id]||h.status})),f=[...m].sort((h,g)=>{const j={pending:0,accepted:1,rejected:2};return(j[h.status]??999)-(j[g.status]??999)}),p=m.filter(h=>h.status==="pending").length>0,x=(h,g)=>{i(j=>({...j,[h]:g}))};return s.jsxs(rt,{open:t,onOpenChange:e,children:[s.jsx(lt,{asChild:!0,children:s.jsxs(Ae,{children:[s.jsx(ct,{size:18}),"Inbox",p&&s.jsx("span",{className:"ml-auto h-2 w-2 rounded-full bg-destructive"})]})}),s.jsxs(ot,{side:"right",align:"start",className:"w-[400px] p-0 overflow-hidden",children:[s.jsx("div",{className:"px-4 py-3 border-b border-border",children:s.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Inbox"})}),s.jsx("div",{className:"max-h-96 overflow-auto",children:f.length>0?f.map(h=>s.jsx(Pn,{invitation:h,onStatusChange:x},h.id)):s.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[s.jsx(ct,{size:32,className:"text-muted-foreground/40 mb-2"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"No invitations at the moment"})]})})]})]})}function An(t){const e=N.c(29),{user:n,userImage:r,onOpenSettings:l}=t;let o;e[0]!==n?(o=async()=>{if(!n)return;const _=`ID: ${n.id}
1
+ import{r as w,c as N,j as s,u as Se,b as $e,by as Ke,L as Oe,bu as ls,bK as os,O as ne,I as xt,v as is,y as as,d as he,t as ye,b5 as cs,bL as ht,e as st,bM as ds,bo as gt,bN as Pe,A as ms,S as jt,f as fs,h as us,N as ps,n as xs,K as hs,m as bt,P as gs}from"./index-DXIsw0zh.js";import{C as oe,i as js}from"./index-DWPOfnC9.js";import{I as bs}from"./integration-icon-B6mCYbtH.js";import{P as Ie}from"./index-D0P8wRBl.js";import{e as Ge,u as vs,g as Ze,S as ee,h as vt,C as Ns,f as ys,j as Ss}from"./use-deco-chat-open-XtGRSas5.js";import{c as z,B as re}from"./button-B1_AjrAy.js";import{d as ws}from"./constants-D3TKhQyR.js";import{T as Cs,i as ks,b as _s,S as zs,c as $s,d as Is,e as Os,f as Ps,t as Nt}from"./typewriter-title-C_l4tadT.js";import{s as qe}from"./Plus-ldykr1Qs.js";import{t as yt}from"./Users03-Bn4RTBQO.js";import{i as Be}from"./X-PXGrxqUi.js";import{E as St}from"./error-boundary-D3lg8C_F.js";import{C as wt}from"./create-project-dialog-CbnOarMk.js";import{n as Ct}from"./CheckDone01-BkzpeEp8.js";import{n as Ts}from"./Container-DZaD5nKa.js";import{e as As}from"./Dataflow03-1bin_Ob0.js";import{a as Ms}from"./Home02-BfUb9zF_.js";import{u as Es,a as kt}from"./use-project-gbXgodP7.js";import{u as De}from"./use-mobile-DIAoFlrU.js";import{b as Fe,c as _t,a as We,T as Ve}from"./tooltip-Dp5lhZb-.js";import{t as nt}from"./ChevronDown-DIu5de-X.js";import{A as ke}from"./avatar-BwRAYU0T.js";import{b as rt,P as lt,a as ot}from"./popover-Bb6R9icK.js";import{n as ct}from"./Inbox01-B8fBrw9y.js";import{B as dt}from"./badge-D7RdE5x4.js";import{i as Me}from"./Check-BHtow5c6.js";import{s as mt}from"./XClose-CwEytWmM.js";import{i as zt}from"./ChevronRight-Ds0FvHp6.js";import{a as it}from"./Settings02-By12van4.js";import{C as $t}from"./create-organization-dialog-C5Cn0159.js";import{c as Ls,b as Ds,g as Rs,a as Hs,D as Us}from"./dialog-BIx4eChJ.js";import{L as Te}from"./label-BAn78i4V.js";import{S as Bs,a as Fs,b as Ws,d as Xe,c as Vs}from"./select-Dtkbt4-O.js";import{S as He}from"./switch-RGSyl6UC.js";import{i as Ks}from"./Code01-CfpShGlI.js";import{a as It}from"./Copy01-qW8IV1YX.js";import{u as Ot,a as Gs}from"./use-organization-settings-W2sWkYV6.js";import{i as Zs}from"./File06-BrnW1ZQ1.js";import{I as qs}from"./input-CBsHg1ZU.js";import{c as Ys}from"./Grid01-CCE4xs16.js";import{a as Js,T as Xs}from"./topbar-portal-BMMpyuIo.js";import{a as Qs,b as en,D as tn,c as sn,g as ft}from"./dropdown-menu-Bqe_ZQT7.js";import{i as nn}from"./Globe01-7CpfXn5N.js";import{n as ut}from"./LinkExternal01-C6wGiaKd.js";import{t as rn}from"./Settings01-DZTt6EoC.js";import{u as Pt,L as Tt}from"./localstorage-keys-5bqIWFww.js";import{R as ln,a as At,b as on}from"./resizable-CTqqQjcd.js";import"./spinner-CQv4OdiY.js";import"./use-mcp-prompts-BVHx-kiG.js";import"./useQuery-BB1xkDqD.js";import"./form-CSMGXcSP.js";import"./usage-B8eRkRZY.js";import"./ArrowUp-DRhMKIK5.js";import"./Edit01-BFKPZm51.js";import"./XCircle-DkU1KZH1.js";import"./AlertCircle-54XkBG75.js";import"./AlertTriangle-ZoXqH5xx.js";import"./ArrowLeft-CYxjro91.js";import"./use-copy-B35KQJbq.js";import"./use-virtual-mcp-DaDbSDv1.js";import"./use-connection-BQuQwDk4.js";import"./useMutation-B0HsJHYQ.js";import"./SearchMd-CJBYDik4.js";import"./use-create-virtual-mcp-CExHv6Kc.js";import"./marked.esm-BaswSlok.js";import"./markdown-CGk5zbs1.js";import"./tools-list-B0vbhECW.js";import"./collection-table-wrapper-7diw-YMI.js";import"./List-CnAhQJaO.js";import"./table-D_QygT6-.js";import"./empty-state-BRTEyQic.js";import"./Loading01-CQxnYIyy.js";import"./card-CuDdPQFh.js";import"./Eye-Ci58n8nv.js";import"./Globe02-B27PYM5b.js";import"./RefreshCw01-DsWpmHoM.js";import"./layout-CJ8IA4Pt.js";import"./generate-id-Dyweu44Y.js";import"./Clock-CwhFkG9v.js";import"./Trash01-DTuEjPqc.js";import"./use-llm-DjuAxzNV.js";import"./use-binding-CCMbm9JJ.js";import"./binder-D1ZOF1Sc.js";import"./Image01-CbvGPZGr.js";import"./RefreshCcw01-DH9n4JeZ.js";import"./useSuspenseInfiniteQuery-NieK84q6.js";import"./infiniteQueryObserver-BEZRxvfD.js";import"./textarea-Bs1SDhbD.js";import"./index-DGQeUY5q.js";import"./alert-dialog-DeTFKcxV.js";const Qe=({size:t=24,color:e="currentColor",...n})=>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",...n},w.createElement("path",{d:"M7 17 17 7m0 0H7m10 0v10"}));Qe.displayName="ArrowUpRight";const Mt=({size:t=24,color:e="currentColor",...n})=>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",...n},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"}));Mt.displayName="BarChart10";const Et=({size:t=24,color:e="currentColor",...n})=>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",...n},w.createElement("path",{d:"M9.354 21c.705.622 1.632 1 2.646 1s1.94-.378 2.646-1M18 8A6 6 0 1 0 6 8c0 3.09-.78 5.206-1.65 6.605-.735 1.18-1.102 1.771-1.089 1.936.015.182.054.252.2.36.133.099.732.099 1.928.099H18.61c1.196 0 1.795 0 1.927-.098.147-.11.186-.179.2-.361.014-.165-.353-.755-1.088-1.936C18.78 13.206 18 11.09 18 8Z"}));Et.displayName="Bell01";const Lt=({size:t=24,color:e="currentColor",...n})=>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",...n},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"}));Lt.displayName="BookOpen01";const Dt=({size:t=24,color:e="currentColor",...n})=>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",...n},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"}));Dt.displayName="Building02";const Rt=({size:t=24,color:e="currentColor",...n})=>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",...n},w.createElement("path",{d:"m18 17-5-5 5-5m-7 10-5-5 5-5"}));Rt.displayName="ChevronLeftDouble";const Ht=({size:t=24,color:e="currentColor",...n})=>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",...n},w.createElement("path",{d:"m6 17 5-5-5-5m7 10 5-5-5-5"}));Ht.displayName="ChevronRightDouble";const Ut=({size:t=24,color:e="currentColor",...n})=>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",...n},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"}));Ut.displayName="FaceSmile";const Bt=({size:t=24,color:e="currentColor",...n})=>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",...n},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"}));Bt.displayName="LayoutRight";const Ft=({size:t=24,color:e="currentColor",...n})=>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",...n},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"}));Ft.displayName="LogOut01";const Wt=({size:t=24,color:e="currentColor",...n})=>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",...n},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"}));Wt.displayName="LogOut02";const Vt=({size:t=24,color:e="currentColor",...n})=>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",...n},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"}));Vt.displayName="Mail01";const Kt=({size:t=24,color:e="currentColor",...n})=>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",...n},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"}));Kt.displayName="Settings04";function an(){const t=N.c(65),{org:e}=Se(),[,n]=Ge(),{selectedVirtualMcp:r,modelsConnections:l,isChatEmpty:o,activeThreadId:i,createThread:a,switchToThread:c,threads:d}=vs();let m;if(t[0]!==i||t[1]!==d){let q;t[3]!==i?(q=V=>V.id===i,t[3]=i,t[4]=q):q=t[4],m=d.find(q),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 g;t[5]!==e.id?(g=ws(e.id),t[5]=e.id,t[6]=g):g=t[6];const b=r??g;let v;t[7]!==a?(v=()=>{h(()=>{a()})},t[7]=a,t[8]=v):v=t[8];const y=v;if(l.length===0){let q;t[9]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(Ie.Header.Left,{className:"gap-2"}),t[9]=q):q=t[9];let V;t[10]!==n?(V=()=>n(!1),t[10]=n,t[11]=V):V=t[11];let P;t[12]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(Be,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[12]=P):P=t[12];let D;t[13]!==V?(D=s.jsxs(Ie.Header,{className:"flex-none",children:[q,s.jsx(Ie.Header.Right,{className:"gap-1",children:s.jsx("button",{type:"button",onClick:V,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:P})})]}),t[13]=V,t[14]=D):D=t[14];let G;t[15]!==e?(G=s.jsx(oe.Main,{className:"flex flex-col items-center",children:s.jsx(oe.EmptyState,{children:s.jsx(oe.NoLlmBindingEmptyState,{title:"No model provider connected",description:"Connect to a model provider to unlock AI-powered features.",org:e})})}),t[15]=e,t[16]=G):G=t[16];let Y;return t[17]!==D||t[18]!==G?(Y=s.jsxs(oe,{children:[D,G]}),t[17]=D,t[18]=G,t[19]=Y):Y=t[19],Y}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 S;t[20]!==C?(S=z("absolute inset-0 flex flex-col transition-all ease-in-out",C),t[20]=C,t[21]=S):S=t[21];let _;t[22]!==f||t[23]!==o?(_=!o&&f?.title&&s.jsx(Cs,{text:f.title,className:"text-sm font-medium text-foreground"}),t[22]=f,t[23]=o,t[24]=_):_=t[24];let O;t[25]!==_?(O=s.jsx(Ie.Header.Left,{className:"gap-2",children:_}),t[25]=_,t[26]=O):O=t[26];let k;t[27]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(qe,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[27]=k):k=t[27];let I;t[28]!==y||t[29]!==x?(I=s.jsx("button",{type:"button",onClick:y,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]=y,t[29]=x,t[30]=I):I=t[30];let $;t[31]===Symbol.for("react.memo_cache_sentinel")?($=()=>p(!0),t[31]=$):$=t[31];let M;t[32]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx("button",{type:"button",onClick:$,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"Chat history",children:s.jsx(ks,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})}),t[32]=M):M=t[32];let A;t[33]!==n?(A=()=>n(!1),t[33]=n,t[34]=A):A=t[34];let U;t[35]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(Be,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[35]=U):U=t[35];let L;t[36]!==A?(L=s.jsx("button",{type:"button",onClick:A,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:U}),t[36]=A,t[37]=L):L=t[37];let T;t[38]!==L||t[39]!==I?(T=s.jsxs(Ie.Header.Right,{className:"gap-1",children:[I,M,L]}),t[38]=L,t[39]=I,t[40]=T):T=t[40];let E;t[41]!==T||t[42]!==O?(E=s.jsxs(Ie.Header,{className:"flex-none",children:[O,T]}),t[41]=T,t[42]=O,t[43]=E):E=t[43];let B;t[44]!==b||t[45]!==o?(B=s.jsx(oe.Main,{children:o?s.jsx(oe.EmptyState,{children:s.jsxs("div",{className:"flex flex-col items-center gap-6 w-full px-4",children:[s.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 p-0 text-center",children:[s.jsx(bs,{icon:b.icon,name:b.title,size:"lg",fallbackIcon:s.jsx(yt,{size:32}),className:"size-[60px]! rounded-[18px]!"}),s.jsx("h3",{className:"text-xl font-medium text-foreground",children:b.title}),s.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:b.description??"Ask anything about configuring model providers or using MCP Mesh."})]}),s.jsx(oe.IceBreakers,{})]})}):s.jsx(oe.Messages,{})}),t[44]=b,t[45]=o,t[46]=B):B=t[46];let H;t[47]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(oe.Footer,{children:s.jsx(oe.Input,{})}),t[47]=H):H=t[47];let R;t[48]!==E||t[49]!==B||t[50]!==S?(R=s.jsxs("div",{className:S,children:[E,B,H]}),t[48]=E,t[49]=B,t[50]=S,t[51]=R):R=t[51];const F=u?"opacity-100 translate-x-0":"opacity-0 translate-x-4 pointer-events-none";let W;t[52]!==F?(W=z("absolute inset-0 flex flex-col transition-all duration-300 ease-in-out",F),t[52]=F,t[53]=W):W=t[53];let K;t[54]===Symbol.for("react.memo_cache_sentinel")?(K=()=>p(!1),t[54]=K):K=t[54];let Z;t[55]!==i||t[56]!==c||t[57]!==d?(Z=s.jsx(_s,{threads:d,activeThreadId:i,onThreadSelect:c,onClose:K}),t[55]=i,t[56]=c,t[57]=d,t[58]=Z):Z=t[58];let X;t[59]!==W||t[60]!==Z?(X=s.jsx("div",{className:W,children:Z}),t[59]=W,t[60]=Z,t[61]=X):X=t[61];let Q;return t[62]!==R||t[63]!==X?(Q=s.jsxs(oe,{className:"relative overflow-hidden",children:[R,X]}),t[62]=R,t[63]=X,t[64]=Q):Q=t[64],Q}function cn(){const t=N.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(oe.Skeleton,{}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(St,{fallback:e,children:s.jsx(w.Suspense,{fallback:s.jsx(oe.Skeleton,{}),children:s.jsx(an,{})})}),t[1]=n):n=t[1],n}function dn(){const t=N.c(35),[e]=Ze(),{locator:n,org:r}=Se(),l=$e(),o=Ke(),{org:i,project:a}=Oe.parse(n),c=Oe.isOrgAdminProject(n),{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=P=>f.includes(P.pluginId),t[2]=f,t[3]=u):u=t[3];const p=ls.filter(u),x=o.location.pathname===`/${i}/${a}`||o.location.pathname===`/${i}/${a}/`;let h;t[4]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Ms,{}),t[4]=h):h=t[4];const g={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 j;t[5]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Ct,{}),t[5]=j):j=t[5];const b={key:"tasks",label:"Tasks",icon:j,onClick:()=>l({to:"/$org/$project/tasks",params:{org:i,project:ne}})};let v;t[6]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Ts,{}),t[6]=v):v=t[6];const y={key:"mcps",label:"Connections",icon:v,onClick:()=>l({to:"/$org/$project/mcps",params:{org:i,project:ne}})};let C;t[7]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(xt,{}),t[7]=C):C=t[7];const S={key:"projects",label:"Projects",icon:C,onClick:()=>l({to:"/$org/$project/projects",params:{org:i,project:ne}})};let _;t[8]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Dt,{}),t[8]=_):_=t[8];const O={key:"store",label:"Store",icon:_,onClick:()=>l({to:"/$org/$project/store",params:{org:i,project:ne}})};let k;t[9]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(yt,{}),t[9]=k):k=t[9];const I={key:"agents",label:"Agents",icon:k,onClick:()=>l({to:"/$org/$project/agents",params:{org:i,project:ne}})};let $;t[10]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(Mt,{}),t[10]=$):$=t[10];const M={key:"monitoring",label:"Monitor",icon:$,onClick:()=>l({to:"/$org/$project/monitoring",params:{org:i,project:ne}})};let A;t[11]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(Ut,{}),t[11]=A):A=t[11];const U={key:"members",label:"Members",icon:A,onClick:()=>l({to:"/$org/$project/members",params:{org:i,project:ne}})},L=[...e.experimental_tasks?[b]:[],y,...e.experimental_projects?[S]:[],O,I,M,U],T=p.map(P=>({key:P.pluginId,label:P.label,icon:P.icon,onClick:()=>l({to:"/$org/$project/$pluginId",params:{org:i,project:a,pluginId:P.pluginId}})}));let E;t[12]!==f?(E=P=>f.includes(P.pluginId),t[12]=f,t[13]=E):E=t[13];const H=os.filter(E).map(P=>({type:"group",group:{id:`${P.pluginId}-${P.id}`,label:P.label,items:P.items.map((D,G)=>({key:`${P.pluginId}-${P.id}-${G}`,label:D.label,icon:D.icon,onClick:()=>l({to:"/$org/$project/$pluginId",params:{org:i,project:a,pluginId:P.pluginId}})})),defaultExpanded:P.defaultExpanded??!0}}));if(c){const P=[{type:"items",items:[g,...L]}];if(T.length>0){let D;t[14]===Symbol.for("react.memo_cache_sentinel")?(D={type:"divider"},t[14]=D):D=t[14],P.push(D);let G;t[15]!==T?(G={type:"items",items:T},t[15]=T,t[16]=G):G=t[16],P.push(G)}if(H.length>0){if(T.length===0){let D;t[17]===Symbol.for("react.memo_cache_sentinel")?(D={type:"divider"},t[17]=D):D=t[17],P.push(D)}P.push(...H)}return P}let R;t[18]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(js,{}),t[18]=R):R=t[18];let F;t[19]!==l||t[20]!==i||t[21]!==a?(F={key:"tasks",label:"Tasks",icon:R,onClick:()=>l({to:"/$org/$project/tasks",params:{org:i,project:a}})},t[19]=l,t[20]=i,t[21]=a,t[22]=F):F=t[22];const W=F;let K;t[23]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(As,{}),t[23]=K):K=t[23];let Z;t[24]!==l||t[25]!==i||t[26]!==a?(Z={key:"workflows",label:"Workflows",icon:K,onClick:()=>l({to:"/$org/$project/workflows",params:{org:i,project:a}})},t[24]=l,t[25]=i,t[26]=a,t[27]=Z):Z=t[27];const X=Z;let Q;t[28]!==e.experimental_tasks||t[29]!==W?(Q=e.experimental_tasks?[W]:[],t[28]=e.experimental_tasks,t[29]=W,t[30]=Q):Q=t[30];const V=[{type:"items",items:[g,...Q,X]}];if(T.length>0){let P;t[31]===Symbol.for("react.memo_cache_sentinel")?(P={type:"divider"},t[31]=P):P=t[31],V.push(P);let D;t[32]!==T?(D={type:"items",items:T},t[32]=T,t[33]=D):D=t[33],V.push(D)}if(H.length>0){if(T.length===0){let P;t[34]===Symbol.for("react.memo_cache_sentinel")?(P={type:"divider"},t[34]=P):P=t[34],V.push(P)}V.push(...H)}return V}const mn="sidebar_state",fn=3600*24*7,un="16rem",pn="18rem",xn="3rem",hn="b",Gt=w.createContext(null);function Ye(){const t=w.useContext(Gt);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function gn(t){const e=N.c(21),{defaultOpen:n,open:r,onOpenChange:l,children:o}=t,i=n===void 0?!0:n,a=De(),[c,d]=w.useState(!1),[m,f]=w.useState(i),u=r??m;let p;e[0]!==u||e[1]!==l?(p=O=>{const k=typeof O=="function"?O(u):O;l?l(k):f(k),document.cookie=`${mn}=${k}; path=/; max-age=${fn}`},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(bn):x(jn),e[3]=a,e[4]=x,e[5]=h):h=e[5];const g=h;let j,b;e[6]!==g?(j=()=>{const O=k=>{if(k.key===hn&&(k.metaKey||k.ctrlKey)){const I=k.target;if(I.tagName==="INPUT"||I.tagName==="TEXTAREA"||I.isContentEditable)return;k.preventDefault(),g()}};return globalThis.addEventListener("keydown",O),()=>globalThis.removeEventListener("keydown",O)},b=[g],e[6]=g,e[7]=j,e[8]=b):(j=e[7],b=e[8]),w.useEffect(j,b);const v=u?"expanded":"collapsed";let y;e[9]!==a||e[10]!==u||e[11]!==c||e[12]!==x||e[13]!==v||e[14]!==g?(y={state:v,open:u,setOpen:x,isMobile:a,openMobile:c,setOpenMobile:d,toggleSidebar:g},e[9]=a,e[10]=u,e[11]=c,e[12]=x,e[13]=v,e[14]=g,e[15]=y):y=e[15];const C=y;let S;e[16]!==o?(S=s.jsx(_t,{delayDuration:0,children:o}),e[16]=o,e[17]=S):S=e[17];let _;return e[18]!==C||e[19]!==S?(_=s.jsx(Gt.Provider,{value:C,children:S}),e[18]=C,e[19]=S,e[20]=_):_=e[20],_}function jn(t){return!t}function bn(t){return!t}function vn(t){const e=N.c(14);let n,r,l,o;e[0]!==t?({className:r,style:o,children:n,...l}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=l,e[4]=o):(n=e[1],r=e[2],l=e[3],o=e[4]);let i;e[5]!==o?(i={"--sidebar-width":un,"--sidebar-width-icon":xn,...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]!==n||e[10]!==l||e[11]!==a||e[12]!==c?(d=s.jsx("div",{"data-slot":"sidebar-wrapper",style:a,className:c,...l,children:n}),e[9]=n,e[10]=l,e[11]=a,e[12]=c,e[13]=d):d=e[13],d}function Nn(t){const e=N.c(46);let n,r,l,o,i,a;e[0]!==t?({side:o,variant:i,collapsible:a,className:r,children:n,...l}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=l,e[4]=o,e[5]=i,e[6]=a):(n=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}=Ye();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 I;return e[9]!==n||e[10]!==l||e[11]!==k?(I=s.jsx("div",{"data-slot":"sidebar",className:k,...l,children:n}),e[9]=n,e[10]=l,e[11]=k,e[12]=I):I=e[12],I}if(f){let k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k={"--sidebar-width":pn},e[13]=k):k=e[13];let I;e[14]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsxs($s,{className:"sr-only",children:[s.jsx(Is,{children:"Sidebar"}),s.jsx(Os,{children:"Displays the mobile sidebar."})]}),e[14]=I):I=e[14];let $;e[15]!==n?($=s.jsx("div",{className:"flex h-full w-full flex-col",children:n}),e[15]=n,e[16]=$):$=e[16];let M;e[17]!==c||e[18]!==$?(M=s.jsxs(Ps,{"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]=$,e[19]=M):M=e[19];let A;return e[20]!==p||e[21]!==l||e[22]!==x||e[23]!==M?(A=s.jsx(zs,{open:p,onOpenChange:x,...l,children:M}),e[20]=p,e[21]=l,e[22]=x,e[23]=M,e[24]=A):A=e[24],A}const h=u==="collapsed"?m:"",g=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 j;e[25]!==g?(j=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",g),e[25]=g,e[26]=j):j=e[26];let b;e[27]!==j?(b=s.jsx("div",{"data-slot":"sidebar-gap",className:j}),e[27]=j,e[28]=b):b=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)]",y=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]!==y?(C=z("fixed top-12 bottom-0 z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",v,y,r),e[29]=r,e[30]=v,e[31]=y,e[32]=C):C=e[32];let S;e[33]!==n?(S=s.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:n}),e[33]=n,e[34]=S):S=e[34];let _;e[35]!==l||e[36]!==C||e[37]!==S?(_=s.jsx("div",{"data-slot":"sidebar-container",className:C,...l,children:S}),e[35]=l,e[36]=C,e[37]=S,e[38]=_):_=e[38];let O;return e[39]!==c||e[40]!==u||e[41]!==_||e[42]!==h||e[43]!==b||e[44]!==d?(O=s.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:[b,_]}),e[39]=c,e[40]=u,e[41]=_,e[42]=h,e[43]=b,e[44]=d,e[45]=O):O=e[45],O}function yn(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(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",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.jsx("main",{"data-slot":"sidebar-inset",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Zt(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("flex flex-col gap-2 p-2",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.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 Sn(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("flex flex-col gap-2 px-2 items-start justify-start",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.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 at(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("h-4 m-0! w-full",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.jsx("div",{"data-sidebar":"separator",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function wn(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.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 Ee(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.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 Le(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("w-full text-sm",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.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 _e(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("flex w-full min-w-0 flex-col gap-1",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.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 ie(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("group/menu-item relative",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.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 Cn=as("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 Re(t){const e=N.c(28);let n,r,l,o,i,a,c;e[0]!==t?({asChild:l,isActive:o,variant:i,size:a,tooltip:c,className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=l,e[4]=o,e[5]=i,e[6]=a,e[7]=c):(n=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?is:"button",{isMobile:x,state:h}=Ye();let g;e[8]!==n||e[9]!==u||e[10]!==f?(g=z(Cn({variant:f,size:u}),n),e[8]=n,e[9]=u,e[10]=f,e[11]=g):g=e[11];let j;e[12]!==p||e[13]!==m||e[14]!==r||e[15]!==u||e[16]!==g?(j=s.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":u,"data-active":m,className:g,...r}),e[12]=p,e[13]=m,e[14]=r,e[15]=u,e[16]=g,e[17]=j):j=e[17];const b=j;if(!c)return b;if(typeof c=="string"){let _;e[18]!==c?(_={children:c},e[18]=c,e[19]=_):_=e[19],c=_}let v;e[20]!==b?(v=s.jsx(We,{asChild:!0,children:b}),e[20]=b,e[21]=v):v=e[21];const y=h!=="collapsed"||x;let C;e[22]!==y||e[23]!==c?(C=s.jsx(Fe,{side:"right",align:"center",hidden:y,...c}),e[22]=y,e[23]=c,e[24]=C):C=e[24];let S;return e[25]!==v||e[26]!==C?(S=s.jsxs(Ve,{children:[v,C]}),e[25]=v,e[26]=C,e[27]=S):S=e[27],S}function kn(t){const e=N.c(18),{label:n,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]!==n?(d=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n}),e[2]=n,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=s.jsx(nt,{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=s.jsx(_e,{children:s.jsx(ie,{children:s.jsxs(Re,{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&&s.jsx(Le,{children:s.jsx(_e,{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=s.jsxs(Ee,{className:"py-0",children:[p,x]}),e[15]=p,e[16]=x,e[17]=h):h=e[17],h}function qt(t){const e=N.c(13),{item:n}=t;let r;e[0]!==n.icon?(r=s.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:n.icon}),e[0]=n.icon,e[1]=r):r=e[1];let l;e[2]!==n.label?(l=s.jsx("span",{className:"truncate",children:n.label}),e[2]=n.label,e[3]=l):l=e[3];let o;e[4]!==n.isActive||e[5]!==n.label||e[6]!==n.onClick||e[7]!==r||e[8]!==l?(o=s.jsxs(Re,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:n.onClick,isActive:n.isActive,tooltip:n.label,children:[r,l]}),e[4]=n.isActive,e[5]=n.label,e[6]=n.onClick,e[7]=r,e[8]=l,e[9]=o):o=e[9];let i;return e[10]!==n.key||e[11]!==o?(i=s.jsx(ie,{children:o},n.key),e[10]=n.key,e[11]=o,e[12]=i):i=e[12],i}function _n(t){const e=N.c(12),{section:n}=t;switch(n.type){case"divider":{let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(at,{className:"my-2"}),e[0]=r):r=e[0],r}case"spacer":{let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex-1"}),e[1]=r):r=e[1],r}case"group":{const r=n.group.label,l=n.group.defaultExpanded;let o;e[2]!==n.group.items?(o=n.group.items.map($n),e[2]=n.group.items,e[3]=o):o=e[3];let i;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==o?(i=s.jsx(kn,{label:r,defaultExpanded:l,children:o}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=o,e[7]=i):i=e[7],i}case"items":{let r;e[8]!==n.items?(r=n.items.map(zn),e[8]=n.items,e[9]=r):r=e[9];let l;return e[10]!==r?(l=s.jsx(Ee,{className:"py-0",children:s.jsx(Le,{children:s.jsx(_e,{className:"gap-0.5",children:r})})}),e[10]=r,e[11]=l):l=e[11],l}}}function zn(t){return s.jsx(qt,{item:t},t.key)}function $n(t){return s.jsx(qt,{item:t},t.key)}function Yt(t){const e=N.c(14),{sections:n,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]!==n?(u=n.map(In),e[2]=n,e[3]=u):u=e[3];let p;e[4]!==o||e[5]!==f||e[6]!==u?(p=s.jsxs(wn,{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=s.jsxs(Nn,{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 In(t,e){return s.jsx(_n,{section:t},e)}Yt.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,n)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(ee,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};const On="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 Ae(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z(On,n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.jsx(re,{variant:"ghost",size:"sm",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Pn({invitation:t,onStatusChange:e}){const[n,r]=w.useState(!1),[l,o]=w.useState(!1),i=$e(),a=async()=>{r(!0);try{const p=await he.organization.acceptInvitation({invitationId:t.id});if(p.error)ye.error(p.error.message),r(!1);else{e(t.id,"accepted");const x=await he.organization.setActive({organizationId:t.organizationId});x?.data?.slug?(ye.success("Invitation accepted!"),i({to:"/$org",params:{org:x.data.slug}})):(ye.success("Invitation accepted! Redirecting..."),i({to:"/"}))}}catch{ye.error("Failed to accept invitation"),r(!1)}},c=async()=>{o(!0);try{const p=await he.organization.rejectInvitation({invitationId:t.id});p.error?(ye.error(p.error.message),o(!1)):(ye.success("Invitation rejected"),e(t.id,"rejected"),o(!1))}catch{ye.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 s.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:[s.jsx("div",{className:"shrink-0 size-5 flex items-center justify-center",children:s.jsx(Vt,{size:16,className:"text-muted-foreground"})}),s.jsxs("p",{className:"flex-1 text-sm text-foreground min-w-0 whitespace-nowrap overflow-hidden",children:["You have been invited to ",s.jsx("span",{className:"font-semibold inline-block max-w-[200px] truncate align-bottom",children:d})]}),s.jsx("div",{className:"flex items-center gap-1 shrink-0",children:m?s.jsxs(s.Fragment,{children:[s.jsx(re,{variant:"ghost",size:"icon",onClick:c,disabled:n||l,className:"h-8 w-8",children:s.jsx(mt,{size:14})}),s.jsx(re,{variant:"outline",size:"icon",onClick:a,disabled:n||l,className:"h-8 w-8",children:s.jsx(Me,{size:14})})]}):f?s.jsxs(dt,{variant:"outline",className:"h-6 px-2 text-xs",children:[s.jsx(Me,{size:12}),"Accepted"]}):u?s.jsxs(dt,{variant:"outline",className:"h-6 px-2 text-xs",children:[s.jsx(mt,{size:12}),"Declined"]}):null})]})}function Tn(){const[t,e]=w.useState(!1),n=w.useContext(cs),{data:r}=n.hooks.useListUserInvitations(),{data:l}=he.useListOrganizations(),[o,i]=w.useState({}),m=(r??[]).filter(h=>new Date(h.expiresAt)>new Date).map(h=>{const g=(l??[]).find(j=>j.id===h.organizationId);return{...h,organizationSlug:g?.slug||h.organizationSlug,organizationName:g?.name||h.organizationName}}).map(h=>({...h,status:o[h.id]||h.status})),f=[...m].sort((h,g)=>{const j={pending:0,accepted:1,rejected:2};return(j[h.status]??999)-(j[g.status]??999)}),p=m.filter(h=>h.status==="pending").length>0,x=(h,g)=>{i(j=>({...j,[h]:g}))};return s.jsxs(rt,{open:t,onOpenChange:e,children:[s.jsx(lt,{asChild:!0,children:s.jsxs(Ae,{children:[s.jsx(ct,{size:18}),"Inbox",p&&s.jsx("span",{className:"ml-auto h-2 w-2 rounded-full bg-destructive"})]})}),s.jsxs(ot,{side:"right",align:"start",className:"w-[400px] p-0 overflow-hidden",children:[s.jsx("div",{className:"px-4 py-3 border-b border-border",children:s.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Inbox"})}),s.jsx("div",{className:"max-h-96 overflow-auto",children:f.length>0?f.map(h=>s.jsx(Pn,{invitation:h,onStatusChange:x},h.id)):s.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[s.jsx(ct,{size:32,className:"text-muted-foreground/40 mb-2"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"No invitations at the moment"})]})})]})]})}function An(t){const e=N.c(29),{user:n,userImage:r,onOpenSettings:l}=t;let o;e[0]!==n?(o=async()=>{if(!n)return;const _=`ID: ${n.id}
2
2
  Name: ${n.name||"N/A"}
3
- Email: ${n.email}`;try{await navigator.clipboard.writeText(_),ye.success("User info copied to clipboard")}catch{ye.error("Failed to copy user info to clipboard")}},e[0]=n,e[1]=o):o=e[1];const i=o,a=n.name||n.email||"U";let c;e[2]!==a||e[3]!==r?(c=s.jsx(ke,{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=n.name||"User";let m;e[5]!==d?(m=s.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]!==n.email?(f=s.jsx("span",{className:"text-xs text-muted-foreground truncate font-normal",children:n.email}),e[7]=n.email,e[8]=f):f=e[8];let u;e[9]!==m||e[10]!==f?(u=s.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=s.jsxs(re,{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=s.jsx(Tn,{}),e[16]=x):x=e[16];let h;e[17]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Gt,{size:18}),e[17]=h):h=e[17];let g;e[18]!==l?(g=s.jsxs(Ae,{onClick:l,children:[h,"Preferences"]}),e[18]=l,e[19]=g):g=e[19];let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Ae,{asChild:!0,children:s.jsxs("a",{href:"https://www.decocms.com/terms-of-use",target:"_blank",rel:"noopener noreferrer",children:[s.jsx(Lt,{size:18}),s.jsx("span",{className:"flex-1",children:"Terms & Conditions"}),s.jsx(Qe,{size:14})]})}),e[20]=j):j=e[20];let b;e[21]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Ae,{asChild:!0,children:s.jsxs("a",{href:"https://github.com/decocms/mesh",target:"_blank",rel:"noopener noreferrer",children:[s.jsx(ht,{className:"size-[18px]"}),s.jsx("span",{className:"flex-1",children:"decocms/mesh"}),s.jsx(Qe,{size:14})]})}),e[21]=b):b=e[21];let v;e[22]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs(Ae,{onClick:Mn,children:[s.jsx(Wt,{size:18}),"Log out"]}),e[22]=v):v=e[22];let y;e[23]!==g?(y=s.jsxs("div",{className:"p-1 flex flex-col",children:[x,g,j,b,v]}),e[23]=g,e[24]=y):y=e[24];let C;e[25]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("div",{className:"mt-auto px-3 py-2 border-t border-border",children:s.jsxs("span",{className:"text-[11px] text-muted-foreground/75",children:["v","2.109.1"]})}),e[25]=C):C=e[25];let S;return e[26]!==y||e[27]!==p?(S=s.jsx(s.Fragment,{children:s.jsxs("div",{className:"flex flex-col gap-0.5 bg-sidebar min-w-[250px]",children:[p,y,C]})}),e[26]=y,e[27]=p,e[28]=S):S=e[28],S}function Mn(){return he.signOut()}function En(t){const e=N.c(26),{org:n,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=y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),o?.())},e[3]=o,e[4]=p):p=e[4];let x;e[5]!==a||e[6]!==n.id?(x=()=>a?.(n.id),e[5]=a,e[6]=n.id,e[7]=x):x=e[7];const h=n.logo??void 0;let g;e[8]!==n.name||e[9]!==h?(g=s.jsx(ke,{url:h,fallback:n.name,size:"sm",className:"size-6 shrink-0 rounded-md",objectFit:"cover"}),e[8]=n.name,e[9]=h,e[10]=g):g=e[10];let j;e[11]!==n.name?(j=s.jsx("span",{className:"flex-1 text-sm text-foreground truncate text-left min-w-0",children:n.name}),e[11]=n.name,e[12]=j):j=e[12];let b;e[13]!==i||e[14]!==n.name||e[15]!==d||e[16]!==c?(b=i&&c?s.jsx("button",{type:"button","aria-label":`${n.name} settings`,className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:y=>{y.stopPropagation(),i()},children:s.jsx(it,{size:16,className:"text-muted-foreground"})}):d?s.jsx(zt,{size:16,className:"text-muted-foreground shrink-0"}):s.jsx("span",{className:"size-5 shrink-0","aria-hidden":"true"}),e[13]=i,e[14]=n.name,e[15]=d,e[16]=c,e[17]=b):b=e[17];let v;return e[18]!==o||e[19]!==u||e[20]!==p||e[21]!==x||e[22]!==g||e[23]!==j||e[24]!==b?(v=s.jsxs("div",{role:"button",tabIndex:0,className:u,onClick:o,onKeyDown:p,onMouseEnter:x,children:[g,j,b]}),e[18]=o,e[19]=u,e[20]=p,e[21]=x,e[22]=g,e[23]=j,e[24]=b,e[25]=v):v=e[25],v}function Ln(t){const e=N.c(34),{currentOrgSlug:n,hoveredOrgId:r,onOrgSelect:l,onOrgSettings:o,onPopoverClose:i,onCreateOrganization:a,onOrgHover:c}=t,{data:d}=he.useListOrganizations();let m,f,u,p;if(e[0]!==n||e[1]!==r||e[2]!==a||e[3]!==c||e[4]!==l||e[5]!==o||e[6]!==i||e[7]!==d){let g;e[12]!==n?(g=(S,_)=>S.slug===n?-1:_.slug===n?1:S.name.localeCompare(_.name),e[12]=n,e[13]=g):g=e[13];const j=[...d??[]].sort(g);u="flex flex-col min-w-[240px] border-l border-border";let b;e[14]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("span",{className:"text-xs text-muted-foreground truncate",children:"Your Organizations"}),e[14]=b):b=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 y;e[18]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(qe,{size:16,className:"text-muted-foreground"}),e[18]=y):y=e[18],e[19]!==v?(p=s.jsxs("div",{className:"flex items-center justify-between h-10 px-3 border-b border-border",children:[b,s.jsx(re,{variant:"ghost",size:"icon",className:"size-5",onClick:v,children:y})]}),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]!==n||e[22]!==r||e[23]!==c||e[24]!==l||e[25]!==o?(C=S=>s.jsx(En,{org:S,isActive:S.slug===n,isHovered:S.id===r,onClick:()=>l(S.slug),onSettings:()=>o(S.slug),onHover:c},S.slug),e[21]=n,e[22]=r,e[23]=c,e[24]=l,e[25]=o,e[26]=C):C=e[26],f=j.map(C),e[0]=n,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=s.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=s.jsxs("div",{className:u,children:[p,x]}),e[30]=u,e[31]=p,e[32]=x,e[33]=h):h=e[33],h}function Dn(t){const e=N.c(27),{project:n,isActive:r,onClick:l,onSettings:o}=t,[i,a]=w.useState(!1),c=r||i,d=n.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=y=>{(y.key==="Enter"||y.key===" ")&&(y.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]!==n.name||e[7]!==n.ui||e[8]!==d?(h=n.ui?.icon?s.jsx("img",{src:n.ui.icon,alt:"",className:"size-6 rounded-md object-cover shrink-0"}):s.jsx(ke,{fallback:n.name,size:"sm",shape:"square",className:"size-6 shrink-0 rounded-md",style:{backgroundColor:d}}),e[6]=n.name,e[7]=n.ui,e[8]=d,e[9]=h):h=e[9];let g;e[10]!==n.name?(g=s.jsx("span",{className:"flex-1 text-sm text-foreground truncate text-left min-w-0",children:n.name}),e[10]=n.name,e[11]=g):g=e[11];let j;e[12]!==r?(j=r&&s.jsx(Me,{size:16,className:"text-muted-foreground shrink-0"}),e[12]=r,e[13]=j):j=e[13];let b;e[14]!==r||e[15]!==o||e[16]!==n.name||e[17]!==c?(b=o&&c&&!r?s.jsx("button",{type:"button","aria-label":`${n.name} settings`,className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:y=>{y.stopPropagation(),o()},children:s.jsx(it,{size:16,className:"text-muted-foreground"})}):r?null:s.jsx("span",{className:"size-5 shrink-0","aria-hidden":"true"}),e[14]=r,e[15]=o,e[16]=n.name,e[17]=c,e[18]=b):b=e[18];let v;return e[19]!==l||e[20]!==f||e[21]!==u||e[22]!==h||e[23]!==g||e[24]!==j||e[25]!==b?(v=s.jsxs("div",{role:"button",tabIndex:0,className:f,onClick:l,onKeyDown:u,onMouseEnter:p,onMouseLeave:x,children:[h,g,j,b]}),e[19]=l,e[20]=f,e[21]=u,e[22]=h,e[23]=g,e[24]=j,e[25]=b,e[26]=v):v=e[26],v}function Rn(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"space-y-1 px-2 py-1",children:[s.jsx(ee,{className:"h-10 w-full"}),s.jsx(ee,{className:"h-10 w-full"})]}),t[0]=e):e=t[0],e}function Hn(t){const e=N.c(16),{organizationId:n,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}=kt(n,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(Un)??[];if(u.length===0){let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=s.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=>s.jsx(Dn,{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=s.jsx(s.Fragment,{children:d}),e[14]=d,e[15]=f):f=e[15],f}function Un(t){return t.slug!==ne}function Bn(t){const e=N.c(17),{organizationId:n,organizationName:r,currentProjectSlug:l,onProjectSelect:o,onProjectSettings:i,onCreateProject:a,orgSlug:c}=t;let d;e[0]!==r?(d=s.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&&s.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:s.jsx(qe,{size:16,className:"text-muted-foreground"})}),e[2]=a,e[3]=m):m=e[3];let f;e[4]!==d||e[5]!==m?(f=s.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=s.jsx(Rn,{}),e[7]=u):u=e[7];let p;e[8]!==l||e[9]!==o||e[10]!==i||e[11]!==c||e[12]!==n?(p=s.jsx("div",{className:"flex flex-col gap-0.5 p-1 flex-1 overflow-y-auto",children:s.jsx(w.Suspense,{fallback:u,children:s.jsx(Hn,{organizationId:n,currentProjectSlug:l,onProjectSelect:o,onProjectSettings:i,orgSlug:c})})}),e[8]=l,e[9]=o,e[10]=i,e[11]=c,e[12]=n,e[13]=p):p=e[13];let x;return e[14]!==f||e[15]!==p?(x=s.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 Jt(t){const e=N.c(108),{open:n,onOpenChange:r,user:l,userImage:o}=t,[i,a]=Ze(),[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]!==a?(u=async se=>{if(se&&await Notification.requestPermission()!=="granted"){ye.error("Notifications denied. Please enable them in your browser settings."),a(Yn);return}a(J=>({...J,enableNotifications:se}))},e[2]=a,e[3]=u):u=e[3];const p=u;let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Ls,{className:"text-base",children:"Profile Settings"}),e[4]=x):x=e[4];let h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsxs(Ds,{className:"px-6 pt-6 pb-4 border-b border-border shrink-0 relative",children:[x,s.jsxs(Rs,{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:[s.jsx(Be,{size:16}),s.jsx("span",{className:"sr-only",children:"Close"})]})]}),e[5]=h):h=e[5];const g=l.name||"U";let j;e[6]!==g||e[7]!==o?(j=s.jsx(ke,{url:o,fallback:g,shape:"circle",size:"xl",className:"h-16 w-16"}),e[6]=g,e[7]=o,e[8]=j):j=e[8];const b=l.name||"User";let v;e[9]!==b?(v=s.jsx("span",{className:"text-base font-medium text-foreground",children:b}),e[9]=b,e[10]=v):v=e[10];let y;e[11]!==l.email?(y=s.jsx("span",{className:"text-sm text-muted-foreground",children:l.email}),e[11]=l.email,e[12]=y):y=e[12];let C;e[13]!==v||e[14]!==y?(C=s.jsxs("div",{className:"flex flex-col gap-1",children:[v,y]}),e[13]=v,e[14]=y,e[15]=C):C=e[15];let S;e[16]!==C||e[17]!==j?(S=s.jsxs("div",{className:"flex items-center gap-4",children:[j,C]}),e[16]=C,e[17]=j,e[18]=S):S=e[18];let _;e[19]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Preferences"}),e[19]=_):_=e[19];let O;e[20]!==a?(O=()=>a(qn),e[20]=a,e[21]=O):O=e[21];let k;e[22]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[s.jsxs(Te,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[s.jsx(Gs,{size:16,className:"text-muted-foreground"}),"Developer Mode"]}),s.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Show technical details like JSON input/output for tool calls"})]}),e[22]=k):k=e[22];let I;e[23]!==a?(I=se=>a(J=>({...J,devMode:se})),e[23]=a,e[24]=I):I=e[24];let $;e[25]!==i.devMode||e[26]!==I?($=s.jsx("div",{onClick:Zn,children:s.jsx(He,{checked:i.devMode,onCheckedChange:I})}),e[25]=i.devMode,e[26]=I,e[27]=$):$=e[27];let M;e[28]!==O||e[29]!==$?(M=s.jsxs("button",{type:"button",onClick:O,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[28]=O,e[29]=$,e[30]=M):M=e[30];let A;e[31]!==p||e[32]!==i.enableNotifications?(A=()=>p(!i.enableNotifications),e[31]=p,e[32]=i.enableNotifications,e[33]=A):A=e[33];let U;e[34]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[s.jsxs(Te,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[s.jsx(Et,{size:16,className:"text-muted-foreground"}),"Notifications"]}),s.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Play a sound and show notifications when chat messages complete while app is unfocused"})]}),e[34]=U):U=e[34];let L;e[35]!==p||e[36]!==i.enableNotifications?(L=s.jsx("div",{onClick:Kn,children:s.jsx(He,{disabled:typeof Notification>"u",checked:i.enableNotifications,onCheckedChange:p})}),e[35]=p,e[36]=i.enableNotifications,e[37]=L):L=e[37];let T;e[38]!==A||e[39]!==L?(T=s.jsxs("button",{type:"button",disabled:typeof Notification>"u",onClick:A,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:[U,L]}),e[38]=A,e[39]=L,e[40]=T):T=e[40];let E;e[41]!==M||e[42]!==T?(E=s.jsxs("div",{className:"flex flex-col gap-2",children:[_,M,T]}),e[41]=M,e[42]=T,e[43]=E):E=e[43];let B,H;e[44]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(Te,{className:"text-sm font-medium text-foreground",children:"Tool Approval"}),H=s.jsx("p",{className:"text-xs text-muted-foreground",children:"Choose when to require approval before tools execute"}),e[44]=B,e[45]=H):(B=e[44],H=e[45]);let R;e[46]!==a?(R=se=>a(J=>({...J,toolApprovalLevel:se})),e[46]=a,e[47]=R):R=e[47];let F;e[48]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(Fs,{className:"w-full",children:s.jsx(Ws,{})}),e[48]=F):F=e[48];let W;e[49]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(Xe,{value:"none",children:s.jsxs("div",{className:"flex items-start flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"None"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Require approval for all tool calls"})]})}),e[49]=W):W=e[49];let G;e[50]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsx(Xe,{value:"readonly",children:s.jsxs("div",{className:"flex items-start flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Read-only"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),e[50]=G):G=e[50];let Z;e[51]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsxs(Vs,{children:[W,G,s.jsx(Xe,{value:"yolo",children:s.jsxs("div",{className:"flex items-start flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"YOLO"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all tools without approval"})]})})]}),e[51]=Z):Z=e[51];let X;e[52]!==i.toolApprovalLevel||e[53]!==R?(X=s.jsxs("div",{className:"flex flex-col gap-2",children:[B,H,s.jsxs(Bs,{value:i.toolApprovalLevel,onValueChange:R,children:[F,Z]})]}),e[52]=i.toolApprovalLevel,e[53]=R,e[54]=X):X=e[54];let Q,q;e[55]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Experimental"}),q=s.jsx("p",{className:"text-xs text-muted-foreground",children:"Experimental features are unstable and may change or stop working at any time."}),e[55]=Q,e[56]=q):(Q=e[55],q=e[56]);let V;e[57]!==a?(V=()=>a(Gn),e[57]=a,e[58]=V):V=e[58];let P;e[59]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[s.jsxs(Te,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[s.jsx(xt,{size:16,className:"text-muted-foreground"}),"Projects"]}),s.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Enable the projects feature in the sidebar"})]}),e[59]=P):P=e[59];let D;e[60]!==a?(D=se=>a(J=>({...J,experimental_projects:se})),e[60]=a,e[61]=D):D=e[61];let K;e[62]!==i.experimental_projects||e[63]!==D?(K=s.jsx("div",{onClick:Vn,children:s.jsx(He,{checked:i.experimental_projects,onCheckedChange:D})}),e[62]=i.experimental_projects,e[63]=D,e[64]=K):K=e[64];let Y;e[65]!==V||e[66]!==K?(Y=s.jsxs("button",{type:"button",onClick:V,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:[P,K]}),e[65]=V,e[66]=K,e[67]=Y):Y=e[67];let te;e[68]!==a?(te=()=>a(Wn),e[68]=a,e[69]=te):te=e[69];let ze;e[70]===Symbol.for("react.memo_cache_sentinel")?(ze=s.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[s.jsxs(Te,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[s.jsx(Ct,{size:16,className:"text-muted-foreground"}),"Tasks"]}),s.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Enable the tasks feature in the sidebar"})]}),e[70]=ze):ze=e[70];let we;e[71]!==a?(we=se=>a(J=>({...J,experimental_tasks:se})),e[71]=a,e[72]=we):we=e[72];let ae;e[73]!==i.experimental_tasks||e[74]!==we?(ae=s.jsx("div",{onClick:Fn,children:s.jsx(He,{checked:i.experimental_tasks,onCheckedChange:we})}),e[73]=i.experimental_tasks,e[74]=we,e[75]=ae):ae=e[75];let ce;e[76]!==te||e[77]!==ae?(ce=s.jsxs("button",{type:"button",onClick:te,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:[ze,ae]}),e[76]=te,e[77]=ae,e[78]=ce):ce=e[78];let de;e[79]!==Y||e[80]!==ce?(de=s.jsxs("div",{className:"flex flex-col gap-2",children:[Q,q,Y,ce]}),e[79]=Y,e[80]=ce,e[81]=de):de=e[81];let me;e[82]!==S||e[83]!==E||e[84]!==X||e[85]!==de?(me=s.jsxs("div",{className:"p-5 space-y-6 min-h-[225px] overflow-y-auto",children:[S,E,X,de]}),e[82]=S,e[83]=E,e[84]=X,e[85]=de,e[86]=me):me=e[86];let fe;e[87]!==l.id?(fe=s.jsx("span",{className:"font-mono text-xs",children:l.id}),e[87]=l.id,e[88]=fe):fe=e[88];let ge;e[89]!==c?(ge=c?s.jsx(Me,{size:14,className:"text-green-600"}):s.jsx(It,{size:14,className:"opacity-0 group-hover:opacity-100 transition-opacity"}),e[89]=c,e[90]=ge):ge=e[90];let je;e[91]!==f||e[92]!==fe||e[93]!==ge?(je=s.jsx(We,{asChild:!0,children:s.jsxs("button",{type:"button",onClick:f,className:"group flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[fe,ge]})}),e[91]=f,e[92]=fe,e[93]=ge,e[94]=je):je=e[94];let be;e[95]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(Fe,{side:"top",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[95]=be):be=e[95];let ue;e[96]!==je?(ue=s.jsx(_t,{children:s.jsxs(Ve,{children:[je,be]})}),e[96]=je,e[97]=ue):ue=e[97];let ve;e[98]===Symbol.for("react.memo_cache_sentinel")?(ve=s.jsxs("span",{className:"text-xs text-muted-foreground/75",children:["v","2.109.1"]}),e[98]=ve):ve=e[98];let pe;e[99]!==ue?(pe=s.jsxs("div",{className:"border-t border-border px-5 py-4 flex items-center justify-between shrink-0",children:[ue,ve]}),e[99]=ue,e[100]=pe):pe=e[100];let xe;e[101]!==me||e[102]!==pe?(xe=s.jsxs(Hs,{className:"sm:max-w-lg sm:max-h-[85vh] p-0 flex flex-col",closeButtonClassName:"hidden",children:[h,s.jsxs("div",{className:"flex flex-col overflow-y-hidden",children:[me,pe]})]}),e[101]=me,e[102]=pe,e[103]=xe):xe=e[103];let Ne;return e[104]!==r||e[105]!==n||e[106]!==xe?(Ne=s.jsx(Us,{open:n,onOpenChange:r,children:xe}),e[104]=r,e[105]=n,e[106]=xe,e[107]=Ne):Ne=e[107],Ne}function Fn(t){return t.stopPropagation()}function Wn(t){return{...t,experimental_tasks:!t.experimental_tasks}}function Vn(t){return t.stopPropagation()}function Gn(t){return{...t,experimental_projects:!t.experimental_projects}}function Kn(t){return t.stopPropagation()}function Zn(t){return t.stopPropagation()}function qn(t){return{...t,devMode:!t.devMode}}function Yn(t){return{...t,enableNotifications:!1}}function Xt(t){const e=N.c(77),{isCollapsed:n,variant:r,onCreateProject:l}=t,o=n===void 0?!1:n,i=r===void 0?"light":r,[a]=Ze();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[0]=c):c=e[0];const{org:d,project:m}=st(c),{data:f}=he.useListOrganizations(),{data:u}=he.useSession(),p=$e(),x=i==="dark",g=Se()?.project;let j;e[1]!==d||e[2]!==f?(j=f?.find(J=>J.slug===d),e[1]=d,e[2]=f,e[3]=j):j=e[3];const b=j,[v,y]=w.useState(!1),[C,S]=w.useState(!1),[_,O]=w.useState(!1),[k,I]=w.useState(null),$=u?.user,M=$?.image;let A;e[4]!==b||e[5]!==k||e[6]!==f?(A=k?f?.find(J=>J.id===k):b,e[4]=b,e[5]=k,e[6]=f,e[7]=A):A=e[7];const U=A;let L;e[8]!==p?(L=J=>{y(!1),p({to:"/$org/$project/settings",params:{org:J,project:ne}})},e[8]=p,e[9]=L):L=e[9];const T=L;let E;e[10]!==p?(E=J=>{y(!1),p({to:"/$org/$project",params:{org:J,project:ne}})},e[10]=p,e[11]=E):E=e[11];const B=E;let H;e[12]!==p?(H=(J,Je)=>{y(!1),p({to:"/$org/$project",params:{org:J,project:Je}})},e[12]=p,e[13]=H):H=e[13];const R=H;let F;e[14]!==p?(F=(J,Je)=>{y(!1),p({to:"/$org/$project/settings",params:{org:J,project:Je}})},e[14]=p,e[15]=F):F=e[15];const W=F;let G;e[16]!==l?(G=l?()=>{y(!1),l()}:void 0,e[16]=l,e[17]=G):G=e[17];const Z=G;let X;e[18]===Symbol.for("react.memo_cache_sentinel")?(X=J=>{y(J),J||I(null)},e[18]=X):X=e[18];const Q=X;let q;e[19]!==b?(q=()=>{b&&I(b.id)},e[19]=b,e[20]=q):q=e[20];const V=q,P=x?"hover:bg-zinc-800 text-white":"hover:bg-sidebar-accent",D=o?"justify-center":"justify-start",K=o?"":"pl-0.5! px-1.5 gap-1.5";let Y;e[21]!==P||e[22]!==D||e[23]!==K?(Y=z("h-7 min-w-0 max-w-full",P,D,K),e[21]=P,e[22]=D,e[23]=K,e[24]=Y):Y=e[24];const te=b?.logo??"",ze=b?.name??"",we=x&&"border-none";let ae;e[25]!==we?(ae=z("shrink-0 rounded-[5px]",we),e[25]=we,e[26]=ae):ae=e[26];let ce;e[27]!==te||e[28]!==ze||e[29]!==ae?(ce=s.jsx(ke,{url:te,fallback:ze,size:"xs",className:ae,objectFit:"cover"}),e[27]=te,e[28]=ze,e[29]=ae,e[30]=ce):ce=e[30];let de;e[31]!==b?.name||e[32]!==g||e[33]!==o||e[34]!==x?(de=!o&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"min-w-0 flex-1 text-left",children:x&&g?s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-[10px] text-zinc-500 leading-none truncate",children:b?.name??"Select org"}),s.jsx("p",{className:"text-sm text-white font-normal leading-tight mt-0.5 truncate",children:g.name??g.slug})]}):s.jsx("span",{className:"block truncate text-[14px] tracking-[-0.00625rem] font-medium text-foreground",children:b?.name??"Select org"})}),x?s.jsx(vt,{className:"size-3 text-zinc-500 shrink-0"}):s.jsx(nt,{className:"size-3.5 text-muted-foreground shrink-0"})]}),e[31]=b?.name,e[32]=g,e[33]=o,e[34]=x,e[35]=de):de=e[35];let me;e[36]!==V||e[37]!==Y||e[38]!==ce||e[39]!==de?(me=s.jsx(lt,{asChild:!0,children:s.jsxs(re,{variant:"ghost",size:"sm",onClick:V,className:Y,children:[ce,de]})}),e[36]=V,e[37]=Y,e[38]=ce,e[39]=de,e[40]=me):me=e[40];let fe;e[41]!==$||e[42]!==M?(fe=$&&s.jsx(An,{user:$,userImage:M,onOpenSettings:()=>{S(!0),y(!1)}}),e[41]=$,e[42]=M,e[43]=fe):fe=e[43];let ge,je;e[44]===Symbol.for("react.memo_cache_sentinel")?(ge=()=>y(!1),je=()=>O(!0),e[44]=ge,e[45]=je):(ge=e[44],je=e[45]);let be;e[46]!==T||e[47]!==B||e[48]!==k||e[49]!==d?(be=s.jsx(Ln,{currentOrgSlug:d,hoveredOrgId:k,onOrgSelect:B,onOrgSettings:T,onPopoverClose:ge,onCreateOrganization:je,onOrgHover:I}),e[46]=T,e[47]=B,e[48]=k,e[49]=d,e[50]=be):be=e[50];let ue;e[51]!==Z||e[52]!==W||e[53]!==R||e[54]!==U||e[55]!==d||e[56]!==a.experimental_projects||e[57]!==m?(ue=a.experimental_projects&&U&&s.jsx(Bn,{organizationId:U.id,organizationName:U.name,orgSlug:U.slug,currentProjectSlug:U.slug===d?m:void 0,onProjectSelect:R,onProjectSettings:W,onCreateProject:Z}),e[51]=Z,e[52]=W,e[53]=R,e[54]=U,e[55]=d,e[56]=a.experimental_projects,e[57]=m,e[58]=ue):ue=e[58];let ve;e[59]!==fe||e[60]!==be||e[61]!==ue?(ve=s.jsxs(ot,{align:"start",side:"bottom",className:"p-0 flex w-auto h-88 overflow-hidden",children:[fe,be,ue]}),e[59]=fe,e[60]=be,e[61]=ue,e[62]=ve):ve=e[62];let pe;e[63]!==v||e[64]!==me||e[65]!==ve?(pe=s.jsxs(rt,{open:v,onOpenChange:Q,children:[me,ve]}),e[63]=v,e[64]=me,e[65]=ve,e[66]=pe):pe=e[66];let xe;e[67]!==C||e[68]!==$||e[69]!==M?(xe=$&&C&&$.email&&s.jsx(Jt,{open:C,onOpenChange:S,user:{...$,name:$.name??void 0,email:$.email},userImage:M}),e[67]=C,e[68]=$,e[69]=M,e[70]=xe):xe=e[70];let Ne;e[71]!==_?(Ne=s.jsx($t,{open:_,onOpenChange:O}),e[71]=_,e[72]=Ne):Ne=e[72];let se;return e[73]!==pe||e[74]!==xe||e[75]!==Ne?(se=s.jsxs(s.Fragment,{children:[pe,xe,Ne]}),e[73]=pe,e[74]=xe,e[75]=Ne,e[76]=se):se=e[76],se}Xt.Skeleton=function({variant:e="light"}){const n=e==="dark";return s.jsxs("div",{className:z("flex items-center gap-1.5 h-7 px-1.5 w-full",n&&"text-white"),children:[s.jsx(ee,{className:z("size-5 rounded-[5px] shrink-0",n&&"bg-zinc-800")}),s.jsx(ee,{className:z("h-3.5 flex-1",n&&"bg-zinc-800")})]})};function et(t){const e=N.c(71),{onCreateProject:n}=t,{state:r,toggleSidebar:l}=Ye(),o=r==="collapsed",[i,a]=Ke(),{locator:c}=Se();let d;e[0]!==c?(d=Oe.isOrgAdminProject(c),e[0]=c,e[1]=d):d=e[1];const f=!d;let u;e[2]!==a?(u=()=>{a(Jn)},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 g=o&&"group-hover/switcher:opacity-0 group-hover/switcher:pointer-events-none group-hover/switcher:invisible";let j;e[6]!==g?(j=z("w-full min-w-0 transition-opacity",g),e[6]=g,e[7]=j):j=e[7];const b=f?"dark":"light";let v;e[8]!==o||e[9]!==n||e[10]!==b?(v=s.jsx(Xt,{isCollapsed:o,variant:b,onCreateProject:n}),e[8]=o,e[9]=n,e[10]=b,e[11]=v):v=e[11];let y;e[12]!==j||e[13]!==v?(y=s.jsx("div",{className:j,children:v}),e[12]=j,e[13]=v,e[14]=y):y=e[14];const C=f?"hover:bg-zinc-800 text-zinc-400":"hover:bg-sidebar-accent",S=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]!==S?(_=z("absolute inset-0 m-auto size-7 transition-opacity",C,S),e[15]=C,e[16]=S,e[17]=_):_=e[17];const O=!o,k=f?"text-zinc-400":"text-muted-foreground";let I;e[18]!==k?(I=z("size-4 shrink-0",k),e[18]=k,e[19]=I):I=e[19];let $;e[20]!==I?($=s.jsx(Ht,{className:I}),e[20]=I,e[21]=$):$=e[21];let M;e[22]!==_||e[23]!==O||e[24]!==$||e[25]!==l?(M=s.jsx(re,{variant:"ghost",size:"icon",className:_,onClick:l,"aria-label":"Expand sidebar",disabled:O,children:$}),e[22]=_,e[23]=O,e[24]=$,e[25]=l,e[26]=M):M=e[26];let A;e[27]!==M||e[28]!==y?(A=s.jsxs("div",{className:"group/switcher relative flex items-center justify-center gap-1.5 min-w-0 flex-1 overflow-hidden",children:[y,M]}),e[27]=M,e[28]=y,e[29]=A):A=e[29];const U=o&&"hidden";let L;e[30]!==U?(L=z("flex items-center gap-0.5 shrink-0",U),e[30]=U,e[31]=L):L=e[31];const T=f?"hover:bg-zinc-800 text-zinc-400 hover:text-white":"hover:bg-sidebar-accent";let E;e[32]!==T?(E=z("size-7",T),e[32]=T,e[33]=E):E=e[33];const B=f?"text-zinc-400":"text-muted-foreground";let H;e[34]!==B?(H=z("size-4",B),e[34]=B,e[35]=H):H=e[35];let R;e[36]!==H?(R=s.jsx(Rt,{className:H}),e[36]=H,e[37]=R):R=e[37];let F;e[38]!==o||e[39]!==E||e[40]!==R||e[41]!==l?(F=s.jsx(We,{asChild:!0,children:s.jsx(re,{variant:"ghost",size:"icon",className:E,onClick:l,"aria-label":"Collapse sidebar",disabled:o,children:R})}),e[38]=o,e[39]=E,e[40]=R,e[41]=l,e[42]=F):F=e[42];let W;e[43]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(Fe,{side:"bottom",children:"Collapse sidebar"}),e[43]=W):W=e[43];let G;e[44]!==F?(G=s.jsxs(Ve,{children:[F,W]}),e[44]=F,e[45]=G):G=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 X=f?"text-inherit":"text-muted-foreground";let Q;e[49]!==X?(Q=z(X),e[49]=X,e[50]=Q):Q=e[50];let q;e[51]!==Q?(q=s.jsx(Nt,{size:11,className:Q}),e[51]=Q,e[52]=q):q=e[52];let V;e[53]!==o||e[54]!==Z||e[55]!==q||e[56]!==p?(V=s.jsx(We,{asChild:!0,children:s.jsx(re,{variant:"ghost",size:"icon",className:Z,onClick:p,"aria-label":"Toggle Decopilot",disabled:o,children:q})}),e[53]=o,e[54]=Z,e[55]=q,e[56]=p,e[57]=V):V=e[57];let P;e[58]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(Fe,{side:"bottom",children:"Toggle Decopilot"}),e[58]=P):P=e[58];let D;e[59]!==V?(D=s.jsxs(Ve,{children:[V,P]}),e[59]=V,e[60]=D):D=e[60];let K;e[61]!==L||e[62]!==G||e[63]!==D?(K=s.jsxs("div",{className:L,children:[G,D]}),e[61]=L,e[62]=G,e[63]=D,e[64]=K):K=e[64];let Y;e[65]!==A||e[66]!==K?(Y=s.jsx(_e,{children:s.jsx(ie,{children:s.jsxs("div",{className:"flex items-center justify-between w-full h-12",children:[A,K]})})}),e[65]=A,e[66]=K,e[67]=Y):Y=e[67];let te;return e[68]!==Y||e[69]!==h?(te=s.jsx(Zt,{className:h,children:Y}),e[68]=Y,e[69]=h,e[70]=te):te=e[70],te}function Jn(t){return!t}et.Skeleton=function({isDark:e=!1}){return s.jsx(Zt,{className:z("h-12 gap-0 pt-0",e&&"bg-[#030302] border-b border-zinc-800"),children:s.jsx(_e,{children:s.jsx(ie,{children:s.jsxs("div",{className:"flex items-center justify-between w-full h-12",children:[s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0 flex-1 px-1.5",children:[s.jsx(ee,{className:z("size-5 rounded-[5px] shrink-0",e&&"bg-zinc-800")}),s.jsx(ee,{className:z("h-3.5 w-16",e&&"bg-zinc-800")})]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx(ee,{className:z("size-7 rounded-lg",e&&"bg-zinc-800")}),s.jsx(ee,{className:z("size-7 rounded-lg",e&&"bg-zinc-800")})]})]})})})})};function Xn(){const t=N.c(10),{locator:e}=Se(),n=$e(),l=Ge().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]!==n?(a=()=>{n({to:"/$org/$project/settings",params:Oe.parse(e)})},t[2]=e,t[3]=n,t[4]=a):a=t[4];const c=a;let d,m;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:s.jsx(it,{})}),m=s.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=s.jsx(Sn,{className:"py-2 border-r",children:s.jsx(_e,{children:s.jsx(ie,{children:s.jsxs(Re,{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 Qt(t){const e=N.c(4),{children:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(at,{className:"my-2 -ml-1"}),e[0]=r):r=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ie,{children:s.jsx("div",{className:"group-data-[collapsible=icon]:hidden px-2 py-0 text-xs font-medium h-6 text-muted-foreground flex items-center justify-between",children:s.jsx("span",{className:"whitespace-nowrap",children:"Pinned Views"})})}),e[1]=l):l=e[1];let o;return e[2]!==n?(o=s.jsxs(s.Fragment,{children:[r,l,n]}),e[2]=n,e[3]=o):o=e[3],o}function Qn(t){const e=N.c(26),{item:n}=t,r=$e(),{org:l}=Se(),o=Ot(l.id),i=Ks(l.id);let a;e[0]!==i.update||e[1]!==n.url||e[2]!==o?.sidebar_items?(a=async()=>{const y=(o?.sidebar_items||[]).filter(C=>C.url!==n.url);await i.update.mutateAsync({sidebar_items:y})},e[0]=i.update,e[1]=n.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]!==n.icon?(m=d.test(n.icon),e[5]=n.icon,e[6]=m):m=e[6];const f=m;let u;e[7]!==n.url||e[8]!==r?(u=()=>{r({to:n.url})},e[7]=n.url,e[8]=r,e[9]=u):u=e[9];const p=n.title;let x;e[10]!==f||e[11]!==n.icon||e[12]!==n.title?(x=s.jsx("div",{className:"flex items-center justify-center shrink-0",children:f?s.jsx("img",{src:n.icon,alt:n.title,className:"h-4 w-4 rounded object-cover"}):s.jsx(Zs,{size:16,className:"text-muted-foreground group-hover/item:text-foreground transition-colors"})}),e[10]=f,e[11]=n.icon,e[12]=n.title,e[13]=x):x=e[13];let h;e[14]!==n.title?(h=n.title.toLocaleLowerCase(),e[14]=n.title,e[15]=h):h=e[15];let g;e[16]!==h?(g=s.jsx("div",{className:"flex-1 min-w-0 flex flex-col items-start",children:s.jsx("span",{className:"truncate text-sm w-full capitalize",children:h})}),e[16]=h,e[17]=g):g=e[17];let j;e[18]!==c?(j=s.jsx(Be,{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]=j):j=e[19];let b;return e[20]!==n.title||e[21]!==u||e[22]!==x||e[23]!==g||e[24]!==j?(b=s.jsx(ie,{children:s.jsxs(Re,{className:"w-full pr-2 group/item relative cursor-pointer text-foreground/90 hover:text-foreground",onClick:u,tooltip:p,children:[x,g,j]})}),e[20]=n.title,e[21]=u,e[22]=x,e[23]=g,e[24]=j,e[25]=b):b=e[25],b}function pt(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ie,{children:s.jsx("div",{className:"flex items-center gap-2 px-4 py-2",children:s.jsx(ee,{className:"h-4 flex-1"})})}),t[0]=e):e=t[0],e}function er(){const t=N.c(4),{org:e}=Se(),r=Ot(e.id)?.sidebar_items;if(!r?.length)return null;let l;t[0]!==r?(l=r.map(tr),t[0]=r,t[1]=l):l=t[1];let o;return t[2]!==l?(o=s.jsx(Qt,{children:l}),t[2]=l,t[3]=o):o=t[3],o}function tr(t){return s.jsx(Qn,{item:t},t.url)}function sr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(w.Suspense,{fallback:s.jsxs(Qt,{children:[s.jsx(pt,{}),s.jsx(pt,{})]}),children:s.jsx(er,{})}),t[0]=e):e=t[0],e}function nr(t){const e=N.c(11),{project:n}=t,r=n.ui?.themeColor??"#60a5fa";if(n.ui?.icon){let c;return e[0]!==n.ui.icon?(c=s.jsx("img",{src:n.ui.icon,alt:"",className:"size-4 rounded object-cover border border-border/50"}),e[0]=n.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]!==n.name?(o=n.name.charAt(0).toUpperCase(),e[4]=n.name,e[5]=o):o=e[5];let i;e[6]!==o?(i=s.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=s.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 rr(t){const e=N.c(14),{project:n}=t,r=$e(),{org:l}=Se();let o;e[0]!==r||e[1]!==l.slug||e[2]!==n.slug?(o=()=>{r({to:"/$org/$project",params:{org:l.slug,project:n.slug}})},e[0]=r,e[1]=l.slug,e[2]=n.slug,e[3]=o):o=e[3];let i;e[4]!==n?(i=s.jsx(nr,{project:n}),e[4]=n,e[5]=i):i=e[5];let a;e[6]!==n.name?(a=s.jsx("span",{className:"truncate flex-1",children:n.name}),e[6]=n.name,e[7]=a):a=e[7];let c;e[8]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(zt,{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]!==n.name||e[10]!==o||e[11]!==i||e[12]!==a?(d=s.jsx(ie,{children:s.jsxs(Re,{className:"group/item cursor-pointer text-foreground/90 hover:text-foreground",onClick:o,tooltip:n.name,children:[i,a,c]})}),e[9]=n.name,e[10]=o,e[11]=i,e[12]=a,e[13]=d):d=e[13],d}function lr(){const t=N.c(54),{org:e}=Se(),{data:n,isLoading:r}=kt(e.id),[l,o]=w.useState(!0),[i,a]=w.useState(!1);let c,d,m,f,u,p,x,h,g,j,b,v,y;if(t[0]!==r||t[1]!==l||t[2]!==n){y=Symbol.for("react.early_return_sentinel");e:{const M=n?.filter(ir)??[];if(r){let H;t[16]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(ie,{children:s.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[s.jsx(ee,{className:"h-4 w-4 rounded"}),s.jsx(ee,{className:"h-4 flex-1"})]})}),t[16]=H):H=t[16];let R;t[17]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(Ee,{className:"py-0",children:s.jsx(Le,{children:s.jsxs(_e,{className:"gap-0.5",children:[H,s.jsx(ie,{children:s.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[s.jsx(ee,{className:"h-4 w-4 rounded"}),s.jsx(ee,{className:"h-4 flex-1"})]})})]})})}),t[17]=R):R=t[17],y=R;break e}t[18]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(at,{className:"my-2"}),t[18]=v):v=t[18],u=Ns,j=l,b=o,f=Ee,g="py-0",m=Le,d=_e,x="gap-0.5";let A;t[19]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx("span",{children:"Projects"}),t[19]=A):A=t[19];const U=!l&&"-rotate-90";let L;t[20]!==U?(L=z("transition-transform",U),t[20]=U,t[21]=L):L=t[21];let T;t[22]!==L?(T=s.jsx(ys,{asChild:!0,children:s.jsxs("button",{type:"button",className:"flex items-center gap-1 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors",children:[A,s.jsx(nt,{size:12,className:L})]})}),t[22]=L,t[23]=T):T=t[23];let E;t[24]===Symbol.for("react.memo_cache_sentinel")?(E=()=>a(!0),t[24]=E):E=t[24];let B;t[25]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx("button",{type:"button",onClick:E,className:"text-muted-foreground hover:text-foreground transition-colors p-0.5 rounded hover:bg-accent",title:"Create new project",children:s.jsx(qe,{size:16})}),t[25]=B):B=t[25],t[26]!==T?(h=s.jsx(ie,{children:s.jsxs("div",{className:"flex items-center justify-between px-2 h-6",children:[T,B]})}),t[26]=T,t[27]=h):h=t[27],c=Ss,p=M.length===0?s.jsx(ie,{children:s.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:"No projects yet"})}):M.map(or)}t[0]=r,t[1]=l,t[2]=n,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]=g,t[12]=j,t[13]=b,t[14]=v,t[15]=y}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],g=t[11],j=t[12],b=t[13],v=t[14],y=t[15];if(y!==Symbol.for("react.early_return_sentinel"))return y;let C;t[28]!==c||t[29]!==p?(C=s.jsx(c,{children:p}),t[28]=c,t[29]=p,t[30]=C):C=t[30];let S;t[31]!==d||t[32]!==x||t[33]!==h||t[34]!==C?(S=s.jsxs(d,{className:x,children:[h,C]}),t[31]=d,t[32]=x,t[33]=h,t[34]=C,t[35]=S):S=t[35];let _;t[36]!==m||t[37]!==S?(_=s.jsx(m,{children:S}),t[36]=m,t[37]=S,t[38]=_):_=t[38];let O;t[39]!==f||t[40]!==_||t[41]!==g?(O=s.jsx(f,{className:g,children:_}),t[39]=f,t[40]=_,t[41]=g,t[42]=O):O=t[42];let k;t[43]!==u||t[44]!==O||t[45]!==j||t[46]!==b?(k=s.jsx(u,{open:j,onOpenChange:b,children:O}),t[43]=u,t[44]=O,t[45]=j,t[46]=b,t[47]=k):k=t[47];let I;t[48]!==i?(I=s.jsx(wt,{open:i,onOpenChange:a}),t[48]=i,t[49]=I):I=t[49];let $;return t[50]!==k||t[51]!==I||t[52]!==v?($=s.jsxs(s.Fragment,{children:[v,k,I]}),t[50]=k,t[51]=I,t[52]=v,t[53]=$):$=t[53],$}function or(t){return s.jsx(rr,{project:t},t.id)}function ir(t){return t.slug!==ne}function ar(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(w.Suspense,{fallback:s.jsx(Ee,{className:"py-0",children:s.jsx(Le,{children:s.jsx(_e,{className:"gap-0.5",children:s.jsx(ie,{children:s.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[s.jsx(ee,{className:"h-4 w-4 rounded"}),s.jsx(ee,{className:"h-4 flex-1"})]})})})})}),children:s.jsx(lr,{})}),t[0]=e):e=t[0],e}function cr(t){const e=N.c(16),{onCreateProject:n}=t,[r]=Ze(),l=dn(),{locator:o}=Se();let i;e[0]!==o?(i=Oe.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=s.jsx(et.Skeleton,{}),e[2]=c):c=e[2];let d;e[3]!==n?(d=s.jsx(w.Suspense,{fallback:c,children:s.jsx(et,{onCreateProject:n})}),e[3]=n,e[4]=d):d=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Xn,{}),e[5]=m):m=e[5];let f;e[6]!==a||e[7]!==r?(f=a?r.experimental_projects?s.jsx(ar,{}):null:s.jsx(sr,{}),e[6]=a,e[7]=r,e[8]=f):f=e[8];let u;e[9]!==f?(u=s.jsx(St,{children:s.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=s.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 dr(t){const e=N.c(12);let n,r,l,o;e[0]!==t?({className:n,orientation:l,decorative:o,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=l,e[4]=o):(n=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]!==n?(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",n),e[5]=n,e[6]=c):c=e[6];let d;return e[7]!==a||e[8]!==i||e[9]!==r||e[10]!==c?(d=s.jsx(ds,{"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 es=w.createContext(null);function mr(){const t=w.useContext(es);if(!t)throw new Error("TopbarSwitcher compound components must be used within TopbarSwitcher.Root");return t}function fr(t){const e=N.c(10),{children:n,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]!==n?(d=s.jsx(rt,{children:n}),e[5]=n,e[6]=d):d=e[6];let m;return e[7]!==c||e[8]!==d?(m=s.jsx(es.Provider,{value:c,children:d}),e[7]=c,e[8]=d,e[9]=m):m=e[9],m}function ur(t){const e=N.c(6),{children:n,onClick:r}=t;let l;e[0]!==n||e[1]!==r?(l=s.jsx(re,{variant:"link",className:"p-0.5 h-auto",onClick:r,type:"button",children:n}),e[0]=n,e[1]=r,e[2]=l):l=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(lt,{asChild:!0,children:s.jsx(re,{size:"icon",variant:"ghost",className:"w-6 h-6 p-0",children:s.jsx(vt,{size:16,className:"opacity-50"})})}),e[3]=o):o=e[3];let i;return e[4]!==l?(i=s.jsxs("div",{className:"flex items-center gap-1",children:[l,o]}),e[4]=l,e[5]=i):i=e[5],i}function pr(t){const e=N.c(8),{item:n,fallback:r}=t,l=r===void 0?"":r,o=n?.avatarUrl??"",i=n?.name??l;let a;e[0]!==o||e[1]!==i?(a=s.jsx(ke,{url:o,fallback:i,size:"xs",objectFit:"contain"}),e[0]=o,e[1]=i,e[2]=a):a=e[2];const c=n?.name??l;let d;e[3]!==c?(d=s.jsx("span",{children:c}),e[3]=c,e[4]=d):d=e[4];let m;return e[5]!==a||e[6]!==d?(m=s.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 xr(t){const e=N.c(6),{children:n,align:r}=t,l=r===void 0?"start":r,i=w.Children.toArray(n).filter(hr).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]!==n||e[4]!==a?(c=s.jsx(ot,{align:l,className:"p-0 flex items-start",style:a,children:n}),e[2]=l,e[3]=n,e[4]=a,e[5]=c):c=e[5],c}function hr(t){return w.isValidElement(t)&&(t.type===ss||t.type===ts)}function ts(t){const e=N.c(5),{children:n,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]!==n||e[3]!==l?(o=s.jsx("div",{className:l,children:n}),e[2]=n,e[3]=l,e[4]=o):o=e[4],o}const ss=ts;function gr(t){const e=N.c(6),{placeholder:n,value:r,onChange:l}=t,o=n===void 0?"Search...":n;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=s.jsx(qs,{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 jr(t){const e=N.c(6),{children:n,emptyMessage:r}=t,l=r===void 0?"No items found.":r,o=w.Children.count(n)>0;let i;e[0]!==l||e[1]!==o?(i=!o&&s.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]!==n||e[4]!==i?(a=s.jsxs("div",{className:"flex flex-col gap-0.5 p-1 max-h-44 overflow-y-auto",children:[i,n]}),e[3]=n,e[4]=i,e[5]=a):a=e[5],a}function br(t){const e=N.c(15),{item:n,onClick:r,onHover:l,children:o}=t,i=mr();let a;e[0]!==i||e[1]!==n||e[2]!==l?(a=()=>{i.setHoveredItem(n.slug),l?.(n)},e[0]=i,e[1]=n,e[2]=l,e[3]=a):a=e[3];const c=a;let d;e[4]!==n||e[5]!==r?(d=()=>r(n),e[4]=n,e[5]=r,e[6]=d):d=e[6];let m;e[7]!==o||e[8]!==n.avatarUrl||e[9]!==n.name?(m=o||s.jsxs(s.Fragment,{children:[s.jsx(ke,{url:n.avatarUrl??"",fallback:n.name,size:"xs",className:"w-[22px]! h-[22px]!",objectFit:"contain"}),s.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:n.name})]}),e[7]=o,e[8]=n.avatarUrl,e[9]=n.name,e[10]=m):m=e[10];let f;return e[11]!==c||e[12]!==d||e[13]!==m?(f=s.jsx(re,{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 vr(t){const e=N.c(2),{children:n}=t;let r;return e[0]!==n?(r=s.jsx("div",{className:"px-1 pb-1 pt-0.5",children:n}),e[0]=n,e[1]=r):r=e[1],r}function Nr(t){const e=N.c(11),{onClick:n,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&&s.jsx("span",{className:"[&>svg]:size-4",children:r}),e[2]=r,e[3]=d):d=e[3];let m;e[4]!==l?(m=s.jsx("span",{children:l}),e[4]=l,e[5]=m):m=e[5];let f;return e[6]!==n||e[7]!==c||e[8]!==d||e[9]!==m?(f=s.jsxs(re,{variant:"ghost",size:"sm",className:c,onClick:n,children:[d,m]}),e[6]=n,e[7]=c,e[8]=d,e[9]=m,e[10]=f):f=e[10],f}function yr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(dr,{}),t[0]=e):e=t[0],e}function Sr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"h-4 w-16 bg-accent rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const le=Object.assign(fr,{Trigger:ur,CurrentItem:pr,Content:xr,Panel:ss,Search:gr,Items:jr,Item:br,Actions:vr,Action:Nr,Separator:yr,Skeleton:Sr});function tt(){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:n}=st(e),{data:r}=he.useListOrganizations(),l=$e();let o;t[1]!==n||t[2]!==r?(o=r?.find(U=>U.slug===n),t[1]=n,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,g,j,b;if(t[4]!==i||t[5]!==l||t[6]!==n||t[7]!==a||t[8]!==r){const L=(r?(()=>{const F=r.filter(W=>W.name.toLowerCase().includes(a.toLowerCase()));if(n){const W=F.findIndex(G=>G.slug===n);if(W>0){const G=F[W];G&&(F.splice(W,1),F.unshift(G))}}return F})():[]).map(wr);let T;t[17]!==i?(T=i?{slug:i.slug,name:i.name,avatarUrl:i.logo}:void 0,t[17]=i,t[18]=T):T=t[18];const E=T;x=le;let B;t[19]!==l||t[20]!==n?(B=()=>l({to:"/$org",params:{org:n??""}}),t[19]=l,t[20]=n,t[21]=B):B=t[21];let H;t[22]!==E?(H=s.jsx(le.CurrentItem,{item:E}),t[22]=E,t[23]=H):H=t[23],t[24]!==B||t[25]!==H?(b=s.jsx(le.Trigger,{onClick:B,children:H}),t[24]=B,t[25]=H,t[26]=b):b=t[26],p=le.Content,u=le.Panel,t[27]!==a?(j=s.jsx(le.Search,{placeholder:"Search organizations...",value:a,onChange:c}),t[27]=a,t[28]=j):j=t[28],f=le.Items,h="No organizations found.";let R;t[29]!==l?(R=F=>s.jsx(le.Item,{item:F,onClick:W=>l({to:"/$org",params:{org:W.slug}})},F.slug),t[29]=l,t[30]=R):R=t[30],g=L.map(R),t[4]=i,t[5]=l,t[6]=n,t[7]=a,t[8]=r,t[9]=f,t[10]=u,t[11]=p,t[12]=x,t[13]=h,t[14]=g,t[15]=j,t[16]=b}else f=t[9],u=t[10],p=t[11],x=t[12],h=t[13],g=t[14],j=t[15],b=t[16];let v;t[31]!==f||t[32]!==h||t[33]!==g?(v=s.jsx(f,{emptyMessage:h,children:g}),t[31]=f,t[32]=h,t[33]=g,t[34]=v):v=t[34];let y,C;t[35]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(le.Actions,{children:s.jsx(le.Action,{onClick:()=>m(!0),variant:"muted",children:"+ Create organization"})}),C=s.jsx(le.Separator,{}),t[35]=y,t[36]=C):(y=t[35],C=t[36]);let S;t[37]!==l?(S=()=>l({to:"/"}),t[37]=l,t[38]=S):S=t[38];let _;t[39]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Ys,{}),t[39]=_):_=t[39];let O;t[40]!==S?(O=s.jsx(le.Actions,{children:s.jsx(le.Action,{onClick:S,icon:_,children:"See all organizations"})}),t[40]=S,t[41]=O):O=t[41];let k;t[42]!==u||t[43]!==O||t[44]!==j||t[45]!==v?(k=s.jsxs(u,{children:[j,v,y,C,O]}),t[42]=u,t[43]=O,t[44]=j,t[45]=v,t[46]=k):k=t[46];let I;t[47]!==p||t[48]!==k?(I=s.jsx(p,{children:k}),t[47]=p,t[48]=k,t[49]=I):I=t[49];let $;t[50]!==x||t[51]!==I||t[52]!==b?($=s.jsxs(x,{children:[b,I]}),t[50]=x,t[51]=I,t[52]=b,t[53]=$):$=t[53];let M;t[54]!==d?(M=s.jsx($t,{open:d,onOpenChange:m}),t[54]=d,t[55]=M):M=t[55];let A;return t[56]!==$||t[57]!==M?(A=s.jsxs(s.Fragment,{children:[$,M]}),t[56]=$,t[57]=M,t[58]=A):A=t[58],A}function wr(t){return{slug:t.slug,name:t.name,avatarUrl:t.logo}}tt.Skeleton=le.Skeleton;function Cr(){const t=N.c(10),{locator:e}=Se(),n=Js();if(Oe.isOrgAdminProject(e))return null;const l=n?.leftRef;let o;t[0]!==l?(o=s.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=n?.centerRef;let a;t[2]!==i?(a=s.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=n?.rightRef;let d;t[4]!==c?(d=s.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=s.jsx("div",{className:"dark",children:s.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 kr({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,l]=_r({defaultProp:e,onChange:n}),o=t!==void 0,i=o?t:r,a=gt(n),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 _r({defaultProp:t,onChange:e}){const n=w.useState(t),[r]=n,l=w.useRef(r),o=gt(e);return w.useEffect(()=>{l.current!==r&&(o(r),l.current=r)},[r,l,o]),n}function zr(t){const e=N.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=s.jsx(Pe.Root,{"data-slot":"drawer",...n}),e[2]=n,e[3]=r):r=e[3],r}function $r(t){const e=N.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=s.jsx(Pe.Trigger,{"data-slot":"drawer-trigger",...n}),e[2]=n,e[3]=r):r=e[3],r}function Ir(t){const e=N.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=s.jsx(Pe.Portal,{"data-slot":"drawer-portal",...n}),e[2]=n,e[3]=r):r=e[3],r}function Or(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(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",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.jsx(Pe.Overlay,{"data-slot":"drawer-overlay",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Pr(t){const e=N.c(12);let n,r,l;e[0]!==t?({className:r,children:n,...l}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=l):(n=e[1],r=e[2],l=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Or,{}),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=s.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]!==n||e[9]!==l||e[10]!==i?(c=s.jsxs(Ir,{"data-slot":"drawer-portal",children:[o,s.jsxs(Pe.Content,{"data-slot":"drawer-content",className:i,...l,children:[a,n]})]}),e[8]=n,e[9]=l,e[10]=i,e[11]=c):c=e[11],c}function Tr(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("flex flex-col gap-1.5 px-4 py-2",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.jsx("div",{"data-slot":"drawer-header",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Ar(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("text-foreground font-semibold",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.jsx(Pe.Title,{"data-slot":"drawer-title",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}const ns=w.createContext({setOpen:()=>{}}),Mr=()=>w.useContext(ns),Er=t=>{const e=N.c(25);let n,r,l,o,i;e[0]!==t?({children:n,defaultOpen:r,open:o,onOpenChange:l,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=l,e[4]=o,e[5]=i):(n=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]=kr(c);let f;e[10]!==m?(f={setOpen:m},e[10]=m,e[11]=f):f=e[11];let u;e[12]!==n||e[13]!==d||e[14]!==i||e[15]!==m?(u=s.jsx(zr,{open:d,onOpenChange:m,...i,children:n}),e[12]=n,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=s.jsx(tn,{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=s.jsx(ns.Provider,{value:f,children:p}),e[22]=f,e[23]=p,e[24]=x):x=e[24],x},Lr=t=>{const{children:e,title:n,...r}=t,l=De(),{className:o,...i}=r;return l?s.jsxs(Pr,{...i,children:[s.jsx(Tr,{className:"hidden",children:s.jsx(Ar,{children:n})}),s.jsx("div",{className:z("flex flex-col gap-2 p-2 py-4",o),children:e})]}):s.jsx(en,{...r,children:e})},Dr=t=>{const{children:e,...n}=t,{setOpen:r}=Mr(),l=De(),{className:o,...i}=n;return l?s.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}):s.jsx(sn,{...n,children:e})},Rr=t=>{const e=N.c(7);let n,r;e[0]!==t?({children:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);const l=De();let o;return e[3]!==n||e[4]!==l||e[5]!==r?(o=l?s.jsx($r,{asChild:!0,children:n}):s.jsx(Qs,{...r,children:n}),e[3]=n,e[4]=l,e[5]=r,e[6]=o):o=e[6],o},Hr=t=>{const e=N.c(7);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);const l=De();let o;return e[3]!==n||e[4]!==l||e[5]!==r?(o=l?s.jsx(ft,{className:z(n),...r}):s.jsx(ft,{className:z(n),...r}),e[3]=n,e[4]=l,e[5]=r,e[6]=o):o=e[6],o};function Ur(t){const e=N.c(11),{user:n,trigger:r,align:l,children:o}=t,i=l===void 0?"start":l;let a;e[0]!==r||e[1]!==n?(a=r(n),e[0]=r,e[1]=n,e[2]=a):a=e[2];let c;e[3]!==a?(c=s.jsx(Rr,{asChild:!0,children:s.jsx("div",{children:a})}),e[3]=a,e[4]=c):c=e[4];let d;e[5]!==i||e[6]!==o?(d=s.jsx(Lr,{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=s.jsxs(Er,{children:[c,d]}),e[8]=c,e[9]=d,e[10]=m):m=e[10],m}function Br(t){const e=N.c(8),{children:n,onClick:r,className:l,asChild:o}=t;let i;e[0]!==o||e[1]!==n||e[2]!==r?(i=o?n:s.jsx("button",{type:"button",className:"flex items-center gap-2 text-sm w-full cursor-pointer",onClick:r,children:n}),e[0]=o,e[1]=n,e[2]=r,e[3]=i):i=e[3];let a;return e[4]!==o||e[5]!==l||e[6]!==i?(a=s.jsx(Dr,{asChild:o,className:l,children:i}),e[4]=o,e[5]=l,e[6]=i,e[7]=a):a=e[7],a}function Fr(t){const e=N.c(2),{className:n}=t;let r;return e[0]!==n?(r=s.jsx(Hr,{className:n}),e[0]=n,e[1]=r):r=e[1],r}function Wr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const Ce=Object.assign(Ur,{Item:Br,Separator:Fr,Skeleton:Wr});function Vr(t){const e=N.c(49),{user:n,userImage:r}=t,[l,o]=w.useState(!1),[i,a]=w.useState(!1);let c;e[0]!==n.email||e[1]!==n.id||e[2]!==n.name?(c=()=>{const B=`ID: ${n.id}
3
+ Email: ${n.email}`;try{await navigator.clipboard.writeText(_),ye.success("User info copied to clipboard")}catch{ye.error("Failed to copy user info to clipboard")}},e[0]=n,e[1]=o):o=e[1];const i=o,a=n.name||n.email||"U";let c;e[2]!==a||e[3]!==r?(c=s.jsx(ke,{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=n.name||"User";let m;e[5]!==d?(m=s.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]!==n.email?(f=s.jsx("span",{className:"text-xs text-muted-foreground truncate font-normal",children:n.email}),e[7]=n.email,e[8]=f):f=e[8];let u;e[9]!==m||e[10]!==f?(u=s.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=s.jsxs(re,{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=s.jsx(Tn,{}),e[16]=x):x=e[16];let h;e[17]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Kt,{size:18}),e[17]=h):h=e[17];let g;e[18]!==l?(g=s.jsxs(Ae,{onClick:l,children:[h,"Preferences"]}),e[18]=l,e[19]=g):g=e[19];let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Ae,{asChild:!0,children:s.jsxs("a",{href:"https://www.decocms.com/terms-of-use",target:"_blank",rel:"noopener noreferrer",children:[s.jsx(Lt,{size:18}),s.jsx("span",{className:"flex-1",children:"Terms & Conditions"}),s.jsx(Qe,{size:14})]})}),e[20]=j):j=e[20];let b;e[21]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Ae,{asChild:!0,children:s.jsxs("a",{href:"https://github.com/decocms/mesh",target:"_blank",rel:"noopener noreferrer",children:[s.jsx(ht,{className:"size-[18px]"}),s.jsx("span",{className:"flex-1",children:"decocms/mesh"}),s.jsx(Qe,{size:14})]})}),e[21]=b):b=e[21];let v;e[22]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs(Ae,{onClick:Mn,children:[s.jsx(Wt,{size:18}),"Log out"]}),e[22]=v):v=e[22];let y;e[23]!==g?(y=s.jsxs("div",{className:"p-1 flex flex-col",children:[x,g,j,b,v]}),e[23]=g,e[24]=y):y=e[24];let C;e[25]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("div",{className:"mt-auto px-3 py-2 border-t border-border",children:s.jsxs("span",{className:"text-[11px] text-muted-foreground/75",children:["v","2.110.0"]})}),e[25]=C):C=e[25];let S;return e[26]!==y||e[27]!==p?(S=s.jsx(s.Fragment,{children:s.jsxs("div",{className:"flex flex-col gap-0.5 bg-sidebar min-w-[250px]",children:[p,y,C]})}),e[26]=y,e[27]=p,e[28]=S):S=e[28],S}function Mn(){return he.signOut()}function En(t){const e=N.c(26),{org:n,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=y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),o?.())},e[3]=o,e[4]=p):p=e[4];let x;e[5]!==a||e[6]!==n.id?(x=()=>a?.(n.id),e[5]=a,e[6]=n.id,e[7]=x):x=e[7];const h=n.logo??void 0;let g;e[8]!==n.name||e[9]!==h?(g=s.jsx(ke,{url:h,fallback:n.name,size:"sm",className:"size-6 shrink-0 rounded-md",objectFit:"cover"}),e[8]=n.name,e[9]=h,e[10]=g):g=e[10];let j;e[11]!==n.name?(j=s.jsx("span",{className:"flex-1 text-sm text-foreground truncate text-left min-w-0",children:n.name}),e[11]=n.name,e[12]=j):j=e[12];let b;e[13]!==i||e[14]!==n.name||e[15]!==d||e[16]!==c?(b=i&&c?s.jsx("button",{type:"button","aria-label":`${n.name} settings`,className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:y=>{y.stopPropagation(),i()},children:s.jsx(it,{size:16,className:"text-muted-foreground"})}):d?s.jsx(zt,{size:16,className:"text-muted-foreground shrink-0"}):s.jsx("span",{className:"size-5 shrink-0","aria-hidden":"true"}),e[13]=i,e[14]=n.name,e[15]=d,e[16]=c,e[17]=b):b=e[17];let v;return e[18]!==o||e[19]!==u||e[20]!==p||e[21]!==x||e[22]!==g||e[23]!==j||e[24]!==b?(v=s.jsxs("div",{role:"button",tabIndex:0,className:u,onClick:o,onKeyDown:p,onMouseEnter:x,children:[g,j,b]}),e[18]=o,e[19]=u,e[20]=p,e[21]=x,e[22]=g,e[23]=j,e[24]=b,e[25]=v):v=e[25],v}function Ln(t){const e=N.c(34),{currentOrgSlug:n,hoveredOrgId:r,onOrgSelect:l,onOrgSettings:o,onPopoverClose:i,onCreateOrganization:a,onOrgHover:c}=t,{data:d}=he.useListOrganizations();let m,f,u,p;if(e[0]!==n||e[1]!==r||e[2]!==a||e[3]!==c||e[4]!==l||e[5]!==o||e[6]!==i||e[7]!==d){let g;e[12]!==n?(g=(S,_)=>S.slug===n?-1:_.slug===n?1:S.name.localeCompare(_.name),e[12]=n,e[13]=g):g=e[13];const j=[...d??[]].sort(g);u="flex flex-col min-w-[240px] border-l border-border";let b;e[14]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("span",{className:"text-xs text-muted-foreground truncate",children:"Your Organizations"}),e[14]=b):b=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 y;e[18]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(qe,{size:16,className:"text-muted-foreground"}),e[18]=y):y=e[18],e[19]!==v?(p=s.jsxs("div",{className:"flex items-center justify-between h-10 px-3 border-b border-border",children:[b,s.jsx(re,{variant:"ghost",size:"icon",className:"size-5",onClick:v,children:y})]}),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]!==n||e[22]!==r||e[23]!==c||e[24]!==l||e[25]!==o?(C=S=>s.jsx(En,{org:S,isActive:S.slug===n,isHovered:S.id===r,onClick:()=>l(S.slug),onSettings:()=>o(S.slug),onHover:c},S.slug),e[21]=n,e[22]=r,e[23]=c,e[24]=l,e[25]=o,e[26]=C):C=e[26],f=j.map(C),e[0]=n,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=s.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=s.jsxs("div",{className:u,children:[p,x]}),e[30]=u,e[31]=p,e[32]=x,e[33]=h):h=e[33],h}function Dn(t){const e=N.c(27),{project:n,isActive:r,onClick:l,onSettings:o}=t,[i,a]=w.useState(!1),c=r||i,d=n.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=y=>{(y.key==="Enter"||y.key===" ")&&(y.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]!==n.name||e[7]!==n.ui||e[8]!==d?(h=n.ui?.icon?s.jsx("img",{src:n.ui.icon,alt:"",className:"size-6 rounded-md object-cover shrink-0"}):s.jsx(ke,{fallback:n.name,size:"sm",shape:"square",className:"size-6 shrink-0 rounded-md",style:{backgroundColor:d}}),e[6]=n.name,e[7]=n.ui,e[8]=d,e[9]=h):h=e[9];let g;e[10]!==n.name?(g=s.jsx("span",{className:"flex-1 text-sm text-foreground truncate text-left min-w-0",children:n.name}),e[10]=n.name,e[11]=g):g=e[11];let j;e[12]!==r?(j=r&&s.jsx(Me,{size:16,className:"text-muted-foreground shrink-0"}),e[12]=r,e[13]=j):j=e[13];let b;e[14]!==r||e[15]!==o||e[16]!==n.name||e[17]!==c?(b=o&&c&&!r?s.jsx("button",{type:"button","aria-label":`${n.name} settings`,className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:y=>{y.stopPropagation(),o()},children:s.jsx(it,{size:16,className:"text-muted-foreground"})}):r?null:s.jsx("span",{className:"size-5 shrink-0","aria-hidden":"true"}),e[14]=r,e[15]=o,e[16]=n.name,e[17]=c,e[18]=b):b=e[18];let v;return e[19]!==l||e[20]!==f||e[21]!==u||e[22]!==h||e[23]!==g||e[24]!==j||e[25]!==b?(v=s.jsxs("div",{role:"button",tabIndex:0,className:f,onClick:l,onKeyDown:u,onMouseEnter:p,onMouseLeave:x,children:[h,g,j,b]}),e[19]=l,e[20]=f,e[21]=u,e[22]=h,e[23]=g,e[24]=j,e[25]=b,e[26]=v):v=e[26],v}function Rn(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"space-y-1 px-2 py-1",children:[s.jsx(ee,{className:"h-10 w-full"}),s.jsx(ee,{className:"h-10 w-full"})]}),t[0]=e):e=t[0],e}function Hn(t){const e=N.c(16),{organizationId:n,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}=kt(n,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(Un)??[];if(u.length===0){let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=s.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=>s.jsx(Dn,{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=s.jsx(s.Fragment,{children:d}),e[14]=d,e[15]=f):f=e[15],f}function Un(t){return t.slug!==ne}function Bn(t){const e=N.c(17),{organizationId:n,organizationName:r,currentProjectSlug:l,onProjectSelect:o,onProjectSettings:i,onCreateProject:a,orgSlug:c}=t;let d;e[0]!==r?(d=s.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&&s.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:s.jsx(qe,{size:16,className:"text-muted-foreground"})}),e[2]=a,e[3]=m):m=e[3];let f;e[4]!==d||e[5]!==m?(f=s.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=s.jsx(Rn,{}),e[7]=u):u=e[7];let p;e[8]!==l||e[9]!==o||e[10]!==i||e[11]!==c||e[12]!==n?(p=s.jsx("div",{className:"flex flex-col gap-0.5 p-1 flex-1 overflow-y-auto",children:s.jsx(w.Suspense,{fallback:u,children:s.jsx(Hn,{organizationId:n,currentProjectSlug:l,onProjectSelect:o,onProjectSettings:i,orgSlug:c})})}),e[8]=l,e[9]=o,e[10]=i,e[11]=c,e[12]=n,e[13]=p):p=e[13];let x;return e[14]!==f||e[15]!==p?(x=s.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 Jt(t){const e=N.c(108),{open:n,onOpenChange:r,user:l,userImage:o}=t,[i,a]=Ze(),[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]!==a?(u=async se=>{if(se&&await Notification.requestPermission()!=="granted"){ye.error("Notifications denied. Please enable them in your browser settings."),a(Yn);return}a(J=>({...J,enableNotifications:se}))},e[2]=a,e[3]=u):u=e[3];const p=u;let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Ls,{className:"text-base",children:"Profile Settings"}),e[4]=x):x=e[4];let h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsxs(Ds,{className:"px-6 pt-6 pb-4 border-b border-border shrink-0 relative",children:[x,s.jsxs(Rs,{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:[s.jsx(Be,{size:16}),s.jsx("span",{className:"sr-only",children:"Close"})]})]}),e[5]=h):h=e[5];const g=l.name||"U";let j;e[6]!==g||e[7]!==o?(j=s.jsx(ke,{url:o,fallback:g,shape:"circle",size:"xl",className:"h-16 w-16"}),e[6]=g,e[7]=o,e[8]=j):j=e[8];const b=l.name||"User";let v;e[9]!==b?(v=s.jsx("span",{className:"text-base font-medium text-foreground",children:b}),e[9]=b,e[10]=v):v=e[10];let y;e[11]!==l.email?(y=s.jsx("span",{className:"text-sm text-muted-foreground",children:l.email}),e[11]=l.email,e[12]=y):y=e[12];let C;e[13]!==v||e[14]!==y?(C=s.jsxs("div",{className:"flex flex-col gap-1",children:[v,y]}),e[13]=v,e[14]=y,e[15]=C):C=e[15];let S;e[16]!==C||e[17]!==j?(S=s.jsxs("div",{className:"flex items-center gap-4",children:[j,C]}),e[16]=C,e[17]=j,e[18]=S):S=e[18];let _;e[19]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Preferences"}),e[19]=_):_=e[19];let O;e[20]!==a?(O=()=>a(qn),e[20]=a,e[21]=O):O=e[21];let k;e[22]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[s.jsxs(Te,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[s.jsx(Ks,{size:16,className:"text-muted-foreground"}),"Developer Mode"]}),s.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Show technical details like JSON input/output for tool calls"})]}),e[22]=k):k=e[22];let I;e[23]!==a?(I=se=>a(J=>({...J,devMode:se})),e[23]=a,e[24]=I):I=e[24];let $;e[25]!==i.devMode||e[26]!==I?($=s.jsx("div",{onClick:Zn,children:s.jsx(He,{checked:i.devMode,onCheckedChange:I})}),e[25]=i.devMode,e[26]=I,e[27]=$):$=e[27];let M;e[28]!==O||e[29]!==$?(M=s.jsxs("button",{type:"button",onClick:O,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[28]=O,e[29]=$,e[30]=M):M=e[30];let A;e[31]!==p||e[32]!==i.enableNotifications?(A=()=>p(!i.enableNotifications),e[31]=p,e[32]=i.enableNotifications,e[33]=A):A=e[33];let U;e[34]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[s.jsxs(Te,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[s.jsx(Et,{size:16,className:"text-muted-foreground"}),"Notifications"]}),s.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Play a sound and show notifications when chat messages complete while app is unfocused"})]}),e[34]=U):U=e[34];let L;e[35]!==p||e[36]!==i.enableNotifications?(L=s.jsx("div",{onClick:Gn,children:s.jsx(He,{disabled:typeof Notification>"u",checked:i.enableNotifications,onCheckedChange:p})}),e[35]=p,e[36]=i.enableNotifications,e[37]=L):L=e[37];let T;e[38]!==A||e[39]!==L?(T=s.jsxs("button",{type:"button",disabled:typeof Notification>"u",onClick:A,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:[U,L]}),e[38]=A,e[39]=L,e[40]=T):T=e[40];let E;e[41]!==M||e[42]!==T?(E=s.jsxs("div",{className:"flex flex-col gap-2",children:[_,M,T]}),e[41]=M,e[42]=T,e[43]=E):E=e[43];let B,H;e[44]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(Te,{className:"text-sm font-medium text-foreground",children:"Tool Approval"}),H=s.jsx("p",{className:"text-xs text-muted-foreground",children:"Choose when to require approval before tools execute"}),e[44]=B,e[45]=H):(B=e[44],H=e[45]);let R;e[46]!==a?(R=se=>a(J=>({...J,toolApprovalLevel:se})),e[46]=a,e[47]=R):R=e[47];let F;e[48]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(Fs,{className:"w-full",children:s.jsx(Ws,{})}),e[48]=F):F=e[48];let W;e[49]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(Xe,{value:"none",children:s.jsxs("div",{className:"flex items-start flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"None"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Require approval for all tool calls"})]})}),e[49]=W):W=e[49];let K;e[50]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(Xe,{value:"readonly",children:s.jsxs("div",{className:"flex items-start flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Read-only"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),e[50]=K):K=e[50];let Z;e[51]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsxs(Vs,{children:[W,K,s.jsx(Xe,{value:"yolo",children:s.jsxs("div",{className:"flex items-start flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"YOLO"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all tools without approval"})]})})]}),e[51]=Z):Z=e[51];let X;e[52]!==i.toolApprovalLevel||e[53]!==R?(X=s.jsxs("div",{className:"flex flex-col gap-2",children:[B,H,s.jsxs(Bs,{value:i.toolApprovalLevel,onValueChange:R,children:[F,Z]})]}),e[52]=i.toolApprovalLevel,e[53]=R,e[54]=X):X=e[54];let Q,q;e[55]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Experimental"}),q=s.jsx("p",{className:"text-xs text-muted-foreground",children:"Experimental features are unstable and may change or stop working at any time."}),e[55]=Q,e[56]=q):(Q=e[55],q=e[56]);let V;e[57]!==a?(V=()=>a(Kn),e[57]=a,e[58]=V):V=e[58];let P;e[59]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[s.jsxs(Te,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[s.jsx(xt,{size:16,className:"text-muted-foreground"}),"Projects"]}),s.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Enable the projects feature in the sidebar"})]}),e[59]=P):P=e[59];let D;e[60]!==a?(D=se=>a(J=>({...J,experimental_projects:se})),e[60]=a,e[61]=D):D=e[61];let G;e[62]!==i.experimental_projects||e[63]!==D?(G=s.jsx("div",{onClick:Vn,children:s.jsx(He,{checked:i.experimental_projects,onCheckedChange:D})}),e[62]=i.experimental_projects,e[63]=D,e[64]=G):G=e[64];let Y;e[65]!==V||e[66]!==G?(Y=s.jsxs("button",{type:"button",onClick:V,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:[P,G]}),e[65]=V,e[66]=G,e[67]=Y):Y=e[67];let te;e[68]!==a?(te=()=>a(Wn),e[68]=a,e[69]=te):te=e[69];let ze;e[70]===Symbol.for("react.memo_cache_sentinel")?(ze=s.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[s.jsxs(Te,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[s.jsx(Ct,{size:16,className:"text-muted-foreground"}),"Tasks"]}),s.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Enable the tasks feature in the sidebar"})]}),e[70]=ze):ze=e[70];let we;e[71]!==a?(we=se=>a(J=>({...J,experimental_tasks:se})),e[71]=a,e[72]=we):we=e[72];let ae;e[73]!==i.experimental_tasks||e[74]!==we?(ae=s.jsx("div",{onClick:Fn,children:s.jsx(He,{checked:i.experimental_tasks,onCheckedChange:we})}),e[73]=i.experimental_tasks,e[74]=we,e[75]=ae):ae=e[75];let ce;e[76]!==te||e[77]!==ae?(ce=s.jsxs("button",{type:"button",onClick:te,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:[ze,ae]}),e[76]=te,e[77]=ae,e[78]=ce):ce=e[78];let de;e[79]!==Y||e[80]!==ce?(de=s.jsxs("div",{className:"flex flex-col gap-2",children:[Q,q,Y,ce]}),e[79]=Y,e[80]=ce,e[81]=de):de=e[81];let me;e[82]!==S||e[83]!==E||e[84]!==X||e[85]!==de?(me=s.jsxs("div",{className:"p-5 space-y-6 min-h-[225px] overflow-y-auto",children:[S,E,X,de]}),e[82]=S,e[83]=E,e[84]=X,e[85]=de,e[86]=me):me=e[86];let fe;e[87]!==l.id?(fe=s.jsx("span",{className:"font-mono text-xs",children:l.id}),e[87]=l.id,e[88]=fe):fe=e[88];let ge;e[89]!==c?(ge=c?s.jsx(Me,{size:14,className:"text-green-600"}):s.jsx(It,{size:14,className:"opacity-0 group-hover:opacity-100 transition-opacity"}),e[89]=c,e[90]=ge):ge=e[90];let je;e[91]!==f||e[92]!==fe||e[93]!==ge?(je=s.jsx(We,{asChild:!0,children:s.jsxs("button",{type:"button",onClick:f,className:"group flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[fe,ge]})}),e[91]=f,e[92]=fe,e[93]=ge,e[94]=je):je=e[94];let be;e[95]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(Fe,{side:"top",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[95]=be):be=e[95];let ue;e[96]!==je?(ue=s.jsx(_t,{children:s.jsxs(Ve,{children:[je,be]})}),e[96]=je,e[97]=ue):ue=e[97];let ve;e[98]===Symbol.for("react.memo_cache_sentinel")?(ve=s.jsxs("span",{className:"text-xs text-muted-foreground/75",children:["v","2.110.0"]}),e[98]=ve):ve=e[98];let pe;e[99]!==ue?(pe=s.jsxs("div",{className:"border-t border-border px-5 py-4 flex items-center justify-between shrink-0",children:[ue,ve]}),e[99]=ue,e[100]=pe):pe=e[100];let xe;e[101]!==me||e[102]!==pe?(xe=s.jsxs(Hs,{className:"sm:max-w-lg sm:max-h-[85vh] p-0 flex flex-col",closeButtonClassName:"hidden",children:[h,s.jsxs("div",{className:"flex flex-col overflow-y-hidden",children:[me,pe]})]}),e[101]=me,e[102]=pe,e[103]=xe):xe=e[103];let Ne;return e[104]!==r||e[105]!==n||e[106]!==xe?(Ne=s.jsx(Us,{open:n,onOpenChange:r,children:xe}),e[104]=r,e[105]=n,e[106]=xe,e[107]=Ne):Ne=e[107],Ne}function Fn(t){return t.stopPropagation()}function Wn(t){return{...t,experimental_tasks:!t.experimental_tasks}}function Vn(t){return t.stopPropagation()}function Kn(t){return{...t,experimental_projects:!t.experimental_projects}}function Gn(t){return t.stopPropagation()}function Zn(t){return t.stopPropagation()}function qn(t){return{...t,devMode:!t.devMode}}function Yn(t){return{...t,enableNotifications:!1}}function Xt(t){const e=N.c(77),{isCollapsed:n,variant:r,onCreateProject:l}=t,o=n===void 0?!1:n,i=r===void 0?"light":r,[a]=Ze();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[0]=c):c=e[0];const{org:d,project:m}=st(c),{data:f}=he.useListOrganizations(),{data:u}=he.useSession(),p=$e(),x=i==="dark",g=Se()?.project;let j;e[1]!==d||e[2]!==f?(j=f?.find(J=>J.slug===d),e[1]=d,e[2]=f,e[3]=j):j=e[3];const b=j,[v,y]=w.useState(!1),[C,S]=w.useState(!1),[_,O]=w.useState(!1),[k,I]=w.useState(null),$=u?.user,M=$?.image;let A;e[4]!==b||e[5]!==k||e[6]!==f?(A=k?f?.find(J=>J.id===k):b,e[4]=b,e[5]=k,e[6]=f,e[7]=A):A=e[7];const U=A;let L;e[8]!==p?(L=J=>{y(!1),p({to:"/$org/$project/settings",params:{org:J,project:ne}})},e[8]=p,e[9]=L):L=e[9];const T=L;let E;e[10]!==p?(E=J=>{y(!1),p({to:"/$org/$project",params:{org:J,project:ne}})},e[10]=p,e[11]=E):E=e[11];const B=E;let H;e[12]!==p?(H=(J,Je)=>{y(!1),p({to:"/$org/$project",params:{org:J,project:Je}})},e[12]=p,e[13]=H):H=e[13];const R=H;let F;e[14]!==p?(F=(J,Je)=>{y(!1),p({to:"/$org/$project/settings",params:{org:J,project:Je}})},e[14]=p,e[15]=F):F=e[15];const W=F;let K;e[16]!==l?(K=l?()=>{y(!1),l()}:void 0,e[16]=l,e[17]=K):K=e[17];const Z=K;let X;e[18]===Symbol.for("react.memo_cache_sentinel")?(X=J=>{y(J),J||I(null)},e[18]=X):X=e[18];const Q=X;let q;e[19]!==b?(q=()=>{b&&I(b.id)},e[19]=b,e[20]=q):q=e[20];const V=q,P=x?"hover:bg-zinc-800 text-white":"hover:bg-sidebar-accent",D=o?"justify-center":"justify-start",G=o?"":"pl-0.5! px-1.5 gap-1.5";let Y;e[21]!==P||e[22]!==D||e[23]!==G?(Y=z("h-7 min-w-0 max-w-full",P,D,G),e[21]=P,e[22]=D,e[23]=G,e[24]=Y):Y=e[24];const te=b?.logo??"",ze=b?.name??"",we=x&&"border-none";let ae;e[25]!==we?(ae=z("shrink-0 rounded-[5px]",we),e[25]=we,e[26]=ae):ae=e[26];let ce;e[27]!==te||e[28]!==ze||e[29]!==ae?(ce=s.jsx(ke,{url:te,fallback:ze,size:"xs",className:ae,objectFit:"cover"}),e[27]=te,e[28]=ze,e[29]=ae,e[30]=ce):ce=e[30];let de;e[31]!==b?.name||e[32]!==g||e[33]!==o||e[34]!==x?(de=!o&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"min-w-0 flex-1 text-left",children:x&&g?s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-[10px] text-zinc-500 leading-none truncate",children:b?.name??"Select org"}),s.jsx("p",{className:"text-sm text-white font-normal leading-tight mt-0.5 truncate",children:g.name??g.slug})]}):s.jsx("span",{className:"block truncate text-[14px] tracking-[-0.00625rem] font-medium text-foreground",children:b?.name??"Select org"})}),x?s.jsx(vt,{className:"size-3 text-zinc-500 shrink-0"}):s.jsx(nt,{className:"size-3.5 text-muted-foreground shrink-0"})]}),e[31]=b?.name,e[32]=g,e[33]=o,e[34]=x,e[35]=de):de=e[35];let me;e[36]!==V||e[37]!==Y||e[38]!==ce||e[39]!==de?(me=s.jsx(lt,{asChild:!0,children:s.jsxs(re,{variant:"ghost",size:"sm",onClick:V,className:Y,children:[ce,de]})}),e[36]=V,e[37]=Y,e[38]=ce,e[39]=de,e[40]=me):me=e[40];let fe;e[41]!==$||e[42]!==M?(fe=$&&s.jsx(An,{user:$,userImage:M,onOpenSettings:()=>{S(!0),y(!1)}}),e[41]=$,e[42]=M,e[43]=fe):fe=e[43];let ge,je;e[44]===Symbol.for("react.memo_cache_sentinel")?(ge=()=>y(!1),je=()=>O(!0),e[44]=ge,e[45]=je):(ge=e[44],je=e[45]);let be;e[46]!==T||e[47]!==B||e[48]!==k||e[49]!==d?(be=s.jsx(Ln,{currentOrgSlug:d,hoveredOrgId:k,onOrgSelect:B,onOrgSettings:T,onPopoverClose:ge,onCreateOrganization:je,onOrgHover:I}),e[46]=T,e[47]=B,e[48]=k,e[49]=d,e[50]=be):be=e[50];let ue;e[51]!==Z||e[52]!==W||e[53]!==R||e[54]!==U||e[55]!==d||e[56]!==a.experimental_projects||e[57]!==m?(ue=a.experimental_projects&&U&&s.jsx(Bn,{organizationId:U.id,organizationName:U.name,orgSlug:U.slug,currentProjectSlug:U.slug===d?m:void 0,onProjectSelect:R,onProjectSettings:W,onCreateProject:Z}),e[51]=Z,e[52]=W,e[53]=R,e[54]=U,e[55]=d,e[56]=a.experimental_projects,e[57]=m,e[58]=ue):ue=e[58];let ve;e[59]!==fe||e[60]!==be||e[61]!==ue?(ve=s.jsxs(ot,{align:"start",side:"bottom",className:"p-0 flex w-auto h-88 overflow-hidden",children:[fe,be,ue]}),e[59]=fe,e[60]=be,e[61]=ue,e[62]=ve):ve=e[62];let pe;e[63]!==v||e[64]!==me||e[65]!==ve?(pe=s.jsxs(rt,{open:v,onOpenChange:Q,children:[me,ve]}),e[63]=v,e[64]=me,e[65]=ve,e[66]=pe):pe=e[66];let xe;e[67]!==C||e[68]!==$||e[69]!==M?(xe=$&&C&&$.email&&s.jsx(Jt,{open:C,onOpenChange:S,user:{...$,name:$.name??void 0,email:$.email},userImage:M}),e[67]=C,e[68]=$,e[69]=M,e[70]=xe):xe=e[70];let Ne;e[71]!==_?(Ne=s.jsx($t,{open:_,onOpenChange:O}),e[71]=_,e[72]=Ne):Ne=e[72];let se;return e[73]!==pe||e[74]!==xe||e[75]!==Ne?(se=s.jsxs(s.Fragment,{children:[pe,xe,Ne]}),e[73]=pe,e[74]=xe,e[75]=Ne,e[76]=se):se=e[76],se}Xt.Skeleton=function({variant:e="light"}){const n=e==="dark";return s.jsxs("div",{className:z("flex items-center gap-1.5 h-7 px-1.5 w-full",n&&"text-white"),children:[s.jsx(ee,{className:z("size-5 rounded-[5px] shrink-0",n&&"bg-zinc-800")}),s.jsx(ee,{className:z("h-3.5 flex-1",n&&"bg-zinc-800")})]})};function et(t){const e=N.c(71),{onCreateProject:n}=t,{state:r,toggleSidebar:l}=Ye(),o=r==="collapsed",[i,a]=Ge(),{locator:c}=Se();let d;e[0]!==c?(d=Oe.isOrgAdminProject(c),e[0]=c,e[1]=d):d=e[1];const f=!d;let u;e[2]!==a?(u=()=>{a(Jn)},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 g=o&&"group-hover/switcher:opacity-0 group-hover/switcher:pointer-events-none group-hover/switcher:invisible";let j;e[6]!==g?(j=z("w-full min-w-0 transition-opacity",g),e[6]=g,e[7]=j):j=e[7];const b=f?"dark":"light";let v;e[8]!==o||e[9]!==n||e[10]!==b?(v=s.jsx(Xt,{isCollapsed:o,variant:b,onCreateProject:n}),e[8]=o,e[9]=n,e[10]=b,e[11]=v):v=e[11];let y;e[12]!==j||e[13]!==v?(y=s.jsx("div",{className:j,children:v}),e[12]=j,e[13]=v,e[14]=y):y=e[14];const C=f?"hover:bg-zinc-800 text-zinc-400":"hover:bg-sidebar-accent",S=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]!==S?(_=z("absolute inset-0 m-auto size-7 transition-opacity",C,S),e[15]=C,e[16]=S,e[17]=_):_=e[17];const O=!o,k=f?"text-zinc-400":"text-muted-foreground";let I;e[18]!==k?(I=z("size-4 shrink-0",k),e[18]=k,e[19]=I):I=e[19];let $;e[20]!==I?($=s.jsx(Ht,{className:I}),e[20]=I,e[21]=$):$=e[21];let M;e[22]!==_||e[23]!==O||e[24]!==$||e[25]!==l?(M=s.jsx(re,{variant:"ghost",size:"icon",className:_,onClick:l,"aria-label":"Expand sidebar",disabled:O,children:$}),e[22]=_,e[23]=O,e[24]=$,e[25]=l,e[26]=M):M=e[26];let A;e[27]!==M||e[28]!==y?(A=s.jsxs("div",{className:"group/switcher relative flex items-center justify-center gap-1.5 min-w-0 flex-1 overflow-hidden",children:[y,M]}),e[27]=M,e[28]=y,e[29]=A):A=e[29];const U=o&&"hidden";let L;e[30]!==U?(L=z("flex items-center gap-0.5 shrink-0",U),e[30]=U,e[31]=L):L=e[31];const T=f?"hover:bg-zinc-800 text-zinc-400 hover:text-white":"hover:bg-sidebar-accent";let E;e[32]!==T?(E=z("size-7",T),e[32]=T,e[33]=E):E=e[33];const B=f?"text-zinc-400":"text-muted-foreground";let H;e[34]!==B?(H=z("size-4",B),e[34]=B,e[35]=H):H=e[35];let R;e[36]!==H?(R=s.jsx(Rt,{className:H}),e[36]=H,e[37]=R):R=e[37];let F;e[38]!==o||e[39]!==E||e[40]!==R||e[41]!==l?(F=s.jsx(We,{asChild:!0,children:s.jsx(re,{variant:"ghost",size:"icon",className:E,onClick:l,"aria-label":"Collapse sidebar",disabled:o,children:R})}),e[38]=o,e[39]=E,e[40]=R,e[41]=l,e[42]=F):F=e[42];let W;e[43]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(Fe,{side:"bottom",children:"Collapse sidebar"}),e[43]=W):W=e[43];let K;e[44]!==F?(K=s.jsxs(Ve,{children:[F,W]}),e[44]=F,e[45]=K):K=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 X=f?"text-inherit":"text-muted-foreground";let Q;e[49]!==X?(Q=z(X),e[49]=X,e[50]=Q):Q=e[50];let q;e[51]!==Q?(q=s.jsx(Nt,{size:11,className:Q}),e[51]=Q,e[52]=q):q=e[52];let V;e[53]!==o||e[54]!==Z||e[55]!==q||e[56]!==p?(V=s.jsx(We,{asChild:!0,children:s.jsx(re,{variant:"ghost",size:"icon",className:Z,onClick:p,"aria-label":"Toggle Decopilot",disabled:o,children:q})}),e[53]=o,e[54]=Z,e[55]=q,e[56]=p,e[57]=V):V=e[57];let P;e[58]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(Fe,{side:"bottom",children:"Toggle Decopilot"}),e[58]=P):P=e[58];let D;e[59]!==V?(D=s.jsxs(Ve,{children:[V,P]}),e[59]=V,e[60]=D):D=e[60];let G;e[61]!==L||e[62]!==K||e[63]!==D?(G=s.jsxs("div",{className:L,children:[K,D]}),e[61]=L,e[62]=K,e[63]=D,e[64]=G):G=e[64];let Y;e[65]!==A||e[66]!==G?(Y=s.jsx(_e,{children:s.jsx(ie,{children:s.jsxs("div",{className:"flex items-center justify-between w-full h-12",children:[A,G]})})}),e[65]=A,e[66]=G,e[67]=Y):Y=e[67];let te;return e[68]!==Y||e[69]!==h?(te=s.jsx(Zt,{className:h,children:Y}),e[68]=Y,e[69]=h,e[70]=te):te=e[70],te}function Jn(t){return!t}et.Skeleton=function({isDark:e=!1}){return s.jsx(Zt,{className:z("h-12 gap-0 pt-0",e&&"bg-[#030302] border-b border-zinc-800"),children:s.jsx(_e,{children:s.jsx(ie,{children:s.jsxs("div",{className:"flex items-center justify-between w-full h-12",children:[s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0 flex-1 px-1.5",children:[s.jsx(ee,{className:z("size-5 rounded-[5px] shrink-0",e&&"bg-zinc-800")}),s.jsx(ee,{className:z("h-3.5 w-16",e&&"bg-zinc-800")})]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx(ee,{className:z("size-7 rounded-lg",e&&"bg-zinc-800")}),s.jsx(ee,{className:z("size-7 rounded-lg",e&&"bg-zinc-800")})]})]})})})})};function Xn(){const t=N.c(10),{locator:e}=Se(),n=$e(),l=Ke().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]!==n?(a=()=>{n({to:"/$org/$project/settings",params:Oe.parse(e)})},t[2]=e,t[3]=n,t[4]=a):a=t[4];const c=a;let d,m;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:s.jsx(it,{})}),m=s.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=s.jsx(Sn,{className:"py-2 border-r",children:s.jsx(_e,{children:s.jsx(ie,{children:s.jsxs(Re,{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 Qt(t){const e=N.c(4),{children:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(at,{className:"my-2 -ml-1"}),e[0]=r):r=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ie,{children:s.jsx("div",{className:"group-data-[collapsible=icon]:hidden px-2 py-0 text-xs font-medium h-6 text-muted-foreground flex items-center justify-between",children:s.jsx("span",{className:"whitespace-nowrap",children:"Pinned Views"})})}),e[1]=l):l=e[1];let o;return e[2]!==n?(o=s.jsxs(s.Fragment,{children:[r,l,n]}),e[2]=n,e[3]=o):o=e[3],o}function Qn(t){const e=N.c(26),{item:n}=t,r=$e(),{org:l}=Se(),o=Ot(l.id),i=Gs(l.id);let a;e[0]!==i.update||e[1]!==n.url||e[2]!==o?.sidebar_items?(a=async()=>{const y=(o?.sidebar_items||[]).filter(C=>C.url!==n.url);await i.update.mutateAsync({sidebar_items:y})},e[0]=i.update,e[1]=n.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]!==n.icon?(m=d.test(n.icon),e[5]=n.icon,e[6]=m):m=e[6];const f=m;let u;e[7]!==n.url||e[8]!==r?(u=()=>{r({to:n.url})},e[7]=n.url,e[8]=r,e[9]=u):u=e[9];const p=n.title;let x;e[10]!==f||e[11]!==n.icon||e[12]!==n.title?(x=s.jsx("div",{className:"flex items-center justify-center shrink-0",children:f?s.jsx("img",{src:n.icon,alt:n.title,className:"h-4 w-4 rounded object-cover"}):s.jsx(Zs,{size:16,className:"text-muted-foreground group-hover/item:text-foreground transition-colors"})}),e[10]=f,e[11]=n.icon,e[12]=n.title,e[13]=x):x=e[13];let h;e[14]!==n.title?(h=n.title.toLocaleLowerCase(),e[14]=n.title,e[15]=h):h=e[15];let g;e[16]!==h?(g=s.jsx("div",{className:"flex-1 min-w-0 flex flex-col items-start",children:s.jsx("span",{className:"truncate text-sm w-full capitalize",children:h})}),e[16]=h,e[17]=g):g=e[17];let j;e[18]!==c?(j=s.jsx(Be,{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]=j):j=e[19];let b;return e[20]!==n.title||e[21]!==u||e[22]!==x||e[23]!==g||e[24]!==j?(b=s.jsx(ie,{children:s.jsxs(Re,{className:"w-full pr-2 group/item relative cursor-pointer text-foreground/90 hover:text-foreground",onClick:u,tooltip:p,children:[x,g,j]})}),e[20]=n.title,e[21]=u,e[22]=x,e[23]=g,e[24]=j,e[25]=b):b=e[25],b}function pt(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ie,{children:s.jsx("div",{className:"flex items-center gap-2 px-4 py-2",children:s.jsx(ee,{className:"h-4 flex-1"})})}),t[0]=e):e=t[0],e}function er(){const t=N.c(4),{org:e}=Se(),r=Ot(e.id)?.sidebar_items;if(!r?.length)return null;let l;t[0]!==r?(l=r.map(tr),t[0]=r,t[1]=l):l=t[1];let o;return t[2]!==l?(o=s.jsx(Qt,{children:l}),t[2]=l,t[3]=o):o=t[3],o}function tr(t){return s.jsx(Qn,{item:t},t.url)}function sr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(w.Suspense,{fallback:s.jsxs(Qt,{children:[s.jsx(pt,{}),s.jsx(pt,{})]}),children:s.jsx(er,{})}),t[0]=e):e=t[0],e}function nr(t){const e=N.c(11),{project:n}=t,r=n.ui?.themeColor??"#60a5fa";if(n.ui?.icon){let c;return e[0]!==n.ui.icon?(c=s.jsx("img",{src:n.ui.icon,alt:"",className:"size-4 rounded object-cover border border-border/50"}),e[0]=n.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]!==n.name?(o=n.name.charAt(0).toUpperCase(),e[4]=n.name,e[5]=o):o=e[5];let i;e[6]!==o?(i=s.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=s.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 rr(t){const e=N.c(14),{project:n}=t,r=$e(),{org:l}=Se();let o;e[0]!==r||e[1]!==l.slug||e[2]!==n.slug?(o=()=>{r({to:"/$org/$project",params:{org:l.slug,project:n.slug}})},e[0]=r,e[1]=l.slug,e[2]=n.slug,e[3]=o):o=e[3];let i;e[4]!==n?(i=s.jsx(nr,{project:n}),e[4]=n,e[5]=i):i=e[5];let a;e[6]!==n.name?(a=s.jsx("span",{className:"truncate flex-1",children:n.name}),e[6]=n.name,e[7]=a):a=e[7];let c;e[8]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(zt,{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]!==n.name||e[10]!==o||e[11]!==i||e[12]!==a?(d=s.jsx(ie,{children:s.jsxs(Re,{className:"group/item cursor-pointer text-foreground/90 hover:text-foreground",onClick:o,tooltip:n.name,children:[i,a,c]})}),e[9]=n.name,e[10]=o,e[11]=i,e[12]=a,e[13]=d):d=e[13],d}function lr(){const t=N.c(54),{org:e}=Se(),{data:n,isLoading:r}=kt(e.id),[l,o]=w.useState(!0),[i,a]=w.useState(!1);let c,d,m,f,u,p,x,h,g,j,b,v,y;if(t[0]!==r||t[1]!==l||t[2]!==n){y=Symbol.for("react.early_return_sentinel");e:{const M=n?.filter(ir)??[];if(r){let H;t[16]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(ie,{children:s.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[s.jsx(ee,{className:"h-4 w-4 rounded"}),s.jsx(ee,{className:"h-4 flex-1"})]})}),t[16]=H):H=t[16];let R;t[17]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(Ee,{className:"py-0",children:s.jsx(Le,{children:s.jsxs(_e,{className:"gap-0.5",children:[H,s.jsx(ie,{children:s.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[s.jsx(ee,{className:"h-4 w-4 rounded"}),s.jsx(ee,{className:"h-4 flex-1"})]})})]})})}),t[17]=R):R=t[17],y=R;break e}t[18]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(at,{className:"my-2"}),t[18]=v):v=t[18],u=Ns,j=l,b=o,f=Ee,g="py-0",m=Le,d=_e,x="gap-0.5";let A;t[19]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx("span",{children:"Projects"}),t[19]=A):A=t[19];const U=!l&&"-rotate-90";let L;t[20]!==U?(L=z("transition-transform",U),t[20]=U,t[21]=L):L=t[21];let T;t[22]!==L?(T=s.jsx(ys,{asChild:!0,children:s.jsxs("button",{type:"button",className:"flex items-center gap-1 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors",children:[A,s.jsx(nt,{size:12,className:L})]})}),t[22]=L,t[23]=T):T=t[23];let E;t[24]===Symbol.for("react.memo_cache_sentinel")?(E=()=>a(!0),t[24]=E):E=t[24];let B;t[25]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx("button",{type:"button",onClick:E,className:"text-muted-foreground hover:text-foreground transition-colors p-0.5 rounded hover:bg-accent",title:"Create new project",children:s.jsx(qe,{size:16})}),t[25]=B):B=t[25],t[26]!==T?(h=s.jsx(ie,{children:s.jsxs("div",{className:"flex items-center justify-between px-2 h-6",children:[T,B]})}),t[26]=T,t[27]=h):h=t[27],c=Ss,p=M.length===0?s.jsx(ie,{children:s.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:"No projects yet"})}):M.map(or)}t[0]=r,t[1]=l,t[2]=n,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]=g,t[12]=j,t[13]=b,t[14]=v,t[15]=y}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],g=t[11],j=t[12],b=t[13],v=t[14],y=t[15];if(y!==Symbol.for("react.early_return_sentinel"))return y;let C;t[28]!==c||t[29]!==p?(C=s.jsx(c,{children:p}),t[28]=c,t[29]=p,t[30]=C):C=t[30];let S;t[31]!==d||t[32]!==x||t[33]!==h||t[34]!==C?(S=s.jsxs(d,{className:x,children:[h,C]}),t[31]=d,t[32]=x,t[33]=h,t[34]=C,t[35]=S):S=t[35];let _;t[36]!==m||t[37]!==S?(_=s.jsx(m,{children:S}),t[36]=m,t[37]=S,t[38]=_):_=t[38];let O;t[39]!==f||t[40]!==_||t[41]!==g?(O=s.jsx(f,{className:g,children:_}),t[39]=f,t[40]=_,t[41]=g,t[42]=O):O=t[42];let k;t[43]!==u||t[44]!==O||t[45]!==j||t[46]!==b?(k=s.jsx(u,{open:j,onOpenChange:b,children:O}),t[43]=u,t[44]=O,t[45]=j,t[46]=b,t[47]=k):k=t[47];let I;t[48]!==i?(I=s.jsx(wt,{open:i,onOpenChange:a}),t[48]=i,t[49]=I):I=t[49];let $;return t[50]!==k||t[51]!==I||t[52]!==v?($=s.jsxs(s.Fragment,{children:[v,k,I]}),t[50]=k,t[51]=I,t[52]=v,t[53]=$):$=t[53],$}function or(t){return s.jsx(rr,{project:t},t.id)}function ir(t){return t.slug!==ne}function ar(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(w.Suspense,{fallback:s.jsx(Ee,{className:"py-0",children:s.jsx(Le,{children:s.jsx(_e,{className:"gap-0.5",children:s.jsx(ie,{children:s.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[s.jsx(ee,{className:"h-4 w-4 rounded"}),s.jsx(ee,{className:"h-4 flex-1"})]})})})})}),children:s.jsx(lr,{})}),t[0]=e):e=t[0],e}function cr(t){const e=N.c(16),{onCreateProject:n}=t,[r]=Ze(),l=dn(),{locator:o}=Se();let i;e[0]!==o?(i=Oe.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=s.jsx(et.Skeleton,{}),e[2]=c):c=e[2];let d;e[3]!==n?(d=s.jsx(w.Suspense,{fallback:c,children:s.jsx(et,{onCreateProject:n})}),e[3]=n,e[4]=d):d=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Xn,{}),e[5]=m):m=e[5];let f;e[6]!==a||e[7]!==r?(f=a?r.experimental_projects?s.jsx(ar,{}):null:s.jsx(sr,{}),e[6]=a,e[7]=r,e[8]=f):f=e[8];let u;e[9]!==f?(u=s.jsx(St,{children:s.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=s.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 dr(t){const e=N.c(12);let n,r,l,o;e[0]!==t?({className:n,orientation:l,decorative:o,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=l,e[4]=o):(n=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]!==n?(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",n),e[5]=n,e[6]=c):c=e[6];let d;return e[7]!==a||e[8]!==i||e[9]!==r||e[10]!==c?(d=s.jsx(ds,{"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 es=w.createContext(null);function mr(){const t=w.useContext(es);if(!t)throw new Error("TopbarSwitcher compound components must be used within TopbarSwitcher.Root");return t}function fr(t){const e=N.c(10),{children:n,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]!==n?(d=s.jsx(rt,{children:n}),e[5]=n,e[6]=d):d=e[6];let m;return e[7]!==c||e[8]!==d?(m=s.jsx(es.Provider,{value:c,children:d}),e[7]=c,e[8]=d,e[9]=m):m=e[9],m}function ur(t){const e=N.c(6),{children:n,onClick:r}=t;let l;e[0]!==n||e[1]!==r?(l=s.jsx(re,{variant:"link",className:"p-0.5 h-auto",onClick:r,type:"button",children:n}),e[0]=n,e[1]=r,e[2]=l):l=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(lt,{asChild:!0,children:s.jsx(re,{size:"icon",variant:"ghost",className:"w-6 h-6 p-0",children:s.jsx(vt,{size:16,className:"opacity-50"})})}),e[3]=o):o=e[3];let i;return e[4]!==l?(i=s.jsxs("div",{className:"flex items-center gap-1",children:[l,o]}),e[4]=l,e[5]=i):i=e[5],i}function pr(t){const e=N.c(8),{item:n,fallback:r}=t,l=r===void 0?"":r,o=n?.avatarUrl??"",i=n?.name??l;let a;e[0]!==o||e[1]!==i?(a=s.jsx(ke,{url:o,fallback:i,size:"xs",objectFit:"contain"}),e[0]=o,e[1]=i,e[2]=a):a=e[2];const c=n?.name??l;let d;e[3]!==c?(d=s.jsx("span",{children:c}),e[3]=c,e[4]=d):d=e[4];let m;return e[5]!==a||e[6]!==d?(m=s.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 xr(t){const e=N.c(6),{children:n,align:r}=t,l=r===void 0?"start":r,i=w.Children.toArray(n).filter(hr).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]!==n||e[4]!==a?(c=s.jsx(ot,{align:l,className:"p-0 flex items-start",style:a,children:n}),e[2]=l,e[3]=n,e[4]=a,e[5]=c):c=e[5],c}function hr(t){return w.isValidElement(t)&&(t.type===ss||t.type===ts)}function ts(t){const e=N.c(5),{children:n,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]!==n||e[3]!==l?(o=s.jsx("div",{className:l,children:n}),e[2]=n,e[3]=l,e[4]=o):o=e[4],o}const ss=ts;function gr(t){const e=N.c(6),{placeholder:n,value:r,onChange:l}=t,o=n===void 0?"Search...":n;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=s.jsx(qs,{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 jr(t){const e=N.c(6),{children:n,emptyMessage:r}=t,l=r===void 0?"No items found.":r,o=w.Children.count(n)>0;let i;e[0]!==l||e[1]!==o?(i=!o&&s.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]!==n||e[4]!==i?(a=s.jsxs("div",{className:"flex flex-col gap-0.5 p-1 max-h-44 overflow-y-auto",children:[i,n]}),e[3]=n,e[4]=i,e[5]=a):a=e[5],a}function br(t){const e=N.c(15),{item:n,onClick:r,onHover:l,children:o}=t,i=mr();let a;e[0]!==i||e[1]!==n||e[2]!==l?(a=()=>{i.setHoveredItem(n.slug),l?.(n)},e[0]=i,e[1]=n,e[2]=l,e[3]=a):a=e[3];const c=a;let d;e[4]!==n||e[5]!==r?(d=()=>r(n),e[4]=n,e[5]=r,e[6]=d):d=e[6];let m;e[7]!==o||e[8]!==n.avatarUrl||e[9]!==n.name?(m=o||s.jsxs(s.Fragment,{children:[s.jsx(ke,{url:n.avatarUrl??"",fallback:n.name,size:"xs",className:"w-[22px]! h-[22px]!",objectFit:"contain"}),s.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:n.name})]}),e[7]=o,e[8]=n.avatarUrl,e[9]=n.name,e[10]=m):m=e[10];let f;return e[11]!==c||e[12]!==d||e[13]!==m?(f=s.jsx(re,{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 vr(t){const e=N.c(2),{children:n}=t;let r;return e[0]!==n?(r=s.jsx("div",{className:"px-1 pb-1 pt-0.5",children:n}),e[0]=n,e[1]=r):r=e[1],r}function Nr(t){const e=N.c(11),{onClick:n,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&&s.jsx("span",{className:"[&>svg]:size-4",children:r}),e[2]=r,e[3]=d):d=e[3];let m;e[4]!==l?(m=s.jsx("span",{children:l}),e[4]=l,e[5]=m):m=e[5];let f;return e[6]!==n||e[7]!==c||e[8]!==d||e[9]!==m?(f=s.jsxs(re,{variant:"ghost",size:"sm",className:c,onClick:n,children:[d,m]}),e[6]=n,e[7]=c,e[8]=d,e[9]=m,e[10]=f):f=e[10],f}function yr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(dr,{}),t[0]=e):e=t[0],e}function Sr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"h-4 w-16 bg-accent rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const le=Object.assign(fr,{Trigger:ur,CurrentItem:pr,Content:xr,Panel:ss,Search:gr,Items:jr,Item:br,Actions:vr,Action:Nr,Separator:yr,Skeleton:Sr});function tt(){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:n}=st(e),{data:r}=he.useListOrganizations(),l=$e();let o;t[1]!==n||t[2]!==r?(o=r?.find(U=>U.slug===n),t[1]=n,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,g,j,b;if(t[4]!==i||t[5]!==l||t[6]!==n||t[7]!==a||t[8]!==r){const L=(r?(()=>{const F=r.filter(W=>W.name.toLowerCase().includes(a.toLowerCase()));if(n){const W=F.findIndex(K=>K.slug===n);if(W>0){const K=F[W];K&&(F.splice(W,1),F.unshift(K))}}return F})():[]).map(wr);let T;t[17]!==i?(T=i?{slug:i.slug,name:i.name,avatarUrl:i.logo}:void 0,t[17]=i,t[18]=T):T=t[18];const E=T;x=le;let B;t[19]!==l||t[20]!==n?(B=()=>l({to:"/$org",params:{org:n??""}}),t[19]=l,t[20]=n,t[21]=B):B=t[21];let H;t[22]!==E?(H=s.jsx(le.CurrentItem,{item:E}),t[22]=E,t[23]=H):H=t[23],t[24]!==B||t[25]!==H?(b=s.jsx(le.Trigger,{onClick:B,children:H}),t[24]=B,t[25]=H,t[26]=b):b=t[26],p=le.Content,u=le.Panel,t[27]!==a?(j=s.jsx(le.Search,{placeholder:"Search organizations...",value:a,onChange:c}),t[27]=a,t[28]=j):j=t[28],f=le.Items,h="No organizations found.";let R;t[29]!==l?(R=F=>s.jsx(le.Item,{item:F,onClick:W=>l({to:"/$org",params:{org:W.slug}})},F.slug),t[29]=l,t[30]=R):R=t[30],g=L.map(R),t[4]=i,t[5]=l,t[6]=n,t[7]=a,t[8]=r,t[9]=f,t[10]=u,t[11]=p,t[12]=x,t[13]=h,t[14]=g,t[15]=j,t[16]=b}else f=t[9],u=t[10],p=t[11],x=t[12],h=t[13],g=t[14],j=t[15],b=t[16];let v;t[31]!==f||t[32]!==h||t[33]!==g?(v=s.jsx(f,{emptyMessage:h,children:g}),t[31]=f,t[32]=h,t[33]=g,t[34]=v):v=t[34];let y,C;t[35]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(le.Actions,{children:s.jsx(le.Action,{onClick:()=>m(!0),variant:"muted",children:"+ Create organization"})}),C=s.jsx(le.Separator,{}),t[35]=y,t[36]=C):(y=t[35],C=t[36]);let S;t[37]!==l?(S=()=>l({to:"/"}),t[37]=l,t[38]=S):S=t[38];let _;t[39]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Ys,{}),t[39]=_):_=t[39];let O;t[40]!==S?(O=s.jsx(le.Actions,{children:s.jsx(le.Action,{onClick:S,icon:_,children:"See all organizations"})}),t[40]=S,t[41]=O):O=t[41];let k;t[42]!==u||t[43]!==O||t[44]!==j||t[45]!==v?(k=s.jsxs(u,{children:[j,v,y,C,O]}),t[42]=u,t[43]=O,t[44]=j,t[45]=v,t[46]=k):k=t[46];let I;t[47]!==p||t[48]!==k?(I=s.jsx(p,{children:k}),t[47]=p,t[48]=k,t[49]=I):I=t[49];let $;t[50]!==x||t[51]!==I||t[52]!==b?($=s.jsxs(x,{children:[b,I]}),t[50]=x,t[51]=I,t[52]=b,t[53]=$):$=t[53];let M;t[54]!==d?(M=s.jsx($t,{open:d,onOpenChange:m}),t[54]=d,t[55]=M):M=t[55];let A;return t[56]!==$||t[57]!==M?(A=s.jsxs(s.Fragment,{children:[$,M]}),t[56]=$,t[57]=M,t[58]=A):A=t[58],A}function wr(t){return{slug:t.slug,name:t.name,avatarUrl:t.logo}}tt.Skeleton=le.Skeleton;function Cr(){const t=N.c(10),{locator:e}=Se(),n=Js();if(Oe.isOrgAdminProject(e))return null;const l=n?.leftRef;let o;t[0]!==l?(o=s.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=n?.centerRef;let a;t[2]!==i?(a=s.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=n?.rightRef;let d;t[4]!==c?(d=s.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=s.jsx("div",{className:"dark",children:s.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 kr({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,l]=_r({defaultProp:e,onChange:n}),o=t!==void 0,i=o?t:r,a=gt(n),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 _r({defaultProp:t,onChange:e}){const n=w.useState(t),[r]=n,l=w.useRef(r),o=gt(e);return w.useEffect(()=>{l.current!==r&&(o(r),l.current=r)},[r,l,o]),n}function zr(t){const e=N.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=s.jsx(Pe.Root,{"data-slot":"drawer",...n}),e[2]=n,e[3]=r):r=e[3],r}function $r(t){const e=N.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=s.jsx(Pe.Trigger,{"data-slot":"drawer-trigger",...n}),e[2]=n,e[3]=r):r=e[3],r}function Ir(t){const e=N.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=s.jsx(Pe.Portal,{"data-slot":"drawer-portal",...n}),e[2]=n,e[3]=r):r=e[3],r}function Or(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(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",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.jsx(Pe.Overlay,{"data-slot":"drawer-overlay",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Pr(t){const e=N.c(12);let n,r,l;e[0]!==t?({className:r,children:n,...l}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=l):(n=e[1],r=e[2],l=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Or,{}),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=s.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]!==n||e[9]!==l||e[10]!==i?(c=s.jsxs(Ir,{"data-slot":"drawer-portal",children:[o,s.jsxs(Pe.Content,{"data-slot":"drawer-content",className:i,...l,children:[a,n]})]}),e[8]=n,e[9]=l,e[10]=i,e[11]=c):c=e[11],c}function Tr(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("flex flex-col gap-1.5 px-4 py-2",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.jsx("div",{"data-slot":"drawer-header",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Ar(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("text-foreground font-semibold",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.jsx(Pe.Title,{"data-slot":"drawer-title",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}const ns=w.createContext({setOpen:()=>{}}),Mr=()=>w.useContext(ns),Er=t=>{const e=N.c(25);let n,r,l,o,i;e[0]!==t?({children:n,defaultOpen:r,open:o,onOpenChange:l,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=l,e[4]=o,e[5]=i):(n=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]=kr(c);let f;e[10]!==m?(f={setOpen:m},e[10]=m,e[11]=f):f=e[11];let u;e[12]!==n||e[13]!==d||e[14]!==i||e[15]!==m?(u=s.jsx(zr,{open:d,onOpenChange:m,...i,children:n}),e[12]=n,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=s.jsx(tn,{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=s.jsx(ns.Provider,{value:f,children:p}),e[22]=f,e[23]=p,e[24]=x):x=e[24],x},Lr=t=>{const{children:e,title:n,...r}=t,l=De(),{className:o,...i}=r;return l?s.jsxs(Pr,{...i,children:[s.jsx(Tr,{className:"hidden",children:s.jsx(Ar,{children:n})}),s.jsx("div",{className:z("flex flex-col gap-2 p-2 py-4",o),children:e})]}):s.jsx(en,{...r,children:e})},Dr=t=>{const{children:e,...n}=t,{setOpen:r}=Mr(),l=De(),{className:o,...i}=n;return l?s.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}):s.jsx(sn,{...n,children:e})},Rr=t=>{const e=N.c(7);let n,r;e[0]!==t?({children:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);const l=De();let o;return e[3]!==n||e[4]!==l||e[5]!==r?(o=l?s.jsx($r,{asChild:!0,children:n}):s.jsx(Qs,{...r,children:n}),e[3]=n,e[4]=l,e[5]=r,e[6]=o):o=e[6],o},Hr=t=>{const e=N.c(7);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);const l=De();let o;return e[3]!==n||e[4]!==l||e[5]!==r?(o=l?s.jsx(ft,{className:z(n),...r}):s.jsx(ft,{className:z(n),...r}),e[3]=n,e[4]=l,e[5]=r,e[6]=o):o=e[6],o};function Ur(t){const e=N.c(11),{user:n,trigger:r,align:l,children:o}=t,i=l===void 0?"start":l;let a;e[0]!==r||e[1]!==n?(a=r(n),e[0]=r,e[1]=n,e[2]=a):a=e[2];let c;e[3]!==a?(c=s.jsx(Rr,{asChild:!0,children:s.jsx("div",{children:a})}),e[3]=a,e[4]=c):c=e[4];let d;e[5]!==i||e[6]!==o?(d=s.jsx(Lr,{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=s.jsxs(Er,{children:[c,d]}),e[8]=c,e[9]=d,e[10]=m):m=e[10],m}function Br(t){const e=N.c(8),{children:n,onClick:r,className:l,asChild:o}=t;let i;e[0]!==o||e[1]!==n||e[2]!==r?(i=o?n:s.jsx("button",{type:"button",className:"flex items-center gap-2 text-sm w-full cursor-pointer",onClick:r,children:n}),e[0]=o,e[1]=n,e[2]=r,e[3]=i):i=e[3];let a;return e[4]!==o||e[5]!==l||e[6]!==i?(a=s.jsx(Dr,{asChild:o,className:l,children:i}),e[4]=o,e[5]=l,e[6]=i,e[7]=a):a=e[7],a}function Fr(t){const e=N.c(2),{className:n}=t;let r;return e[0]!==n?(r=s.jsx(Hr,{className:n}),e[0]=n,e[1]=r):r=e[1],r}function Wr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const Ce=Object.assign(Ur,{Item:Br,Separator:Fr,Skeleton:Wr});function Vr(t){const e=N.c(49),{user:n,userImage:r}=t,[l,o]=w.useState(!1),[i,a]=w.useState(!1);let c;e[0]!==n.email||e[1]!==n.id||e[2]!==n.name?(c=()=>{const B=`ID: ${n.id}
4
4
  Name: ${n.name||"N/A"}
5
- Email: ${n.email}`;navigator.clipboard.writeText(B),a(!0),ye.success("User info copied to clipboard"),setTimeout(()=>a(!1),2e3)},e[0]=n.email,e[1]=n.id,e[2]=n.name,e[3]=c):c=e[3];const d=c;let m;e[4]!==n.email||e[5]!==n.name||e[6]!==r?(m=()=>s.jsx(ke,{url:r,fallback:n.name||n.email||"U",shape:"circle",size:"sm",className:"cursor-pointer hover:ring-2 ring-muted-foreground transition-all h-7 w-7"}),e[4]=n.email,e[5]=n.name,e[6]=r,e[7]=m):m=e[7];const f=n.name||n.email||"U";let u;e[8]!==f||e[9]!==r?(u=s.jsx(ke,{url:r,fallback:f,shape:"circle",size:"sm"}),e[8]=f,e[9]=r,e[10]=u):u=e[10];const p=n.name||"User";let x;e[11]!==p?(x=s.jsx("div",{className:"text-sm font-medium truncate",children:p}),e[11]=p,e[12]=x):x=e[12];let h;e[13]!==n.email?(h=s.jsx("div",{className:"text-xs text-muted-foreground truncate",children:n.email}),e[13]=n.email,e[14]=h):h=e[14];let g;e[15]!==x||e[16]!==h?(g=s.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[x,h]}),e[15]=x,e[16]=h,e[17]=g):g=e[17];let j;e[18]!==i?(j=s.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:i?s.jsx(Me,{size:16,className:"text-green-600"}):s.jsx(It,{size:16,className:"text-muted-foreground"})}),e[18]=i,e[19]=j):j=e[19];let b;e[20]!==u||e[21]!==g||e[22]!==j?(b=s.jsxs("div",{className:"group flex items-center gap-3 w-full py-1",children:[u,g,j]}),e[20]=u,e[21]=g,e[22]=j,e[23]=b):b=e[23];let v;e[24]!==d||e[25]!==b?(v=s.jsx(Ce.Item,{onClick:d,children:b}),e[24]=d,e[25]=b,e[26]=v):v=e[26];let y;e[27]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(Ce.Separator,{}),e[27]=y):y=e[27];let C,S;e[28]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsxs(Ce.Item,{onClick:()=>o(!0),children:[s.jsx(rn,{className:"text-muted-foreground",size:18}),"Profile Settings"]}),S=s.jsx(Ce.Separator,{}),e[28]=C,e[29]=S):(C=e[28],S=e[29]);let _;e[30]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(ht,{className:"w-4 h-4 text-muted-foreground"}),e[30]=_):_=e[30];let O;e[31]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(Ce.Item,{asChild:!0,children:s.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",s.jsx(ut,{size:18,className:"text-muted-foreground ml-auto"})]})}),e[31]=O):O=e[31];let k;e[32]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(nn,{className:"text-muted-foreground",size:18}),e[32]=k):k=e[32];let I,$;e[33]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(Ce.Item,{asChild:!0,children:s.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",s.jsx(ut,{size:18,className:"ml-auto text-muted-foreground"})]})}),$=s.jsx(Ce.Separator,{}),e[33]=I,e[34]=$):(I=e[33],$=e[34]);let M,A,U;e[35]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsxs(Ce.Item,{onClick:Gr,children:[s.jsx(Ft,{size:18,className:"text-muted-foreground"}),"Log out"]}),A=s.jsx(Ce.Separator,{}),U=s.jsxs("div",{className:"px-2 py-1.5 text-[11px] text-muted-foreground/75",children:["v","2.109.1"]}),e[35]=M,e[36]=A,e[37]=U):(M=e[35],A=e[36],U=e[37]);let L;e[38]!==v||e[39]!==m||e[40]!==n?(L=s.jsxs(Ce,{user:n,trigger:m,align:"end",children:[v,y,C,S,O,I,$,M,A,U]}),e[38]=v,e[39]=m,e[40]=n,e[41]=L):L=e[41];let T;e[42]!==l||e[43]!==n||e[44]!==r?(T=l&&s.jsx(Jt,{open:l,onOpenChange:o,user:n,userImage:r}),e[42]=l,e[43]=n,e[44]=r,e[45]=T):T=e[45];let E;return e[46]!==L||e[47]!==T?(E=s.jsxs(s.Fragment,{children:[L,T]}),e[46]=L,e[47]=T,e[48]=E):E=e[48],E}function Gr(){return he.signOut()}function Kr(){const t=N.c(7),{data:e}=he.useSession();if(!e?.user){let c;return t[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(ke,{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 n=e.user,r=n.name??void 0;let l;t[1]!==r||t[2]!==n?(l={...n,name:r},t[1]=r,t[2]=n,t[3]=l):l=t[3];const o=l,i=n.image;let a;return t[4]!==i||t[5]!==o?(a=s.jsx(Vr,{user:o,userImage:i}),t[4]=i,t[5]=o,t[6]=a):a=t[6],a}function Zr(){const t=N.c(2),n=Ge().location.href;let r;return t[0]!==n?(r=s.jsx(ps,{to:"/login",search:{next:n},replace:!0}),t[0]=n,t[1]=r):r=t[1],r}function qr(t){const e=N.c(6),{children:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(ms,{children:s.jsx(jt,{})}),e[0]=r):r=e[0];let l;e[1]!==n?(l=s.jsx(fs,{children:n}),e[1]=n,e[2]=l):l=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(us,{children:s.jsx(Zr,{})}),e[3]=o):o=e[3];let i;return e[4]!==l?(i=s.jsxs(s.Fragment,{children:[r,l,o]}),e[4]=l,e[5]=i):i=e[5],i}function Yr(t){const e=N.c(5),{children:n,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]!==n||e[3]!==l?(o=s.jsx("div",{className:l,children:n}),e[2]=n,e[3]=l,e[4]=o):o=e[4],o}function Jr(t){const e=N.c(5),{children:n,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]!==n||e[3]!==l?(o=s.jsx("div",{className:l,children:n}),e[2]=n,e[3]=l,e[4]=o):o=e[4],o}function Xr(t){const e=N.c(5),{children:n,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]!==n||e[3]!==l?(o=s.jsx("div",{className:l,children:n}),e[2]=n,e[3]=l,e[4]=o):o=e[4],o}function Qr(t){const e=N.c(5),{children:n,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]!==n||e[3]!==l?(o=s.jsx("div",{className:l,children:n}),e[2]=n,e[3]=l,e[4]=o):o=e[4],o}function el(t){const e=N.c(5),{children:n,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]!==n||e[3]!==l?(o=s.jsx("div",{className:l,children:n}),e[2]=n,e[3]=l,e[4]=o):o=e[4],o}function tl(){const t=N.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex items-center justify-center px-2 h-full border-r border-border",children:s.jsx("div",{className:"w-8 h-8 bg-muted rounded-md animate-pulse"})}),t[0]=e):e=t[0];let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex items-center gap-2 px-2 h-full",children:s.jsx("div",{className:"w-32 h-6 bg-muted rounded-md animate-pulse"})}),t[1]=n):n=t[1];let r;return t[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.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,n,s.jsx("div",{className:"flex items-center gap-2 px-2 h-full ml-auto",children:s.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"})})]}),t[2]=r):r=t[2],r}const Ue=Object.assign(Yr,{Sidebar:Jr,Left:Xr,Center:Qr,Right:el,Skeleton:tl});function rs(){const t=N.c(3),{toggleSidebar:e}=Ye();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Bt,{className:"text-muted-foreground/85 group-hover:text-foreground transition-colors",size:18}),t[0]=n):n=t[0];let r;return t[1]!==e?(r=s.jsx(s.Fragment,{children:s.jsx(re,{onClick:e,size:"icon",variant:"ghost",className:"w-7 h-7 rounded-md",children:n})}),t[1]=e,t[2]=r):r=t[2],r}rs.Skeleton=function(){return s.jsx("div",{className:"w-7 h-7 bg-muted rounded-md animate-pulse"})};function sl({showSidebarToggle:t=!1,showOrgSwitcher:e=!1,showDecoChat:n=!1,disableDecoChat:r=!1}){const[l,o]=Ke(),i=w.useRef(r);r&&l&&i.current!==r&&o(!1),i.current=r;const a=()=>{r||o(c=>!c)};return s.jsxs(Ue,{children:[t&&s.jsx(Ue.Sidebar,{children:s.jsx(rs,{})}),s.jsx(Ue.Left,{children:e&&s.jsx(w.Suspense,{fallback:s.jsx(tt.Skeleton,{}),children:s.jsx(tt,{})})}),s.jsxs(Ue.Right,{className:"gap-2",children:[n&&!r&&s.jsxs(re,{size:"sm",variant:"default",onClick:a,className:"h-7 gap-2",children:[s.jsx(Nt,{size:16}),"Chat"]}),s.jsx(Kr,{})]})]})}function nl(t){const e=N.c(10),{children:n,className:r}=t,[,l]=w.useTransition();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=Tt.decoChatPanelWidth(),e[0]=o):o=e[0];const[i,a]=Pt(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]!==n||e[7]!==d||e[8]!==m?(f=s.jsx(At,{defaultSize:i,minSize:20,className:m,onResize:d,children:n}),e[5]=i,e[6]=n,e[7]=d,e[8]=m,e[9]=f):f=e[9],f}function rl(t){const e=N.c(5),{children:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=Tt.sidebarOpen(),e[0]=r):r=e[0];const[l,o]=Pt(r,!0);let i;return e[1]!==n||e[2]!==o||e[3]!==l?(i=s.jsx(gn,{open:l,onOpenChange:o,children:n}),e[1]=n,e[2]=o,e[3]=l,e[4]=i):i=e[4],i}function ll(t){const e=N.c(6),{disableChat:n}=t,r=n===void 0?!1:n,[l]=Ke();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(At,{className:"bg-background",children:s.jsx(bt,{})}),e[0]=o):o=e[0];let i;e[1]!==l||e[2]!==r?(i=!r&&s.jsxs(s.Fragment,{children:[s.jsx(ln,{withHandle:l}),s.jsx(nl,{className:z(l?"max-w-none":"max-w-0"),children:s.jsx(cn,{})})]}),e[1]=l,e[2]=r,e[3]=i):i=e[3];let a;return e[4]!==i?(a=s.jsxs(on,{direction:"horizontal",children:[o,i]}),e[4]=i,e[5]=a):a=e[5],a}function ol(){const{org:t,project:e}=st({strict:!1}),n=Ge(),[r,l]=w.useState(!1),o=n.location.pathname===`/${t}/${e}`||n.location.pathname===`/${t}/${e}/`,i=e??ne,{data:a}=xs({queryKey:hs.activeOrganization(t),queryFn:async()=>{if(!t)return null;const{data:d}=await he.organization.setActive({organizationSlug:t});return{org:d,project:{slug:i,isOrgAdmin:i===ne}}},gcTime:1/0,staleTime:1/0,refetchOnWindowFocus:!1,refetchOnMount:!1});if(!a)return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(sl,{}),s.jsx("div",{className:"pt-12",children:s.jsx(bt,{})})]});if(!a.org)return window.location.pathname!=="/"&&(window.location.href="/"),null;const c={...a,project:{...a.project,slug:i,isOrgAdmin:i===ne}};return s.jsxs(gs,{...c,children:[s.jsx(rl,{children:s.jsxs("div",{className:"flex flex-col h-screen",style:{"--project-topbar-height":i===ne?"0px":"48px"},children:[s.jsx("style",{children:`
5
+ Email: ${n.email}`;navigator.clipboard.writeText(B),a(!0),ye.success("User info copied to clipboard"),setTimeout(()=>a(!1),2e3)},e[0]=n.email,e[1]=n.id,e[2]=n.name,e[3]=c):c=e[3];const d=c;let m;e[4]!==n.email||e[5]!==n.name||e[6]!==r?(m=()=>s.jsx(ke,{url:r,fallback:n.name||n.email||"U",shape:"circle",size:"sm",className:"cursor-pointer hover:ring-2 ring-muted-foreground transition-all h-7 w-7"}),e[4]=n.email,e[5]=n.name,e[6]=r,e[7]=m):m=e[7];const f=n.name||n.email||"U";let u;e[8]!==f||e[9]!==r?(u=s.jsx(ke,{url:r,fallback:f,shape:"circle",size:"sm"}),e[8]=f,e[9]=r,e[10]=u):u=e[10];const p=n.name||"User";let x;e[11]!==p?(x=s.jsx("div",{className:"text-sm font-medium truncate",children:p}),e[11]=p,e[12]=x):x=e[12];let h;e[13]!==n.email?(h=s.jsx("div",{className:"text-xs text-muted-foreground truncate",children:n.email}),e[13]=n.email,e[14]=h):h=e[14];let g;e[15]!==x||e[16]!==h?(g=s.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[x,h]}),e[15]=x,e[16]=h,e[17]=g):g=e[17];let j;e[18]!==i?(j=s.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:i?s.jsx(Me,{size:16,className:"text-green-600"}):s.jsx(It,{size:16,className:"text-muted-foreground"})}),e[18]=i,e[19]=j):j=e[19];let b;e[20]!==u||e[21]!==g||e[22]!==j?(b=s.jsxs("div",{className:"group flex items-center gap-3 w-full py-1",children:[u,g,j]}),e[20]=u,e[21]=g,e[22]=j,e[23]=b):b=e[23];let v;e[24]!==d||e[25]!==b?(v=s.jsx(Ce.Item,{onClick:d,children:b}),e[24]=d,e[25]=b,e[26]=v):v=e[26];let y;e[27]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(Ce.Separator,{}),e[27]=y):y=e[27];let C,S;e[28]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsxs(Ce.Item,{onClick:()=>o(!0),children:[s.jsx(rn,{className:"text-muted-foreground",size:18}),"Profile Settings"]}),S=s.jsx(Ce.Separator,{}),e[28]=C,e[29]=S):(C=e[28],S=e[29]);let _;e[30]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(ht,{className:"w-4 h-4 text-muted-foreground"}),e[30]=_):_=e[30];let O;e[31]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(Ce.Item,{asChild:!0,children:s.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",s.jsx(ut,{size:18,className:"text-muted-foreground ml-auto"})]})}),e[31]=O):O=e[31];let k;e[32]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(nn,{className:"text-muted-foreground",size:18}),e[32]=k):k=e[32];let I,$;e[33]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(Ce.Item,{asChild:!0,children:s.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",s.jsx(ut,{size:18,className:"ml-auto text-muted-foreground"})]})}),$=s.jsx(Ce.Separator,{}),e[33]=I,e[34]=$):(I=e[33],$=e[34]);let M,A,U;e[35]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsxs(Ce.Item,{onClick:Kr,children:[s.jsx(Ft,{size:18,className:"text-muted-foreground"}),"Log out"]}),A=s.jsx(Ce.Separator,{}),U=s.jsxs("div",{className:"px-2 py-1.5 text-[11px] text-muted-foreground/75",children:["v","2.110.0"]}),e[35]=M,e[36]=A,e[37]=U):(M=e[35],A=e[36],U=e[37]);let L;e[38]!==v||e[39]!==m||e[40]!==n?(L=s.jsxs(Ce,{user:n,trigger:m,align:"end",children:[v,y,C,S,O,I,$,M,A,U]}),e[38]=v,e[39]=m,e[40]=n,e[41]=L):L=e[41];let T;e[42]!==l||e[43]!==n||e[44]!==r?(T=l&&s.jsx(Jt,{open:l,onOpenChange:o,user:n,userImage:r}),e[42]=l,e[43]=n,e[44]=r,e[45]=T):T=e[45];let E;return e[46]!==L||e[47]!==T?(E=s.jsxs(s.Fragment,{children:[L,T]}),e[46]=L,e[47]=T,e[48]=E):E=e[48],E}function Kr(){return he.signOut()}function Gr(){const t=N.c(7),{data:e}=he.useSession();if(!e?.user){let c;return t[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(ke,{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 n=e.user,r=n.name??void 0;let l;t[1]!==r||t[2]!==n?(l={...n,name:r},t[1]=r,t[2]=n,t[3]=l):l=t[3];const o=l,i=n.image;let a;return t[4]!==i||t[5]!==o?(a=s.jsx(Vr,{user:o,userImage:i}),t[4]=i,t[5]=o,t[6]=a):a=t[6],a}function Zr(){const t=N.c(2),n=Ke().location.href;let r;return t[0]!==n?(r=s.jsx(ps,{to:"/login",search:{next:n},replace:!0}),t[0]=n,t[1]=r):r=t[1],r}function qr(t){const e=N.c(6),{children:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(ms,{children:s.jsx(jt,{})}),e[0]=r):r=e[0];let l;e[1]!==n?(l=s.jsx(fs,{children:n}),e[1]=n,e[2]=l):l=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(us,{children:s.jsx(Zr,{})}),e[3]=o):o=e[3];let i;return e[4]!==l?(i=s.jsxs(s.Fragment,{children:[r,l,o]}),e[4]=l,e[5]=i):i=e[5],i}function Yr(t){const e=N.c(5),{children:n,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]!==n||e[3]!==l?(o=s.jsx("div",{className:l,children:n}),e[2]=n,e[3]=l,e[4]=o):o=e[4],o}function Jr(t){const e=N.c(5),{children:n,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]!==n||e[3]!==l?(o=s.jsx("div",{className:l,children:n}),e[2]=n,e[3]=l,e[4]=o):o=e[4],o}function Xr(t){const e=N.c(5),{children:n,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]!==n||e[3]!==l?(o=s.jsx("div",{className:l,children:n}),e[2]=n,e[3]=l,e[4]=o):o=e[4],o}function Qr(t){const e=N.c(5),{children:n,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]!==n||e[3]!==l?(o=s.jsx("div",{className:l,children:n}),e[2]=n,e[3]=l,e[4]=o):o=e[4],o}function el(t){const e=N.c(5),{children:n,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]!==n||e[3]!==l?(o=s.jsx("div",{className:l,children:n}),e[2]=n,e[3]=l,e[4]=o):o=e[4],o}function tl(){const t=N.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex items-center justify-center px-2 h-full border-r border-border",children:s.jsx("div",{className:"w-8 h-8 bg-muted rounded-md animate-pulse"})}),t[0]=e):e=t[0];let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex items-center gap-2 px-2 h-full",children:s.jsx("div",{className:"w-32 h-6 bg-muted rounded-md animate-pulse"})}),t[1]=n):n=t[1];let r;return t[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.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,n,s.jsx("div",{className:"flex items-center gap-2 px-2 h-full ml-auto",children:s.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"})})]}),t[2]=r):r=t[2],r}const Ue=Object.assign(Yr,{Sidebar:Jr,Left:Xr,Center:Qr,Right:el,Skeleton:tl});function rs(){const t=N.c(3),{toggleSidebar:e}=Ye();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Bt,{className:"text-muted-foreground/85 group-hover:text-foreground transition-colors",size:18}),t[0]=n):n=t[0];let r;return t[1]!==e?(r=s.jsx(s.Fragment,{children:s.jsx(re,{onClick:e,size:"icon",variant:"ghost",className:"w-7 h-7 rounded-md",children:n})}),t[1]=e,t[2]=r):r=t[2],r}rs.Skeleton=function(){return s.jsx("div",{className:"w-7 h-7 bg-muted rounded-md animate-pulse"})};function sl({showSidebarToggle:t=!1,showOrgSwitcher:e=!1,showDecoChat:n=!1,disableDecoChat:r=!1}){const[l,o]=Ge(),i=w.useRef(r);r&&l&&i.current!==r&&o(!1),i.current=r;const a=()=>{r||o(c=>!c)};return s.jsxs(Ue,{children:[t&&s.jsx(Ue.Sidebar,{children:s.jsx(rs,{})}),s.jsx(Ue.Left,{children:e&&s.jsx(w.Suspense,{fallback:s.jsx(tt.Skeleton,{}),children:s.jsx(tt,{})})}),s.jsxs(Ue.Right,{className:"gap-2",children:[n&&!r&&s.jsxs(re,{size:"sm",variant:"default",onClick:a,className:"h-7 gap-2",children:[s.jsx(Nt,{size:16}),"Chat"]}),s.jsx(Gr,{})]})]})}function nl(t){const e=N.c(10),{children:n,className:r}=t,[,l]=w.useTransition();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=Tt.decoChatPanelWidth(),e[0]=o):o=e[0];const[i,a]=Pt(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]!==n||e[7]!==d||e[8]!==m?(f=s.jsx(At,{defaultSize:i,minSize:20,className:m,onResize:d,children:n}),e[5]=i,e[6]=n,e[7]=d,e[8]=m,e[9]=f):f=e[9],f}function rl(t){const e=N.c(5),{children:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=Tt.sidebarOpen(),e[0]=r):r=e[0];const[l,o]=Pt(r,!0);let i;return e[1]!==n||e[2]!==o||e[3]!==l?(i=s.jsx(gn,{open:l,onOpenChange:o,children:n}),e[1]=n,e[2]=o,e[3]=l,e[4]=i):i=e[4],i}function ll(t){const e=N.c(6),{disableChat:n}=t,r=n===void 0?!1:n,[l]=Ge();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(At,{className:"bg-background",children:s.jsx(bt,{})}),e[0]=o):o=e[0];let i;e[1]!==l||e[2]!==r?(i=!r&&s.jsxs(s.Fragment,{children:[s.jsx(ln,{withHandle:l}),s.jsx(nl,{className:z(l?"max-w-none":"max-w-0"),children:s.jsx(cn,{})})]}),e[1]=l,e[2]=r,e[3]=i):i=e[3];let a;return e[4]!==i?(a=s.jsxs(on,{direction:"horizontal",children:[o,i]}),e[4]=i,e[5]=a):a=e[5],a}function ol(){const{org:t,project:e}=st({strict:!1}),n=Ke(),[r,l]=w.useState(!1),o=n.location.pathname===`/${t}/${e}`||n.location.pathname===`/${t}/${e}/`,i=e??ne,{data:a}=xs({queryKey:hs.activeOrganization(t),queryFn:async()=>{if(!t)return null;const{data:d}=await he.organization.setActive({organizationSlug:t});return{org:d,project:{slug:i,isOrgAdmin:i===ne}}},gcTime:1/0,staleTime:1/0,refetchOnWindowFocus:!1,refetchOnMount:!1});if(!a)return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(sl,{}),s.jsx("div",{className:"pt-12",children:s.jsx(bt,{})})]});if(!a.org)return window.location.pathname!=="/"&&(window.location.href="/"),null;const c={...a,project:{...a.project,slug:i,isOrgAdmin:i===ne}};return s.jsxs(gs,{...c,children:[s.jsx(rl,{children:s.jsxs("div",{className:"flex flex-col h-screen",style:{"--project-topbar-height":i===ne?"0px":"48px"},children:[s.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-CuIrPKu9.js";import{c as m}from"./button-KbFW4XuN.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-DXIsw0zh.js";import{c as m}from"./button-B1_AjrAy.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};