@decocms/mesh 2.83.0 → 2.85.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.
- package/dist/client/assets/{AlertCircle-BPyXObkI.js → AlertCircle-Dv-pGVbe.js} +1 -1
- package/dist/client/assets/ArrowLeft-DmjHPtds.js +1 -0
- package/dist/client/assets/{ArrowUp-FCHp4iCN.js → ArrowUp-CNNhUiSK.js} +1 -1
- package/dist/client/assets/{Calendar-BfLwT3NA.js → Calendar-DvFZbDSm.js} +1 -1
- package/dist/client/assets/{Check-Cs75lN5s.js → Check-D0-doi3D.js} +1 -1
- package/dist/client/assets/{CheckCircle-DBlwf1j4.js → CheckCircle-B7BcMa43.js} +1 -1
- package/dist/client/assets/{CheckDone01-S0a0qNbM.js → CheckDone01-BFFxKfwE.js} +1 -1
- package/dist/client/assets/{ChevronDown-GKAjmf9-.js → ChevronDown-DhDohZgY.js} +1 -1
- package/dist/client/assets/{ChevronRight-C2P7kbsg.js → ChevronRight-YlJxRSER.js} +1 -1
- package/dist/client/assets/{Code01-BHLC4p1n.js → Code01-BALFVt_U.js} +1 -1
- package/dist/client/assets/{Copy01-DoMQtYG8.js → Copy01-CdI1uSIx.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-CRij3zkT.js → DotsHorizontal-BBNdFqaM.js} +1 -1
- package/dist/client/assets/{DotsVertical-k50WldC_.js → DotsVertical-eKFCZgNz.js} +1 -1
- package/dist/client/assets/{Download01-OETwYsH7.js → Download01-ByYU943d.js} +1 -1
- package/dist/client/assets/{Edit01-DLdvPhN6.js → Edit01-BLqaLVsN.js} +1 -1
- package/dist/client/assets/{File02-CMC92Y7p.js → File02-ChsZyHSt.js} +1 -1
- package/dist/client/assets/{File06-Cw5Qokj9.js → File06-ZuO2Pzkt.js} +1 -1
- package/dist/client/assets/{FilterLines-DYaNswU3.js → FilterLines-kdqwOMYU.js} +1 -1
- package/dist/client/assets/{Globe02-DvDX7kIY.js → Globe02-R_O247ek.js} +1 -1
- package/dist/client/assets/{Grid01-CRxXEj4c.js → Grid01-Hl_fTaOZ.js} +1 -1
- package/dist/client/assets/{Home02-Bl5V3Eer.js → Home02-DCuV9I0Z.js} +1 -1
- package/dist/client/assets/{Image01-Da5y1xnZ.js → Image01-UevfVWVa.js} +1 -1
- package/dist/client/assets/{Inbox01-5raqmbyC.js → Inbox01-DkILVHwB.js} +1 -1
- package/dist/client/assets/{InfoCircle-_vaPWgPM.js → InfoCircle-OFmSmQRy.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Djvm54UL.js → LinkExternal01-CzCmb0H9.js} +1 -1
- package/dist/client/assets/{List-6rUZwe-S.js → List-CziLidfU.js} +1 -1
- package/dist/client/assets/{Loading01-MMZDbbza.js → Loading01-Bnk-9-nZ.js} +1 -1
- package/dist/client/assets/{Lock01-CkQyx7Eh.js → Lock01-D1Ke74xN.js} +1 -1
- package/dist/client/assets/{Pin01-DZ098jO8.js → Pin01-BY5CK8qS.js} +1 -1
- package/dist/client/assets/{Play-DT7fXdjA.js → Play-D6Lfsz7v.js} +1 -1
- package/dist/client/assets/{Plus-D4aZ3IMW.js → Plus-BsvHyKJ8.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-Cim3w8V-.js → RefreshCcw01-BjGY5EQM.js} +1 -1
- package/dist/client/assets/{SearchMd-C_tQMyyy.js → SearchMd-B2tl0hgr.js} +1 -1
- package/dist/client/assets/{Settings01-DHLzOrWD.js → Settings01-DFEntEgk.js} +1 -1
- package/dist/client/assets/{Settings02-rhcgMUZ4.js → Settings02-BKH7FnCM.js} +1 -1
- package/dist/client/assets/{Share07-Dy4fHf5t.js → Share07-BoaRx3Mk.js} +1 -1
- package/dist/client/assets/{Terminal-n9aj2R3o.js → Terminal-DAZzR_ZP.js} +1 -1
- package/dist/client/assets/{Tool01-Cl-4zuR9.js → Tool01-CwDTk-Rs.js} +1 -1
- package/dist/client/assets/{Trash01-Elt9HT4h.js → Trash01-DCp8kuDe.js} +1 -1
- package/dist/client/assets/{Upload01-DIbRC7XB.js → Upload01-u4nRmrqT.js} +1 -1
- package/dist/client/assets/{Users03-B-mM8HW1.js → Users03-B2zsfnpN.js} +1 -1
- package/dist/client/assets/{X-CmvZcFQB.js → X-CERPEbZp.js} +1 -1
- package/dist/client/assets/{XClose-BMnTDdZw.js → XClose-Vbmhp4-x.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-DmJOmFA4.js → agent-connections-preview-C8us1TXi.js} +1 -1
- package/dist/client/assets/agent-detail-DPvjIJq8.js +1 -0
- package/dist/client/assets/{agents-CEo_DHBF.js → agents-B_Mc2Y0p.js} +1 -1
- package/dist/client/assets/{alert-dialog-CMNJi4cu.js → alert-dialog-DZUHuYRj.js} +1 -1
- package/dist/client/assets/{auth-catchall-CDUahCHd.js → auth-catchall-WiUbh3Vy.js} +1 -1
- package/dist/client/assets/{avatar-BYpFPLC-.js → avatar-BlXkFPmj.js} +1 -1
- package/dist/client/assets/{badge-DtKpOapD.js → badge-DspY47ru.js} +1 -1
- package/dist/client/assets/{binder-CdlFZNUo.js → binder-Dm6uKx_q.js} +1 -1
- package/dist/client/assets/{breadcrumb-CsszkVDc.js → breadcrumb-Ds3Lal_V.js} +1 -1
- package/dist/client/assets/{button-D4ybDyA6.js → button-DyxB0Yk5.js} +1 -1
- package/dist/client/assets/{card--mmH1q_H.js → card-Czo4WORA.js} +1 -1
- package/dist/client/assets/{checkbox-MWE-auvg.js → checkbox-BJHuci-0.js} +1 -1
- package/dist/client/assets/{circle-alert-DCnEsE2A.js → circle-alert-CFYGWMlI.js} +1 -1
- package/dist/client/assets/{collection-detail-B4WDsous.js → collection-detail-CtGRRRDt.js} +3 -3
- package/dist/client/assets/{collection-search-Bii84F4z.js → collection-search-B1sfCtHP.js} +1 -1
- package/dist/client/assets/{collection-tab-CXAG_Gd5.js → collection-tab-C0EGq1kq.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-wQINF_n7.js → collection-table-wrapper-CWAiVtOh.js} +1 -1
- package/dist/client/assets/{collection-tabs-BdmTBaKU.js → collection-tabs-BBncsSV1.js} +1 -1
- package/dist/client/assets/{command-D1IlC38C.js → command-DwjGvSxM.js} +1 -1
- package/dist/client/assets/{connect-9NWYegXr.js → connect-79qxws_p.js} +1 -1
- package/dist/client/assets/{connection-card-D4UIkmBy.js → connection-card-BNG8RiKR.js} +1 -1
- package/dist/client/assets/connection-detail-DpJ2obA4.js +1 -0
- package/dist/client/assets/{connections-D9gdP5WF.js → connections-BOIKCGcJ.js} +1 -1
- package/dist/client/assets/constants-Bo5G03e3.js +1 -0
- package/dist/client/assets/{constants-DaNibXfC.js → constants-DeSBGDil.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-6BWQsUK3.js → create-organization-dialog-DTTLW3st.js} +1 -1
- package/dist/client/assets/{create-project-dialog-DXg7_zQn.js → create-project-dialog-b2rgBy6I.js} +1 -1
- package/dist/client/assets/{dialog-CMGr7rql.js → dialog-RkqsUuro.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BuIL6Z9M.js → dropdown-menu-DJfLCcXj.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-Cayql-Em.js → dynamic-plugin-layout-C-BX9dZD.js} +1 -1
- package/dist/client/assets/{empty-state-DRvUMAVC.js → empty-state-B1qLg3Wj.js} +1 -1
- package/dist/client/assets/{empty-state-DTrg-Ql5.js → empty-state-C70KsS8J.js} +1 -1
- package/dist/client/assets/{env-vars-editor-B8Mya4cT.js → env-vars-editor-hgEfXkCQ.js} +1 -1
- package/dist/client/assets/{error-boundary-BtZ5XzHQ.js → error-boundary-BWYaX2Wu.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BF529_V9.js → extract-connection-data-CYX0n8Dz.js} +1 -1
- package/dist/client/assets/{file-browser-w9s7soVF.js → file-browser-luwLtvt1.js} +2 -2
- package/dist/client/assets/{form-DMknnobv.js → form-CPHFoWqg.js} +1 -1
- package/dist/client/assets/{grid-view-CKIDwWZj.js → grid-view-BYwAtmMs.js} +1 -1
- package/dist/client/assets/{home-9ScChuE7.js → home-6BSXWwE-.js} +1 -1
- package/dist/client/assets/{index-6RZw3yFj.js → index-BleD0AWt.js} +1 -1
- package/dist/client/assets/{index-DybN8qgx.js → index-Cj2ccTyE.js} +1 -1
- package/dist/client/assets/{index-DWuFhHja.js → index-CkIIowTe.js} +1 -1
- package/dist/client/assets/{index-CWCxcUgh.js → index-Cu9TDLt5.js} +1 -1
- package/dist/client/assets/{index-jpYHaPrB.js → index-DIarRfAA.js} +1 -1
- package/dist/client/assets/index-DjoTHPX-.js +25 -0
- package/dist/client/assets/{index-BxdkA_ZL.js → index-DyoRyDg0.js} +2 -2
- package/dist/client/assets/index-NuPnrQEp.js +1 -0
- package/dist/client/assets/{index-B3PXgRu6.js → index-ZW5LgkfR.js} +95 -95
- package/dist/client/assets/index-tYpHqvxs.css +1 -0
- package/dist/client/assets/{infiniteQueryObserver-DxBV1LPI.js → infiniteQueryObserver-4tHvFsCT.js} +1 -1
- package/dist/client/assets/{input-z2jpeFYP.js → input-BGIEfDaw.js} +1 -1
- package/dist/client/assets/{integration-icon-jeb5kYQL.js → integration-icon-BRZY1p3G.js} +1 -1
- package/dist/client/assets/{label-DXPngrTd.js → label-nYOkPUBD.js} +1 -1
- package/dist/client/assets/{layout-xAlXRb2v.js → layout-CiQVyOtU.js} +1 -1
- package/dist/client/assets/{localstorage-keys-9xhTORbm.js → localstorage-keys-BVi4c9Wu.js} +1 -1
- package/dist/client/assets/{login-P0jcEajh.js → login-ZhUdP3Du.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CRtwYY4d.js → mcp-oauth-D5ZIKdBG.js} +1 -1
- package/dist/client/assets/{mcp-server-card-BPMJKBms.js → mcp-server-card-BluZeoJV.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-D9Br32wD.js → mcp-server-detail-DA38ZVYK.js} +2 -2
- package/dist/client/assets/members-CcwWOeY4.js +3 -0
- package/dist/client/assets/{monaco-editor-DObrcQRA.js → monaco-editor-D8XjYu_I.js} +1 -1
- package/dist/client/assets/{monitoring-DuyI1XGQ.js → monitoring-CDhjTLeQ.js} +1 -1
- package/dist/client/assets/{oauth-callback-CmUOx9kN.js → oauth-callback-BeReH52R.js} +1 -1
- package/dist/client/assets/{page-CiHJqxqc.js → page-BL5oRGL8.js} +1 -1
- package/dist/client/assets/page-KDOuYuNd.js +1 -0
- package/dist/client/assets/{plugin-empty-state-ChCtFVu4.js → plugin-empty-state-DJs75tbR.js} +1 -1
- package/dist/client/assets/{plugin-header-DvSAgKvH.js → plugin-header-B9k5Jlo7.js} +1 -1
- package/dist/client/assets/{popover-BUw1D-k3.js → popover-CRq_6wOS.js} +1 -1
- package/dist/client/assets/{project-layout-DepNFK93.js → project-layout-BNYVyor9.js} +1 -1
- package/dist/client/assets/{project-settings-DXcKP6OZ.js → project-settings-BB9OYyku.js} +1 -1
- package/dist/client/assets/{projects-list-B7ZAgPRa.js → projects-list-tCSe-p9p.js} +1 -1
- package/dist/client/assets/{registry-utils-BHsSQAZM.js → registry-utils-BSsNDH8z.js} +1 -1
- package/dist/client/assets/{resizable-BgnJryiK.js → resizable-IICqdC0P.js} +1 -1
- package/dist/client/assets/{select-CqT-RHOd.js → select-f15wOonn.js} +1 -1
- package/dist/client/assets/{shell-layout-ds4suCjz.js → shell-layout-Du8t77ur.js} +4 -4
- package/dist/client/assets/{spinner-UdN4XMK9.js → spinner-DnPscNbk.js} +1 -1
- package/dist/client/assets/{store-invite-BEDmgi9S.js → store-invite-OC-5AI4v.js} +1 -1
- package/dist/client/assets/{switch-BNGnFJqx.js → switch-BIO6p3F2.js} +1 -1
- package/dist/client/assets/{table-C5twlOYa.js → table-BECdubXZ.js} +1 -1
- package/dist/client/assets/{tasks-Cp1sI4Vw.js → tasks-07lkw73y.js} +1 -1
- package/dist/client/assets/{textarea-CkIVemYH.js → textarea-Beyy6QRE.js} +1 -1
- package/dist/client/assets/{tools-list-Bx2rM27G.js → tools-list-B4uqUufu.js} +1 -1
- package/dist/client/assets/{topbar-portal-CkY8cVoH.js → topbar-portal-BkkURAkp.js} +1 -1
- package/dist/client/assets/{typewriter-title-C6Pd2n8m.js → typewriter-title-CXc5iNqe.js} +1 -1
- package/dist/client/assets/{use-binding-DPu07RT3.js → use-binding-jnlj8haE.js} +1 -1
- package/dist/client/assets/{use-connection-BMDdHvgl.js → use-connection-CdUUg5oM.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Sw-q0DnQ.js → use-create-virtual-mcp-Brpfqy1S.js} +1 -1
- package/dist/client/assets/use-deco-chat-open-BIqIiDW-.js +23 -0
- package/dist/client/assets/{use-install-from-registry-DqBKCnsO.js → use-install-from-registry-zPimeqjE.js} +1 -1
- package/dist/client/assets/{use-list-state-C1QR4kf_.js → use-list-state-C8dJBLRY.js} +1 -1
- package/dist/client/assets/{use-llm-BboMgEwt.js → use-llm-AxlP2IMZ.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-CTqLi2Tn.js → use-mcp-prompts-B4-jhghr.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DkyQksFO.js → use-mcp-tools-CwSPwOy3.js} +1 -1
- package/dist/client/assets/{use-mobile-BKBuyZ1f.js → use-mobile-CZgmHxJy.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BRwXXMn8.js → use-organization-settings-7U_CYDtf.js} +1 -1
- package/dist/client/assets/{use-project-CLnw3Rsg.js → use-project-DHmrO9yE.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-0bAaSKwj.js → use-virtual-mcp-B_EKKbiX.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DiBxunOm.js +1 -0
- package/dist/client/assets/{useMutation-CVJv5Jdm.js → useMutation-BZJqJibi.js} +1 -1
- package/dist/client/assets/useQuery-B0sG-lD7.js +1 -0
- package/dist/client/assets/utils-CDly9l2F.js +1 -0
- package/dist/client/assets/{view-mode-toggle-CiRRW4Qf.js → view-mode-toggle-DFlygBbR.js} +1 -1
- package/dist/client/assets/{workflow-DuF6auLD.js → workflow-CyeaW6pw.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +206 -260
- package/dist/server/migrate.js +149 -149
- package/dist/server/server.js +175 -229
- package/package.json +1 -1
- package/dist/client/assets/agent-detail-DPTr8Yf-.js +0 -1
- package/dist/client/assets/connection-detail-nbfuwO9R.js +0 -1
- package/dist/client/assets/constants-BWVCSHbT.js +0 -1
- package/dist/client/assets/index-BEdPWc-P.css +0 -1
- package/dist/client/assets/index-DkTwn_Zk.js +0 -1
- package/dist/client/assets/index-DoFuO1mJ.js +0 -25
- package/dist/client/assets/members-D1lMQYLf.js +0 -3
- package/dist/client/assets/page-DOMo_XpW.js +0 -1
- package/dist/client/assets/use-deco-chat-open-CJyBdqlw.js +0 -23
- package/dist/client/assets/useInfiniteQuery-BiwY1sxo.js +0 -1
- package/dist/client/assets/useQuery-CBE5-shC.js +0 -1
- package/dist/client/assets/utils-DYQC4wqD.js +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{r as y,c as N,j as n,u as ie,m as ue,bt as Be,L as ke,bp as rs,bC as ls,O as Q,a4 as xt,v as os,y as is,g as oe,t as ce,a$ as as,bD as ht,a as et,bE as cs,b3 as gt,bF as _e,A as ds,S as jt,b as ms,e as fs,N as us,n as ps,K as xs,l as bt,P as hs}from"./index-BxdkA_ZL.js";import{C as re,u as Fe,i as gs}from"./index-B3PXgRu6.js";import{I as js,n as bs,a as De,c as vt,T as Re,b as He}from"./integration-icon-jeb5kYQL.js";import{P as Ce}from"./index-DkTwn_Zk.js";import{b as We,u as vs,S as ee,d as Nt,C as Ns,c as Ss,e as ys}from"./use-deco-chat-open-CJyBdqlw.js";import{c as z}from"./utils-DYQC4wqD.js";import{d as ws}from"./constants-DaNibXfC.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 St}from"./typewriter-title-C6Pd2n8m.js";import{s as Ve}from"./Plus-D4aZ3IMW.js";import{t as yt}from"./Users03-B-mM8HW1.js";import{i as Ue}from"./X-CmvZcFQB.js";import{E as wt}from"./error-boundary-BtZ5XzHQ.js";import{C as Ct}from"./create-project-dialog-DXg7_zQn.js";import{n as Ts}from"./CheckDone01-S0a0qNbM.js";import{a as Ms}from"./Home02-Bl5V3Eer.js";import{u as Es,a as kt}from"./use-project-CLnw3Rsg.js";import{u as Pe}from"./use-mobile-BKBuyZ1f.js";import{t as tt}from"./ChevronDown-GKAjmf9-.js";import{B as te}from"./button-D4ybDyA6.js";import{A as de}from"./avatar-BYpFPLC-.js";import{b as st,P as nt,a as rt}from"./popover-BUw1D-k3.js";import{n as it}from"./Inbox01-5raqmbyC.js";import{B as at}from"./badge-DtKpOapD.js";import{i as $e}from"./Check-Cs75lN5s.js";import{s as ct}from"./XClose-BMnTDdZw.js";import{i as _t}from"./ChevronRight-C2P7kbsg.js";import{a as lt}from"./Settings02-rhcgMUZ4.js";import{C as zt}from"./create-organization-dialog-6BWQsUK3.js";import{c as As,b as Ls,g as Ds,a as Rs,D as Hs}from"./dialog-CMGr7rql.js";import{L as dt}from"./label-DXPngrTd.js";import{S as mt}from"./switch-BNGnFJqx.js";import{i as Us}from"./Code01-BHLC4p1n.js";import{a as $t}from"./Copy01-DoMQtYG8.js";import{u as It,a as Bs}from"./use-organization-settings-BRwXXMn8.js";import{i as Fs}from"./File06-Cw5Qokj9.js";import{I as Ws}from"./input-z2jpeFYP.js";import{c as Vs}from"./Grid01-CRxXEj4c.js";import{a as Gs,T as Ks}from"./topbar-portal-CkY8cVoH.js";import{a as Zs,b as Ys,D as qs,c as Js,g as ft}from"./dropdown-menu-BuIL6Z9M.js";import{n as ut}from"./LinkExternal01-Djvm54UL.js";import{t as Xs}from"./Settings01-DHLzOrWD.js";import{u as Ot,L as Pt}from"./localstorage-keys-9xhTORbm.js";import{R as Qs,a as Tt,b as en}from"./resizable-BgnJryiK.js";import"./spinner-UdN4XMK9.js";import"./use-mcp-prompts-CTqLi2Tn.js";import"./useQuery-CBE5-shC.js";import"./form-DMknnobv.js";import"./AlertCircle-BPyXObkI.js";import"./ArrowUp-FCHp4iCN.js";import"./Edit01-DLdvPhN6.js";import"./usage-B8eRkRZY.js";import"./Terminal-n9aj2R3o.js";import"./monaco-editor-DObrcQRA.js";import"./empty-state-DRvUMAVC.js";import"./use-connection-BMDdHvgl.js";import"./useMutation-CVJv5Jdm.js";import"./generate-id-Dyweu44Y.js";import"./SearchMd-C_tQMyyy.js";import"./Trash01-Elt9HT4h.js";import"./use-virtual-mcp-0bAaSKwj.js";import"./use-create-virtual-mcp-Sw-q0DnQ.js";import"./index-DWuFhHja.js";import"./use-llm-BboMgEwt.js";import"./use-binding-DPu07RT3.js";import"./binder-CdlFZNUo.js";import"./select-CqT-RHOd.js";import"./Image01-Da5y1xnZ.js";import"./RefreshCcw01-Cim3w8V-.js";import"./textarea-CkIVemYH.js";import"./alert-dialog-CMNJi4cu.js";import"./infiniteQueryObserver-DxBV1LPI.js";const qe=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M7 17 17 7m0 0H7m10 0v10"}));qe.displayName="ArrowUpRight";const Mt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.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",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.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"}));Et.displayName="BookOpen01";const At=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.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"}));At.displayName="Building02";const Lt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m18 17-5-5 5-5m-7 10-5-5 5-5"}));Lt.displayName="ChevronLeftDouble";const Dt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m6 17 5-5-5-5m7 10 5-5-5-5"}));Dt.displayName="ChevronRightDouble";const Je=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M11 4.5h7.3c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874c.218.428.218.988.218 2.108V9c0 .932 0 1.398-.152 1.765a2 2 0 0 1-1.083 1.083C19.898 12 19.432 12 18.5 12M13 19.5H5.7c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C2.5 17.98 2.5 17.42 2.5 16.3V15c0-.932 0-1.398.152-1.765a2 2 0 0 1 1.083-1.083C4.102 12 4.568 12 5.5 12m4.8 2.5h3.4c.28 0 .42 0 .527-.055a.5.5 0 0 0 .218-.218c.055-.107.055-.247.055-.527v-3.4c0-.28 0-.42-.055-.527a.5.5 0 0 0-.218-.218C14.12 9.5 13.98 9.5 13.7 9.5h-3.4c-.28 0-.42 0-.527.055a.5.5 0 0 0-.218.218c-.055.107-.055.247-.055.527v3.4c0 .28 0 .42.055.527a.5.5 0 0 0 .218.218c.107.055.247.055.527.055Zm7.5 7.5h3.4c.28 0 .42 0 .527-.055a.5.5 0 0 0 .218-.218C22 21.62 22 21.48 22 21.2v-3.4c0-.28 0-.42-.055-.527a.5.5 0 0 0-.218-.218C21.62 17 21.48 17 21.2 17h-3.4c-.28 0-.42 0-.527.055a.5.5 0 0 0-.218.218C17 17.38 17 17.52 17 17.8v3.4c0 .28 0 .42.055.527a.5.5 0 0 0 .218.218c.107.055.247.055.527.055ZM2.8 7h3.4c.28 0 .42 0 .527-.054a.5.5 0 0 0 .218-.219C7 6.62 7 6.48 7 6.2V2.8c0-.28 0-.42-.054-.527a.5.5 0 0 0-.219-.219C6.62 2 6.48 2 6.2 2H2.8c-.28 0-.42 0-.527.054a.5.5 0 0 0-.219.219C2 2.38 2 2.52 2 2.8v3.4c0 .28 0 .42.054.527a.5.5 0 0 0 .219.218C2.38 7 2.52 7 2.8 7Z"}));Je.displayName="Dataflow03";const Rt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.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"}));Rt.displayName="FaceSmile";const Ht=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M2 12h20M2 12c0 5.523 4.477 10 10 10M2 12C2 6.477 6.477 2 12 2m10 10c0 5.523-4.477 10-10 10m10-10c0-5.523-4.477-10-10-10m0 0a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10m0-20a15.3 15.3 0 0 0-4 10 15.3 15.3 0 0 0 4 10"}));Ht.displayName="Globe01";const Ut=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M15 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3Z"}));Ut.displayName="LayoutRight";const Bt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m16 17 5-5m0 0-5-5m5 5H9m0-9H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 21 6.12 21 7.8 21H9"}));Bt.displayName="LogOut01";const Ft=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m16 17 5-5m0 0-5-5m5 5H9m3 5c0 .93 0 1.395-.102 1.776a3 3 0 0 1-2.122 2.122C9.395 21 8.93 21 8 21h-.5c-1.398 0-2.097 0-2.648-.228a3 3 0 0 1-1.624-1.624C3 18.597 3 17.898 3 16.5v-9c0-1.398 0-2.097.228-2.648a3 3 0 0 1 1.624-1.624C5.403 3 6.102 3 7.5 3H8c.93 0 1.395 0 1.776.102a3 3 0 0 1 2.122 2.122C12 5.605 12 6.07 12 7"}));Ft.displayName="LogOut02";const Wt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m2 7 8.165 5.715c.661.463.992.695 1.351.784a2 2 0 0 0 .968 0c.36-.09.69-.32 1.351-.784L22 7M6.8 20h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 17.72 22 16.88 22 15.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 4 18.88 4 17.2 4H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 6.28 2 7.12 2 8.8v6.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 20 5.12 20 6.8 20Z"}));Wt.displayName="Mail01";const Vt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M3 8h12m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0Zm-6 8h12M9 16a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}));Vt.displayName="Settings04";function tn(){const t=N.c(65),{org:e}=ie(),[,s]=We(),{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 K;t[3]!==i?(K=J=>J.id===i,t[3]=i,t[4]=K):K=t[4],m=d.find(K),t[0]=i,t[1]=d,t[2]=m}else m=t[2];const f=m,[u,p]=y.useState(!1),[x,h]=y.useTransition();let j;t[5]!==e.id?(j=ws(e.id),t[5]=e.id,t[6]=j):j=t[6];const g=r??j;let v;t[7]!==a?(v=()=>{h(()=>{a()})},t[7]=a,t[8]=v):v=t[8];const S=v;if(l.length===0){let K;t[9]===Symbol.for("react.memo_cache_sentinel")?(K=n.jsx(Ce.Header.Left,{className:"gap-2"}),t[9]=K):K=t[9];let J;t[10]!==s?(J=()=>s(!1),t[10]=s,t[11]=J):J=t[11];let X;t[12]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx(Ue,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[12]=X):X=t[12];let P;t[13]!==J?(P=n.jsxs(Ce.Header,{className:"flex-none",children:[K,n.jsx(Ce.Header.Right,{className:"gap-1",children:n.jsx("button",{type:"button",onClick:J,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:X})})]}),t[13]=J,t[14]=P):P=t[14];let F;t[15]!==e?(F=n.jsx(re.Main,{className:"flex flex-col items-center",children:n.jsx(re.EmptyState,{children:n.jsx(re.NoLlmBindingEmptyState,{title:"No model provider connected",description:"Connect to a model provider to unlock AI-powered features.",org:e})})}),t[15]=e,t[16]=F):F=t[16];let Y;return t[17]!==P||t[18]!==F?(Y=n.jsxs(re,{children:[P,F]}),t[17]=P,t[18]=F,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 w;t[20]!==C?(w=z("absolute inset-0 flex flex-col transition-all ease-in-out",C),t[20]=C,t[21]=w):w=t[21];let _;t[22]!==f||t[23]!==o?(_=!o&&f?.title&&n.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=n.jsx(Ce.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=n.jsx(Ve,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[27]=k):k=t[27];let $;t[28]!==S||t[29]!==x?($=n.jsx("button",{type:"button",onClick:S,disabled:x,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",title:"New chat",children:k}),t[28]=S,t[29]=x,t[30]=$):$=t[30];let I;t[31]===Symbol.for("react.memo_cache_sentinel")?(I=()=>p(!0),t[31]=I):I=t[31];let M;t[32]===Symbol.for("react.memo_cache_sentinel")?(M=n.jsx("button",{type:"button",onClick:I,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"Chat history",children:n.jsx(ks,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})}),t[32]=M):M=t[32];let T;t[33]!==s?(T=()=>s(!1),t[33]=s,t[34]=T):T=t[34];let U;t[35]===Symbol.for("react.memo_cache_sentinel")?(U=n.jsx(Ue,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[35]=U):U=t[35];let E;t[36]!==T?(E=n.jsx("button",{type:"button",onClick:T,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:U}),t[36]=T,t[37]=E):E=t[37];let L;t[38]!==E||t[39]!==$?(L=n.jsxs(Ce.Header.Right,{className:"gap-1",children:[$,M,E]}),t[38]=E,t[39]=$,t[40]=L):L=t[40];let D;t[41]!==L||t[42]!==O?(D=n.jsxs(Ce.Header,{className:"flex-none",children:[O,L]}),t[41]=L,t[42]=O,t[43]=D):D=t[43];let A;t[44]!==g||t[45]!==o?(A=n.jsx(re.Main,{children:o?n.jsx(re.EmptyState,{children:n.jsxs("div",{className:"flex flex-col items-center gap-6 w-full px-4",children:[n.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 p-0 text-center",children:[n.jsx(js,{icon:g.icon,name:g.title,size:"lg",fallbackIcon:n.jsx(yt,{size:32}),className:"size-[60px]! rounded-[18px]!"}),n.jsx("h3",{className:"text-xl font-medium text-foreground",children:g.title}),n.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:g.description??"Ask anything about configuring model providers or using MCP Mesh."})]}),n.jsx(re.IceBreakers,{})]})}):n.jsx(re.Messages,{})}),t[44]=g,t[45]=o,t[46]=A):A=t[46];let R;t[47]===Symbol.for("react.memo_cache_sentinel")?(R=n.jsx(re.Footer,{children:n.jsx(re.Input,{})}),t[47]=R):R=t[47];let B;t[48]!==D||t[49]!==A||t[50]!==w?(B=n.jsxs("div",{className:w,children:[D,A,R]}),t[48]=D,t[49]=A,t[50]=w,t[51]=B):B=t[51];const H=u?"opacity-100 translate-x-0":"opacity-0 translate-x-4 pointer-events-none";let W;t[52]!==H?(W=z("absolute inset-0 flex flex-col transition-all duration-300 ease-in-out",H),t[52]=H,t[53]=W):W=t[53];let V;t[54]===Symbol.for("react.memo_cache_sentinel")?(V=()=>p(!1),t[54]=V):V=t[54];let q;t[55]!==i||t[56]!==c||t[57]!==d?(q=n.jsx(_s,{threads:d,activeThreadId:i,onThreadSelect:c,onClose:V}),t[55]=i,t[56]=c,t[57]=d,t[58]=q):q=t[58];let G;t[59]!==W||t[60]!==q?(G=n.jsx("div",{className:W,children:q}),t[59]=W,t[60]=q,t[61]=G):G=t[61];let Z;return t[62]!==B||t[63]!==G?(Z=n.jsxs(re,{className:"relative overflow-hidden",children:[B,G]}),t[62]=B,t[63]=G,t[64]=Z):Z=t[64],Z}function sn(){const t=N.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(re.Skeleton,{}),t[0]=e):e=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(wt,{fallback:e,children:n.jsx(y.Suspense,{fallback:n.jsx(re.Skeleton,{}),children:n.jsx(tn,{})})}),t[1]=s):s=t[1],s}function nn(){const t=N.c(33),[e]=Fe(),{locator:s,org:r}=ie(),l=ue(),o=Be(),{org:i,project:a}=ke.parse(s),c=ke.isOrgAdminProject(s),{data:d}=Es(r.id,a);let m;t[0]!==d?.enabledPlugins?(m=d?.enabledPlugins??[],t[0]=d?.enabledPlugins,t[1]=m):m=t[1];const f=m;let u;t[2]!==f?(u=P=>f.includes(P.pluginId),t[2]=f,t[3]=u):u=t[3];const p=rs.filter(u),x=o.location.pathname===`/${i}/${a}`||o.location.pathname===`/${i}/${a}/`;let h;t[4]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Ms,{}),t[4]=h):h=t[4];const j={key:"home",label:"Home",icon:h,onClick:()=>{x?window.dispatchEvent(new CustomEvent("reset-home-view")):l({to:"/$org/$project",params:{org:i,project:a}})}};let b;t[5]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(Ts,{}),t[5]=b):b=t[5];const g={key:"tasks",label:"Tasks",icon:b,onClick:()=>l({to:"/$org/$project/tasks",params:{org:i,project:Q}})};let v;t[6]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(bs,{}),t[6]=v):v=t[6];const S={key:"mcps",label:"Connections",icon:v,onClick:()=>l({to:"/$org/$project/mcps",params:{org:i,project:Q}})};let C;t[7]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(xt,{}),t[7]=C):C=t[7];const w={key:"projects",label:"Projects",icon:C,onClick:()=>l({to:"/$org/$project/projects",params:{org:i,project:Q}})};let _;t[8]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(At,{}),t[8]=_):_=t[8];const O={key:"store",label:"Store",icon:_,onClick:()=>l({to:"/$org/$project/store",params:{org:i,project:Q}})};let k;t[9]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(yt,{}),t[9]=k):k=t[9];const $={key:"agents",label:"Agents",icon:k,onClick:()=>l({to:"/$org/$project/agents",params:{org:i,project:Q}})};let I;t[10]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsx(Mt,{}),t[10]=I):I=t[10];const M={key:"monitoring",label:"Monitor",icon:I,onClick:()=>l({to:"/$org/$project/monitoring",params:{org:i,project:Q}})};let T;t[11]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(Je,{}),t[11]=T):T=t[11];const U={key:"workflows",label:"Workflows",icon:T,onClick:()=>l({to:"/$org/$project/workflows",params:{org:i,project:Q}})};let E;t[12]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx(Rt,{}),t[12]=E):E=t[12];const L={key:"members",label:"Members",icon:E,onClick:()=>l({to:"/$org/$project/members",params:{org:i,project:Q}})},D=[g,S,U,...e.experimental_projects?[w]:[],O,$,M,L],A=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 R;t[13]!==f?(R=P=>f.includes(P.pluginId),t[13]=f,t[14]=R):R=t[14];const H=ls.filter(R).map(P=>({type:"group",group:{id:`${P.pluginId}-${P.id}`,label:P.label,items:P.items.map((F,Y)=>({key:`${P.pluginId}-${P.id}-${Y}`,label:F.label,icon:F.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:[j,...D]}];if(A.length>0){let F;t[15]===Symbol.for("react.memo_cache_sentinel")?(F={type:"divider"},t[15]=F):F=t[15],P.push(F);let Y;t[16]!==A?(Y={type:"items",items:A},t[16]=A,t[17]=Y):Y=t[17],P.push(Y)}if(H.length>0){if(A.length===0){let F;t[18]===Symbol.for("react.memo_cache_sentinel")?(F={type:"divider"},t[18]=F):F=t[18],P.push(F)}P.push(...H)}return P}let W;t[19]===Symbol.for("react.memo_cache_sentinel")?(W=n.jsx(gs,{}),t[19]=W):W=t[19];let V;t[20]!==l||t[21]!==i||t[22]!==a?(V={key:"tasks",label:"Tasks",icon:W,onClick:()=>l({to:"/$org/$project/tasks",params:{org:i,project:a}})},t[20]=l,t[21]=i,t[22]=a,t[23]=V):V=t[23];const q=V;let G;t[24]===Symbol.for("react.memo_cache_sentinel")?(G=n.jsx(Je,{}),t[24]=G):G=t[24];let Z;t[25]!==l||t[26]!==i||t[27]!==a?(Z={key:"workflows",label:"Workflows",icon:G,onClick:()=>l({to:"/$org/$project/workflows",params:{org:i,project:a}})},t[25]=l,t[26]=i,t[27]=a,t[28]=Z):Z=t[28];const X=[{type:"items",items:[j,q,Z]}];if(A.length>0){let P;t[29]===Symbol.for("react.memo_cache_sentinel")?(P={type:"divider"},t[29]=P):P=t[29],X.push(P);let F;t[30]!==A?(F={type:"items",items:A},t[30]=A,t[31]=F):F=t[31],X.push(F)}if(H.length>0){if(A.length===0){let P;t[32]===Symbol.for("react.memo_cache_sentinel")?(P={type:"divider"},t[32]=P):P=t[32],X.push(P)}X.push(...H)}return X}const rn="sidebar_state",ln=3600*24*7,on="16rem",an="18rem",cn="3rem",dn="b",Gt=y.createContext(null);function Ge(){const t=y.useContext(Gt);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function mn(t){const e=N.c(21),{defaultOpen:s,open:r,onOpenChange:l,children:o}=t,i=s===void 0?!0:s,a=Pe(),[c,d]=y.useState(!1),[m,f]=y.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=`${rn}=${k}; path=/; max-age=${ln}`},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(un):x(fn),e[3]=a,e[4]=x,e[5]=h):h=e[5];const j=h;let b,g;e[6]!==j?(b=()=>{const O=k=>{if(k.key===dn&&(k.metaKey||k.ctrlKey)){const $=k.target;if($.tagName==="INPUT"||$.tagName==="TEXTAREA"||$.isContentEditable)return;k.preventDefault(),j()}};return globalThis.addEventListener("keydown",O),()=>globalThis.removeEventListener("keydown",O)},g=[j],e[6]=j,e[7]=b,e[8]=g):(b=e[7],g=e[8]),y.useEffect(b,g);const v=u?"expanded":"collapsed";let S;e[9]!==a||e[10]!==u||e[11]!==c||e[12]!==x||e[13]!==v||e[14]!==j?(S={state:v,open:u,setOpen:x,isMobile:a,openMobile:c,setOpenMobile:d,toggleSidebar:j},e[9]=a,e[10]=u,e[11]=c,e[12]=x,e[13]=v,e[14]=j,e[15]=S):S=e[15];const C=S;let w;e[16]!==o?(w=n.jsx(vt,{delayDuration:0,children:o}),e[16]=o,e[17]=w):w=e[17];let _;return e[18]!==C||e[19]!==w?(_=n.jsx(Gt.Provider,{value:C,children:w}),e[18]=C,e[19]=w,e[20]=_):_=e[20],_}function fn(t){return!t}function un(t){return!t}function pn(t){const e=N.c(14);let s,r,l,o;e[0]!==t?({className:r,style:o,children:s,...l}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o):(s=e[1],r=e[2],l=e[3],o=e[4]);let i;e[5]!==o?(i={"--sidebar-width":on,"--sidebar-width-icon":cn,...o},e[5]=o,e[6]=i):i=e[6];const a=i;let c;e[7]!==r?(c=z("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",r),e[7]=r,e[8]=c):c=e[8];let d;return e[9]!==s||e[10]!==l||e[11]!==a||e[12]!==c?(d=n.jsx("div",{"data-slot":"sidebar-wrapper",style:a,className:c,...l,children:s}),e[9]=s,e[10]=l,e[11]=a,e[12]=c,e[13]=d):d=e[13],d}function xn(t){const e=N.c(46);let s,r,l,o,i,a;e[0]!==t?({side:o,variant:i,collapsible:a,className:r,children:s,...l}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o,e[5]=i,e[6]=a):(s=e[1],r=e[2],l=e[3],o=e[4],i=e[5],a=e[6]);const c=o===void 0?"left":o,d=i===void 0?"sidebar":i,m=a===void 0?"offcanvas":a,{isMobile:f,state:u,openMobile:p,setOpenMobile:x}=Ge();if(m==="none"){let k;e[7]!==r?(k=z("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),e[7]=r,e[8]=k):k=e[8];let $;return e[9]!==s||e[10]!==l||e[11]!==k?($=n.jsx("div",{"data-slot":"sidebar",className:k,...l,children:s}),e[9]=s,e[10]=l,e[11]=k,e[12]=$):$=e[12],$}if(f){let k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k={"--sidebar-width":an},e[13]=k):k=e[13];let $;e[14]===Symbol.for("react.memo_cache_sentinel")?($=n.jsxs($s,{className:"sr-only",children:[n.jsx(Is,{children:"Sidebar"}),n.jsx(Os,{children:"Displays the mobile sidebar."})]}),e[14]=$):$=e[14];let I;e[15]!==s?(I=n.jsx("div",{className:"flex h-full w-full flex-col",children:s}),e[15]=s,e[16]=I):I=e[16];let M;e[17]!==c||e[18]!==I?(M=n.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]=I,e[19]=M):M=e[19];let T;return e[20]!==p||e[21]!==l||e[22]!==x||e[23]!==M?(T=n.jsx(zs,{open:p,onOpenChange:x,...l,children:M}),e[20]=p,e[21]=l,e[22]=x,e[23]=M,e[24]=T):T=e[24],T}const h=u==="collapsed"?m:"",j=d==="floating"||d==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let b;e[25]!==j?(b=z("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",j),e[25]=j,e[26]=b):b=e[26];let g;e[27]!==b?(g=n.jsx("div",{"data-slot":"sidebar-gap",className:b}),e[27]=b,e[28]=g):g=e[28];const v=c==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",S=d==="floating"||d==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let C;e[29]!==r||e[30]!==v||e[31]!==S?(C=z("fixed top-12 bottom-0 z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",v,S,r),e[29]=r,e[30]=v,e[31]=S,e[32]=C):C=e[32];let w;e[33]!==s?(w=n.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border pt-2 flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:s}),e[33]=s,e[34]=w):w=e[34];let _;e[35]!==l||e[36]!==C||e[37]!==w?(_=n.jsx("div",{"data-slot":"sidebar-container",className:C,...l,children:w}),e[35]=l,e[36]=C,e[37]=w,e[38]=_):_=e[38];let O;return e[39]!==c||e[40]!==u||e[41]!==_||e[42]!==h||e[43]!==g||e[44]!==d?(O=n.jsxs("div",{className:"group peer text-foreground hidden md:block","data-state":u,"data-collapsible":h,"data-variant":d,"data-side":c,"data-slot":"sidebar",children:[g,_]}),e[39]=c,e[40]=u,e[41]=_,e[42]=h,e[43]=g,e[44]=d,e[45]=O):O=e[45],O}function hn(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("main",{"data-slot":"sidebar-inset",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Kt(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex flex-col gap-2 p-2",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function gn(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex flex-col gap-2 px-2 items-start justify-start",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function ot(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("h-4 m-0! w-full",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-sidebar":"separator",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function jn(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Ie(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Oe(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("w-full text-sm",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function me(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex w-full min-w-0 flex-col gap-1",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function le(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("group/menu-item relative",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}const bn=is("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg px-2 py-1.5 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding,colors] transition-colors duration-150 ease-out hover:transition-none focus-visible:ring-2 active:bg-sidebar-accent/75 disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent/75 [&>span:last-child]:truncate [&>svg]:size-[18px] [&>svg]:shrink-0 [&>svg]:text-muted-foreground",{variants:{variant:{default:"hover:bg-sidebar-accent text-sidebar-foreground/80 active:text-sidebar-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-7 text-sm font-[450]",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Te(t){const e=N.c(28);let s,r,l,o,i,a,c;e[0]!==t?({asChild:l,isActive:o,variant:i,size:a,tooltip:c,className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o,e[5]=i,e[6]=a,e[7]=c):(s=e[1],r=e[2],l=e[3],o=e[4],i=e[5],a=e[6],c=e[7]);const d=l===void 0?!1:l,m=o===void 0?!1:o,f=i===void 0?"default":i,u=a===void 0?"default":a,p=d?os:"button",{isMobile:x,state:h}=Ge();let j;e[8]!==s||e[9]!==u||e[10]!==f?(j=z(bn({variant:f,size:u}),s),e[8]=s,e[9]=u,e[10]=f,e[11]=j):j=e[11];let b;e[12]!==p||e[13]!==m||e[14]!==r||e[15]!==u||e[16]!==j?(b=n.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":u,"data-active":m,className:j,...r}),e[12]=p,e[13]=m,e[14]=r,e[15]=u,e[16]=j,e[17]=b):b=e[17];const g=b;if(!c)return g;if(typeof c=="string"){let _;e[18]!==c?(_={children:c},e[18]=c,e[19]=_):_=e[19],c=_}let v;e[20]!==g?(v=n.jsx(Re,{asChild:!0,children:g}),e[20]=g,e[21]=v):v=e[21];const S=h!=="collapsed"||x;let C;e[22]!==S||e[23]!==c?(C=n.jsx(De,{side:"right",align:"center",hidden:S,...c}),e[22]=S,e[23]=c,e[24]=C):C=e[24];let w;return e[25]!==v||e[26]!==C?(w=n.jsxs(He,{children:[v,C]}),e[25]=v,e[26]=C,e[27]=w):w=e[27],w}function vn(t){const e=N.c(18),{label:s,children:r,defaultExpanded:l}=t,o=l===void 0?!0:l,[i,a]=y.useState(o);let c;e[0]!==i?(c=()=>a(!i),e[0]=i,e[1]=c):c=e[1];let d;e[2]!==s?(d=n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s}),e[2]=s,e[3]=d):d=e[3];const m=!i&&"-rotate-90";let f;e[4]!==m?(f=z("text-muted-foreground transition-transform duration-200",m),e[4]=m,e[5]=f):f=e[5];let u;e[6]!==f?(u=n.jsx(tt,{size:12,className:f}),e[6]=f,e[7]=u):u=e[7];let p;e[8]!==c||e[9]!==d||e[10]!==u?(p=n.jsx(me,{children:n.jsx(le,{children:n.jsxs(Te,{className:"h-6 cursor-pointer select-none",onClick:c,children:[d,u]})})}),e[8]=c,e[9]=d,e[10]=u,e[11]=p):p=e[11];let x;e[12]!==r||e[13]!==i?(x=i&&n.jsx(Oe,{children:n.jsx(me,{className:"gap-0.5",children:r})}),e[12]=r,e[13]=i,e[14]=x):x=e[14];let h;return e[15]!==p||e[16]!==x?(h=n.jsxs(Ie,{className:"py-0",children:[p,x]}),e[15]=p,e[16]=x,e[17]=h):h=e[17],h}function Zt(t){const e=N.c(13),{item:s}=t;let r;e[0]!==s.icon?(r=n.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:s.icon}),e[0]=s.icon,e[1]=r):r=e[1];let l;e[2]!==s.label?(l=n.jsx("span",{className:"truncate",children:s.label}),e[2]=s.label,e[3]=l):l=e[3];let o;e[4]!==s.isActive||e[5]!==s.label||e[6]!==s.onClick||e[7]!==r||e[8]!==l?(o=n.jsxs(Te,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:s.onClick,isActive:s.isActive,tooltip:s.label,children:[r,l]}),e[4]=s.isActive,e[5]=s.label,e[6]=s.onClick,e[7]=r,e[8]=l,e[9]=o):o=e[9];let i;return e[10]!==s.key||e[11]!==o?(i=n.jsx(le,{children:o},s.key),e[10]=s.key,e[11]=o,e[12]=i):i=e[12],i}function Nn(t){const e=N.c(12),{section:s}=t;switch(s.type){case"divider":{let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ot,{className:"my-2"}),e[0]=r):r=e[0],r}case"spacer":{let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("div",{className:"flex-1"}),e[1]=r):r=e[1],r}case"group":{const r=s.group.label,l=s.group.defaultExpanded;let o;e[2]!==s.group.items?(o=s.group.items.map(yn),e[2]=s.group.items,e[3]=o):o=e[3];let i;return e[4]!==s.group.defaultExpanded||e[5]!==s.group.label||e[6]!==o?(i=n.jsx(vn,{label:r,defaultExpanded:l,children:o}),e[4]=s.group.defaultExpanded,e[5]=s.group.label,e[6]=o,e[7]=i):i=e[7],i}case"items":{let r;e[8]!==s.items?(r=s.items.map(Sn),e[8]=s.items,e[9]=r):r=e[9];let l;return e[10]!==r?(l=n.jsx(Ie,{className:"py-0",children:n.jsx(Oe,{children:n.jsx(me,{className:"gap-0.5",children:r})})}),e[10]=r,e[11]=l):l=e[11],l}}}function Sn(t){return n.jsx(Zt,{item:t},t.key)}function yn(t){return n.jsx(Zt,{item:t},t.key)}function Yt(t){const e=N.c(14),{sections:s,header:r,footer:l,additionalContent:o,variant:i,collapsible:a,contentClassName:c}=t,d=i===void 0?"sidebar":i,m=a===void 0?"icon":a;let f;e[0]!==c?(f=z("flex flex-col flex-1 overflow-x-hidden font-medium border-r pb-2",c),e[0]=c,e[1]=f):f=e[1];let u;e[2]!==s?(u=s.map(wn),e[2]=s,e[3]=u):u=e[3];let p;e[4]!==o||e[5]!==f||e[6]!==u?(p=n.jsxs(jn,{className:f,children:[u,o]}),e[4]=o,e[5]=f,e[6]=u,e[7]=p):p=e[7];let x;return e[8]!==m||e[9]!==l||e[10]!==r||e[11]!==p||e[12]!==d?(x=n.jsxs(xn,{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 wn(t,e){return n.jsx(Nn,{section:t},e)}Yt.Skeleton=function(){return n.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,s)=>n.jsx("div",{className:"w-full h-8",children:n.jsx(ee,{className:"h-full bg-sidebar-accent rounded-md"})},s))})};const Cn="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 ze(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z(Cn,s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx(te,{variant:"ghost",size:"sm",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function kn({invitation:t,onStatusChange:e}){const[s,r]=y.useState(!1),[l,o]=y.useState(!1),i=ue(),a=async()=>{r(!0);try{const p=await oe.organization.acceptInvitation({invitationId:t.id});if(p.error)ce.error(p.error.message),r(!1);else{e(t.id,"accepted");const x=await oe.organization.setActive({organizationId:t.organizationId});x?.data?.slug?(ce.success("Invitation accepted!"),i({to:"/$org",params:{org:x.data.slug}})):(ce.success("Invitation accepted! Redirecting..."),i({to:"/"}))}}catch{ce.error("Failed to accept invitation"),r(!1)}},c=async()=>{o(!0);try{const p=await oe.organization.rejectInvitation({invitationId:t.id});p.error?(ce.error(p.error.message),o(!1)):(ce.success("Invitation rejected"),e(t.id,"rejected"),o(!1))}catch{ce.error("Failed to reject invitation"),o(!1)}},d=t.organizationName||t.organizationId,m=t.status==="pending",f=t.status==="accepted",u=t.status==="rejected";return n.jsxs("div",{className:z("flex items-center gap-3 px-3 py-2 h-12 border-b border-border/50 last:border-b-0",!m&&"opacity-50"),children:[n.jsx("div",{className:"shrink-0 size-5 flex items-center justify-center",children:n.jsx(Wt,{size:16,className:"text-muted-foreground"})}),n.jsxs("p",{className:"flex-1 text-sm text-foreground min-w-0 whitespace-nowrap overflow-hidden",children:["You have been invited to ",n.jsx("span",{className:"font-semibold inline-block max-w-[200px] truncate align-bottom",children:d})]}),n.jsx("div",{className:"flex items-center gap-1 shrink-0",children:m?n.jsxs(n.Fragment,{children:[n.jsx(te,{variant:"ghost",size:"icon",onClick:c,disabled:s||l,className:"h-8 w-8",children:n.jsx(ct,{size:14})}),n.jsx(te,{variant:"outline",size:"icon",onClick:a,disabled:s||l,className:"h-8 w-8",children:n.jsx($e,{size:14})})]}):f?n.jsxs(at,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx($e,{size:12}),"Accepted"]}):u?n.jsxs(at,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx(ct,{size:12}),"Declined"]}):null})]})}function _n(){const[t,e]=y.useState(!1),s=y.useContext(as),{data:r}=s.hooks.useListUserInvitations(),{data:l}=oe.useListOrganizations(),[o,i]=y.useState({}),m=(r??[]).filter(h=>new Date(h.expiresAt)>new Date).map(h=>{const j=(l??[]).find(b=>b.id===h.organizationId);return{...h,organizationSlug:j?.slug||h.organizationSlug,organizationName:j?.name||h.organizationName}}).map(h=>({...h,status:o[h.id]||h.status})),f=[...m].sort((h,j)=>{const b={pending:0,accepted:1,rejected:2};return(b[h.status]??999)-(b[j.status]??999)}),p=m.filter(h=>h.status==="pending").length>0,x=(h,j)=>{i(b=>({...b,[h]:j}))};return n.jsxs(st,{open:t,onOpenChange:e,children:[n.jsx(nt,{asChild:!0,children:n.jsxs(ze,{children:[n.jsx(it,{size:18}),"Inbox",p&&n.jsx("span",{className:"ml-auto h-2 w-2 rounded-full bg-destructive"})]})}),n.jsxs(rt,{side:"right",align:"start",className:"w-[400px] p-0 overflow-hidden",children:[n.jsx("div",{className:"px-4 py-3 border-b border-border",children:n.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Inbox"})}),n.jsx("div",{className:"max-h-96 overflow-auto",children:f.length>0?f.map(h=>n.jsx(kn,{invitation:h,onStatusChange:x},h.id)):n.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[n.jsx(it,{size:32,className:"text-muted-foreground/40 mb-2"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"No invitations at the moment"})]})})]})]})}function zn(t){const e=N.c(29),{user:s,userImage:r,onOpenSettings:l}=t;let o;e[0]!==s?(o=async()=>{if(!s)return;const _=`ID: ${s.id}
|
|
1
|
+
import{r as y,c as N,j as n,u as ie,m as ue,bs as Be,L as ke,bo as rs,bB as ls,O as Q,a4 as ht,v as os,y as is,g as oe,t as ce,a_ as as,bC as xt,a as et,bD as cs,b2 as gt,bE as _e,A as ds,S as jt,b as ms,e as fs,N as us,n as ps,K as hs,l as bt,P as xs}from"./index-DyoRyDg0.js";import{C as re,u as Fe,i as gs}from"./index-ZW5LgkfR.js";import{I as js,n as bs,a as De,c as vt,T as Re,b as He}from"./integration-icon-BRZY1p3G.js";import{P as Ce}from"./index-NuPnrQEp.js";import{e as We,u as vs,S as ee,g as Nt,C as Ns,f as Ss,h as ys}from"./use-deco-chat-open-BIqIiDW-.js";import{c as z}from"./utils-CDly9l2F.js";import{d as ws}from"./constants-DeSBGDil.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 St}from"./typewriter-title-CXc5iNqe.js";import{s as Ve}from"./Plus-BsvHyKJ8.js";import{t as yt}from"./Users03-B2zsfnpN.js";import{i as Ue}from"./X-CERPEbZp.js";import{E as wt}from"./error-boundary-BWYaX2Wu.js";import{C as Ct}from"./create-project-dialog-b2rgBy6I.js";import{n as Ts}from"./CheckDone01-BFFxKfwE.js";import{a as Ms}from"./Home02-DCuV9I0Z.js";import{u as Es,a as kt}from"./use-project-DHmrO9yE.js";import{u as Pe}from"./use-mobile-CZgmHxJy.js";import{t as tt}from"./ChevronDown-DhDohZgY.js";import{B as te}from"./button-DyxB0Yk5.js";import{A as de}from"./avatar-BlXkFPmj.js";import{b as st,P as nt,a as rt}from"./popover-CRq_6wOS.js";import{n as it}from"./Inbox01-DkILVHwB.js";import{B as at}from"./badge-DspY47ru.js";import{i as $e}from"./Check-D0-doi3D.js";import{s as ct}from"./XClose-Vbmhp4-x.js";import{i as _t}from"./ChevronRight-YlJxRSER.js";import{a as lt}from"./Settings02-BKH7FnCM.js";import{C as zt}from"./create-organization-dialog-DTTLW3st.js";import{c as As,b as Ls,g as Ds,a as Rs,D as Hs}from"./dialog-RkqsUuro.js";import{L as dt}from"./label-nYOkPUBD.js";import{S as mt}from"./switch-BIO6p3F2.js";import{i as Us}from"./Code01-BALFVt_U.js";import{a as $t}from"./Copy01-CdI1uSIx.js";import{u as It,a as Bs}from"./use-organization-settings-7U_CYDtf.js";import{i as Fs}from"./File06-ZuO2Pzkt.js";import{I as Ws}from"./input-BGIEfDaw.js";import{c as Vs}from"./Grid01-Hl_fTaOZ.js";import{a as Gs,T as Ks}from"./topbar-portal-BkkURAkp.js";import{a as Zs,b as Ys,D as qs,c as Js,g as ft}from"./dropdown-menu-DJfLCcXj.js";import{n as ut}from"./LinkExternal01-CzCmb0H9.js";import{t as Xs}from"./Settings01-DFEntEgk.js";import{u as Ot,L as Pt}from"./localstorage-keys-BVi4c9Wu.js";import{R as Qs,a as Tt,b as en}from"./resizable-IICqdC0P.js";import"./spinner-DnPscNbk.js";import"./use-mcp-prompts-B4-jhghr.js";import"./useQuery-B0sG-lD7.js";import"./form-CPHFoWqg.js";import"./ArrowUp-CNNhUiSK.js";import"./Edit01-BLqaLVsN.js";import"./AlertCircle-Dv-pGVbe.js";import"./ArrowLeft-DmjHPtds.js";import"./use-virtual-mcp-B_EKKbiX.js";import"./use-connection-CdUUg5oM.js";import"./useMutation-BZJqJibi.js";import"./SearchMd-B2tl0hgr.js";import"./use-create-virtual-mcp-Brpfqy1S.js";import"./usage-B8eRkRZY.js";import"./Terminal-DAZzR_ZP.js";import"./monaco-editor-D8XjYu_I.js";import"./empty-state-B1qLg3Wj.js";import"./generate-id-Dyweu44Y.js";import"./Trash01-DCp8kuDe.js";import"./index-CkIIowTe.js";import"./use-llm-AxlP2IMZ.js";import"./use-binding-jnlj8haE.js";import"./binder-Dm6uKx_q.js";import"./select-f15wOonn.js";import"./Image01-UevfVWVa.js";import"./RefreshCcw01-BjGY5EQM.js";import"./textarea-Beyy6QRE.js";import"./alert-dialog-DZUHuYRj.js";import"./infiniteQueryObserver-4tHvFsCT.js";const qe=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M7 17 17 7m0 0H7m10 0v10"}));qe.displayName="ArrowUpRight";const Mt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.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",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.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"}));Et.displayName="BookOpen01";const At=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.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"}));At.displayName="Building02";const Lt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m18 17-5-5 5-5m-7 10-5-5 5-5"}));Lt.displayName="ChevronLeftDouble";const Dt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m6 17 5-5-5-5m7 10 5-5-5-5"}));Dt.displayName="ChevronRightDouble";const Je=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M11 4.5h7.3c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874c.218.428.218.988.218 2.108V9c0 .932 0 1.398-.152 1.765a2 2 0 0 1-1.083 1.083C19.898 12 19.432 12 18.5 12M13 19.5H5.7c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C2.5 17.98 2.5 17.42 2.5 16.3V15c0-.932 0-1.398.152-1.765a2 2 0 0 1 1.083-1.083C4.102 12 4.568 12 5.5 12m4.8 2.5h3.4c.28 0 .42 0 .527-.055a.5.5 0 0 0 .218-.218c.055-.107.055-.247.055-.527v-3.4c0-.28 0-.42-.055-.527a.5.5 0 0 0-.218-.218C14.12 9.5 13.98 9.5 13.7 9.5h-3.4c-.28 0-.42 0-.527.055a.5.5 0 0 0-.218.218c-.055.107-.055.247-.055.527v3.4c0 .28 0 .42.055.527a.5.5 0 0 0 .218.218c.107.055.247.055.527.055Zm7.5 7.5h3.4c.28 0 .42 0 .527-.055a.5.5 0 0 0 .218-.218C22 21.62 22 21.48 22 21.2v-3.4c0-.28 0-.42-.055-.527a.5.5 0 0 0-.218-.218C21.62 17 21.48 17 21.2 17h-3.4c-.28 0-.42 0-.527.055a.5.5 0 0 0-.218.218C17 17.38 17 17.52 17 17.8v3.4c0 .28 0 .42.055.527a.5.5 0 0 0 .218.218c.107.055.247.055.527.055ZM2.8 7h3.4c.28 0 .42 0 .527-.054a.5.5 0 0 0 .218-.219C7 6.62 7 6.48 7 6.2V2.8c0-.28 0-.42-.054-.527a.5.5 0 0 0-.219-.219C6.62 2 6.48 2 6.2 2H2.8c-.28 0-.42 0-.527.054a.5.5 0 0 0-.219.219C2 2.38 2 2.52 2 2.8v3.4c0 .28 0 .42.054.527a.5.5 0 0 0 .219.218C2.38 7 2.52 7 2.8 7Z"}));Je.displayName="Dataflow03";const Rt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.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"}));Rt.displayName="FaceSmile";const Ht=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M2 12h20M2 12c0 5.523 4.477 10 10 10M2 12C2 6.477 6.477 2 12 2m10 10c0 5.523-4.477 10-10 10m10-10c0-5.523-4.477-10-10-10m0 0a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10m0-20a15.3 15.3 0 0 0-4 10 15.3 15.3 0 0 0 4 10"}));Ht.displayName="Globe01";const Ut=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M15 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3Z"}));Ut.displayName="LayoutRight";const Bt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m16 17 5-5m0 0-5-5m5 5H9m0-9H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 21 6.12 21 7.8 21H9"}));Bt.displayName="LogOut01";const Ft=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m16 17 5-5m0 0-5-5m5 5H9m3 5c0 .93 0 1.395-.102 1.776a3 3 0 0 1-2.122 2.122C9.395 21 8.93 21 8 21h-.5c-1.398 0-2.097 0-2.648-.228a3 3 0 0 1-1.624-1.624C3 18.597 3 17.898 3 16.5v-9c0-1.398 0-2.097.228-2.648a3 3 0 0 1 1.624-1.624C5.403 3 6.102 3 7.5 3H8c.93 0 1.395 0 1.776.102a3 3 0 0 1 2.122 2.122C12 5.605 12 6.07 12 7"}));Ft.displayName="LogOut02";const Wt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m2 7 8.165 5.715c.661.463.992.695 1.351.784a2 2 0 0 0 .968 0c.36-.09.69-.32 1.351-.784L22 7M6.8 20h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 17.72 22 16.88 22 15.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 4 18.88 4 17.2 4H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 6.28 2 7.12 2 8.8v6.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 20 5.12 20 6.8 20Z"}));Wt.displayName="Mail01";const Vt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M3 8h12m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0Zm-6 8h12M9 16a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}));Vt.displayName="Settings04";function tn(){const t=N.c(65),{org:e}=ie(),[,s]=We(),{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 K;t[3]!==i?(K=J=>J.id===i,t[3]=i,t[4]=K):K=t[4],m=d.find(K),t[0]=i,t[1]=d,t[2]=m}else m=t[2];const f=m,[u,p]=y.useState(!1),[h,x]=y.useTransition();let j;t[5]!==e.id?(j=ws(e.id),t[5]=e.id,t[6]=j):j=t[6];const g=r??j;let v;t[7]!==a?(v=()=>{x(()=>{a()})},t[7]=a,t[8]=v):v=t[8];const S=v;if(l.length===0){let K;t[9]===Symbol.for("react.memo_cache_sentinel")?(K=n.jsx(Ce.Header.Left,{className:"gap-2"}),t[9]=K):K=t[9];let J;t[10]!==s?(J=()=>s(!1),t[10]=s,t[11]=J):J=t[11];let X;t[12]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx(Ue,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[12]=X):X=t[12];let P;t[13]!==J?(P=n.jsxs(Ce.Header,{className:"flex-none",children:[K,n.jsx(Ce.Header.Right,{className:"gap-1",children:n.jsx("button",{type:"button",onClick:J,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:X})})]}),t[13]=J,t[14]=P):P=t[14];let F;t[15]!==e?(F=n.jsx(re.Main,{className:"flex flex-col items-center",children:n.jsx(re.EmptyState,{children:n.jsx(re.NoLlmBindingEmptyState,{title:"No model provider connected",description:"Connect to a model provider to unlock AI-powered features.",org:e})})}),t[15]=e,t[16]=F):F=t[16];let Y;return t[17]!==P||t[18]!==F?(Y=n.jsxs(re,{children:[P,F]}),t[17]=P,t[18]=F,t[19]=Y):Y=t[19],Y}const C=u?"duration-300 opacity-0 -translate-x-4 pointer-events-none":h?"duration-200 opacity-0 pointer-events-none":"duration-300 opacity-100 translate-x-0";let w;t[20]!==C?(w=z("absolute inset-0 flex flex-col transition-all ease-in-out",C),t[20]=C,t[21]=w):w=t[21];let _;t[22]!==f||t[23]!==o?(_=!o&&f?.title&&n.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=n.jsx(Ce.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=n.jsx(Ve,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[27]=k):k=t[27];let $;t[28]!==S||t[29]!==h?($=n.jsx("button",{type:"button",onClick:S,disabled:h,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",title:"New chat",children:k}),t[28]=S,t[29]=h,t[30]=$):$=t[30];let I;t[31]===Symbol.for("react.memo_cache_sentinel")?(I=()=>p(!0),t[31]=I):I=t[31];let M;t[32]===Symbol.for("react.memo_cache_sentinel")?(M=n.jsx("button",{type:"button",onClick:I,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"Chat history",children:n.jsx(ks,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})}),t[32]=M):M=t[32];let T;t[33]!==s?(T=()=>s(!1),t[33]=s,t[34]=T):T=t[34];let U;t[35]===Symbol.for("react.memo_cache_sentinel")?(U=n.jsx(Ue,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[35]=U):U=t[35];let E;t[36]!==T?(E=n.jsx("button",{type:"button",onClick:T,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:U}),t[36]=T,t[37]=E):E=t[37];let L;t[38]!==E||t[39]!==$?(L=n.jsxs(Ce.Header.Right,{className:"gap-1",children:[$,M,E]}),t[38]=E,t[39]=$,t[40]=L):L=t[40];let D;t[41]!==L||t[42]!==O?(D=n.jsxs(Ce.Header,{className:"flex-none",children:[O,L]}),t[41]=L,t[42]=O,t[43]=D):D=t[43];let A;t[44]!==g||t[45]!==o?(A=n.jsx(re.Main,{children:o?n.jsx(re.EmptyState,{children:n.jsxs("div",{className:"flex flex-col items-center gap-6 w-full px-4",children:[n.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 p-0 text-center",children:[n.jsx(js,{icon:g.icon,name:g.title,size:"lg",fallbackIcon:n.jsx(yt,{size:32}),className:"size-[60px]! rounded-[18px]!"}),n.jsx("h3",{className:"text-xl font-medium text-foreground",children:g.title}),n.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:g.description??"Ask anything about configuring model providers or using MCP Mesh."})]}),n.jsx(re.IceBreakers,{})]})}):n.jsx(re.Messages,{})}),t[44]=g,t[45]=o,t[46]=A):A=t[46];let R;t[47]===Symbol.for("react.memo_cache_sentinel")?(R=n.jsx(re.Footer,{children:n.jsx(re.Input,{})}),t[47]=R):R=t[47];let B;t[48]!==D||t[49]!==A||t[50]!==w?(B=n.jsxs("div",{className:w,children:[D,A,R]}),t[48]=D,t[49]=A,t[50]=w,t[51]=B):B=t[51];const H=u?"opacity-100 translate-x-0":"opacity-0 translate-x-4 pointer-events-none";let W;t[52]!==H?(W=z("absolute inset-0 flex flex-col transition-all duration-300 ease-in-out",H),t[52]=H,t[53]=W):W=t[53];let V;t[54]===Symbol.for("react.memo_cache_sentinel")?(V=()=>p(!1),t[54]=V):V=t[54];let q;t[55]!==i||t[56]!==c||t[57]!==d?(q=n.jsx(_s,{threads:d,activeThreadId:i,onThreadSelect:c,onClose:V}),t[55]=i,t[56]=c,t[57]=d,t[58]=q):q=t[58];let G;t[59]!==W||t[60]!==q?(G=n.jsx("div",{className:W,children:q}),t[59]=W,t[60]=q,t[61]=G):G=t[61];let Z;return t[62]!==B||t[63]!==G?(Z=n.jsxs(re,{className:"relative overflow-hidden",children:[B,G]}),t[62]=B,t[63]=G,t[64]=Z):Z=t[64],Z}function sn(){const t=N.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(re.Skeleton,{}),t[0]=e):e=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(wt,{fallback:e,children:n.jsx(y.Suspense,{fallback:n.jsx(re.Skeleton,{}),children:n.jsx(tn,{})})}),t[1]=s):s=t[1],s}function nn(){const t=N.c(33),[e]=Fe(),{locator:s,org:r}=ie(),l=ue(),o=Be(),{org:i,project:a}=ke.parse(s),c=ke.isOrgAdminProject(s),{data:d}=Es(r.id,a);let m;t[0]!==d?.enabledPlugins?(m=d?.enabledPlugins??[],t[0]=d?.enabledPlugins,t[1]=m):m=t[1];const f=m;let u;t[2]!==f?(u=P=>f.includes(P.pluginId),t[2]=f,t[3]=u):u=t[3];const p=rs.filter(u),h=o.location.pathname===`/${i}/${a}`||o.location.pathname===`/${i}/${a}/`;let x;t[4]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Ms,{}),t[4]=x):x=t[4];const j={key:"home",label:"Home",icon:x,onClick:()=>{h?window.dispatchEvent(new CustomEvent("reset-home-view")):l({to:"/$org/$project",params:{org:i,project:a}})}};let b;t[5]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(Ts,{}),t[5]=b):b=t[5];const g={key:"tasks",label:"Tasks",icon:b,onClick:()=>l({to:"/$org/$project/tasks",params:{org:i,project:Q}})};let v;t[6]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(bs,{}),t[6]=v):v=t[6];const S={key:"mcps",label:"Connections",icon:v,onClick:()=>l({to:"/$org/$project/mcps",params:{org:i,project:Q}})};let C;t[7]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(ht,{}),t[7]=C):C=t[7];const w={key:"projects",label:"Projects",icon:C,onClick:()=>l({to:"/$org/$project/projects",params:{org:i,project:Q}})};let _;t[8]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(At,{}),t[8]=_):_=t[8];const O={key:"store",label:"Store",icon:_,onClick:()=>l({to:"/$org/$project/store",params:{org:i,project:Q}})};let k;t[9]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(yt,{}),t[9]=k):k=t[9];const $={key:"agents",label:"Agents",icon:k,onClick:()=>l({to:"/$org/$project/agents",params:{org:i,project:Q}})};let I;t[10]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsx(Mt,{}),t[10]=I):I=t[10];const M={key:"monitoring",label:"Monitor",icon:I,onClick:()=>l({to:"/$org/$project/monitoring",params:{org:i,project:Q}})};let T;t[11]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(Je,{}),t[11]=T):T=t[11];const U={key:"workflows",label:"Workflows",icon:T,onClick:()=>l({to:"/$org/$project/workflows",params:{org:i,project:Q}})};let E;t[12]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx(Rt,{}),t[12]=E):E=t[12];const L={key:"members",label:"Members",icon:E,onClick:()=>l({to:"/$org/$project/members",params:{org:i,project:Q}})},D=[g,S,U,...e.experimental_projects?[w]:[],O,$,M,L],A=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 R;t[13]!==f?(R=P=>f.includes(P.pluginId),t[13]=f,t[14]=R):R=t[14];const H=ls.filter(R).map(P=>({type:"group",group:{id:`${P.pluginId}-${P.id}`,label:P.label,items:P.items.map((F,Y)=>({key:`${P.pluginId}-${P.id}-${Y}`,label:F.label,icon:F.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:[j,...D]}];if(A.length>0){let F;t[15]===Symbol.for("react.memo_cache_sentinel")?(F={type:"divider"},t[15]=F):F=t[15],P.push(F);let Y;t[16]!==A?(Y={type:"items",items:A},t[16]=A,t[17]=Y):Y=t[17],P.push(Y)}if(H.length>0){if(A.length===0){let F;t[18]===Symbol.for("react.memo_cache_sentinel")?(F={type:"divider"},t[18]=F):F=t[18],P.push(F)}P.push(...H)}return P}let W;t[19]===Symbol.for("react.memo_cache_sentinel")?(W=n.jsx(gs,{}),t[19]=W):W=t[19];let V;t[20]!==l||t[21]!==i||t[22]!==a?(V={key:"tasks",label:"Tasks",icon:W,onClick:()=>l({to:"/$org/$project/tasks",params:{org:i,project:a}})},t[20]=l,t[21]=i,t[22]=a,t[23]=V):V=t[23];const q=V;let G;t[24]===Symbol.for("react.memo_cache_sentinel")?(G=n.jsx(Je,{}),t[24]=G):G=t[24];let Z;t[25]!==l||t[26]!==i||t[27]!==a?(Z={key:"workflows",label:"Workflows",icon:G,onClick:()=>l({to:"/$org/$project/workflows",params:{org:i,project:a}})},t[25]=l,t[26]=i,t[27]=a,t[28]=Z):Z=t[28];const X=[{type:"items",items:[j,q,Z]}];if(A.length>0){let P;t[29]===Symbol.for("react.memo_cache_sentinel")?(P={type:"divider"},t[29]=P):P=t[29],X.push(P);let F;t[30]!==A?(F={type:"items",items:A},t[30]=A,t[31]=F):F=t[31],X.push(F)}if(H.length>0){if(A.length===0){let P;t[32]===Symbol.for("react.memo_cache_sentinel")?(P={type:"divider"},t[32]=P):P=t[32],X.push(P)}X.push(...H)}return X}const rn="sidebar_state",ln=3600*24*7,on="16rem",an="18rem",cn="3rem",dn="b",Gt=y.createContext(null);function Ge(){const t=y.useContext(Gt);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function mn(t){const e=N.c(21),{defaultOpen:s,open:r,onOpenChange:l,children:o}=t,i=s===void 0?!0:s,a=Pe(),[c,d]=y.useState(!1),[m,f]=y.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=`${rn}=${k}; path=/; max-age=${ln}`},e[0]=u,e[1]=l,e[2]=p):p=e[2];const h=p;let x;e[3]!==a||e[4]!==h?(x=()=>a?d(un):h(fn),e[3]=a,e[4]=h,e[5]=x):x=e[5];const j=x;let b,g;e[6]!==j?(b=()=>{const O=k=>{if(k.key===dn&&(k.metaKey||k.ctrlKey)){const $=k.target;if($.tagName==="INPUT"||$.tagName==="TEXTAREA"||$.isContentEditable)return;k.preventDefault(),j()}};return globalThis.addEventListener("keydown",O),()=>globalThis.removeEventListener("keydown",O)},g=[j],e[6]=j,e[7]=b,e[8]=g):(b=e[7],g=e[8]),y.useEffect(b,g);const v=u?"expanded":"collapsed";let S;e[9]!==a||e[10]!==u||e[11]!==c||e[12]!==h||e[13]!==v||e[14]!==j?(S={state:v,open:u,setOpen:h,isMobile:a,openMobile:c,setOpenMobile:d,toggleSidebar:j},e[9]=a,e[10]=u,e[11]=c,e[12]=h,e[13]=v,e[14]=j,e[15]=S):S=e[15];const C=S;let w;e[16]!==o?(w=n.jsx(vt,{delayDuration:0,children:o}),e[16]=o,e[17]=w):w=e[17];let _;return e[18]!==C||e[19]!==w?(_=n.jsx(Gt.Provider,{value:C,children:w}),e[18]=C,e[19]=w,e[20]=_):_=e[20],_}function fn(t){return!t}function un(t){return!t}function pn(t){const e=N.c(14);let s,r,l,o;e[0]!==t?({className:r,style:o,children:s,...l}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o):(s=e[1],r=e[2],l=e[3],o=e[4]);let i;e[5]!==o?(i={"--sidebar-width":on,"--sidebar-width-icon":cn,...o},e[5]=o,e[6]=i):i=e[6];const a=i;let c;e[7]!==r?(c=z("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",r),e[7]=r,e[8]=c):c=e[8];let d;return e[9]!==s||e[10]!==l||e[11]!==a||e[12]!==c?(d=n.jsx("div",{"data-slot":"sidebar-wrapper",style:a,className:c,...l,children:s}),e[9]=s,e[10]=l,e[11]=a,e[12]=c,e[13]=d):d=e[13],d}function hn(t){const e=N.c(46);let s,r,l,o,i,a;e[0]!==t?({side:o,variant:i,collapsible:a,className:r,children:s,...l}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o,e[5]=i,e[6]=a):(s=e[1],r=e[2],l=e[3],o=e[4],i=e[5],a=e[6]);const c=o===void 0?"left":o,d=i===void 0?"sidebar":i,m=a===void 0?"offcanvas":a,{isMobile:f,state:u,openMobile:p,setOpenMobile:h}=Ge();if(m==="none"){let k;e[7]!==r?(k=z("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),e[7]=r,e[8]=k):k=e[8];let $;return e[9]!==s||e[10]!==l||e[11]!==k?($=n.jsx("div",{"data-slot":"sidebar",className:k,...l,children:s}),e[9]=s,e[10]=l,e[11]=k,e[12]=$):$=e[12],$}if(f){let k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k={"--sidebar-width":an},e[13]=k):k=e[13];let $;e[14]===Symbol.for("react.memo_cache_sentinel")?($=n.jsxs($s,{className:"sr-only",children:[n.jsx(Is,{children:"Sidebar"}),n.jsx(Os,{children:"Displays the mobile sidebar."})]}),e[14]=$):$=e[14];let I;e[15]!==s?(I=n.jsx("div",{className:"flex h-full w-full flex-col",children:s}),e[15]=s,e[16]=I):I=e[16];let M;e[17]!==c||e[18]!==I?(M=n.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]=I,e[19]=M):M=e[19];let T;return e[20]!==p||e[21]!==l||e[22]!==h||e[23]!==M?(T=n.jsx(zs,{open:p,onOpenChange:h,...l,children:M}),e[20]=p,e[21]=l,e[22]=h,e[23]=M,e[24]=T):T=e[24],T}const x=u==="collapsed"?m:"",j=d==="floating"||d==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let b;e[25]!==j?(b=z("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",j),e[25]=j,e[26]=b):b=e[26];let g;e[27]!==b?(g=n.jsx("div",{"data-slot":"sidebar-gap",className:b}),e[27]=b,e[28]=g):g=e[28];const v=c==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",S=d==="floating"||d==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let C;e[29]!==r||e[30]!==v||e[31]!==S?(C=z("fixed top-12 bottom-0 z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",v,S,r),e[29]=r,e[30]=v,e[31]=S,e[32]=C):C=e[32];let w;e[33]!==s?(w=n.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border pt-2 flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:s}),e[33]=s,e[34]=w):w=e[34];let _;e[35]!==l||e[36]!==C||e[37]!==w?(_=n.jsx("div",{"data-slot":"sidebar-container",className:C,...l,children:w}),e[35]=l,e[36]=C,e[37]=w,e[38]=_):_=e[38];let O;return e[39]!==c||e[40]!==u||e[41]!==_||e[42]!==x||e[43]!==g||e[44]!==d?(O=n.jsxs("div",{className:"group peer text-foreground hidden md:block","data-state":u,"data-collapsible":x,"data-variant":d,"data-side":c,"data-slot":"sidebar",children:[g,_]}),e[39]=c,e[40]=u,e[41]=_,e[42]=x,e[43]=g,e[44]=d,e[45]=O):O=e[45],O}function xn(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("main",{"data-slot":"sidebar-inset",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Kt(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex flex-col gap-2 p-2",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function gn(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex flex-col gap-2 px-2 items-start justify-start",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function ot(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("h-4 m-0! w-full",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-sidebar":"separator",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function jn(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Ie(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Oe(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("w-full text-sm",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function me(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex w-full min-w-0 flex-col gap-1",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function le(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("group/menu-item relative",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}const bn=is("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg px-2 py-1.5 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding,colors] transition-colors duration-150 ease-out hover:transition-none focus-visible:ring-2 active:bg-sidebar-accent/75 disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent/75 [&>span:last-child]:truncate [&>svg]:size-[18px] [&>svg]:shrink-0 [&>svg]:text-muted-foreground",{variants:{variant:{default:"hover:bg-sidebar-accent text-sidebar-foreground/80 active:text-sidebar-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-7 text-sm font-[450]",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Te(t){const e=N.c(28);let s,r,l,o,i,a,c;e[0]!==t?({asChild:l,isActive:o,variant:i,size:a,tooltip:c,className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o,e[5]=i,e[6]=a,e[7]=c):(s=e[1],r=e[2],l=e[3],o=e[4],i=e[5],a=e[6],c=e[7]);const d=l===void 0?!1:l,m=o===void 0?!1:o,f=i===void 0?"default":i,u=a===void 0?"default":a,p=d?os:"button",{isMobile:h,state:x}=Ge();let j;e[8]!==s||e[9]!==u||e[10]!==f?(j=z(bn({variant:f,size:u}),s),e[8]=s,e[9]=u,e[10]=f,e[11]=j):j=e[11];let b;e[12]!==p||e[13]!==m||e[14]!==r||e[15]!==u||e[16]!==j?(b=n.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":u,"data-active":m,className:j,...r}),e[12]=p,e[13]=m,e[14]=r,e[15]=u,e[16]=j,e[17]=b):b=e[17];const g=b;if(!c)return g;if(typeof c=="string"){let _;e[18]!==c?(_={children:c},e[18]=c,e[19]=_):_=e[19],c=_}let v;e[20]!==g?(v=n.jsx(Re,{asChild:!0,children:g}),e[20]=g,e[21]=v):v=e[21];const S=x!=="collapsed"||h;let C;e[22]!==S||e[23]!==c?(C=n.jsx(De,{side:"right",align:"center",hidden:S,...c}),e[22]=S,e[23]=c,e[24]=C):C=e[24];let w;return e[25]!==v||e[26]!==C?(w=n.jsxs(He,{children:[v,C]}),e[25]=v,e[26]=C,e[27]=w):w=e[27],w}function vn(t){const e=N.c(18),{label:s,children:r,defaultExpanded:l}=t,o=l===void 0?!0:l,[i,a]=y.useState(o);let c;e[0]!==i?(c=()=>a(!i),e[0]=i,e[1]=c):c=e[1];let d;e[2]!==s?(d=n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s}),e[2]=s,e[3]=d):d=e[3];const m=!i&&"-rotate-90";let f;e[4]!==m?(f=z("text-muted-foreground transition-transform duration-200",m),e[4]=m,e[5]=f):f=e[5];let u;e[6]!==f?(u=n.jsx(tt,{size:12,className:f}),e[6]=f,e[7]=u):u=e[7];let p;e[8]!==c||e[9]!==d||e[10]!==u?(p=n.jsx(me,{children:n.jsx(le,{children:n.jsxs(Te,{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 h;e[12]!==r||e[13]!==i?(h=i&&n.jsx(Oe,{children:n.jsx(me,{className:"gap-0.5",children:r})}),e[12]=r,e[13]=i,e[14]=h):h=e[14];let x;return e[15]!==p||e[16]!==h?(x=n.jsxs(Ie,{className:"py-0",children:[p,h]}),e[15]=p,e[16]=h,e[17]=x):x=e[17],x}function Zt(t){const e=N.c(13),{item:s}=t;let r;e[0]!==s.icon?(r=n.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:s.icon}),e[0]=s.icon,e[1]=r):r=e[1];let l;e[2]!==s.label?(l=n.jsx("span",{className:"truncate",children:s.label}),e[2]=s.label,e[3]=l):l=e[3];let o;e[4]!==s.isActive||e[5]!==s.label||e[6]!==s.onClick||e[7]!==r||e[8]!==l?(o=n.jsxs(Te,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:s.onClick,isActive:s.isActive,tooltip:s.label,children:[r,l]}),e[4]=s.isActive,e[5]=s.label,e[6]=s.onClick,e[7]=r,e[8]=l,e[9]=o):o=e[9];let i;return e[10]!==s.key||e[11]!==o?(i=n.jsx(le,{children:o},s.key),e[10]=s.key,e[11]=o,e[12]=i):i=e[12],i}function Nn(t){const e=N.c(12),{section:s}=t;switch(s.type){case"divider":{let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ot,{className:"my-2"}),e[0]=r):r=e[0],r}case"spacer":{let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("div",{className:"flex-1"}),e[1]=r):r=e[1],r}case"group":{const r=s.group.label,l=s.group.defaultExpanded;let o;e[2]!==s.group.items?(o=s.group.items.map(yn),e[2]=s.group.items,e[3]=o):o=e[3];let i;return e[4]!==s.group.defaultExpanded||e[5]!==s.group.label||e[6]!==o?(i=n.jsx(vn,{label:r,defaultExpanded:l,children:o}),e[4]=s.group.defaultExpanded,e[5]=s.group.label,e[6]=o,e[7]=i):i=e[7],i}case"items":{let r;e[8]!==s.items?(r=s.items.map(Sn),e[8]=s.items,e[9]=r):r=e[9];let l;return e[10]!==r?(l=n.jsx(Ie,{className:"py-0",children:n.jsx(Oe,{children:n.jsx(me,{className:"gap-0.5",children:r})})}),e[10]=r,e[11]=l):l=e[11],l}}}function Sn(t){return n.jsx(Zt,{item:t},t.key)}function yn(t){return n.jsx(Zt,{item:t},t.key)}function Yt(t){const e=N.c(14),{sections:s,header:r,footer:l,additionalContent:o,variant:i,collapsible:a,contentClassName:c}=t,d=i===void 0?"sidebar":i,m=a===void 0?"icon":a;let f;e[0]!==c?(f=z("flex flex-col flex-1 overflow-x-hidden font-medium border-r pb-2",c),e[0]=c,e[1]=f):f=e[1];let u;e[2]!==s?(u=s.map(wn),e[2]=s,e[3]=u):u=e[3];let p;e[4]!==o||e[5]!==f||e[6]!==u?(p=n.jsxs(jn,{className:f,children:[u,o]}),e[4]=o,e[5]=f,e[6]=u,e[7]=p):p=e[7];let h;return e[8]!==m||e[9]!==l||e[10]!==r||e[11]!==p||e[12]!==d?(h=n.jsxs(hn,{variant:d,collapsible:m,children:[r,p,l]}),e[8]=m,e[9]=l,e[10]=r,e[11]=p,e[12]=d,e[13]=h):h=e[13],h}function wn(t,e){return n.jsx(Nn,{section:t},e)}Yt.Skeleton=function(){return n.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,s)=>n.jsx("div",{className:"w-full h-8",children:n.jsx(ee,{className:"h-full bg-sidebar-accent rounded-md"})},s))})};const Cn="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 ze(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z(Cn,s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx(te,{variant:"ghost",size:"sm",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function kn({invitation:t,onStatusChange:e}){const[s,r]=y.useState(!1),[l,o]=y.useState(!1),i=ue(),a=async()=>{r(!0);try{const p=await oe.organization.acceptInvitation({invitationId:t.id});if(p.error)ce.error(p.error.message),r(!1);else{e(t.id,"accepted");const h=await oe.organization.setActive({organizationId:t.organizationId});h?.data?.slug?(ce.success("Invitation accepted!"),i({to:"/$org",params:{org:h.data.slug}})):(ce.success("Invitation accepted! Redirecting..."),i({to:"/"}))}}catch{ce.error("Failed to accept invitation"),r(!1)}},c=async()=>{o(!0);try{const p=await oe.organization.rejectInvitation({invitationId:t.id});p.error?(ce.error(p.error.message),o(!1)):(ce.success("Invitation rejected"),e(t.id,"rejected"),o(!1))}catch{ce.error("Failed to reject invitation"),o(!1)}},d=t.organizationName||t.organizationId,m=t.status==="pending",f=t.status==="accepted",u=t.status==="rejected";return n.jsxs("div",{className:z("flex items-center gap-3 px-3 py-2 h-12 border-b border-border/50 last:border-b-0",!m&&"opacity-50"),children:[n.jsx("div",{className:"shrink-0 size-5 flex items-center justify-center",children:n.jsx(Wt,{size:16,className:"text-muted-foreground"})}),n.jsxs("p",{className:"flex-1 text-sm text-foreground min-w-0 whitespace-nowrap overflow-hidden",children:["You have been invited to ",n.jsx("span",{className:"font-semibold inline-block max-w-[200px] truncate align-bottom",children:d})]}),n.jsx("div",{className:"flex items-center gap-1 shrink-0",children:m?n.jsxs(n.Fragment,{children:[n.jsx(te,{variant:"ghost",size:"icon",onClick:c,disabled:s||l,className:"h-8 w-8",children:n.jsx(ct,{size:14})}),n.jsx(te,{variant:"outline",size:"icon",onClick:a,disabled:s||l,className:"h-8 w-8",children:n.jsx($e,{size:14})})]}):f?n.jsxs(at,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx($e,{size:12}),"Accepted"]}):u?n.jsxs(at,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx(ct,{size:12}),"Declined"]}):null})]})}function _n(){const[t,e]=y.useState(!1),s=y.useContext(as),{data:r}=s.hooks.useListUserInvitations(),{data:l}=oe.useListOrganizations(),[o,i]=y.useState({}),m=(r??[]).filter(x=>new Date(x.expiresAt)>new Date).map(x=>{const j=(l??[]).find(b=>b.id===x.organizationId);return{...x,organizationSlug:j?.slug||x.organizationSlug,organizationName:j?.name||x.organizationName}}).map(x=>({...x,status:o[x.id]||x.status})),f=[...m].sort((x,j)=>{const b={pending:0,accepted:1,rejected:2};return(b[x.status]??999)-(b[j.status]??999)}),p=m.filter(x=>x.status==="pending").length>0,h=(x,j)=>{i(b=>({...b,[x]:j}))};return n.jsxs(st,{open:t,onOpenChange:e,children:[n.jsx(nt,{asChild:!0,children:n.jsxs(ze,{children:[n.jsx(it,{size:18}),"Inbox",p&&n.jsx("span",{className:"ml-auto h-2 w-2 rounded-full bg-destructive"})]})}),n.jsxs(rt,{side:"right",align:"start",className:"w-[400px] p-0 overflow-hidden",children:[n.jsx("div",{className:"px-4 py-3 border-b border-border",children:n.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Inbox"})}),n.jsx("div",{className:"max-h-96 overflow-auto",children:f.length>0?f.map(x=>n.jsx(kn,{invitation:x,onStatusChange:h},x.id)):n.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[n.jsx(it,{size:32,className:"text-muted-foreground/40 mb-2"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"No invitations at the moment"})]})})]})]})}function zn(t){const e=N.c(29),{user:s,userImage:r,onOpenSettings:l}=t;let o;e[0]!==s?(o=async()=>{if(!s)return;const _=`ID: ${s.id}
|
|
2
2
|
Name: ${s.name||"N/A"}
|
|
3
|
-
Email: ${s.email}`;try{await navigator.clipboard.writeText(_),ce.success("User info copied to clipboard")}catch{ce.error("Failed to copy user info to clipboard")}},e[0]=s,e[1]=o):o=e[1];const i=o,a=s.name||s.email||"U";let c;e[2]!==a||e[3]!==r?(c=n.jsx(de,{url:r,fallback:a,shape:"circle",size:"sm",className:"size-8 shrink-0"}),e[2]=a,e[3]=r,e[4]=c):c=e[4];const d=s.name||"User";let m;e[5]!==d?(m=n.jsx("span",{className:"text-sm text-sidebar-foreground truncate font-[450]",children:d}),e[5]=d,e[6]=m):m=e[6];let f;e[7]!==s.email?(f=n.jsx("span",{className:"text-xs text-muted-foreground truncate font-normal",children:s.email}),e[7]=s.email,e[8]=f):f=e[8];let u;e[9]!==m||e[10]!==f?(u=n.jsxs("div",{className:"flex flex-col min-w-0 text-left",children:[m,f]}),e[9]=m,e[10]=f,e[11]=u):u=e[11];let p;e[12]!==i||e[13]!==c||e[14]!==u?(p=n.jsxs(te,{variant:"ghost",onClick:i,className:"h-auto p-2 m-1 mb-0 justify-start gap-2 hover:bg-sidebar-accent hover:text-inherit active:bg-sidebar-accent/75",children:[c,u]}),e[12]=i,e[13]=c,e[14]=u,e[15]=p):p=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(_n,{}),e[16]=x):x=e[16];let h;e[17]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Vt,{size:18}),e[17]=h):h=e[17];let j;e[18]!==l?(j=n.jsxs(ze,{onClick:l,children:[h,"Preferences"]}),e[18]=l,e[19]=j):j=e[19];let b;e[20]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(ze,{asChild:!0,children:n.jsxs("a",{href:"https://www.decocms.com/terms-of-use",target:"_blank",rel:"noopener noreferrer",children:[n.jsx(Et,{size:18}),n.jsx("span",{className:"flex-1",children:"Terms & Conditions"}),n.jsx(qe,{size:14})]})}),e[20]=b):b=e[20];let g;e[21]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(ze,{asChild:!0,children:n.jsxs("a",{href:"https://github.com/decocms/mesh",target:"_blank",rel:"noopener noreferrer",children:[n.jsx(ht,{className:"size-[18px]"}),n.jsx("span",{className:"flex-1",children:"decocms/mesh"}),n.jsx(qe,{size:14})]})}),e[21]=g):g=e[21];let v;e[22]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsxs(ze,{onClick:$n,children:[n.jsx(Ft,{size:18}),"Log out"]}),e[22]=v):v=e[22];let S;e[23]!==j?(S=n.jsxs("div",{className:"p-1 flex flex-col",children:[x,j,b,g,v]}),e[23]=j,e[24]=S):S=e[24];let C;e[25]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx("div",{className:"mt-auto px-3 py-2 border-t border-border",children:n.jsxs("span",{className:"text-[11px] text-muted-foreground/75",children:["v","2.83.0"]})}),e[25]=C):C=e[25];let w;return e[26]!==S||e[27]!==p?(w=n.jsx(n.Fragment,{children:n.jsxs("div",{className:"flex flex-col gap-0.5 bg-sidebar min-w-[250px]",children:[p,S,C]})}),e[26]=S,e[27]=p,e[28]=w):w=e[28],w}function $n(){return oe.signOut()}function In(t){const e=N.c(26),{org:s,isActive:r,isHovered:l,onClick:o,onSettings:i,onHover:a}=t,c=r,d=l&&!r,m=l&&"bg-accent/50",f=r&&!l&&"bg-accent hover:bg-accent";let u;e[0]!==m||e[1]!==f?(u=z("flex items-center gap-2 w-full justify-start font-normal h-10 px-2 rounded-lg cursor-pointer transition-colors",m,f),e[0]=m,e[1]=f,e[2]=u):u=e[2];let p;e[3]!==o?(p=S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),o?.())},e[3]=o,e[4]=p):p=e[4];let x;e[5]!==a||e[6]!==s.id?(x=()=>a?.(s.id),e[5]=a,e[6]=s.id,e[7]=x):x=e[7];const h=s.logo??void 0;let j;e[8]!==s.name||e[9]!==h?(j=n.jsx(de,{url:h,fallback:s.name,size:"sm",className:"size-6 shrink-0 rounded-md",objectFit:"cover"}),e[8]=s.name,e[9]=h,e[10]=j):j=e[10];let b;e[11]!==s.name?(b=n.jsx("span",{className:"flex-1 text-sm text-foreground truncate text-left min-w-0",children:s.name}),e[11]=s.name,e[12]=b):b=e[12];let g;e[13]!==i||e[14]!==s.name||e[15]!==d||e[16]!==c?(g=i&&c?n.jsx("button",{type:"button","aria-label":`${s.name} settings`,className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:S=>{S.stopPropagation(),i()},children:n.jsx(lt,{size:16,className:"text-muted-foreground"})}):d?n.jsx(_t,{size:16,className:"text-muted-foreground shrink-0"}):n.jsx("span",{className:"size-5 shrink-0","aria-hidden":"true"}),e[13]=i,e[14]=s.name,e[15]=d,e[16]=c,e[17]=g):g=e[17];let v;return e[18]!==o||e[19]!==u||e[20]!==p||e[21]!==x||e[22]!==j||e[23]!==b||e[24]!==g?(v=n.jsxs("div",{role:"button",tabIndex:0,className:u,onClick:o,onKeyDown:p,onMouseEnter:x,children:[j,b,g]}),e[18]=o,e[19]=u,e[20]=p,e[21]=x,e[22]=j,e[23]=b,e[24]=g,e[25]=v):v=e[25],v}function On(t){const e=N.c(34),{currentOrgSlug:s,hoveredOrgId:r,onOrgSelect:l,onOrgSettings:o,onPopoverClose:i,onCreateOrganization:a,onOrgHover:c}=t,{data:d}=oe.useListOrganizations();let m,f,u,p;if(e[0]!==s||e[1]!==r||e[2]!==a||e[3]!==c||e[4]!==l||e[5]!==o||e[6]!==i||e[7]!==d){let j;e[12]!==s?(j=(w,_)=>w.slug===s?-1:_.slug===s?1:w.name.localeCompare(_.name),e[12]=s,e[13]=j):j=e[13];const b=[...d??[]].sort(j);u="flex flex-col min-w-[240px] border-l border-border";let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx("span",{className:"text-xs text-muted-foreground truncate",children:"Your Organizations"}),e[14]=g):g=e[14];let v;e[15]!==a||e[16]!==i?(v=()=>{i(),a()},e[15]=a,e[16]=i,e[17]=v):v=e[17];let S;e[18]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(Ve,{size:16,className:"text-muted-foreground"}),e[18]=S):S=e[18],e[19]!==v?(p=n.jsxs("div",{className:"flex items-center justify-between h-10 px-3 border-b border-border",children:[g,n.jsx(te,{variant:"ghost",size:"icon",className:"size-5",onClick:v,children:S})]}),e[19]=v,e[20]=p):p=e[20],m="flex flex-col gap-0.5 p-1 flex-1 overflow-y-auto";let C;e[21]!==s||e[22]!==r||e[23]!==c||e[24]!==l||e[25]!==o?(C=w=>n.jsx(In,{org:w,isActive:w.slug===s,isHovered:w.id===r,onClick:()=>l(w.slug),onSettings:()=>o(w.slug),onHover:c},w.slug),e[21]=s,e[22]=r,e[23]=c,e[24]=l,e[25]=o,e[26]=C):C=e[26],f=b.map(C),e[0]=s,e[1]=r,e[2]=a,e[3]=c,e[4]=l,e[5]=o,e[6]=i,e[7]=d,e[8]=m,e[9]=f,e[10]=u,e[11]=p}else m=e[8],f=e[9],u=e[10],p=e[11];let x;e[27]!==m||e[28]!==f?(x=n.jsx("div",{className:m,children:f}),e[27]=m,e[28]=f,e[29]=x):x=e[29];let h;return e[30]!==u||e[31]!==p||e[32]!==x?(h=n.jsxs("div",{className:u,children:[p,x]}),e[30]=u,e[31]=p,e[32]=x,e[33]=h):h=e[33],h}function Pn(t){const e=N.c(27),{project:s,isActive:r,onClick:l,onSettings:o}=t,[i,a]=y.useState(!1),c=r||i,d=s.ui?.themeColor??"#3B82F6",m=r&&"bg-accent hover:bg-accent";let f;e[0]!==m?(f=z("flex items-center gap-2 w-full justify-start font-normal h-10 px-2 rounded-lg cursor-pointer transition-colors hover:bg-accent/50",m),e[0]=m,e[1]=f):f=e[1];let u;e[2]!==l?(u=S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),l?.())},e[2]=l,e[3]=u):u=e[3];let p,x;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=()=>a(!0),x=()=>a(!1),e[4]=p,e[5]=x):(p=e[4],x=e[5]);let h;e[6]!==s.name||e[7]!==s.ui||e[8]!==d?(h=s.ui?.icon?n.jsx("img",{src:s.ui.icon,alt:"",className:"size-6 rounded-md object-cover shrink-0"}):n.jsx(de,{fallback:s.name,size:"sm",shape:"square",className:"size-6 shrink-0 rounded-md",style:{backgroundColor:d}}),e[6]=s.name,e[7]=s.ui,e[8]=d,e[9]=h):h=e[9];let j;e[10]!==s.name?(j=n.jsx("span",{className:"flex-1 text-sm text-foreground truncate text-left min-w-0",children:s.name}),e[10]=s.name,e[11]=j):j=e[11];let b;e[12]!==r?(b=r&&n.jsx($e,{size:16,className:"text-muted-foreground shrink-0"}),e[12]=r,e[13]=b):b=e[13];let g;e[14]!==r||e[15]!==o||e[16]!==s.name||e[17]!==c?(g=o&&c&&!r?n.jsx("button",{type:"button","aria-label":`${s.name} settings`,className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:S=>{S.stopPropagation(),o()},children:n.jsx(lt,{size:16,className:"text-muted-foreground"})}):r?null:n.jsx("span",{className:"size-5 shrink-0","aria-hidden":"true"}),e[14]=r,e[15]=o,e[16]=s.name,e[17]=c,e[18]=g):g=e[18];let v;return e[19]!==l||e[20]!==f||e[21]!==u||e[22]!==h||e[23]!==j||e[24]!==b||e[25]!==g?(v=n.jsxs("div",{role:"button",tabIndex:0,className:f,onClick:l,onKeyDown:u,onMouseEnter:p,onMouseLeave:x,children:[h,j,b,g]}),e[19]=l,e[20]=f,e[21]=u,e[22]=h,e[23]=j,e[24]=b,e[25]=g,e[26]=v):v=e[26],v}function Tn(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsxs("div",{className:"space-y-1 px-2 py-1",children:[n.jsx(ee,{className:"h-10 w-full"}),n.jsx(ee,{className:"h-10 w-full"})]}),t[0]=e):e=t[0],e}function Mn(t){const e=N.c(16),{organizationId:s,currentProjectSlug:r,onProjectSelect:l,onProjectSettings:o,orgSlug:i}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={suspense:!0},e[0]=a):a=e[0];const{data:c}=kt(s,a);let d,m;if(e[1]!==r||e[2]!==l||e[3]!==o||e[4]!==i||e[5]!==c){m=Symbol.for("react.early_return_sentinel");e:{const u=c?.filter(En)??[];if(u.length===0){let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx("div",{className:"px-3 py-4 text-center text-sm text-muted-foreground",children:"No projects yet"}),e[8]=x):x=e[8],m=x;break e}let p;e[9]!==r||e[10]!==l||e[11]!==o||e[12]!==i?(p=x=>n.jsx(Pn,{project:x,isActive:r===x.slug,onClick:()=>l(i,x.slug),onSettings:o?()=>o(i,x.slug):void 0},x.id),e[9]=r,e[10]=l,e[11]=o,e[12]=i,e[13]=p):p=e[13],d=u.map(p)}e[1]=r,e[2]=l,e[3]=o,e[4]=i,e[5]=c,e[6]=d,e[7]=m}else d=e[6],m=e[7];if(m!==Symbol.for("react.early_return_sentinel"))return m;let f;return e[14]!==d?(f=n.jsx(n.Fragment,{children:d}),e[14]=d,e[15]=f):f=e[15],f}function En(t){return t.slug!==Q}function An(t){const e=N.c(17),{organizationId:s,organizationName:r,currentProjectSlug:l,onProjectSelect:o,onProjectSettings:i,onCreateProject:a,orgSlug:c}=t;let d;e[0]!==r?(d=n.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["Projects in ",r]}),e[0]=r,e[1]=d):d=e[1];let m;e[2]!==a?(m=a&&n.jsx("button",{type:"button",className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:a,"aria-label":"Create project",children:n.jsx(Ve,{size:16,className:"text-muted-foreground"})}),e[2]=a,e[3]=m):m=e[3];let f;e[4]!==d||e[5]!==m?(f=n.jsxs("div",{className:"flex items-center justify-between h-10 px-3 border-b border-border",children:[d,m]}),e[4]=d,e[5]=m,e[6]=f):f=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Tn,{}),e[7]=u):u=e[7];let p;e[8]!==l||e[9]!==o||e[10]!==i||e[11]!==c||e[12]!==s?(p=n.jsx("div",{className:"flex flex-col gap-0.5 p-1 flex-1 overflow-y-auto",children:n.jsx(y.Suspense,{fallback:u,children:n.jsx(Mn,{organizationId:s,currentProjectSlug:l,onProjectSelect:o,onProjectSettings:i,orgSlug:c})})}),e[8]=l,e[9]=o,e[10]=i,e[11]=c,e[12]=s,e[13]=p):p=e[13];let x;return e[14]!==f||e[15]!==p?(x=n.jsxs("div",{className:"flex flex-col min-w-[250px] border-l border-border",children:[f,p]}),e[14]=f,e[15]=p,e[16]=x):x=e[16],x}function qt(t){const e=N.c(67),{open:s,onOpenChange:r,user:l,userImage:o}=t,[i,a]=Fe(),[c,d]=y.useState(!1);let m;e[0]!==l.id?(m=()=>{navigator.clipboard.writeText(l.id),d(!0),setTimeout(()=>d(!1),2e3)},e[0]=l.id,e[1]=m):m=e[1];const f=m;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(As,{className:"text-base",children:"Profile Settings"}),e[2]=u):u=e[2];let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsxs(Ls,{className:"px-6 pt-6 pb-4 border-b border-border shrink-0 relative",children:[u,n.jsxs(Ds,{className:"absolute top-1/2 right-4 -translate-y-1/2 cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[n.jsx(Ue,{size:16}),n.jsx("span",{className:"sr-only",children:"Close"})]})]}),e[3]=p):p=e[3];const x=l.name||"U";let h;e[4]!==x||e[5]!==o?(h=n.jsx(de,{url:o,fallback:x,shape:"circle",size:"xl",className:"h-16 w-16"}),e[4]=x,e[5]=o,e[6]=h):h=e[6];const j=l.name||"User";let b;e[7]!==j?(b=n.jsx("span",{className:"text-base font-medium text-foreground",children:j}),e[7]=j,e[8]=b):b=e[8];let g;e[9]!==l.email?(g=n.jsx("span",{className:"text-sm text-muted-foreground",children:l.email}),e[9]=l.email,e[10]=g):g=e[10];let v;e[11]!==b||e[12]!==g?(v=n.jsxs("div",{className:"flex flex-col gap-1",children:[b,g]}),e[11]=b,e[12]=g,e[13]=v):v=e[13];let S;e[14]!==h||e[15]!==v?(S=n.jsxs("div",{className:"flex items-center gap-4",children:[h,v]}),e[14]=h,e[15]=v,e[16]=S):S=e[16];let C;e[17]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Preferences"}),e[17]=C):C=e[17];let w;e[18]!==a?(w=()=>a(Hn),e[18]=a,e[19]=w):w=e[19];let _;e[20]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[n.jsxs(dt,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[n.jsx(Us,{size:16,className:"text-muted-foreground"}),"Developer Mode"]}),n.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Show technical details like JSON input/output for tool calls"})]}),e[20]=_):_=e[20];let O;e[21]!==a?(O=J=>a(X=>({...X,devMode:J})),e[21]=a,e[22]=O):O=e[22];let k;e[23]!==i.devMode||e[24]!==O?(k=n.jsx("div",{onClick:Rn,children:n.jsx(mt,{checked:i.devMode,onCheckedChange:O})}),e[23]=i.devMode,e[24]=O,e[25]=k):k=e[25];let $;e[26]!==w||e[27]!==k?($=n.jsxs("div",{className:"flex flex-col gap-2",children:[C,n.jsxs("button",{type:"button",onClick:w,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[_,k]})]}),e[26]=w,e[27]=k,e[28]=$):$=e[28];let I,M;e[29]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Experimental"}),M=n.jsx("p",{className:"text-xs text-muted-foreground",children:"Experimental features are unstable and may change or stop working at any time."}),e[29]=I,e[30]=M):(I=e[29],M=e[30]);let T;e[31]!==a?(T=()=>a(Dn),e[31]=a,e[32]=T):T=e[32];let U;e[33]===Symbol.for("react.memo_cache_sentinel")?(U=n.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[n.jsxs(dt,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[n.jsx(xt,{size:16,className:"text-muted-foreground"}),"Projects"]}),n.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Enable the projects feature in the sidebar"})]}),e[33]=U):U=e[33];let E;e[34]!==a?(E=J=>a(X=>({...X,experimental_projects:J})),e[34]=a,e[35]=E):E=e[35];let L;e[36]!==i.experimental_projects||e[37]!==E?(L=n.jsx("div",{onClick:Ln,children:n.jsx(mt,{checked:i.experimental_projects,onCheckedChange:E})}),e[36]=i.experimental_projects,e[37]=E,e[38]=L):L=e[38];let D;e[39]!==T||e[40]!==L?(D=n.jsxs("div",{className:"flex flex-col gap-2",children:[I,M,n.jsxs("button",{type:"button",onClick:T,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[U,L]})]}),e[39]=T,e[40]=L,e[41]=D):D=e[41];let A;e[42]!==S||e[43]!==$||e[44]!==D?(A=n.jsxs("div",{className:"p-5 space-y-6 min-h-[225px]",children:[S,$,D]}),e[42]=S,e[43]=$,e[44]=D,e[45]=A):A=e[45];let R;e[46]!==l.id?(R=n.jsx("span",{className:"font-mono text-xs",children:l.id}),e[46]=l.id,e[47]=R):R=e[47];let B;e[48]!==c?(B=c?n.jsx($e,{size:14,className:"text-green-600"}):n.jsx($t,{size:14,className:"opacity-0 group-hover:opacity-100 transition-opacity"}),e[48]=c,e[49]=B):B=e[49];let H;e[50]!==f||e[51]!==R||e[52]!==B?(H=n.jsx(Re,{asChild:!0,children:n.jsxs("button",{type:"button",onClick:f,className:"group flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[R,B]})}),e[50]=f,e[51]=R,e[52]=B,e[53]=H):H=e[53];let W;e[54]===Symbol.for("react.memo_cache_sentinel")?(W=n.jsx(De,{side:"top",children:n.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[54]=W):W=e[54];let V;e[55]!==H?(V=n.jsx(vt,{children:n.jsxs(He,{children:[H,W]})}),e[55]=H,e[56]=V):V=e[56];let q;e[57]===Symbol.for("react.memo_cache_sentinel")?(q=n.jsxs("span",{className:"text-xs text-muted-foreground/75",children:["v","2.83.0"]}),e[57]=q):q=e[57];let G;e[58]!==V?(G=n.jsxs("div",{className:"border-t border-border px-5 py-4 flex items-center justify-between shrink-0",children:[V,q]}),e[58]=V,e[59]=G):G=e[59];let Z;e[60]!==A||e[61]!==G?(Z=n.jsxs(Rs,{className:"sm:max-w-lg sm:max-h-[85vh] p-0 flex flex-col",closeButtonClassName:"hidden",children:[p,n.jsxs("div",{className:"flex flex-col",children:[A,G]})]}),e[60]=A,e[61]=G,e[62]=Z):Z=e[62];let K;return e[63]!==r||e[64]!==s||e[65]!==Z?(K=n.jsx(Hs,{open:s,onOpenChange:r,children:Z}),e[63]=r,e[64]=s,e[65]=Z,e[66]=K):K=e[66],K}function Ln(t){return t.stopPropagation()}function Dn(t){return{...t,experimental_projects:!t.experimental_projects}}function Rn(t){return t.stopPropagation()}function Hn(t){return{...t,devMode:!t.devMode}}function Jt(t){const e=N.c(77),{isCollapsed:s,variant:r,onCreateProject:l}=t,o=s===void 0?!1:s,i=r===void 0?"light":r,[a]=Fe();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[0]=c):c=e[0];const{org:d,project:m}=et(c),{data:f}=oe.useListOrganizations(),{data:u}=oe.useSession(),p=ue(),x=i==="dark",j=ie()?.project;let b;e[1]!==d||e[2]!==f?(b=f?.find(se=>se.slug===d),e[1]=d,e[2]=f,e[3]=b):b=e[3];const g=b,[v,S]=y.useState(!1),[C,w]=y.useState(!1),[_,O]=y.useState(!1),[k,$]=y.useState(null),I=u?.user,M=I?.image;let T;e[4]!==g||e[5]!==k||e[6]!==f?(T=k?f?.find(se=>se.id===k):g,e[4]=g,e[5]=k,e[6]=f,e[7]=T):T=e[7];const U=T;let E;e[8]!==p?(E=se=>{S(!1),p({to:"/$org/$project/settings",params:{org:se,project:Q}})},e[8]=p,e[9]=E):E=e[9];const L=E;let D;e[10]!==p?(D=se=>{S(!1),p({to:"/$org/$project",params:{org:se,project:Q}})},e[10]=p,e[11]=D):D=e[11];const A=D;let R;e[12]!==p?(R=(se,Ye)=>{S(!1),p({to:"/$org/$project",params:{org:se,project:Ye}})},e[12]=p,e[13]=R):R=e[13];const B=R;let H;e[14]!==p?(H=(se,Ye)=>{S(!1),p({to:"/$org/$project/settings",params:{org:se,project:Ye}})},e[14]=p,e[15]=H):H=e[15];const W=H;let V;e[16]!==l?(V=l?()=>{S(!1),l()}:void 0,e[16]=l,e[17]=V):V=e[17];const q=V;let G;e[18]===Symbol.for("react.memo_cache_sentinel")?(G=se=>{S(se),se||$(null)},e[18]=G):G=e[18];const Z=G;let K;e[19]!==g?(K=()=>{g&&$(g.id)},e[19]=g,e[20]=K):K=e[20];const J=K,X=x?"hover:bg-zinc-800 text-white":"hover:bg-sidebar-accent",P=o?"justify-center":"justify-start",F=o?"":"pl-0.5! px-1.5 gap-1.5";let Y;e[21]!==X||e[22]!==P||e[23]!==F?(Y=z("h-7 min-w-0 max-w-full",X,P,F),e[21]=X,e[22]=P,e[23]=F,e[24]=Y):Y=e[24];const fe=g?.logo??"",Ke=g?.name??"",Ze=x&&"border-none";let pe;e[25]!==Ze?(pe=z("shrink-0 rounded-[5px]",Ze),e[25]=Ze,e[26]=pe):pe=e[26];let xe;e[27]!==fe||e[28]!==Ke||e[29]!==pe?(xe=n.jsx(de,{url:fe,fallback:Ke,size:"xs",className:pe,objectFit:"cover"}),e[27]=fe,e[28]=Ke,e[29]=pe,e[30]=xe):xe=e[30];let he;e[31]!==g?.name||e[32]!==j||e[33]!==o||e[34]!==x?(he=!o&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:z("min-w-0 text-left",x&&"flex-1"),children:x&&j?n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"text-[10px] text-zinc-500 leading-none truncate",children:g?.name??"Select org"}),n.jsx("p",{className:"text-sm text-white font-normal leading-tight mt-0.5 truncate",children:j.name??j.slug})]}):n.jsx("span",{className:"truncate text-[14px] tracking-[-0.00625rem] font-medium text-foreground",children:g?.name??"Select org"})}),x?n.jsx(Nt,{className:"size-3 text-zinc-500 shrink-0"}):n.jsx(tt,{className:"size-3.5 text-muted-foreground shrink-0"})]}),e[31]=g?.name,e[32]=j,e[33]=o,e[34]=x,e[35]=he):he=e[35];let ge;e[36]!==J||e[37]!==Y||e[38]!==xe||e[39]!==he?(ge=n.jsx(nt,{asChild:!0,children:n.jsxs(te,{variant:"ghost",size:"sm",onClick:J,className:Y,children:[xe,he]})}),e[36]=J,e[37]=Y,e[38]=xe,e[39]=he,e[40]=ge):ge=e[40];let je;e[41]!==I||e[42]!==M?(je=I&&n.jsx(zn,{user:I,userImage:M,onOpenSettings:()=>{w(!0),S(!1)}}),e[41]=I,e[42]=M,e[43]=je):je=e[43];let Me,Ee;e[44]===Symbol.for("react.memo_cache_sentinel")?(Me=()=>S(!1),Ee=()=>O(!0),e[44]=Me,e[45]=Ee):(Me=e[44],Ee=e[45]);let be;e[46]!==L||e[47]!==A||e[48]!==k||e[49]!==d?(be=n.jsx(On,{currentOrgSlug:d,hoveredOrgId:k,onOrgSelect:A,onOrgSettings:L,onPopoverClose:Me,onCreateOrganization:Ee,onOrgHover:$}),e[46]=L,e[47]=A,e[48]=k,e[49]=d,e[50]=be):be=e[50];let ve;e[51]!==q||e[52]!==W||e[53]!==B||e[54]!==U||e[55]!==d||e[56]!==a.experimental_projects||e[57]!==m?(ve=a.experimental_projects&&U&&n.jsx(An,{organizationId:U.id,organizationName:U.name,orgSlug:U.slug,currentProjectSlug:U.slug===d?m:void 0,onProjectSelect:B,onProjectSettings:W,onCreateProject:q}),e[51]=q,e[52]=W,e[53]=B,e[54]=U,e[55]=d,e[56]=a.experimental_projects,e[57]=m,e[58]=ve):ve=e[58];let Ne;e[59]!==je||e[60]!==be||e[61]!==ve?(Ne=n.jsxs(rt,{align:"start",side:"bottom",className:"p-0 flex w-auto h-88 overflow-hidden",children:[je,be,ve]}),e[59]=je,e[60]=be,e[61]=ve,e[62]=Ne):Ne=e[62];let Se;e[63]!==v||e[64]!==ge||e[65]!==Ne?(Se=n.jsxs(st,{open:v,onOpenChange:Z,children:[ge,Ne]}),e[63]=v,e[64]=ge,e[65]=Ne,e[66]=Se):Se=e[66];let ye;e[67]!==C||e[68]!==I||e[69]!==M?(ye=I&&C&&I.email&&n.jsx(qt,{open:C,onOpenChange:w,user:{...I,name:I.name??void 0,email:I.email},userImage:M}),e[67]=C,e[68]=I,e[69]=M,e[70]=ye):ye=e[70];let we;e[71]!==_?(we=n.jsx(zt,{open:_,onOpenChange:O}),e[71]=_,e[72]=we):we=e[72];let Ae;return e[73]!==Se||e[74]!==ye||e[75]!==we?(Ae=n.jsxs(n.Fragment,{children:[Se,ye,we]}),e[73]=Se,e[74]=ye,e[75]=we,e[76]=Ae):Ae=e[76],Ae}Jt.Skeleton=function({variant:e="light"}){const s=e==="dark";return n.jsxs("div",{className:z("flex items-center gap-1.5 h-7 px-1.5 w-full",s&&"text-white"),children:[n.jsx(ee,{className:z("size-5 rounded-[5px] shrink-0",s&&"bg-zinc-800")}),n.jsx(ee,{className:z("h-3.5 flex-1",s&&"bg-zinc-800")})]})};function Xe(t){const e=N.c(71),{onCreateProject:s}=t,{state:r,toggleSidebar:l}=Ge(),o=r==="collapsed",[i,a]=We(),{locator:c}=ie();let d;e[0]!==c?(d=ke.isOrgAdminProject(c),e[0]=c,e[1]=d):d=e[1];const f=!d;let u;e[2]!==a?(u=()=>{a(Un)},e[2]=a,e[3]=u):u=e[3];const p=u,x=f&&"bg-[#030302] border-b border-zinc-800";let h;e[4]!==x?(h=z("h-12 gap-0 pt-0 border-r",x),e[4]=x,e[5]=h):h=e[5];const j=o&&"group-hover/switcher:opacity-0 group-hover/switcher:pointer-events-none group-hover/switcher:invisible";let b;e[6]!==j?(b=z("w-full min-w-0 transition-opacity",j),e[6]=j,e[7]=b):b=e[7];const g=f?"dark":"light";let v;e[8]!==o||e[9]!==s||e[10]!==g?(v=n.jsx(Jt,{isCollapsed:o,variant:g,onCreateProject:s}),e[8]=o,e[9]=s,e[10]=g,e[11]=v):v=e[11];let S;e[12]!==b||e[13]!==v?(S=n.jsx("div",{className:b,children:v}),e[12]=b,e[13]=v,e[14]=S):S=e[14];const C=f?"hover:bg-zinc-800 text-zinc-400":"hover:bg-sidebar-accent",w=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]!==w?(_=z("absolute inset-0 m-auto size-7 transition-opacity",C,w),e[15]=C,e[16]=w,e[17]=_):_=e[17];const O=!o,k=f?"text-zinc-400":"text-muted-foreground";let $;e[18]!==k?($=z("size-4 shrink-0",k),e[18]=k,e[19]=$):$=e[19];let I;e[20]!==$?(I=n.jsx(Dt,{className:$}),e[20]=$,e[21]=I):I=e[21];let M;e[22]!==_||e[23]!==O||e[24]!==I||e[25]!==l?(M=n.jsx(te,{variant:"ghost",size:"icon",className:_,onClick:l,"aria-label":"Expand sidebar",disabled:O,children:I}),e[22]=_,e[23]=O,e[24]=I,e[25]=l,e[26]=M):M=e[26];let T;e[27]!==M||e[28]!==S?(T=n.jsxs("div",{className:"group/switcher relative flex items-center justify-center gap-1.5 min-w-0 flex-1 overflow-hidden",children:[S,M]}),e[27]=M,e[28]=S,e[29]=T):T=e[29];const U=o&&"hidden";let E;e[30]!==U?(E=z("flex items-center gap-0.5 shrink-0",U),e[30]=U,e[31]=E):E=e[31];const L=f?"hover:bg-zinc-800 text-zinc-400 hover:text-white":"hover:bg-sidebar-accent";let D;e[32]!==L?(D=z("size-7",L),e[32]=L,e[33]=D):D=e[33];const A=f?"text-zinc-400":"text-muted-foreground";let R;e[34]!==A?(R=z("size-4",A),e[34]=A,e[35]=R):R=e[35];let B;e[36]!==R?(B=n.jsx(Lt,{className:R}),e[36]=R,e[37]=B):B=e[37];let H;e[38]!==o||e[39]!==D||e[40]!==B||e[41]!==l?(H=n.jsx(Re,{asChild:!0,children:n.jsx(te,{variant:"ghost",size:"icon",className:D,onClick:l,"aria-label":"Collapse sidebar",disabled:o,children:B})}),e[38]=o,e[39]=D,e[40]=B,e[41]=l,e[42]=H):H=e[42];let W;e[43]===Symbol.for("react.memo_cache_sentinel")?(W=n.jsx(De,{side:"bottom",children:"Collapse sidebar"}),e[43]=W):W=e[43];let V;e[44]!==H?(V=n.jsxs(He,{children:[H,W]}),e[44]=H,e[45]=V):V=e[45];let q;e[46]!==i||e[47]!==f?(q=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]=q):q=e[48];const G=f?"text-inherit":"text-muted-foreground";let Z;e[49]!==G?(Z=z(G),e[49]=G,e[50]=Z):Z=e[50];let K;e[51]!==Z?(K=n.jsx(St,{size:11,className:Z}),e[51]=Z,e[52]=K):K=e[52];let J;e[53]!==o||e[54]!==q||e[55]!==K||e[56]!==p?(J=n.jsx(Re,{asChild:!0,children:n.jsx(te,{variant:"ghost",size:"icon",className:q,onClick:p,"aria-label":"Toggle Decopilot",disabled:o,children:K})}),e[53]=o,e[54]=q,e[55]=K,e[56]=p,e[57]=J):J=e[57];let X;e[58]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx(De,{side:"bottom",children:"Toggle Decopilot"}),e[58]=X):X=e[58];let P;e[59]!==J?(P=n.jsxs(He,{children:[J,X]}),e[59]=J,e[60]=P):P=e[60];let F;e[61]!==E||e[62]!==V||e[63]!==P?(F=n.jsxs("div",{className:E,children:[V,P]}),e[61]=E,e[62]=V,e[63]=P,e[64]=F):F=e[64];let Y;e[65]!==T||e[66]!==F?(Y=n.jsx(me,{children:n.jsx(le,{children:n.jsxs("div",{className:"flex items-center justify-between w-full h-12",children:[T,F]})})}),e[65]=T,e[66]=F,e[67]=Y):Y=e[67];let fe;return e[68]!==Y||e[69]!==h?(fe=n.jsx(Kt,{className:h,children:Y}),e[68]=Y,e[69]=h,e[70]=fe):fe=e[70],fe}function Un(t){return!t}Xe.Skeleton=function({isDark:e=!1}){return n.jsx(Kt,{className:z("h-12 gap-0 pt-0",e&&"bg-[#030302] border-b border-zinc-800"),children:n.jsx(me,{children:n.jsx(le,{children:n.jsxs("div",{className:"flex items-center justify-between w-full h-12",children:[n.jsxs("div",{className:"flex items-center gap-1.5 min-w-0 flex-1 px-1.5",children:[n.jsx(ee,{className:z("size-5 rounded-[5px] shrink-0",e&&"bg-zinc-800")}),n.jsx(ee,{className:z("h-3.5 w-16",e&&"bg-zinc-800")})]}),n.jsxs("div",{className:"flex items-center gap-0.5",children:[n.jsx(ee,{className:z("size-7 rounded-lg",e&&"bg-zinc-800")}),n.jsx(ee,{className:z("size-7 rounded-lg",e&&"bg-zinc-800")})]})]})})})})};function Bn(){const t=N.c(10),{locator:e}=ie(),s=ue(),l=Be().location.pathname;let o;t[0]!==l?(o=l.includes("/settings"),t[0]=l,t[1]=o):o=t[1];const i=o;let a;t[2]!==e||t[3]!==s?(a=()=>{s({to:"/$org/$project/settings",params:ke.parse(e)})},t[2]=e,t[3]=s,t[4]=a):a=t[4];const c=a;let d,m;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:n.jsx(lt,{})}),m=n.jsx("span",{className:"truncate",children:"Settings"}),t[5]=d,t[6]=m):(d=t[5],m=t[6]);let f;return t[7]!==c||t[8]!==i?(f=n.jsx(gn,{className:"py-2 border-r",children:n.jsx(me,{children:n.jsx(le,{children:n.jsxs(Te,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:c,isActive:i,tooltip:"Settings",children:[d,m]})})})}),t[7]=c,t[8]=i,t[9]=f):f=t[9],f}function Xt(t){const e=N.c(4),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ot,{className:"my-2 -ml-1"}),e[0]=r):r=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(le,{children:n.jsx("div",{className:"group-data-[collapsible=icon]:hidden px-2 py-0 text-xs font-medium h-6 text-muted-foreground flex items-center justify-between",children:n.jsx("span",{className:"whitespace-nowrap",children:"Pinned Views"})})}),e[1]=l):l=e[1];let o;return e[2]!==s?(o=n.jsxs(n.Fragment,{children:[r,l,s]}),e[2]=s,e[3]=o):o=e[3],o}function Fn(t){const e=N.c(26),{item:s}=t,r=ue(),{org:l}=ie(),o=It(l.id),i=Bs(l.id);let a;e[0]!==i.update||e[1]!==s.url||e[2]!==o?.sidebar_items?(a=async()=>{const S=(o?.sidebar_items||[]).filter(C=>C.url!==s.url);await i.update.mutateAsync({sidebar_items:S})},e[0]=i.update,e[1]=s.url,e[2]=o?.sidebar_items,e[3]=a):a=e[3];const c=a;let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=/^https?:\/\/.+/,e[4]=d):d=e[4];let m;e[5]!==s.icon?(m=d.test(s.icon),e[5]=s.icon,e[6]=m):m=e[6];const f=m;let u;e[7]!==s.url||e[8]!==r?(u=()=>{r({to:s.url})},e[7]=s.url,e[8]=r,e[9]=u):u=e[9];const p=s.title;let x;e[10]!==f||e[11]!==s.icon||e[12]!==s.title?(x=n.jsx("div",{className:"flex items-center justify-center shrink-0",children:f?n.jsx("img",{src:s.icon,alt:s.title,className:"h-4 w-4 rounded object-cover"}):n.jsx(Fs,{size:16,className:"text-muted-foreground group-hover/item:text-foreground transition-colors"})}),e[10]=f,e[11]=s.icon,e[12]=s.title,e[13]=x):x=e[13];let h;e[14]!==s.title?(h=s.title.toLocaleLowerCase(),e[14]=s.title,e[15]=h):h=e[15];let j;e[16]!==h?(j=n.jsx("div",{className:"flex-1 min-w-0 flex flex-col items-start",children:n.jsx("span",{className:"truncate text-sm w-full capitalize",children:h})}),e[16]=h,e[17]=j):j=e[17];let b;e[18]!==c?(b=n.jsx(Ue,{size:16,className:"text-muted-foreground opacity-0 group-hover/item:opacity-50 hover:opacity-100 cursor-pointer",onClick:v=>{v.preventDefault(),v.stopPropagation(),c()}}),e[18]=c,e[19]=b):b=e[19];let g;return e[20]!==s.title||e[21]!==u||e[22]!==x||e[23]!==j||e[24]!==b?(g=n.jsx(le,{children:n.jsxs(Te,{className:"w-full pr-2 group/item relative cursor-pointer text-foreground/90 hover:text-foreground",onClick:u,tooltip:p,children:[x,j,b]})}),e[20]=s.title,e[21]=u,e[22]=x,e[23]=j,e[24]=b,e[25]=g):g=e[25],g}function pt(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(le,{children:n.jsx("div",{className:"flex items-center gap-2 px-4 py-2",children:n.jsx(ee,{className:"h-4 flex-1"})})}),t[0]=e):e=t[0],e}function Wn(){const t=N.c(4),{org:e}=ie(),r=It(e.id)?.sidebar_items;if(!r?.length)return null;let l;t[0]!==r?(l=r.map(Vn),t[0]=r,t[1]=l):l=t[1];let o;return t[2]!==l?(o=n.jsx(Xt,{children:l}),t[2]=l,t[3]=o):o=t[3],o}function Vn(t){return n.jsx(Fn,{item:t},t.url)}function Gn(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(y.Suspense,{fallback:n.jsxs(Xt,{children:[n.jsx(pt,{}),n.jsx(pt,{})]}),children:n.jsx(Wn,{})}),t[0]=e):e=t[0],e}function Kn(t){const e=N.c(11),{project:s}=t,r=s.ui?.themeColor??"#60a5fa";if(s.ui?.icon){let c;return e[0]!==s.ui.icon?(c=n.jsx("img",{src:s.ui.icon,alt:"",className:"size-4 rounded object-cover border border-border/50"}),e[0]=s.ui.icon,e[1]=c):c=e[1],c}let l;e[2]!==r?(l={backgroundColor:r},e[2]=r,e[3]=l):l=e[3];let o;e[4]!==s.name?(o=s.name.charAt(0).toUpperCase(),e[4]=s.name,e[5]=o):o=e[5];let i;e[6]!==o?(i=n.jsx("span",{className:"text-[10px] font-medium text-white",children:o}),e[6]=o,e[7]=i):i=e[7];let a;return e[8]!==l||e[9]!==i?(a=n.jsx("div",{className:"size-4 rounded flex items-center justify-center border border-border/50",style:l,children:i}),e[8]=l,e[9]=i,e[10]=a):a=e[10],a}function Zn(t){const e=N.c(14),{project:s}=t,r=ue(),{org:l}=ie();let o;e[0]!==r||e[1]!==l.slug||e[2]!==s.slug?(o=()=>{r({to:"/$org/$project",params:{org:l.slug,project:s.slug}})},e[0]=r,e[1]=l.slug,e[2]=s.slug,e[3]=o):o=e[3];let i;e[4]!==s?(i=n.jsx(Kn,{project:s}),e[4]=s,e[5]=i):i=e[5];let a;e[6]!==s.name?(a=n.jsx("span",{className:"truncate flex-1",children:s.name}),e[6]=s.name,e[7]=a):a=e[7];let c;e[8]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(_t,{size:12,className:"text-muted-foreground opacity-0 group-hover/item:opacity-100 transition-opacity"}),e[8]=c):c=e[8];let d;return e[9]!==s.name||e[10]!==o||e[11]!==i||e[12]!==a?(d=n.jsx(le,{children:n.jsxs(Te,{className:"group/item cursor-pointer text-foreground/90 hover:text-foreground",onClick:o,tooltip:s.name,children:[i,a,c]})}),e[9]=s.name,e[10]=o,e[11]=i,e[12]=a,e[13]=d):d=e[13],d}function Yn(){const t=N.c(54),{org:e}=ie(),{data:s,isLoading:r}=kt(e.id),[l,o]=y.useState(!0),[i,a]=y.useState(!1);let c,d,m,f,u,p,x,h,j,b,g,v,S;if(t[0]!==r||t[1]!==l||t[2]!==s){S=Symbol.for("react.early_return_sentinel");e:{const M=s?.filter(Jn)??[];if(r){let R;t[16]===Symbol.for("react.memo_cache_sentinel")?(R=n.jsx(le,{children:n.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[n.jsx(ee,{className:"h-4 w-4 rounded"}),n.jsx(ee,{className:"h-4 flex-1"})]})}),t[16]=R):R=t[16];let B;t[17]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsx(Ie,{className:"py-0",children:n.jsx(Oe,{children:n.jsxs(me,{className:"gap-0.5",children:[R,n.jsx(le,{children:n.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[n.jsx(ee,{className:"h-4 w-4 rounded"}),n.jsx(ee,{className:"h-4 flex-1"})]})})]})})}),t[17]=B):B=t[17],S=B;break e}t[18]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(ot,{className:"my-2"}),t[18]=v):v=t[18],u=Ns,b=l,g=o,f=Ie,j="py-0",m=Oe,d=me,x="gap-0.5";let T;t[19]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx("span",{children:"Projects"}),t[19]=T):T=t[19];const U=!l&&"-rotate-90";let E;t[20]!==U?(E=z("transition-transform",U),t[20]=U,t[21]=E):E=t[21];let L;t[22]!==E?(L=n.jsx(Ss,{asChild:!0,children:n.jsxs("button",{type:"button",className:"flex items-center gap-1 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors",children:[T,n.jsx(tt,{size:12,className:E})]})}),t[22]=E,t[23]=L):L=t[23];let D;t[24]===Symbol.for("react.memo_cache_sentinel")?(D=()=>a(!0),t[24]=D):D=t[24];let A;t[25]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx("button",{type:"button",onClick:D,className:"text-muted-foreground hover:text-foreground transition-colors p-0.5 rounded hover:bg-accent",title:"Create new project",children:n.jsx(Ve,{size:16})}),t[25]=A):A=t[25],t[26]!==L?(h=n.jsx(le,{children:n.jsxs("div",{className:"flex items-center justify-between px-2 h-6",children:[L,A]})}),t[26]=L,t[27]=h):h=t[27],c=ys,p=M.length===0?n.jsx(le,{children:n.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:"No projects yet"})}):M.map(qn)}t[0]=r,t[1]=l,t[2]=s,t[3]=c,t[4]=d,t[5]=m,t[6]=f,t[7]=u,t[8]=p,t[9]=x,t[10]=h,t[11]=j,t[12]=b,t[13]=g,t[14]=v,t[15]=S}else c=t[3],d=t[4],m=t[5],f=t[6],u=t[7],p=t[8],x=t[9],h=t[10],j=t[11],b=t[12],g=t[13],v=t[14],S=t[15];if(S!==Symbol.for("react.early_return_sentinel"))return S;let C;t[28]!==c||t[29]!==p?(C=n.jsx(c,{children:p}),t[28]=c,t[29]=p,t[30]=C):C=t[30];let w;t[31]!==d||t[32]!==x||t[33]!==h||t[34]!==C?(w=n.jsxs(d,{className:x,children:[h,C]}),t[31]=d,t[32]=x,t[33]=h,t[34]=C,t[35]=w):w=t[35];let _;t[36]!==m||t[37]!==w?(_=n.jsx(m,{children:w}),t[36]=m,t[37]=w,t[38]=_):_=t[38];let O;t[39]!==f||t[40]!==_||t[41]!==j?(O=n.jsx(f,{className:j,children:_}),t[39]=f,t[40]=_,t[41]=j,t[42]=O):O=t[42];let k;t[43]!==u||t[44]!==O||t[45]!==b||t[46]!==g?(k=n.jsx(u,{open:b,onOpenChange:g,children:O}),t[43]=u,t[44]=O,t[45]=b,t[46]=g,t[47]=k):k=t[47];let $;t[48]!==i?($=n.jsx(Ct,{open:i,onOpenChange:a}),t[48]=i,t[49]=$):$=t[49];let I;return t[50]!==k||t[51]!==$||t[52]!==v?(I=n.jsxs(n.Fragment,{children:[v,k,$]}),t[50]=k,t[51]=$,t[52]=v,t[53]=I):I=t[53],I}function qn(t){return n.jsx(Zn,{project:t},t.id)}function Jn(t){return t.slug!==Q}function Xn(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(y.Suspense,{fallback:n.jsx(Ie,{className:"py-0",children:n.jsx(Oe,{children:n.jsx(me,{className:"gap-0.5",children:n.jsx(le,{children:n.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[n.jsx(ee,{className:"h-4 w-4 rounded"}),n.jsx(ee,{className:"h-4 flex-1"})]})})})})}),children:n.jsx(Yn,{})}),t[0]=e):e=t[0],e}function Qn(t){const e=N.c(16),{onCreateProject:s}=t,[r]=Fe(),l=nn(),{locator:o}=ie();let i;e[0]!==o?(i=ke.isOrgAdminProject(o),e[0]=o,e[1]=i):i=e[1];const a=i;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Xe.Skeleton,{}),e[2]=c):c=e[2];let d;e[3]!==s?(d=n.jsx(y.Suspense,{fallback:c,children:n.jsx(Xe,{onCreateProject:s})}),e[3]=s,e[4]=d):d=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(Bn,{}),e[5]=m):m=e[5];let f;e[6]!==a||e[7]!==r?(f=a?r.experimental_projects?n.jsx(Xn,{}):null:n.jsx(Gn,{}),e[6]=a,e[7]=r,e[8]=f):f=e[8];let u;e[9]!==f?(u=n.jsx(wt,{children:n.jsx(y.Suspense,{fallback:null,children:f})}),e[9]=f,e[10]=u):u=e[10];const p=a?void 0:"pt-3";let x;return e[11]!==l||e[12]!==d||e[13]!==u||e[14]!==p?(x=n.jsx(Yt,{sections:l,header:d,footer:m,additionalContent:u,contentClassName:p}),e[11]=l,e[12]=d,e[13]=u,e[14]=p,e[15]=x):x=e[15],x}function er(t){const e=N.c(12);let s,r,l,o;e[0]!==t?({className:s,orientation:l,decorative:o,...r}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o):(s=e[1],r=e[2],l=e[3],o=e[4]);const i=l===void 0?"horizontal":l,a=o===void 0?!0:o;let c;e[5]!==s?(c=z("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",s),e[5]=s,e[6]=c):c=e[6];let d;return e[7]!==a||e[8]!==i||e[9]!==r||e[10]!==c?(d=n.jsx(cs,{"data-slot":"separator-root",decorative:a,orientation:i,className:c,...r}),e[7]=a,e[8]=i,e[9]=r,e[10]=c,e[11]=d):d=e[11],d}const Qt=y.createContext(null);function tr(){const t=y.useContext(Qt);if(!t)throw new Error("TopbarSwitcher compound components must be used within TopbarSwitcher.Root");return t}function sr(t){const e=N.c(10),{children:s,onItemHover:r}=t,[l,o]=y.useState(null);let i;e[0]!==r?(i=f=>{o(f),r?.(f)},e[0]=r,e[1]=i):i=e[1];const a=i;let c;e[2]!==l||e[3]!==a?(c={hoveredItem:l,setHoveredItem:a},e[2]=l,e[3]=a,e[4]=c):c=e[4];let d;e[5]!==s?(d=n.jsx(st,{children:s}),e[5]=s,e[6]=d):d=e[6];let m;return e[7]!==c||e[8]!==d?(m=n.jsx(Qt.Provider,{value:c,children:d}),e[7]=c,e[8]=d,e[9]=m):m=e[9],m}function nr(t){const e=N.c(6),{children:s,onClick:r}=t;let l;e[0]!==s||e[1]!==r?(l=n.jsx(te,{variant:"link",className:"p-0.5 h-auto",onClick:r,type:"button",children:s}),e[0]=s,e[1]=r,e[2]=l):l=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(nt,{asChild:!0,children:n.jsx(te,{size:"icon",variant:"ghost",className:"w-6 h-6 p-0",children:n.jsx(Nt,{size:16,className:"opacity-50"})})}),e[3]=o):o=e[3];let i;return e[4]!==l?(i=n.jsxs("div",{className:"flex items-center gap-1",children:[l,o]}),e[4]=l,e[5]=i):i=e[5],i}function rr(t){const e=N.c(8),{item:s,fallback:r}=t,l=r===void 0?"":r,o=s?.avatarUrl??"",i=s?.name??l;let a;e[0]!==o||e[1]!==i?(a=n.jsx(de,{url:o,fallback:i,size:"xs",objectFit:"contain"}),e[0]=o,e[1]=i,e[2]=a):a=e[2];const c=s?.name??l;let d;e[3]!==c?(d=n.jsx("span",{children:c}),e[3]=c,e[4]=d):d=e[4];let m;return e[5]!==a||e[6]!==d?(m=n.jsxs("div",{className:"flex items-center gap-2",children:[a,d]}),e[5]=a,e[6]=d,e[7]=m):m=e[7],m}function lr(t){const e=N.c(6),{children:s,align:r}=t,l=r===void 0?"start":r,i=y.Children.toArray(s).filter(or).length===1?"280px":"480px";let a;e[0]!==i?(a={width:i},e[0]=i,e[1]=a):a=e[1];let c;return e[2]!==l||e[3]!==s||e[4]!==a?(c=n.jsx(rt,{align:l,className:"p-0 flex items-start",style:a,children:s}),e[2]=l,e[3]=s,e[4]=a,e[5]=c):c=e[5],c}function or(t){return y.isValidElement(t)&&(t.type===ts||t.type===es)}function es(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex flex-col border-border w-[240px] border-r last:border-r-0 last:w-full",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}const ts=es;function ir(t){const e=N.c(6),{placeholder:s,value:r,onChange:l}=t,o=s===void 0?"Search...":s;let i;e[0]!==l?(i=c=>l(c.target.value),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==o||e[3]!==i||e[4]!==r?(a=n.jsx(Ws,{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 ar(t){const e=N.c(6),{children:s,emptyMessage:r}=t,l=r===void 0?"No items found.":r,o=y.Children.count(s)>0;let i;e[0]!==l||e[1]!==o?(i=!o&&n.jsx("div",{className:"text-muted-foreground text-sm px-1 py-8 text-center",children:l}),e[0]=l,e[1]=o,e[2]=i):i=e[2];let a;return e[3]!==s||e[4]!==i?(a=n.jsxs("div",{className:"flex flex-col gap-0.5 p-1 max-h-44 overflow-y-auto",children:[i,s]}),e[3]=s,e[4]=i,e[5]=a):a=e[5],a}function cr(t){const e=N.c(15),{item:s,onClick:r,onHover:l,children:o}=t,i=tr();let a;e[0]!==i||e[1]!==s||e[2]!==l?(a=()=>{i.setHoveredItem(s.slug),l?.(s)},e[0]=i,e[1]=s,e[2]=l,e[3]=a):a=e[3];const c=a;let d;e[4]!==s||e[5]!==r?(d=()=>r(s),e[4]=s,e[5]=r,e[6]=d):d=e[6];let m;e[7]!==o||e[8]!==s.avatarUrl||e[9]!==s.name?(m=o||n.jsxs(n.Fragment,{children:[n.jsx(de,{url:s.avatarUrl??"",fallback:s.name,size:"xs",className:"w-[22px]! h-[22px]!",objectFit:"contain"}),n.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:s.name})]}),e[7]=o,e[8]=s.avatarUrl,e[9]=s.name,e[10]=m):m=e[10];let f;return e[11]!==c||e[12]!==d||e[13]!==m?(f=n.jsx(te,{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 dr(t){const e=N.c(2),{children:s}=t;let r;return e[0]!==s?(r=n.jsx("div",{className:"px-1 pb-1 pt-0.5",children:s}),e[0]=s,e[1]=r):r=e[1],r}function mr(t){const e=N.c(11),{onClick:s,icon:r,children:l,variant:o}=t,a=(o===void 0?"default":o)==="muted"&&"text-muted-foreground";let c;e[0]!==a?(c=z("w-full justify-start font-normal",a),e[0]=a,e[1]=c):c=e[1];let d;e[2]!==r?(d=r&&n.jsx("span",{className:"[&>svg]:size-4",children:r}),e[2]=r,e[3]=d):d=e[3];let m;e[4]!==l?(m=n.jsx("span",{children:l}),e[4]=l,e[5]=m):m=e[5];let f;return e[6]!==s||e[7]!==c||e[8]!==d||e[9]!==m?(f=n.jsxs(te,{variant:"ghost",size:"sm",className:c,onClick:s,children:[d,m]}),e[6]=s,e[7]=c,e[8]=d,e[9]=m,e[10]=f):f=e[10],f}function fr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(er,{}),t[0]=e):e=t[0],e}function ur(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"h-4 w-16 bg-accent rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const ne=Object.assign(sr,{Trigger:nr,CurrentItem:rr,Content:lr,Panel:ts,Search:ir,Items:ar,Item:cr,Actions:dr,Action:mr,Separator:fr,Skeleton:ur});function Qe(){const t=N.c(59);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:s}=et(e),{data:r}=oe.useListOrganizations(),l=ue();let o;t[1]!==s||t[2]!==r?(o=r?.find(U=>U.slug===s),t[1]=s,t[2]=r,t[3]=o):o=t[3];const i=o,[a,c]=y.useState(""),[d,m]=y.useState(!1);let f,u,p,x,h,j,b,g;if(t[4]!==i||t[5]!==l||t[6]!==s||t[7]!==a||t[8]!==r){const E=(r?(()=>{const H=r.filter(W=>W.name.toLowerCase().includes(a.toLowerCase()));if(s){const W=H.findIndex(V=>V.slug===s);if(W>0){const V=H[W];V&&(H.splice(W,1),H.unshift(V))}}return H})():[]).map(pr);let L;t[17]!==i?(L=i?{slug:i.slug,name:i.name,avatarUrl:i.logo}:void 0,t[17]=i,t[18]=L):L=t[18];const D=L;x=ne;let A;t[19]!==l||t[20]!==s?(A=()=>l({to:"/$org",params:{org:s??""}}),t[19]=l,t[20]=s,t[21]=A):A=t[21];let R;t[22]!==D?(R=n.jsx(ne.CurrentItem,{item:D}),t[22]=D,t[23]=R):R=t[23],t[24]!==A||t[25]!==R?(g=n.jsx(ne.Trigger,{onClick:A,children:R}),t[24]=A,t[25]=R,t[26]=g):g=t[26],p=ne.Content,u=ne.Panel,t[27]!==a?(b=n.jsx(ne.Search,{placeholder:"Search organizations...",value:a,onChange:c}),t[27]=a,t[28]=b):b=t[28],f=ne.Items,h="No organizations found.";let B;t[29]!==l?(B=H=>n.jsx(ne.Item,{item:H,onClick:W=>l({to:"/$org",params:{org:W.slug}})},H.slug),t[29]=l,t[30]=B):B=t[30],j=E.map(B),t[4]=i,t[5]=l,t[6]=s,t[7]=a,t[8]=r,t[9]=f,t[10]=u,t[11]=p,t[12]=x,t[13]=h,t[14]=j,t[15]=b,t[16]=g}else f=t[9],u=t[10],p=t[11],x=t[12],h=t[13],j=t[14],b=t[15],g=t[16];let v;t[31]!==f||t[32]!==h||t[33]!==j?(v=n.jsx(f,{emptyMessage:h,children:j}),t[31]=f,t[32]=h,t[33]=j,t[34]=v):v=t[34];let S,C;t[35]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(ne.Actions,{children:n.jsx(ne.Action,{onClick:()=>m(!0),variant:"muted",children:"+ Create organization"})}),C=n.jsx(ne.Separator,{}),t[35]=S,t[36]=C):(S=t[35],C=t[36]);let w;t[37]!==l?(w=()=>l({to:"/"}),t[37]=l,t[38]=w):w=t[38];let _;t[39]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(Vs,{}),t[39]=_):_=t[39];let O;t[40]!==w?(O=n.jsx(ne.Actions,{children:n.jsx(ne.Action,{onClick:w,icon:_,children:"See all organizations"})}),t[40]=w,t[41]=O):O=t[41];let k;t[42]!==u||t[43]!==O||t[44]!==b||t[45]!==v?(k=n.jsxs(u,{children:[b,v,S,C,O]}),t[42]=u,t[43]=O,t[44]=b,t[45]=v,t[46]=k):k=t[46];let $;t[47]!==p||t[48]!==k?($=n.jsx(p,{children:k}),t[47]=p,t[48]=k,t[49]=$):$=t[49];let I;t[50]!==x||t[51]!==$||t[52]!==g?(I=n.jsxs(x,{children:[g,$]}),t[50]=x,t[51]=$,t[52]=g,t[53]=I):I=t[53];let M;t[54]!==d?(M=n.jsx(zt,{open:d,onOpenChange:m}),t[54]=d,t[55]=M):M=t[55];let T;return t[56]!==I||t[57]!==M?(T=n.jsxs(n.Fragment,{children:[I,M]}),t[56]=I,t[57]=M,t[58]=T):T=t[58],T}function pr(t){return{slug:t.slug,name:t.name,avatarUrl:t.logo}}Qe.Skeleton=ne.Skeleton;function xr(){const t=N.c(10),{locator:e}=ie(),s=Gs();if(ke.isOrgAdminProject(e))return null;const l=s?.leftRef;let o;t[0]!==l?(o=n.jsx("div",{ref:l,className:"flex items-center gap-2 flex-1 min-w-0"}),t[0]=l,t[1]=o):o=t[1];const i=s?.centerRef;let a;t[2]!==i?(a=n.jsx("div",{ref:i,className:"flex flex-1 h-full items-center justify-center px-4 min-w-0 [&:empty]:hidden"}),t[2]=i,t[3]=a):a=t[3];const c=s?.rightRef;let d;t[4]!==c?(d=n.jsx("div",{ref:c,className:"flex flex-1 gap-2 h-full items-center justify-end min-w-0 [&:empty]:hidden"}),t[4]=c,t[5]=d):d=t[5];let m;return t[6]!==o||t[7]!==a||t[8]!==d?(m=n.jsx("div",{className:"dark",children:n.jsxs("header",{className:"sticky top-0 z-50 h-12 bg-background flex items-center px-4 shrink-0",children:[o,a,d]})}),t[6]=o,t[7]=a,t[8]=d,t[9]=m):m=t[9],m}function hr({prop:t,defaultProp:e,onChange:s=()=>{}}){const[r,l]=gr({defaultProp:e,onChange:s}),o=t!==void 0,i=o?t:r,a=gt(s),c=y.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 gr({defaultProp:t,onChange:e}){const s=y.useState(t),[r]=s,l=y.useRef(r),o=gt(e);return y.useEffect(()=>{l.current!==r&&(o(r),l.current=r)},[r,l,o]),s}function jr(t){const e=N.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let r;return e[2]!==s?(r=n.jsx(_e.Root,{"data-slot":"drawer",...s}),e[2]=s,e[3]=r):r=e[3],r}function br(t){const e=N.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let r;return e[2]!==s?(r=n.jsx(_e.Trigger,{"data-slot":"drawer-trigger",...s}),e[2]=s,e[3]=r):r=e[3],r}function vr(t){const e=N.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let r;return e[2]!==s?(r=n.jsx(_e.Portal,{"data-slot":"drawer-portal",...s}),e[2]=s,e[3]=r):r=e[3],r}function Nr(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx(_e.Overlay,{"data-slot":"drawer-overlay",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Sr(t){const e=N.c(12);let s,r,l;e[0]!==t?({className:r,children:s,...l}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l):(s=e[1],r=e[2],l=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Nr,{}),e[4]=o):o=e[4];let i;e[5]!==r?(i=z("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",r),e[5]=r,e[6]=i):i=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=a):a=e[7];let c;return e[8]!==s||e[9]!==l||e[10]!==i?(c=n.jsxs(vr,{"data-slot":"drawer-portal",children:[o,n.jsxs(_e.Content,{"data-slot":"drawer-content",className:i,...l,children:[a,s]})]}),e[8]=s,e[9]=l,e[10]=i,e[11]=c):c=e[11],c}function yr(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex flex-col gap-1.5 px-4 py-2",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"drawer-header",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function wr(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("text-foreground font-semibold",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx(_e.Title,{"data-slot":"drawer-title",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}const ss=y.createContext({setOpen:()=>{}}),Cr=()=>y.useContext(ss),kr=t=>{const e=N.c(25);let s,r,l,o,i;e[0]!==t?({children:s,defaultOpen:r,open:o,onOpenChange:l,...i}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o,e[5]=i):(s=e[1],r=e[2],l=e[3],o=e[4],i=e[5]);const a=r??!1;let c;e[6]!==l||e[7]!==o||e[8]!==a?(c={prop:o,defaultProp:a,onChange:l},e[6]=l,e[7]=o,e[8]=a,e[9]=c):c=e[9];const[d,m]=hr(c);let f;e[10]!==m?(f={setOpen:m},e[10]=m,e[11]=f):f=e[11];let u;e[12]!==s||e[13]!==d||e[14]!==i||e[15]!==m?(u=n.jsx(jr,{open:d,onOpenChange:m,...i,children:s}),e[12]=s,e[13]=d,e[14]=i,e[15]=m,e[16]=u):u=e[16];let p;e[17]!==d||e[18]!==i||e[19]!==m||e[20]!==u?(p=n.jsx(qs,{open:d,onOpenChange:m,...i,children:u}),e[17]=d,e[18]=i,e[19]=m,e[20]=u,e[21]=p):p=e[21];let x;return e[22]!==f||e[23]!==p?(x=n.jsx(ss.Provider,{value:f,children:p}),e[22]=f,e[23]=p,e[24]=x):x=e[24],x},_r=t=>{const{children:e,title:s,...r}=t,l=Pe(),{className:o,...i}=r;return l?n.jsxs(Sr,{...i,children:[n.jsx(yr,{className:"hidden",children:n.jsx(wr,{children:s})}),n.jsx("div",{className:z("flex flex-col gap-2 p-2 py-4",o),children:e})]}):n.jsx(Ys,{...r,children:e})},zr=t=>{const{children:e,...s}=t,{setOpen:r}=Cr(),l=Pe(),{className:o,...i}=s;return l?n.jsx("div",{...i,onClick:a=>{r(!1);const{onClick:c}=i;c?.(a)},className:z("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),children:e}):n.jsx(Js,{...s,children:e})},$r=t=>{const e=N.c(7);let s,r;e[0]!==t?({children:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);const l=Pe();let o;return e[3]!==s||e[4]!==l||e[5]!==r?(o=l?n.jsx(br,{asChild:!0,children:s}):n.jsx(Zs,{...r,children:s}),e[3]=s,e[4]=l,e[5]=r,e[6]=o):o=e[6],o},Ir=t=>{const e=N.c(7);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);const l=Pe();let o;return e[3]!==s||e[4]!==l||e[5]!==r?(o=l?n.jsx(ft,{className:z(s),...r}):n.jsx(ft,{className:z(s),...r}),e[3]=s,e[4]=l,e[5]=r,e[6]=o):o=e[6],o};function Or(t){const e=N.c(11),{user:s,trigger:r,align:l,children:o}=t,i=l===void 0?"start":l;let a;e[0]!==r||e[1]!==s?(a=r(s),e[0]=r,e[1]=s,e[2]=a):a=e[2];let c;e[3]!==a?(c=n.jsx($r,{asChild:!0,children:n.jsx("div",{children:a})}),e[3]=a,e[4]=c):c=e[4];let d;e[5]!==i||e[6]!==o?(d=n.jsx(_r,{side:"top",align:i,className:"md:w-[240px]",children:o}),e[5]=i,e[6]=o,e[7]=d):d=e[7];let m;return e[8]!==c||e[9]!==d?(m=n.jsxs(kr,{children:[c,d]}),e[8]=c,e[9]=d,e[10]=m):m=e[10],m}function Pr(t){const e=N.c(8),{children:s,onClick:r,className:l,asChild:o}=t;let i;e[0]!==o||e[1]!==s||e[2]!==r?(i=o?s:n.jsx("button",{type:"button",className:"flex items-center gap-2 text-sm w-full cursor-pointer",onClick:r,children:s}),e[0]=o,e[1]=s,e[2]=r,e[3]=i):i=e[3];let a;return e[4]!==o||e[5]!==l||e[6]!==i?(a=n.jsx(zr,{asChild:o,className:l,children:i}),e[4]=o,e[5]=l,e[6]=i,e[7]=a):a=e[7],a}function Tr(t){const e=N.c(2),{className:s}=t;let r;return e[0]!==s?(r=n.jsx(Ir,{className:s}),e[0]=s,e[1]=r):r=e[1],r}function Mr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const ae=Object.assign(Or,{Item:Pr,Separator:Tr,Skeleton:Mr});function Er(t){const e=N.c(49),{user:s,userImage:r}=t,[l,o]=y.useState(!1),[i,a]=y.useState(!1);let c;e[0]!==s.email||e[1]!==s.id||e[2]!==s.name?(c=()=>{const A=`ID: ${s.id}
|
|
3
|
+
Email: ${s.email}`;try{await navigator.clipboard.writeText(_),ce.success("User info copied to clipboard")}catch{ce.error("Failed to copy user info to clipboard")}},e[0]=s,e[1]=o):o=e[1];const i=o,a=s.name||s.email||"U";let c;e[2]!==a||e[3]!==r?(c=n.jsx(de,{url:r,fallback:a,shape:"circle",size:"sm",className:"size-8 shrink-0"}),e[2]=a,e[3]=r,e[4]=c):c=e[4];const d=s.name||"User";let m;e[5]!==d?(m=n.jsx("span",{className:"text-sm text-sidebar-foreground truncate font-[450]",children:d}),e[5]=d,e[6]=m):m=e[6];let f;e[7]!==s.email?(f=n.jsx("span",{className:"text-xs text-muted-foreground truncate font-normal",children:s.email}),e[7]=s.email,e[8]=f):f=e[8];let u;e[9]!==m||e[10]!==f?(u=n.jsxs("div",{className:"flex flex-col min-w-0 text-left",children:[m,f]}),e[9]=m,e[10]=f,e[11]=u):u=e[11];let p;e[12]!==i||e[13]!==c||e[14]!==u?(p=n.jsxs(te,{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 h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(_n,{}),e[16]=h):h=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Vt,{size:18}),e[17]=x):x=e[17];let j;e[18]!==l?(j=n.jsxs(ze,{onClick:l,children:[x,"Preferences"]}),e[18]=l,e[19]=j):j=e[19];let b;e[20]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(ze,{asChild:!0,children:n.jsxs("a",{href:"https://www.decocms.com/terms-of-use",target:"_blank",rel:"noopener noreferrer",children:[n.jsx(Et,{size:18}),n.jsx("span",{className:"flex-1",children:"Terms & Conditions"}),n.jsx(qe,{size:14})]})}),e[20]=b):b=e[20];let g;e[21]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(ze,{asChild:!0,children:n.jsxs("a",{href:"https://github.com/decocms/mesh",target:"_blank",rel:"noopener noreferrer",children:[n.jsx(xt,{className:"size-[18px]"}),n.jsx("span",{className:"flex-1",children:"decocms/mesh"}),n.jsx(qe,{size:14})]})}),e[21]=g):g=e[21];let v;e[22]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsxs(ze,{onClick:$n,children:[n.jsx(Ft,{size:18}),"Log out"]}),e[22]=v):v=e[22];let S;e[23]!==j?(S=n.jsxs("div",{className:"p-1 flex flex-col",children:[h,j,b,g,v]}),e[23]=j,e[24]=S):S=e[24];let C;e[25]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx("div",{className:"mt-auto px-3 py-2 border-t border-border",children:n.jsxs("span",{className:"text-[11px] text-muted-foreground/75",children:["v","2.85.0"]})}),e[25]=C):C=e[25];let w;return e[26]!==S||e[27]!==p?(w=n.jsx(n.Fragment,{children:n.jsxs("div",{className:"flex flex-col gap-0.5 bg-sidebar min-w-[250px]",children:[p,S,C]})}),e[26]=S,e[27]=p,e[28]=w):w=e[28],w}function $n(){return oe.signOut()}function In(t){const e=N.c(26),{org:s,isActive:r,isHovered:l,onClick:o,onSettings:i,onHover:a}=t,c=r,d=l&&!r,m=l&&"bg-accent/50",f=r&&!l&&"bg-accent hover:bg-accent";let u;e[0]!==m||e[1]!==f?(u=z("flex items-center gap-2 w-full justify-start font-normal h-10 px-2 rounded-lg cursor-pointer transition-colors",m,f),e[0]=m,e[1]=f,e[2]=u):u=e[2];let p;e[3]!==o?(p=S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),o?.())},e[3]=o,e[4]=p):p=e[4];let h;e[5]!==a||e[6]!==s.id?(h=()=>a?.(s.id),e[5]=a,e[6]=s.id,e[7]=h):h=e[7];const x=s.logo??void 0;let j;e[8]!==s.name||e[9]!==x?(j=n.jsx(de,{url:x,fallback:s.name,size:"sm",className:"size-6 shrink-0 rounded-md",objectFit:"cover"}),e[8]=s.name,e[9]=x,e[10]=j):j=e[10];let b;e[11]!==s.name?(b=n.jsx("span",{className:"flex-1 text-sm text-foreground truncate text-left min-w-0",children:s.name}),e[11]=s.name,e[12]=b):b=e[12];let g;e[13]!==i||e[14]!==s.name||e[15]!==d||e[16]!==c?(g=i&&c?n.jsx("button",{type:"button","aria-label":`${s.name} settings`,className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:S=>{S.stopPropagation(),i()},children:n.jsx(lt,{size:16,className:"text-muted-foreground"})}):d?n.jsx(_t,{size:16,className:"text-muted-foreground shrink-0"}):n.jsx("span",{className:"size-5 shrink-0","aria-hidden":"true"}),e[13]=i,e[14]=s.name,e[15]=d,e[16]=c,e[17]=g):g=e[17];let v;return e[18]!==o||e[19]!==u||e[20]!==p||e[21]!==h||e[22]!==j||e[23]!==b||e[24]!==g?(v=n.jsxs("div",{role:"button",tabIndex:0,className:u,onClick:o,onKeyDown:p,onMouseEnter:h,children:[j,b,g]}),e[18]=o,e[19]=u,e[20]=p,e[21]=h,e[22]=j,e[23]=b,e[24]=g,e[25]=v):v=e[25],v}function On(t){const e=N.c(34),{currentOrgSlug:s,hoveredOrgId:r,onOrgSelect:l,onOrgSettings:o,onPopoverClose:i,onCreateOrganization:a,onOrgHover:c}=t,{data:d}=oe.useListOrganizations();let m,f,u,p;if(e[0]!==s||e[1]!==r||e[2]!==a||e[3]!==c||e[4]!==l||e[5]!==o||e[6]!==i||e[7]!==d){let j;e[12]!==s?(j=(w,_)=>w.slug===s?-1:_.slug===s?1:w.name.localeCompare(_.name),e[12]=s,e[13]=j):j=e[13];const b=[...d??[]].sort(j);u="flex flex-col min-w-[240px] border-l border-border";let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx("span",{className:"text-xs text-muted-foreground truncate",children:"Your Organizations"}),e[14]=g):g=e[14];let v;e[15]!==a||e[16]!==i?(v=()=>{i(),a()},e[15]=a,e[16]=i,e[17]=v):v=e[17];let S;e[18]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(Ve,{size:16,className:"text-muted-foreground"}),e[18]=S):S=e[18],e[19]!==v?(p=n.jsxs("div",{className:"flex items-center justify-between h-10 px-3 border-b border-border",children:[g,n.jsx(te,{variant:"ghost",size:"icon",className:"size-5",onClick:v,children:S})]}),e[19]=v,e[20]=p):p=e[20],m="flex flex-col gap-0.5 p-1 flex-1 overflow-y-auto";let C;e[21]!==s||e[22]!==r||e[23]!==c||e[24]!==l||e[25]!==o?(C=w=>n.jsx(In,{org:w,isActive:w.slug===s,isHovered:w.id===r,onClick:()=>l(w.slug),onSettings:()=>o(w.slug),onHover:c},w.slug),e[21]=s,e[22]=r,e[23]=c,e[24]=l,e[25]=o,e[26]=C):C=e[26],f=b.map(C),e[0]=s,e[1]=r,e[2]=a,e[3]=c,e[4]=l,e[5]=o,e[6]=i,e[7]=d,e[8]=m,e[9]=f,e[10]=u,e[11]=p}else m=e[8],f=e[9],u=e[10],p=e[11];let h;e[27]!==m||e[28]!==f?(h=n.jsx("div",{className:m,children:f}),e[27]=m,e[28]=f,e[29]=h):h=e[29];let x;return e[30]!==u||e[31]!==p||e[32]!==h?(x=n.jsxs("div",{className:u,children:[p,h]}),e[30]=u,e[31]=p,e[32]=h,e[33]=x):x=e[33],x}function Pn(t){const e=N.c(27),{project:s,isActive:r,onClick:l,onSettings:o}=t,[i,a]=y.useState(!1),c=r||i,d=s.ui?.themeColor??"#3B82F6",m=r&&"bg-accent hover:bg-accent";let f;e[0]!==m?(f=z("flex items-center gap-2 w-full justify-start font-normal h-10 px-2 rounded-lg cursor-pointer transition-colors hover:bg-accent/50",m),e[0]=m,e[1]=f):f=e[1];let u;e[2]!==l?(u=S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),l?.())},e[2]=l,e[3]=u):u=e[3];let p,h;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=()=>a(!0),h=()=>a(!1),e[4]=p,e[5]=h):(p=e[4],h=e[5]);let x;e[6]!==s.name||e[7]!==s.ui||e[8]!==d?(x=s.ui?.icon?n.jsx("img",{src:s.ui.icon,alt:"",className:"size-6 rounded-md object-cover shrink-0"}):n.jsx(de,{fallback:s.name,size:"sm",shape:"square",className:"size-6 shrink-0 rounded-md",style:{backgroundColor:d}}),e[6]=s.name,e[7]=s.ui,e[8]=d,e[9]=x):x=e[9];let j;e[10]!==s.name?(j=n.jsx("span",{className:"flex-1 text-sm text-foreground truncate text-left min-w-0",children:s.name}),e[10]=s.name,e[11]=j):j=e[11];let b;e[12]!==r?(b=r&&n.jsx($e,{size:16,className:"text-muted-foreground shrink-0"}),e[12]=r,e[13]=b):b=e[13];let g;e[14]!==r||e[15]!==o||e[16]!==s.name||e[17]!==c?(g=o&&c&&!r?n.jsx("button",{type:"button","aria-label":`${s.name} settings`,className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:S=>{S.stopPropagation(),o()},children:n.jsx(lt,{size:16,className:"text-muted-foreground"})}):r?null:n.jsx("span",{className:"size-5 shrink-0","aria-hidden":"true"}),e[14]=r,e[15]=o,e[16]=s.name,e[17]=c,e[18]=g):g=e[18];let v;return e[19]!==l||e[20]!==f||e[21]!==u||e[22]!==x||e[23]!==j||e[24]!==b||e[25]!==g?(v=n.jsxs("div",{role:"button",tabIndex:0,className:f,onClick:l,onKeyDown:u,onMouseEnter:p,onMouseLeave:h,children:[x,j,b,g]}),e[19]=l,e[20]=f,e[21]=u,e[22]=x,e[23]=j,e[24]=b,e[25]=g,e[26]=v):v=e[26],v}function Tn(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsxs("div",{className:"space-y-1 px-2 py-1",children:[n.jsx(ee,{className:"h-10 w-full"}),n.jsx(ee,{className:"h-10 w-full"})]}),t[0]=e):e=t[0],e}function Mn(t){const e=N.c(16),{organizationId:s,currentProjectSlug:r,onProjectSelect:l,onProjectSettings:o,orgSlug:i}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={suspense:!0},e[0]=a):a=e[0];const{data:c}=kt(s,a);let d,m;if(e[1]!==r||e[2]!==l||e[3]!==o||e[4]!==i||e[5]!==c){m=Symbol.for("react.early_return_sentinel");e:{const u=c?.filter(En)??[];if(u.length===0){let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx("div",{className:"px-3 py-4 text-center text-sm text-muted-foreground",children:"No projects yet"}),e[8]=h):h=e[8],m=h;break e}let p;e[9]!==r||e[10]!==l||e[11]!==o||e[12]!==i?(p=h=>n.jsx(Pn,{project:h,isActive:r===h.slug,onClick:()=>l(i,h.slug),onSettings:o?()=>o(i,h.slug):void 0},h.id),e[9]=r,e[10]=l,e[11]=o,e[12]=i,e[13]=p):p=e[13],d=u.map(p)}e[1]=r,e[2]=l,e[3]=o,e[4]=i,e[5]=c,e[6]=d,e[7]=m}else d=e[6],m=e[7];if(m!==Symbol.for("react.early_return_sentinel"))return m;let f;return e[14]!==d?(f=n.jsx(n.Fragment,{children:d}),e[14]=d,e[15]=f):f=e[15],f}function En(t){return t.slug!==Q}function An(t){const e=N.c(17),{organizationId:s,organizationName:r,currentProjectSlug:l,onProjectSelect:o,onProjectSettings:i,onCreateProject:a,orgSlug:c}=t;let d;e[0]!==r?(d=n.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["Projects in ",r]}),e[0]=r,e[1]=d):d=e[1];let m;e[2]!==a?(m=a&&n.jsx("button",{type:"button",className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:a,"aria-label":"Create project",children:n.jsx(Ve,{size:16,className:"text-muted-foreground"})}),e[2]=a,e[3]=m):m=e[3];let f;e[4]!==d||e[5]!==m?(f=n.jsxs("div",{className:"flex items-center justify-between h-10 px-3 border-b border-border",children:[d,m]}),e[4]=d,e[5]=m,e[6]=f):f=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Tn,{}),e[7]=u):u=e[7];let p;e[8]!==l||e[9]!==o||e[10]!==i||e[11]!==c||e[12]!==s?(p=n.jsx("div",{className:"flex flex-col gap-0.5 p-1 flex-1 overflow-y-auto",children:n.jsx(y.Suspense,{fallback:u,children:n.jsx(Mn,{organizationId:s,currentProjectSlug:l,onProjectSelect:o,onProjectSettings:i,orgSlug:c})})}),e[8]=l,e[9]=o,e[10]=i,e[11]=c,e[12]=s,e[13]=p):p=e[13];let h;return e[14]!==f||e[15]!==p?(h=n.jsxs("div",{className:"flex flex-col min-w-[250px] border-l border-border",children:[f,p]}),e[14]=f,e[15]=p,e[16]=h):h=e[16],h}function qt(t){const e=N.c(67),{open:s,onOpenChange:r,user:l,userImage:o}=t,[i,a]=Fe(),[c,d]=y.useState(!1);let m;e[0]!==l.id?(m=()=>{navigator.clipboard.writeText(l.id),d(!0),setTimeout(()=>d(!1),2e3)},e[0]=l.id,e[1]=m):m=e[1];const f=m;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(As,{className:"text-base",children:"Profile Settings"}),e[2]=u):u=e[2];let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsxs(Ls,{className:"px-6 pt-6 pb-4 border-b border-border shrink-0 relative",children:[u,n.jsxs(Ds,{className:"absolute top-1/2 right-4 -translate-y-1/2 cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[n.jsx(Ue,{size:16}),n.jsx("span",{className:"sr-only",children:"Close"})]})]}),e[3]=p):p=e[3];const h=l.name||"U";let x;e[4]!==h||e[5]!==o?(x=n.jsx(de,{url:o,fallback:h,shape:"circle",size:"xl",className:"h-16 w-16"}),e[4]=h,e[5]=o,e[6]=x):x=e[6];const j=l.name||"User";let b;e[7]!==j?(b=n.jsx("span",{className:"text-base font-medium text-foreground",children:j}),e[7]=j,e[8]=b):b=e[8];let g;e[9]!==l.email?(g=n.jsx("span",{className:"text-sm text-muted-foreground",children:l.email}),e[9]=l.email,e[10]=g):g=e[10];let v;e[11]!==b||e[12]!==g?(v=n.jsxs("div",{className:"flex flex-col gap-1",children:[b,g]}),e[11]=b,e[12]=g,e[13]=v):v=e[13];let S;e[14]!==x||e[15]!==v?(S=n.jsxs("div",{className:"flex items-center gap-4",children:[x,v]}),e[14]=x,e[15]=v,e[16]=S):S=e[16];let C;e[17]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Preferences"}),e[17]=C):C=e[17];let w;e[18]!==a?(w=()=>a(Hn),e[18]=a,e[19]=w):w=e[19];let _;e[20]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[n.jsxs(dt,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[n.jsx(Us,{size:16,className:"text-muted-foreground"}),"Developer Mode"]}),n.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Show technical details like JSON input/output for tool calls"})]}),e[20]=_):_=e[20];let O;e[21]!==a?(O=J=>a(X=>({...X,devMode:J})),e[21]=a,e[22]=O):O=e[22];let k;e[23]!==i.devMode||e[24]!==O?(k=n.jsx("div",{onClick:Rn,children:n.jsx(mt,{checked:i.devMode,onCheckedChange:O})}),e[23]=i.devMode,e[24]=O,e[25]=k):k=e[25];let $;e[26]!==w||e[27]!==k?($=n.jsxs("div",{className:"flex flex-col gap-2",children:[C,n.jsxs("button",{type:"button",onClick:w,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[_,k]})]}),e[26]=w,e[27]=k,e[28]=$):$=e[28];let I,M;e[29]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Experimental"}),M=n.jsx("p",{className:"text-xs text-muted-foreground",children:"Experimental features are unstable and may change or stop working at any time."}),e[29]=I,e[30]=M):(I=e[29],M=e[30]);let T;e[31]!==a?(T=()=>a(Dn),e[31]=a,e[32]=T):T=e[32];let U;e[33]===Symbol.for("react.memo_cache_sentinel")?(U=n.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[n.jsxs(dt,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[n.jsx(ht,{size:16,className:"text-muted-foreground"}),"Projects"]}),n.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Enable the projects feature in the sidebar"})]}),e[33]=U):U=e[33];let E;e[34]!==a?(E=J=>a(X=>({...X,experimental_projects:J})),e[34]=a,e[35]=E):E=e[35];let L;e[36]!==i.experimental_projects||e[37]!==E?(L=n.jsx("div",{onClick:Ln,children:n.jsx(mt,{checked:i.experimental_projects,onCheckedChange:E})}),e[36]=i.experimental_projects,e[37]=E,e[38]=L):L=e[38];let D;e[39]!==T||e[40]!==L?(D=n.jsxs("div",{className:"flex flex-col gap-2",children:[I,M,n.jsxs("button",{type:"button",onClick:T,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[U,L]})]}),e[39]=T,e[40]=L,e[41]=D):D=e[41];let A;e[42]!==S||e[43]!==$||e[44]!==D?(A=n.jsxs("div",{className:"p-5 space-y-6 min-h-[225px]",children:[S,$,D]}),e[42]=S,e[43]=$,e[44]=D,e[45]=A):A=e[45];let R;e[46]!==l.id?(R=n.jsx("span",{className:"font-mono text-xs",children:l.id}),e[46]=l.id,e[47]=R):R=e[47];let B;e[48]!==c?(B=c?n.jsx($e,{size:14,className:"text-green-600"}):n.jsx($t,{size:14,className:"opacity-0 group-hover:opacity-100 transition-opacity"}),e[48]=c,e[49]=B):B=e[49];let H;e[50]!==f||e[51]!==R||e[52]!==B?(H=n.jsx(Re,{asChild:!0,children:n.jsxs("button",{type:"button",onClick:f,className:"group flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[R,B]})}),e[50]=f,e[51]=R,e[52]=B,e[53]=H):H=e[53];let W;e[54]===Symbol.for("react.memo_cache_sentinel")?(W=n.jsx(De,{side:"top",children:n.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[54]=W):W=e[54];let V;e[55]!==H?(V=n.jsx(vt,{children:n.jsxs(He,{children:[H,W]})}),e[55]=H,e[56]=V):V=e[56];let q;e[57]===Symbol.for("react.memo_cache_sentinel")?(q=n.jsxs("span",{className:"text-xs text-muted-foreground/75",children:["v","2.85.0"]}),e[57]=q):q=e[57];let G;e[58]!==V?(G=n.jsxs("div",{className:"border-t border-border px-5 py-4 flex items-center justify-between shrink-0",children:[V,q]}),e[58]=V,e[59]=G):G=e[59];let Z;e[60]!==A||e[61]!==G?(Z=n.jsxs(Rs,{className:"sm:max-w-lg sm:max-h-[85vh] p-0 flex flex-col",closeButtonClassName:"hidden",children:[p,n.jsxs("div",{className:"flex flex-col",children:[A,G]})]}),e[60]=A,e[61]=G,e[62]=Z):Z=e[62];let K;return e[63]!==r||e[64]!==s||e[65]!==Z?(K=n.jsx(Hs,{open:s,onOpenChange:r,children:Z}),e[63]=r,e[64]=s,e[65]=Z,e[66]=K):K=e[66],K}function Ln(t){return t.stopPropagation()}function Dn(t){return{...t,experimental_projects:!t.experimental_projects}}function Rn(t){return t.stopPropagation()}function Hn(t){return{...t,devMode:!t.devMode}}function Jt(t){const e=N.c(77),{isCollapsed:s,variant:r,onCreateProject:l}=t,o=s===void 0?!1:s,i=r===void 0?"light":r,[a]=Fe();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[0]=c):c=e[0];const{org:d,project:m}=et(c),{data:f}=oe.useListOrganizations(),{data:u}=oe.useSession(),p=ue(),h=i==="dark",j=ie()?.project;let b;e[1]!==d||e[2]!==f?(b=f?.find(se=>se.slug===d),e[1]=d,e[2]=f,e[3]=b):b=e[3];const g=b,[v,S]=y.useState(!1),[C,w]=y.useState(!1),[_,O]=y.useState(!1),[k,$]=y.useState(null),I=u?.user,M=I?.image;let T;e[4]!==g||e[5]!==k||e[6]!==f?(T=k?f?.find(se=>se.id===k):g,e[4]=g,e[5]=k,e[6]=f,e[7]=T):T=e[7];const U=T;let E;e[8]!==p?(E=se=>{S(!1),p({to:"/$org/$project/settings",params:{org:se,project:Q}})},e[8]=p,e[9]=E):E=e[9];const L=E;let D;e[10]!==p?(D=se=>{S(!1),p({to:"/$org/$project",params:{org:se,project:Q}})},e[10]=p,e[11]=D):D=e[11];const A=D;let R;e[12]!==p?(R=(se,Ye)=>{S(!1),p({to:"/$org/$project",params:{org:se,project:Ye}})},e[12]=p,e[13]=R):R=e[13];const B=R;let H;e[14]!==p?(H=(se,Ye)=>{S(!1),p({to:"/$org/$project/settings",params:{org:se,project:Ye}})},e[14]=p,e[15]=H):H=e[15];const W=H;let V;e[16]!==l?(V=l?()=>{S(!1),l()}:void 0,e[16]=l,e[17]=V):V=e[17];const q=V;let G;e[18]===Symbol.for("react.memo_cache_sentinel")?(G=se=>{S(se),se||$(null)},e[18]=G):G=e[18];const Z=G;let K;e[19]!==g?(K=()=>{g&&$(g.id)},e[19]=g,e[20]=K):K=e[20];const J=K,X=h?"hover:bg-zinc-800 text-white":"hover:bg-sidebar-accent",P=o?"justify-center":"justify-start",F=o?"":"pl-0.5! px-1.5 gap-1.5";let Y;e[21]!==X||e[22]!==P||e[23]!==F?(Y=z("h-7 min-w-0 max-w-full",X,P,F),e[21]=X,e[22]=P,e[23]=F,e[24]=Y):Y=e[24];const fe=g?.logo??"",Ke=g?.name??"",Ze=h&&"border-none";let pe;e[25]!==Ze?(pe=z("shrink-0 rounded-[5px]",Ze),e[25]=Ze,e[26]=pe):pe=e[26];let he;e[27]!==fe||e[28]!==Ke||e[29]!==pe?(he=n.jsx(de,{url:fe,fallback:Ke,size:"xs",className:pe,objectFit:"cover"}),e[27]=fe,e[28]=Ke,e[29]=pe,e[30]=he):he=e[30];let xe;e[31]!==g?.name||e[32]!==j||e[33]!==o||e[34]!==h?(xe=!o&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:z("min-w-0 text-left",h&&"flex-1"),children:h&&j?n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"text-[10px] text-zinc-500 leading-none truncate",children:g?.name??"Select org"}),n.jsx("p",{className:"text-sm text-white font-normal leading-tight mt-0.5 truncate",children:j.name??j.slug})]}):n.jsx("span",{className:"truncate text-[14px] tracking-[-0.00625rem] font-medium text-foreground",children:g?.name??"Select org"})}),h?n.jsx(Nt,{className:"size-3 text-zinc-500 shrink-0"}):n.jsx(tt,{className:"size-3.5 text-muted-foreground shrink-0"})]}),e[31]=g?.name,e[32]=j,e[33]=o,e[34]=h,e[35]=xe):xe=e[35];let ge;e[36]!==J||e[37]!==Y||e[38]!==he||e[39]!==xe?(ge=n.jsx(nt,{asChild:!0,children:n.jsxs(te,{variant:"ghost",size:"sm",onClick:J,className:Y,children:[he,xe]})}),e[36]=J,e[37]=Y,e[38]=he,e[39]=xe,e[40]=ge):ge=e[40];let je;e[41]!==I||e[42]!==M?(je=I&&n.jsx(zn,{user:I,userImage:M,onOpenSettings:()=>{w(!0),S(!1)}}),e[41]=I,e[42]=M,e[43]=je):je=e[43];let Me,Ee;e[44]===Symbol.for("react.memo_cache_sentinel")?(Me=()=>S(!1),Ee=()=>O(!0),e[44]=Me,e[45]=Ee):(Me=e[44],Ee=e[45]);let be;e[46]!==L||e[47]!==A||e[48]!==k||e[49]!==d?(be=n.jsx(On,{currentOrgSlug:d,hoveredOrgId:k,onOrgSelect:A,onOrgSettings:L,onPopoverClose:Me,onCreateOrganization:Ee,onOrgHover:$}),e[46]=L,e[47]=A,e[48]=k,e[49]=d,e[50]=be):be=e[50];let ve;e[51]!==q||e[52]!==W||e[53]!==B||e[54]!==U||e[55]!==d||e[56]!==a.experimental_projects||e[57]!==m?(ve=a.experimental_projects&&U&&n.jsx(An,{organizationId:U.id,organizationName:U.name,orgSlug:U.slug,currentProjectSlug:U.slug===d?m:void 0,onProjectSelect:B,onProjectSettings:W,onCreateProject:q}),e[51]=q,e[52]=W,e[53]=B,e[54]=U,e[55]=d,e[56]=a.experimental_projects,e[57]=m,e[58]=ve):ve=e[58];let Ne;e[59]!==je||e[60]!==be||e[61]!==ve?(Ne=n.jsxs(rt,{align:"start",side:"bottom",className:"p-0 flex w-auto h-88 overflow-hidden",children:[je,be,ve]}),e[59]=je,e[60]=be,e[61]=ve,e[62]=Ne):Ne=e[62];let Se;e[63]!==v||e[64]!==ge||e[65]!==Ne?(Se=n.jsxs(st,{open:v,onOpenChange:Z,children:[ge,Ne]}),e[63]=v,e[64]=ge,e[65]=Ne,e[66]=Se):Se=e[66];let ye;e[67]!==C||e[68]!==I||e[69]!==M?(ye=I&&C&&I.email&&n.jsx(qt,{open:C,onOpenChange:w,user:{...I,name:I.name??void 0,email:I.email},userImage:M}),e[67]=C,e[68]=I,e[69]=M,e[70]=ye):ye=e[70];let we;e[71]!==_?(we=n.jsx(zt,{open:_,onOpenChange:O}),e[71]=_,e[72]=we):we=e[72];let Ae;return e[73]!==Se||e[74]!==ye||e[75]!==we?(Ae=n.jsxs(n.Fragment,{children:[Se,ye,we]}),e[73]=Se,e[74]=ye,e[75]=we,e[76]=Ae):Ae=e[76],Ae}Jt.Skeleton=function({variant:e="light"}){const s=e==="dark";return n.jsxs("div",{className:z("flex items-center gap-1.5 h-7 px-1.5 w-full",s&&"text-white"),children:[n.jsx(ee,{className:z("size-5 rounded-[5px] shrink-0",s&&"bg-zinc-800")}),n.jsx(ee,{className:z("h-3.5 flex-1",s&&"bg-zinc-800")})]})};function Xe(t){const e=N.c(71),{onCreateProject:s}=t,{state:r,toggleSidebar:l}=Ge(),o=r==="collapsed",[i,a]=We(),{locator:c}=ie();let d;e[0]!==c?(d=ke.isOrgAdminProject(c),e[0]=c,e[1]=d):d=e[1];const f=!d;let u;e[2]!==a?(u=()=>{a(Un)},e[2]=a,e[3]=u):u=e[3];const p=u,h=f&&"bg-[#030302] border-b border-zinc-800";let x;e[4]!==h?(x=z("h-12 gap-0 pt-0 border-r",h),e[4]=h,e[5]=x):x=e[5];const j=o&&"group-hover/switcher:opacity-0 group-hover/switcher:pointer-events-none group-hover/switcher:invisible";let b;e[6]!==j?(b=z("w-full min-w-0 transition-opacity",j),e[6]=j,e[7]=b):b=e[7];const g=f?"dark":"light";let v;e[8]!==o||e[9]!==s||e[10]!==g?(v=n.jsx(Jt,{isCollapsed:o,variant:g,onCreateProject:s}),e[8]=o,e[9]=s,e[10]=g,e[11]=v):v=e[11];let S;e[12]!==b||e[13]!==v?(S=n.jsx("div",{className:b,children:v}),e[12]=b,e[13]=v,e[14]=S):S=e[14];const C=f?"hover:bg-zinc-800 text-zinc-400":"hover:bg-sidebar-accent",w=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]!==w?(_=z("absolute inset-0 m-auto size-7 transition-opacity",C,w),e[15]=C,e[16]=w,e[17]=_):_=e[17];const O=!o,k=f?"text-zinc-400":"text-muted-foreground";let $;e[18]!==k?($=z("size-4 shrink-0",k),e[18]=k,e[19]=$):$=e[19];let I;e[20]!==$?(I=n.jsx(Dt,{className:$}),e[20]=$,e[21]=I):I=e[21];let M;e[22]!==_||e[23]!==O||e[24]!==I||e[25]!==l?(M=n.jsx(te,{variant:"ghost",size:"icon",className:_,onClick:l,"aria-label":"Expand sidebar",disabled:O,children:I}),e[22]=_,e[23]=O,e[24]=I,e[25]=l,e[26]=M):M=e[26];let T;e[27]!==M||e[28]!==S?(T=n.jsxs("div",{className:"group/switcher relative flex items-center justify-center gap-1.5 min-w-0 flex-1 overflow-hidden",children:[S,M]}),e[27]=M,e[28]=S,e[29]=T):T=e[29];const U=o&&"hidden";let E;e[30]!==U?(E=z("flex items-center gap-0.5 shrink-0",U),e[30]=U,e[31]=E):E=e[31];const L=f?"hover:bg-zinc-800 text-zinc-400 hover:text-white":"hover:bg-sidebar-accent";let D;e[32]!==L?(D=z("size-7",L),e[32]=L,e[33]=D):D=e[33];const A=f?"text-zinc-400":"text-muted-foreground";let R;e[34]!==A?(R=z("size-4",A),e[34]=A,e[35]=R):R=e[35];let B;e[36]!==R?(B=n.jsx(Lt,{className:R}),e[36]=R,e[37]=B):B=e[37];let H;e[38]!==o||e[39]!==D||e[40]!==B||e[41]!==l?(H=n.jsx(Re,{asChild:!0,children:n.jsx(te,{variant:"ghost",size:"icon",className:D,onClick:l,"aria-label":"Collapse sidebar",disabled:o,children:B})}),e[38]=o,e[39]=D,e[40]=B,e[41]=l,e[42]=H):H=e[42];let W;e[43]===Symbol.for("react.memo_cache_sentinel")?(W=n.jsx(De,{side:"bottom",children:"Collapse sidebar"}),e[43]=W):W=e[43];let V;e[44]!==H?(V=n.jsxs(He,{children:[H,W]}),e[44]=H,e[45]=V):V=e[45];let q;e[46]!==i||e[47]!==f?(q=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]=q):q=e[48];const G=f?"text-inherit":"text-muted-foreground";let Z;e[49]!==G?(Z=z(G),e[49]=G,e[50]=Z):Z=e[50];let K;e[51]!==Z?(K=n.jsx(St,{size:11,className:Z}),e[51]=Z,e[52]=K):K=e[52];let J;e[53]!==o||e[54]!==q||e[55]!==K||e[56]!==p?(J=n.jsx(Re,{asChild:!0,children:n.jsx(te,{variant:"ghost",size:"icon",className:q,onClick:p,"aria-label":"Toggle Decopilot",disabled:o,children:K})}),e[53]=o,e[54]=q,e[55]=K,e[56]=p,e[57]=J):J=e[57];let X;e[58]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx(De,{side:"bottom",children:"Toggle Decopilot"}),e[58]=X):X=e[58];let P;e[59]!==J?(P=n.jsxs(He,{children:[J,X]}),e[59]=J,e[60]=P):P=e[60];let F;e[61]!==E||e[62]!==V||e[63]!==P?(F=n.jsxs("div",{className:E,children:[V,P]}),e[61]=E,e[62]=V,e[63]=P,e[64]=F):F=e[64];let Y;e[65]!==T||e[66]!==F?(Y=n.jsx(me,{children:n.jsx(le,{children:n.jsxs("div",{className:"flex items-center justify-between w-full h-12",children:[T,F]})})}),e[65]=T,e[66]=F,e[67]=Y):Y=e[67];let fe;return e[68]!==Y||e[69]!==x?(fe=n.jsx(Kt,{className:x,children:Y}),e[68]=Y,e[69]=x,e[70]=fe):fe=e[70],fe}function Un(t){return!t}Xe.Skeleton=function({isDark:e=!1}){return n.jsx(Kt,{className:z("h-12 gap-0 pt-0",e&&"bg-[#030302] border-b border-zinc-800"),children:n.jsx(me,{children:n.jsx(le,{children:n.jsxs("div",{className:"flex items-center justify-between w-full h-12",children:[n.jsxs("div",{className:"flex items-center gap-1.5 min-w-0 flex-1 px-1.5",children:[n.jsx(ee,{className:z("size-5 rounded-[5px] shrink-0",e&&"bg-zinc-800")}),n.jsx(ee,{className:z("h-3.5 w-16",e&&"bg-zinc-800")})]}),n.jsxs("div",{className:"flex items-center gap-0.5",children:[n.jsx(ee,{className:z("size-7 rounded-lg",e&&"bg-zinc-800")}),n.jsx(ee,{className:z("size-7 rounded-lg",e&&"bg-zinc-800")})]})]})})})})};function Bn(){const t=N.c(10),{locator:e}=ie(),s=ue(),l=Be().location.pathname;let o;t[0]!==l?(o=l.includes("/settings"),t[0]=l,t[1]=o):o=t[1];const i=o;let a;t[2]!==e||t[3]!==s?(a=()=>{s({to:"/$org/$project/settings",params:ke.parse(e)})},t[2]=e,t[3]=s,t[4]=a):a=t[4];const c=a;let d,m;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:n.jsx(lt,{})}),m=n.jsx("span",{className:"truncate",children:"Settings"}),t[5]=d,t[6]=m):(d=t[5],m=t[6]);let f;return t[7]!==c||t[8]!==i?(f=n.jsx(gn,{className:"py-2 border-r",children:n.jsx(me,{children:n.jsx(le,{children:n.jsxs(Te,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:c,isActive:i,tooltip:"Settings",children:[d,m]})})})}),t[7]=c,t[8]=i,t[9]=f):f=t[9],f}function Xt(t){const e=N.c(4),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ot,{className:"my-2 -ml-1"}),e[0]=r):r=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(le,{children:n.jsx("div",{className:"group-data-[collapsible=icon]:hidden px-2 py-0 text-xs font-medium h-6 text-muted-foreground flex items-center justify-between",children:n.jsx("span",{className:"whitespace-nowrap",children:"Pinned Views"})})}),e[1]=l):l=e[1];let o;return e[2]!==s?(o=n.jsxs(n.Fragment,{children:[r,l,s]}),e[2]=s,e[3]=o):o=e[3],o}function Fn(t){const e=N.c(26),{item:s}=t,r=ue(),{org:l}=ie(),o=It(l.id),i=Bs(l.id);let a;e[0]!==i.update||e[1]!==s.url||e[2]!==o?.sidebar_items?(a=async()=>{const S=(o?.sidebar_items||[]).filter(C=>C.url!==s.url);await i.update.mutateAsync({sidebar_items:S})},e[0]=i.update,e[1]=s.url,e[2]=o?.sidebar_items,e[3]=a):a=e[3];const c=a;let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=/^https?:\/\/.+/,e[4]=d):d=e[4];let m;e[5]!==s.icon?(m=d.test(s.icon),e[5]=s.icon,e[6]=m):m=e[6];const f=m;let u;e[7]!==s.url||e[8]!==r?(u=()=>{r({to:s.url})},e[7]=s.url,e[8]=r,e[9]=u):u=e[9];const p=s.title;let h;e[10]!==f||e[11]!==s.icon||e[12]!==s.title?(h=n.jsx("div",{className:"flex items-center justify-center shrink-0",children:f?n.jsx("img",{src:s.icon,alt:s.title,className:"h-4 w-4 rounded object-cover"}):n.jsx(Fs,{size:16,className:"text-muted-foreground group-hover/item:text-foreground transition-colors"})}),e[10]=f,e[11]=s.icon,e[12]=s.title,e[13]=h):h=e[13];let x;e[14]!==s.title?(x=s.title.toLocaleLowerCase(),e[14]=s.title,e[15]=x):x=e[15];let j;e[16]!==x?(j=n.jsx("div",{className:"flex-1 min-w-0 flex flex-col items-start",children:n.jsx("span",{className:"truncate text-sm w-full capitalize",children:x})}),e[16]=x,e[17]=j):j=e[17];let b;e[18]!==c?(b=n.jsx(Ue,{size:16,className:"text-muted-foreground opacity-0 group-hover/item:opacity-50 hover:opacity-100 cursor-pointer",onClick:v=>{v.preventDefault(),v.stopPropagation(),c()}}),e[18]=c,e[19]=b):b=e[19];let g;return e[20]!==s.title||e[21]!==u||e[22]!==h||e[23]!==j||e[24]!==b?(g=n.jsx(le,{children:n.jsxs(Te,{className:"w-full pr-2 group/item relative cursor-pointer text-foreground/90 hover:text-foreground",onClick:u,tooltip:p,children:[h,j,b]})}),e[20]=s.title,e[21]=u,e[22]=h,e[23]=j,e[24]=b,e[25]=g):g=e[25],g}function pt(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(le,{children:n.jsx("div",{className:"flex items-center gap-2 px-4 py-2",children:n.jsx(ee,{className:"h-4 flex-1"})})}),t[0]=e):e=t[0],e}function Wn(){const t=N.c(4),{org:e}=ie(),r=It(e.id)?.sidebar_items;if(!r?.length)return null;let l;t[0]!==r?(l=r.map(Vn),t[0]=r,t[1]=l):l=t[1];let o;return t[2]!==l?(o=n.jsx(Xt,{children:l}),t[2]=l,t[3]=o):o=t[3],o}function Vn(t){return n.jsx(Fn,{item:t},t.url)}function Gn(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(y.Suspense,{fallback:n.jsxs(Xt,{children:[n.jsx(pt,{}),n.jsx(pt,{})]}),children:n.jsx(Wn,{})}),t[0]=e):e=t[0],e}function Kn(t){const e=N.c(11),{project:s}=t,r=s.ui?.themeColor??"#60a5fa";if(s.ui?.icon){let c;return e[0]!==s.ui.icon?(c=n.jsx("img",{src:s.ui.icon,alt:"",className:"size-4 rounded object-cover border border-border/50"}),e[0]=s.ui.icon,e[1]=c):c=e[1],c}let l;e[2]!==r?(l={backgroundColor:r},e[2]=r,e[3]=l):l=e[3];let o;e[4]!==s.name?(o=s.name.charAt(0).toUpperCase(),e[4]=s.name,e[5]=o):o=e[5];let i;e[6]!==o?(i=n.jsx("span",{className:"text-[10px] font-medium text-white",children:o}),e[6]=o,e[7]=i):i=e[7];let a;return e[8]!==l||e[9]!==i?(a=n.jsx("div",{className:"size-4 rounded flex items-center justify-center border border-border/50",style:l,children:i}),e[8]=l,e[9]=i,e[10]=a):a=e[10],a}function Zn(t){const e=N.c(14),{project:s}=t,r=ue(),{org:l}=ie();let o;e[0]!==r||e[1]!==l.slug||e[2]!==s.slug?(o=()=>{r({to:"/$org/$project",params:{org:l.slug,project:s.slug}})},e[0]=r,e[1]=l.slug,e[2]=s.slug,e[3]=o):o=e[3];let i;e[4]!==s?(i=n.jsx(Kn,{project:s}),e[4]=s,e[5]=i):i=e[5];let a;e[6]!==s.name?(a=n.jsx("span",{className:"truncate flex-1",children:s.name}),e[6]=s.name,e[7]=a):a=e[7];let c;e[8]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(_t,{size:12,className:"text-muted-foreground opacity-0 group-hover/item:opacity-100 transition-opacity"}),e[8]=c):c=e[8];let d;return e[9]!==s.name||e[10]!==o||e[11]!==i||e[12]!==a?(d=n.jsx(le,{children:n.jsxs(Te,{className:"group/item cursor-pointer text-foreground/90 hover:text-foreground",onClick:o,tooltip:s.name,children:[i,a,c]})}),e[9]=s.name,e[10]=o,e[11]=i,e[12]=a,e[13]=d):d=e[13],d}function Yn(){const t=N.c(54),{org:e}=ie(),{data:s,isLoading:r}=kt(e.id),[l,o]=y.useState(!0),[i,a]=y.useState(!1);let c,d,m,f,u,p,h,x,j,b,g,v,S;if(t[0]!==r||t[1]!==l||t[2]!==s){S=Symbol.for("react.early_return_sentinel");e:{const M=s?.filter(Jn)??[];if(r){let R;t[16]===Symbol.for("react.memo_cache_sentinel")?(R=n.jsx(le,{children:n.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[n.jsx(ee,{className:"h-4 w-4 rounded"}),n.jsx(ee,{className:"h-4 flex-1"})]})}),t[16]=R):R=t[16];let B;t[17]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsx(Ie,{className:"py-0",children:n.jsx(Oe,{children:n.jsxs(me,{className:"gap-0.5",children:[R,n.jsx(le,{children:n.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[n.jsx(ee,{className:"h-4 w-4 rounded"}),n.jsx(ee,{className:"h-4 flex-1"})]})})]})})}),t[17]=B):B=t[17],S=B;break e}t[18]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(ot,{className:"my-2"}),t[18]=v):v=t[18],u=Ns,b=l,g=o,f=Ie,j="py-0",m=Oe,d=me,h="gap-0.5";let T;t[19]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx("span",{children:"Projects"}),t[19]=T):T=t[19];const U=!l&&"-rotate-90";let E;t[20]!==U?(E=z("transition-transform",U),t[20]=U,t[21]=E):E=t[21];let L;t[22]!==E?(L=n.jsx(Ss,{asChild:!0,children:n.jsxs("button",{type:"button",className:"flex items-center gap-1 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors",children:[T,n.jsx(tt,{size:12,className:E})]})}),t[22]=E,t[23]=L):L=t[23];let D;t[24]===Symbol.for("react.memo_cache_sentinel")?(D=()=>a(!0),t[24]=D):D=t[24];let A;t[25]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx("button",{type:"button",onClick:D,className:"text-muted-foreground hover:text-foreground transition-colors p-0.5 rounded hover:bg-accent",title:"Create new project",children:n.jsx(Ve,{size:16})}),t[25]=A):A=t[25],t[26]!==L?(x=n.jsx(le,{children:n.jsxs("div",{className:"flex items-center justify-between px-2 h-6",children:[L,A]})}),t[26]=L,t[27]=x):x=t[27],c=ys,p=M.length===0?n.jsx(le,{children:n.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:"No projects yet"})}):M.map(qn)}t[0]=r,t[1]=l,t[2]=s,t[3]=c,t[4]=d,t[5]=m,t[6]=f,t[7]=u,t[8]=p,t[9]=h,t[10]=x,t[11]=j,t[12]=b,t[13]=g,t[14]=v,t[15]=S}else c=t[3],d=t[4],m=t[5],f=t[6],u=t[7],p=t[8],h=t[9],x=t[10],j=t[11],b=t[12],g=t[13],v=t[14],S=t[15];if(S!==Symbol.for("react.early_return_sentinel"))return S;let C;t[28]!==c||t[29]!==p?(C=n.jsx(c,{children:p}),t[28]=c,t[29]=p,t[30]=C):C=t[30];let w;t[31]!==d||t[32]!==h||t[33]!==x||t[34]!==C?(w=n.jsxs(d,{className:h,children:[x,C]}),t[31]=d,t[32]=h,t[33]=x,t[34]=C,t[35]=w):w=t[35];let _;t[36]!==m||t[37]!==w?(_=n.jsx(m,{children:w}),t[36]=m,t[37]=w,t[38]=_):_=t[38];let O;t[39]!==f||t[40]!==_||t[41]!==j?(O=n.jsx(f,{className:j,children:_}),t[39]=f,t[40]=_,t[41]=j,t[42]=O):O=t[42];let k;t[43]!==u||t[44]!==O||t[45]!==b||t[46]!==g?(k=n.jsx(u,{open:b,onOpenChange:g,children:O}),t[43]=u,t[44]=O,t[45]=b,t[46]=g,t[47]=k):k=t[47];let $;t[48]!==i?($=n.jsx(Ct,{open:i,onOpenChange:a}),t[48]=i,t[49]=$):$=t[49];let I;return t[50]!==k||t[51]!==$||t[52]!==v?(I=n.jsxs(n.Fragment,{children:[v,k,$]}),t[50]=k,t[51]=$,t[52]=v,t[53]=I):I=t[53],I}function qn(t){return n.jsx(Zn,{project:t},t.id)}function Jn(t){return t.slug!==Q}function Xn(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(y.Suspense,{fallback:n.jsx(Ie,{className:"py-0",children:n.jsx(Oe,{children:n.jsx(me,{className:"gap-0.5",children:n.jsx(le,{children:n.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[n.jsx(ee,{className:"h-4 w-4 rounded"}),n.jsx(ee,{className:"h-4 flex-1"})]})})})})}),children:n.jsx(Yn,{})}),t[0]=e):e=t[0],e}function Qn(t){const e=N.c(16),{onCreateProject:s}=t,[r]=Fe(),l=nn(),{locator:o}=ie();let i;e[0]!==o?(i=ke.isOrgAdminProject(o),e[0]=o,e[1]=i):i=e[1];const a=i;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Xe.Skeleton,{}),e[2]=c):c=e[2];let d;e[3]!==s?(d=n.jsx(y.Suspense,{fallback:c,children:n.jsx(Xe,{onCreateProject:s})}),e[3]=s,e[4]=d):d=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(Bn,{}),e[5]=m):m=e[5];let f;e[6]!==a||e[7]!==r?(f=a?r.experimental_projects?n.jsx(Xn,{}):null:n.jsx(Gn,{}),e[6]=a,e[7]=r,e[8]=f):f=e[8];let u;e[9]!==f?(u=n.jsx(wt,{children:n.jsx(y.Suspense,{fallback:null,children:f})}),e[9]=f,e[10]=u):u=e[10];const p=a?void 0:"pt-3";let h;return e[11]!==l||e[12]!==d||e[13]!==u||e[14]!==p?(h=n.jsx(Yt,{sections:l,header:d,footer:m,additionalContent:u,contentClassName:p}),e[11]=l,e[12]=d,e[13]=u,e[14]=p,e[15]=h):h=e[15],h}function er(t){const e=N.c(12);let s,r,l,o;e[0]!==t?({className:s,orientation:l,decorative:o,...r}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o):(s=e[1],r=e[2],l=e[3],o=e[4]);const i=l===void 0?"horizontal":l,a=o===void 0?!0:o;let c;e[5]!==s?(c=z("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",s),e[5]=s,e[6]=c):c=e[6];let d;return e[7]!==a||e[8]!==i||e[9]!==r||e[10]!==c?(d=n.jsx(cs,{"data-slot":"separator-root",decorative:a,orientation:i,className:c,...r}),e[7]=a,e[8]=i,e[9]=r,e[10]=c,e[11]=d):d=e[11],d}const Qt=y.createContext(null);function tr(){const t=y.useContext(Qt);if(!t)throw new Error("TopbarSwitcher compound components must be used within TopbarSwitcher.Root");return t}function sr(t){const e=N.c(10),{children:s,onItemHover:r}=t,[l,o]=y.useState(null);let i;e[0]!==r?(i=f=>{o(f),r?.(f)},e[0]=r,e[1]=i):i=e[1];const a=i;let c;e[2]!==l||e[3]!==a?(c={hoveredItem:l,setHoveredItem:a},e[2]=l,e[3]=a,e[4]=c):c=e[4];let d;e[5]!==s?(d=n.jsx(st,{children:s}),e[5]=s,e[6]=d):d=e[6];let m;return e[7]!==c||e[8]!==d?(m=n.jsx(Qt.Provider,{value:c,children:d}),e[7]=c,e[8]=d,e[9]=m):m=e[9],m}function nr(t){const e=N.c(6),{children:s,onClick:r}=t;let l;e[0]!==s||e[1]!==r?(l=n.jsx(te,{variant:"link",className:"p-0.5 h-auto",onClick:r,type:"button",children:s}),e[0]=s,e[1]=r,e[2]=l):l=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(nt,{asChild:!0,children:n.jsx(te,{size:"icon",variant:"ghost",className:"w-6 h-6 p-0",children:n.jsx(Nt,{size:16,className:"opacity-50"})})}),e[3]=o):o=e[3];let i;return e[4]!==l?(i=n.jsxs("div",{className:"flex items-center gap-1",children:[l,o]}),e[4]=l,e[5]=i):i=e[5],i}function rr(t){const e=N.c(8),{item:s,fallback:r}=t,l=r===void 0?"":r,o=s?.avatarUrl??"",i=s?.name??l;let a;e[0]!==o||e[1]!==i?(a=n.jsx(de,{url:o,fallback:i,size:"xs",objectFit:"contain"}),e[0]=o,e[1]=i,e[2]=a):a=e[2];const c=s?.name??l;let d;e[3]!==c?(d=n.jsx("span",{children:c}),e[3]=c,e[4]=d):d=e[4];let m;return e[5]!==a||e[6]!==d?(m=n.jsxs("div",{className:"flex items-center gap-2",children:[a,d]}),e[5]=a,e[6]=d,e[7]=m):m=e[7],m}function lr(t){const e=N.c(6),{children:s,align:r}=t,l=r===void 0?"start":r,i=y.Children.toArray(s).filter(or).length===1?"280px":"480px";let a;e[0]!==i?(a={width:i},e[0]=i,e[1]=a):a=e[1];let c;return e[2]!==l||e[3]!==s||e[4]!==a?(c=n.jsx(rt,{align:l,className:"p-0 flex items-start",style:a,children:s}),e[2]=l,e[3]=s,e[4]=a,e[5]=c):c=e[5],c}function or(t){return y.isValidElement(t)&&(t.type===ts||t.type===es)}function es(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex flex-col border-border w-[240px] border-r last:border-r-0 last:w-full",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}const ts=es;function ir(t){const e=N.c(6),{placeholder:s,value:r,onChange:l}=t,o=s===void 0?"Search...":s;let i;e[0]!==l?(i=c=>l(c.target.value),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==o||e[3]!==i||e[4]!==r?(a=n.jsx(Ws,{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 ar(t){const e=N.c(6),{children:s,emptyMessage:r}=t,l=r===void 0?"No items found.":r,o=y.Children.count(s)>0;let i;e[0]!==l||e[1]!==o?(i=!o&&n.jsx("div",{className:"text-muted-foreground text-sm px-1 py-8 text-center",children:l}),e[0]=l,e[1]=o,e[2]=i):i=e[2];let a;return e[3]!==s||e[4]!==i?(a=n.jsxs("div",{className:"flex flex-col gap-0.5 p-1 max-h-44 overflow-y-auto",children:[i,s]}),e[3]=s,e[4]=i,e[5]=a):a=e[5],a}function cr(t){const e=N.c(15),{item:s,onClick:r,onHover:l,children:o}=t,i=tr();let a;e[0]!==i||e[1]!==s||e[2]!==l?(a=()=>{i.setHoveredItem(s.slug),l?.(s)},e[0]=i,e[1]=s,e[2]=l,e[3]=a):a=e[3];const c=a;let d;e[4]!==s||e[5]!==r?(d=()=>r(s),e[4]=s,e[5]=r,e[6]=d):d=e[6];let m;e[7]!==o||e[8]!==s.avatarUrl||e[9]!==s.name?(m=o||n.jsxs(n.Fragment,{children:[n.jsx(de,{url:s.avatarUrl??"",fallback:s.name,size:"xs",className:"w-[22px]! h-[22px]!",objectFit:"contain"}),n.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:s.name})]}),e[7]=o,e[8]=s.avatarUrl,e[9]=s.name,e[10]=m):m=e[10];let f;return e[11]!==c||e[12]!==d||e[13]!==m?(f=n.jsx(te,{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 dr(t){const e=N.c(2),{children:s}=t;let r;return e[0]!==s?(r=n.jsx("div",{className:"px-1 pb-1 pt-0.5",children:s}),e[0]=s,e[1]=r):r=e[1],r}function mr(t){const e=N.c(11),{onClick:s,icon:r,children:l,variant:o}=t,a=(o===void 0?"default":o)==="muted"&&"text-muted-foreground";let c;e[0]!==a?(c=z("w-full justify-start font-normal",a),e[0]=a,e[1]=c):c=e[1];let d;e[2]!==r?(d=r&&n.jsx("span",{className:"[&>svg]:size-4",children:r}),e[2]=r,e[3]=d):d=e[3];let m;e[4]!==l?(m=n.jsx("span",{children:l}),e[4]=l,e[5]=m):m=e[5];let f;return e[6]!==s||e[7]!==c||e[8]!==d||e[9]!==m?(f=n.jsxs(te,{variant:"ghost",size:"sm",className:c,onClick:s,children:[d,m]}),e[6]=s,e[7]=c,e[8]=d,e[9]=m,e[10]=f):f=e[10],f}function fr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(er,{}),t[0]=e):e=t[0],e}function ur(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"h-4 w-16 bg-accent rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const ne=Object.assign(sr,{Trigger:nr,CurrentItem:rr,Content:lr,Panel:ts,Search:ir,Items:ar,Item:cr,Actions:dr,Action:mr,Separator:fr,Skeleton:ur});function Qe(){const t=N.c(59);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:s}=et(e),{data:r}=oe.useListOrganizations(),l=ue();let o;t[1]!==s||t[2]!==r?(o=r?.find(U=>U.slug===s),t[1]=s,t[2]=r,t[3]=o):o=t[3];const i=o,[a,c]=y.useState(""),[d,m]=y.useState(!1);let f,u,p,h,x,j,b,g;if(t[4]!==i||t[5]!==l||t[6]!==s||t[7]!==a||t[8]!==r){const E=(r?(()=>{const H=r.filter(W=>W.name.toLowerCase().includes(a.toLowerCase()));if(s){const W=H.findIndex(V=>V.slug===s);if(W>0){const V=H[W];V&&(H.splice(W,1),H.unshift(V))}}return H})():[]).map(pr);let L;t[17]!==i?(L=i?{slug:i.slug,name:i.name,avatarUrl:i.logo}:void 0,t[17]=i,t[18]=L):L=t[18];const D=L;h=ne;let A;t[19]!==l||t[20]!==s?(A=()=>l({to:"/$org",params:{org:s??""}}),t[19]=l,t[20]=s,t[21]=A):A=t[21];let R;t[22]!==D?(R=n.jsx(ne.CurrentItem,{item:D}),t[22]=D,t[23]=R):R=t[23],t[24]!==A||t[25]!==R?(g=n.jsx(ne.Trigger,{onClick:A,children:R}),t[24]=A,t[25]=R,t[26]=g):g=t[26],p=ne.Content,u=ne.Panel,t[27]!==a?(b=n.jsx(ne.Search,{placeholder:"Search organizations...",value:a,onChange:c}),t[27]=a,t[28]=b):b=t[28],f=ne.Items,x="No organizations found.";let B;t[29]!==l?(B=H=>n.jsx(ne.Item,{item:H,onClick:W=>l({to:"/$org",params:{org:W.slug}})},H.slug),t[29]=l,t[30]=B):B=t[30],j=E.map(B),t[4]=i,t[5]=l,t[6]=s,t[7]=a,t[8]=r,t[9]=f,t[10]=u,t[11]=p,t[12]=h,t[13]=x,t[14]=j,t[15]=b,t[16]=g}else f=t[9],u=t[10],p=t[11],h=t[12],x=t[13],j=t[14],b=t[15],g=t[16];let v;t[31]!==f||t[32]!==x||t[33]!==j?(v=n.jsx(f,{emptyMessage:x,children:j}),t[31]=f,t[32]=x,t[33]=j,t[34]=v):v=t[34];let S,C;t[35]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(ne.Actions,{children:n.jsx(ne.Action,{onClick:()=>m(!0),variant:"muted",children:"+ Create organization"})}),C=n.jsx(ne.Separator,{}),t[35]=S,t[36]=C):(S=t[35],C=t[36]);let w;t[37]!==l?(w=()=>l({to:"/"}),t[37]=l,t[38]=w):w=t[38];let _;t[39]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(Vs,{}),t[39]=_):_=t[39];let O;t[40]!==w?(O=n.jsx(ne.Actions,{children:n.jsx(ne.Action,{onClick:w,icon:_,children:"See all organizations"})}),t[40]=w,t[41]=O):O=t[41];let k;t[42]!==u||t[43]!==O||t[44]!==b||t[45]!==v?(k=n.jsxs(u,{children:[b,v,S,C,O]}),t[42]=u,t[43]=O,t[44]=b,t[45]=v,t[46]=k):k=t[46];let $;t[47]!==p||t[48]!==k?($=n.jsx(p,{children:k}),t[47]=p,t[48]=k,t[49]=$):$=t[49];let I;t[50]!==h||t[51]!==$||t[52]!==g?(I=n.jsxs(h,{children:[g,$]}),t[50]=h,t[51]=$,t[52]=g,t[53]=I):I=t[53];let M;t[54]!==d?(M=n.jsx(zt,{open:d,onOpenChange:m}),t[54]=d,t[55]=M):M=t[55];let T;return t[56]!==I||t[57]!==M?(T=n.jsxs(n.Fragment,{children:[I,M]}),t[56]=I,t[57]=M,t[58]=T):T=t[58],T}function pr(t){return{slug:t.slug,name:t.name,avatarUrl:t.logo}}Qe.Skeleton=ne.Skeleton;function hr(){const t=N.c(10),{locator:e}=ie(),s=Gs();if(ke.isOrgAdminProject(e))return null;const l=s?.leftRef;let o;t[0]!==l?(o=n.jsx("div",{ref:l,className:"flex items-center gap-2 flex-1 min-w-0"}),t[0]=l,t[1]=o):o=t[1];const i=s?.centerRef;let a;t[2]!==i?(a=n.jsx("div",{ref:i,className:"flex flex-1 h-full items-center justify-center px-4 min-w-0 [&:empty]:hidden"}),t[2]=i,t[3]=a):a=t[3];const c=s?.rightRef;let d;t[4]!==c?(d=n.jsx("div",{ref:c,className:"flex flex-1 gap-2 h-full items-center justify-end min-w-0 [&:empty]:hidden"}),t[4]=c,t[5]=d):d=t[5];let m;return t[6]!==o||t[7]!==a||t[8]!==d?(m=n.jsx("div",{className:"dark",children:n.jsxs("header",{className:"sticky top-0 z-50 h-12 bg-background flex items-center px-4 shrink-0",children:[o,a,d]})}),t[6]=o,t[7]=a,t[8]=d,t[9]=m):m=t[9],m}function xr({prop:t,defaultProp:e,onChange:s=()=>{}}){const[r,l]=gr({defaultProp:e,onChange:s}),o=t!==void 0,i=o?t:r,a=gt(s),c=y.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 gr({defaultProp:t,onChange:e}){const s=y.useState(t),[r]=s,l=y.useRef(r),o=gt(e);return y.useEffect(()=>{l.current!==r&&(o(r),l.current=r)},[r,l,o]),s}function jr(t){const e=N.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let r;return e[2]!==s?(r=n.jsx(_e.Root,{"data-slot":"drawer",...s}),e[2]=s,e[3]=r):r=e[3],r}function br(t){const e=N.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let r;return e[2]!==s?(r=n.jsx(_e.Trigger,{"data-slot":"drawer-trigger",...s}),e[2]=s,e[3]=r):r=e[3],r}function vr(t){const e=N.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let r;return e[2]!==s?(r=n.jsx(_e.Portal,{"data-slot":"drawer-portal",...s}),e[2]=s,e[3]=r):r=e[3],r}function Nr(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx(_e.Overlay,{"data-slot":"drawer-overlay",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Sr(t){const e=N.c(12);let s,r,l;e[0]!==t?({className:r,children:s,...l}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l):(s=e[1],r=e[2],l=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Nr,{}),e[4]=o):o=e[4];let i;e[5]!==r?(i=z("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",r),e[5]=r,e[6]=i):i=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=a):a=e[7];let c;return e[8]!==s||e[9]!==l||e[10]!==i?(c=n.jsxs(vr,{"data-slot":"drawer-portal",children:[o,n.jsxs(_e.Content,{"data-slot":"drawer-content",className:i,...l,children:[a,s]})]}),e[8]=s,e[9]=l,e[10]=i,e[11]=c):c=e[11],c}function yr(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex flex-col gap-1.5 px-4 py-2",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"drawer-header",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function wr(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("text-foreground font-semibold",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx(_e.Title,{"data-slot":"drawer-title",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}const ss=y.createContext({setOpen:()=>{}}),Cr=()=>y.useContext(ss),kr=t=>{const e=N.c(25);let s,r,l,o,i;e[0]!==t?({children:s,defaultOpen:r,open:o,onOpenChange:l,...i}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o,e[5]=i):(s=e[1],r=e[2],l=e[3],o=e[4],i=e[5]);const a=r??!1;let c;e[6]!==l||e[7]!==o||e[8]!==a?(c={prop:o,defaultProp:a,onChange:l},e[6]=l,e[7]=o,e[8]=a,e[9]=c):c=e[9];const[d,m]=xr(c);let f;e[10]!==m?(f={setOpen:m},e[10]=m,e[11]=f):f=e[11];let u;e[12]!==s||e[13]!==d||e[14]!==i||e[15]!==m?(u=n.jsx(jr,{open:d,onOpenChange:m,...i,children:s}),e[12]=s,e[13]=d,e[14]=i,e[15]=m,e[16]=u):u=e[16];let p;e[17]!==d||e[18]!==i||e[19]!==m||e[20]!==u?(p=n.jsx(qs,{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 h;return e[22]!==f||e[23]!==p?(h=n.jsx(ss.Provider,{value:f,children:p}),e[22]=f,e[23]=p,e[24]=h):h=e[24],h},_r=t=>{const{children:e,title:s,...r}=t,l=Pe(),{className:o,...i}=r;return l?n.jsxs(Sr,{...i,children:[n.jsx(yr,{className:"hidden",children:n.jsx(wr,{children:s})}),n.jsx("div",{className:z("flex flex-col gap-2 p-2 py-4",o),children:e})]}):n.jsx(Ys,{...r,children:e})},zr=t=>{const{children:e,...s}=t,{setOpen:r}=Cr(),l=Pe(),{className:o,...i}=s;return l?n.jsx("div",{...i,onClick:a=>{r(!1);const{onClick:c}=i;c?.(a)},className:z("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),children:e}):n.jsx(Js,{...s,children:e})},$r=t=>{const e=N.c(7);let s,r;e[0]!==t?({children:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);const l=Pe();let o;return e[3]!==s||e[4]!==l||e[5]!==r?(o=l?n.jsx(br,{asChild:!0,children:s}):n.jsx(Zs,{...r,children:s}),e[3]=s,e[4]=l,e[5]=r,e[6]=o):o=e[6],o},Ir=t=>{const e=N.c(7);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);const l=Pe();let o;return e[3]!==s||e[4]!==l||e[5]!==r?(o=l?n.jsx(ft,{className:z(s),...r}):n.jsx(ft,{className:z(s),...r}),e[3]=s,e[4]=l,e[5]=r,e[6]=o):o=e[6],o};function Or(t){const e=N.c(11),{user:s,trigger:r,align:l,children:o}=t,i=l===void 0?"start":l;let a;e[0]!==r||e[1]!==s?(a=r(s),e[0]=r,e[1]=s,e[2]=a):a=e[2];let c;e[3]!==a?(c=n.jsx($r,{asChild:!0,children:n.jsx("div",{children:a})}),e[3]=a,e[4]=c):c=e[4];let d;e[5]!==i||e[6]!==o?(d=n.jsx(_r,{side:"top",align:i,className:"md:w-[240px]",children:o}),e[5]=i,e[6]=o,e[7]=d):d=e[7];let m;return e[8]!==c||e[9]!==d?(m=n.jsxs(kr,{children:[c,d]}),e[8]=c,e[9]=d,e[10]=m):m=e[10],m}function Pr(t){const e=N.c(8),{children:s,onClick:r,className:l,asChild:o}=t;let i;e[0]!==o||e[1]!==s||e[2]!==r?(i=o?s:n.jsx("button",{type:"button",className:"flex items-center gap-2 text-sm w-full cursor-pointer",onClick:r,children:s}),e[0]=o,e[1]=s,e[2]=r,e[3]=i):i=e[3];let a;return e[4]!==o||e[5]!==l||e[6]!==i?(a=n.jsx(zr,{asChild:o,className:l,children:i}),e[4]=o,e[5]=l,e[6]=i,e[7]=a):a=e[7],a}function Tr(t){const e=N.c(2),{className:s}=t;let r;return e[0]!==s?(r=n.jsx(Ir,{className:s}),e[0]=s,e[1]=r):r=e[1],r}function Mr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const ae=Object.assign(Or,{Item:Pr,Separator:Tr,Skeleton:Mr});function Er(t){const e=N.c(49),{user:s,userImage:r}=t,[l,o]=y.useState(!1),[i,a]=y.useState(!1);let c;e[0]!==s.email||e[1]!==s.id||e[2]!==s.name?(c=()=>{const A=`ID: ${s.id}
|
|
4
4
|
Name: ${s.name||"N/A"}
|
|
5
|
-
Email: ${s.email}`;navigator.clipboard.writeText(A),a(!0),ce.success("User info copied to clipboard"),setTimeout(()=>a(!1),2e3)},e[0]=s.email,e[1]=s.id,e[2]=s.name,e[3]=c):c=e[3];const d=c;let m;e[4]!==s.email||e[5]!==s.name||e[6]!==r?(m=()=>n.jsx(de,{url:r,fallback:s.name||s.email||"U",shape:"circle",size:"sm",className:"cursor-pointer hover:ring-2 ring-muted-foreground transition-all h-7 w-7"}),e[4]=s.email,e[5]=s.name,e[6]=r,e[7]=m):m=e[7];const f=s.name||s.email||"U";let u;e[8]!==f||e[9]!==r?(u=n.jsx(de,{url:r,fallback:f,shape:"circle",size:"sm"}),e[8]=f,e[9]=r,e[10]=u):u=e[10];const p=s.name||"User";let x;e[11]!==p?(x=n.jsx("div",{className:"text-sm font-medium truncate",children:p}),e[11]=p,e[12]=x):x=e[12];let h;e[13]!==s.email?(h=n.jsx("div",{className:"text-xs text-muted-foreground truncate",children:s.email}),e[13]=s.email,e[14]=h):h=e[14];let j;e[15]!==x||e[16]!==h?(j=n.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[x,h]}),e[15]=x,e[16]=h,e[17]=j):j=e[17];let b;e[18]!==i?(b=n.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:i?n.jsx($e,{size:16,className:"text-green-600"}):n.jsx($t,{size:16,className:"text-muted-foreground"})}),e[18]=i,e[19]=b):b=e[19];let g;e[20]!==u||e[21]!==j||e[22]!==b?(g=n.jsxs("div",{className:"group flex items-center gap-3 w-full py-1",children:[u,j,b]}),e[20]=u,e[21]=j,e[22]=b,e[23]=g):g=e[23];let v;e[24]!==d||e[25]!==g?(v=n.jsx(ae.Item,{onClick:d,children:g}),e[24]=d,e[25]=g,e[26]=v):v=e[26];let S;e[27]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(ae.Separator,{}),e[27]=S):S=e[27];let C,w;e[28]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsxs(ae.Item,{onClick:()=>o(!0),children:[n.jsx(Xs,{className:"text-muted-foreground",size:18}),"Profile Settings"]}),w=n.jsx(ae.Separator,{}),e[28]=C,e[29]=w):(C=e[28],w=e[29]);let _;e[30]===Symbol.for("react.memo_cache_sentinel")?(_=n.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=n.jsx(ae.Item,{asChild:!0,children:n.jsxs("a",{href:"https://github.com/decocms/admin",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[_,"decocms/admin",n.jsx(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=n.jsx(Ht,{className:"text-muted-foreground",size:18}),e[32]=k):k=e[32];let $,I;e[33]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx(ae.Item,{asChild:!0,children:n.jsxs("a",{href:"https://decocms.com",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[k,"Homepage",n.jsx(ut,{size:18,className:"ml-auto text-muted-foreground"})]})}),I=n.jsx(ae.Separator,{}),e[33]=$,e[34]=I):($=e[33],I=e[34]);let M,T,U;e[35]===Symbol.for("react.memo_cache_sentinel")?(M=n.jsxs(ae.Item,{onClick:Ar,children:[n.jsx(Bt,{size:18,className:"text-muted-foreground"}),"Log out"]}),T=n.jsx(ae.Separator,{}),U=n.jsxs("div",{className:"px-2 py-1.5 text-[11px] text-muted-foreground/75",children:["v","2.83.0"]}),e[35]=M,e[36]=T,e[37]=U):(M=e[35],T=e[36],U=e[37]);let E;e[38]!==v||e[39]!==m||e[40]!==s?(E=n.jsxs(ae,{user:s,trigger:m,align:"end",children:[v,S,C,w,O,$,I,M,T,U]}),e[38]=v,e[39]=m,e[40]=s,e[41]=E):E=e[41];let L;e[42]!==l||e[43]!==s||e[44]!==r?(L=l&&n.jsx(qt,{open:l,onOpenChange:o,user:s,userImage:r}),e[42]=l,e[43]=s,e[44]=r,e[45]=L):L=e[45];let D;return e[46]!==E||e[47]!==L?(D=n.jsxs(n.Fragment,{children:[E,L]}),e[46]=E,e[47]=L,e[48]=D):D=e[48],D}function Ar(){return oe.signOut()}function Lr(){const t=N.c(7),{data:e}=oe.useSession();if(!e?.user){let c;return t[0]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(de,{url:void 0,fallback:"U",shape:"circle",size:"sm",className:"cursor-pointer h-7 w-7",muted:!0}),t[0]=c):c=t[0],c}const s=e.user,r=s.name??void 0;let l;t[1]!==r||t[2]!==s?(l={...s,name:r},t[1]=r,t[2]=s,t[3]=l):l=t[3];const o=l,i=s.image;let a;return t[4]!==i||t[5]!==o?(a=n.jsx(Er,{user:o,userImage:i}),t[4]=i,t[5]=o,t[6]=a):a=t[6],a}function Dr(){const t=N.c(2),s=Be().location.href;let r;return t[0]!==s?(r=n.jsx(us,{to:"/login",search:{next:s},replace:!0}),t[0]=s,t[1]=r):r=t[1],r}function Rr(t){const e=N.c(6),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ds,{children:n.jsx(jt,{})}),e[0]=r):r=e[0];let l;e[1]!==s?(l=n.jsx(ms,{children:s}),e[1]=s,e[2]=l):l=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(fs,{children:n.jsx(Dr,{})}),e[3]=o):o=e[3];let i;return e[4]!==l?(i=n.jsxs(n.Fragment,{children:[r,l,o]}),e[4]=l,e[5]=i):i=e[5],i}function Hr(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("fixed top-0 left-0 right-0 z-20 bg-background flex items-center w-full h-12 border-b border-border",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Ur(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex items-center justify-center px-2.5 h-full border-r border-border",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Br(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex items-center gap-2 px-2 h-full",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Fr(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex items-center gap-2 px-2 h-full flex-1",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Wr(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex items-center gap-2 px-2 h-full ml-auto",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Vr(){const t=N.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex items-center justify-center px-2 h-full border-r border-border",children:n.jsx("div",{className:"w-8 h-8 bg-muted rounded-md animate-pulse"})}),t[0]=e):e=t[0];let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx("div",{className:"flex items-center gap-2 px-2 h-full",children:n.jsx("div",{className:"w-32 h-6 bg-muted rounded-md animate-pulse"})}),t[1]=s):s=t[1];let r;return t[2]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsxs("div",{className:"fixed top-0 left-0 right-0 z-20 bg-background flex items-center w-full h-12 border-b border-border",children:[e,s,n.jsx("div",{className:"flex items-center gap-2 px-2 h-full ml-auto",children:n.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"})})]}),t[2]=r):r=t[2],r}const Le=Object.assign(Hr,{Sidebar:Ur,Left:Br,Center:Fr,Right:Wr,Skeleton:Vr});function ns(){const t=N.c(3),{toggleSidebar:e}=Ge();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(Ut,{className:"text-muted-foreground/85 group-hover:text-foreground transition-colors",size:18}),t[0]=s):s=t[0];let r;return t[1]!==e?(r=n.jsx(n.Fragment,{children:n.jsx(te,{onClick:e,size:"icon",variant:"ghost",className:"w-7 h-7 rounded-md",children:s})}),t[1]=e,t[2]=r):r=t[2],r}ns.Skeleton=function(){return n.jsx("div",{className:"w-7 h-7 bg-muted rounded-md animate-pulse"})};function Gr({showSidebarToggle:t=!1,showOrgSwitcher:e=!1,showDecoChat:s=!1,disableDecoChat:r=!1}){const[l,o]=We(),i=y.useRef(r);r&&l&&i.current!==r&&o(!1),i.current=r;const a=()=>{r||o(c=>!c)};return n.jsxs(Le,{children:[t&&n.jsx(Le.Sidebar,{children:n.jsx(ns,{})}),n.jsx(Le.Left,{children:e&&n.jsx(y.Suspense,{fallback:n.jsx(Qe.Skeleton,{}),children:n.jsx(Qe,{})})}),n.jsxs(Le.Right,{className:"gap-2",children:[s&&!r&&n.jsxs(te,{size:"sm",variant:"default",onClick:a,className:"h-7 gap-2",children:[n.jsx(St,{size:16}),"Chat"]}),n.jsx(Lr,{})]})]})}function Kr(t){const e=N.c(10),{children:s,className:r}=t,[,l]=y.useTransition();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=Pt.decoChatPanelWidth(),e[0]=o):o=e[0];const[i,a]=Ot(o,30);let c;e[1]!==a?(c=u=>l(()=>a(u)),e[1]=a,e[2]=c):c=e[2];const d=c;let m;e[3]!==r?(m=z("min-w-0",r),e[3]=r,e[4]=m):m=e[4];let f;return e[5]!==i||e[6]!==s||e[7]!==d||e[8]!==m?(f=n.jsx(Tt,{defaultSize:i,minSize:20,className:m,onResize:d,children:s}),e[5]=i,e[6]=s,e[7]=d,e[8]=m,e[9]=f):f=e[9],f}function Zr(t){const e=N.c(5),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=Pt.sidebarOpen(),e[0]=r):r=e[0];const[l,o]=Ot(r,!0);let i;return e[1]!==s||e[2]!==o||e[3]!==l?(i=n.jsx(mn,{open:l,onOpenChange:o,children:s}),e[1]=s,e[2]=o,e[3]=l,e[4]=i):i=e[4],i}function Yr(t){const e=N.c(6),{disableChat:s}=t,r=s===void 0?!1:s,[l]=We();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Tt,{className:"bg-background",children:n.jsx(bt,{})}),e[0]=o):o=e[0];let i;e[1]!==l||e[2]!==r?(i=!r&&n.jsxs(n.Fragment,{children:[n.jsx(Qs,{withHandle:l}),n.jsx(Kr,{className:z(l?"max-w-none":"max-w-0"),children:n.jsx(sn,{})})]}),e[1]=l,e[2]=r,e[3]=i):i=e[3];let a;return e[4]!==i?(a=n.jsxs(en,{direction:"horizontal",children:[o,i]}),e[4]=i,e[5]=a):a=e[5],a}function qr(){const{org:t,project:e}=et({strict:!1}),s=Be(),[r,l]=y.useState(!1),o=s.location.pathname===`/${t}/${e}`||s.location.pathname===`/${t}/${e}/`,i=e??Q,{data:a}=ps({queryKey:xs.activeOrganization(t),queryFn:async()=>{if(!t)return null;const{data:d}=await oe.organization.setActive({organizationSlug:t});return{org:d,project:{slug:i,isOrgAdmin:i===Q}}},gcTime:1/0,staleTime:1/0,refetchOnWindowFocus:!1,refetchOnMount:!1});if(!a)return n.jsxs("div",{className:"min-h-screen bg-background",children:[n.jsx(Gr,{}),n.jsx("div",{className:"pt-12",children:n.jsx(bt,{})})]});if(!a.org)return window.location.pathname!=="/"&&(window.location.href="/"),null;const c={...a,project:{...a.project,slug:i,isOrgAdmin:i===Q}};return n.jsxs(hs,{...c,children:[n.jsx(Zr,{children:n.jsxs("div",{className:"flex flex-col h-screen",style:{"--project-topbar-height":i===Q?"0px":"48px"},children:[n.jsx("style",{children:`
|
|
5
|
+
Email: ${s.email}`;navigator.clipboard.writeText(A),a(!0),ce.success("User info copied to clipboard"),setTimeout(()=>a(!1),2e3)},e[0]=s.email,e[1]=s.id,e[2]=s.name,e[3]=c):c=e[3];const d=c;let m;e[4]!==s.email||e[5]!==s.name||e[6]!==r?(m=()=>n.jsx(de,{url:r,fallback:s.name||s.email||"U",shape:"circle",size:"sm",className:"cursor-pointer hover:ring-2 ring-muted-foreground transition-all h-7 w-7"}),e[4]=s.email,e[5]=s.name,e[6]=r,e[7]=m):m=e[7];const f=s.name||s.email||"U";let u;e[8]!==f||e[9]!==r?(u=n.jsx(de,{url:r,fallback:f,shape:"circle",size:"sm"}),e[8]=f,e[9]=r,e[10]=u):u=e[10];const p=s.name||"User";let h;e[11]!==p?(h=n.jsx("div",{className:"text-sm font-medium truncate",children:p}),e[11]=p,e[12]=h):h=e[12];let x;e[13]!==s.email?(x=n.jsx("div",{className:"text-xs text-muted-foreground truncate",children:s.email}),e[13]=s.email,e[14]=x):x=e[14];let j;e[15]!==h||e[16]!==x?(j=n.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[h,x]}),e[15]=h,e[16]=x,e[17]=j):j=e[17];let b;e[18]!==i?(b=n.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:i?n.jsx($e,{size:16,className:"text-green-600"}):n.jsx($t,{size:16,className:"text-muted-foreground"})}),e[18]=i,e[19]=b):b=e[19];let g;e[20]!==u||e[21]!==j||e[22]!==b?(g=n.jsxs("div",{className:"group flex items-center gap-3 w-full py-1",children:[u,j,b]}),e[20]=u,e[21]=j,e[22]=b,e[23]=g):g=e[23];let v;e[24]!==d||e[25]!==g?(v=n.jsx(ae.Item,{onClick:d,children:g}),e[24]=d,e[25]=g,e[26]=v):v=e[26];let S;e[27]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(ae.Separator,{}),e[27]=S):S=e[27];let C,w;e[28]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsxs(ae.Item,{onClick:()=>o(!0),children:[n.jsx(Xs,{className:"text-muted-foreground",size:18}),"Profile Settings"]}),w=n.jsx(ae.Separator,{}),e[28]=C,e[29]=w):(C=e[28],w=e[29]);let _;e[30]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(xt,{className:"w-4 h-4 text-muted-foreground"}),e[30]=_):_=e[30];let O;e[31]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(ae.Item,{asChild:!0,children:n.jsxs("a",{href:"https://github.com/decocms/admin",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[_,"decocms/admin",n.jsx(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=n.jsx(Ht,{className:"text-muted-foreground",size:18}),e[32]=k):k=e[32];let $,I;e[33]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx(ae.Item,{asChild:!0,children:n.jsxs("a",{href:"https://decocms.com",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[k,"Homepage",n.jsx(ut,{size:18,className:"ml-auto text-muted-foreground"})]})}),I=n.jsx(ae.Separator,{}),e[33]=$,e[34]=I):($=e[33],I=e[34]);let M,T,U;e[35]===Symbol.for("react.memo_cache_sentinel")?(M=n.jsxs(ae.Item,{onClick:Ar,children:[n.jsx(Bt,{size:18,className:"text-muted-foreground"}),"Log out"]}),T=n.jsx(ae.Separator,{}),U=n.jsxs("div",{className:"px-2 py-1.5 text-[11px] text-muted-foreground/75",children:["v","2.85.0"]}),e[35]=M,e[36]=T,e[37]=U):(M=e[35],T=e[36],U=e[37]);let E;e[38]!==v||e[39]!==m||e[40]!==s?(E=n.jsxs(ae,{user:s,trigger:m,align:"end",children:[v,S,C,w,O,$,I,M,T,U]}),e[38]=v,e[39]=m,e[40]=s,e[41]=E):E=e[41];let L;e[42]!==l||e[43]!==s||e[44]!==r?(L=l&&n.jsx(qt,{open:l,onOpenChange:o,user:s,userImage:r}),e[42]=l,e[43]=s,e[44]=r,e[45]=L):L=e[45];let D;return e[46]!==E||e[47]!==L?(D=n.jsxs(n.Fragment,{children:[E,L]}),e[46]=E,e[47]=L,e[48]=D):D=e[48],D}function Ar(){return oe.signOut()}function Lr(){const t=N.c(7),{data:e}=oe.useSession();if(!e?.user){let c;return t[0]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(de,{url:void 0,fallback:"U",shape:"circle",size:"sm",className:"cursor-pointer h-7 w-7",muted:!0}),t[0]=c):c=t[0],c}const s=e.user,r=s.name??void 0;let l;t[1]!==r||t[2]!==s?(l={...s,name:r},t[1]=r,t[2]=s,t[3]=l):l=t[3];const o=l,i=s.image;let a;return t[4]!==i||t[5]!==o?(a=n.jsx(Er,{user:o,userImage:i}),t[4]=i,t[5]=o,t[6]=a):a=t[6],a}function Dr(){const t=N.c(2),s=Be().location.href;let r;return t[0]!==s?(r=n.jsx(us,{to:"/login",search:{next:s},replace:!0}),t[0]=s,t[1]=r):r=t[1],r}function Rr(t){const e=N.c(6),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ds,{children:n.jsx(jt,{})}),e[0]=r):r=e[0];let l;e[1]!==s?(l=n.jsx(ms,{children:s}),e[1]=s,e[2]=l):l=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(fs,{children:n.jsx(Dr,{})}),e[3]=o):o=e[3];let i;return e[4]!==l?(i=n.jsxs(n.Fragment,{children:[r,l,o]}),e[4]=l,e[5]=i):i=e[5],i}function Hr(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("fixed top-0 left-0 right-0 z-20 bg-background flex items-center w-full h-12 border-b border-border",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Ur(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex items-center justify-center px-2.5 h-full border-r border-border",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Br(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex items-center gap-2 px-2 h-full",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Fr(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex items-center gap-2 px-2 h-full flex-1",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Wr(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex items-center gap-2 px-2 h-full ml-auto",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Vr(){const t=N.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex items-center justify-center px-2 h-full border-r border-border",children:n.jsx("div",{className:"w-8 h-8 bg-muted rounded-md animate-pulse"})}),t[0]=e):e=t[0];let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx("div",{className:"flex items-center gap-2 px-2 h-full",children:n.jsx("div",{className:"w-32 h-6 bg-muted rounded-md animate-pulse"})}),t[1]=s):s=t[1];let r;return t[2]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsxs("div",{className:"fixed top-0 left-0 right-0 z-20 bg-background flex items-center w-full h-12 border-b border-border",children:[e,s,n.jsx("div",{className:"flex items-center gap-2 px-2 h-full ml-auto",children:n.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"})})]}),t[2]=r):r=t[2],r}const Le=Object.assign(Hr,{Sidebar:Ur,Left:Br,Center:Fr,Right:Wr,Skeleton:Vr});function ns(){const t=N.c(3),{toggleSidebar:e}=Ge();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(Ut,{className:"text-muted-foreground/85 group-hover:text-foreground transition-colors",size:18}),t[0]=s):s=t[0];let r;return t[1]!==e?(r=n.jsx(n.Fragment,{children:n.jsx(te,{onClick:e,size:"icon",variant:"ghost",className:"w-7 h-7 rounded-md",children:s})}),t[1]=e,t[2]=r):r=t[2],r}ns.Skeleton=function(){return n.jsx("div",{className:"w-7 h-7 bg-muted rounded-md animate-pulse"})};function Gr({showSidebarToggle:t=!1,showOrgSwitcher:e=!1,showDecoChat:s=!1,disableDecoChat:r=!1}){const[l,o]=We(),i=y.useRef(r);r&&l&&i.current!==r&&o(!1),i.current=r;const a=()=>{r||o(c=>!c)};return n.jsxs(Le,{children:[t&&n.jsx(Le.Sidebar,{children:n.jsx(ns,{})}),n.jsx(Le.Left,{children:e&&n.jsx(y.Suspense,{fallback:n.jsx(Qe.Skeleton,{}),children:n.jsx(Qe,{})})}),n.jsxs(Le.Right,{className:"gap-2",children:[s&&!r&&n.jsxs(te,{size:"sm",variant:"default",onClick:a,className:"h-7 gap-2",children:[n.jsx(St,{size:16}),"Chat"]}),n.jsx(Lr,{})]})]})}function Kr(t){const e=N.c(10),{children:s,className:r}=t,[,l]=y.useTransition();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=Pt.decoChatPanelWidth(),e[0]=o):o=e[0];const[i,a]=Ot(o,30);let c;e[1]!==a?(c=u=>l(()=>a(u)),e[1]=a,e[2]=c):c=e[2];const d=c;let m;e[3]!==r?(m=z("min-w-0",r),e[3]=r,e[4]=m):m=e[4];let f;return e[5]!==i||e[6]!==s||e[7]!==d||e[8]!==m?(f=n.jsx(Tt,{defaultSize:i,minSize:20,className:m,onResize:d,children:s}),e[5]=i,e[6]=s,e[7]=d,e[8]=m,e[9]=f):f=e[9],f}function Zr(t){const e=N.c(5),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=Pt.sidebarOpen(),e[0]=r):r=e[0];const[l,o]=Ot(r,!0);let i;return e[1]!==s||e[2]!==o||e[3]!==l?(i=n.jsx(mn,{open:l,onOpenChange:o,children:s}),e[1]=s,e[2]=o,e[3]=l,e[4]=i):i=e[4],i}function Yr(t){const e=N.c(6),{disableChat:s}=t,r=s===void 0?!1:s,[l]=We();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Tt,{className:"bg-background",children:n.jsx(bt,{})}),e[0]=o):o=e[0];let i;e[1]!==l||e[2]!==r?(i=!r&&n.jsxs(n.Fragment,{children:[n.jsx(Qs,{withHandle:l}),n.jsx(Kr,{className:z(l?"max-w-none":"max-w-0"),children:n.jsx(sn,{})})]}),e[1]=l,e[2]=r,e[3]=i):i=e[3];let a;return e[4]!==i?(a=n.jsxs(en,{direction:"horizontal",children:[o,i]}),e[4]=i,e[5]=a):a=e[5],a}function qr(){const{org:t,project:e}=et({strict:!1}),s=Be(),[r,l]=y.useState(!1),o=s.location.pathname===`/${t}/${e}`||s.location.pathname===`/${t}/${e}/`,i=e??Q,{data:a}=ps({queryKey:hs.activeOrganization(t),queryFn:async()=>{if(!t)return null;const{data:d}=await oe.organization.setActive({organizationSlug:t});return{org:d,project:{slug:i,isOrgAdmin:i===Q}}},gcTime:1/0,staleTime:1/0,refetchOnWindowFocus:!1,refetchOnMount:!1});if(!a)return n.jsxs("div",{className:"min-h-screen bg-background",children:[n.jsx(Gr,{}),n.jsx("div",{className:"pt-12",children:n.jsx(bt,{})})]});if(!a.org)return window.location.pathname!=="/"&&(window.location.href="/"),null;const c={...a,project:{...a.project,slug:i,isOrgAdmin:i===Q}};return n.jsxs(xs,{...c,children:[n.jsx(Zr,{children:n.jsxs("div",{className:"flex flex-col h-screen",style:{"--project-topbar-height":i===Q?"0px":"48px"},children:[n.jsx("style",{children:`
|
|
6
6
|
[data-slot="sidebar-container"] {
|
|
7
7
|
top: 0 !important;
|
|
8
8
|
}
|
|
9
9
|
[data-slot="sidebar-inner"] {
|
|
10
10
|
padding-top: 0 !important;
|
|
11
11
|
}
|
|
12
|
-
`}),n.jsx(re.Provider,{children:n.jsxs(pn,{className:"flex-1 bg-sidebar",style:{"--sidebar-width":"13rem","--sidebar-width-mobile":"11rem"},children:[n.jsx(Qn,{onCreateProject:()=>l(!0)}),n.jsx(
|
|
12
|
+
`}),n.jsx(re.Provider,{children:n.jsxs(pn,{className:"flex-1 bg-sidebar",style:{"--sidebar-width":"13rem","--sidebar-width-mobile":"11rem"},children:[n.jsx(Qn,{onCreateProject:()=>l(!0)}),n.jsx(xn,{className:"flex flex-col",children:n.jsxs(Ks,{children:[n.jsx(hr,{}),n.jsx("div",{className:"flex-1 overflow-hidden",children:n.jsx(Yr,{disableChat:o})})]})})]})})]})}),n.jsx(Ct,{open:r,onOpenChange:l})]})}function xo(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Rr,{children:n.jsx(y.Suspense,{fallback:n.jsx(jt,{}),children:n.jsx(qr,{})})}),t[0]=e):e=t[0],e}export{xo as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as C,y as d,j as a}from"./index-
|
|
1
|
+
import{c as C,y as d,j as a}from"./index-DyoRyDg0.js";import{c as m}from"./utils-CDly9l2F.js";const u=d("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",special:"fill-special text-backround"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function h(f){const e=C.c(10),{variant:c,size:o}=f;let t;e[0]!==o||e[1]!==c?(t=m(u({variant:c,size:o})),e[0]=o,e[1]=c,e[2]=t):t=e[2];let l,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),i=a.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=l,e[4]=i):(l=e[3],i=e[4]);let s;e[5]!==t?(s=a.jsxs("svg",{"aria-hidden":"true",className:t,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l,i]}),e[5]=t,e[6]=s):s=e[6];let r;e[7]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=r):r=e[7];let n;return e[8]!==s?(n=a.jsxs("div",{role:"status",children:[s,r]}),e[8]=s,e[9]=n):n=e[9],n}export{h as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as h,a as S,j as o,A as x,S as g,b as j,e as b,f as _,g as y,O as N,N as p}from"./index-
|
|
1
|
+
import{c as h,a as S,j as o,A as x,S as g,b as j,e as b,f as _,g as y,O as N,N as p}from"./index-DyoRyDg0.js";function R(e){const t=h.c(5),{appName:l}=e;let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},t[0]=s):s=t[0];const n=_(s);let a;if(t[1]!==n){const r=new URLSearchParams;for(const[d,u]of Object.entries(n))u!=null&&r.set(d,String(u));a=r.toString(),t[1]=n,t[2]=a}else a=t[2];const f=a,c=`/store/${encodeURIComponent(l)}${f?`?${f}`:""}`;let i;return t[3]!==c?(i=o.jsx(p,{to:"/login",search:{next:c},replace:!0}),t[3]=c,t[4]=i):i=t[4],i}function $(){const e=h.c(10);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const{appName:l}=S(t);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},e[1]=s):s=e[1];const n=_(s),{data:a,isPending:f}=y.useListOrganizations();if(f){let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(g,{}),e[2]=r):r=e[2],r}const m=a?.[0];if(!m){let r;return e[3]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(p,{to:"/",replace:!0}),e[3]=r):r=e[3],r}let c;e[4]!==l||e[5]!==m.slug?(c={org:m.slug,project:N,appName:l},e[4]=l,e[5]=m.slug,e[6]=c):c=e[6];let i;return e[7]!==n||e[8]!==c?(i=o.jsx(p,{to:"/$org/$project/store/$appName",params:c,search:n,replace:!0}),e[7]=n,e[8]=c,e[9]=i):i=e[9],i}function v(){const e=h.c(5);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const{appName:l}=S(t);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(x,{children:o.jsx(g,{})}),e[1]=s):s=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx(j,{children:o.jsx($,{})}),e[2]=n):n=e[2];let a;return e[3]!==l?(a=o.jsxs(o.Fragment,{children:[s,n,o.jsx(b,{children:o.jsx(R,{appName:l})})]}),e[3]=l,e[4]=a):a=e[4],a}export{v as default};
|