@decocms/mesh 2.113.1 → 2.114.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-bZ_a8hW_.js → AlertCircle-FL98lGLa.js} +1 -1
- package/dist/client/assets/{AlertOctagon-g_tWXJrL.js → AlertOctagon-B33KdaLi.js} +1 -1
- package/dist/client/assets/{AlertTriangle-CGGjQU9b.js → AlertTriangle-DteHmOG1.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BbVcfdiE.js → ArrowLeft-CMuGBwkE.js} +1 -1
- package/dist/client/assets/{ArrowUp-BtMmVpE7.js → ArrowUp-xougxkbC.js} +1 -1
- package/dist/client/assets/{Check-E8-Inf76.js → Check-BY-DCpO_.js} +1 -1
- package/dist/client/assets/{CheckCircle-DfWHy2te.js → CheckCircle-CpXx2avT.js} +1 -1
- package/dist/client/assets/{CheckDone01-DpB-5lWR.js → CheckDone01-DJLuFHxJ.js} +1 -1
- package/dist/client/assets/{CheckVerified02-Bxyg9cYG.js → CheckVerified02-Cqu-AawR.js} +1 -1
- package/dist/client/assets/{ChevronDown-CtTw1zlt.js → ChevronDown-FdgQzkaa.js} +1 -1
- package/dist/client/assets/{ChevronRight-Cj97ppFv.js → ChevronRight-DYxU3E_q.js} +1 -1
- package/dist/client/assets/{Clock-ElxTVbMS.js → Clock-Drw10Mc_.js} +1 -1
- package/dist/client/assets/{Code01-F0FnnpDN.js → Code01-CowHxp14.js} +1 -1
- package/dist/client/assets/{Container-8z-xyt04.js → Container-B7qKC3EI.js} +1 -1
- package/dist/client/assets/{Copy01-DKHGVRMd.js → Copy01-B_7d0dwb.js} +1 -1
- package/dist/client/assets/{Dataflow03-DItczzaI.js → Dataflow03-Cf4yDkKR.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-CzG-G9QT.js → DotsHorizontal-CqtaWGEh.js} +1 -1
- package/dist/client/assets/{DotsVertical-IiJAY3kM.js → DotsVertical-qEJ2g9HJ.js} +1 -1
- package/dist/client/assets/{Download01-DnJPBc-y.js → Download01-IPqVm26W.js} +1 -1
- package/dist/client/assets/{Edit01-CSgI_vqG.js → Edit01-CUcmwNxC.js} +1 -1
- package/dist/client/assets/{Eye-DPrkOx1m.js → Eye-Rq15dwoo.js} +1 -1
- package/dist/client/assets/{File02-CwSZ_YSq.js → File02-DPSlzBxh.js} +1 -1
- package/dist/client/assets/{File06-DYvRHz1R.js → File06-xsY7vCFb.js} +1 -1
- package/dist/client/assets/{FilterLines-DwLmRqdf.js → FilterLines-CJgE2bmA.js} +1 -1
- package/dist/client/assets/{Globe01-kIBQPFuR.js → Globe01-BuKzbzrx.js} +1 -1
- package/dist/client/assets/{Globe02-DEZv7rrz.js → Globe02-BIRPCTiD.js} +1 -1
- package/dist/client/assets/{Grid01-xeO6ixb6.js → Grid01-CcUd9dpu.js} +1 -1
- package/dist/client/assets/{Hash02-BUvQoWvM.js → Hash02-BAkYwsUS.js} +1 -1
- package/dist/client/assets/{Home02-3_wGODLc.js → Home02-CyX62jfB.js} +1 -1
- package/dist/client/assets/{Image01-BkoRO_9d.js → Image01-CiGMIZf1.js} +1 -1
- package/dist/client/assets/{Inbox01-CHcPs9mB.js → Inbox01-CxlDy_Yy.js} +1 -1
- package/dist/client/assets/{InfoCircle-FWPoCdrs.js → InfoCircle-BBQwzN3e.js} +1 -1
- package/dist/client/assets/{Key01-vyx6BDY8.js → Key01-CcfhRF0P.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Ch5ScwlH.js → LinkExternal01-CHfE9mil.js} +1 -1
- package/dist/client/assets/{List-CEuiHx2u.js → List-BkcTlONj.js} +1 -1
- package/dist/client/assets/{Loading01-Du9ChcBO.js → Loading01-CWwskqmx.js} +1 -1
- package/dist/client/assets/{Lock01-BmNrik2P.js → Lock01-C-e30A69.js} +1 -1
- package/dist/client/assets/{Pin01-NetFNrEd.js → Pin01-DNrhTTs3.js} +1 -1
- package/dist/client/assets/{Play-BP_59zaK.js → Play-sMJsBLST.js} +1 -1
- package/dist/client/assets/{Plus-hJGQuZKS.js → Plus-7gpDbhJy.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-OjrTubY1.js → RefreshCcw01-BzY8N8T3.js} +1 -1
- package/dist/client/assets/{RefreshCw01-Be9PrKJk.js → RefreshCw01-dI5kYugT.js} +1 -1
- package/dist/client/assets/{Save01-DiDeFwU2.js → Save01-C9jVAZgo.js} +1 -1
- package/dist/client/assets/{SearchMd-B9pv8N9E.js → SearchMd-BMO4jqwv.js} +1 -1
- package/dist/client/assets/{Settings01-BPkeey3w.js → Settings01-CRoxTuTO.js} +1 -1
- package/dist/client/assets/{Share07-Ii045gzD.js → Share07-DFdDYoqj.js} +1 -1
- package/dist/client/assets/Shield01-DymehiLu.js +1 -0
- package/dist/client/assets/{Terminal-BGTg6hg-.js → Terminal-zi42zfXM.js} +1 -1
- package/dist/client/assets/{Tool01-DbSgV9fI.js → Tool01-lC4M_AmN.js} +1 -1
- package/dist/client/assets/{Trash01-DT85aU53.js → Trash01-BKhksYCP.js} +1 -1
- package/dist/client/assets/{Upload01-Cr9JNoRV.js → Upload01-CorstXj2.js} +1 -1
- package/dist/client/assets/{Users03-IogkUnji.js → Users03-B6oew679.js} +1 -1
- package/dist/client/assets/{XCircle-B8PCL4R4.js → XCircle-WTPrrNWD.js} +1 -1
- package/dist/client/assets/{XClose-BtHqnElt.js → XClose-DoKE29TG.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-BbTjonVz.js → agent-connections-preview-DybZ18X5.js} +1 -1
- package/dist/client/assets/agent-detail-DncXhd81.js +1 -0
- package/dist/client/assets/agents-D-4jcSt1.js +1 -0
- package/dist/client/assets/{alert-dialog-5IiN8bI8.js → alert-dialog-Dm7Md3Yk.js} +1 -1
- package/dist/client/assets/{auth-catchall-Bsz8qard.js → auth-catchall-DHQTu60x.js} +1 -1
- package/dist/client/assets/avatar-B-mPVtLH.js +1 -0
- package/dist/client/assets/{badge-DGPPcvVD.js → badge-Bt6C7wEJ.js} +1 -1
- package/dist/client/assets/{binder-BXFbhA2G.js → binder-BvXUsKRF.js} +1 -1
- package/dist/client/assets/breadcrumb-Cipoy1eR.js +1 -0
- package/dist/client/assets/button-Bl7hMmCe.js +1 -0
- package/dist/client/assets/card-BMQBEGUR.js +1 -0
- package/dist/client/assets/{checkbox-C2Pc1VwJ.js → checkbox-C-nrBu1T.js} +1 -1
- package/dist/client/assets/{circle-alert-B5cVsMTM.js → circle-alert-DYoRV5F7.js} +1 -1
- package/dist/client/assets/{collection-detail-BWciJVNY.js → collection-detail-x0pDfnG2.js} +3 -3
- package/dist/client/assets/{collection-tab-CiiXwxHW.js → collection-tab-CMJJpUjs.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-D8mRH9XX.js → collection-table-wrapper-DS44ibQ8.js} +1 -1
- package/dist/client/assets/{collection-tabs-fLdn4E8h.js → collection-tabs-Dyc14WST.js} +1 -1
- package/dist/client/assets/{command-CeYHWZzE.js → command-DGGP5Edh.js} +1 -1
- package/dist/client/assets/{connect-BdOXcl_Y.js → connect-BqPwKrDp.js} +1 -1
- package/dist/client/assets/{connection-card-BcrKHNoi.js → connection-card-B_yTVrCB.js} +1 -1
- package/dist/client/assets/connection-detail-BHwcydrH.js +1 -0
- package/dist/client/assets/connections-C2FniOCy.js +1 -0
- package/dist/client/assets/constants-B9b2QjkO.js +1 -0
- package/dist/client/assets/{constants-BHcnwzXS.js → constants-DY_BU6PR.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-DIppco5e.js → create-organization-dialog-BmtVHISe.js} +1 -1
- package/dist/client/assets/{create-project-dialog-Dg334vRx.js → create-project-dialog-DFYOBIMM.js} +1 -1
- package/dist/client/assets/dialog-BTs7spED.js +1 -0
- package/dist/client/assets/{dropdown-menu-D5LbTa4P.js → dropdown-menu-Dk3PdiLq.js} +1 -1
- package/dist/client/assets/dynamic-plugin-layout-C8tDNw7E.js +1 -0
- package/dist/client/assets/empty-state-BrrA9jzc.js +1 -0
- package/dist/client/assets/{empty-state-BvzVGw0j.js → empty-state-yzpNvfA-.js} +1 -1
- package/dist/client/assets/{env-vars-editor-DPP2Mrhu.js → env-vars-editor-CxFtbjNH.js} +1 -1
- package/dist/client/assets/{error-boundary-B0-C3nR-.js → error-boundary-GB3TovJQ.js} +1 -1
- package/dist/client/assets/{extract-connection-data-C_PlCvXj.js → extract-connection-data-Cjm6QMzJ.js} +1 -1
- package/dist/client/assets/{file-browser-D6eYzF31.js → file-browser-CeBgj9Bh.js} +2 -2
- package/dist/client/assets/{form-BoeJzVfE.js → form-Dxe8J4dP.js} +1 -1
- package/dist/client/assets/{grid-view-Cqpn4831.js → grid-view-qfkYjNIX.js} +1 -1
- package/dist/client/assets/{home-DtTiTJHY.js → home-C39nGjR7.js} +1 -1
- package/dist/client/assets/index-48TFsA2Q.css +1 -0
- package/dist/client/assets/{index-DNGgnz4O.js → index-B2KxLjHq.js} +1 -1
- package/dist/client/assets/{index-CK46yvDU.js → index-BOlMuTYA.js} +6 -6
- package/dist/client/assets/index-BrH9wXxf.js +1 -0
- package/dist/client/assets/{index-CkziH66W.js → index-BuPkfOh7.js} +1 -1
- package/dist/client/assets/{index-B8FAEn0C.js → index-CLUeNS9F.js} +1 -1
- package/dist/client/assets/{index-Dg7j7nF8.js → index-CSf23Q8F.js} +5 -5
- package/dist/client/assets/index-CzSiUwwv.js +218 -0
- package/dist/client/assets/{index-CqJghtvI.js → index-DVHOzh7f.js} +1 -1
- package/dist/client/assets/{index-BDio7_0T.js → index-Dps5khDb.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-DTtSISl9.js → infiniteQueryObserver-Ctmp4byY.js} +1 -1
- package/dist/client/assets/{input-BdH38qw4.js → input-CAPxG1rh.js} +1 -1
- package/dist/client/assets/{integration-icon-Bw_I-XAE.js → integration-icon-jbm4PmZt.js} +1 -1
- package/dist/client/assets/{label-Bl-YFbel.js → label-A7ibpcPd.js} +1 -1
- package/dist/client/assets/{layout-aRIgHMvp.js → layout-DHncYg0M.js} +1 -1
- package/dist/client/assets/{localstorage-keys-BX9jvEU1.js → localstorage-keys-Cc9e53sU.js} +1 -1
- package/dist/client/assets/{login-BSw2WJHG.js → login-C4VFa6jD.js} +1 -1
- package/dist/client/assets/{markdown-CzkeFZ5X.js → markdown-DTO-ngpn.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DqRfTp6V.js → mcp-oauth-lMxJpMMH.js} +1 -1
- package/dist/client/assets/{mcp-server-card-B9T5TAk8.js → mcp-server-card-C-sPhXVX.js} +1 -1
- package/dist/client/assets/mcp-server-detail-BtO9BwQ6.js +2 -0
- package/dist/client/assets/members-Dh31vMll.js +3 -0
- package/dist/client/assets/{monitoring-CvktJ_La.js → monitoring-D0DgTEcy.js} +1 -1
- package/dist/client/assets/monitoring-dashboard-edit-DCcFalwQ.js +1 -0
- package/dist/client/assets/{monitoring-dashboard-view-D5o2th_e.js → monitoring-dashboard-view-CuFcYaD_.js} +1 -1
- package/dist/client/assets/{oauth-callback-Cwqn_YCy.js → oauth-callback-DKWROL5U.js} +1 -1
- package/dist/client/assets/{page-CoUcimRv.js → page-BpCfHp43.js} +1 -1
- package/dist/client/assets/page-CoIEp87I.js +1 -0
- package/dist/client/assets/{plugin-empty-state-FJt7wPXr.js → plugin-empty-state-DMdw5AKa.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-RlHFcXiB.js → plugin-empty-state-DfPCNHNV.js} +1 -1
- package/dist/client/assets/{plugin-header-CfI3xE0K.js → plugin-header-CVaBr8-j.js} +1 -1
- package/dist/client/assets/{plugin-header-CrQ7aOX2.js → plugin-header-DqwJE7vc.js} +1 -1
- package/dist/client/assets/{popover-mZJnuJjI.js → popover-Ca9Cyzf7.js} +1 -1
- package/dist/client/assets/{project-layout-DotJsvl2.js → project-layout-F2YJOnzp.js} +1 -1
- package/dist/client/assets/project-settings-DwtLH_vq.js +1 -0
- package/dist/client/assets/projects-list-DPMlGsBe.js +1 -0
- package/dist/client/assets/{readme-viewer-Czlw9OLy.js → readme-viewer-D5RieYNW.js} +1 -1
- package/dist/client/assets/{registry-layout-DKEyfF0q.js → registry-layout-BrhYm9Dr.js} +2 -2
- package/dist/client/assets/{registry-utils-CX7yxjy_.js → registry-utils--fif7P3x.js} +1 -1
- package/dist/client/assets/{reports-layout-B_ULsOiV.js → reports-layout-9yNTvI9o.js} +1 -1
- package/dist/client/assets/{reset-password-Cdnxjg8n.js → reset-password-FRWYt8ap.js} +1 -1
- package/dist/client/assets/{resizable-DfITuo54.js → resizable-DKtpdeB3.js} +1 -1
- package/dist/client/assets/{save-actions-ChqbuLbD.js → save-actions-DH-J_-0b.js} +1 -1
- package/dist/client/assets/{scroll-area-C8UIsNZT.js → scroll-area-BfJ2ZkbI.js} +1 -1
- package/dist/client/assets/{select-CixKYbFw.js → select-CKDoCTJO.js} +1 -1
- package/dist/client/assets/shell-layout-DkuDKL8p.js +3 -0
- package/dist/client/assets/{spinner-BMxXfTiG.js → spinner-B-FWJ8nx.js} +1 -1
- package/dist/client/assets/{store-invite-BxswfJKl.js → store-invite-1HxdtnDC.js} +1 -1
- package/dist/client/assets/{switch-B_EwtGD2.js → switch-ySGmS6Zx.js} +1 -1
- package/dist/client/assets/{table-C5Cvp27H.js → table-DGDNn7mH.js} +1 -1
- package/dist/client/assets/tasks-BuxJd7k9.js +1 -0
- package/dist/client/assets/{textarea-Bosg8LSF.js → textarea-COGwSIgK.js} +1 -1
- package/dist/client/assets/{time-range-picker-DqbTNWJO.js → time-range-picker-hBuoR0m0.js} +1 -1
- package/dist/client/assets/{toggle-group-C9vSpu1B.js → toggle-group-RO8j2kDd.js} +1 -1
- package/dist/client/assets/{tools-list-m2LGQ8uO.js → tools-list-CBpacE22.js} +1 -1
- package/dist/client/assets/tooltip-CLbmwjfd.js +1 -0
- package/dist/client/assets/topbar-portal-BHxVS8Tl.js +1 -0
- package/dist/client/assets/typewriter-title-C4OcGX3b.js +16 -0
- package/dist/client/assets/{use-binding-op5oWkHb.js → use-binding-D36c91MK.js} +1 -1
- package/dist/client/assets/{use-connection-DD4p_Qxm.js → use-connection-CdIwTzRh.js} +1 -1
- package/dist/client/assets/{use-copy-QNK64gRO.js → use-copy-BZqI2HfR.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DTZkMOkn.js → use-create-virtual-mcp-DKrayFIg.js} +1 -1
- package/dist/client/assets/{use-deco-chat-open-D2iAkBUE.js → use-deco-chat-open-BuMsTBnv.js} +3 -3
- package/dist/client/assets/{use-install-from-registry-BzBNvPLt.js → use-install-from-registry-kn39eg4d.js} +1 -1
- package/dist/client/assets/{use-list-state-58FQ5_m7.js → use-list-state-CYucxtoX.js} +1 -1
- package/dist/client/assets/{use-llm-Dxppw3BS.js → use-llm-CX9QGbjZ.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-Cugr7S4A.js → use-mcp-prompts-DMC1gnwj.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DAXcjOXG.js → use-mcp-tools-SZ1hgrkZ.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CMbhnXrw.js → use-organization-settings-1mU06z41.js} +1 -1
- package/dist/client/assets/{use-project-22jTFib5.js → use-project-CsuhSK50.js} +1 -1
- package/dist/client/assets/use-view-mode-CVN4cPaD.js +1 -0
- package/dist/client/assets/{use-virtual-mcp-CSTx0yIN.js → use-virtual-mcp-CqdRLJoL.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Bd_PpC7_.js +1 -0
- package/dist/client/assets/{useMutation-CeUP6TdZ.js → useMutation-BYl8vvsl.js} +1 -1
- package/dist/client/assets/useQuery-CTct6gOY.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DJZPFUMY.js +1 -0
- package/dist/client/assets/workflow-CMJomw9A.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +3 -3
- package/dist/server/migrate.js +3 -3
- package/dist/server/server.js +3 -3
- package/package.json +1 -1
- package/dist/client/assets/Settings02-Pk4hmkwR.js +0 -1
- package/dist/client/assets/X-zQXau9tc.js +0 -1
- package/dist/client/assets/agent-detail-Ft0AbV0R.js +0 -1
- package/dist/client/assets/agents-DyJp-v0r.js +0 -1
- package/dist/client/assets/avatar-A9KYWJyz.js +0 -1
- package/dist/client/assets/breadcrumb-KvFHoKN7.js +0 -1
- package/dist/client/assets/button-CcxsPygM.js +0 -1
- package/dist/client/assets/card-k6wylZpL.js +0 -1
- package/dist/client/assets/connection-detail-DmthZz54.js +0 -1
- package/dist/client/assets/connections-r_aRLPNJ.js +0 -1
- package/dist/client/assets/constants-CehTGa6m.js +0 -1
- package/dist/client/assets/dialog-Rb8gAr_X.js +0 -1
- package/dist/client/assets/dynamic-plugin-layout-eqQ8vb-X.js +0 -1
- package/dist/client/assets/empty-state-CA7kuHGK.js +0 -1
- package/dist/client/assets/index-CSfvtoe4.js +0 -1
- package/dist/client/assets/index-ClncOz6N.js +0 -218
- package/dist/client/assets/index-Dtj1StPs.css +0 -1
- package/dist/client/assets/mcp-server-detail-aLIeserX.js +0 -2
- package/dist/client/assets/members-CbEIJSgz.js +0 -3
- package/dist/client/assets/monitoring-dashboard-edit-C4CBUoJi.js +0 -1
- package/dist/client/assets/page-DKc1c6GW.js +0 -1
- package/dist/client/assets/project-settings-9R_bMZ34.js +0 -1
- package/dist/client/assets/projects-list-Xd18kAoB.js +0 -1
- package/dist/client/assets/shell-layout-BUnBBwEV.js +0 -12
- package/dist/client/assets/tasks-CLmc4-Ka.js +0 -1
- package/dist/client/assets/tooltip-TMQButig.js +0 -1
- package/dist/client/assets/topbar-portal-D3WNlquz.js +0 -1
- package/dist/client/assets/typewriter-title-D4y6_U_x.js +0 -16
- package/dist/client/assets/use-mobile-BttsZXmR.js +0 -1
- package/dist/client/assets/use-view-mode-DJpnO-MR.js +0 -1
- package/dist/client/assets/useInfiniteQuery-UJjoB_Vx.js +0 -1
- package/dist/client/assets/useQuery-BSd1v_RX.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-B9OvX_J7.js +0 -1
- package/dist/client/assets/workflow-C62_M1_u.js +0 -1
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{r as w,c as N,j as s,u as Se,b as $e,bz as Ge,L as Oe,bv as ls,bL as os,O as ne,I as xt,v as is,y as as,d as he,t as ye,b6 as cs,bM as ht,e as st,bN as ds,bp as gt,bO as Pe,A as ms,S as jt,f as fs,h as us,N as ps,n as xs,K as hs,m as bt,P as gs}from"./index-ClncOz6N.js";import{C as oe,i as js}from"./index-Dg7j7nF8.js";import{I as bs}from"./integration-icon-Bw_I-XAE.js";import{P as Ie}from"./index-CSfvtoe4.js";import{e as Ke,u as vs,g as Ze,S as ee,h as vt,C as Ns,f as ys,j as Ss}from"./use-deco-chat-open-D2iAkBUE.js";import{c as z,B as re}from"./button-CcxsPygM.js";import{d as ws}from"./constants-BHcnwzXS.js";import{T as Cs,i as ks,b as _s,S as zs,c as $s,d as Is,e as Os,f as Ps,t as Nt}from"./typewriter-title-D4y6_U_x.js";import{s as qe}from"./Plus-hJGQuZKS.js";import{t as yt}from"./Users03-IogkUnji.js";import{i as Be}from"./X-zQXau9tc.js";import{E as St}from"./error-boundary-B0-C3nR-.js";import{C as wt}from"./create-project-dialog-Dg334vRx.js";import{n as Ct}from"./CheckDone01-DpB-5lWR.js";import{n as Ts}from"./Container-8z-xyt04.js";import{e as As}from"./Dataflow03-DItczzaI.js";import{a as Ms}from"./Home02-3_wGODLc.js";import{u as Es,a as kt}from"./use-project-22jTFib5.js";import{u as De}from"./use-mobile-BttsZXmR.js";import{b as Fe,c as _t,a as We,T as Ve}from"./tooltip-TMQButig.js";import{t as nt}from"./ChevronDown-CtTw1zlt.js";import{A as ke}from"./avatar-A9KYWJyz.js";import{b as rt,P as lt,a as ot}from"./popover-mZJnuJjI.js";import{n as ct}from"./Inbox01-CHcPs9mB.js";import{B as dt}from"./badge-DGPPcvVD.js";import{i as Me}from"./Check-E8-Inf76.js";import{s as mt}from"./XClose-BtHqnElt.js";import{i as zt}from"./ChevronRight-Cj97ppFv.js";import{a as it}from"./Settings02-Pk4hmkwR.js";import{C as $t}from"./create-organization-dialog-DIppco5e.js";import{c as Ls,b as Ds,g as Rs,a as Hs,D as Us}from"./dialog-Rb8gAr_X.js";import{L as Te}from"./label-Bl-YFbel.js";import{S as Bs,a as Fs,b as Ws,d as Xe,c as Vs}from"./select-CixKYbFw.js";import{S as He}from"./switch-B_EwtGD2.js";import{i as Gs}from"./Code01-F0FnnpDN.js";import{a as It}from"./Copy01-DKHGVRMd.js";import{u as Ot,a as Ks}from"./use-organization-settings-CMbhnXrw.js";import{i as Zs}from"./File06-DYvRHz1R.js";import{I as qs}from"./input-BdH38qw4.js";import{c as Ys}from"./Grid01-xeO6ixb6.js";import{a as Js,T as Xs}from"./topbar-portal-D3WNlquz.js";import{a as Qs,b as en,D as tn,c as sn,g as ft}from"./dropdown-menu-D5LbTa4P.js";import{i as nn}from"./Globe01-kIBQPFuR.js";import{n as ut}from"./LinkExternal01-Ch5ScwlH.js";import{t as rn}from"./Settings01-BPkeey3w.js";import{u as Pt,L as Tt}from"./localstorage-keys-BX9jvEU1.js";import{R as ln,a as At,b as on}from"./resizable-DfITuo54.js";import"./spinner-BMxXfTiG.js";import"./use-mcp-prompts-Cugr7S4A.js";import"./useQuery-BSd1v_RX.js";import"./form-BoeJzVfE.js";import"./usage-B8eRkRZY.js";import"./ArrowUp-BtMmVpE7.js";import"./Edit01-CSgI_vqG.js";import"./XCircle-B8PCL4R4.js";import"./AlertCircle-bZ_a8hW_.js";import"./AlertTriangle-CGGjQU9b.js";import"./ArrowLeft-BbVcfdiE.js";import"./use-copy-QNK64gRO.js";import"./use-virtual-mcp-CSTx0yIN.js";import"./use-connection-DD4p_Qxm.js";import"./useMutation-CeUP6TdZ.js";import"./SearchMd-B9pv8N9E.js";import"./use-create-virtual-mcp-DTZkMOkn.js";import"./marked.esm-BaswSlok.js";import"./markdown-CzkeFZ5X.js";import"./tools-list-m2LGQ8uO.js";import"./collection-table-wrapper-D8mRH9XX.js";import"./List-CEuiHx2u.js";import"./table-C5Cvp27H.js";import"./empty-state-BvzVGw0j.js";import"./Loading01-Du9ChcBO.js";import"./card-k6wylZpL.js";import"./Eye-DPrkOx1m.js";import"./Globe02-DEZv7rrz.js";import"./RefreshCw01-Be9PrKJk.js";import"./layout-aRIgHMvp.js";import"./generate-id-Dyweu44Y.js";import"./Clock-ElxTVbMS.js";import"./Trash01-DT85aU53.js";import"./use-llm-Dxppw3BS.js";import"./use-binding-op5oWkHb.js";import"./binder-BXFbhA2G.js";import"./Image01-BkoRO_9d.js";import"./RefreshCcw01-OjrTubY1.js";import"./useSuspenseInfiniteQuery-B9OvX_J7.js";import"./infiniteQueryObserver-DTtSISl9.js";import"./textarea-Bosg8LSF.js";import"./index-BDio7_0T.js";import"./alert-dialog-5IiN8bI8.js";const Qe=({size:t=24,color:e="currentColor",...n})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},w.createElement("path",{d:"M7 17 17 7m0 0H7m10 0v10"}));Qe.displayName="ArrowUpRight";const Mt=({size:t=24,color:e="currentColor",...n})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},w.createElement("path",{d:"M9 7H4.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C3 7.76 3 8.04 3 8.6v10.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 21 4.04 21 4.6 21H9m0 0h6m-6 0V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C9.76 3 10.04 3 10.6 3h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C15 3.76 15 4.04 15 4.6V21m0-10h4.4c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C21 11.76 21 12.04 21 12.6v6.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C20.24 21 19.96 21 19.4 21H15"}));Mt.displayName="BarChart10";const Et=({size:t=24,color:e="currentColor",...n})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},w.createElement("path",{d:"M9.354 21c.705.622 1.632 1 2.646 1s1.94-.378 2.646-1M18 8A6 6 0 1 0 6 8c0 3.09-.78 5.206-1.65 6.605-.735 1.18-1.102 1.771-1.089 1.936.015.182.054.252.2.36.133.099.732.099 1.928.099H18.61c1.196 0 1.795 0 1.927-.098.147-.11.186-.179.2-.361.014-.165-.353-.755-1.088-1.936C18.78 13.206 18 11.09 18 8Z"}));Et.displayName="Bell01";const Lt=({size:t=24,color:e="currentColor",...n})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},w.createElement("path",{d:"m12 21-.1-.15c-.695-1.042-1.042-1.563-1.5-1.94a4 4 0 0 0-1.378-.737C8.453 18 7.827 18 6.575 18H5.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C2 16.48 2 15.92 2 14.8V6.2c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C3.52 3 4.08 3 5.2 3h.4c2.24 0 3.36 0 4.216.436a4 4 0 0 1 1.748 1.748C12 6.04 12 7.16 12 9.4M12 21V9.4M12 21l.1-.15c.695-1.042 1.042-1.563 1.5-1.94a3.999 3.999 0 0 1 1.378-.737C15.547 18 16.173 18 17.425 18H18.8c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 16.48 22 15.92 22 14.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 3 19.92 3 18.8 3h-.4c-2.24 0-3.36 0-4.216.436a4 4 0 0 0-1.748 1.748C12 6.04 12 7.16 12 9.4"}));Lt.displayName="BookOpen01";const Dt=({size:t=24,color:e="currentColor",...n})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},w.createElement("path",{d:"M15 21v-5.4c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C14.24 14 13.96 14 13.4 14h-2.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C9 14.76 9 15.04 9 15.6V21M3 7a3 3 0 0 0 6 0 3 3 0 1 0 6 0 3 3 0 1 0 6 0M6.2 21h11.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3H6.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21Z"}));Dt.displayName="Building02";const Rt=({size:t=24,color:e="currentColor",...n})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},w.createElement("path",{d:"m18 17-5-5 5-5m-7 10-5-5 5-5"}));Rt.displayName="ChevronLeftDouble";const Ht=({size:t=24,color:e="currentColor",...n})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},w.createElement("path",{d:"m6 17 5-5-5-5m7 10 5-5-5-5"}));Ht.displayName="ChevronRightDouble";const Ut=({size:t=24,color:e="currentColor",...n})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},w.createElement("path",{d:"M8 14s1.5 2 4 2 4-2 4-2m-1-5h.01M9 9h.01M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-6.5-3a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Zm-6 0a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Z"}));Ut.displayName="FaceSmile";const Bt=({size:t=24,color:e="currentColor",...n})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},w.createElement("path",{d:"M15 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3Z"}));Bt.displayName="LayoutRight";const Ft=({size:t=24,color:e="currentColor",...n})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},w.createElement("path",{d:"m16 17 5-5m0 0-5-5m5 5H9m0-9H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 21 6.12 21 7.8 21H9"}));Ft.displayName="LogOut01";const Wt=({size:t=24,color:e="currentColor",...n})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},w.createElement("path",{d:"m16 17 5-5m0 0-5-5m5 5H9m3 5c0 .93 0 1.395-.102 1.776a3 3 0 0 1-2.122 2.122C9.395 21 8.93 21 8 21h-.5c-1.398 0-2.097 0-2.648-.228a3 3 0 0 1-1.624-1.624C3 18.597 3 17.898 3 16.5v-9c0-1.398 0-2.097.228-2.648a3 3 0 0 1 1.624-1.624C5.403 3 6.102 3 7.5 3H8c.93 0 1.395 0 1.776.102a3 3 0 0 1 2.122 2.122C12 5.605 12 6.07 12 7"}));Wt.displayName="LogOut02";const Vt=({size:t=24,color:e="currentColor",...n})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},w.createElement("path",{d:"m2 7 8.165 5.715c.661.463.992.695 1.351.784a2 2 0 0 0 .968 0c.36-.09.69-.32 1.351-.784L22 7M6.8 20h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 17.72 22 16.88 22 15.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 4 18.88 4 17.2 4H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 6.28 2 7.12 2 8.8v6.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 20 5.12 20 6.8 20Z"}));Vt.displayName="Mail01";const Gt=({size:t=24,color:e="currentColor",...n})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},w.createElement("path",{d:"M3 8h12m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0Zm-6 8h12M9 16a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}));Gt.displayName="Settings04";function an(){const t=N.c(65),{org:e}=Se(),[,n]=Ke(),{selectedVirtualMcp:r,modelsConnections:l,isChatEmpty:o,activeThreadId:i,createThread:a,switchToThread:c,threads:d}=vs();let m;if(t[0]!==i||t[1]!==d){let q;t[3]!==i?(q=V=>V.id===i,t[3]=i,t[4]=q):q=t[4],m=d.find(q),t[0]=i,t[1]=d,t[2]=m}else m=t[2];const f=m,[u,p]=w.useState(!1),[x,h]=w.useTransition();let g;t[5]!==e.id?(g=ws(e.id),t[5]=e.id,t[6]=g):g=t[6];const b=r??g;let v;t[7]!==a?(v=()=>{h(()=>{a()})},t[7]=a,t[8]=v):v=t[8];const y=v;if(l.length===0){let q;t[9]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(Ie.Header.Left,{className:"gap-2"}),t[9]=q):q=t[9];let V;t[10]!==n?(V=()=>n(!1),t[10]=n,t[11]=V):V=t[11];let P;t[12]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(Be,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[12]=P):P=t[12];let D;t[13]!==V?(D=s.jsxs(Ie.Header,{className:"flex-none",children:[q,s.jsx(Ie.Header.Right,{className:"gap-1",children:s.jsx("button",{type:"button",onClick:V,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:P})})]}),t[13]=V,t[14]=D):D=t[14];let K;t[15]!==e?(K=s.jsx(oe.Main,{className:"flex flex-col items-center",children:s.jsx(oe.EmptyState,{children:s.jsx(oe.NoLlmBindingEmptyState,{title:"No model provider connected",description:"Connect to a model provider to unlock AI-powered features.",org:e})})}),t[15]=e,t[16]=K):K=t[16];let Y;return t[17]!==D||t[18]!==K?(Y=s.jsxs(oe,{children:[D,K]}),t[17]=D,t[18]=K,t[19]=Y):Y=t[19],Y}const C=u?"duration-300 opacity-0 -translate-x-4 pointer-events-none":x?"duration-200 opacity-0 pointer-events-none":"duration-300 opacity-100 translate-x-0";let S;t[20]!==C?(S=z("absolute inset-0 flex flex-col transition-all ease-in-out",C),t[20]=C,t[21]=S):S=t[21];let _;t[22]!==f||t[23]!==o?(_=!o&&f?.title&&s.jsx(Cs,{text:f.title,className:"text-sm font-medium text-foreground"}),t[22]=f,t[23]=o,t[24]=_):_=t[24];let O;t[25]!==_?(O=s.jsx(Ie.Header.Left,{className:"gap-2",children:_}),t[25]=_,t[26]=O):O=t[26];let k;t[27]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(qe,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[27]=k):k=t[27];let I;t[28]!==y||t[29]!==x?(I=s.jsx("button",{type:"button",onClick:y,disabled:x,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",title:"New chat",children:k}),t[28]=y,t[29]=x,t[30]=I):I=t[30];let $;t[31]===Symbol.for("react.memo_cache_sentinel")?($=()=>p(!0),t[31]=$):$=t[31];let M;t[32]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx("button",{type:"button",onClick:$,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"Chat history",children:s.jsx(ks,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})}),t[32]=M):M=t[32];let A;t[33]!==n?(A=()=>n(!1),t[33]=n,t[34]=A):A=t[34];let U;t[35]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(Be,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[35]=U):U=t[35];let L;t[36]!==A?(L=s.jsx("button",{type:"button",onClick:A,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:U}),t[36]=A,t[37]=L):L=t[37];let T;t[38]!==L||t[39]!==I?(T=s.jsxs(Ie.Header.Right,{className:"gap-1",children:[I,M,L]}),t[38]=L,t[39]=I,t[40]=T):T=t[40];let E;t[41]!==T||t[42]!==O?(E=s.jsxs(Ie.Header,{className:"flex-none",children:[O,T]}),t[41]=T,t[42]=O,t[43]=E):E=t[43];let B;t[44]!==b||t[45]!==o?(B=s.jsx(oe.Main,{children:o?s.jsx(oe.EmptyState,{children:s.jsxs("div",{className:"flex flex-col items-center gap-6 w-full px-4",children:[s.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 p-0 text-center",children:[s.jsx(bs,{icon:b.icon,name:b.title,size:"lg",fallbackIcon:s.jsx(yt,{size:32}),className:"size-[60px]! rounded-[18px]!"}),s.jsx("h3",{className:"text-xl font-medium text-foreground",children:b.title}),s.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:b.description??"Ask anything about configuring model providers or using MCP Mesh."})]}),s.jsx(oe.IceBreakers,{})]})}):s.jsx(oe.Messages,{})}),t[44]=b,t[45]=o,t[46]=B):B=t[46];let H;t[47]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(oe.Footer,{children:s.jsx(oe.Input,{})}),t[47]=H):H=t[47];let R;t[48]!==E||t[49]!==B||t[50]!==S?(R=s.jsxs("div",{className:S,children:[E,B,H]}),t[48]=E,t[49]=B,t[50]=S,t[51]=R):R=t[51];const F=u?"opacity-100 translate-x-0":"opacity-0 translate-x-4 pointer-events-none";let W;t[52]!==F?(W=z("absolute inset-0 flex flex-col transition-all duration-300 ease-in-out",F),t[52]=F,t[53]=W):W=t[53];let G;t[54]===Symbol.for("react.memo_cache_sentinel")?(G=()=>p(!1),t[54]=G):G=t[54];let Z;t[55]!==i||t[56]!==c||t[57]!==d?(Z=s.jsx(_s,{threads:d,activeThreadId:i,onThreadSelect:c,onClose:G}),t[55]=i,t[56]=c,t[57]=d,t[58]=Z):Z=t[58];let X;t[59]!==W||t[60]!==Z?(X=s.jsx("div",{className:W,children:Z}),t[59]=W,t[60]=Z,t[61]=X):X=t[61];let Q;return t[62]!==R||t[63]!==X?(Q=s.jsxs(oe,{className:"relative overflow-hidden",children:[R,X]}),t[62]=R,t[63]=X,t[64]=Q):Q=t[64],Q}function cn(){const t=N.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(oe.Skeleton,{}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(St,{fallback:e,children:s.jsx(w.Suspense,{fallback:s.jsx(oe.Skeleton,{}),children:s.jsx(an,{})})}),t[1]=n):n=t[1],n}function dn(){const t=N.c(35),[e]=Ze(),{locator:n,org:r}=Se(),l=$e(),o=Ge(),{org:i,project:a}=Oe.parse(n),c=Oe.isOrgAdminProject(n),{data:d}=Es(r.id,a);let m;t[0]!==d?.enabledPlugins?(m=d?.enabledPlugins??[],t[0]=d?.enabledPlugins,t[1]=m):m=t[1];const f=m;let u;t[2]!==f?(u=P=>f.includes(P.pluginId),t[2]=f,t[3]=u):u=t[3];const p=ls.filter(u),x=o.location.pathname===`/${i}/${a}`||o.location.pathname===`/${i}/${a}/`;let h;t[4]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Ms,{}),t[4]=h):h=t[4];const g={key:"home",label:"Home",icon:h,onClick:()=>{x?window.dispatchEvent(new CustomEvent("reset-home-view")):l({to:"/$org/$project",params:{org:i,project:a}})}};let j;t[5]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Ct,{}),t[5]=j):j=t[5];const b={key:"tasks",label:"Tasks",icon:j,onClick:()=>l({to:"/$org/$project/tasks",params:{org:i,project:ne}})};let v;t[6]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Ts,{}),t[6]=v):v=t[6];const y={key:"mcps",label:"Connections",icon:v,onClick:()=>l({to:"/$org/$project/mcps",params:{org:i,project:ne}})};let C;t[7]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(xt,{}),t[7]=C):C=t[7];const S={key:"projects",label:"Projects",icon:C,onClick:()=>l({to:"/$org/$project/projects",params:{org:i,project:ne}})};let _;t[8]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Dt,{}),t[8]=_):_=t[8];const O={key:"store",label:"Store",icon:_,onClick:()=>l({to:"/$org/$project/store",params:{org:i,project:ne}})};let k;t[9]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(yt,{}),t[9]=k):k=t[9];const I={key:"agents",label:"Agents",icon:k,onClick:()=>l({to:"/$org/$project/agents",params:{org:i,project:ne}})};let $;t[10]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(Mt,{}),t[10]=$):$=t[10];const M={key:"monitoring",label:"Monitor",icon:$,onClick:()=>l({to:"/$org/$project/monitoring",params:{org:i,project:ne}})};let A;t[11]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(Ut,{}),t[11]=A):A=t[11];const U={key:"members",label:"Members",icon:A,onClick:()=>l({to:"/$org/$project/members",params:{org:i,project:ne}})},L=[...e.experimental_tasks?[b]:[],y,...e.experimental_projects?[S]:[],O,I,M,U],T=p.map(P=>({key:P.pluginId,label:P.label,icon:P.icon,onClick:()=>l({to:"/$org/$project/$pluginId",params:{org:i,project:a,pluginId:P.pluginId}})}));let E;t[12]!==f?(E=P=>f.includes(P.pluginId),t[12]=f,t[13]=E):E=t[13];const H=os.filter(E).map(P=>({type:"group",group:{id:`${P.pluginId}-${P.id}`,label:P.label,items:P.items.map((D,K)=>({key:`${P.pluginId}-${P.id}-${K}`,label:D.label,icon:D.icon,onClick:()=>l({to:"/$org/$project/$pluginId",params:{org:i,project:a,pluginId:P.pluginId}})})),defaultExpanded:P.defaultExpanded??!0}}));if(c){const P=[{type:"items",items:[g,...L]}];if(T.length>0){let D;t[14]===Symbol.for("react.memo_cache_sentinel")?(D={type:"divider"},t[14]=D):D=t[14],P.push(D);let K;t[15]!==T?(K={type:"items",items:T},t[15]=T,t[16]=K):K=t[16],P.push(K)}if(H.length>0){if(T.length===0){let D;t[17]===Symbol.for("react.memo_cache_sentinel")?(D={type:"divider"},t[17]=D):D=t[17],P.push(D)}P.push(...H)}return P}let R;t[18]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(js,{}),t[18]=R):R=t[18];let F;t[19]!==l||t[20]!==i||t[21]!==a?(F={key:"tasks",label:"Tasks",icon:R,onClick:()=>l({to:"/$org/$project/tasks",params:{org:i,project:a}})},t[19]=l,t[20]=i,t[21]=a,t[22]=F):F=t[22];const W=F;let G;t[23]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsx(As,{}),t[23]=G):G=t[23];let Z;t[24]!==l||t[25]!==i||t[26]!==a?(Z={key:"workflows",label:"Workflows",icon:G,onClick:()=>l({to:"/$org/$project/workflows",params:{org:i,project:a}})},t[24]=l,t[25]=i,t[26]=a,t[27]=Z):Z=t[27];const X=Z;let Q;t[28]!==e.experimental_tasks||t[29]!==W?(Q=e.experimental_tasks?[W]:[],t[28]=e.experimental_tasks,t[29]=W,t[30]=Q):Q=t[30];const V=[{type:"items",items:[g,...Q,X]}];if(T.length>0){let P;t[31]===Symbol.for("react.memo_cache_sentinel")?(P={type:"divider"},t[31]=P):P=t[31],V.push(P);let D;t[32]!==T?(D={type:"items",items:T},t[32]=T,t[33]=D):D=t[33],V.push(D)}if(H.length>0){if(T.length===0){let P;t[34]===Symbol.for("react.memo_cache_sentinel")?(P={type:"divider"},t[34]=P):P=t[34],V.push(P)}V.push(...H)}return V}const mn="sidebar_state",fn=3600*24*7,un="16rem",pn="18rem",xn="3rem",hn="b",Kt=w.createContext(null);function Ye(){const t=w.useContext(Kt);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function gn(t){const e=N.c(21),{defaultOpen:n,open:r,onOpenChange:l,children:o}=t,i=n===void 0?!0:n,a=De(),[c,d]=w.useState(!1),[m,f]=w.useState(i),u=r??m;let p;e[0]!==u||e[1]!==l?(p=O=>{const k=typeof O=="function"?O(u):O;l?l(k):f(k),document.cookie=`${mn}=${k}; path=/; max-age=${fn}`},e[0]=u,e[1]=l,e[2]=p):p=e[2];const x=p;let h;e[3]!==a||e[4]!==x?(h=()=>a?d(bn):x(jn),e[3]=a,e[4]=x,e[5]=h):h=e[5];const g=h;let j,b;e[6]!==g?(j=()=>{const O=k=>{if(k.key===hn&&(k.metaKey||k.ctrlKey)){const I=k.target;if(I.tagName==="INPUT"||I.tagName==="TEXTAREA"||I.isContentEditable)return;k.preventDefault(),g()}};return globalThis.addEventListener("keydown",O),()=>globalThis.removeEventListener("keydown",O)},b=[g],e[6]=g,e[7]=j,e[8]=b):(j=e[7],b=e[8]),w.useEffect(j,b);const v=u?"expanded":"collapsed";let y;e[9]!==a||e[10]!==u||e[11]!==c||e[12]!==x||e[13]!==v||e[14]!==g?(y={state:v,open:u,setOpen:x,isMobile:a,openMobile:c,setOpenMobile:d,toggleSidebar:g},e[9]=a,e[10]=u,e[11]=c,e[12]=x,e[13]=v,e[14]=g,e[15]=y):y=e[15];const C=y;let S;e[16]!==o?(S=s.jsx(_t,{delayDuration:0,children:o}),e[16]=o,e[17]=S):S=e[17];let _;return e[18]!==C||e[19]!==S?(_=s.jsx(Kt.Provider,{value:C,children:S}),e[18]=C,e[19]=S,e[20]=_):_=e[20],_}function jn(t){return!t}function bn(t){return!t}function vn(t){const e=N.c(14);let n,r,l,o;e[0]!==t?({className:r,style:o,children:n,...l}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=l,e[4]=o):(n=e[1],r=e[2],l=e[3],o=e[4]);let i;e[5]!==o?(i={"--sidebar-width":un,"--sidebar-width-icon":xn,...o},e[5]=o,e[6]=i):i=e[6];const a=i;let c;e[7]!==r?(c=z("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",r),e[7]=r,e[8]=c):c=e[8];let d;return e[9]!==n||e[10]!==l||e[11]!==a||e[12]!==c?(d=s.jsx("div",{"data-slot":"sidebar-wrapper",style:a,className:c,...l,children:n}),e[9]=n,e[10]=l,e[11]=a,e[12]=c,e[13]=d):d=e[13],d}function Nn(t){const e=N.c(46);let n,r,l,o,i,a;e[0]!==t?({side:o,variant:i,collapsible:a,className:r,children:n,...l}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=l,e[4]=o,e[5]=i,e[6]=a):(n=e[1],r=e[2],l=e[3],o=e[4],i=e[5],a=e[6]);const c=o===void 0?"left":o,d=i===void 0?"sidebar":i,m=a===void 0?"offcanvas":a,{isMobile:f,state:u,openMobile:p,setOpenMobile:x}=Ye();if(m==="none"){let k;e[7]!==r?(k=z("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),e[7]=r,e[8]=k):k=e[8];let I;return e[9]!==n||e[10]!==l||e[11]!==k?(I=s.jsx("div",{"data-slot":"sidebar",className:k,...l,children:n}),e[9]=n,e[10]=l,e[11]=k,e[12]=I):I=e[12],I}if(f){let k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k={"--sidebar-width":pn},e[13]=k):k=e[13];let I;e[14]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsxs($s,{className:"sr-only",children:[s.jsx(Is,{children:"Sidebar"}),s.jsx(Os,{children:"Displays the mobile sidebar."})]}),e[14]=I):I=e[14];let $;e[15]!==n?($=s.jsx("div",{className:"flex h-full w-full flex-col",children:n}),e[15]=n,e[16]=$):$=e[16];let M;e[17]!==c||e[18]!==$?(M=s.jsxs(Ps,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:k,side:c,children:[I,$]}),e[17]=c,e[18]=$,e[19]=M):M=e[19];let A;return e[20]!==p||e[21]!==l||e[22]!==x||e[23]!==M?(A=s.jsx(zs,{open:p,onOpenChange:x,...l,children:M}),e[20]=p,e[21]=l,e[22]=x,e[23]=M,e[24]=A):A=e[24],A}const h=u==="collapsed"?m:"",g=d==="floating"||d==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let j;e[25]!==g?(j=z("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",g),e[25]=g,e[26]=j):j=e[26];let b;e[27]!==j?(b=s.jsx("div",{"data-slot":"sidebar-gap",className:j}),e[27]=j,e[28]=b):b=e[28];const v=c==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",y=d==="floating"||d==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let C;e[29]!==r||e[30]!==v||e[31]!==y?(C=z("fixed top-12 bottom-0 z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",v,y,r),e[29]=r,e[30]=v,e[31]=y,e[32]=C):C=e[32];let S;e[33]!==n?(S=s.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border pt-2 flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:n}),e[33]=n,e[34]=S):S=e[34];let _;e[35]!==l||e[36]!==C||e[37]!==S?(_=s.jsx("div",{"data-slot":"sidebar-container",className:C,...l,children:S}),e[35]=l,e[36]=C,e[37]=S,e[38]=_):_=e[38];let O;return e[39]!==c||e[40]!==u||e[41]!==_||e[42]!==h||e[43]!==b||e[44]!==d?(O=s.jsxs("div",{className:"group peer text-foreground hidden md:block","data-state":u,"data-collapsible":h,"data-variant":d,"data-side":c,"data-slot":"sidebar",children:[b,_]}),e[39]=c,e[40]=u,e[41]=_,e[42]=h,e[43]=b,e[44]=d,e[45]=O):O=e[45],O}function yn(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.jsx("main",{"data-slot":"sidebar-inset",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Zt(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("flex flex-col gap-2 p-2",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Sn(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("flex flex-col gap-2 px-2 items-start justify-start",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function at(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("h-4 m-0! w-full",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.jsx("div",{"data-sidebar":"separator",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function wn(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Ee(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Le(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("w-full text-sm",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function _e(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("flex w-full min-w-0 flex-col gap-1",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function ie(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("group/menu-item relative",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}const Cn=as("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg px-2 py-1.5 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding,colors] transition-colors duration-150 ease-out hover:transition-none focus-visible:ring-2 active:bg-sidebar-accent/75 disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent/75 [&>span:last-child]:truncate [&>svg]:size-[18px] [&>svg]:shrink-0 [&>svg]:text-muted-foreground",{variants:{variant:{default:"hover:bg-sidebar-accent text-sidebar-foreground/80 active:text-sidebar-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-7 text-sm font-[450]",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Re(t){const e=N.c(28);let n,r,l,o,i,a,c;e[0]!==t?({asChild:l,isActive:o,variant:i,size:a,tooltip:c,className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=l,e[4]=o,e[5]=i,e[6]=a,e[7]=c):(n=e[1],r=e[2],l=e[3],o=e[4],i=e[5],a=e[6],c=e[7]);const d=l===void 0?!1:l,m=o===void 0?!1:o,f=i===void 0?"default":i,u=a===void 0?"default":a,p=d?is:"button",{isMobile:x,state:h}=Ye();let g;e[8]!==n||e[9]!==u||e[10]!==f?(g=z(Cn({variant:f,size:u}),n),e[8]=n,e[9]=u,e[10]=f,e[11]=g):g=e[11];let j;e[12]!==p||e[13]!==m||e[14]!==r||e[15]!==u||e[16]!==g?(j=s.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":u,"data-active":m,className:g,...r}),e[12]=p,e[13]=m,e[14]=r,e[15]=u,e[16]=g,e[17]=j):j=e[17];const b=j;if(!c)return b;if(typeof c=="string"){let _;e[18]!==c?(_={children:c},e[18]=c,e[19]=_):_=e[19],c=_}let v;e[20]!==b?(v=s.jsx(We,{asChild:!0,children:b}),e[20]=b,e[21]=v):v=e[21];const y=h!=="collapsed"||x;let C;e[22]!==y||e[23]!==c?(C=s.jsx(Fe,{side:"right",align:"center",hidden:y,...c}),e[22]=y,e[23]=c,e[24]=C):C=e[24];let S;return e[25]!==v||e[26]!==C?(S=s.jsxs(Ve,{children:[v,C]}),e[25]=v,e[26]=C,e[27]=S):S=e[27],S}function kn(t){const e=N.c(18),{label:n,children:r,defaultExpanded:l}=t,o=l===void 0?!0:l,[i,a]=w.useState(o);let c;e[0]!==i?(c=()=>a(!i),e[0]=i,e[1]=c):c=e[1];let d;e[2]!==n?(d=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n}),e[2]=n,e[3]=d):d=e[3];const m=!i&&"-rotate-90";let f;e[4]!==m?(f=z("text-muted-foreground transition-transform duration-200",m),e[4]=m,e[5]=f):f=e[5];let u;e[6]!==f?(u=s.jsx(nt,{size:12,className:f}),e[6]=f,e[7]=u):u=e[7];let p;e[8]!==c||e[9]!==d||e[10]!==u?(p=s.jsx(_e,{children:s.jsx(ie,{children:s.jsxs(Re,{className:"h-6 cursor-pointer select-none",onClick:c,children:[d,u]})})}),e[8]=c,e[9]=d,e[10]=u,e[11]=p):p=e[11];let x;e[12]!==r||e[13]!==i?(x=i&&s.jsx(Le,{children:s.jsx(_e,{className:"gap-0.5",children:r})}),e[12]=r,e[13]=i,e[14]=x):x=e[14];let h;return e[15]!==p||e[16]!==x?(h=s.jsxs(Ee,{className:"py-0",children:[p,x]}),e[15]=p,e[16]=x,e[17]=h):h=e[17],h}function qt(t){const e=N.c(13),{item:n}=t;let r;e[0]!==n.icon?(r=s.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:n.icon}),e[0]=n.icon,e[1]=r):r=e[1];let l;e[2]!==n.label?(l=s.jsx("span",{className:"truncate",children:n.label}),e[2]=n.label,e[3]=l):l=e[3];let o;e[4]!==n.isActive||e[5]!==n.label||e[6]!==n.onClick||e[7]!==r||e[8]!==l?(o=s.jsxs(Re,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:n.onClick,isActive:n.isActive,tooltip:n.label,children:[r,l]}),e[4]=n.isActive,e[5]=n.label,e[6]=n.onClick,e[7]=r,e[8]=l,e[9]=o):o=e[9];let i;return e[10]!==n.key||e[11]!==o?(i=s.jsx(ie,{children:o},n.key),e[10]=n.key,e[11]=o,e[12]=i):i=e[12],i}function _n(t){const e=N.c(12),{section:n}=t;switch(n.type){case"divider":{let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(at,{className:"my-2"}),e[0]=r):r=e[0],r}case"spacer":{let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex-1"}),e[1]=r):r=e[1],r}case"group":{const r=n.group.label,l=n.group.defaultExpanded;let o;e[2]!==n.group.items?(o=n.group.items.map($n),e[2]=n.group.items,e[3]=o):o=e[3];let i;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==o?(i=s.jsx(kn,{label:r,defaultExpanded:l,children:o}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=o,e[7]=i):i=e[7],i}case"items":{let r;e[8]!==n.items?(r=n.items.map(zn),e[8]=n.items,e[9]=r):r=e[9];let l;return e[10]!==r?(l=s.jsx(Ee,{className:"py-0",children:s.jsx(Le,{children:s.jsx(_e,{className:"gap-0.5",children:r})})}),e[10]=r,e[11]=l):l=e[11],l}}}function zn(t){return s.jsx(qt,{item:t},t.key)}function $n(t){return s.jsx(qt,{item:t},t.key)}function Yt(t){const e=N.c(14),{sections:n,header:r,footer:l,additionalContent:o,variant:i,collapsible:a,contentClassName:c}=t,d=i===void 0?"sidebar":i,m=a===void 0?"icon":a;let f;e[0]!==c?(f=z("flex flex-col flex-1 overflow-x-hidden font-medium border-r pb-2",c),e[0]=c,e[1]=f):f=e[1];let u;e[2]!==n?(u=n.map(In),e[2]=n,e[3]=u):u=e[3];let p;e[4]!==o||e[5]!==f||e[6]!==u?(p=s.jsxs(wn,{className:f,children:[u,o]}),e[4]=o,e[5]=f,e[6]=u,e[7]=p):p=e[7];let x;return e[8]!==m||e[9]!==l||e[10]!==r||e[11]!==p||e[12]!==d?(x=s.jsxs(Nn,{variant:d,collapsible:m,children:[r,p,l]}),e[8]=m,e[9]=l,e[10]=r,e[11]=p,e[12]=d,e[13]=x):x=e[13],x}function In(t,e){return s.jsx(_n,{section:t},e)}Yt.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,n)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(ee,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};const On="w-full h-8 justify-start gap-2 px-2 text-sm font-[450] text-sidebar-foreground hover:text-sidebar-foreground hover:bg-sidebar-accent active:bg-sidebar-accent/75 [&>svg]:size-[18px] [&>svg]:text-muted-foreground hover:[&>svg]:text-sidebar-foreground";function Ae(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z(On,n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.jsx(re,{variant:"ghost",size:"sm",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Pn({invitation:t,onStatusChange:e}){const[n,r]=w.useState(!1),[l,o]=w.useState(!1),i=$e(),a=async()=>{r(!0);try{const p=await he.organization.acceptInvitation({invitationId:t.id});if(p.error)ye.error(p.error.message),r(!1);else{e(t.id,"accepted");const x=await he.organization.setActive({organizationId:t.organizationId});x?.data?.slug?(ye.success("Invitation accepted!"),i({to:"/$org",params:{org:x.data.slug}})):(ye.success("Invitation accepted! Redirecting..."),i({to:"/"}))}}catch{ye.error("Failed to accept invitation"),r(!1)}},c=async()=>{o(!0);try{const p=await he.organization.rejectInvitation({invitationId:t.id});p.error?(ye.error(p.error.message),o(!1)):(ye.success("Invitation rejected"),e(t.id,"rejected"),o(!1))}catch{ye.error("Failed to reject invitation"),o(!1)}},d=t.organizationName||t.organizationId,m=t.status==="pending",f=t.status==="accepted",u=t.status==="rejected";return s.jsxs("div",{className:z("flex items-center gap-3 px-3 py-2 h-12 border-b border-border/50 last:border-b-0",!m&&"opacity-50"),children:[s.jsx("div",{className:"shrink-0 size-5 flex items-center justify-center",children:s.jsx(Vt,{size:16,className:"text-muted-foreground"})}),s.jsxs("p",{className:"flex-1 text-sm text-foreground min-w-0 whitespace-nowrap overflow-hidden",children:["You have been invited to ",s.jsx("span",{className:"font-semibold inline-block max-w-[200px] truncate align-bottom",children:d})]}),s.jsx("div",{className:"flex items-center gap-1 shrink-0",children:m?s.jsxs(s.Fragment,{children:[s.jsx(re,{variant:"ghost",size:"icon",onClick:c,disabled:n||l,className:"h-8 w-8",children:s.jsx(mt,{size:14})}),s.jsx(re,{variant:"outline",size:"icon",onClick:a,disabled:n||l,className:"h-8 w-8",children:s.jsx(Me,{size:14})})]}):f?s.jsxs(dt,{variant:"outline",className:"h-6 px-2 text-xs",children:[s.jsx(Me,{size:12}),"Accepted"]}):u?s.jsxs(dt,{variant:"outline",className:"h-6 px-2 text-xs",children:[s.jsx(mt,{size:12}),"Declined"]}):null})]})}function Tn(){const[t,e]=w.useState(!1),n=w.useContext(cs),{data:r}=n.hooks.useListUserInvitations(),{data:l}=he.useListOrganizations(),[o,i]=w.useState({}),m=(r??[]).filter(h=>new Date(h.expiresAt)>new Date).map(h=>{const g=(l??[]).find(j=>j.id===h.organizationId);return{...h,organizationSlug:g?.slug||h.organizationSlug,organizationName:g?.name||h.organizationName}}).map(h=>({...h,status:o[h.id]||h.status})),f=[...m].sort((h,g)=>{const j={pending:0,accepted:1,rejected:2};return(j[h.status]??999)-(j[g.status]??999)}),p=m.filter(h=>h.status==="pending").length>0,x=(h,g)=>{i(j=>({...j,[h]:g}))};return s.jsxs(rt,{open:t,onOpenChange:e,children:[s.jsx(lt,{asChild:!0,children:s.jsxs(Ae,{children:[s.jsx(ct,{size:18}),"Inbox",p&&s.jsx("span",{className:"ml-auto h-2 w-2 rounded-full bg-destructive"})]})}),s.jsxs(ot,{side:"right",align:"start",className:"w-[400px] p-0 overflow-hidden",children:[s.jsx("div",{className:"px-4 py-3 border-b border-border",children:s.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Inbox"})}),s.jsx("div",{className:"max-h-96 overflow-auto",children:f.length>0?f.map(h=>s.jsx(Pn,{invitation:h,onStatusChange:x},h.id)):s.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[s.jsx(ct,{size:32,className:"text-muted-foreground/40 mb-2"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"No invitations at the moment"})]})})]})]})}function An(t){const e=N.c(29),{user:n,userImage:r,onOpenSettings:l}=t;let o;e[0]!==n?(o=async()=>{if(!n)return;const _=`ID: ${n.id}
|
|
2
|
-
Name: ${n.name||"N/A"}
|
|
3
|
-
Email: ${n.email}`;try{await navigator.clipboard.writeText(_),ye.success("User info copied to clipboard")}catch{ye.error("Failed to copy user info to clipboard")}},e[0]=n,e[1]=o):o=e[1];const i=o,a=n.name||n.email||"U";let c;e[2]!==a||e[3]!==r?(c=s.jsx(ke,{url:r,fallback:a,shape:"circle",size:"sm",className:"size-8 shrink-0"}),e[2]=a,e[3]=r,e[4]=c):c=e[4];const d=n.name||"User";let m;e[5]!==d?(m=s.jsx("span",{className:"text-sm text-sidebar-foreground truncate font-[450]",children:d}),e[5]=d,e[6]=m):m=e[6];let f;e[7]!==n.email?(f=s.jsx("span",{className:"text-xs text-muted-foreground truncate font-normal",children:n.email}),e[7]=n.email,e[8]=f):f=e[8];let u;e[9]!==m||e[10]!==f?(u=s.jsxs("div",{className:"flex flex-col min-w-0 text-left",children:[m,f]}),e[9]=m,e[10]=f,e[11]=u):u=e[11];let p;e[12]!==i||e[13]!==c||e[14]!==u?(p=s.jsxs(re,{variant:"ghost",onClick:i,className:"h-auto p-2 m-1 mb-0 justify-start gap-2 hover:bg-sidebar-accent hover:text-inherit active:bg-sidebar-accent/75",children:[c,u]}),e[12]=i,e[13]=c,e[14]=u,e[15]=p):p=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Tn,{}),e[16]=x):x=e[16];let h;e[17]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Gt,{size:18}),e[17]=h):h=e[17];let g;e[18]!==l?(g=s.jsxs(Ae,{onClick:l,children:[h,"Preferences"]}),e[18]=l,e[19]=g):g=e[19];let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Ae,{asChild:!0,children:s.jsxs("a",{href:"https://www.decocms.com/terms-of-use",target:"_blank",rel:"noopener noreferrer",children:[s.jsx(Lt,{size:18}),s.jsx("span",{className:"flex-1",children:"Terms & Conditions"}),s.jsx(Qe,{size:14})]})}),e[20]=j):j=e[20];let b;e[21]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Ae,{asChild:!0,children:s.jsxs("a",{href:"https://github.com/decocms/mesh",target:"_blank",rel:"noopener noreferrer",children:[s.jsx(ht,{className:"size-[18px]"}),s.jsx("span",{className:"flex-1",children:"decocms/mesh"}),s.jsx(Qe,{size:14})]})}),e[21]=b):b=e[21];let v;e[22]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs(Ae,{onClick:Mn,children:[s.jsx(Wt,{size:18}),"Log out"]}),e[22]=v):v=e[22];let y;e[23]!==g?(y=s.jsxs("div",{className:"p-1 flex flex-col",children:[x,g,j,b,v]}),e[23]=g,e[24]=y):y=e[24];let C;e[25]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("div",{className:"mt-auto px-3 py-2 border-t border-border",children:s.jsxs("span",{className:"text-[11px] text-muted-foreground/75",children:["v","2.113.1"]})}),e[25]=C):C=e[25];let S;return e[26]!==y||e[27]!==p?(S=s.jsx(s.Fragment,{children:s.jsxs("div",{className:"flex flex-col gap-0.5 bg-sidebar min-w-[250px]",children:[p,y,C]})}),e[26]=y,e[27]=p,e[28]=S):S=e[28],S}function Mn(){return he.signOut()}function En(t){const e=N.c(26),{org:n,isActive:r,isHovered:l,onClick:o,onSettings:i,onHover:a}=t,c=r,d=l&&!r,m=l&&"bg-accent/50",f=r&&!l&&"bg-accent hover:bg-accent";let u;e[0]!==m||e[1]!==f?(u=z("flex items-center gap-2 w-full justify-start font-normal h-10 px-2 rounded-lg cursor-pointer transition-colors",m,f),e[0]=m,e[1]=f,e[2]=u):u=e[2];let p;e[3]!==o?(p=y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),o?.())},e[3]=o,e[4]=p):p=e[4];let x;e[5]!==a||e[6]!==n.id?(x=()=>a?.(n.id),e[5]=a,e[6]=n.id,e[7]=x):x=e[7];const h=n.logo??void 0;let g;e[8]!==n.name||e[9]!==h?(g=s.jsx(ke,{url:h,fallback:n.name,size:"sm",className:"size-6 shrink-0 rounded-md",objectFit:"cover"}),e[8]=n.name,e[9]=h,e[10]=g):g=e[10];let j;e[11]!==n.name?(j=s.jsx("span",{className:"flex-1 text-sm text-foreground truncate text-left min-w-0",children:n.name}),e[11]=n.name,e[12]=j):j=e[12];let b;e[13]!==i||e[14]!==n.name||e[15]!==d||e[16]!==c?(b=i&&c?s.jsx("button",{type:"button","aria-label":`${n.name} settings`,className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:y=>{y.stopPropagation(),i()},children:s.jsx(it,{size:16,className:"text-muted-foreground"})}):d?s.jsx(zt,{size:16,className:"text-muted-foreground shrink-0"}):s.jsx("span",{className:"size-5 shrink-0","aria-hidden":"true"}),e[13]=i,e[14]=n.name,e[15]=d,e[16]=c,e[17]=b):b=e[17];let v;return e[18]!==o||e[19]!==u||e[20]!==p||e[21]!==x||e[22]!==g||e[23]!==j||e[24]!==b?(v=s.jsxs("div",{role:"button",tabIndex:0,className:u,onClick:o,onKeyDown:p,onMouseEnter:x,children:[g,j,b]}),e[18]=o,e[19]=u,e[20]=p,e[21]=x,e[22]=g,e[23]=j,e[24]=b,e[25]=v):v=e[25],v}function Ln(t){const e=N.c(34),{currentOrgSlug:n,hoveredOrgId:r,onOrgSelect:l,onOrgSettings:o,onPopoverClose:i,onCreateOrganization:a,onOrgHover:c}=t,{data:d}=he.useListOrganizations();let m,f,u,p;if(e[0]!==n||e[1]!==r||e[2]!==a||e[3]!==c||e[4]!==l||e[5]!==o||e[6]!==i||e[7]!==d){let g;e[12]!==n?(g=(S,_)=>S.slug===n?-1:_.slug===n?1:S.name.localeCompare(_.name),e[12]=n,e[13]=g):g=e[13];const j=[...d??[]].sort(g);u="flex flex-col min-w-[240px] border-l border-border";let b;e[14]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("span",{className:"text-xs text-muted-foreground truncate",children:"Your Organizations"}),e[14]=b):b=e[14];let v;e[15]!==a||e[16]!==i?(v=()=>{i(),a()},e[15]=a,e[16]=i,e[17]=v):v=e[17];let y;e[18]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(qe,{size:16,className:"text-muted-foreground"}),e[18]=y):y=e[18],e[19]!==v?(p=s.jsxs("div",{className:"flex items-center justify-between h-10 px-3 border-b border-border",children:[b,s.jsx(re,{variant:"ghost",size:"icon",className:"size-5",onClick:v,children:y})]}),e[19]=v,e[20]=p):p=e[20],m="flex flex-col gap-0.5 p-1 flex-1 overflow-y-auto";let C;e[21]!==n||e[22]!==r||e[23]!==c||e[24]!==l||e[25]!==o?(C=S=>s.jsx(En,{org:S,isActive:S.slug===n,isHovered:S.id===r,onClick:()=>l(S.slug),onSettings:()=>o(S.slug),onHover:c},S.slug),e[21]=n,e[22]=r,e[23]=c,e[24]=l,e[25]=o,e[26]=C):C=e[26],f=j.map(C),e[0]=n,e[1]=r,e[2]=a,e[3]=c,e[4]=l,e[5]=o,e[6]=i,e[7]=d,e[8]=m,e[9]=f,e[10]=u,e[11]=p}else m=e[8],f=e[9],u=e[10],p=e[11];let x;e[27]!==m||e[28]!==f?(x=s.jsx("div",{className:m,children:f}),e[27]=m,e[28]=f,e[29]=x):x=e[29];let h;return e[30]!==u||e[31]!==p||e[32]!==x?(h=s.jsxs("div",{className:u,children:[p,x]}),e[30]=u,e[31]=p,e[32]=x,e[33]=h):h=e[33],h}function Dn(t){const e=N.c(27),{project:n,isActive:r,onClick:l,onSettings:o}=t,[i,a]=w.useState(!1),c=r||i,d=n.ui?.themeColor??"#3B82F6",m=r&&"bg-accent hover:bg-accent";let f;e[0]!==m?(f=z("flex items-center gap-2 w-full justify-start font-normal h-10 px-2 rounded-lg cursor-pointer transition-colors hover:bg-accent/50",m),e[0]=m,e[1]=f):f=e[1];let u;e[2]!==l?(u=y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),l?.())},e[2]=l,e[3]=u):u=e[3];let p,x;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=()=>a(!0),x=()=>a(!1),e[4]=p,e[5]=x):(p=e[4],x=e[5]);let h;e[6]!==n.name||e[7]!==n.ui||e[8]!==d?(h=n.ui?.icon?s.jsx("img",{src:n.ui.icon,alt:"",className:"size-6 rounded-md object-cover shrink-0"}):s.jsx(ke,{fallback:n.name,size:"sm",shape:"square",className:"size-6 shrink-0 rounded-md",style:{backgroundColor:d}}),e[6]=n.name,e[7]=n.ui,e[8]=d,e[9]=h):h=e[9];let g;e[10]!==n.name?(g=s.jsx("span",{className:"flex-1 text-sm text-foreground truncate text-left min-w-0",children:n.name}),e[10]=n.name,e[11]=g):g=e[11];let j;e[12]!==r?(j=r&&s.jsx(Me,{size:16,className:"text-muted-foreground shrink-0"}),e[12]=r,e[13]=j):j=e[13];let b;e[14]!==r||e[15]!==o||e[16]!==n.name||e[17]!==c?(b=o&&c&&!r?s.jsx("button",{type:"button","aria-label":`${n.name} settings`,className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:y=>{y.stopPropagation(),o()},children:s.jsx(it,{size:16,className:"text-muted-foreground"})}):r?null:s.jsx("span",{className:"size-5 shrink-0","aria-hidden":"true"}),e[14]=r,e[15]=o,e[16]=n.name,e[17]=c,e[18]=b):b=e[18];let v;return e[19]!==l||e[20]!==f||e[21]!==u||e[22]!==h||e[23]!==g||e[24]!==j||e[25]!==b?(v=s.jsxs("div",{role:"button",tabIndex:0,className:f,onClick:l,onKeyDown:u,onMouseEnter:p,onMouseLeave:x,children:[h,g,j,b]}),e[19]=l,e[20]=f,e[21]=u,e[22]=h,e[23]=g,e[24]=j,e[25]=b,e[26]=v):v=e[26],v}function Rn(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"space-y-1 px-2 py-1",children:[s.jsx(ee,{className:"h-10 w-full"}),s.jsx(ee,{className:"h-10 w-full"})]}),t[0]=e):e=t[0],e}function Hn(t){const e=N.c(16),{organizationId:n,currentProjectSlug:r,onProjectSelect:l,onProjectSettings:o,orgSlug:i}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={suspense:!0},e[0]=a):a=e[0];const{data:c}=kt(n,a);let d,m;if(e[1]!==r||e[2]!==l||e[3]!==o||e[4]!==i||e[5]!==c){m=Symbol.for("react.early_return_sentinel");e:{const u=c?.filter(Un)??[];if(u.length===0){let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"px-3 py-4 text-center text-sm text-muted-foreground",children:"No projects yet"}),e[8]=x):x=e[8],m=x;break e}let p;e[9]!==r||e[10]!==l||e[11]!==o||e[12]!==i?(p=x=>s.jsx(Dn,{project:x,isActive:r===x.slug,onClick:()=>l(i,x.slug),onSettings:o?()=>o(i,x.slug):void 0},x.id),e[9]=r,e[10]=l,e[11]=o,e[12]=i,e[13]=p):p=e[13],d=u.map(p)}e[1]=r,e[2]=l,e[3]=o,e[4]=i,e[5]=c,e[6]=d,e[7]=m}else d=e[6],m=e[7];if(m!==Symbol.for("react.early_return_sentinel"))return m;let f;return e[14]!==d?(f=s.jsx(s.Fragment,{children:d}),e[14]=d,e[15]=f):f=e[15],f}function Un(t){return t.slug!==ne}function Bn(t){const e=N.c(17),{organizationId:n,organizationName:r,currentProjectSlug:l,onProjectSelect:o,onProjectSettings:i,onCreateProject:a,orgSlug:c}=t;let d;e[0]!==r?(d=s.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["Projects in ",r]}),e[0]=r,e[1]=d):d=e[1];let m;e[2]!==a?(m=a&&s.jsx("button",{type:"button",className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:a,"aria-label":"Create project",children:s.jsx(qe,{size:16,className:"text-muted-foreground"})}),e[2]=a,e[3]=m):m=e[3];let f;e[4]!==d||e[5]!==m?(f=s.jsxs("div",{className:"flex items-center justify-between h-10 px-3 border-b border-border",children:[d,m]}),e[4]=d,e[5]=m,e[6]=f):f=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Rn,{}),e[7]=u):u=e[7];let p;e[8]!==l||e[9]!==o||e[10]!==i||e[11]!==c||e[12]!==n?(p=s.jsx("div",{className:"flex flex-col gap-0.5 p-1 flex-1 overflow-y-auto",children:s.jsx(w.Suspense,{fallback:u,children:s.jsx(Hn,{organizationId:n,currentProjectSlug:l,onProjectSelect:o,onProjectSettings:i,orgSlug:c})})}),e[8]=l,e[9]=o,e[10]=i,e[11]=c,e[12]=n,e[13]=p):p=e[13];let x;return e[14]!==f||e[15]!==p?(x=s.jsxs("div",{className:"flex flex-col min-w-[250px] border-l border-border",children:[f,p]}),e[14]=f,e[15]=p,e[16]=x):x=e[16],x}function Jt(t){const e=N.c(108),{open:n,onOpenChange:r,user:l,userImage:o}=t,[i,a]=Ze(),[c,d]=w.useState(!1);let m;e[0]!==l.id?(m=()=>{navigator.clipboard.writeText(l.id),d(!0),setTimeout(()=>d(!1),2e3)},e[0]=l.id,e[1]=m):m=e[1];const f=m;let u;e[2]!==a?(u=async se=>{if(se&&await Notification.requestPermission()!=="granted"){ye.error("Notifications denied. Please enable them in your browser settings."),a(Yn);return}a(J=>({...J,enableNotifications:se}))},e[2]=a,e[3]=u):u=e[3];const p=u;let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Ls,{className:"text-base",children:"Profile Settings"}),e[4]=x):x=e[4];let h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsxs(Ds,{className:"px-6 pt-6 pb-4 border-b border-border shrink-0 relative",children:[x,s.jsxs(Rs,{className:"absolute top-1/2 right-4 -translate-y-1/2 cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[s.jsx(Be,{size:16}),s.jsx("span",{className:"sr-only",children:"Close"})]})]}),e[5]=h):h=e[5];const g=l.name||"U";let j;e[6]!==g||e[7]!==o?(j=s.jsx(ke,{url:o,fallback:g,shape:"circle",size:"xl",className:"h-16 w-16"}),e[6]=g,e[7]=o,e[8]=j):j=e[8];const b=l.name||"User";let v;e[9]!==b?(v=s.jsx("span",{className:"text-base font-medium text-foreground",children:b}),e[9]=b,e[10]=v):v=e[10];let y;e[11]!==l.email?(y=s.jsx("span",{className:"text-sm text-muted-foreground",children:l.email}),e[11]=l.email,e[12]=y):y=e[12];let C;e[13]!==v||e[14]!==y?(C=s.jsxs("div",{className:"flex flex-col gap-1",children:[v,y]}),e[13]=v,e[14]=y,e[15]=C):C=e[15];let S;e[16]!==C||e[17]!==j?(S=s.jsxs("div",{className:"flex items-center gap-4",children:[j,C]}),e[16]=C,e[17]=j,e[18]=S):S=e[18];let _;e[19]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Preferences"}),e[19]=_):_=e[19];let O;e[20]!==a?(O=()=>a(qn),e[20]=a,e[21]=O):O=e[21];let k;e[22]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[s.jsxs(Te,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[s.jsx(Gs,{size:16,className:"text-muted-foreground"}),"Developer Mode"]}),s.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Show technical details like JSON input/output for tool calls"})]}),e[22]=k):k=e[22];let I;e[23]!==a?(I=se=>a(J=>({...J,devMode:se})),e[23]=a,e[24]=I):I=e[24];let $;e[25]!==i.devMode||e[26]!==I?($=s.jsx("div",{onClick:Zn,children:s.jsx(He,{checked:i.devMode,onCheckedChange:I})}),e[25]=i.devMode,e[26]=I,e[27]=$):$=e[27];let M;e[28]!==O||e[29]!==$?(M=s.jsxs("button",{type:"button",onClick:O,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[k,$]}),e[28]=O,e[29]=$,e[30]=M):M=e[30];let A;e[31]!==p||e[32]!==i.enableNotifications?(A=()=>p(!i.enableNotifications),e[31]=p,e[32]=i.enableNotifications,e[33]=A):A=e[33];let U;e[34]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[s.jsxs(Te,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[s.jsx(Et,{size:16,className:"text-muted-foreground"}),"Notifications"]}),s.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Play a sound and show notifications when chat messages complete while app is unfocused"})]}),e[34]=U):U=e[34];let L;e[35]!==p||e[36]!==i.enableNotifications?(L=s.jsx("div",{onClick:Kn,children:s.jsx(He,{disabled:typeof Notification>"u",checked:i.enableNotifications,onCheckedChange:p})}),e[35]=p,e[36]=i.enableNotifications,e[37]=L):L=e[37];let T;e[38]!==A||e[39]!==L?(T=s.jsxs("button",{type:"button",disabled:typeof Notification>"u",onClick:A,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[U,L]}),e[38]=A,e[39]=L,e[40]=T):T=e[40];let E;e[41]!==M||e[42]!==T?(E=s.jsxs("div",{className:"flex flex-col gap-2",children:[_,M,T]}),e[41]=M,e[42]=T,e[43]=E):E=e[43];let B,H;e[44]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(Te,{className:"text-sm font-medium text-foreground",children:"Tool Approval"}),H=s.jsx("p",{className:"text-xs text-muted-foreground",children:"Choose when to require approval before tools execute"}),e[44]=B,e[45]=H):(B=e[44],H=e[45]);let R;e[46]!==a?(R=se=>a(J=>({...J,toolApprovalLevel:se})),e[46]=a,e[47]=R):R=e[47];let F;e[48]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(Fs,{className:"w-full",children:s.jsx(Ws,{})}),e[48]=F):F=e[48];let W;e[49]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(Xe,{value:"none",children:s.jsxs("div",{className:"flex items-start flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"None"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Require approval for all tool calls"})]})}),e[49]=W):W=e[49];let G;e[50]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsx(Xe,{value:"readonly",children:s.jsxs("div",{className:"flex items-start flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Read-only"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),e[50]=G):G=e[50];let Z;e[51]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsxs(Vs,{children:[W,G,s.jsx(Xe,{value:"yolo",children:s.jsxs("div",{className:"flex items-start flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"YOLO"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all tools without approval"})]})})]}),e[51]=Z):Z=e[51];let X;e[52]!==i.toolApprovalLevel||e[53]!==R?(X=s.jsxs("div",{className:"flex flex-col gap-2",children:[B,H,s.jsxs(Bs,{value:i.toolApprovalLevel,onValueChange:R,children:[F,Z]})]}),e[52]=i.toolApprovalLevel,e[53]=R,e[54]=X):X=e[54];let Q,q;e[55]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Experimental"}),q=s.jsx("p",{className:"text-xs text-muted-foreground",children:"Experimental features are unstable and may change or stop working at any time."}),e[55]=Q,e[56]=q):(Q=e[55],q=e[56]);let V;e[57]!==a?(V=()=>a(Gn),e[57]=a,e[58]=V):V=e[58];let P;e[59]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[s.jsxs(Te,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[s.jsx(xt,{size:16,className:"text-muted-foreground"}),"Projects"]}),s.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Enable the projects feature in the sidebar"})]}),e[59]=P):P=e[59];let D;e[60]!==a?(D=se=>a(J=>({...J,experimental_projects:se})),e[60]=a,e[61]=D):D=e[61];let K;e[62]!==i.experimental_projects||e[63]!==D?(K=s.jsx("div",{onClick:Vn,children:s.jsx(He,{checked:i.experimental_projects,onCheckedChange:D})}),e[62]=i.experimental_projects,e[63]=D,e[64]=K):K=e[64];let Y;e[65]!==V||e[66]!==K?(Y=s.jsxs("button",{type:"button",onClick:V,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[P,K]}),e[65]=V,e[66]=K,e[67]=Y):Y=e[67];let te;e[68]!==a?(te=()=>a(Wn),e[68]=a,e[69]=te):te=e[69];let ze;e[70]===Symbol.for("react.memo_cache_sentinel")?(ze=s.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[s.jsxs(Te,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[s.jsx(Ct,{size:16,className:"text-muted-foreground"}),"Tasks"]}),s.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Enable the tasks feature in the sidebar"})]}),e[70]=ze):ze=e[70];let we;e[71]!==a?(we=se=>a(J=>({...J,experimental_tasks:se})),e[71]=a,e[72]=we):we=e[72];let ae;e[73]!==i.experimental_tasks||e[74]!==we?(ae=s.jsx("div",{onClick:Fn,children:s.jsx(He,{checked:i.experimental_tasks,onCheckedChange:we})}),e[73]=i.experimental_tasks,e[74]=we,e[75]=ae):ae=e[75];let ce;e[76]!==te||e[77]!==ae?(ce=s.jsxs("button",{type:"button",onClick:te,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[ze,ae]}),e[76]=te,e[77]=ae,e[78]=ce):ce=e[78];let de;e[79]!==Y||e[80]!==ce?(de=s.jsxs("div",{className:"flex flex-col gap-2",children:[Q,q,Y,ce]}),e[79]=Y,e[80]=ce,e[81]=de):de=e[81];let me;e[82]!==S||e[83]!==E||e[84]!==X||e[85]!==de?(me=s.jsxs("div",{className:"p-5 space-y-6 min-h-[225px] overflow-y-auto",children:[S,E,X,de]}),e[82]=S,e[83]=E,e[84]=X,e[85]=de,e[86]=me):me=e[86];let fe;e[87]!==l.id?(fe=s.jsx("span",{className:"font-mono text-xs",children:l.id}),e[87]=l.id,e[88]=fe):fe=e[88];let ge;e[89]!==c?(ge=c?s.jsx(Me,{size:14,className:"text-green-600"}):s.jsx(It,{size:14,className:"opacity-0 group-hover:opacity-100 transition-opacity"}),e[89]=c,e[90]=ge):ge=e[90];let je;e[91]!==f||e[92]!==fe||e[93]!==ge?(je=s.jsx(We,{asChild:!0,children:s.jsxs("button",{type:"button",onClick:f,className:"group flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[fe,ge]})}),e[91]=f,e[92]=fe,e[93]=ge,e[94]=je):je=e[94];let be;e[95]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(Fe,{side:"top",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[95]=be):be=e[95];let ue;e[96]!==je?(ue=s.jsx(_t,{children:s.jsxs(Ve,{children:[je,be]})}),e[96]=je,e[97]=ue):ue=e[97];let ve;e[98]===Symbol.for("react.memo_cache_sentinel")?(ve=s.jsxs("span",{className:"text-xs text-muted-foreground/75",children:["v","2.113.1"]}),e[98]=ve):ve=e[98];let pe;e[99]!==ue?(pe=s.jsxs("div",{className:"border-t border-border px-5 py-4 flex items-center justify-between shrink-0",children:[ue,ve]}),e[99]=ue,e[100]=pe):pe=e[100];let xe;e[101]!==me||e[102]!==pe?(xe=s.jsxs(Hs,{className:"sm:max-w-lg sm:max-h-[85vh] p-0 flex flex-col",closeButtonClassName:"hidden",children:[h,s.jsxs("div",{className:"flex flex-col overflow-y-hidden",children:[me,pe]})]}),e[101]=me,e[102]=pe,e[103]=xe):xe=e[103];let Ne;return e[104]!==r||e[105]!==n||e[106]!==xe?(Ne=s.jsx(Us,{open:n,onOpenChange:r,children:xe}),e[104]=r,e[105]=n,e[106]=xe,e[107]=Ne):Ne=e[107],Ne}function Fn(t){return t.stopPropagation()}function Wn(t){return{...t,experimental_tasks:!t.experimental_tasks}}function Vn(t){return t.stopPropagation()}function Gn(t){return{...t,experimental_projects:!t.experimental_projects}}function Kn(t){return t.stopPropagation()}function Zn(t){return t.stopPropagation()}function qn(t){return{...t,devMode:!t.devMode}}function Yn(t){return{...t,enableNotifications:!1}}function Xt(t){const e=N.c(77),{isCollapsed:n,variant:r,onCreateProject:l}=t,o=n===void 0?!1:n,i=r===void 0?"light":r,[a]=Ze();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[0]=c):c=e[0];const{org:d,project:m}=st(c),{data:f}=he.useListOrganizations(),{data:u}=he.useSession(),p=$e(),x=i==="dark",g=Se()?.project;let j;e[1]!==d||e[2]!==f?(j=f?.find(J=>J.slug===d),e[1]=d,e[2]=f,e[3]=j):j=e[3];const b=j,[v,y]=w.useState(!1),[C,S]=w.useState(!1),[_,O]=w.useState(!1),[k,I]=w.useState(null),$=u?.user,M=$?.image;let A;e[4]!==b||e[5]!==k||e[6]!==f?(A=k?f?.find(J=>J.id===k):b,e[4]=b,e[5]=k,e[6]=f,e[7]=A):A=e[7];const U=A;let L;e[8]!==p?(L=J=>{y(!1),p({to:"/$org/$project/settings",params:{org:J,project:ne}})},e[8]=p,e[9]=L):L=e[9];const T=L;let E;e[10]!==p?(E=J=>{y(!1),p({to:"/$org/$project",params:{org:J,project:ne}})},e[10]=p,e[11]=E):E=e[11];const B=E;let H;e[12]!==p?(H=(J,Je)=>{y(!1),p({to:"/$org/$project",params:{org:J,project:Je}})},e[12]=p,e[13]=H):H=e[13];const R=H;let F;e[14]!==p?(F=(J,Je)=>{y(!1),p({to:"/$org/$project/settings",params:{org:J,project:Je}})},e[14]=p,e[15]=F):F=e[15];const W=F;let G;e[16]!==l?(G=l?()=>{y(!1),l()}:void 0,e[16]=l,e[17]=G):G=e[17];const Z=G;let X;e[18]===Symbol.for("react.memo_cache_sentinel")?(X=J=>{y(J),J||I(null)},e[18]=X):X=e[18];const Q=X;let q;e[19]!==b?(q=()=>{b&&I(b.id)},e[19]=b,e[20]=q):q=e[20];const V=q,P=x?"hover:bg-zinc-800 text-white":"hover:bg-sidebar-accent",D=o?"justify-center":"justify-start",K=o?"":"pl-0.5! px-1.5 gap-1.5";let Y;e[21]!==P||e[22]!==D||e[23]!==K?(Y=z("h-7 min-w-0 max-w-full",P,D,K),e[21]=P,e[22]=D,e[23]=K,e[24]=Y):Y=e[24];const te=b?.logo??"",ze=b?.name??"",we=x&&"border-none";let ae;e[25]!==we?(ae=z("shrink-0 rounded-[5px]",we),e[25]=we,e[26]=ae):ae=e[26];let ce;e[27]!==te||e[28]!==ze||e[29]!==ae?(ce=s.jsx(ke,{url:te,fallback:ze,size:"xs",className:ae,objectFit:"cover"}),e[27]=te,e[28]=ze,e[29]=ae,e[30]=ce):ce=e[30];let de;e[31]!==b?.name||e[32]!==g||e[33]!==o||e[34]!==x?(de=!o&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"min-w-0 flex-1 text-left",children:x&&g?s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-[10px] text-zinc-500 leading-none truncate",children:b?.name??"Select org"}),s.jsx("p",{className:"text-sm text-white font-normal leading-tight mt-0.5 truncate",children:g.name??g.slug})]}):s.jsx("span",{className:"block truncate text-[14px] tracking-[-0.00625rem] font-medium text-foreground",children:b?.name??"Select org"})}),x?s.jsx(vt,{className:"size-3 text-zinc-500 shrink-0"}):s.jsx(nt,{className:"size-3.5 text-muted-foreground shrink-0"})]}),e[31]=b?.name,e[32]=g,e[33]=o,e[34]=x,e[35]=de):de=e[35];let me;e[36]!==V||e[37]!==Y||e[38]!==ce||e[39]!==de?(me=s.jsx(lt,{asChild:!0,children:s.jsxs(re,{variant:"ghost",size:"sm",onClick:V,className:Y,children:[ce,de]})}),e[36]=V,e[37]=Y,e[38]=ce,e[39]=de,e[40]=me):me=e[40];let fe;e[41]!==$||e[42]!==M?(fe=$&&s.jsx(An,{user:$,userImage:M,onOpenSettings:()=>{S(!0),y(!1)}}),e[41]=$,e[42]=M,e[43]=fe):fe=e[43];let ge,je;e[44]===Symbol.for("react.memo_cache_sentinel")?(ge=()=>y(!1),je=()=>O(!0),e[44]=ge,e[45]=je):(ge=e[44],je=e[45]);let be;e[46]!==T||e[47]!==B||e[48]!==k||e[49]!==d?(be=s.jsx(Ln,{currentOrgSlug:d,hoveredOrgId:k,onOrgSelect:B,onOrgSettings:T,onPopoverClose:ge,onCreateOrganization:je,onOrgHover:I}),e[46]=T,e[47]=B,e[48]=k,e[49]=d,e[50]=be):be=e[50];let ue;e[51]!==Z||e[52]!==W||e[53]!==R||e[54]!==U||e[55]!==d||e[56]!==a.experimental_projects||e[57]!==m?(ue=a.experimental_projects&&U&&s.jsx(Bn,{organizationId:U.id,organizationName:U.name,orgSlug:U.slug,currentProjectSlug:U.slug===d?m:void 0,onProjectSelect:R,onProjectSettings:W,onCreateProject:Z}),e[51]=Z,e[52]=W,e[53]=R,e[54]=U,e[55]=d,e[56]=a.experimental_projects,e[57]=m,e[58]=ue):ue=e[58];let ve;e[59]!==fe||e[60]!==be||e[61]!==ue?(ve=s.jsxs(ot,{align:"start",side:"bottom",className:"p-0 flex w-auto h-88 overflow-hidden",children:[fe,be,ue]}),e[59]=fe,e[60]=be,e[61]=ue,e[62]=ve):ve=e[62];let pe;e[63]!==v||e[64]!==me||e[65]!==ve?(pe=s.jsxs(rt,{open:v,onOpenChange:Q,children:[me,ve]}),e[63]=v,e[64]=me,e[65]=ve,e[66]=pe):pe=e[66];let xe;e[67]!==C||e[68]!==$||e[69]!==M?(xe=$&&C&&$.email&&s.jsx(Jt,{open:C,onOpenChange:S,user:{...$,name:$.name??void 0,email:$.email},userImage:M}),e[67]=C,e[68]=$,e[69]=M,e[70]=xe):xe=e[70];let Ne;e[71]!==_?(Ne=s.jsx($t,{open:_,onOpenChange:O}),e[71]=_,e[72]=Ne):Ne=e[72];let se;return e[73]!==pe||e[74]!==xe||e[75]!==Ne?(se=s.jsxs(s.Fragment,{children:[pe,xe,Ne]}),e[73]=pe,e[74]=xe,e[75]=Ne,e[76]=se):se=e[76],se}Xt.Skeleton=function({variant:e="light"}){const n=e==="dark";return s.jsxs("div",{className:z("flex items-center gap-1.5 h-7 px-1.5 w-full",n&&"text-white"),children:[s.jsx(ee,{className:z("size-5 rounded-[5px] shrink-0",n&&"bg-zinc-800")}),s.jsx(ee,{className:z("h-3.5 flex-1",n&&"bg-zinc-800")})]})};function et(t){const e=N.c(71),{onCreateProject:n}=t,{state:r,toggleSidebar:l}=Ye(),o=r==="collapsed",[i,a]=Ke(),{locator:c}=Se();let d;e[0]!==c?(d=Oe.isOrgAdminProject(c),e[0]=c,e[1]=d):d=e[1];const f=!d;let u;e[2]!==a?(u=()=>{a(Jn)},e[2]=a,e[3]=u):u=e[3];const p=u,x=f&&"bg-[#030302] border-b border-zinc-800";let h;e[4]!==x?(h=z("h-12 gap-0 pt-0 border-r",x),e[4]=x,e[5]=h):h=e[5];const g=o&&"group-hover/switcher:opacity-0 group-hover/switcher:pointer-events-none group-hover/switcher:invisible";let j;e[6]!==g?(j=z("w-full min-w-0 transition-opacity",g),e[6]=g,e[7]=j):j=e[7];const b=f?"dark":"light";let v;e[8]!==o||e[9]!==n||e[10]!==b?(v=s.jsx(Xt,{isCollapsed:o,variant:b,onCreateProject:n}),e[8]=o,e[9]=n,e[10]=b,e[11]=v):v=e[11];let y;e[12]!==j||e[13]!==v?(y=s.jsx("div",{className:j,children:v}),e[12]=j,e[13]=v,e[14]=y):y=e[14];const C=f?"hover:bg-zinc-800 text-zinc-400":"hover:bg-sidebar-accent",S=o?"opacity-0 invisible pointer-events-none group-hover/switcher:opacity-100 group-hover/switcher:visible group-hover/switcher:pointer-events-auto":"opacity-0 invisible pointer-events-none";let _;e[15]!==C||e[16]!==S?(_=z("absolute inset-0 m-auto size-7 transition-opacity",C,S),e[15]=C,e[16]=S,e[17]=_):_=e[17];const O=!o,k=f?"text-zinc-400":"text-muted-foreground";let I;e[18]!==k?(I=z("size-4 shrink-0",k),e[18]=k,e[19]=I):I=e[19];let $;e[20]!==I?($=s.jsx(Ht,{className:I}),e[20]=I,e[21]=$):$=e[21];let M;e[22]!==_||e[23]!==O||e[24]!==$||e[25]!==l?(M=s.jsx(re,{variant:"ghost",size:"icon",className:_,onClick:l,"aria-label":"Expand sidebar",disabled:O,children:$}),e[22]=_,e[23]=O,e[24]=$,e[25]=l,e[26]=M):M=e[26];let A;e[27]!==M||e[28]!==y?(A=s.jsxs("div",{className:"group/switcher relative flex items-center justify-center gap-1.5 min-w-0 flex-1 overflow-hidden",children:[y,M]}),e[27]=M,e[28]=y,e[29]=A):A=e[29];const U=o&&"hidden";let L;e[30]!==U?(L=z("flex items-center gap-0.5 shrink-0",U),e[30]=U,e[31]=L):L=e[31];const T=f?"hover:bg-zinc-800 text-zinc-400 hover:text-white":"hover:bg-sidebar-accent";let E;e[32]!==T?(E=z("size-7",T),e[32]=T,e[33]=E):E=e[33];const B=f?"text-zinc-400":"text-muted-foreground";let H;e[34]!==B?(H=z("size-4",B),e[34]=B,e[35]=H):H=e[35];let R;e[36]!==H?(R=s.jsx(Rt,{className:H}),e[36]=H,e[37]=R):R=e[37];let F;e[38]!==o||e[39]!==E||e[40]!==R||e[41]!==l?(F=s.jsx(We,{asChild:!0,children:s.jsx(re,{variant:"ghost",size:"icon",className:E,onClick:l,"aria-label":"Collapse sidebar",disabled:o,children:R})}),e[38]=o,e[39]=E,e[40]=R,e[41]=l,e[42]=F):F=e[42];let W;e[43]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(Fe,{side:"bottom",children:"Collapse sidebar"}),e[43]=W):W=e[43];let G;e[44]!==F?(G=s.jsxs(Ve,{children:[F,W]}),e[44]=F,e[45]=G):G=e[45];let Z;e[46]!==i||e[47]!==f?(Z=z("size-7",f?z("hover:bg-zinc-800 text-zinc-400 hover:text-white",i&&"bg-zinc-800 text-white"):z("hover:bg-sidebar-accent",i&&"bg-sidebar-accent")),e[46]=i,e[47]=f,e[48]=Z):Z=e[48];const X=f?"text-inherit":"text-muted-foreground";let Q;e[49]!==X?(Q=z(X),e[49]=X,e[50]=Q):Q=e[50];let q;e[51]!==Q?(q=s.jsx(Nt,{size:11,className:Q}),e[51]=Q,e[52]=q):q=e[52];let V;e[53]!==o||e[54]!==Z||e[55]!==q||e[56]!==p?(V=s.jsx(We,{asChild:!0,children:s.jsx(re,{variant:"ghost",size:"icon",className:Z,onClick:p,"aria-label":"Toggle Decopilot",disabled:o,children:q})}),e[53]=o,e[54]=Z,e[55]=q,e[56]=p,e[57]=V):V=e[57];let P;e[58]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(Fe,{side:"bottom",children:"Toggle Decopilot"}),e[58]=P):P=e[58];let D;e[59]!==V?(D=s.jsxs(Ve,{children:[V,P]}),e[59]=V,e[60]=D):D=e[60];let K;e[61]!==L||e[62]!==G||e[63]!==D?(K=s.jsxs("div",{className:L,children:[G,D]}),e[61]=L,e[62]=G,e[63]=D,e[64]=K):K=e[64];let Y;e[65]!==A||e[66]!==K?(Y=s.jsx(_e,{children:s.jsx(ie,{children:s.jsxs("div",{className:"flex items-center justify-between w-full h-12",children:[A,K]})})}),e[65]=A,e[66]=K,e[67]=Y):Y=e[67];let te;return e[68]!==Y||e[69]!==h?(te=s.jsx(Zt,{className:h,children:Y}),e[68]=Y,e[69]=h,e[70]=te):te=e[70],te}function Jn(t){return!t}et.Skeleton=function({isDark:e=!1}){return s.jsx(Zt,{className:z("h-12 gap-0 pt-0",e&&"bg-[#030302] border-b border-zinc-800"),children:s.jsx(_e,{children:s.jsx(ie,{children:s.jsxs("div",{className:"flex items-center justify-between w-full h-12",children:[s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0 flex-1 px-1.5",children:[s.jsx(ee,{className:z("size-5 rounded-[5px] shrink-0",e&&"bg-zinc-800")}),s.jsx(ee,{className:z("h-3.5 w-16",e&&"bg-zinc-800")})]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx(ee,{className:z("size-7 rounded-lg",e&&"bg-zinc-800")}),s.jsx(ee,{className:z("size-7 rounded-lg",e&&"bg-zinc-800")})]})]})})})})};function Xn(){const t=N.c(10),{locator:e}=Se(),n=$e(),l=Ge().location.pathname;let o;t[0]!==l?(o=l.includes("/settings"),t[0]=l,t[1]=o):o=t[1];const i=o;let a;t[2]!==e||t[3]!==n?(a=()=>{n({to:"/$org/$project/settings",params:Oe.parse(e)})},t[2]=e,t[3]=n,t[4]=a):a=t[4];const c=a;let d,m;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:s.jsx(it,{})}),m=s.jsx("span",{className:"truncate",children:"Settings"}),t[5]=d,t[6]=m):(d=t[5],m=t[6]);let f;return t[7]!==c||t[8]!==i?(f=s.jsx(Sn,{className:"py-2 border-r",children:s.jsx(_e,{children:s.jsx(ie,{children:s.jsxs(Re,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:c,isActive:i,tooltip:"Settings",children:[d,m]})})})}),t[7]=c,t[8]=i,t[9]=f):f=t[9],f}function Qt(t){const e=N.c(4),{children:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(at,{className:"my-2 -ml-1"}),e[0]=r):r=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ie,{children:s.jsx("div",{className:"group-data-[collapsible=icon]:hidden px-2 py-0 text-xs font-medium h-6 text-muted-foreground flex items-center justify-between",children:s.jsx("span",{className:"whitespace-nowrap",children:"Pinned Views"})})}),e[1]=l):l=e[1];let o;return e[2]!==n?(o=s.jsxs(s.Fragment,{children:[r,l,n]}),e[2]=n,e[3]=o):o=e[3],o}function Qn(t){const e=N.c(26),{item:n}=t,r=$e(),{org:l}=Se(),o=Ot(l.id),i=Ks(l.id);let a;e[0]!==i.update||e[1]!==n.url||e[2]!==o?.sidebar_items?(a=async()=>{const y=(o?.sidebar_items||[]).filter(C=>C.url!==n.url);await i.update.mutateAsync({sidebar_items:y})},e[0]=i.update,e[1]=n.url,e[2]=o?.sidebar_items,e[3]=a):a=e[3];const c=a;let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=/^https?:\/\/.+/,e[4]=d):d=e[4];let m;e[5]!==n.icon?(m=d.test(n.icon),e[5]=n.icon,e[6]=m):m=e[6];const f=m;let u;e[7]!==n.url||e[8]!==r?(u=()=>{r({to:n.url})},e[7]=n.url,e[8]=r,e[9]=u):u=e[9];const p=n.title;let x;e[10]!==f||e[11]!==n.icon||e[12]!==n.title?(x=s.jsx("div",{className:"flex items-center justify-center shrink-0",children:f?s.jsx("img",{src:n.icon,alt:n.title,className:"h-4 w-4 rounded object-cover"}):s.jsx(Zs,{size:16,className:"text-muted-foreground group-hover/item:text-foreground transition-colors"})}),e[10]=f,e[11]=n.icon,e[12]=n.title,e[13]=x):x=e[13];let h;e[14]!==n.title?(h=n.title.toLocaleLowerCase(),e[14]=n.title,e[15]=h):h=e[15];let g;e[16]!==h?(g=s.jsx("div",{className:"flex-1 min-w-0 flex flex-col items-start",children:s.jsx("span",{className:"truncate text-sm w-full capitalize",children:h})}),e[16]=h,e[17]=g):g=e[17];let j;e[18]!==c?(j=s.jsx(Be,{size:16,className:"text-muted-foreground opacity-0 group-hover/item:opacity-50 hover:opacity-100 cursor-pointer",onClick:v=>{v.preventDefault(),v.stopPropagation(),c()}}),e[18]=c,e[19]=j):j=e[19];let b;return e[20]!==n.title||e[21]!==u||e[22]!==x||e[23]!==g||e[24]!==j?(b=s.jsx(ie,{children:s.jsxs(Re,{className:"w-full pr-2 group/item relative cursor-pointer text-foreground/90 hover:text-foreground",onClick:u,tooltip:p,children:[x,g,j]})}),e[20]=n.title,e[21]=u,e[22]=x,e[23]=g,e[24]=j,e[25]=b):b=e[25],b}function pt(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ie,{children:s.jsx("div",{className:"flex items-center gap-2 px-4 py-2",children:s.jsx(ee,{className:"h-4 flex-1"})})}),t[0]=e):e=t[0],e}function er(){const t=N.c(4),{org:e}=Se(),r=Ot(e.id)?.sidebar_items;if(!r?.length)return null;let l;t[0]!==r?(l=r.map(tr),t[0]=r,t[1]=l):l=t[1];let o;return t[2]!==l?(o=s.jsx(Qt,{children:l}),t[2]=l,t[3]=o):o=t[3],o}function tr(t){return s.jsx(Qn,{item:t},t.url)}function sr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(w.Suspense,{fallback:s.jsxs(Qt,{children:[s.jsx(pt,{}),s.jsx(pt,{})]}),children:s.jsx(er,{})}),t[0]=e):e=t[0],e}function nr(t){const e=N.c(11),{project:n}=t,r=n.ui?.themeColor??"#60a5fa";if(n.ui?.icon){let c;return e[0]!==n.ui.icon?(c=s.jsx("img",{src:n.ui.icon,alt:"",className:"size-4 rounded object-cover border border-border/50"}),e[0]=n.ui.icon,e[1]=c):c=e[1],c}let l;e[2]!==r?(l={backgroundColor:r},e[2]=r,e[3]=l):l=e[3];let o;e[4]!==n.name?(o=n.name.charAt(0).toUpperCase(),e[4]=n.name,e[5]=o):o=e[5];let i;e[6]!==o?(i=s.jsx("span",{className:"text-[10px] font-medium text-white",children:o}),e[6]=o,e[7]=i):i=e[7];let a;return e[8]!==l||e[9]!==i?(a=s.jsx("div",{className:"size-4 rounded flex items-center justify-center border border-border/50",style:l,children:i}),e[8]=l,e[9]=i,e[10]=a):a=e[10],a}function rr(t){const e=N.c(14),{project:n}=t,r=$e(),{org:l}=Se();let o;e[0]!==r||e[1]!==l.slug||e[2]!==n.slug?(o=()=>{r({to:"/$org/$project",params:{org:l.slug,project:n.slug}})},e[0]=r,e[1]=l.slug,e[2]=n.slug,e[3]=o):o=e[3];let i;e[4]!==n?(i=s.jsx(nr,{project:n}),e[4]=n,e[5]=i):i=e[5];let a;e[6]!==n.name?(a=s.jsx("span",{className:"truncate flex-1",children:n.name}),e[6]=n.name,e[7]=a):a=e[7];let c;e[8]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(zt,{size:12,className:"text-muted-foreground opacity-0 group-hover/item:opacity-100 transition-opacity"}),e[8]=c):c=e[8];let d;return e[9]!==n.name||e[10]!==o||e[11]!==i||e[12]!==a?(d=s.jsx(ie,{children:s.jsxs(Re,{className:"group/item cursor-pointer text-foreground/90 hover:text-foreground",onClick:o,tooltip:n.name,children:[i,a,c]})}),e[9]=n.name,e[10]=o,e[11]=i,e[12]=a,e[13]=d):d=e[13],d}function lr(){const t=N.c(54),{org:e}=Se(),{data:n,isLoading:r}=kt(e.id),[l,o]=w.useState(!0),[i,a]=w.useState(!1);let c,d,m,f,u,p,x,h,g,j,b,v,y;if(t[0]!==r||t[1]!==l||t[2]!==n){y=Symbol.for("react.early_return_sentinel");e:{const M=n?.filter(ir)??[];if(r){let H;t[16]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(ie,{children:s.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[s.jsx(ee,{className:"h-4 w-4 rounded"}),s.jsx(ee,{className:"h-4 flex-1"})]})}),t[16]=H):H=t[16];let R;t[17]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(Ee,{className:"py-0",children:s.jsx(Le,{children:s.jsxs(_e,{className:"gap-0.5",children:[H,s.jsx(ie,{children:s.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[s.jsx(ee,{className:"h-4 w-4 rounded"}),s.jsx(ee,{className:"h-4 flex-1"})]})})]})})}),t[17]=R):R=t[17],y=R;break e}t[18]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(at,{className:"my-2"}),t[18]=v):v=t[18],u=Ns,j=l,b=o,f=Ee,g="py-0",m=Le,d=_e,x="gap-0.5";let A;t[19]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx("span",{children:"Projects"}),t[19]=A):A=t[19];const U=!l&&"-rotate-90";let L;t[20]!==U?(L=z("transition-transform",U),t[20]=U,t[21]=L):L=t[21];let T;t[22]!==L?(T=s.jsx(ys,{asChild:!0,children:s.jsxs("button",{type:"button",className:"flex items-center gap-1 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors",children:[A,s.jsx(nt,{size:12,className:L})]})}),t[22]=L,t[23]=T):T=t[23];let E;t[24]===Symbol.for("react.memo_cache_sentinel")?(E=()=>a(!0),t[24]=E):E=t[24];let B;t[25]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx("button",{type:"button",onClick:E,className:"text-muted-foreground hover:text-foreground transition-colors p-0.5 rounded hover:bg-accent",title:"Create new project",children:s.jsx(qe,{size:16})}),t[25]=B):B=t[25],t[26]!==T?(h=s.jsx(ie,{children:s.jsxs("div",{className:"flex items-center justify-between px-2 h-6",children:[T,B]})}),t[26]=T,t[27]=h):h=t[27],c=Ss,p=M.length===0?s.jsx(ie,{children:s.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:"No projects yet"})}):M.map(or)}t[0]=r,t[1]=l,t[2]=n,t[3]=c,t[4]=d,t[5]=m,t[6]=f,t[7]=u,t[8]=p,t[9]=x,t[10]=h,t[11]=g,t[12]=j,t[13]=b,t[14]=v,t[15]=y}else c=t[3],d=t[4],m=t[5],f=t[6],u=t[7],p=t[8],x=t[9],h=t[10],g=t[11],j=t[12],b=t[13],v=t[14],y=t[15];if(y!==Symbol.for("react.early_return_sentinel"))return y;let C;t[28]!==c||t[29]!==p?(C=s.jsx(c,{children:p}),t[28]=c,t[29]=p,t[30]=C):C=t[30];let S;t[31]!==d||t[32]!==x||t[33]!==h||t[34]!==C?(S=s.jsxs(d,{className:x,children:[h,C]}),t[31]=d,t[32]=x,t[33]=h,t[34]=C,t[35]=S):S=t[35];let _;t[36]!==m||t[37]!==S?(_=s.jsx(m,{children:S}),t[36]=m,t[37]=S,t[38]=_):_=t[38];let O;t[39]!==f||t[40]!==_||t[41]!==g?(O=s.jsx(f,{className:g,children:_}),t[39]=f,t[40]=_,t[41]=g,t[42]=O):O=t[42];let k;t[43]!==u||t[44]!==O||t[45]!==j||t[46]!==b?(k=s.jsx(u,{open:j,onOpenChange:b,children:O}),t[43]=u,t[44]=O,t[45]=j,t[46]=b,t[47]=k):k=t[47];let I;t[48]!==i?(I=s.jsx(wt,{open:i,onOpenChange:a}),t[48]=i,t[49]=I):I=t[49];let $;return t[50]!==k||t[51]!==I||t[52]!==v?($=s.jsxs(s.Fragment,{children:[v,k,I]}),t[50]=k,t[51]=I,t[52]=v,t[53]=$):$=t[53],$}function or(t){return s.jsx(rr,{project:t},t.id)}function ir(t){return t.slug!==ne}function ar(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(w.Suspense,{fallback:s.jsx(Ee,{className:"py-0",children:s.jsx(Le,{children:s.jsx(_e,{className:"gap-0.5",children:s.jsx(ie,{children:s.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[s.jsx(ee,{className:"h-4 w-4 rounded"}),s.jsx(ee,{className:"h-4 flex-1"})]})})})})}),children:s.jsx(lr,{})}),t[0]=e):e=t[0],e}function cr(t){const e=N.c(16),{onCreateProject:n}=t,[r]=Ze(),l=dn(),{locator:o}=Se();let i;e[0]!==o?(i=Oe.isOrgAdminProject(o),e[0]=o,e[1]=i):i=e[1];const a=i;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(et.Skeleton,{}),e[2]=c):c=e[2];let d;e[3]!==n?(d=s.jsx(w.Suspense,{fallback:c,children:s.jsx(et,{onCreateProject:n})}),e[3]=n,e[4]=d):d=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Xn,{}),e[5]=m):m=e[5];let f;e[6]!==a||e[7]!==r?(f=a?r.experimental_projects?s.jsx(ar,{}):null:s.jsx(sr,{}),e[6]=a,e[7]=r,e[8]=f):f=e[8];let u;e[9]!==f?(u=s.jsx(St,{children:s.jsx(w.Suspense,{fallback:null,children:f})}),e[9]=f,e[10]=u):u=e[10];const p=a?void 0:"pt-3";let x;return e[11]!==l||e[12]!==d||e[13]!==u||e[14]!==p?(x=s.jsx(Yt,{sections:l,header:d,footer:m,additionalContent:u,contentClassName:p}),e[11]=l,e[12]=d,e[13]=u,e[14]=p,e[15]=x):x=e[15],x}function dr(t){const e=N.c(12);let n,r,l,o;e[0]!==t?({className:n,orientation:l,decorative:o,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=l,e[4]=o):(n=e[1],r=e[2],l=e[3],o=e[4]);const i=l===void 0?"horizontal":l,a=o===void 0?!0:o;let c;e[5]!==n?(c=z("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",n),e[5]=n,e[6]=c):c=e[6];let d;return e[7]!==a||e[8]!==i||e[9]!==r||e[10]!==c?(d=s.jsx(ds,{"data-slot":"separator-root",decorative:a,orientation:i,className:c,...r}),e[7]=a,e[8]=i,e[9]=r,e[10]=c,e[11]=d):d=e[11],d}const es=w.createContext(null);function mr(){const t=w.useContext(es);if(!t)throw new Error("TopbarSwitcher compound components must be used within TopbarSwitcher.Root");return t}function fr(t){const e=N.c(10),{children:n,onItemHover:r}=t,[l,o]=w.useState(null);let i;e[0]!==r?(i=f=>{o(f),r?.(f)},e[0]=r,e[1]=i):i=e[1];const a=i;let c;e[2]!==l||e[3]!==a?(c={hoveredItem:l,setHoveredItem:a},e[2]=l,e[3]=a,e[4]=c):c=e[4];let d;e[5]!==n?(d=s.jsx(rt,{children:n}),e[5]=n,e[6]=d):d=e[6];let m;return e[7]!==c||e[8]!==d?(m=s.jsx(es.Provider,{value:c,children:d}),e[7]=c,e[8]=d,e[9]=m):m=e[9],m}function ur(t){const e=N.c(6),{children:n,onClick:r}=t;let l;e[0]!==n||e[1]!==r?(l=s.jsx(re,{variant:"link",className:"p-0.5 h-auto",onClick:r,type:"button",children:n}),e[0]=n,e[1]=r,e[2]=l):l=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(lt,{asChild:!0,children:s.jsx(re,{size:"icon",variant:"ghost",className:"w-6 h-6 p-0",children:s.jsx(vt,{size:16,className:"opacity-50"})})}),e[3]=o):o=e[3];let i;return e[4]!==l?(i=s.jsxs("div",{className:"flex items-center gap-1",children:[l,o]}),e[4]=l,e[5]=i):i=e[5],i}function pr(t){const e=N.c(8),{item:n,fallback:r}=t,l=r===void 0?"":r,o=n?.avatarUrl??"",i=n?.name??l;let a;e[0]!==o||e[1]!==i?(a=s.jsx(ke,{url:o,fallback:i,size:"xs",objectFit:"contain"}),e[0]=o,e[1]=i,e[2]=a):a=e[2];const c=n?.name??l;let d;e[3]!==c?(d=s.jsx("span",{children:c}),e[3]=c,e[4]=d):d=e[4];let m;return e[5]!==a||e[6]!==d?(m=s.jsxs("div",{className:"flex items-center gap-2",children:[a,d]}),e[5]=a,e[6]=d,e[7]=m):m=e[7],m}function xr(t){const e=N.c(6),{children:n,align:r}=t,l=r===void 0?"start":r,i=w.Children.toArray(n).filter(hr).length===1?"280px":"480px";let a;e[0]!==i?(a={width:i},e[0]=i,e[1]=a):a=e[1];let c;return e[2]!==l||e[3]!==n||e[4]!==a?(c=s.jsx(ot,{align:l,className:"p-0 flex items-start",style:a,children:n}),e[2]=l,e[3]=n,e[4]=a,e[5]=c):c=e[5],c}function hr(t){return w.isValidElement(t)&&(t.type===ss||t.type===ts)}function ts(t){const e=N.c(5),{children:n,className:r}=t;let l;e[0]!==r?(l=z("flex flex-col border-border w-[240px] border-r last:border-r-0 last:w-full",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==n||e[3]!==l?(o=s.jsx("div",{className:l,children:n}),e[2]=n,e[3]=l,e[4]=o):o=e[4],o}const ss=ts;function gr(t){const e=N.c(6),{placeholder:n,value:r,onChange:l}=t,o=n===void 0?"Search...":n;let i;e[0]!==l?(i=c=>l(c.target.value),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==o||e[3]!==i||e[4]!==r?(a=s.jsx(qs,{placeholder:o,value:r,onChange:i,className:"rounded-none border-t-0 border-x-0 focus-visible:border-border focus-visible:ring-0"}),e[2]=o,e[3]=i,e[4]=r,e[5]=a):a=e[5],a}function jr(t){const e=N.c(6),{children:n,emptyMessage:r}=t,l=r===void 0?"No items found.":r,o=w.Children.count(n)>0;let i;e[0]!==l||e[1]!==o?(i=!o&&s.jsx("div",{className:"text-muted-foreground text-sm px-1 py-8 text-center",children:l}),e[0]=l,e[1]=o,e[2]=i):i=e[2];let a;return e[3]!==n||e[4]!==i?(a=s.jsxs("div",{className:"flex flex-col gap-0.5 p-1 max-h-44 overflow-y-auto",children:[i,n]}),e[3]=n,e[4]=i,e[5]=a):a=e[5],a}function br(t){const e=N.c(15),{item:n,onClick:r,onHover:l,children:o}=t,i=mr();let a;e[0]!==i||e[1]!==n||e[2]!==l?(a=()=>{i.setHoveredItem(n.slug),l?.(n)},e[0]=i,e[1]=n,e[2]=l,e[3]=a):a=e[3];const c=a;let d;e[4]!==n||e[5]!==r?(d=()=>r(n),e[4]=n,e[5]=r,e[6]=d):d=e[6];let m;e[7]!==o||e[8]!==n.avatarUrl||e[9]!==n.name?(m=o||s.jsxs(s.Fragment,{children:[s.jsx(ke,{url:n.avatarUrl??"",fallback:n.name,size:"xs",className:"w-[22px]! h-[22px]!",objectFit:"contain"}),s.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:n.name})]}),e[7]=o,e[8]=n.avatarUrl,e[9]=n.name,e[10]=m):m=e[10];let f;return e[11]!==c||e[12]!==d||e[13]!==m?(f=s.jsx(re,{onClick:d,onMouseEnter:c,variant:"ghost",size:"sm",className:"w-full justify-start font-normal",children:m}),e[11]=c,e[12]=d,e[13]=m,e[14]=f):f=e[14],f}function vr(t){const e=N.c(2),{children:n}=t;let r;return e[0]!==n?(r=s.jsx("div",{className:"px-1 pb-1 pt-0.5",children:n}),e[0]=n,e[1]=r):r=e[1],r}function Nr(t){const e=N.c(11),{onClick:n,icon:r,children:l,variant:o}=t,a=(o===void 0?"default":o)==="muted"&&"text-muted-foreground";let c;e[0]!==a?(c=z("w-full justify-start font-normal",a),e[0]=a,e[1]=c):c=e[1];let d;e[2]!==r?(d=r&&s.jsx("span",{className:"[&>svg]:size-4",children:r}),e[2]=r,e[3]=d):d=e[3];let m;e[4]!==l?(m=s.jsx("span",{children:l}),e[4]=l,e[5]=m):m=e[5];let f;return e[6]!==n||e[7]!==c||e[8]!==d||e[9]!==m?(f=s.jsxs(re,{variant:"ghost",size:"sm",className:c,onClick:n,children:[d,m]}),e[6]=n,e[7]=c,e[8]=d,e[9]=m,e[10]=f):f=e[10],f}function yr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(dr,{}),t[0]=e):e=t[0],e}function Sr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"h-4 w-16 bg-accent rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const le=Object.assign(fr,{Trigger:ur,CurrentItem:pr,Content:xr,Panel:ss,Search:gr,Items:jr,Item:br,Actions:vr,Action:Nr,Separator:yr,Skeleton:Sr});function tt(){const t=N.c(59);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:n}=st(e),{data:r}=he.useListOrganizations(),l=$e();let o;t[1]!==n||t[2]!==r?(o=r?.find(U=>U.slug===n),t[1]=n,t[2]=r,t[3]=o):o=t[3];const i=o,[a,c]=w.useState(""),[d,m]=w.useState(!1);let f,u,p,x,h,g,j,b;if(t[4]!==i||t[5]!==l||t[6]!==n||t[7]!==a||t[8]!==r){const L=(r?(()=>{const F=r.filter(W=>W.name.toLowerCase().includes(a.toLowerCase()));if(n){const W=F.findIndex(G=>G.slug===n);if(W>0){const G=F[W];G&&(F.splice(W,1),F.unshift(G))}}return F})():[]).map(wr);let T;t[17]!==i?(T=i?{slug:i.slug,name:i.name,avatarUrl:i.logo}:void 0,t[17]=i,t[18]=T):T=t[18];const E=T;x=le;let B;t[19]!==l||t[20]!==n?(B=()=>l({to:"/$org",params:{org:n??""}}),t[19]=l,t[20]=n,t[21]=B):B=t[21];let H;t[22]!==E?(H=s.jsx(le.CurrentItem,{item:E}),t[22]=E,t[23]=H):H=t[23],t[24]!==B||t[25]!==H?(b=s.jsx(le.Trigger,{onClick:B,children:H}),t[24]=B,t[25]=H,t[26]=b):b=t[26],p=le.Content,u=le.Panel,t[27]!==a?(j=s.jsx(le.Search,{placeholder:"Search organizations...",value:a,onChange:c}),t[27]=a,t[28]=j):j=t[28],f=le.Items,h="No organizations found.";let R;t[29]!==l?(R=F=>s.jsx(le.Item,{item:F,onClick:W=>l({to:"/$org",params:{org:W.slug}})},F.slug),t[29]=l,t[30]=R):R=t[30],g=L.map(R),t[4]=i,t[5]=l,t[6]=n,t[7]=a,t[8]=r,t[9]=f,t[10]=u,t[11]=p,t[12]=x,t[13]=h,t[14]=g,t[15]=j,t[16]=b}else f=t[9],u=t[10],p=t[11],x=t[12],h=t[13],g=t[14],j=t[15],b=t[16];let v;t[31]!==f||t[32]!==h||t[33]!==g?(v=s.jsx(f,{emptyMessage:h,children:g}),t[31]=f,t[32]=h,t[33]=g,t[34]=v):v=t[34];let y,C;t[35]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(le.Actions,{children:s.jsx(le.Action,{onClick:()=>m(!0),variant:"muted",children:"+ Create organization"})}),C=s.jsx(le.Separator,{}),t[35]=y,t[36]=C):(y=t[35],C=t[36]);let S;t[37]!==l?(S=()=>l({to:"/"}),t[37]=l,t[38]=S):S=t[38];let _;t[39]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Ys,{}),t[39]=_):_=t[39];let O;t[40]!==S?(O=s.jsx(le.Actions,{children:s.jsx(le.Action,{onClick:S,icon:_,children:"See all organizations"})}),t[40]=S,t[41]=O):O=t[41];let k;t[42]!==u||t[43]!==O||t[44]!==j||t[45]!==v?(k=s.jsxs(u,{children:[j,v,y,C,O]}),t[42]=u,t[43]=O,t[44]=j,t[45]=v,t[46]=k):k=t[46];let I;t[47]!==p||t[48]!==k?(I=s.jsx(p,{children:k}),t[47]=p,t[48]=k,t[49]=I):I=t[49];let $;t[50]!==x||t[51]!==I||t[52]!==b?($=s.jsxs(x,{children:[b,I]}),t[50]=x,t[51]=I,t[52]=b,t[53]=$):$=t[53];let M;t[54]!==d?(M=s.jsx($t,{open:d,onOpenChange:m}),t[54]=d,t[55]=M):M=t[55];let A;return t[56]!==$||t[57]!==M?(A=s.jsxs(s.Fragment,{children:[$,M]}),t[56]=$,t[57]=M,t[58]=A):A=t[58],A}function wr(t){return{slug:t.slug,name:t.name,avatarUrl:t.logo}}tt.Skeleton=le.Skeleton;function Cr(){const t=N.c(10),{locator:e}=Se(),n=Js();if(Oe.isOrgAdminProject(e))return null;const l=n?.leftRef;let o;t[0]!==l?(o=s.jsx("div",{ref:l,className:"flex items-center gap-2 flex-1 min-w-0"}),t[0]=l,t[1]=o):o=t[1];const i=n?.centerRef;let a;t[2]!==i?(a=s.jsx("div",{ref:i,className:"flex flex-1 h-full items-center justify-center px-4 min-w-0 [&:empty]:hidden"}),t[2]=i,t[3]=a):a=t[3];const c=n?.rightRef;let d;t[4]!==c?(d=s.jsx("div",{ref:c,className:"flex flex-1 gap-2 h-full items-center justify-end min-w-0 [&:empty]:hidden"}),t[4]=c,t[5]=d):d=t[5];let m;return t[6]!==o||t[7]!==a||t[8]!==d?(m=s.jsx("div",{className:"dark",children:s.jsxs("header",{className:"sticky top-0 z-50 h-12 bg-background flex items-center px-4 shrink-0",children:[o,a,d]})}),t[6]=o,t[7]=a,t[8]=d,t[9]=m):m=t[9],m}function kr({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,l]=_r({defaultProp:e,onChange:n}),o=t!==void 0,i=o?t:r,a=gt(n),c=w.useCallback(d=>{if(o){const f=typeof d=="function"?d(t):d;f!==t&&a(f)}else l(d)},[o,t,l,a]);return[i,c]}function _r({defaultProp:t,onChange:e}){const n=w.useState(t),[r]=n,l=w.useRef(r),o=gt(e);return w.useEffect(()=>{l.current!==r&&(o(r),l.current=r)},[r,l,o]),n}function zr(t){const e=N.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=s.jsx(Pe.Root,{"data-slot":"drawer",...n}),e[2]=n,e[3]=r):r=e[3],r}function $r(t){const e=N.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=s.jsx(Pe.Trigger,{"data-slot":"drawer-trigger",...n}),e[2]=n,e[3]=r):r=e[3],r}function Ir(t){const e=N.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=s.jsx(Pe.Portal,{"data-slot":"drawer-portal",...n}),e[2]=n,e[3]=r):r=e[3],r}function Or(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.jsx(Pe.Overlay,{"data-slot":"drawer-overlay",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Pr(t){const e=N.c(12);let n,r,l;e[0]!==t?({className:r,children:n,...l}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=l):(n=e[1],r=e[2],l=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Or,{}),e[4]=o):o=e[4];let i;e[5]!==r?(i=z("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",r),e[5]=r,e[6]=i):i=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=a):a=e[7];let c;return e[8]!==n||e[9]!==l||e[10]!==i?(c=s.jsxs(Ir,{"data-slot":"drawer-portal",children:[o,s.jsxs(Pe.Content,{"data-slot":"drawer-content",className:i,...l,children:[a,n]})]}),e[8]=n,e[9]=l,e[10]=i,e[11]=c):c=e[11],c}function Tr(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("flex flex-col gap-1.5 px-4 py-2",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.jsx("div",{"data-slot":"drawer-header",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Ar(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let l;e[3]!==n?(l=z("text-foreground font-semibold",n),e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=s.jsx(Pe.Title,{"data-slot":"drawer-title",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}const ns=w.createContext({setOpen:()=>{}}),Mr=()=>w.useContext(ns),Er=t=>{const e=N.c(25);let n,r,l,o,i;e[0]!==t?({children:n,defaultOpen:r,open:o,onOpenChange:l,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=l,e[4]=o,e[5]=i):(n=e[1],r=e[2],l=e[3],o=e[4],i=e[5]);const a=r??!1;let c;e[6]!==l||e[7]!==o||e[8]!==a?(c={prop:o,defaultProp:a,onChange:l},e[6]=l,e[7]=o,e[8]=a,e[9]=c):c=e[9];const[d,m]=kr(c);let f;e[10]!==m?(f={setOpen:m},e[10]=m,e[11]=f):f=e[11];let u;e[12]!==n||e[13]!==d||e[14]!==i||e[15]!==m?(u=s.jsx(zr,{open:d,onOpenChange:m,...i,children:n}),e[12]=n,e[13]=d,e[14]=i,e[15]=m,e[16]=u):u=e[16];let p;e[17]!==d||e[18]!==i||e[19]!==m||e[20]!==u?(p=s.jsx(tn,{open:d,onOpenChange:m,...i,children:u}),e[17]=d,e[18]=i,e[19]=m,e[20]=u,e[21]=p):p=e[21];let x;return e[22]!==f||e[23]!==p?(x=s.jsx(ns.Provider,{value:f,children:p}),e[22]=f,e[23]=p,e[24]=x):x=e[24],x},Lr=t=>{const{children:e,title:n,...r}=t,l=De(),{className:o,...i}=r;return l?s.jsxs(Pr,{...i,children:[s.jsx(Tr,{className:"hidden",children:s.jsx(Ar,{children:n})}),s.jsx("div",{className:z("flex flex-col gap-2 p-2 py-4",o),children:e})]}):s.jsx(en,{...r,children:e})},Dr=t=>{const{children:e,...n}=t,{setOpen:r}=Mr(),l=De(),{className:o,...i}=n;return l?s.jsx("div",{...i,onClick:a=>{r(!1);const{onClick:c}=i;c?.(a)},className:z("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),children:e}):s.jsx(sn,{...n,children:e})},Rr=t=>{const e=N.c(7);let n,r;e[0]!==t?({children:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);const l=De();let o;return e[3]!==n||e[4]!==l||e[5]!==r?(o=l?s.jsx($r,{asChild:!0,children:n}):s.jsx(Qs,{...r,children:n}),e[3]=n,e[4]=l,e[5]=r,e[6]=o):o=e[6],o},Hr=t=>{const e=N.c(7);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);const l=De();let o;return e[3]!==n||e[4]!==l||e[5]!==r?(o=l?s.jsx(ft,{className:z(n),...r}):s.jsx(ft,{className:z(n),...r}),e[3]=n,e[4]=l,e[5]=r,e[6]=o):o=e[6],o};function Ur(t){const e=N.c(11),{user:n,trigger:r,align:l,children:o}=t,i=l===void 0?"start":l;let a;e[0]!==r||e[1]!==n?(a=r(n),e[0]=r,e[1]=n,e[2]=a):a=e[2];let c;e[3]!==a?(c=s.jsx(Rr,{asChild:!0,children:s.jsx("div",{children:a})}),e[3]=a,e[4]=c):c=e[4];let d;e[5]!==i||e[6]!==o?(d=s.jsx(Lr,{side:"top",align:i,className:"md:w-[240px]",children:o}),e[5]=i,e[6]=o,e[7]=d):d=e[7];let m;return e[8]!==c||e[9]!==d?(m=s.jsxs(Er,{children:[c,d]}),e[8]=c,e[9]=d,e[10]=m):m=e[10],m}function Br(t){const e=N.c(8),{children:n,onClick:r,className:l,asChild:o}=t;let i;e[0]!==o||e[1]!==n||e[2]!==r?(i=o?n:s.jsx("button",{type:"button",className:"flex items-center gap-2 text-sm w-full cursor-pointer",onClick:r,children:n}),e[0]=o,e[1]=n,e[2]=r,e[3]=i):i=e[3];let a;return e[4]!==o||e[5]!==l||e[6]!==i?(a=s.jsx(Dr,{asChild:o,className:l,children:i}),e[4]=o,e[5]=l,e[6]=i,e[7]=a):a=e[7],a}function Fr(t){const e=N.c(2),{className:n}=t;let r;return e[0]!==n?(r=s.jsx(Hr,{className:n}),e[0]=n,e[1]=r):r=e[1],r}function Wr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const Ce=Object.assign(Ur,{Item:Br,Separator:Fr,Skeleton:Wr});function Vr(t){const e=N.c(49),{user:n,userImage:r}=t,[l,o]=w.useState(!1),[i,a]=w.useState(!1);let c;e[0]!==n.email||e[1]!==n.id||e[2]!==n.name?(c=()=>{const B=`ID: ${n.id}
|
|
4
|
-
Name: ${n.name||"N/A"}
|
|
5
|
-
Email: ${n.email}`;navigator.clipboard.writeText(B),a(!0),ye.success("User info copied to clipboard"),setTimeout(()=>a(!1),2e3)},e[0]=n.email,e[1]=n.id,e[2]=n.name,e[3]=c):c=e[3];const d=c;let m;e[4]!==n.email||e[5]!==n.name||e[6]!==r?(m=()=>s.jsx(ke,{url:r,fallback:n.name||n.email||"U",shape:"circle",size:"sm",className:"cursor-pointer hover:ring-2 ring-muted-foreground transition-all h-7 w-7"}),e[4]=n.email,e[5]=n.name,e[6]=r,e[7]=m):m=e[7];const f=n.name||n.email||"U";let u;e[8]!==f||e[9]!==r?(u=s.jsx(ke,{url:r,fallback:f,shape:"circle",size:"sm"}),e[8]=f,e[9]=r,e[10]=u):u=e[10];const p=n.name||"User";let x;e[11]!==p?(x=s.jsx("div",{className:"text-sm font-medium truncate",children:p}),e[11]=p,e[12]=x):x=e[12];let h;e[13]!==n.email?(h=s.jsx("div",{className:"text-xs text-muted-foreground truncate",children:n.email}),e[13]=n.email,e[14]=h):h=e[14];let g;e[15]!==x||e[16]!==h?(g=s.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[x,h]}),e[15]=x,e[16]=h,e[17]=g):g=e[17];let j;e[18]!==i?(j=s.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:i?s.jsx(Me,{size:16,className:"text-green-600"}):s.jsx(It,{size:16,className:"text-muted-foreground"})}),e[18]=i,e[19]=j):j=e[19];let b;e[20]!==u||e[21]!==g||e[22]!==j?(b=s.jsxs("div",{className:"group flex items-center gap-3 w-full py-1",children:[u,g,j]}),e[20]=u,e[21]=g,e[22]=j,e[23]=b):b=e[23];let v;e[24]!==d||e[25]!==b?(v=s.jsx(Ce.Item,{onClick:d,children:b}),e[24]=d,e[25]=b,e[26]=v):v=e[26];let y;e[27]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(Ce.Separator,{}),e[27]=y):y=e[27];let C,S;e[28]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsxs(Ce.Item,{onClick:()=>o(!0),children:[s.jsx(rn,{className:"text-muted-foreground",size:18}),"Profile Settings"]}),S=s.jsx(Ce.Separator,{}),e[28]=C,e[29]=S):(C=e[28],S=e[29]);let _;e[30]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(ht,{className:"w-4 h-4 text-muted-foreground"}),e[30]=_):_=e[30];let O;e[31]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(Ce.Item,{asChild:!0,children:s.jsxs("a",{href:"https://github.com/decocms/admin",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[_,"decocms/admin",s.jsx(ut,{size:18,className:"text-muted-foreground ml-auto"})]})}),e[31]=O):O=e[31];let k;e[32]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(nn,{className:"text-muted-foreground",size:18}),e[32]=k):k=e[32];let I,$;e[33]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(Ce.Item,{asChild:!0,children:s.jsxs("a",{href:"https://decocms.com",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[k,"Homepage",s.jsx(ut,{size:18,className:"ml-auto text-muted-foreground"})]})}),$=s.jsx(Ce.Separator,{}),e[33]=I,e[34]=$):(I=e[33],$=e[34]);let M,A,U;e[35]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsxs(Ce.Item,{onClick:Gr,children:[s.jsx(Ft,{size:18,className:"text-muted-foreground"}),"Log out"]}),A=s.jsx(Ce.Separator,{}),U=s.jsxs("div",{className:"px-2 py-1.5 text-[11px] text-muted-foreground/75",children:["v","2.113.1"]}),e[35]=M,e[36]=A,e[37]=U):(M=e[35],A=e[36],U=e[37]);let L;e[38]!==v||e[39]!==m||e[40]!==n?(L=s.jsxs(Ce,{user:n,trigger:m,align:"end",children:[v,y,C,S,O,I,$,M,A,U]}),e[38]=v,e[39]=m,e[40]=n,e[41]=L):L=e[41];let T;e[42]!==l||e[43]!==n||e[44]!==r?(T=l&&s.jsx(Jt,{open:l,onOpenChange:o,user:n,userImage:r}),e[42]=l,e[43]=n,e[44]=r,e[45]=T):T=e[45];let E;return e[46]!==L||e[47]!==T?(E=s.jsxs(s.Fragment,{children:[L,T]}),e[46]=L,e[47]=T,e[48]=E):E=e[48],E}function Gr(){return he.signOut()}function Kr(){const t=N.c(7),{data:e}=he.useSession();if(!e?.user){let c;return t[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(ke,{url:void 0,fallback:"U",shape:"circle",size:"sm",className:"cursor-pointer h-7 w-7",muted:!0}),t[0]=c):c=t[0],c}const n=e.user,r=n.name??void 0;let l;t[1]!==r||t[2]!==n?(l={...n,name:r},t[1]=r,t[2]=n,t[3]=l):l=t[3];const o=l,i=n.image;let a;return t[4]!==i||t[5]!==o?(a=s.jsx(Vr,{user:o,userImage:i}),t[4]=i,t[5]=o,t[6]=a):a=t[6],a}function Zr(){const t=N.c(2),n=Ge().location.href;let r;return t[0]!==n?(r=s.jsx(ps,{to:"/login",search:{next:n},replace:!0}),t[0]=n,t[1]=r):r=t[1],r}function qr(t){const e=N.c(6),{children:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(ms,{children:s.jsx(jt,{})}),e[0]=r):r=e[0];let l;e[1]!==n?(l=s.jsx(fs,{children:n}),e[1]=n,e[2]=l):l=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(us,{children:s.jsx(Zr,{})}),e[3]=o):o=e[3];let i;return e[4]!==l?(i=s.jsxs(s.Fragment,{children:[r,l,o]}),e[4]=l,e[5]=i):i=e[5],i}function Yr(t){const e=N.c(5),{children:n,className:r}=t;let l;e[0]!==r?(l=z("fixed top-0 left-0 right-0 z-20 bg-background flex items-center w-full h-12 border-b border-border",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==n||e[3]!==l?(o=s.jsx("div",{className:l,children:n}),e[2]=n,e[3]=l,e[4]=o):o=e[4],o}function Jr(t){const e=N.c(5),{children:n,className:r}=t;let l;e[0]!==r?(l=z("flex items-center justify-center px-2.5 h-full border-r border-border",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==n||e[3]!==l?(o=s.jsx("div",{className:l,children:n}),e[2]=n,e[3]=l,e[4]=o):o=e[4],o}function Xr(t){const e=N.c(5),{children:n,className:r}=t;let l;e[0]!==r?(l=z("flex items-center gap-2 px-2 h-full",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==n||e[3]!==l?(o=s.jsx("div",{className:l,children:n}),e[2]=n,e[3]=l,e[4]=o):o=e[4],o}function Qr(t){const e=N.c(5),{children:n,className:r}=t;let l;e[0]!==r?(l=z("flex items-center gap-2 px-2 h-full flex-1",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==n||e[3]!==l?(o=s.jsx("div",{className:l,children:n}),e[2]=n,e[3]=l,e[4]=o):o=e[4],o}function el(t){const e=N.c(5),{children:n,className:r}=t;let l;e[0]!==r?(l=z("flex items-center gap-2 px-2 h-full ml-auto",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==n||e[3]!==l?(o=s.jsx("div",{className:l,children:n}),e[2]=n,e[3]=l,e[4]=o):o=e[4],o}function tl(){const t=N.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex items-center justify-center px-2 h-full border-r border-border",children:s.jsx("div",{className:"w-8 h-8 bg-muted rounded-md animate-pulse"})}),t[0]=e):e=t[0];let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex items-center gap-2 px-2 h-full",children:s.jsx("div",{className:"w-32 h-6 bg-muted rounded-md animate-pulse"})}),t[1]=n):n=t[1];let r;return t[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("div",{className:"fixed top-0 left-0 right-0 z-20 bg-background flex items-center w-full h-12 border-b border-border",children:[e,n,s.jsx("div",{className:"flex items-center gap-2 px-2 h-full ml-auto",children:s.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"})})]}),t[2]=r):r=t[2],r}const Ue=Object.assign(Yr,{Sidebar:Jr,Left:Xr,Center:Qr,Right:el,Skeleton:tl});function rs(){const t=N.c(3),{toggleSidebar:e}=Ye();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Bt,{className:"text-muted-foreground/85 group-hover:text-foreground transition-colors",size:18}),t[0]=n):n=t[0];let r;return t[1]!==e?(r=s.jsx(s.Fragment,{children:s.jsx(re,{onClick:e,size:"icon",variant:"ghost",className:"w-7 h-7 rounded-md",children:n})}),t[1]=e,t[2]=r):r=t[2],r}rs.Skeleton=function(){return s.jsx("div",{className:"w-7 h-7 bg-muted rounded-md animate-pulse"})};function sl({showSidebarToggle:t=!1,showOrgSwitcher:e=!1,showDecoChat:n=!1,disableDecoChat:r=!1}){const[l,o]=Ke(),i=w.useRef(r);r&&l&&i.current!==r&&o(!1),i.current=r;const a=()=>{r||o(c=>!c)};return s.jsxs(Ue,{children:[t&&s.jsx(Ue.Sidebar,{children:s.jsx(rs,{})}),s.jsx(Ue.Left,{children:e&&s.jsx(w.Suspense,{fallback:s.jsx(tt.Skeleton,{}),children:s.jsx(tt,{})})}),s.jsxs(Ue.Right,{className:"gap-2",children:[n&&!r&&s.jsxs(re,{size:"sm",variant:"default",onClick:a,className:"h-7 gap-2",children:[s.jsx(Nt,{size:16}),"Chat"]}),s.jsx(Kr,{})]})]})}function nl(t){const e=N.c(10),{children:n,className:r}=t,[,l]=w.useTransition();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=Tt.decoChatPanelWidth(),e[0]=o):o=e[0];const[i,a]=Pt(o,30);let c;e[1]!==a?(c=u=>l(()=>a(u)),e[1]=a,e[2]=c):c=e[2];const d=c;let m;e[3]!==r?(m=z("min-w-0",r),e[3]=r,e[4]=m):m=e[4];let f;return e[5]!==i||e[6]!==n||e[7]!==d||e[8]!==m?(f=s.jsx(At,{defaultSize:i,minSize:20,className:m,onResize:d,children:n}),e[5]=i,e[6]=n,e[7]=d,e[8]=m,e[9]=f):f=e[9],f}function rl(t){const e=N.c(5),{children:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=Tt.sidebarOpen(),e[0]=r):r=e[0];const[l,o]=Pt(r,!0);let i;return e[1]!==n||e[2]!==o||e[3]!==l?(i=s.jsx(gn,{open:l,onOpenChange:o,children:n}),e[1]=n,e[2]=o,e[3]=l,e[4]=i):i=e[4],i}function ll(t){const e=N.c(6),{disableChat:n}=t,r=n===void 0?!1:n,[l]=Ke();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(At,{className:"bg-background",children:s.jsx(bt,{})}),e[0]=o):o=e[0];let i;e[1]!==l||e[2]!==r?(i=!r&&s.jsxs(s.Fragment,{children:[s.jsx(ln,{withHandle:l}),s.jsx(nl,{className:z(l?"max-w-none":"max-w-0"),children:s.jsx(cn,{})})]}),e[1]=l,e[2]=r,e[3]=i):i=e[3];let a;return e[4]!==i?(a=s.jsxs(on,{direction:"horizontal",children:[o,i]}),e[4]=i,e[5]=a):a=e[5],a}function ol(){const{org:t,project:e}=st({strict:!1}),n=Ge(),[r,l]=w.useState(!1),o=n.location.pathname===`/${t}/${e}`||n.location.pathname===`/${t}/${e}/`,i=e??ne,{data:a}=xs({queryKey:hs.activeOrganization(t),queryFn:async()=>{if(!t)return null;const{data:d}=await he.organization.setActive({organizationSlug:t});return{org:d,project:{slug:i,isOrgAdmin:i===ne}}},gcTime:1/0,staleTime:1/0,refetchOnWindowFocus:!1,refetchOnMount:!1});if(!a)return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(sl,{}),s.jsx("div",{className:"pt-12",children:s.jsx(bt,{})})]});if(!a.org)return window.location.pathname!=="/"&&(window.location.href="/"),null;const c={...a,project:{...a.project,slug:i,isOrgAdmin:i===ne}};return s.jsxs(gs,{...c,children:[s.jsx(rl,{children:s.jsxs("div",{className:"flex flex-col h-screen",style:{"--project-topbar-height":i===ne?"0px":"48px"},children:[s.jsx("style",{children:`
|
|
6
|
-
[data-slot="sidebar-container"] {
|
|
7
|
-
top: 0 !important;
|
|
8
|
-
}
|
|
9
|
-
[data-slot="sidebar-inner"] {
|
|
10
|
-
padding-top: 0 !important;
|
|
11
|
-
}
|
|
12
|
-
`}),s.jsx(oe.Provider,{children:s.jsxs(vn,{className:"flex-1 bg-sidebar",style:{"--sidebar-width":"13rem","--sidebar-width-mobile":"11rem"},children:[s.jsx(cr,{onCreateProject:()=>l(!0)}),s.jsx(yn,{className:"flex flex-col",children:s.jsxs(Xs,{children:[s.jsx(Cr,{}),s.jsx("div",{className:"flex-1 overflow-hidden",children:s.jsx(ll,{disableChat:o})})]})})]})})]})}),s.jsx(wt,{open:r,onOpenChange:l})]})}function Wo(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(qr,{children:s.jsx(w.Suspense,{fallback:s.jsx(jt,{}),children:s.jsx(ol,{})})}),t[0]=e):e=t[0],e}export{Wo as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as B,j as r,r as F,u as O,b as W,n as Q,K as Y}from"./index-ClncOz6N.js";import"./index-Dg7j7nF8.js";import{C as G,a as J}from"./collection-table-wrapper-D8mRH9XX.js";import{C as X,E as I}from"./empty-state-BvzVGw0j.js";import{E as Z}from"./error-boundary-B0-C3nR-.js";import{P as h}from"./index-CSfvtoe4.js";import{u as ee,U as te}from"./use-list-state-58FQ5_m7.js";import{f as re}from"./format-time-CMKyl-GC.js";import{a as se,u as oe}from"./constants-BHcnwzXS.js";import{B as ie,a as ae,b as le,c as ne}from"./breadcrumb-KvFHoKN7.js";import{B as f}from"./badge-DGPPcvVD.js";import{i as me}from"./AlertCircle-bZ_a8hW_.js";import{c as ce}from"./AlertOctagon-g_tWXJrL.js";import{n as V}from"./CheckDone01-DpB-5lWR.js";import{i as pe}from"./Check-E8-Inf76.js";import{s as de}from"./Clock-ElxTVbMS.js";import{i as R}from"./Loading01-Du9ChcBO.js";import{u as ue}from"./use-deco-chat-open-D2iAkBUE.js";import"./button-CcxsPygM.js";import"./popover-mZJnuJjI.js";import"./spinner-BMxXfTiG.js";import"./tooltip-TMQButig.js";import"./index-BDio7_0T.js";import"./use-mcp-prompts-Cugr7S4A.js";import"./useQuery-BSd1v_RX.js";import"./dialog-Rb8gAr_X.js";import"./X-zQXau9tc.js";import"./form-BoeJzVfE.js";import"./label-Bl-YFbel.js";import"./input-BdH38qw4.js";import"./integration-icon-Bw_I-XAE.js";import"./Container-8z-xyt04.js";import"./usage-B8eRkRZY.js";import"./ArrowUp-BtMmVpE7.js";import"./ChevronDown-CtTw1zlt.js";import"./Edit01-CSgI_vqG.js";import"./Users03-IogkUnji.js";import"./XCircle-B8PCL4R4.js";import"./AlertTriangle-CGGjQU9b.js";import"./ArrowLeft-BbVcfdiE.js";import"./use-copy-QNK64gRO.js";import"./Code01-F0FnnpDN.js";import"./use-virtual-mcp-CSTx0yIN.js";import"./use-connection-DD4p_Qxm.js";import"./useMutation-CeUP6TdZ.js";import"./SearchMd-B9pv8N9E.js";import"./use-create-virtual-mcp-DTZkMOkn.js";import"./ChevronRight-Cj97ppFv.js";import"./marked.esm-BaswSlok.js";import"./markdown-CzkeFZ5X.js";import"./Copy01-DKHGVRMd.js";import"./tools-list-m2LGQ8uO.js";import"./card-k6wylZpL.js";import"./Eye-DPrkOx1m.js";import"./Globe02-DEZv7rrz.js";import"./RefreshCw01-Be9PrKJk.js";import"./layout-aRIgHMvp.js";import"./generate-id-Dyweu44Y.js";import"./Trash01-DT85aU53.js";import"./dropdown-menu-D5LbTa4P.js";import"./Grid01-xeO6ixb6.js";import"./List-CEuiHx2u.js";import"./table-C5Cvp27H.js";import"./avatar-A9KYWJyz.js";import"./use-view-mode-DJpnO-MR.js";import"./use-mobile-BttsZXmR.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-llm-Dxppw3BS.js";import"./use-binding-op5oWkHb.js";import"./binder-BXFbhA2G.js";import"./localstorage-keys-BX9jvEU1.js";import"./select-CixKYbFw.js";import"./File06-DYvRHz1R.js";import"./Image01-BkoRO_9d.js";import"./RefreshCcw01-OjrTubY1.js";import"./Settings01-BPkeey3w.js";import"./useSuspenseInfiniteQuery-B9OvX_J7.js";import"./infiniteQueryObserver-DTtSISl9.js";function fe(e){const s=B.c(7),{status:a}=e;switch(a){case"in_progress":{let o;return s[0]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsxs(f,{variant:"secondary",className:"gap-1",children:[r.jsx(R,{size:11,className:"animate-spin"}),"Running"]}),s[0]=o):o=s[0],o}case"completed":{let o;return s[1]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsxs(f,{variant:"success",className:"gap-1",children:[r.jsx(pe,{size:11}),"Completed"]}),s[1]=o):o=s[1],o}case"requires_action":{let o;return s[2]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsxs(f,{variant:"outline",className:"gap-1 text-blue-600 border-blue-600/40",children:[r.jsx(me,{size:11}),"Waiting for input"]}),s[2]=o):o=s[2],o}case"failed":{let o;return s[3]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsxs(f,{variant:"destructive",className:"gap-1",children:[r.jsx(ce,{size:11}),"Failed"]}),s[3]=o):o=s[3],o}case"expired":{let o;return s[4]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsxs(f,{variant:"outline",className:"gap-1 text-warning border-warning/40",children:[r.jsx(de,{size:11}),"Timed out"]}),s[4]=o):o=s[4],o}default:{let o;return s[5]!==a?(o=r.jsx(f,{variant:"secondary",className:"gap-1",children:a}),s[5]=a,s[6]=o):o=s[6],o}}}function he(){const e=B.c(49),{org:s,project:a,locator:o}=O();let x;e[0]!==s.id?(x={connectionId:se,orgId:s.id},e[0]=s.id,e[1]=x):x=e[1];const g=oe(x),v=W(),{switchToThread:k}=ue();let j;e[2]!==s.slug?(j={namespace:s.slug,resource:"tasks",defaultSortKey:"updated_at",defaultViewMode:"table"},e[2]=s.slug,e[3]=j):j=e[3];const t=ee(j);let l;e[4]!==o?(l=Y.taskThreads(o),e[4]=o,e[5]=l):l=e[5];let n;e[6]!==g?(n=async()=>{if(!g)throw new Error("MCP client is not available");const i=await g.callTool({name:"COLLECTION_THREADS_LIST",arguments:{limit:100,offset:0}});return(i.structuredContent??i).items??[]},e[6]=g,e[7]=n):n=e[7];let y;e[8]!==l||e[9]!==n?(y={queryKey:l,queryFn:n,staleTime:3e4},e[8]=l,e[9]=n,e[10]=y):y=e[10];const{data:D}=Q(y);let S;if(e[11]!==D||e[12]!==t){const i=D.filter(Se),z=t.searchTerm?i.filter(M=>M.title.toLowerCase().includes(t.searchTerm.toLowerCase())):i;let T;e[14]!==t?(T=(M,H)=>{const{sortKey:L,sortDirection:P}=t;if(!L||!P)return 0;const U=String(M[L]??""),q=String(H[L]??""),$=U.localeCompare(q);return P==="asc"?$:-$},e[14]=t,e[15]=T):T=e[15],S=[...z].sort(T),e[11]=D,e[12]=t,e[13]=S}else S=e[13];const K=S;let b;e[16]!==v||e[17]!==s.slug||e[18]!==a.slug||e[19]!==k?(b=async i=>{await k(i.id),v({to:"/$org/$project",params:{org:s.slug,project:a.slug}})},e[16]=v,e[17]=s.slug,e[18]=a.slug,e[19]=k,e[20]=b):b=e[20];const E=b;let _;e[21]===Symbol.for("react.memo_cache_sentinel")?(_=[{id:"title",header:"Title",render:ye,cellClassName:"flex-1 min-w-0",sortable:!0},{id:"status",header:"Status",render:je,cellClassName:"w-40 shrink-0",sortable:!0},{id:"created_by",header:"Created by",render:ge,cellClassName:"w-32 shrink-0"},{id:"updated_at",header:"Updated",render:xe,cellClassName:"max-w-24 w-24 shrink-0",sortable:!0}],e[21]=_):_=e[21];const A=_;let w;e[22]===Symbol.for("react.memo_cache_sentinel")?(w=r.jsx(h.Header.Left,{children:r.jsx(ie,{children:r.jsx(ae,{children:r.jsx(le,{children:r.jsx(ne,{children:"Tasks"})})})})}),e[22]=w):w=e[22];let C;e[23]===Symbol.for("react.memo_cache_sentinel")?(C=[{id:"title",label:"Title"},{id:"status",label:"Status"},{id:"updated_at",label:"Updated"}],e[23]=C):C=e[23];let m;e[24]!==t.handleSort||e[25]!==t.setViewMode||e[26]!==t.sortDirection||e[27]!==t.sortKey||e[28]!==t.viewMode?(m=r.jsxs(h.Header,{children:[w,r.jsx(h.Header.Right,{children:r.jsx(G,{viewMode:t.viewMode,onViewModeChange:t.setViewMode,sortKey:t.sortKey,sortDirection:t.sortDirection,onSort:t.handleSort,sortOptions:C})})]}),e[24]=t.handleSort,e[25]=t.setViewMode,e[26]=t.sortDirection,e[27]=t.sortKey,e[28]=t.viewMode,e[29]=m):m=e[29];let c;e[30]!==t?(c=i=>{i.key==="Escape"&&(t.setSearch(""),i.target.blur())},e[30]=t,e[31]=c):c=e[31];let p;e[32]!==t.search||e[33]!==t.setSearch||e[34]!==c?(p=r.jsx(X,{value:t.search,onChange:t.setSearch,placeholder:"Search tasks...",onKeyDown:c}),e[32]=t.search,e[33]=t.setSearch,e[34]=c,e[35]=p):p=e[35];let d;e[36]!==t.search?(d=t.search?r.jsx(I,{image:r.jsx(V,{size:36,className:"text-muted-foreground"}),title:"No tasks found",description:`No tasks match "${t.search}"`}):r.jsx(I,{image:r.jsx("div",{className:"flex items-center justify-center w-16 h-16 rounded-full bg-muted",children:r.jsx(V,{size:32,className:"text-muted-foreground"})}),title:"No tasks yet",description:"Tasks will appear here when agents start processing work."}),e[36]=t.search,e[37]=d):d=e[37];let u;e[38]!==t.handleSort||e[39]!==t.sortDirection||e[40]!==t.sortKey||e[41]!==E||e[42]!==d||e[43]!==K?(u=r.jsx(h.Content,{children:r.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:r.jsx(J,{columns:A,data:K,isLoading:!1,sortKey:t.sortKey,sortDirection:t.sortDirection,onSort:t.handleSort,onRowClick:E,emptyState:d})})}),e[38]=t.handleSort,e[39]=t.sortDirection,e[40]=t.sortKey,e[41]=E,e[42]=d,e[43]=K,e[44]=u):u=e[44];let N;return e[45]!==m||e[46]!==p||e[47]!==u?(N=r.jsxs(h,{children:[m,p,u]}),e[45]=m,e[46]=p,e[47]=u,e[48]=N):N=e[48],N}function xe(e){return r.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:e.updated_at?re(new Date(e.updated_at)):"—"})}function ge(e){return r.jsx(te,{id:e.created_by,size:"3xs"})}function je(e){return r.jsx(fe,{status:e.status??"completed"})}function ye(e){return r.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:e.title})}function Se(e){return!e.hidden}function Ft(){const e=B.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=r.jsx(Z,{children:r.jsx(F.Suspense,{fallback:r.jsx("div",{className:"flex h-full items-center justify-center",children:r.jsx(R,{size:32,className:"animate-spin text-muted-foreground"})}),children:r.jsx(he,{})})}),e[0]=s):s=e[0],s}export{Ft as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,at as H,j as c,aH as J,a9 as K,av as C,ax as S,aI as Q,an as W,ar as Z,aG as ee,aJ as G,aP as te,aQ as oe,ay as re,aU as ne,aR as se,c as j}from"./index-ClncOz6N.js";import{R as ae}from"./index-BDio7_0T.js";import{c as ie}from"./button-CcxsPygM.js";var[O]=re("Tooltip",[G]),D=G(),$="TooltipProvider",le=700,A="tooltip.open",[ce,k]=O($),F=o=>{const{__scopeTooltip:e,delayDuration:t=le,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=o,l=i.useRef(!0),d=i.useRef(!1),a=i.useRef(0);return i.useEffect(()=>{const p=a.current;return()=>window.clearTimeout(p)},[]),c.jsx(ce,{scope:e,isOpenDelayedRef:l,delayDuration:t,onOpen:i.useCallback(()=>{window.clearTimeout(a.current),l.current=!1},[]),onClose:i.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:i.useCallback(p=>{d.current=p},[]),disableHoverableContent:n,children:s})};F.displayName=$;var R="Tooltip",[ue,_]=O(R),z=o=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:l,delayDuration:d}=o,a=k(R,o.__scopeTooltip),p=D(e),[u,v]=i.useState(null),x=W(),f=i.useRef(0),h=l??a.disableHoverableContent,m=d??a.delayDuration,g=i.useRef(!1),[y,T]=Z({prop:r,defaultProp:n??!1,onChange:N=>{N?(a.onOpen(),document.dispatchEvent(new CustomEvent(A))):a.onClose(),s?.(N)},caller:R}),w=i.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),P=i.useCallback(()=>{window.clearTimeout(f.current),f.current=0,g.current=!1,T(!0)},[T]),E=i.useCallback(()=>{window.clearTimeout(f.current),f.current=0,T(!1)},[T]),M=i.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{g.current=!0,T(!0),f.current=0},m)},[m,T]);return i.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),c.jsx(ee,{...p,children:c.jsx(ue,{scope:e,contentId:x,open:y,stateAttribute:w,trigger:u,onTriggerChange:v,onTriggerEnter:i.useCallback(()=>{a.isOpenDelayedRef.current?M():P()},[a.isOpenDelayedRef,M,P]),onTriggerLeave:i.useCallback(()=>{h?E():(window.clearTimeout(f.current),f.current=0)},[E,h]),onOpen:P,onClose:E,disableHoverableContent:h,children:t})})};z.displayName=R;var L="TooltipTrigger",B=i.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=_(L,t),s=k(L,t),l=D(t),d=i.useRef(null),a=H(e,d,n.onTriggerChange),p=i.useRef(!1),u=i.useRef(!1),v=i.useCallback(()=>p.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),c.jsx(J,{asChild:!0,...l,children:c.jsx(K.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:a,onPointerMove:C(o.onPointerMove,x=>{x.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),u.current=!0)}),onPointerLeave:C(o.onPointerLeave,()=>{n.onTriggerLeave(),u.current=!1}),onPointerDown:C(o.onPointerDown,()=>{n.open&&n.onClose(),p.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:C(o.onFocus,()=>{p.current||n.onOpen()}),onBlur:C(o.onBlur,n.onClose),onClick:C(o.onClick,n.onClose)})})});B.displayName=L;var I="TooltipPortal",[de,pe]=O(I,{forceMount:void 0}),U=o=>{const{__scopeTooltip:e,forceMount:t,children:r,container:n}=o,s=_(I,e);return c.jsx(de,{scope:e,forceMount:t,children:c.jsx(S,{present:t||s.open,children:c.jsx(Q,{asChild:!0,container:n,children:r})})})};U.displayName=I;var b="TooltipContent",V=i.forwardRef((o,e)=>{const t=pe(b,o.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...s}=o,l=_(b,o.__scopeTooltip);return c.jsx(S,{present:r||l.open,children:l.disableHoverableContent?c.jsx(Y,{side:n,...s,ref:e}):c.jsx(fe,{side:n,...s,ref:e})})}),fe=i.forwardRef((o,e)=>{const t=_(b,o.__scopeTooltip),r=k(b,o.__scopeTooltip),n=i.useRef(null),s=H(e,n),[l,d]=i.useState(null),{trigger:a,onClose:p}=t,u=n.current,{onPointerInTransitChange:v}=r,x=i.useCallback(()=>{d(null),v(!1)},[v]),f=i.useCallback((h,m)=>{const g=h.currentTarget,y={x:h.clientX,y:h.clientY},T=ge(y,g.getBoundingClientRect()),w=me(y,T),P=Te(m.getBoundingClientRect()),E=Ce([...w,...P]);d(E),v(!0)},[v]);return i.useEffect(()=>()=>x(),[x]),i.useEffect(()=>{if(a&&u){const h=g=>f(g,u),m=g=>f(g,a);return a.addEventListener("pointerleave",h),u.addEventListener("pointerleave",m),()=>{a.removeEventListener("pointerleave",h),u.removeEventListener("pointerleave",m)}}},[a,u,f,x]),i.useEffect(()=>{if(l){const h=m=>{const g=m.target,y={x:m.clientX,y:m.clientY},T=a?.contains(g)||u?.contains(g),w=!ye(y,l);T?x():w&&(x(),p())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[a,u,l,p,x]),c.jsx(Y,{...o,ref:s})}),[ve,xe]=O(R,{isInside:!1}),he=ne("TooltipContent"),Y=i.forwardRef((o,e)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:l,...d}=o,a=_(b,t),p=D(t),{onClose:u}=a;return i.useEffect(()=>(document.addEventListener(A,u),()=>document.removeEventListener(A,u)),[u]),i.useEffect(()=>{if(a.trigger){const v=x=>{x.target?.contains(a.trigger)&&u()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[a.trigger,u]),c.jsx(te,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:v=>v.preventDefault(),onDismiss:u,children:c.jsxs(oe,{"data-state":a.stateAttribute,...p,...d,ref:e,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(he,{children:r}),c.jsx(ve,{scope:t,isInside:!0,children:c.jsx(ae,{id:a.contentId,role:"tooltip",children:n||r})})]})})});V.displayName=b;var q="TooltipArrow",X=i.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=D(t);return xe(q,t).isInside?null:c.jsx(se,{...n,...r,ref:e})});X.displayName=q;function ge(o,e){const t=Math.abs(e.top-o.y),r=Math.abs(e.bottom-o.y),n=Math.abs(e.right-o.x),s=Math.abs(e.left-o.x);switch(Math.min(t,r,n,s)){case s:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function me(o,e,t=5){const r=[];switch(e){case"top":r.push({x:o.x-t,y:o.y+t},{x:o.x+t,y:o.y+t});break;case"bottom":r.push({x:o.x-t,y:o.y-t},{x:o.x+t,y:o.y-t});break;case"left":r.push({x:o.x+t,y:o.y-t},{x:o.x+t,y:o.y+t});break;case"right":r.push({x:o.x-t,y:o.y-t},{x:o.x-t,y:o.y+t});break}return r}function Te(o){const{top:e,right:t,bottom:r,left:n}=o;return[{x:n,y:e},{x:t,y:e},{x:t,y:r},{x:n,y:r}]}function ye(o,e){const{x:t,y:r}=o;let n=!1;for(let s=0,l=e.length-1;s<e.length;l=s++){const d=e[s],a=e[l],p=d.x,u=d.y,v=a.x,x=a.y;u>r!=x>r&&t<(v-p)*(r-u)/(x-u)+p&&(n=!n)}return n}function Ce(o){const e=o.slice();return e.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),be(e)}function be(o){if(o.length<=1)return o.slice();const e=[];for(let r=0;r<o.length;r++){const n=o[r];for(;e.length>=2;){const s=e[e.length-1],l=e[e.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))e.pop();else break}e.push(n)}e.pop();const t=[];for(let r=o.length-1;r>=0;r--){const n=o[r];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))t.pop();else break}t.push(n)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var we=F,Pe=z,Ee=B,Re=U,_e=V,je=X;function Oe(o){const e=j.c(6);let t,r;e[0]!==o?({delayDuration:r,...t}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);const n=r===void 0?0:r;let s;return e[3]!==n||e[4]!==t?(s=c.jsx(we,{"data-slot":"tooltip-provider",delayDuration:n,...t}),e[3]=n,e[4]=t,e[5]=s):s=e[5],s}function ke(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(Oe,{children:c.jsx(Pe,{"data-slot":"tooltip",...t})}),e[2]=t,e[3]=r):r=e[3],r}function Ie(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(Ee,{"data-slot":"tooltip-trigger",...t}),e[2]=t,e[3]=r):r=e[3],r}function Me(o){const e=j.c(13);let t,r,n,s;e[0]!==o?({className:r,sideOffset:s,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=n,e[4]=s):(t=e[1],r=e[2],n=e[3],s=e[4]);const l=s===void 0?0:s;let d;e[5]!==r?(d=ie("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",r),e[5]=r,e[6]=d):d=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=c.jsx(je,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),e[7]=a):a=e[7];let p;return e[8]!==t||e[9]!==n||e[10]!==l||e[11]!==d?(p=c.jsx(Re,{children:c.jsxs(_e,{"data-slot":"tooltip-content",sideOffset:l,className:d,...n,children:[t,a]})}),e[8]=t,e[9]=n,e[10]=l,e[11]=d,e[12]=p):p=e[12],p}export{ke as T,Ie as a,Me as b,Oe as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as c,c as x,j as P}from"./index-ClncOz6N.js";const C=c.createContext(null);function g(e){const t=x.c(3),{value:s,children:r}=e,l=s;let n;return t[0]!==r||t[1]!==l?(n=P.jsx(C.Provider,{value:l,children:r}),t[0]=r,t[1]=l,t[2]=n):n=t[2],n}function d(e){const t=c.useContext(C);if(!t)throw new Error("usePluginContext must be used within a PluginContextProvider");if(!t.connectionId||!t.connection||!t.toolCaller)throw new Error("usePluginContext requires a valid connection. Use { partial: true } in empty state components.");return t}const E=c.createContext(null);function h(e){const t=x.c(7),{children:s}=e,[r,l]=c.useState(null),[n,u]=c.useState(null),[i,a]=c.useState(null);let o;t[0]!==n||t[1]!==r||t[2]!==i?(o={leftEl:r,centerEl:n,rightEl:i,setLeftEl:l,setCenterEl:u,setRightEl:a},t[0]=n,t[1]=r,t[2]=i,t[3]=o):o=t[3];let f;return t[4]!==s||t[5]!==o?(f=P.jsx(E.Provider,{value:o,children:s}),t[4]=s,t[5]=o,t[6]=f):f=t[6],f}function v(){const e=x.c(10),t=c.useContext(E);let s;e[0]!==t?(s=o=>t?.setLeftEl(o),e[0]=t,e[1]=s):s=e[1];const r=s;let l;e[2]!==t?(l=o=>t?.setCenterEl(o),e[2]=t,e[3]=l):l=e[3];const n=l;let u;e[4]!==t?(u=o=>t?.setRightEl(o),e[4]=t,e[5]=u):u=e[5];const i=u;if(!t)return null;let a;return e[6]!==n||e[7]!==r||e[8]!==i?(a={leftRef:r,centerRef:n,rightRef:i},e[6]=n,e[7]=r,e[8]=i,e[9]=a):a=e[9],a}export{g as P,h as T,v as a,d as u};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{r as T,c as j,j as l,T as z,M as E,J as H,U as L,X as V,W as D,Q as I}from"./index-ClncOz6N.js";import{I as M}from"./input-BdH38qw4.js";import{i as R}from"./X-zQXau9tc.js";import{c as b}from"./button-CcxsPygM.js";import{i as W}from"./SearchMd-B9pv8N9E.js";const O=({size:n=24,color:e="currentColor",...t})=>T.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},T.createElement("path",{d:"m22.7 13.5-2-2-2 2M21 12a9 9 0 1 1-1.245-4.57M12 7v5l3 2"}));O.displayName="ClockRewind";const _=({size:n=24,color:e="currentColor",...t})=>T.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},T.createElement("path",{d:"m10 15-3.075 3.114c-.43.434-.644.651-.828.666a.5.5 0 0 1-.421-.172c-.12-.14-.12-.446-.12-1.056v-1.56c0-.548-.449-.944-.99-1.024v0a3 3 0 0 1-2.534-2.533C2 12.219 2 11.96 2 11.445V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C4.28 2 5.12 2 6.8 2h7.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C19 4.28 19 5.12 19 6.8V11m0 11-2.176-1.513c-.306-.213-.46-.32-.626-.395a2.002 2.002 0 0 0-.462-.145c-.18-.033-.367-.033-.74-.033H13.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C10 18.394 10 17.834 10 16.714V14.2c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C11.52 11 12.08 11 13.2 11h5.6c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874C22 12.52 22 13.08 22 14.2v2.714c0 .932 0 1.398-.152 1.766a2 2 0 0 1-1.083 1.082c-.367.152-.833.152-1.765.152V22Z"}));_.displayName="MessageChatSquare";function Q(n){const e=j.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(H,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function A(n){const e=j.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(L,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function P(n){const e=j.c(8);let t,s;e[0]!==n?({className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("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",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=l.jsx(D,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function q(n){const e=j.c(17);let t,s,a,o;e[0]!==n?({className:s,children:t,side:o,...a}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);const c=o===void 0?"right":o;let h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=l.jsx(P,{}),e[5]=h):h=e[5];const d=c==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",i=c==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",r=c==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",v=c==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let m;e[6]!==s||e[7]!==d||e[8]!==i||e[9]!==r||e[10]!==v?(m=b("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",d,i,r,v,s),e[6]=s,e[7]=d,e[8]=i,e[9]=r,e[10]=v,e[11]=m):m=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u=l.jsxs(V,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[l.jsx(R,{className:"size-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]}),e[12]=u):u=e[12];let f;return e[13]!==t||e[14]!==a||e[15]!==m?(f=l.jsxs(A,{children:[h,l.jsxs(E,{"data-slot":"sheet-content",className:m,...a,children:[t,u]})]}),e[13]=t,e[14]=a,e[15]=m,e[16]=f):f=e[16],f}function F(n){const e=j.c(8);let t,s;e[0]!==n?({className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=l.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function J(n){const e=j.c(8);let t,s;e[0]!==n?({className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=l.jsx(z,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function Y(n){const e=j.c(8);let t,s;e[0]!==n?({className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=l.jsx(I,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function B(n){const e=j.c(24),{threads:t,activeThreadId:s,onThreadSelect:a,onClose:o,showHeader:c,showBackButton:h}=n,d=c===void 0?!0:c,i=h===void 0?!1:h,[r,v]=T.useState("");let m;e[0]!==r||e[1]!==t?(m=r.trim()?t.filter(p=>(p.title||"New chat").toLowerCase().includes(r.toLowerCase())):t,e[0]=r,e[1]=t,e[2]=m):m=e[2];const u=m;let f;e[3]!==o||e[4]!==a?(f=p=>{a(p),o&&o()},e[3]=o,e[4]=a,e[5]=f):f=e[5];const k=f;let y;e[6]!==o||e[7]!==i||e[8]!==d?(y=d&&l.jsxs("div",{className:"h-12 px-4 flex items-center justify-between border-b shrink-0",children:[l.jsx("span",{className:"text-sm font-medium",children:"Chat History"}),i&&l.jsx("button",{type:"button",onClick:o,className:"text-sm text-muted-foreground hover:text-foreground transition-colors",children:"Back to chat"})]}),e[6]=o,e[7]=i,e[8]=d,e[9]=y):y=e[9];let C;e[10]===Symbol.for("react.memo_cache_sentinel")?(C=b("px-3 py-3 border-b","shrink-0"),e[10]=C):C=e[10];let S;e[11]===Symbol.for("react.memo_cache_sentinel")?(S=l.jsx(W,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),e[11]=S):S=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=p=>v(p.target.value),e[12]=g):g=e[12];let x;e[13]!==r?(x=l.jsx("div",{className:C,children:l.jsxs("div",{className:"relative",children:[S,l.jsx(M,{type:"text",placeholder:"Search conversations...",value:r,onChange:g,className:"pl-9 h-9 text-sm"})]})}),e[13]=r,e[14]=x):x=e[14];let w;e[15]!==s||e[16]!==u||e[17]!==k||e[18]!==r?(w=l.jsx("div",{className:"flex-1 overflow-y-auto",children:u.length===0?l.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-12 px-4 text-center",children:[l.jsx("div",{className:"size-12 rounded-full bg-muted/50 flex items-center justify-center",children:l.jsx(_,{size:24,className:"text-muted-foreground"})}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-sm font-medium text-foreground",children:r?"No results found":"No conversations yet"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:r?"Try a different search term":"Start a new chat to see your history here"})]})]}):l.jsx("div",{className:"flex flex-col py-2",children:u.map(p=>{const $=p.id===s;return l.jsx("button",{type:"button",onClick:()=>k(p.id),className:b("flex items-center gap-3 px-4 py-3 text-left transition-colors hover:bg-accent/50",$&&"bg-accent/50"),children:l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:b("text-sm truncate",$?"font-medium text-foreground":"text-muted-foreground"),children:p.title||"New chat"}),l.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:new Date(p.updated_at).toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})})]})},p.id)})})}),e[15]=s,e[16]=u,e[17]=k,e[18]=r,e[19]=w):w=e[19];let N;return e[20]!==w||e[21]!==y||e[22]!==x?(N=l.jsxs(l.Fragment,{children:[y,x,w]}),e[20]=w,e[21]=y,e[22]=x,e[23]=N):N=e[23],N}function ee(n){const e=j.c(9),{open:t,onOpenChange:s,threads:a,activeThreadId:o,onThreadSelect:c}=n;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=l.jsx(F,{className:"h-12 px-4 flex flex-row items-center justify-between border-b shrink-0",children:l.jsx(J,{className:"text-sm font-medium",children:"Chat History"})}),e[0]=h):h=e[0];let d;e[1]!==o||e[2]!==c||e[3]!==a?(d=l.jsxs(q,{side:"right",className:"w-[320px] sm:w-[380px] p-0 flex flex-col",children:[h,l.jsx(B,{threads:a,activeThreadId:o,onThreadSelect:c,showHeader:!1})]}),e[1]=o,e[2]=c,e[3]=a,e[4]=d):d=e[4];let i;return e[5]!==s||e[6]!==t||e[7]!==d?(i=l.jsx(Q,{open:t,onOpenChange:s,children:d}),e[5]=s,e[6]=t,e[7]=d,e[8]=i):i=e[8],i}function te(n){const e=j.c(5),{threads:t,activeThreadId:s,onThreadSelect:a,onClose:o}=n;let c;return e[0]!==s||e[1]!==o||e[2]!==a||e[3]!==t?(c=l.jsx("div",{className:"flex flex-col h-full w-full bg-background",children:l.jsx(B,{threads:t,activeThreadId:s,onThreadSelect:a,onClose:o,showBackButton:!0})}),e[0]=s,e[1]=o,e[2]=a,e[3]=t,e[4]=c):c=e[4],c}function se(n){const e=j.c(22),{text:t,className:s,speed:a}=n,o=s===void 0?"":s,c=a===void 0?30:a,[h,d]=T.useState(!1),i=t.length/c*1e3,r=t.length,v=`${t.length}ch`;let m;e[0]!==i?(m=()=>{d(!1);const p=setTimeout(()=>{d(!0)},i);return()=>clearTimeout(p)},e[0]=i,e[1]=m):m=e[1];let u;e[2]!==i||e[3]!==t?(u=[t,i],e[2]=i,e[3]=t,e[4]=u):u=e[4],T.useEffect(m,u);let f;e[5]!==o?(f=b(o,"block overflow-hidden inline-flex"),e[5]=o,e[6]=f):f=e[6];const k=`${i}ms`;let y;e[7]!==v||e[8]!==r||e[9]!==k?(y={"--typewriter-duration":k,"--typewriter-steps":r,"--typewriter-max-width":v},e[7]=v,e[8]=r,e[9]=k,e[10]=y):y=e[10];const C=y,S=h&&"truncate";let g;e[11]!==S?(g=b("typewriter-text",S),e[11]=S,e[12]=g):g=e[12];let x;e[13]!==g||e[14]!==t?(x=l.jsx("span",{className:g,children:t}),e[13]=g,e[14]=t,e[15]=x):x=e[15];let w;e[16]===Symbol.for("react.memo_cache_sentinel")?(w=l.jsx("style",{children:`
|
|
2
|
-
.typewriter-text {
|
|
3
|
-
display: inline-block;
|
|
4
|
-
width: 0;
|
|
5
|
-
max-width: 100%;
|
|
6
|
-
overflow: hidden;
|
|
7
|
-
white-space: nowrap;
|
|
8
|
-
animation: typewriter var(--typewriter-duration) steps(var(--typewriter-steps)) forwards;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
@keyframes typewriter {
|
|
12
|
-
to {
|
|
13
|
-
width: min(var(--typewriter-max-width), 100%);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
`}),e[16]=w):w=e[16];let N;return e[17]!==x||e[18]!==f||e[19]!==C||e[20]!==t?(N=l.jsxs("span",{className:f,style:C,children:[x,w]},t),e[17]=x,e[18]=f,e[19]=C,e[20]=t,e[21]=N):N=e[21],N}export{Q as S,se as T,ee as a,te as b,F as c,J as d,Y as e,q as f,O as i,_ as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as m,r}from"./index-ClncOz6N.js";const a=768,o=()=>globalThis.innerWidth<a;function u(){const e=m.c(2),[l,n]=r.useState(o);let t,s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{const i=()=>n(o),c=globalThis.matchMedia(`(max-width: ${a-1}px)`);return c.addEventListener("change",i),n(o),()=>c.removeEventListener("change",i)},s=[],e[0]=t,e[1]=s):(t=e[0],s=e[1]),r.useEffect(t,s),l}export{u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as p,r as f}from"./index-ClncOz6N.js";import{u as w}from"./use-mobile-BttsZXmR.js";function S(m,M){const e=p.c(12),u=M===void 0?"cards":M,o=w(),b=f.useRef(o),s=m?`deco-view-mode-${m}`:"deco-view-mode";let i;e[0]!==u||e[1]!==s?(i=()=>{const r=globalThis.localStorage?.getItem(s);return r==="cards"||r==="table"?r:u},e[0]=u,e[1]=s,e[2]=i):i=e[2];const[t,g]=f.useState(i);let l;e[3]!==s?(l=r=>{g(r),globalThis.localStorage?.setItem(s,r)},e[3]=s,e[4]=l):l=e[4];const d=l;let c,a;e[5]!==o||e[6]!==t?(c=()=>{!b.current&&o&&t==="table"&&g("cards"),b.current=o},a=[o,t],e[5]=o,e[6]=t,e[7]=c,e[8]=a):(c=e[7],a=e[8]),f.useEffect(c,a);let n;return e[9]!==d||e[10]!==t?(n=[t,d],e[9]=d,e[10]=t,e[11]=n):n=e[11],n}export{S as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as u}from"./infiniteQueryObserver-DTtSISl9.js";import{B as i}from"./index-ClncOz6N.js";function t(e,r){return i(e,u,r)}export{t as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{B as u,aa as s}from"./index-ClncOz6N.js";function o(e,r){return u(e,s,r)}export{o as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as s}from"./infiniteQueryObserver-DTtSISl9.js";import{B as u,D as n}from"./index-ClncOz6N.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as w,d as K,b as q,r as $,j as t,O as B,c as k,aE as G,z as Q,K as W,t as A}from"./index-ClncOz6N.js";import{a as J,u as V,e as Y}from"./constants-BHcnwzXS.js";import{C as X}from"./collection-tab-CiiXwxHW.js";import{g as Z,h as ee}from"./use-connection-DD4p_Qxm.js";import{B as I}from"./button-CcxsPygM.js";import{E as R}from"./empty-state-BvzVGw0j.js";import{E as te}from"./error-boundary-B0-C3nR-.js";import{P as x}from"./index-CSfvtoe4.js";import{B as F,a as z,b as M,c as T}from"./breadcrumb-KvFHoKN7.js";import{a as ne,b as se}from"./use-binding-op5oWkHb.js";import{i as ie}from"./AlertTriangle-CGGjQU9b.js";import{i as oe}from"./Loading01-Du9ChcBO.js";import{s as le}from"./RefreshCcw01-OjrTubY1.js";import{a as re}from"./Settings02-Pk4hmkwR.js";import{u as ce}from"./useMutation-CeUP6TdZ.js";import{e as ae}from"./Dataflow03-DItczzaI.js";import"./generate-id-Dyweu44Y.js";import"./collection-table-wrapper-D8mRH9XX.js";import"./dropdown-menu-D5LbTa4P.js";import"./Check-E8-Inf76.js";import"./ChevronRight-Cj97ppFv.js";import"./ArrowUp-BtMmVpE7.js";import"./Grid01-xeO6ixb6.js";import"./List-CEuiHx2u.js";import"./tooltip-TMQButig.js";import"./index-BDio7_0T.js";import"./table-C5Cvp27H.js";import"./card-k6wylZpL.js";import"./integration-icon-Bw_I-XAE.js";import"./Container-8z-xyt04.js";import"./Copy01-DKHGVRMd.js";import"./DotsVertical-IiJAY3kM.js";import"./Edit01-CSgI_vqG.js";import"./Eye-DPrkOx1m.js";import"./Trash01-DT85aU53.js";import"./empty-state-CA7kuHGK.js";import"./Inbox01-CHcPs9mB.js";import"./use-list-state-58FQ5_m7.js";import"./avatar-A9KYWJyz.js";import"./useQuery-BSd1v_RX.js";import"./use-view-mode-DJpnO-MR.js";import"./use-mobile-BttsZXmR.js";import"./constants-CehTGa6m.js";import"./alert-dialog-5IiN8bI8.js";import"./Plus-hJGQuZKS.js";import"./layout-aRIgHMvp.js";import"./SearchMd-B9pv8N9E.js";import"./input-BdH38qw4.js";import"./binder-BXFbhA2G.js";function me({title:n,description:e,wellKnownMcp:o,imageSrc:c,onConnected:i}){const a=Z(),{org:{slug:s}}=w(),{data:r}=K.useSession(),m=q(),[d,p]=$.useState(!1),l=async()=>{if(!(!o||!r?.user?.id)){p(!0);try{const f=await a.create.mutateAsync(o);i?.(f.id),m({to:"/$org/$project/mcps/$connectionId",params:{org:s,project:B,connectionId:f.id}})}finally{p(!1)}}},u=()=>{m({to:"/$org/$project/mcps",params:{org:s,project:B},search:{action:"create"}})};return t.jsx(R,{image:c?t.jsx("img",{src:c,alt:n,width:336,height:320,className:"max-w-full h-auto"}):null,title:n,description:e,actions:t.jsxs(t.Fragment,{children:[t.jsxs(I,{variant:"outline",onClick:l,disabled:d||!o,children:[o?.icon&&t.jsx("img",{src:o.icon,alt:"",className:"size-4"}),d?"Installing...":`Install ${o?.title||"MCP"}`]}),t.jsx(I,{variant:"outline",onClick:u,children:"Custom Connection"})]})})}function de(n){const e=k.c(35),{bindingName:o,collectionName:c,title:i,emptyState:a,wellKnownMcp:s}=n,{org:r}=w(),m=ee();let d;e[0]!==m||e[1]!==o?(d={connections:m,binding:o},e[0]=m,e[1]=o,e[2]=d):d=e[2];const l=ne(d)[0],u=se(l);let f;if(e[3]!==c||e[4]!==u){let g;e[6]!==c?(g=L=>L.name.toLowerCase()===c.toLowerCase(),e[6]=c,e[7]=g):g=e[7],f=u.find(g),e[3]=c,e[4]=u,e[5]=f}else f=e[5];const N=f,[U,D]=$.useState(null),_=l&&N&&(l.id||U);let j;e[8]!==i?(j=t.jsx(x.Header,{children:t.jsx(x.Header.Left,{children:t.jsx(F,{children:t.jsx(z,{children:t.jsx(M,{children:t.jsx(T,{children:i})})})})})}),e[8]=i,e[9]=j):j=e[9];let h;e[10]!==l||e[11]!==r||e[12]!==i?(h=g=>{const{error:L,resetError:H}=g;return t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:t.jsx(ie,{className:"h-6 w-6 text-destructive"})}),t.jsxs("div",{className:"space-y-2",children:[t.jsxs("h3",{className:"text-lg font-medium",children:["Failed to load ",i.toLowerCase()]}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:L?.message||"Unable to connect to the server. Please check that it is running and accessible."})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs(I,{variant:"outline",onClick:H,children:[t.jsx(le,{className:"size-4"}),"Try again"]}),l&&t.jsx(I,{variant:"outline",asChild:!0,children:t.jsxs(G,{to:"/$org/$project/mcps/$connectionId",params:{org:r.slug,project:B,connectionId:l.id},search:{tab:"settings"},children:[t.jsx(re,{className:"size-4"}),"Connection Settings"]})})]})]})},e[10]=l,e[11]=r,e[12]=i,e[13]=h):h=e[13];let S;e[14]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(oe,{size:32,className:"animate-spin text-muted-foreground mb-4"}),e[14]=S):S=e[14];let b;e[15]!==i?(b=i.toLowerCase(),e[15]=i,e[16]=b):b=e[16];let C;e[17]!==b?(C=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[S,t.jsxs("p",{className:"text-sm text-muted-foreground",children:["Loading ",b,"..."]})]}),e[17]=b,e[18]=C):C=e[18];let y;e[19]!==N||e[20]!==l||e[21]!==a||e[22]!==r||e[23]!==_||e[24]!==s?(y=_?t.jsx(X,{connectionId:l.id,org:r.slug,activeCollection:N}):t.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:t.jsx(me,{title:a.title,description:a.description,wellKnownMcp:s,imageSrc:a.imageSrc,onConnected:g=>{D(g)}})}),e[19]=N,e[20]=l,e[21]=a,e[22]=r,e[23]=_,e[24]=s,e[25]=y):y=e[25];let P;e[26]!==C||e[27]!==y?(P=t.jsx($.Suspense,{fallback:C,children:y}),e[26]=C,e[27]=y,e[28]=P):P=e[28];let E;e[29]!==h||e[30]!==P?(E=t.jsx(x.Content,{children:t.jsx(te,{fallback:h,children:P})}),e[29]=h,e[30]=P,e[31]=E):E=e[31];let v;return e[32]!==E||e[33]!==j?(v=t.jsxs(x,{children:[j,E]}),e[32]=E,e[33]=j,e[34]=v):v=e[34],v}function ue(){const n=k.c(12),{org:e,project:o}=w(),c=Q();let i;n[0]!==e.id?(i={connectionId:J,orgId:e.id},n[0]=e.id,n[1]=i):i=n[1];const a=V(i);let s;n[2]!==a||n[3]!==o?(s=async p=>{const l=o.enabledPlugins??[];if(l.includes(p))return;const u=[...l,p],f=await a.callTool({name:"PROJECT_UPDATE",arguments:{projectId:o.id,enabledPlugins:u}});return f.structuredContent??f},n[2]=a,n[3]=o,n[4]=s):s=n[4];let r;n[5]!==e.id||n[6]!==o||n[7]!==c?(r=()=>{c.invalidateQueries({queryKey:W.project(e.id,o.slug)}),c.invalidateQueries({queryKey:W.projects(e.id)})},n[5]=e.id,n[6]=o,n[7]=c,n[8]=r):r=n[8];let m;return n[9]!==s||n[10]!==r?(m={mutationFn:s,onSuccess:r,onError:pe},n[9]=s,n[10]=r,n[11]=m):m=n[11],ce(m)}function pe(n){A.error("Failed to enable plugin: "+(n instanceof Error?n.message:"Unknown error"))}function fe(n){const e=k.c(12),{pluginId:o,title:c,description:i,icon:a}=n,s=ue();let r;e[0]!==s||e[1]!==o?(r=async()=>{try{await s.mutateAsync(o),A.success("Plugin enabled!")}catch{}},e[0]=s,e[1]=o,e[2]=r):r=e[2];const m=r,d=a??null,p=s.isPending?"Enabling…":"Enable plugin";let l;e[3]!==s.isPending||e[4]!==m||e[5]!==p?(l=t.jsx(I,{onClick:m,disabled:s.isPending,children:p}),e[3]=s.isPending,e[4]=m,e[5]=p,e[6]=l):l=e[6];let u;return e[7]!==i||e[8]!==d||e[9]!==l||e[10]!==c?(u=t.jsx(R,{image:d,title:c,description:i,actions:l}),e[7]=i,e[8]=d,e[9]=l,e[10]=c,e[11]=u):u=e[11],u}const O="workflows";function mt(){const n=k.c(3),{project:e}=w();if(!(e.enabledPlugins??[]).includes(O)){let a;n[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(x.Header,{children:t.jsx(x.Header.Left,{children:t.jsx(F,{children:t.jsx(z,{children:t.jsx(M,{children:t.jsx(T,{children:"Workflows"})})})})})}),n[0]=a):a=n[0];let s;return n[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsxs(x,{children:[a,t.jsx(x.Content,{children:t.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:t.jsx(fe,{pluginId:O,title:"Enable Workflows",description:"Automate multi-step processes by enabling the Workflows plugin. Once enabled you can create, run, and monitor workflows.",icon:t.jsx("div",{className:"bg-muted p-4 rounded-full",children:t.jsx(ae,{className:"size-8 text-muted-foreground"})})})})})]}),n[1]=s):s=n[1],s}let i;return n[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(de,{bindingName:"WORKFLOW",collectionName:"workflow",title:"Workflows",emptyState:{title:"Create Workflows",description:"Run durable MCP tool calls in background."},wellKnownMcp:Y()}),n[2]=i):i=n[2],i}export{mt as default};
|