@decocms/mesh 2.88.0 → 2.89.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-fs-iLCxQ.js → AlertCircle-Cw9ihf9b.js} +1 -1
- package/dist/client/assets/{AlertOctagon-DJgNSLd2.js → AlertOctagon-CHDm6gds.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BOU-qvMz.js → ArrowLeft-Chs5GWbG.js} +1 -1
- package/dist/client/assets/{ArrowUp-D5TY17yS.js → ArrowUp-BOsWIVUL.js} +1 -1
- package/dist/client/assets/{Check-woCJI4Zk.js → Check-bBmR9GQH.js} +1 -1
- package/dist/client/assets/{CheckCircle-Cd6AhXPT.js → CheckCircle-DJR7dvl_.js} +1 -1
- package/dist/client/assets/{CheckDone01-CaHocOrI.js → CheckDone01-DyHo1ANl.js} +1 -1
- package/dist/client/assets/{ChevronDown--AD2MLIh.js → ChevronDown-e8z1AHWa.js} +1 -1
- package/dist/client/assets/{ChevronRight-DhFCl7fQ.js → ChevronRight-mzsl79CI.js} +1 -1
- package/dist/client/assets/Clock-BqZfnvMs.js +1 -0
- package/dist/client/assets/{Code01-DOUE7D86.js → Code01-BuvRIZNT.js} +1 -1
- package/dist/client/assets/{Copy01-DhF1Yrkw.js → Copy01-BXs0w1_Z.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-DfjT6Blw.js → DotsHorizontal-D05UvBC-.js} +1 -1
- package/dist/client/assets/{DotsVertical-BipTn3CF.js → DotsVertical-PFw1FUuL.js} +1 -1
- package/dist/client/assets/{Download01-C3-05zuB.js → Download01-szewvS_J.js} +1 -1
- package/dist/client/assets/{Edit01-DwOJTHYN.js → Edit01-DjLvyzaJ.js} +1 -1
- package/dist/client/assets/{Eye-CJ6PCpWV.js → Eye-BTsTDMYp.js} +1 -1
- package/dist/client/assets/{File02-COltyyOK.js → File02-cZx3Nwh2.js} +1 -1
- package/dist/client/assets/{File06-BaXucUWw.js → File06-DJ7PaUFD.js} +1 -1
- package/dist/client/assets/{FilterLines-D-B6xOx4.js → FilterLines-BtVwPogj.js} +1 -1
- package/dist/client/assets/{Grid01-BvWVxRRn.js → Grid01-nmhLSr_y.js} +1 -1
- package/dist/client/assets/{Home02-Y_J2Mjhf.js → Home02-CXE0mN9_.js} +1 -1
- package/dist/client/assets/{Image01-CD-baYxu.js → Image01-CvCm0AIo.js} +1 -1
- package/dist/client/assets/{Inbox01-nefVdQqD.js → Inbox01-DS2d-ggv.js} +1 -1
- package/dist/client/assets/{InfoCircle-fmFznxid.js → InfoCircle-DSAWIlto.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CTFxzrDd.js → LinkExternal01-kjhxmnSZ.js} +1 -1
- package/dist/client/assets/{List-D28XJ4eE.js → List-Bt7blnNW.js} +1 -1
- package/dist/client/assets/{Loading01-CVxzxkEA.js → Loading01-DzANV23U.js} +1 -1
- package/dist/client/assets/{Lock01-B6R6M8mS.js → Lock01-D0GsF_G5.js} +1 -1
- package/dist/client/assets/{Pin01-B7AGhCqq.js → Pin01-BLxZyXIB.js} +1 -1
- package/dist/client/assets/{Play-BLNkF9lh.js → Play-e2gPw7C5.js} +1 -1
- package/dist/client/assets/{Plus-oe5n7shW.js → Plus-DVsqBc2O.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-DQu-afd1.js → RefreshCcw01-BnPnAVu5.js} +1 -1
- package/dist/client/assets/{SearchMd-Ctirl108.js → SearchMd-4FuyiGD9.js} +1 -1
- package/dist/client/assets/{Settings01-DfshLY3d.js → Settings01-CKFpLFpy.js} +1 -1
- package/dist/client/assets/{Settings02-DwBbKcxc.js → Settings02-BcMSZBiS.js} +1 -1
- package/dist/client/assets/{Share07-DuMFfxOm.js → Share07-CxwZm_Fx.js} +1 -1
- package/dist/client/assets/Terminal-dAukTxLO.js +1 -0
- package/dist/client/assets/{Tool01-BnAwUrAq.js → Tool01-BWlhB1uG.js} +1 -1
- package/dist/client/assets/{Trash01-h3f3UFq5.js → Trash01-C--sdfEl.js} +1 -1
- package/dist/client/assets/{Upload01-EBRxETCK.js → Upload01-CBpBX6RX.js} +1 -1
- package/dist/client/assets/{Users03-DUHQ5891.js → Users03-DCd0bNWV.js} +1 -1
- package/dist/client/assets/{X-DbHlFzca.js → X-CbFxRcRI.js} +1 -1
- package/dist/client/assets/{XClose-BpJNyKul.js → XClose-kwDKy1-G.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-CyKXZFzV.js → agent-connections-preview-D4Gi0Un5.js} +1 -1
- package/dist/client/assets/agent-detail-J0eCb9Dh.js +1 -0
- package/dist/client/assets/{agents-COk0IQw8.js → agents-Du1-pI67.js} +1 -1
- package/dist/client/assets/{alert-dialog-DlRleLL5.js → alert-dialog-_6GYalnG.js} +1 -1
- package/dist/client/assets/{auth-catchall-BlLxxa2S.js → auth-catchall-yUFMQwKs.js} +1 -1
- package/dist/client/assets/{avatar-CB2Y6aAq.js → avatar-5AcMFXtJ.js} +1 -1
- package/dist/client/assets/{badge-DnrGjfKN.js → badge-D4eulAEt.js} +1 -1
- package/dist/client/assets/{binder-DWar94Dz.js → binder-BmTIjUvW.js} +1 -1
- package/dist/client/assets/{breadcrumb-C8TKHD4-.js → breadcrumb-DkJtDlCm.js} +1 -1
- package/dist/client/assets/{button-ds0Xf2u_.js → button-DEQGt3Mt.js} +1 -1
- package/dist/client/assets/{card-3Oz-suJe.js → card-D2BIckvB.js} +1 -1
- package/dist/client/assets/{checkbox-oLUg1qlK.js → checkbox-JkFmm-oF.js} +1 -1
- package/dist/client/assets/{circle-alert-D0sAKh3z.js → circle-alert-ChfPS6ZT.js} +1 -1
- package/dist/client/assets/{collection-detail-CP10nfYn.js → collection-detail-zx3CjDuf.js} +5 -5
- package/dist/client/assets/{collection-search-kC3At3KN.js → collection-search-BAHriX28.js} +1 -1
- package/dist/client/assets/{collection-tab-BooFRSp_.js → collection-tab-C5eDvl4l.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DpXz70UJ.js → collection-table-wrapper-CffPVlju.js} +1 -1
- package/dist/client/assets/{collection-tabs-BIrTpgBA.js → collection-tabs-k1O5l5Tt.js} +1 -1
- package/dist/client/assets/{command-Dfzr1VvH.js → command-igH3z6Dq.js} +1 -1
- package/dist/client/assets/{connect-CulBzmXv.js → connect-BxguVhSr.js} +1 -1
- package/dist/client/assets/{connection-card-DW2fxGub.js → connection-card-Nyp0WXsm.js} +1 -1
- package/dist/client/assets/connection-detail-CR6ewFP6.js +1 -0
- package/dist/client/assets/connections-8L0t715b.js +1 -0
- package/dist/client/assets/{constants-pTCFS1GU.js → constants-Bszkk2Rw.js} +1 -1
- package/dist/client/assets/constants-ClqDjxmj.js +1 -0
- package/dist/client/assets/{create-organization-dialog-DKpRSfJS.js → create-organization-dialog-DtM6Lll9.js} +1 -1
- package/dist/client/assets/{create-project-dialog-YGz5z2Zi.js → create-project-dialog-DnsCDrcn.js} +1 -1
- package/dist/client/assets/{dialog-1X4BWtmD.js → dialog-CpDI9kJ-.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Ckg1hXqa.js → dropdown-menu-4rYu6wF8.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-CW9-eyML.js → dynamic-plugin-layout-BmWcd8V9.js} +1 -1
- package/dist/client/assets/{empty-state-DFcUAeKs.js → empty-state-DmH-En3i.js} +1 -1
- package/dist/client/assets/{empty-state-CJnfgDRv.js → empty-state-DrzoS648.js} +1 -1
- package/dist/client/assets/{env-vars-editor-BqFQwm2Y.js → env-vars-editor-C4g3zRD9.js} +1 -1
- package/dist/client/assets/{error-boundary-D1nW3qw3.js → error-boundary-C7tDStz5.js} +1 -1
- package/dist/client/assets/{extract-connection-data-sEk__aUJ.js → extract-connection-data-COiR0Z5D.js} +1 -1
- package/dist/client/assets/{file-browser-Av512maH.js → file-browser-Ce1sqwf7.js} +2 -2
- package/dist/client/assets/{form-CCnPwGY1.js → form-D2_xc7ex.js} +1 -1
- package/dist/client/assets/{grid-view-B0N-4HGw.js → grid-view-QlX2--qg.js} +1 -1
- package/dist/client/assets/{home-BwtjBpiC.js → home-Dfe72Ojx.js} +1 -1
- package/dist/client/assets/{index-B-34EG7J.js → index-0lR5vRMT.js} +1 -1
- package/dist/client/assets/{index-lkQ_SnE8.js → index-8vKpXL36.js} +111 -96
- package/dist/client/assets/{index-BnM6zXPK.js → index-BTkkv8YJ.js} +2 -2
- package/dist/client/assets/{index-CKSdcgOB.js → index-CG_wt8-t.js} +1 -1
- package/dist/client/assets/{index-BzK60eGa.js → index-CJcUchND.js} +1 -1
- package/dist/client/assets/{index-NZL2styZ.js → index-CR6Erh7i.js} +1 -1
- package/dist/client/assets/index-Ce4voX8r.css +1 -0
- package/dist/client/assets/{index-rA5KrK2V.js → index-CirnkQgw.js} +1 -1
- package/dist/client/assets/{index-DUuy3gyR.js → index-DDumd-uN.js} +1 -1
- package/dist/client/assets/{index-9ENdh9Ws.js → index-Emvu7sr8.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-DwX9yony.js → infiniteQueryObserver-DHT84YLi.js} +1 -1
- package/dist/client/assets/{input-CoSRI0XN.js → input-CA0mWas7.js} +1 -1
- package/dist/client/assets/{integration-icon-GQvaX0z4.js → integration-icon-Cfwdxpxf.js} +1 -1
- package/dist/client/assets/{label-By7PTlud.js → label-CdLiaX8k.js} +1 -1
- package/dist/client/assets/{layout-DkBop8to.js → layout-CfKE6VIM.js} +1 -1
- package/dist/client/assets/{localstorage-keys-DEZN3FMx.js → localstorage-keys-BIGPrAKi.js} +1 -1
- package/dist/client/assets/{login-D3VfENey.js → login-4jSyNfIo.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DCI4iUAK.js → mcp-oauth-DHlPouJs.js} +1 -1
- package/dist/client/assets/mcp-server-card-XRir1Q0u.js +1 -0
- package/dist/client/assets/mcp-server-detail-B_5Ge6Jh.js +2 -0
- package/dist/client/assets/{members-aNc0Gi8j.js → members-C3odz1vS.js} +1 -1
- package/dist/client/assets/{monaco-editor-lPTVHX05.js → monaco-editor-6zkGnXCW.js} +4 -4
- package/dist/client/assets/{monitoring-Cm_Om3gn.js → monitoring-BGe_KL2N.js} +2 -2
- package/dist/client/assets/{oauth-callback-B2SdJrTS.js → oauth-callback-C0py_uBz.js} +1 -1
- package/dist/client/assets/page-BSj9fyzn.js +1 -0
- package/dist/client/assets/page-CSJgkJtL.js +1 -0
- package/dist/client/assets/{plugin-empty-state-DIxbhbdM.js → plugin-empty-state-C-mLgC1_.js} +1 -1
- package/dist/client/assets/{plugin-header-30g-NcVC.js → plugin-header-DhRLRDLX.js} +1 -1
- package/dist/client/assets/{popover-BDHymXMd.js → popover-SUqUERtd.js} +1 -1
- package/dist/client/assets/{project-layout-CgFaISWb.js → project-layout-C0i7eGZ6.js} +1 -1
- package/dist/client/assets/{project-settings-SUFHJ90C.js → project-settings-CxEvUbNx.js} +1 -1
- package/dist/client/assets/{projects-list-CHmkHD4E.js → projects-list-Cy20Y3XS.js} +1 -1
- package/dist/client/assets/{registry-utils-BR6BzVeP.js → registry-utils-CECb5GG7.js} +1 -1
- package/dist/client/assets/{resizable-2kAlJwn8.js → resizable-D-ryA_Dz.js} +1 -1
- package/dist/client/assets/{select-DMMlFWJe.js → select-CmRIRAnt.js} +1 -1
- package/dist/client/assets/shell-layout-BLZIH3N-.js +12 -0
- package/dist/client/assets/{spinner-Bx7trFel.js → spinner-CN0Z1P9W.js} +1 -1
- package/dist/client/assets/{store-invite-LofqNtSX.js → store-invite-B_af0JeT.js} +1 -1
- package/dist/client/assets/{switch-C0yi6OVV.js → switch-CWppHfYo.js} +1 -1
- package/dist/client/assets/{table-D7pbHUDB.js → table-wjrWPdlP.js} +1 -1
- package/dist/client/assets/tasks-COSmcsVm.js +1 -0
- package/dist/client/assets/{textarea-CeRheA0Q.js → textarea-PR5eIWgT.js} +1 -1
- package/dist/client/assets/{tools-list-CX5YDA_X.js → tools-list-CpgFpsDV.js} +1 -1
- package/dist/client/assets/{topbar-portal-C8JJoQbr.js → topbar-portal-Bn42xd4s.js} +1 -1
- package/dist/client/assets/{typewriter-title-DmosCyda.js → typewriter-title-hm5gyzMl.js} +1 -1
- package/dist/client/assets/{use-binding-C0O2f-XN.js → use-binding-Cu1RErmD.js} +1 -1
- package/dist/client/assets/{use-connection-AuebM5gu.js → use-connection-6tA_D8-k.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-AQ2ouFC3.js → use-create-virtual-mcp-CXq19Kfz.js} +1 -1
- package/dist/client/assets/{use-deco-chat-open-BpzqC0Eg.js → use-deco-chat-open-nEJZCNtN.js} +2 -2
- package/dist/client/assets/{use-install-from-registry-DXItZCB2.js → use-install-from-registry-YnLBWpQM.js} +1 -1
- package/dist/client/assets/{use-list-state-sOyPYO4a.js → use-list-state-C_fCtCmE.js} +1 -1
- package/dist/client/assets/{use-llm-D32w61hb.js → use-llm-B3tqI25s.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-GQRi1KzV.js → use-mcp-prompts-D3gk934n.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-B0_NUBjt.js → use-mcp-tools-CZlxkyzb.js} +1 -1
- package/dist/client/assets/{use-mobile-BxIj_uNd.js → use-mobile-DTsOXA-j.js} +1 -1
- package/dist/client/assets/{use-organization-settings-Boown5qg.js → use-organization-settings-BXqEHg_Q.js} +1 -1
- package/dist/client/assets/{use-project-gMu9ypju.js → use-project-hzw0geDy.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-B-em4IGd.js → use-virtual-mcp-D3AA1MGF.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BeLX7smg.js +1 -0
- package/dist/client/assets/{useMutation-OCNp6OYx.js → useMutation-DD2ow6ac.js} +1 -1
- package/dist/client/assets/useQuery-_U2H25qu.js +1 -0
- package/dist/client/assets/{view-mode-toggle-DEltdBOB.js → view-mode-toggle-C-wNHGzC.js} +1 -1
- package/dist/client/assets/{workflow-CCCfkzSk.js → workflow-CZ24M6NN.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +172 -172
- package/dist/server/migrate.js +39 -39
- package/dist/server/server.js +151 -151
- package/package.json +1 -1
- package/dist/client/assets/Calendar-Dj0hLzDt.js +0 -1
- package/dist/client/assets/Globe02-DvCJ3vRE.js +0 -1
- package/dist/client/assets/Terminal-DjfPKa_L.js +0 -1
- package/dist/client/assets/agent-detail-YeB6Qz8Q.js +0 -1
- package/dist/client/assets/connection-detail-ChWoyIs3.js +0 -1
- package/dist/client/assets/connections-tw0HMqWX.js +0 -1
- package/dist/client/assets/constants-DOhkek36.js +0 -1
- package/dist/client/assets/index-Cj8gXlq-.css +0 -1
- package/dist/client/assets/mcp-server-card-Bs0aHzvK.js +0 -1
- package/dist/client/assets/mcp-server-detail-C5w_HTBr.js +0 -2
- package/dist/client/assets/page-CdJDLqyE.js +0 -1
- package/dist/client/assets/page-DZHkz-Tj.js +0 -1
- package/dist/client/assets/shell-layout-BCV_2i2_.js +0 -12
- package/dist/client/assets/tasks-MG2GKEVA.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CnZ5J3_h.js +0 -1
- package/dist/client/assets/useQuery-B8N1a1vY.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as G,r as D,u as X,n as ue,K as le,br as xe,j as s,m as oe,O as ie,g as ge,bs as pe,l as he}from"./index-BnM6zXPK.js";import{P as U}from"./index-BzK60eGa.js";import{B as je,a as ve,b as ye,c as be}from"./breadcrumb-C8TKHD4-.js";import{i as ae}from"./FilterLines-D-B6xOx4.js";import{n as Ne}from"./Inbox01-nefVdQqD.js";import{i as Z}from"./Loading01-CVxzxkEA.js";import{i as ce}from"./SearchMd-Ctirl108.js";import{u as Ce}from"./useInfiniteQuery-CnZ5J3_h.js";import{a as Se,f as we,b as Te}from"./registry-utils-BR6BzVeP.js";import{u as Ie,h as Re,b as Pe}from"./constants-pTCFS1GU.js";import{f as $e,g as me,h as ke}from"./use-connection-AuebM5gu.js";import{s as Le}from"./slugify-CEUa2lfQ.js";import{C as ze}from"./collection-search-kC3At3KN.js";import{M as re}from"./mcp-server-card-Bs0aHzvK.js";import{c as de,B as J}from"./button-ds0Xf2u_.js";import{I as Fe}from"./input-CoSRI0XN.js";import{b as Ke,P as Ae,a as Ee}from"./popover-BDHymXMd.js";import{i as Be}from"./Check-woCJI4Zk.js";import{t as De}from"./ChevronDown--AD2MLIh.js";import{s as Y}from"./XClose-BpJNyKul.js";import{d as Me,a as Oe,b as Ve,c as _e,S as We}from"./select-DMMlFWJe.js";import{s as qe}from"./Plus-oe5n7shW.js";import{E as Ge}from"./empty-state-CJnfgDRv.js";import{u as He}from"./use-binding-C0O2f-XN.js";import{L as Ue,u as Je}from"./localstorage-keys-DEZN3FMx.js";import"./ChevronRight-DhFCl7fQ.js";import"./infiniteQueryObserver-DwX9yony.js";import"./useMutation-OCNp6OYx.js";import"./integration-icon-GQvaX0z4.js";import"./index-B-34EG7J.js";import"./Globe02-DvCJ3vRE.js";import"./Lock01-B6R6M8mS.js";import"./Terminal-DjfPKa_L.js";import"./card-3Oz-suJe.js";import"./github-icon-Dp3wHhYE.js";import"./binder-DWar94Dz.js";import"./useQuery-B8N1a1vY.js";function Qe(t,e){const l=G.c(4),[n,c]=D.useState(t),r=D.useRef(null),a=D.useRef(!0);let i,m;return l[0]!==e||l[1]!==t?(i=()=>{if(a.current){a.current=!1;return}return r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{c(t)},e),()=>{r.current&&clearTimeout(r.current)}},m=[t,e],l[0]=e,l[1]=t,l[2]=i,l[3]=m):(i=l[2],m=l[3]),D.useEffect(i,m),n}function Ye(t){const e=G.c(14),l=D.useRef(null),n=`scroll-position:${t}`,c=D.useRef(null);let r;e[0]!==n?(r=()=>{l.current&&sessionStorage.setItem(n,String(l.current.scrollTop))},e[0]=n,e[1]=r):r=e[1];const a=r;let i;e[2]!==n?(i=()=>{if(c.current===n)return;const d=sessionStorage.getItem(n);if(d&&l.current){const j=Number.parseInt(d,10);l.current.scrollTop=j}c.current=n},e[2]=n,e[3]=i):i=e[3];const m=i;let y;e[4]!==m||e[5]!==n?(y=()=>{c.current!==n&&m()},e[4]=m,e[5]=n,e[6]=y):y=e[6];const p=y;let o;e[7]!==m||e[8]!==n?(o=d=>{l.current=d,d&&c.current!==n&&requestAnimationFrame(()=>{m()})},e[7]=m,e[8]=n,e[9]=o):o=e[9];const b=o;let u;return e[10]!==p||e[11]!==a||e[12]!==b?(u={scrollRef:b,saveScrollPosition:a,handleScroll:p},e[10]=p,e[11]=a,e[12]=b,e[13]=u):u=e[13],u}const Ze=24;function Xe(t){const e=G.c(53),{registryId:l,listToolName:n,filtersToolName:c,search:r}=t,{org:a}=X();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=[],e[0]=i):i=e[0];const[m,y]=D.useState(i);let p;e[1]===Symbol.for("react.memo_cache_sentinel")?(p=[],e[1]=p):p=e[1];const[o,b]=D.useState(p),u=l||null;let d;e[2]!==a.id||e[3]!==u?(d={connectionId:u,orgId:a.id},e[2]=a.id,e[3]=u,e[4]=d):d=e[4];const j=Ie(d),I=!!c;let N;e[5]!==c||e[6]!==l?(N=le.toolCall(l,c||"no-filters","{}"),e[5]=c,e[6]=l,e[7]=N):N=e[7];let C;e[8]!==j||e[9]!==c?(C=async()=>{if(!c)return{tags:[],categories:[]};const B=await j.callTool({name:c,arguments:{}});return B.structuredContent??B},e[8]=j,e[9]=c,e[10]=C):C=e[10];let L;e[11]!==N||e[12]!==C?(L={queryKey:N,queryFn:C,staleTime:36e5},e[11]=N,e[12]=C,e[13]=L):L=e[13];const{data:$}=ue(L);let v,S,w;if(e[14]!==n||e[15]!==l||e[16]!==r||e[17]!==o||e[18]!==m){const B=r?.trim()?{operator:"or",conditions:[{field:["name"],operator:"contains",value:r},{field:["title"],operator:"contains",value:r},{field:["description"],operator:"contains",value:r}]}:void 0;v={limit:Ze,...m.length>0&&{tags:m},...o.length>0&&{categories:o},...B&&{where:B}},w=Ce,S=le.toolCall(l,n,JSON.stringify(v)),e[14]=n,e[15]=l,e[16]=r,e[17]=o,e[18]=m,e[19]=v,e[20]=S,e[21]=w}else v=e[19],S=e[20],w=e[21];let T;e[22]!==j||e[23]!==v||e[24]!==n?(T=async B=>{const{pageParam:te}=B,fe=te?{...v,cursor:te}:v,se=await j.callTool({name:n,arguments:fe});return se.structuredContent??se},e[22]=j,e[23]=v,e[24]=n,e[25]=T):T=e[25];let z;e[26]!==T||e[27]!==S?(z={queryKey:S,queryFn:T,initialPageParam:void 0,getNextPageParam:et,staleTime:36e5,placeholderData:xe},e[26]=T,e[27]=S,e[28]=z):z=e[28];const{data:A,fetchNextPage:k,hasNextPage:f,isFetchingNextPage:x,isFetching:g,isLoading:R}=w(z);let P;e:{if(!A?.pages||A.pages.length===0){P=null;break e}const B=A.pages[0];if(typeof B=="object"&&B!==null&&"totalCount"in B&&typeof B.totalCount=="number"){P=B.totalCount;break e}P=null}const K=P,h=A?.pages;let F;e[29]!==h?(F=Se(h),e[29]=h,e[30]=F):F=e[30];const E=F;let O;e[31]!==r||e[32]!==o.length||e[33]!==m.length?(O=m.length>0||o.length>0||!!r?.trim(),e[31]=r,e[32]=o.length,e[33]=m.length,e[34]=O):O=e[34];const V=O,W=g&&!x&&!R&&V;let q;e[35]!==k||e[36]!==f||e[37]!==x?(q=()=>{f&&!x&&k()},e[35]=k,e[36]=f,e[37]=x,e[38]=q):q=e[38];const M=q,_=f??!1,H=I?$?.tags:void 0,ee=I?$?.categories:void 0;let Q;return e[39]!==V||e[40]!==g||e[41]!==x||e[42]!==W||e[43]!==R||e[44]!==E||e[45]!==M||e[46]!==o||e[47]!==m||e[48]!==_||e[49]!==H||e[50]!==ee||e[51]!==K?(Q={items:E,totalCount:K,hasMore:_,isLoadingMore:x,isFiltering:W,isInitialLoading:R,isFetching:g,loadMore:M,availableTags:H,availableCategories:ee,selectedTags:m,selectedCategories:o,setSelectedTags:y,setSelectedCategories:b,hasActiveFilters:V},e[39]=V,e[40]=g,e[41]=x,e[42]=W,e[43]=R,e[44]=E,e[45]=M,e[46]=o,e[47]=m,e[48]=_,e[49]=H,e[50]=ee,e[51]=K,e[52]=Q):Q=e[52],Q}function et(t){if(typeof t=="object"&&t!==null){const e=t.nextCursor||t.cursor;if(e)return e}}function tt(t,e){return[...t].sort((l,n)=>n.count-l.count).slice(0,e)}function ne(t){const e=G.c(52),{label:l,items:n,selectedItems:c,onToggle:r,onClear:a}=t,[i,m]=D.useState(""),[y,p]=D.useState(!1);let o,b,u,d,j,I,N,C,L,$,v;if(e[0]!==n||e[1]!==l||e[2]!==r||e[3]!==y||e[4]!==i||e[5]!==c){const k=[...i?n.filter(F=>F.value.toLowerCase().includes(i.toLowerCase())):n].sort(st);u=c.length,b=Ke,L=y,$=p;let f;e[17]!==l?(f=s.jsx("span",{children:l}),e[17]=l,e[18]=f):f=e[18];let x;e[19]!==u?(x=u>0&&s.jsx("span",{className:"ml-1 rounded-full bg-primary text-primary-foreground px-1.5 py-0.5 text-[10px] font-medium",children:u}),e[19]=u,e[20]=x):x=e[20];let g;e[21]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(De,{size:14,className:"opacity-50"}),e[21]=g):g=e[21],e[22]!==x||e[23]!==f?(v=s.jsx(Ae,{asChild:!0,children:s.jsxs(J,{variant:"outline",size:"sm",className:"h-7 px-3 gap-1.5 text-xs font-normal flex-1",children:[f,x,g]})}),e[22]=x,e[23]=f,e[24]=v):v=e[24],o=Ee,I="w-64 p-0",N="start";let R;e[25]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(ce,{size:16,className:"text-muted-foreground shrink-0"}),e[25]=R):R=e[25];let P;e[26]!==l?(P=l.toLowerCase(),e[26]=l,e[27]=P):P=e[27];const K=`Search ${P}...`;let h;e[28]===Symbol.for("react.memo_cache_sentinel")?(h=F=>m(F.target.value),e[28]=h):h=e[28],e[29]!==i||e[30]!==K?(C=s.jsx("div",{className:"shrink-0 w-full border-b border-border h-10",children:s.jsxs("label",{className:"flex items-center gap-2.5 h-10 px-4 cursor-text",children:[R,s.jsx(Fe,{type:"text",placeholder:K,value:i,onChange:h,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"})]})}),e[29]=i,e[30]=K,e[31]=C):C=e[31],d="max-h-64 overflow-y-auto p-1 flex flex-col gap-1",j=k.length===0?s.jsx("div",{className:"px-2 py-4 text-sm text-muted-foreground text-center",children:"No results found"}):k.map(F=>{const E=c.includes(F.value);return s.jsxs("button",{onClick:()=>r(F.value),className:de("w-full flex items-center justify-between px-2 py-1.5 text-sm rounded cursor-pointer transition-colors",E?"bg-accent/50 text-foreground":"hover:bg-muted text-foreground"),children:[s.jsxs("span",{className:"truncate flex items-center gap-2",children:[E&&s.jsx(Be,{size:16,className:"text-muted-foreground shrink-0"}),F.value]}),s.jsx("span",{className:"text-xs text-muted-foreground ml-2 shrink-0",children:F.count})]},F.value)}),e[0]=n,e[1]=l,e[2]=r,e[3]=y,e[4]=i,e[5]=c,e[6]=o,e[7]=b,e[8]=u,e[9]=d,e[10]=j,e[11]=I,e[12]=N,e[13]=C,e[14]=L,e[15]=$,e[16]=v}else o=e[6],b=e[7],u=e[8],d=e[9],j=e[10],I=e[11],N=e[12],C=e[13],L=e[14],$=e[15],v=e[16];let S;e[32]!==d||e[33]!==j?(S=s.jsx("div",{className:d,children:j}),e[32]=d,e[33]=j,e[34]=S):S=e[34];let w;e[35]!==l||e[36]!==a||e[37]!==u?(w=u>0&&s.jsx("div",{className:"p-2 border-t border-border",children:s.jsxs(J,{variant:"ghost",size:"sm",onClick:a,className:"w-full text-xs text-muted-foreground hover:text-foreground",children:["Clear ",l.toLowerCase()]})}),e[35]=l,e[36]=a,e[37]=u,e[38]=w):w=e[38];let T;e[39]!==o||e[40]!==w||e[41]!==I||e[42]!==N||e[43]!==C||e[44]!==S?(T=s.jsxs(o,{className:I,align:N,children:[C,S,w]}),e[39]=o,e[40]=w,e[41]=I,e[42]=N,e[43]=C,e[44]=S,e[45]=T):T=e[45];let z;return e[46]!==b||e[47]!==T||e[48]!==L||e[49]!==$||e[50]!==v?(z=s.jsxs(b,{open:L,onOpenChange:$,children:[v,T]}),e[46]=b,e[47]=T,e[48]=L,e[49]=$,e[50]=v,e[51]=z):z=e[51],z}function st(t,e){return e.count-t.count}function lt(t){const e=G.c(67),{availableTags:l,availableCategories:n,selectedTags:c,selectedCategories:r,onTagChange:a,onCategoryChange:i}=t,m=l&&l.length>0||n&&n.length>0,y=c.length>0||r.length>0;if(!m)return null;let p;e[0]!==a||e[1]!==c?(p=f=>{c.includes(f)?a(c.filter(x=>x!==f)):a([...c,f])},e[0]=a,e[1]=c,e[2]=p):p=e[2];const o=p;let b;e[3]!==i||e[4]!==r?(b=f=>{r.includes(f)?i(r.filter(x=>x!==f)):i([...r,f])},e[3]=i,e[4]=r,e[5]=b):b=e[5];const u=b;let d;e[6]!==i||e[7]!==a?(d=()=>{a([]),i([])},e[6]=i,e[7]=a,e[8]=d):d=e[8];const j=d;let I,N,C,L,$,v,S;if(e[9]!==n||e[10]!==l||e[11]!==i||e[12]!==a||e[13]!==r||e[14]!==c||e[15]!==u||e[16]!==o){const f=n?tt(n,6):[];I=r,N=c,S=new Set(f.map(rt)),$="flex items-center border-b border-border";let x;e[24]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"flex items-center gap-2 text-muted-foreground",children:s.jsx(ae,{size:16})}),e[24]=x):x=e[24];let g;e[25]!==n||e[26]!==i||e[27]!==r||e[28]!==u?(g=n&&n.length>0&&s.jsx(ne,{label:"Categories",items:n,selectedItems:r,onToggle:u,onClear:()=>i([])}),e[25]=n,e[26]=i,e[27]=r,e[28]=u,e[29]=g):g=e[29];let R;e[30]!==l||e[31]!==a||e[32]!==c||e[33]!==o?(R=l&&l.length>0&&s.jsx(ne,{label:"Tags",items:l,selectedItems:c,onToggle:o,onClear:()=>a([])}),e[30]=l,e[31]=a,e[32]=c,e[33]=o,e[34]=R):R=e[34],e[35]!==R||e[36]!==g?(v=s.jsxs("div",{className:"flex items-center gap-3 flex-wrap px-5 py-3 border-r border-border",children:[x,g,R]}),e[35]=R,e[36]=g,e[37]=v):v=e[37],C="flex items-center gap-3 flex-wrap px-5 py-3";let P;e[38]!==r||e[39]!==u?(P=K=>{const h=r.includes(K.value);return s.jsxs("div",{onClick:()=>u(K.value),className:de("inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer",h?"bg-primary text-primary-foreground hover:bg-primary/80":"bg-muted hover:bg-accent text-muted-foreground"),children:[s.jsx("span",{children:K.value}),h&&s.jsx("span",{onClick:F=>{F.stopPropagation(),u(K.value)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(Y,{size:12})})]},K.value)},e[38]=r,e[39]=u,e[40]=P):P=e[40],L=f.map(P),e[9]=n,e[10]=l,e[11]=i,e[12]=a,e[13]=r,e[14]=c,e[15]=u,e[16]=o,e[17]=I,e[18]=N,e[19]=C,e[20]=L,e[21]=$,e[22]=v,e[23]=S}else I=e[17],N=e[18],C=e[19],L=e[20],$=e[21],v=e[22],S=e[23];let w;if(e[41]!==I||e[42]!==u||e[43]!==S){let f;e[45]!==S?(f=g=>!S.has(g),e[45]=S,e[46]=f):f=e[46];let x;e[47]!==u?(x=g=>s.jsxs("div",{onClick:()=>u(g),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[s.jsx("span",{children:g}),s.jsx("span",{onClick:R=>{R.stopPropagation(),u(g)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(Y,{size:12})})]},`cat-${g}`),e[47]=u,e[48]=x):x=e[48],w=I.filter(f).map(x),e[41]=I,e[42]=u,e[43]=S,e[44]=w}else w=e[44];let T;if(e[49]!==N||e[50]!==o){let f;e[52]!==o?(f=x=>s.jsxs("div",{onClick:()=>o(x),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[s.jsx("span",{children:x}),s.jsx("span",{onClick:g=>{g.stopPropagation(),o(x)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(Y,{size:12})})]},`tag-${x}`),e[52]=o,e[53]=f):f=e[53],T=N.map(f),e[49]=N,e[50]=o,e[51]=T}else T=e[51];let z;e[54]!==j||e[55]!==y?(z=y&&s.jsxs(J,{variant:"ghost",size:"sm",onClick:j,className:"h-7 text-xs text-muted-foreground hover:text-foreground gap-1 px-2",children:[s.jsx(Y,{size:14}),"Clear all"]}),e[54]=j,e[55]=y,e[56]=z):z=e[56];let A;e[57]!==z||e[58]!==C||e[59]!==L||e[60]!==w||e[61]!==T?(A=s.jsxs("div",{className:C,children:[L,w,T,z]}),e[57]=z,e[58]=C,e[59]=L,e[60]=w,e[61]=T,e[62]=A):A=e[62];let k;return e[63]!==A||e[64]!==$||e[65]!==v?(k=s.jsxs("div",{className:$,children:[v,A]}),e[63]=A,e[64]=$,e[65]=v,e[66]=k):k=e[66],k}function rt(t){return t.value}function nt(t,e){if(!e)return t;const l=e.toLowerCase();return t.filter(n=>(n.name||n.title||"").toLowerCase().includes(l)||(n.description||n.server.description||"").toLowerCase().includes(l))}function ot(t){return t.verified===!0||t._meta?.["mcp.mesh"]?.verified===!0}function it(t){const e=G.c(54),{registryId:l,listToolName:n,filtersToolName:c}=t,[r,a]=D.useState(""),i=Qe(r,300),m=oe(),{org:y}=X(),{scrollRef:p,saveScrollPosition:o,handleScroll:b}=Ye(`store-discovery:${l}`);let u;e[0]!==i||e[1]!==c||e[2]!==n||e[3]!==l?(u={registryId:l,listToolName:n,filtersToolName:c,search:i},e[0]=i,e[1]=c,e[2]=n,e[3]=l,e[4]=u):u=e[4];const{items:d,hasMore:j,isLoadingMore:I,isInitialLoading:N,isFetching:C,loadMore:L,availableTags:$,availableCategories:v,selectedTags:S,selectedCategories:w,setSelectedTags:T,setSelectedCategories:z,hasActiveFilters:A}=Xe(u);let k,f,x,g;e[5]!==i||e[6]!==C||e[7]!==N||e[8]!==d||e[9]!==r?(k=r?nt(d,r):d,f=(r!==i||C)&&!N&&!!r,g=k.filter(ot),x=k.filter(M=>!g.find(_=>_.id===M.id)),e[5]=i,e[6]=C,e[7]=N,e[8]=d,e[9]=r,e[10]=k,e[11]=f,e[12]=x,e[13]=g):(k=e[10],f=e[11],x=e[12],g=e[13]);const R=x;let P;e[14]!==m||e[15]!==y.slug||e[16]!==l||e[17]!==o?(P=M=>{o();const _=Le(M.name||M.title||M.server.title||""),H=M.server.name;m({to:"/$org/$project/store/$appName",params:{org:y.slug,project:ie,appName:_},search:{registryId:l,serverName:H}})},e[14]=m,e[15]=y.slug,e[16]=l,e[17]=o,e[18]=P):P=e[18];const K=P;let h;e[19]!==b||e[20]!==j||e[21]!==I||e[22]!==L?(h=M=>{if(b(),!j||I)return;const _=M.currentTarget;_.scrollHeight-_.scrollTop-_.clientHeight<200&&L()},e[19]=b,e[20]=j,e[21]=I,e[22]=L,e[23]=h):h=e[23];const F=h;let E;e[24]!==f||e[25]!==r?(E=s.jsx(ze,{value:r,onChange:a,placeholder:"Search for an MCP Server...",isSearching:f}),e[24]=f,e[25]=r,e[26]=E):E=e[26];let O;e[27]!==v||e[28]!==$||e[29]!==w||e[30]!==S||e[31]!==z||e[32]!==T?(O=s.jsx(lt,{availableTags:$,availableCategories:v,selectedTags:S,selectedCategories:w,onTagChange:T,onCategoryChange:z}),e[27]=v,e[28]=$,e[29]=w,e[30]=S,e[31]=z,e[32]=T,e[33]=O):O=e[33];let V;e[34]!==R||e[35]!==k||e[36]!==K||e[37]!==A||e[38]!==j||e[39]!==N||e[40]!==I||e[41]!==f||e[42]!==d||e[43]!==r||e[44]!==g?(V=s.jsx("div",{className:"p-5",children:s.jsx("div",{children:N?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(Z,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading items..."})]}):d.length===0&&!A?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(Ne,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No items available"}),s.jsx("p",{className:"text-muted-foreground",children:"This store doesn't have any available items yet."})]}):d.length===0&&A&&!r?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(ae,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No matching items"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your filters to find more results."})]}):r&&k.length===0&&!f?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(ce,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No results found"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your search terms."})]}):s.jsxs("div",{className:"flex flex-col gap-8",children:[f&&k.length===0&&s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(Z,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Searching..."})]}),g.length>0&&s.jsx(re,{items:g,title:"Verified",onItemClick:K}),R.length>0&&s.jsx(re,{items:R,title:g.length>0?"All":"",onItemClick:K}),j&&I&&s.jsx("div",{className:"flex justify-center py-8",children:s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[s.jsx(Z,{size:20,className:"animate-spin"}),s.jsx("span",{className:"text-sm",children:"Loading more items..."})]})})]})})}),e[34]=R,e[35]=k,e[36]=K,e[37]=A,e[38]=j,e[39]=N,e[40]=I,e[41]=f,e[42]=d,e[43]=r,e[44]=g,e[45]=V):V=e[45];let W;e[46]!==F||e[47]!==p||e[48]!==V?(W=s.jsx("div",{ref:p,className:"flex-1 overflow-y-auto",onScroll:F,children:V}),e[46]=F,e[47]=p,e[48]=V,e[49]=W):W=e[49];let q;return e[50]!==E||e[51]!==O||e[52]!==W?(q=s.jsxs("div",{className:"flex flex-col h-full",children:[E,O,W]}),e[50]=E,e[51]=O,e[52]=W,e[53]=q):q=e[53],q}function at(t){const e=G.c(8),{registryId:l}=t,n=$e(l),c=n?.tools;let r;e[0]!==c?(r=we(c),e[0]=c,e[1]=r):r=e[1];const a=r;if(!a)throw new Error("This registry does not support listing store items.");const i=n?.tools;let m;e[2]!==i?(m=Te(i),e[2]=i,e[3]=m):m=e[3];const p=m||void 0;let o;return e[4]!==a||e[5]!==l||e[6]!==p?(o=s.jsx(it,{registryId:l,listToolName:a,filtersToolName:p}),e[4]=a,e[5]=l,e[6]=p,e[7]=o):o=e[7],o}function ct(t){const e=G.c(15),{registries:l,value:n,onValueChange:c,onAddWellKnown:r,wellKnownRegistries:a,placeholder:i}=t,m=i===void 0?"Select a registry...":i;let y;e[0]!==m?(y=s.jsx(Oe,{size:"sm",className:"w-auto min-w-[160px]",children:s.jsx(Ve,{placeholder:m})}),e[0]=m,e[1]=y):y=e[1];let p;e[2]!==l?(p=l.map(mt),e[2]=l,e[3]=p):p=e[3];let o;e[4]!==r||e[5]!==a?(o=a.length>0&&s.jsxs("div",{className:"border-t border-border pt-1",children:[s.jsx("p",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Other known registries"}),a.map(d=>s.jsxs("button",{onClick:j=>{j.preventDefault(),j.stopPropagation(),r(d)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[d.icon?s.jsx("img",{src:d.icon,alt:d.title,className:"w-4 h-4 rounded"}):s.jsx("div",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:d.title.slice(0,1).toUpperCase()}),s.jsx("span",{className:"flex-1",children:d.title})]}),s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center text-muted-foreground",children:s.jsx(qe,{size:16})})]},d.id??d.title))]}),e[4]=r,e[5]=a,e[6]=o):o=e[6];let b;e[7]!==p||e[8]!==o?(b=s.jsxs(_e,{children:[p,o]}),e[7]=p,e[8]=o,e[9]=b):b=e[9];let u;return e[10]!==c||e[11]!==y||e[12]!==b||e[13]!==n?(u=s.jsxs(We,{value:n,onValueChange:c,children:[y,b]}),e[10]=c,e[11]=y,e[12]=b,e[13]=n,e[14]=u):u=e[14],u}function mt(t){return s.jsx(Me,{className:"cursor-pointer",value:t.id??t.name,children:s.jsxs("div",{className:"flex items-center gap-2",children:[t.icon?s.jsx("img",{src:t.icon,alt:t.name,className:"w-4 h-4 rounded"}):s.jsx("div",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:t.name.slice(0,1).toUpperCase()}),s.jsx("span",{children:t.name})]})},t.id??t.name)}function dt({registries:t,onConnected:e}){const l=me(),{org:{slug:n}}=X(),{data:c}=ge.useSession(),r=oe(),[a,i]=D.useState(!1),m=t[0],y=async()=>{if(!(!m||!c?.user?.id)){i(!0);try{const o=await l.create.mutateAsync(m);e?.(o.id)}finally{i(!1)}}},p=()=>{r({to:"/$org/$project/mcps",params:{org:n,project:ie},search:{action:"create"}})};return s.jsx(Ge,{image:s.jsx("img",{src:"/store-empty-state.svg",alt:"No store connected",width:336,height:320,className:"max-w-full h-auto"}),title:"Connect to registry",description:"Connect to discover and use Connections from the community.",actions:s.jsxs(s.Fragment,{children:[s.jsxs(J,{variant:"outline",onClick:y,disabled:a||!m,children:[m?.icon&&s.jsx("img",{src:m.icon,alt:"",className:"size-4"}),a?"Installing...":"Install Registry"]}),s.jsx(J,{variant:"outline",onClick:p,children:"Custom Connection"})]})})}function Zt(){const t=G.c(42),{org:e}=X(),l=ke(),n=me(),c=pe(),r=c.location.pathname.includes("/store/")&&c.location.pathname.split("/").length>3,a=He(l);let i;t[0]!==a?(i=a.map(xt),t[0]=a,t[1]=i):i=t[1];const m=i;let y;t[2]!==e.slug?(y=Ue.selectedRegistry(e.slug),t[2]=e.slug,t[3]=y):y=t[3];const[p,o]=Je(y,ut);let b;if(t[4]!==a||t[5]!==p){let h;t[7]!==p?(h=F=>F.id===p,t[7]=p,t[8]=h):h=t[8],b=a.find(h),t[4]=a,t[5]=p,t[6]=b}else b=t[6];const d=b?.id||a[0]?.id||"";let j;t[9]!==e.id?(j=Re(e.id),t[9]=e.id,t[10]=j):j=t[10];let I;t[11]!==j?(I=[j],t[11]=j,t[12]=I):I=t[12];const N=I;let C;t[13]===Symbol.for("react.memo_cache_sentinel")?(C=[Pe()],t[13]=C):C=t[13];const L=C;let $;t[14]!==n.create||t[15]!==o?($=async h=>{const F=await n.create.mutateAsync(h);o(F.id)},t[14]=n.create,t[15]=o,t[16]=$):$=t[16];const v=$;let S;t[17]!==a?(S=new Set(a.map(ft)),t[17]=a,t[18]=S):S=t[18];const w=S;let T;t[19]!==w||t[20]!==N?(T=N.filter(h=>h.id&&!w.has(h.id)),t[19]=w,t[20]=N,t[21]=T):T=t[21];const z=T;let A;t[22]!==w?(A=L.filter(h=>h.id&&!w.has(h.id)),t[22]=w,t[23]=A):A=t[23];const k=A;if(r){let h;return t[24]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(he,{}),t[24]=h):h=t[24],h}let f;t[25]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(U.Header.Left,{children:s.jsx(je,{children:s.jsx(ve,{children:s.jsx(ye,{children:s.jsx(be,{children:"Store"})})})})}),t[25]=f):f=t[25];let x;t[26]!==v?(x=async h=>v(h),t[26]=v,t[27]=x):x=t[27];let g;t[28]!==z||t[29]!==d||t[30]!==m||t[31]!==o||t[32]!==x?(g=s.jsxs(U.Header,{children:[f,s.jsx(U.Header.Right,{children:s.jsx(ct,{wellKnownRegistries:z,registries:m,value:d,onValueChange:o,onAddWellKnown:x,placeholder:"Select store..."})})]}),t[28]=z,t[29]=d,t[30]=m,t[31]=o,t[32]=x,t[33]=g):g=t[33];let R;t[34]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(Z,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading store items..."})]}),t[34]=R):R=t[34];let P;t[35]!==k||t[36]!==d||t[37]!==o?(P=s.jsx(U.Content,{children:s.jsx(D.Suspense,{fallback:R,children:d?s.jsx(at,{registryId:d}):s.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:s.jsx(dt,{registries:k,onConnected:h=>{o(h)}})})})}),t[35]=k,t[36]=d,t[37]=o,t[38]=P):P=t[38];let K;return t[39]!==g||t[40]!==P?(K=s.jsxs(U,{children:[g,P]}),t[39]=g,t[40]=P,t[41]=K):K=t[41],K}function ft(t){return t.id}function ut(t){return t??""}function xt(t){return{id:t.id,name:t.title,icon:t.icon||void 0}}export{Zt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as b,j as s,r as A,u as ne,g as oe,t as ee}from"./index-BnM6zXPK.js";import{V as ae,C as g}from"./index-lkQ_SnE8.js";import{T as ce,i as me,a as de,t as fe}from"./typewriter-title-DmosCyda.js";import{E as ue}from"./error-boundary-D1nW3qw3.js";import{u as Z,S as Y}from"./use-deco-chat-open-BpzqC0Eg.js";import{I as te,T as J,a as Q,b as X}from"./integration-icon-GQvaX0z4.js";import{P as pe,a as he,b as xe}from"./popover-BDHymXMd.js";import{c as se,B as H}from"./button-ds0Xf2u_.js";import{i as ge,d as je}from"./constants-pTCFS1GU.js";import{b as be}from"./use-virtual-mcp-B-em4IGd.js";import{i as ye}from"./ChevronRight-DhFCl7fQ.js";import{t as le}from"./Users03-DUHQ5891.js";import{P as E}from"./index-BzK60eGa.js";import{c as Ne}from"./Pin01-B7AGhCqq.js";import{s as _e}from"./Plus-oe5n7shW.js";import{i as Se}from"./Share07-DuMFfxOm.js";import"./spinner-Bx7trFel.js";import"./use-mcp-prompts-GQRi1KzV.js";import"./useQuery-B8N1a1vY.js";import"./dialog-1X4BWtmD.js";import"./X-DbHlFzca.js";import"./form-CCnPwGY1.js";import"./label-By7PTlud.js";import"./input-CoSRI0XN.js";import"./ArrowUp-D5TY17yS.js";import"./ChevronDown--AD2MLIh.js";import"./Edit01-DwOJTHYN.js";import"./AlertCircle-fs-iLCxQ.js";import"./ArrowLeft-BOU-qvMz.js";import"./badge-DnrGjfKN.js";import"./Check-woCJI4Zk.js";import"./Code01-DOUE7D86.js";import"./infiniteQueryObserver-DwX9yony.js";import"./SearchMd-Ctirl108.js";import"./use-create-virtual-mcp-AQ2ouFC3.js";import"./usage-B8eRkRZY.js";import"./Copy01-DhF1Yrkw.js";import"./Terminal-DjfPKa_L.js";import"./monaco-editor-lPTVHX05.js";import"./localstorage-keys-DEZN3FMx.js";import"./useMutation-OCNp6OYx.js";import"./empty-state-CJnfgDRv.js";import"./use-connection-AuebM5gu.js";import"./generate-id-Dyweu44Y.js";import"./Trash01-h3f3UFq5.js";import"./use-llm-D32w61hb.js";import"./use-binding-C0O2f-XN.js";import"./binder-DWar94Dz.js";import"./select-DMMlFWJe.js";import"./index-B-34EG7J.js";import"./File06-BaXucUWw.js";import"./Grid01-BvWVxRRn.js";import"./Image01-CD-baYxu.js";import"./RefreshCcw01-DQu-afd1.js";function ve(e){const t=b.c(15),{agent:l}=e,{setVirtualMcpId:p}=Z();let r;t[0]!==l.id||t[1]!==p?(r=()=>{p(l.id)},t[0]=l.id,t[1]=p,t[2]=r):r=t[2];const i=r;let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=se("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),t[3]=m):m=t[3];const d=`Select agent ${l.title}`;let n;t[4]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(le,{size:20}),t[4]=n):n=t[4];let c;t[5]!==l.icon||t[6]!==l.title?(c=s.jsx(te,{icon:l.icon,name:l.title,fallbackIcon:n}),t[5]=l.icon,t[6]=l.title,t[7]=c):c=t[7];let o;t[8]!==l.title?(o=s.jsx("p",{className:"text-sm text-foreground text-center leading-tight line-clamp-2",children:l.title}),t[8]=l.title,t[9]=o):o=t[9];let a;return t[10]!==i||t[11]!==d||t[12]!==c||t[13]!==o?(a=s.jsxs("button",{type:"button",onClick:i,className:m,"aria-label":d,children:[c,o]}),t[10]=i,t[11]=d,t[12]=c,t[13]=o,t[14]=a):a=t[14],a}function Ce(e){const t=b.c(14),{virtualMcps:l,selectedVirtualMcpId:p,onVirtualMcpChange:r}=e,[i,m]=A.useState(!1),d=A.useRef(null);let n,c;t[0]!==i?(n=()=>{i&&setTimeout(()=>{d.current?.focus()},0)},c=[i],t[0]=i,t[1]=n,t[2]=c):(n=t[1],c=t[2]),A.useEffect(n,c);let o;t[3]!==r?(o=y=>{r(y),m(!1)},t[3]=r,t[4]=o):o=t[4];const a=o;let f;t[5]===Symbol.for("react.memo_cache_sentinel")?(f=se("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),t[5]=f):f=t[5];let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(pe,{asChild:!0,children:s.jsxs("button",{type:"button",className:f,"aria-label":"See all agents",children:[s.jsx("div",{className:"size-12 rounded-lg bg-accent flex items-center justify-center shrink-0",children:s.jsx(ye,{size:24,className:"text-foreground"})}),s.jsx("p",{className:"text-sm text-foreground text-center leading-tight",children:"See all"})]})}),t[6]=u):u=t[6];let h;t[7]!==a||t[8]!==p||t[9]!==l?(h=s.jsx(he,{className:"w-[550px] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,children:s.jsx(ae,{virtualMcps:l,selectedVirtualMcpId:p,onVirtualMcpChange:a,searchInputRef:d})}),t[7]=a,t[8]=p,t[9]=l,t[10]=h):h=t[10];let j;return t[11]!==i||t[12]!==h?(j=s.jsxs(xe,{open:i,onOpenChange:m,children:[u,h]}),t[11]=i,t[12]=h,t[13]=j):j=t[13],j}function we(){const e=b.c(20),t=be(),{selectedVirtualMcp:l,setVirtualMcpId:p}=Z();let r,i,m,d,n,c;if(e[0]!==t){n=Symbol.for("react.early_return_sentinel");e:{const h=t.filter(ze).slice(0,6);if(h.length===0){n=null;break e}c=t.map(Te),m="w-full max-w-[800px]",e[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("h2",{className:"text-sm font-medium text-muted-foreground mb-4",children:"Recently used agents"}),e[7]=d):d=e[7],r="grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",i=h.map(ke)}e[0]=t,e[1]=r,e[2]=i,e[3]=m,e[4]=d,e[5]=n,e[6]=c}else r=e[1],i=e[2],m=e[3],d=e[4],n=e[5],c=e[6];if(n!==Symbol.for("react.early_return_sentinel"))return n;const o=l?.id??null;let a;e[8]!==p||e[9]!==o||e[10]!==c?(a=s.jsx(Ce,{virtualMcps:c,selectedVirtualMcpId:o,onVirtualMcpChange:p}),e[8]=p,e[9]=o,e[10]=c,e[11]=a):a=e[11];let f;e[12]!==r||e[13]!==i||e[14]!==a?(f=s.jsxs("div",{className:r,children:[i,a]}),e[12]=r,e[13]=i,e[14]=a,e[15]=f):f=e[15];let u;return e[16]!==m||e[17]!==d||e[18]!==f?(u=s.jsxs("div",{className:m,children:[d,f]}),e[16]=m,e[17]=d,e[18]=f,e[19]=u):u=e[19],u}function ke(e){return s.jsx(ve,{agent:e},e.id??"default")}function Te(e){return{id:e.id,title:e.title,description:e.description,icon:e.icon}}function ze(e){return e.id!==null&&!ge(e.id)}function Me(){const e=b.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Y,{className:"h-5 w-40 mb-4"}),e[0]=t):t=e[0];let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("div",{className:"w-full max-w-[800px]",children:[t,s.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",children:Array.from({length:7}).map(Ie)})]}),e[1]=l):l=e[1],l}function Ie(e,t){return s.jsxs("div",{className:"flex flex-col items-center gap-3 p-2 self-stretch",children:[s.jsx(Y,{className:"size-6 rounded-md shrink-0"}),s.jsx(Y,{className:"h-4 w-full"})]},t)}function Pe(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(A.Suspense,{fallback:s.jsx(Me,{}),children:s.jsx(we,{})}),e[0]=t):t=e[0],t}function $e(){const e=new Date().getHours();return e>=5&&e<12?"Morning":e>=12&&e<17?"Afternoon":e>=17&&e<22?"Evening":"Night"}function Ve(){const e=b.c(61),{org:t}=ne(),{data:l}=oe.useSession(),{modelsConnections:p,isChatEmpty:r,activeThreadId:i,createThread:m,switchToThread:d,threads:n,selectedVirtualMcp:c}=Z();let o;if(e[0]!==i||e[1]!==n){let x;e[3]!==i?(x=re=>re.id===i,e[3]=i,e[4]=x):x=e[4],o=n.find(x),e[0]=i,e[1]=n,e[2]=o}else o=e[2];const a=o,[f,u]=A.useState(!1);let h;e[5]!==l?.user?.name?(h=l?.user?.name?.split(" ")[0]||"there",e[5]=l?.user?.name,e[6]=h):h=e[6];const j=h;let y;e[7]===Symbol.for("react.memo_cache_sentinel")?(y=$e(),e[7]=y):y=e[7];const ie=y;let R;e[8]!==t.id?(R=je(t.id),e[8]=t.id,e[9]=R):R=e[9];const B=c??R;if(p.length===0){let x;return e[10]!==t?(x=s.jsx("div",{className:"flex flex-col size-full bg-background items-center justify-center",children:s.jsx(g.NoLlmBindingEmptyState,{org:t})}),e[10]=t,e[11]=x):x=e[11],x}let N;e[12]!==a?(N=a?.title&&s.jsx(ce,{text:a.title,className:"text-sm font-medium text-foreground"}),e[12]=a,e[13]=N):N=e[13];let _;e[14]!==N?(_=s.jsx(E.Header.Left,{className:"gap-2",children:N}),e[14]=N,e[15]=_):_=e[15];let S;e[16]!==m?(S=()=>m(),e[16]=m,e[17]=S):S=e[17];let L;e[18]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(_e,{size:16}),e[18]=L):L=e[18];let v;e[19]!==r||e[20]!==S?(v=s.jsx(J,{asChild:!0,children:s.jsx(H,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:S,disabled:r,"aria-label":"New chat",children:L})}),e[19]=r,e[20]=S,e[21]=v):v=e[21];let O;e[22]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(Q,{children:"New chat"}),e[22]=O):O=e[22];let C;e[23]!==v?(C=s.jsxs(X,{children:[v,O]}),e[23]=v,e[24]=C):C=e[24];let D;e[25]===Symbol.for("react.memo_cache_sentinel")?(D=()=>u(!0),e[25]=D):D=e[25];let F;e[26]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsxs(X,{children:[s.jsx(J,{asChild:!0,children:s.jsx(H,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:D,"aria-label":"Chat history",children:s.jsx(me,{size:16})})}),s.jsx(Q,{children:"Chat history"})]}),e[26]=F):F=e[26];let W;e[27]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(Ne,{size:16}),e[27]=W):W=e[27];let w;e[28]!==r?(w=s.jsx(J,{asChild:!0,children:s.jsx(H,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:Ee,disabled:r,"aria-label":"Pin chat",children:W})}),e[28]=r,e[29]=w):w=e[29];let q;e[30]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(Q,{children:"Pin chat"}),e[30]=q):q=e[30];let k;e[31]!==w?(k=s.jsxs(X,{children:[w,q]}),e[31]=w,e[32]=k):k=e[32];let G;e[33]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsx(Se,{size:16}),e[33]=G):G=e[33];let T;e[34]!==r?(T=s.jsx(J,{asChild:!0,children:s.jsx(H,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:Ae,disabled:r,"aria-label":"Share chat",children:G})}),e[34]=r,e[35]=T):T=e[35];let K;e[36]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(Q,{children:"Share chat"}),e[36]=K):K=e[36];let z;e[37]!==T?(z=s.jsxs(X,{children:[T,K]}),e[37]=T,e[38]=z):z=e[38];let M;e[39]!==C||e[40]!==k||e[41]!==z?(M=s.jsxs(E.Header.Right,{className:"gap-1",children:[C,F,k,z]}),e[39]=C,e[40]=k,e[41]=z,e[42]=M):M=e[42];let I;e[43]!==M||e[44]!==_?(I=s.jsxs(E.Header,{className:"flex-none z-10 bg-background",children:[_,M]}),e[43]=M,e[44]=_,e[45]=I):I=e[45];let P;e[46]!==B||e[47]!==r||e[48]!==j?(P=r?s.jsxs("div",{className:"flex-1 min-h-0 flex flex-col items-center justify-center px-10 pb-32 pt-10",children:[s.jsxs("div",{className:"flex flex-col items-center gap-3 w-full max-w-[600px]",children:[s.jsx("div",{className:"flex justify-center",children:s.jsx(te,{icon:B.icon,name:B.title,size:"md",fallbackIcon:s.jsx(le,{size:20}),className:"size-12 rounded-xl border border-stone-200/60 shadow-sm aspect-square transition-opacity duration-200"})}),s.jsxs("div",{className:"text-center",children:[s.jsxs("p",{className:"text-lg font-medium text-foreground",children:[ie," ",j,","]}),s.jsx("p",{className:"text-base text-muted-foreground opacity-50 mb-0",children:"What are we building today?"})]}),s.jsx("div",{className:"w-full -mt-1",children:s.jsx(g.Input,{})}),s.jsx(g.IceBreakers,{className:"w-full"})]}),s.jsx("div",{className:"flex flex-col items-center w-full mt-4",children:s.jsx(Pe,{})})]}):s.jsxs(s.Fragment,{children:[s.jsx(g.Main,{children:s.jsx(g.Messages,{})}),s.jsx(g.Footer,{children:s.jsx(g.Input,{})})]}),e[46]=B,e[47]=r,e[48]=j,e[49]=P):P=e[49];let $;e[50]!==d?($=async x=>{await d(x),u(!1)},e[50]=d,e[51]=$):$=e[51];let V;e[52]!==i||e[53]!==f||e[54]!==$||e[55]!==n?(V=s.jsx(de,{open:f,onOpenChange:u,threads:n,activeThreadId:i,onThreadSelect:$}),e[52]=i,e[53]=f,e[54]=$,e[55]=n,e[56]=V):V=e[56];let U;return e[57]!==I||e[58]!==P||e[59]!==V?(U=s.jsxs(g,{className:"bg-background",children:[I,P,V]}),e[57]=I,e[58]=P,e[59]=V,e[60]=U):U=e[60],U}function Ae(){ee.info("Share feature coming soon")}function Ee(){ee.info("Pin feature coming soon")}function He(e){const t=b.c(14),{error:l,onRetry:p}=e,r=l?.message?.includes("401")||l?.message?.toLowerCase().includes("unauthorized");let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(E.Header,{className:"flex-none",children:[s.jsx(E.Header.Left,{className:"gap-2"}),s.jsx(E.Header.Right,{className:"gap-1"})]}),t[0]=i):i=t[0];let m;t[1]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full mx-auto w-fit",children:s.jsx(fe,{className:"h-6 w-6 text-destructive"})}),t[1]=m):m=t[1];const d=r?"Unable to load models":"Something went wrong";let n;t[2]!==d?(n=s.jsx("h3",{className:"text-lg font-medium",children:d}),t[2]=d,t[3]=n):n=t[3];const c=r?"There was an authentication error while loading the models. This might be due to an expired session or invalid API key.":l?.message||"An unexpected error occurred";let o;t[4]!==c?(o=s.jsx("p",{className:"text-sm text-muted-foreground",children:c}),t[4]=c,t[5]=o):o=t[5];let a;t[6]!==n||t[7]!==o?(a=s.jsxs("div",{className:"space-y-2",children:[n,o]}),t[6]=n,t[7]=o,t[8]=a):a=t[8];let f;t[9]!==p?(f=s.jsx(H,{variant:"outline",onClick:p,children:"Try again"}),t[9]=p,t[10]=f):f=t[10];let u;return t[11]!==a||t[12]!==f?(u=s.jsxs(g,{className:"bg-background",children:[i,s.jsx("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center",children:s.jsxs("div",{className:"max-w-sm space-y-4",children:[m,a,f]})})]}),t[11]=a,t[12]=f,t[13]=u):u=t[13],u}function Lt(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ue,{fallback:Re,children:s.jsx(A.Suspense,{fallback:s.jsx(g.Skeleton,{className:"bg-background"}),children:s.jsx(Ve,{})})}),e[0]=t):t=e[0],t}function Re(e){const{error:t,resetError:l}=e;return s.jsx(He,{error:t,onRetry:l})}export{Lt as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{r as y,c as N,j as n,u as ae,m as xe,bs as We,L as ze,bo as ls,bB as os,O as ee,a4 as xt,v as is,y as as,g as ie,t as de,a_ as cs,bC as ht,a as st,bD as ds,b2 as gt,bE as $e,A as ms,S as jt,b as fs,e as us,N as ps,n as xs,K as hs,l as bt,P as gs}from"./index-BnM6zXPK.js";import{C as le,u as Ve,i as js}from"./index-lkQ_SnE8.js";import{I as bs,n as vs,a as He,c as vt,T as Ue,b as Be}from"./integration-icon-GQvaX0z4.js";import{P as _e}from"./index-BzK60eGa.js";import{e as Ge,u as Ns,S as te,g as Nt,C as Ss,f as ys,h as ws}from"./use-deco-chat-open-BpzqC0Eg.js";import{c as z,B as se}from"./button-ds0Xf2u_.js";import{d as Cs}from"./constants-pTCFS1GU.js";import{T as ks,i as _s,b as zs,S as $s,c as Is,d as Os,e as Ps,f as Ts,t as St}from"./typewriter-title-DmosCyda.js";import{s as Ke}from"./Plus-oe5n7shW.js";import{t as yt}from"./Users03-DUHQ5891.js";import{i as Fe}from"./X-DbHlFzca.js";import{E as wt}from"./error-boundary-D1nW3qw3.js";import{C as Ct}from"./create-project-dialog-YGz5z2Zi.js";import{n as kt}from"./CheckDone01-CaHocOrI.js";import{a as Ms}from"./Home02-Y_J2Mjhf.js";import{u as Es,a as _t}from"./use-project-gMu9ypju.js";import{u as Me}from"./use-mobile-BxIj_uNd.js";import{t as nt}from"./ChevronDown--AD2MLIh.js";import{A as me}from"./avatar-CB2Y6aAq.js";import{b as rt,P as lt,a as ot}from"./popover-BDHymXMd.js";import{n as ct}from"./Inbox01-nefVdQqD.js";import{B as dt}from"./badge-DnrGjfKN.js";import{i as Oe}from"./Check-woCJI4Zk.js";import{s as mt}from"./XClose-BpJNyKul.js";import{i as zt}from"./ChevronRight-DhFCl7fQ.js";import{a as it}from"./Settings02-DwBbKcxc.js";import{C as $t}from"./create-organization-dialog-DKpRSfJS.js";import{c as As,b as Ls,g as Ds,a as Rs,D as Hs}from"./dialog-1X4BWtmD.js";import{L as qe}from"./label-By7PTlud.js";import{S as Je}from"./switch-C0yi6OVV.js";import{i as Us}from"./Code01-DOUE7D86.js";import{a as It}from"./Copy01-DhF1Yrkw.js";import{u as Ot,a as Bs}from"./use-organization-settings-Boown5qg.js";import{i as Fs}from"./File06-BaXucUWw.js";import{I as Ws}from"./input-CoSRI0XN.js";import{c as Vs}from"./Grid01-BvWVxRRn.js";import{a as Gs,T as Ks}from"./topbar-portal-C8JJoQbr.js";import{a as Zs,b as Ys,D as qs,c as Js,g as ft}from"./dropdown-menu-Ckg1hXqa.js";import{n as ut}from"./LinkExternal01-CTFxzrDd.js";import{t as Xs}from"./Settings01-DfshLY3d.js";import{u as Pt,L as Tt}from"./localstorage-keys-DEZN3FMx.js";import{R as Qs,a as Mt,b as en}from"./resizable-2kAlJwn8.js";import"./spinner-Bx7trFel.js";import"./use-mcp-prompts-GQRi1KzV.js";import"./useQuery-B8N1a1vY.js";import"./form-CCnPwGY1.js";import"./ArrowUp-D5TY17yS.js";import"./Edit01-DwOJTHYN.js";import"./AlertCircle-fs-iLCxQ.js";import"./ArrowLeft-BOU-qvMz.js";import"./use-virtual-mcp-B-em4IGd.js";import"./use-connection-AuebM5gu.js";import"./useMutation-OCNp6OYx.js";import"./SearchMd-Ctirl108.js";import"./use-create-virtual-mcp-AQ2ouFC3.js";import"./usage-B8eRkRZY.js";import"./Terminal-DjfPKa_L.js";import"./monaco-editor-lPTVHX05.js";import"./empty-state-CJnfgDRv.js";import"./generate-id-Dyweu44Y.js";import"./Trash01-h3f3UFq5.js";import"./index-B-34EG7J.js";import"./use-llm-D32w61hb.js";import"./use-binding-C0O2f-XN.js";import"./binder-DWar94Dz.js";import"./select-DMMlFWJe.js";import"./Image01-CD-baYxu.js";import"./RefreshCcw01-DQu-afd1.js";import"./textarea-CeRheA0Q.js";import"./alert-dialog-DlRleLL5.js";import"./infiniteQueryObserver-DwX9yony.js";const Xe=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M7 17 17 7m0 0H7m10 0v10"}));Xe.displayName="ArrowUpRight";const Et=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"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"}));Et.displayName="BarChart10";const At=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"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"}));At.displayName="BookOpen01";const Lt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M15 21v-5.4c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C14.24 14 13.96 14 13.4 14h-2.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C9 14.76 9 15.04 9 15.6V21M3 7a3 3 0 0 0 6 0 3 3 0 1 0 6 0 3 3 0 1 0 6 0M6.2 21h11.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3H6.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21Z"}));Lt.displayName="Building02";const Dt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m18 17-5-5 5-5m-7 10-5-5 5-5"}));Dt.displayName="ChevronLeftDouble";const Rt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m6 17 5-5-5-5m7 10 5-5-5-5"}));Rt.displayName="ChevronRightDouble";const Qe=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M11 4.5h7.3c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874c.218.428.218.988.218 2.108V9c0 .932 0 1.398-.152 1.765a2 2 0 0 1-1.083 1.083C19.898 12 19.432 12 18.5 12M13 19.5H5.7c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C2.5 17.98 2.5 17.42 2.5 16.3V15c0-.932 0-1.398.152-1.765a2 2 0 0 1 1.083-1.083C4.102 12 4.568 12 5.5 12m4.8 2.5h3.4c.28 0 .42 0 .527-.055a.5.5 0 0 0 .218-.218c.055-.107.055-.247.055-.527v-3.4c0-.28 0-.42-.055-.527a.5.5 0 0 0-.218-.218C14.12 9.5 13.98 9.5 13.7 9.5h-3.4c-.28 0-.42 0-.527.055a.5.5 0 0 0-.218.218c-.055.107-.055.247-.055.527v3.4c0 .28 0 .42.055.527a.5.5 0 0 0 .218.218c.107.055.247.055.527.055Zm7.5 7.5h3.4c.28 0 .42 0 .527-.055a.5.5 0 0 0 .218-.218C22 21.62 22 21.48 22 21.2v-3.4c0-.28 0-.42-.055-.527a.5.5 0 0 0-.218-.218C21.62 17 21.48 17 21.2 17h-3.4c-.28 0-.42 0-.527.055a.5.5 0 0 0-.218.218C17 17.38 17 17.52 17 17.8v3.4c0 .28 0 .42.055.527a.5.5 0 0 0 .218.218c.107.055.247.055.527.055ZM2.8 7h3.4c.28 0 .42 0 .527-.054a.5.5 0 0 0 .218-.219C7 6.62 7 6.48 7 6.2V2.8c0-.28 0-.42-.054-.527a.5.5 0 0 0-.219-.219C6.62 2 6.48 2 6.2 2H2.8c-.28 0-.42 0-.527.054a.5.5 0 0 0-.219.219C2 2.38 2 2.52 2 2.8v3.4c0 .28 0 .42.054.527a.5.5 0 0 0 .219.218C2.38 7 2.52 7 2.8 7Z"}));Qe.displayName="Dataflow03";const Ht=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M8 14s1.5 2 4 2 4-2 4-2m-1-5h.01M9 9h.01M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-6.5-3a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Zm-6 0a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Z"}));Ht.displayName="FaceSmile";const Ut=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M2 12h20M2 12c0 5.523 4.477 10 10 10M2 12C2 6.477 6.477 2 12 2m10 10c0 5.523-4.477 10-10 10m10-10c0-5.523-4.477-10-10-10m0 0a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10m0-20a15.3 15.3 0 0 0-4 10 15.3 15.3 0 0 0 4 10"}));Ut.displayName="Globe01";const Bt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"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",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m16 17 5-5m0 0-5-5m5 5H9m0-9H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 21 6.12 21 7.8 21H9"}));Ft.displayName="LogOut01";const Wt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"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",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"m2 7 8.165 5.715c.661.463.992.695 1.351.784a2 2 0 0 0 .968 0c.36-.09.69-.32 1.351-.784L22 7M6.8 20h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 17.72 22 16.88 22 15.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 4 18.88 4 17.2 4H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 6.28 2 7.12 2 8.8v6.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 20 5.12 20 6.8 20Z"}));Vt.displayName="Mail01";const Gt=({size:t=24,color:e="currentColor",...s})=>y.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},y.createElement("path",{d:"M3 8h12m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0Zm-6 8h12M9 16a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}));Gt.displayName="Settings04";function tn(){const t=N.c(65),{org:e}=ae(),[,s]=Ge(),{selectedVirtualMcp:r,modelsConnections:l,isChatEmpty:o,activeThreadId:i,createThread:a,switchToThread:c,threads:d}=Ns();let m;if(t[0]!==i||t[1]!==d){let G;t[3]!==i?(G=K=>K.id===i,t[3]=i,t[4]=G):G=t[4],m=d.find(G),t[0]=i,t[1]=d,t[2]=m}else m=t[2];const f=m,[u,p]=y.useState(!1),[x,h]=y.useTransition();let j;t[5]!==e.id?(j=Cs(e.id),t[5]=e.id,t[6]=j):j=t[6];const g=r??j;let v;t[7]!==a?(v=()=>{h(()=>{a()})},t[7]=a,t[8]=v):v=t[8];const S=v;if(l.length===0){let G;t[9]===Symbol.for("react.memo_cache_sentinel")?(G=n.jsx(_e.Header.Left,{className:"gap-2"}),t[9]=G):G=t[9];let K;t[10]!==s?(K=()=>s(!1),t[10]=s,t[11]=K):K=t[11];let X;t[12]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx(Fe,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[12]=X):X=t[12];let Y;t[13]!==K?(Y=n.jsxs(_e.Header,{className:"flex-none",children:[G,n.jsx(_e.Header.Right,{className:"gap-1",children:n.jsx("button",{type:"button",onClick:K,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:X})})]}),t[13]=K,t[14]=Y):Y=t[14];let O;t[15]!==e?(O=n.jsx(le.Main,{className:"flex flex-col items-center",children:n.jsx(le.EmptyState,{children:n.jsx(le.NoLlmBindingEmptyState,{title:"No model provider connected",description:"Connect to a model provider to unlock AI-powered features.",org:e})})}),t[15]=e,t[16]=O):O=t[16];let L;return t[17]!==Y||t[18]!==O?(L=n.jsxs(le,{children:[Y,O]}),t[17]=Y,t[18]=O,t[19]=L):L=t[19],L}const C=u?"duration-300 opacity-0 -translate-x-4 pointer-events-none":x?"duration-200 opacity-0 pointer-events-none":"duration-300 opacity-100 translate-x-0";let w;t[20]!==C?(w=z("absolute inset-0 flex flex-col transition-all ease-in-out",C),t[20]=C,t[21]=w):w=t[21];let _;t[22]!==f||t[23]!==o?(_=!o&&f?.title&&n.jsx(ks,{text:f.title,className:"text-sm font-medium text-foreground"}),t[22]=f,t[23]=o,t[24]=_):_=t[24];let P;t[25]!==_?(P=n.jsx(_e.Header.Left,{className:"gap-2",children:_}),t[25]=_,t[26]=P):P=t[26];let k;t[27]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(Ke,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[27]=k):k=t[27];let $;t[28]!==S||t[29]!==x?($=n.jsx("button",{type:"button",onClick:S,disabled:x,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",title:"New chat",children:k}),t[28]=S,t[29]=x,t[30]=$):$=t[30];let I;t[31]===Symbol.for("react.memo_cache_sentinel")?(I=()=>p(!0),t[31]=I):I=t[31];let M;t[32]===Symbol.for("react.memo_cache_sentinel")?(M=n.jsx("button",{type:"button",onClick:I,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"Chat history",children:n.jsx(_s,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})}),t[32]=M):M=t[32];let T;t[33]!==s?(T=()=>s(!1),t[33]=s,t[34]=T):T=t[34];let B;t[35]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsx(Fe,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[35]=B):B=t[35];let E;t[36]!==T?(E=n.jsx("button",{type:"button",onClick:T,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:B}),t[36]=T,t[37]=E):E=t[37];let D;t[38]!==E||t[39]!==$?(D=n.jsxs(_e.Header.Right,{className:"gap-1",children:[$,M,E]}),t[38]=E,t[39]=$,t[40]=D):D=t[40];let R;t[41]!==D||t[42]!==P?(R=n.jsxs(_e.Header,{className:"flex-none",children:[P,D]}),t[41]=D,t[42]=P,t[43]=R):R=t[43];let A;t[44]!==g||t[45]!==o?(A=n.jsx(le.Main,{children:o?n.jsx(le.EmptyState,{children:n.jsxs("div",{className:"flex flex-col items-center gap-6 w-full px-4",children:[n.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 p-0 text-center",children:[n.jsx(bs,{icon:g.icon,name:g.title,size:"lg",fallbackIcon:n.jsx(yt,{size:32}),className:"size-[60px]! rounded-[18px]!"}),n.jsx("h3",{className:"text-xl font-medium text-foreground",children:g.title}),n.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:g.description??"Ask anything about configuring model providers or using MCP Mesh."})]}),n.jsx(le.IceBreakers,{})]})}):n.jsx(le.Messages,{})}),t[44]=g,t[45]=o,t[46]=A):A=t[46];let H;t[47]===Symbol.for("react.memo_cache_sentinel")?(H=n.jsx(le.Footer,{children:n.jsx(le.Input,{})}),t[47]=H):H=t[47];let F;t[48]!==R||t[49]!==A||t[50]!==w?(F=n.jsxs("div",{className:w,children:[R,A,H]}),t[48]=R,t[49]=A,t[50]=w,t[51]=F):F=t[51];const U=u?"opacity-100 translate-x-0":"opacity-0 translate-x-4 pointer-events-none";let W;t[52]!==U?(W=z("absolute inset-0 flex flex-col transition-all duration-300 ease-in-out",U),t[52]=U,t[53]=W):W=t[53];let V;t[54]===Symbol.for("react.memo_cache_sentinel")?(V=()=>p(!1),t[54]=V):V=t[54];let Z;t[55]!==i||t[56]!==c||t[57]!==d?(Z=n.jsx(zs,{threads:d,activeThreadId:i,onThreadSelect:c,onClose:V}),t[55]=i,t[56]=c,t[57]=d,t[58]=Z):Z=t[58];let q;t[59]!==W||t[60]!==Z?(q=n.jsx("div",{className:W,children:Z}),t[59]=W,t[60]=Z,t[61]=q):q=t[61];let J;return t[62]!==F||t[63]!==q?(J=n.jsxs(le,{className:"relative overflow-hidden",children:[F,q]}),t[62]=F,t[63]=q,t[64]=J):J=t[64],J}function sn(){const t=N.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(le.Skeleton,{}),t[0]=e):e=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(wt,{fallback:e,children:n.jsx(y.Suspense,{fallback:n.jsx(le.Skeleton,{}),children:n.jsx(tn,{})})}),t[1]=s):s=t[1],s}function nn(){const t=N.c(36),[e]=Ve(),{locator:s,org:r}=ae(),l=xe(),o=We(),{org:i,project:a}=ze.parse(s),c=ze.isOrgAdminProject(s),{data:d}=Es(r.id,a);let m;t[0]!==d?.enabledPlugins?(m=d?.enabledPlugins??[],t[0]=d?.enabledPlugins,t[1]=m):m=t[1];const f=m;let u;t[2]!==f?(u=O=>f.includes(O.pluginId),t[2]=f,t[3]=u):u=t[3];const p=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=n.jsx(Ms,{}),t[4]=h):h=t[4];const j={key:"home",label:"Home",icon:h,onClick:()=>{x?window.dispatchEvent(new CustomEvent("reset-home-view")):l({to:"/$org/$project",params:{org:i,project:a}})}};let b;t[5]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(kt,{}),t[5]=b):b=t[5];const g={key:"tasks",label:"Tasks",icon:b,onClick:()=>l({to:"/$org/$project/tasks",params:{org:i,project:ee}})};let v;t[6]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(vs,{}),t[6]=v):v=t[6];const S={key:"mcps",label:"Connections",icon:v,onClick:()=>l({to:"/$org/$project/mcps",params:{org:i,project:ee}})};let C;t[7]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(xt,{}),t[7]=C):C=t[7];const w={key:"projects",label:"Projects",icon:C,onClick:()=>l({to:"/$org/$project/projects",params:{org:i,project:ee}})};let _;t[8]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(Lt,{}),t[8]=_):_=t[8];const P={key:"store",label:"Store",icon:_,onClick:()=>l({to:"/$org/$project/store",params:{org:i,project:ee}})};let k;t[9]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(yt,{}),t[9]=k):k=t[9];const $={key:"agents",label:"Agents",icon:k,onClick:()=>l({to:"/$org/$project/agents",params:{org:i,project:ee}})};let I;t[10]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsx(Et,{}),t[10]=I):I=t[10];const M={key:"monitoring",label:"Monitor",icon:I,onClick:()=>l({to:"/$org/$project/monitoring",params:{org:i,project:ee}})};let T;t[11]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(Qe,{}),t[11]=T):T=t[11];const B={key:"workflows",label:"Workflows",icon:T,onClick:()=>l({to:"/$org/$project/workflows",params:{org:i,project:ee}})};let E;t[12]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx(Ht,{}),t[12]=E):E=t[12];const D={key:"members",label:"Members",icon:E,onClick:()=>l({to:"/$org/$project/members",params:{org:i,project:ee}})},R=[...e.experimental_tasks?[g]:[],S,B,...e.experimental_projects?[w]:[],P,$,M,D],A=p.map(O=>({key:O.pluginId,label:O.label,icon:O.icon,onClick:()=>l({to:"/$org/$project/$pluginId",params:{org:i,project:a,pluginId:O.pluginId}})}));let H;t[13]!==f?(H=O=>f.includes(O.pluginId),t[13]=f,t[14]=H):H=t[14];const U=os.filter(H).map(O=>({type:"group",group:{id:`${O.pluginId}-${O.id}`,label:O.label,items:O.items.map((L,Q)=>({key:`${O.pluginId}-${O.id}-${Q}`,label:L.label,icon:L.icon,onClick:()=>l({to:"/$org/$project/$pluginId",params:{org:i,project:a,pluginId:O.pluginId}})})),defaultExpanded:O.defaultExpanded??!0}}));if(c){const O=[{type:"items",items:[j,...R]}];if(A.length>0){let L;t[15]===Symbol.for("react.memo_cache_sentinel")?(L={type:"divider"},t[15]=L):L=t[15],O.push(L);let Q;t[16]!==A?(Q={type:"items",items:A},t[16]=A,t[17]=Q):Q=t[17],O.push(Q)}if(U.length>0){if(A.length===0){let L;t[18]===Symbol.for("react.memo_cache_sentinel")?(L={type:"divider"},t[18]=L):L=t[18],O.push(L)}O.push(...U)}return O}let W;t[19]===Symbol.for("react.memo_cache_sentinel")?(W=n.jsx(js,{}),t[19]=W):W=t[19];let V;t[20]!==l||t[21]!==i||t[22]!==a?(V={key:"tasks",label:"Tasks",icon:W,onClick:()=>l({to:"/$org/$project/tasks",params:{org:i,project:a}})},t[20]=l,t[21]=i,t[22]=a,t[23]=V):V=t[23];const Z=V;let q;t[24]===Symbol.for("react.memo_cache_sentinel")?(q=n.jsx(Qe,{}),t[24]=q):q=t[24];let J;t[25]!==l||t[26]!==i||t[27]!==a?(J={key:"workflows",label:"Workflows",icon:q,onClick:()=>l({to:"/$org/$project/workflows",params:{org:i,project:a}})},t[25]=l,t[26]=i,t[27]=a,t[28]=J):J=t[28];const G=J;let K;t[29]!==e.experimental_tasks||t[30]!==Z?(K=e.experimental_tasks?[Z]:[],t[29]=e.experimental_tasks,t[30]=Z,t[31]=K):K=t[31];const Y=[{type:"items",items:[j,...K,G]}];if(A.length>0){let O;t[32]===Symbol.for("react.memo_cache_sentinel")?(O={type:"divider"},t[32]=O):O=t[32],Y.push(O);let L;t[33]!==A?(L={type:"items",items:A},t[33]=A,t[34]=L):L=t[34],Y.push(L)}if(U.length>0){if(A.length===0){let O;t[35]===Symbol.for("react.memo_cache_sentinel")?(O={type:"divider"},t[35]=O):O=t[35],Y.push(O)}Y.push(...U)}return Y}const rn="sidebar_state",ln=3600*24*7,on="16rem",an="18rem",cn="3rem",dn="b",Kt=y.createContext(null);function Ze(){const t=y.useContext(Kt);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function mn(t){const e=N.c(21),{defaultOpen:s,open:r,onOpenChange:l,children:o}=t,i=s===void 0?!0:s,a=Me(),[c,d]=y.useState(!1),[m,f]=y.useState(i),u=r??m;let p;e[0]!==u||e[1]!==l?(p=P=>{const k=typeof P=="function"?P(u):P;l?l(k):f(k),document.cookie=`${rn}=${k}; path=/; max-age=${ln}`},e[0]=u,e[1]=l,e[2]=p):p=e[2];const x=p;let h;e[3]!==a||e[4]!==x?(h=()=>a?d(un):x(fn),e[3]=a,e[4]=x,e[5]=h):h=e[5];const j=h;let b,g;e[6]!==j?(b=()=>{const P=k=>{if(k.key===dn&&(k.metaKey||k.ctrlKey)){const $=k.target;if($.tagName==="INPUT"||$.tagName==="TEXTAREA"||$.isContentEditable)return;k.preventDefault(),j()}};return globalThis.addEventListener("keydown",P),()=>globalThis.removeEventListener("keydown",P)},g=[j],e[6]=j,e[7]=b,e[8]=g):(b=e[7],g=e[8]),y.useEffect(b,g);const v=u?"expanded":"collapsed";let S;e[9]!==a||e[10]!==u||e[11]!==c||e[12]!==x||e[13]!==v||e[14]!==j?(S={state:v,open:u,setOpen:x,isMobile:a,openMobile:c,setOpenMobile:d,toggleSidebar:j},e[9]=a,e[10]=u,e[11]=c,e[12]=x,e[13]=v,e[14]=j,e[15]=S):S=e[15];const C=S;let w;e[16]!==o?(w=n.jsx(vt,{delayDuration:0,children:o}),e[16]=o,e[17]=w):w=e[17];let _;return e[18]!==C||e[19]!==w?(_=n.jsx(Kt.Provider,{value:C,children:w}),e[18]=C,e[19]=w,e[20]=_):_=e[20],_}function fn(t){return!t}function un(t){return!t}function pn(t){const e=N.c(14);let s,r,l,o;e[0]!==t?({className:r,style:o,children:s,...l}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o):(s=e[1],r=e[2],l=e[3],o=e[4]);let i;e[5]!==o?(i={"--sidebar-width":on,"--sidebar-width-icon":cn,...o},e[5]=o,e[6]=i):i=e[6];const a=i;let c;e[7]!==r?(c=z("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",r),e[7]=r,e[8]=c):c=e[8];let d;return e[9]!==s||e[10]!==l||e[11]!==a||e[12]!==c?(d=n.jsx("div",{"data-slot":"sidebar-wrapper",style:a,className:c,...l,children:s}),e[9]=s,e[10]=l,e[11]=a,e[12]=c,e[13]=d):d=e[13],d}function xn(t){const e=N.c(46);let s,r,l,o,i,a;e[0]!==t?({side:o,variant:i,collapsible:a,className:r,children:s,...l}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o,e[5]=i,e[6]=a):(s=e[1],r=e[2],l=e[3],o=e[4],i=e[5],a=e[6]);const c=o===void 0?"left":o,d=i===void 0?"sidebar":i,m=a===void 0?"offcanvas":a,{isMobile:f,state:u,openMobile:p,setOpenMobile:x}=Ze();if(m==="none"){let k;e[7]!==r?(k=z("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),e[7]=r,e[8]=k):k=e[8];let $;return e[9]!==s||e[10]!==l||e[11]!==k?($=n.jsx("div",{"data-slot":"sidebar",className:k,...l,children:s}),e[9]=s,e[10]=l,e[11]=k,e[12]=$):$=e[12],$}if(f){let k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k={"--sidebar-width":an},e[13]=k):k=e[13];let $;e[14]===Symbol.for("react.memo_cache_sentinel")?($=n.jsxs(Is,{className:"sr-only",children:[n.jsx(Os,{children:"Sidebar"}),n.jsx(Ps,{children:"Displays the mobile sidebar."})]}),e[14]=$):$=e[14];let I;e[15]!==s?(I=n.jsx("div",{className:"flex h-full w-full flex-col",children:s}),e[15]=s,e[16]=I):I=e[16];let M;e[17]!==c||e[18]!==I?(M=n.jsxs(Ts,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:k,side:c,children:[$,I]}),e[17]=c,e[18]=I,e[19]=M):M=e[19];let T;return e[20]!==p||e[21]!==l||e[22]!==x||e[23]!==M?(T=n.jsx($s,{open:p,onOpenChange:x,...l,children:M}),e[20]=p,e[21]=l,e[22]=x,e[23]=M,e[24]=T):T=e[24],T}const h=u==="collapsed"?m:"",j=d==="floating"||d==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let b;e[25]!==j?(b=z("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",j),e[25]=j,e[26]=b):b=e[26];let g;e[27]!==b?(g=n.jsx("div",{"data-slot":"sidebar-gap",className:b}),e[27]=b,e[28]=g):g=e[28];const v=c==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",S=d==="floating"||d==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let C;e[29]!==r||e[30]!==v||e[31]!==S?(C=z("fixed top-12 bottom-0 z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",v,S,r),e[29]=r,e[30]=v,e[31]=S,e[32]=C):C=e[32];let w;e[33]!==s?(w=n.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border pt-2 flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:s}),e[33]=s,e[34]=w):w=e[34];let _;e[35]!==l||e[36]!==C||e[37]!==w?(_=n.jsx("div",{"data-slot":"sidebar-container",className:C,...l,children:w}),e[35]=l,e[36]=C,e[37]=w,e[38]=_):_=e[38];let P;return e[39]!==c||e[40]!==u||e[41]!==_||e[42]!==h||e[43]!==g||e[44]!==d?(P=n.jsxs("div",{className:"group peer text-foreground hidden md:block","data-state":u,"data-collapsible":h,"data-variant":d,"data-side":c,"data-slot":"sidebar",children:[g,_]}),e[39]=c,e[40]=u,e[41]=_,e[42]=h,e[43]=g,e[44]=d,e[45]=P):P=e[45],P}function hn(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("main",{"data-slot":"sidebar-inset",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Zt(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex flex-col gap-2 p-2",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function gn(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex flex-col gap-2 px-2 items-start justify-start",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function at(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("h-4 m-0! w-full",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-sidebar":"separator",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function jn(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Pe(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function Te(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("w-full text-sm",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function pe(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex w-full min-w-0 flex-col gap-1",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function oe(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("group/menu-item relative",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}const bn=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 Ee(t){const e=N.c(28);let s,r,l,o,i,a,c;e[0]!==t?({asChild:l,isActive:o,variant:i,size:a,tooltip:c,className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o,e[5]=i,e[6]=a,e[7]=c):(s=e[1],r=e[2],l=e[3],o=e[4],i=e[5],a=e[6],c=e[7]);const d=l===void 0?!1:l,m=o===void 0?!1:o,f=i===void 0?"default":i,u=a===void 0?"default":a,p=d?is:"button",{isMobile:x,state:h}=Ze();let j;e[8]!==s||e[9]!==u||e[10]!==f?(j=z(bn({variant:f,size:u}),s),e[8]=s,e[9]=u,e[10]=f,e[11]=j):j=e[11];let b;e[12]!==p||e[13]!==m||e[14]!==r||e[15]!==u||e[16]!==j?(b=n.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":u,"data-active":m,className:j,...r}),e[12]=p,e[13]=m,e[14]=r,e[15]=u,e[16]=j,e[17]=b):b=e[17];const g=b;if(!c)return g;if(typeof c=="string"){let _;e[18]!==c?(_={children:c},e[18]=c,e[19]=_):_=e[19],c=_}let v;e[20]!==g?(v=n.jsx(Ue,{asChild:!0,children:g}),e[20]=g,e[21]=v):v=e[21];const S=h!=="collapsed"||x;let C;e[22]!==S||e[23]!==c?(C=n.jsx(He,{side:"right",align:"center",hidden:S,...c}),e[22]=S,e[23]=c,e[24]=C):C=e[24];let w;return e[25]!==v||e[26]!==C?(w=n.jsxs(Be,{children:[v,C]}),e[25]=v,e[26]=C,e[27]=w):w=e[27],w}function vn(t){const e=N.c(18),{label:s,children:r,defaultExpanded:l}=t,o=l===void 0?!0:l,[i,a]=y.useState(o);let c;e[0]!==i?(c=()=>a(!i),e[0]=i,e[1]=c):c=e[1];let d;e[2]!==s?(d=n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s}),e[2]=s,e[3]=d):d=e[3];const m=!i&&"-rotate-90";let f;e[4]!==m?(f=z("text-muted-foreground transition-transform duration-200",m),e[4]=m,e[5]=f):f=e[5];let u;e[6]!==f?(u=n.jsx(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=n.jsx(pe,{children:n.jsx(oe,{children:n.jsxs(Ee,{className:"h-6 cursor-pointer select-none",onClick:c,children:[d,u]})})}),e[8]=c,e[9]=d,e[10]=u,e[11]=p):p=e[11];let x;e[12]!==r||e[13]!==i?(x=i&&n.jsx(Te,{children:n.jsx(pe,{className:"gap-0.5",children:r})}),e[12]=r,e[13]=i,e[14]=x):x=e[14];let h;return e[15]!==p||e[16]!==x?(h=n.jsxs(Pe,{className:"py-0",children:[p,x]}),e[15]=p,e[16]=x,e[17]=h):h=e[17],h}function Yt(t){const e=N.c(13),{item:s}=t;let r;e[0]!==s.icon?(r=n.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:s.icon}),e[0]=s.icon,e[1]=r):r=e[1];let l;e[2]!==s.label?(l=n.jsx("span",{className:"truncate",children:s.label}),e[2]=s.label,e[3]=l):l=e[3];let o;e[4]!==s.isActive||e[5]!==s.label||e[6]!==s.onClick||e[7]!==r||e[8]!==l?(o=n.jsxs(Ee,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:s.onClick,isActive:s.isActive,tooltip:s.label,children:[r,l]}),e[4]=s.isActive,e[5]=s.label,e[6]=s.onClick,e[7]=r,e[8]=l,e[9]=o):o=e[9];let i;return e[10]!==s.key||e[11]!==o?(i=n.jsx(oe,{children:o},s.key),e[10]=s.key,e[11]=o,e[12]=i):i=e[12],i}function Nn(t){const e=N.c(12),{section:s}=t;switch(s.type){case"divider":{let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(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=n.jsx("div",{className:"flex-1"}),e[1]=r):r=e[1],r}case"group":{const r=s.group.label,l=s.group.defaultExpanded;let o;e[2]!==s.group.items?(o=s.group.items.map(yn),e[2]=s.group.items,e[3]=o):o=e[3];let i;return e[4]!==s.group.defaultExpanded||e[5]!==s.group.label||e[6]!==o?(i=n.jsx(vn,{label:r,defaultExpanded:l,children:o}),e[4]=s.group.defaultExpanded,e[5]=s.group.label,e[6]=o,e[7]=i):i=e[7],i}case"items":{let r;e[8]!==s.items?(r=s.items.map(Sn),e[8]=s.items,e[9]=r):r=e[9];let l;return e[10]!==r?(l=n.jsx(Pe,{className:"py-0",children:n.jsx(Te,{children:n.jsx(pe,{className:"gap-0.5",children:r})})}),e[10]=r,e[11]=l):l=e[11],l}}}function Sn(t){return n.jsx(Yt,{item:t},t.key)}function yn(t){return n.jsx(Yt,{item:t},t.key)}function qt(t){const e=N.c(14),{sections:s,header:r,footer:l,additionalContent:o,variant:i,collapsible:a,contentClassName:c}=t,d=i===void 0?"sidebar":i,m=a===void 0?"icon":a;let f;e[0]!==c?(f=z("flex flex-col flex-1 overflow-x-hidden font-medium border-r pb-2",c),e[0]=c,e[1]=f):f=e[1];let u;e[2]!==s?(u=s.map(wn),e[2]=s,e[3]=u):u=e[3];let p;e[4]!==o||e[5]!==f||e[6]!==u?(p=n.jsxs(jn,{className:f,children:[u,o]}),e[4]=o,e[5]=f,e[6]=u,e[7]=p):p=e[7];let x;return e[8]!==m||e[9]!==l||e[10]!==r||e[11]!==p||e[12]!==d?(x=n.jsxs(xn,{variant:d,collapsible:m,children:[r,p,l]}),e[8]=m,e[9]=l,e[10]=r,e[11]=p,e[12]=d,e[13]=x):x=e[13],x}function wn(t,e){return n.jsx(Nn,{section:t},e)}qt.Skeleton=function(){return n.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,s)=>n.jsx("div",{className:"w-full h-8",children:n.jsx(te,{className:"h-full bg-sidebar-accent rounded-md"})},s))})};const Cn="w-full h-8 justify-start gap-2 px-2 text-sm font-[450] text-sidebar-foreground hover:text-sidebar-foreground hover:bg-sidebar-accent active:bg-sidebar-accent/75 [&>svg]:size-[18px] [&>svg]:text-muted-foreground hover:[&>svg]:text-sidebar-foreground";function Ie(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z(Cn,s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx(se,{variant:"ghost",size:"sm",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function kn({invitation:t,onStatusChange:e}){const[s,r]=y.useState(!1),[l,o]=y.useState(!1),i=xe(),a=async()=>{r(!0);try{const p=await ie.organization.acceptInvitation({invitationId:t.id});if(p.error)de.error(p.error.message),r(!1);else{e(t.id,"accepted");const x=await ie.organization.setActive({organizationId:t.organizationId});x?.data?.slug?(de.success("Invitation accepted!"),i({to:"/$org",params:{org:x.data.slug}})):(de.success("Invitation accepted! Redirecting..."),i({to:"/"}))}}catch{de.error("Failed to accept invitation"),r(!1)}},c=async()=>{o(!0);try{const p=await ie.organization.rejectInvitation({invitationId:t.id});p.error?(de.error(p.error.message),o(!1)):(de.success("Invitation rejected"),e(t.id,"rejected"),o(!1))}catch{de.error("Failed to reject invitation"),o(!1)}},d=t.organizationName||t.organizationId,m=t.status==="pending",f=t.status==="accepted",u=t.status==="rejected";return n.jsxs("div",{className:z("flex items-center gap-3 px-3 py-2 h-12 border-b border-border/50 last:border-b-0",!m&&"opacity-50"),children:[n.jsx("div",{className:"shrink-0 size-5 flex items-center justify-center",children:n.jsx(Vt,{size:16,className:"text-muted-foreground"})}),n.jsxs("p",{className:"flex-1 text-sm text-foreground min-w-0 whitespace-nowrap overflow-hidden",children:["You have been invited to ",n.jsx("span",{className:"font-semibold inline-block max-w-[200px] truncate align-bottom",children:d})]}),n.jsx("div",{className:"flex items-center gap-1 shrink-0",children:m?n.jsxs(n.Fragment,{children:[n.jsx(se,{variant:"ghost",size:"icon",onClick:c,disabled:s||l,className:"h-8 w-8",children:n.jsx(mt,{size:14})}),n.jsx(se,{variant:"outline",size:"icon",onClick:a,disabled:s||l,className:"h-8 w-8",children:n.jsx(Oe,{size:14})})]}):f?n.jsxs(dt,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx(Oe,{size:12}),"Accepted"]}):u?n.jsxs(dt,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx(mt,{size:12}),"Declined"]}):null})]})}function _n(){const[t,e]=y.useState(!1),s=y.useContext(cs),{data:r}=s.hooks.useListUserInvitations(),{data:l}=ie.useListOrganizations(),[o,i]=y.useState({}),m=(r??[]).filter(h=>new Date(h.expiresAt)>new Date).map(h=>{const j=(l??[]).find(b=>b.id===h.organizationId);return{...h,organizationSlug:j?.slug||h.organizationSlug,organizationName:j?.name||h.organizationName}}).map(h=>({...h,status:o[h.id]||h.status})),f=[...m].sort((h,j)=>{const b={pending:0,accepted:1,rejected:2};return(b[h.status]??999)-(b[j.status]??999)}),p=m.filter(h=>h.status==="pending").length>0,x=(h,j)=>{i(b=>({...b,[h]:j}))};return n.jsxs(rt,{open:t,onOpenChange:e,children:[n.jsx(lt,{asChild:!0,children:n.jsxs(Ie,{children:[n.jsx(ct,{size:18}),"Inbox",p&&n.jsx("span",{className:"ml-auto h-2 w-2 rounded-full bg-destructive"})]})}),n.jsxs(ot,{side:"right",align:"start",className:"w-[400px] p-0 overflow-hidden",children:[n.jsx("div",{className:"px-4 py-3 border-b border-border",children:n.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Inbox"})}),n.jsx("div",{className:"max-h-96 overflow-auto",children:f.length>0?f.map(h=>n.jsx(kn,{invitation:h,onStatusChange:x},h.id)):n.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[n.jsx(ct,{size:32,className:"text-muted-foreground/40 mb-2"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"No invitations at the moment"})]})})]})]})}function zn(t){const e=N.c(29),{user:s,userImage:r,onOpenSettings:l}=t;let o;e[0]!==s?(o=async()=>{if(!s)return;const _=`ID: ${s.id}
|
|
2
|
-
Name: ${s.name||"N/A"}
|
|
3
|
-
Email: ${s.email}`;try{await navigator.clipboard.writeText(_),de.success("User info copied to clipboard")}catch{de.error("Failed to copy user info to clipboard")}},e[0]=s,e[1]=o):o=e[1];const i=o,a=s.name||s.email||"U";let c;e[2]!==a||e[3]!==r?(c=n.jsx(me,{url:r,fallback:a,shape:"circle",size:"sm",className:"size-8 shrink-0"}),e[2]=a,e[3]=r,e[4]=c):c=e[4];const d=s.name||"User";let m;e[5]!==d?(m=n.jsx("span",{className:"text-sm text-sidebar-foreground truncate font-[450]",children:d}),e[5]=d,e[6]=m):m=e[6];let f;e[7]!==s.email?(f=n.jsx("span",{className:"text-xs text-muted-foreground truncate font-normal",children:s.email}),e[7]=s.email,e[8]=f):f=e[8];let u;e[9]!==m||e[10]!==f?(u=n.jsxs("div",{className:"flex flex-col min-w-0 text-left",children:[m,f]}),e[9]=m,e[10]=f,e[11]=u):u=e[11];let p;e[12]!==i||e[13]!==c||e[14]!==u?(p=n.jsxs(se,{variant:"ghost",onClick:i,className:"h-auto p-2 m-1 mb-0 justify-start gap-2 hover:bg-sidebar-accent hover:text-inherit active:bg-sidebar-accent/75",children:[c,u]}),e[12]=i,e[13]=c,e[14]=u,e[15]=p):p=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(_n,{}),e[16]=x):x=e[16];let h;e[17]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Gt,{size:18}),e[17]=h):h=e[17];let j;e[18]!==l?(j=n.jsxs(Ie,{onClick:l,children:[h,"Preferences"]}),e[18]=l,e[19]=j):j=e[19];let b;e[20]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(Ie,{asChild:!0,children:n.jsxs("a",{href:"https://www.decocms.com/terms-of-use",target:"_blank",rel:"noopener noreferrer",children:[n.jsx(At,{size:18}),n.jsx("span",{className:"flex-1",children:"Terms & Conditions"}),n.jsx(Xe,{size:14})]})}),e[20]=b):b=e[20];let g;e[21]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(Ie,{asChild:!0,children:n.jsxs("a",{href:"https://github.com/decocms/mesh",target:"_blank",rel:"noopener noreferrer",children:[n.jsx(ht,{className:"size-[18px]"}),n.jsx("span",{className:"flex-1",children:"decocms/mesh"}),n.jsx(Xe,{size:14})]})}),e[21]=g):g=e[21];let v;e[22]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsxs(Ie,{onClick:$n,children:[n.jsx(Wt,{size:18}),"Log out"]}),e[22]=v):v=e[22];let S;e[23]!==j?(S=n.jsxs("div",{className:"p-1 flex flex-col",children:[x,j,b,g,v]}),e[23]=j,e[24]=S):S=e[24];let C;e[25]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx("div",{className:"mt-auto px-3 py-2 border-t border-border",children:n.jsxs("span",{className:"text-[11px] text-muted-foreground/75",children:["v","2.88.0"]})}),e[25]=C):C=e[25];let w;return e[26]!==S||e[27]!==p?(w=n.jsx(n.Fragment,{children:n.jsxs("div",{className:"flex flex-col gap-0.5 bg-sidebar min-w-[250px]",children:[p,S,C]})}),e[26]=S,e[27]=p,e[28]=w):w=e[28],w}function $n(){return ie.signOut()}function In(t){const e=N.c(26),{org:s,isActive:r,isHovered:l,onClick:o,onSettings:i,onHover:a}=t,c=r,d=l&&!r,m=l&&"bg-accent/50",f=r&&!l&&"bg-accent hover:bg-accent";let u;e[0]!==m||e[1]!==f?(u=z("flex items-center gap-2 w-full justify-start font-normal h-10 px-2 rounded-lg cursor-pointer transition-colors",m,f),e[0]=m,e[1]=f,e[2]=u):u=e[2];let p;e[3]!==o?(p=S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),o?.())},e[3]=o,e[4]=p):p=e[4];let x;e[5]!==a||e[6]!==s.id?(x=()=>a?.(s.id),e[5]=a,e[6]=s.id,e[7]=x):x=e[7];const h=s.logo??void 0;let j;e[8]!==s.name||e[9]!==h?(j=n.jsx(me,{url:h,fallback:s.name,size:"sm",className:"size-6 shrink-0 rounded-md",objectFit:"cover"}),e[8]=s.name,e[9]=h,e[10]=j):j=e[10];let b;e[11]!==s.name?(b=n.jsx("span",{className:"flex-1 text-sm text-foreground truncate text-left min-w-0",children:s.name}),e[11]=s.name,e[12]=b):b=e[12];let g;e[13]!==i||e[14]!==s.name||e[15]!==d||e[16]!==c?(g=i&&c?n.jsx("button",{type:"button","aria-label":`${s.name} settings`,className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:S=>{S.stopPropagation(),i()},children:n.jsx(it,{size:16,className:"text-muted-foreground"})}):d?n.jsx(zt,{size:16,className:"text-muted-foreground shrink-0"}):n.jsx("span",{className:"size-5 shrink-0","aria-hidden":"true"}),e[13]=i,e[14]=s.name,e[15]=d,e[16]=c,e[17]=g):g=e[17];let v;return e[18]!==o||e[19]!==u||e[20]!==p||e[21]!==x||e[22]!==j||e[23]!==b||e[24]!==g?(v=n.jsxs("div",{role:"button",tabIndex:0,className:u,onClick:o,onKeyDown:p,onMouseEnter:x,children:[j,b,g]}),e[18]=o,e[19]=u,e[20]=p,e[21]=x,e[22]=j,e[23]=b,e[24]=g,e[25]=v):v=e[25],v}function On(t){const e=N.c(34),{currentOrgSlug:s,hoveredOrgId:r,onOrgSelect:l,onOrgSettings:o,onPopoverClose:i,onCreateOrganization:a,onOrgHover:c}=t,{data:d}=ie.useListOrganizations();let m,f,u,p;if(e[0]!==s||e[1]!==r||e[2]!==a||e[3]!==c||e[4]!==l||e[5]!==o||e[6]!==i||e[7]!==d){let j;e[12]!==s?(j=(w,_)=>w.slug===s?-1:_.slug===s?1:w.name.localeCompare(_.name),e[12]=s,e[13]=j):j=e[13];const b=[...d??[]].sort(j);u="flex flex-col min-w-[240px] border-l border-border";let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx("span",{className:"text-xs text-muted-foreground truncate",children:"Your Organizations"}),e[14]=g):g=e[14];let v;e[15]!==a||e[16]!==i?(v=()=>{i(),a()},e[15]=a,e[16]=i,e[17]=v):v=e[17];let S;e[18]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(Ke,{size:16,className:"text-muted-foreground"}),e[18]=S):S=e[18],e[19]!==v?(p=n.jsxs("div",{className:"flex items-center justify-between h-10 px-3 border-b border-border",children:[g,n.jsx(se,{variant:"ghost",size:"icon",className:"size-5",onClick:v,children:S})]}),e[19]=v,e[20]=p):p=e[20],m="flex flex-col gap-0.5 p-1 flex-1 overflow-y-auto";let C;e[21]!==s||e[22]!==r||e[23]!==c||e[24]!==l||e[25]!==o?(C=w=>n.jsx(In,{org:w,isActive:w.slug===s,isHovered:w.id===r,onClick:()=>l(w.slug),onSettings:()=>o(w.slug),onHover:c},w.slug),e[21]=s,e[22]=r,e[23]=c,e[24]=l,e[25]=o,e[26]=C):C=e[26],f=b.map(C),e[0]=s,e[1]=r,e[2]=a,e[3]=c,e[4]=l,e[5]=o,e[6]=i,e[7]=d,e[8]=m,e[9]=f,e[10]=u,e[11]=p}else m=e[8],f=e[9],u=e[10],p=e[11];let x;e[27]!==m||e[28]!==f?(x=n.jsx("div",{className:m,children:f}),e[27]=m,e[28]=f,e[29]=x):x=e[29];let h;return e[30]!==u||e[31]!==p||e[32]!==x?(h=n.jsxs("div",{className:u,children:[p,x]}),e[30]=u,e[31]=p,e[32]=x,e[33]=h):h=e[33],h}function Pn(t){const e=N.c(27),{project:s,isActive:r,onClick:l,onSettings:o}=t,[i,a]=y.useState(!1),c=r||i,d=s.ui?.themeColor??"#3B82F6",m=r&&"bg-accent hover:bg-accent";let f;e[0]!==m?(f=z("flex items-center gap-2 w-full justify-start font-normal h-10 px-2 rounded-lg cursor-pointer transition-colors hover:bg-accent/50",m),e[0]=m,e[1]=f):f=e[1];let u;e[2]!==l?(u=S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),l?.())},e[2]=l,e[3]=u):u=e[3];let p,x;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=()=>a(!0),x=()=>a(!1),e[4]=p,e[5]=x):(p=e[4],x=e[5]);let h;e[6]!==s.name||e[7]!==s.ui||e[8]!==d?(h=s.ui?.icon?n.jsx("img",{src:s.ui.icon,alt:"",className:"size-6 rounded-md object-cover shrink-0"}):n.jsx(me,{fallback:s.name,size:"sm",shape:"square",className:"size-6 shrink-0 rounded-md",style:{backgroundColor:d}}),e[6]=s.name,e[7]=s.ui,e[8]=d,e[9]=h):h=e[9];let j;e[10]!==s.name?(j=n.jsx("span",{className:"flex-1 text-sm text-foreground truncate text-left min-w-0",children:s.name}),e[10]=s.name,e[11]=j):j=e[11];let b;e[12]!==r?(b=r&&n.jsx(Oe,{size:16,className:"text-muted-foreground shrink-0"}),e[12]=r,e[13]=b):b=e[13];let g;e[14]!==r||e[15]!==o||e[16]!==s.name||e[17]!==c?(g=o&&c&&!r?n.jsx("button",{type:"button","aria-label":`${s.name} settings`,className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:S=>{S.stopPropagation(),o()},children:n.jsx(it,{size:16,className:"text-muted-foreground"})}):r?null:n.jsx("span",{className:"size-5 shrink-0","aria-hidden":"true"}),e[14]=r,e[15]=o,e[16]=s.name,e[17]=c,e[18]=g):g=e[18];let v;return e[19]!==l||e[20]!==f||e[21]!==u||e[22]!==h||e[23]!==j||e[24]!==b||e[25]!==g?(v=n.jsxs("div",{role:"button",tabIndex:0,className:f,onClick:l,onKeyDown:u,onMouseEnter:p,onMouseLeave:x,children:[h,j,b,g]}),e[19]=l,e[20]=f,e[21]=u,e[22]=h,e[23]=j,e[24]=b,e[25]=g,e[26]=v):v=e[26],v}function Tn(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsxs("div",{className:"space-y-1 px-2 py-1",children:[n.jsx(te,{className:"h-10 w-full"}),n.jsx(te,{className:"h-10 w-full"})]}),t[0]=e):e=t[0],e}function Mn(t){const e=N.c(16),{organizationId:s,currentProjectSlug:r,onProjectSelect:l,onProjectSettings:o,orgSlug:i}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={suspense:!0},e[0]=a):a=e[0];const{data:c}=_t(s,a);let d,m;if(e[1]!==r||e[2]!==l||e[3]!==o||e[4]!==i||e[5]!==c){m=Symbol.for("react.early_return_sentinel");e:{const u=c?.filter(En)??[];if(u.length===0){let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx("div",{className:"px-3 py-4 text-center text-sm text-muted-foreground",children:"No projects yet"}),e[8]=x):x=e[8],m=x;break e}let p;e[9]!==r||e[10]!==l||e[11]!==o||e[12]!==i?(p=x=>n.jsx(Pn,{project:x,isActive:r===x.slug,onClick:()=>l(i,x.slug),onSettings:o?()=>o(i,x.slug):void 0},x.id),e[9]=r,e[10]=l,e[11]=o,e[12]=i,e[13]=p):p=e[13],d=u.map(p)}e[1]=r,e[2]=l,e[3]=o,e[4]=i,e[5]=c,e[6]=d,e[7]=m}else d=e[6],m=e[7];if(m!==Symbol.for("react.early_return_sentinel"))return m;let f;return e[14]!==d?(f=n.jsx(n.Fragment,{children:d}),e[14]=d,e[15]=f):f=e[15],f}function En(t){return t.slug!==ee}function An(t){const e=N.c(17),{organizationId:s,organizationName:r,currentProjectSlug:l,onProjectSelect:o,onProjectSettings:i,onCreateProject:a,orgSlug:c}=t;let d;e[0]!==r?(d=n.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["Projects in ",r]}),e[0]=r,e[1]=d):d=e[1];let m;e[2]!==a?(m=a&&n.jsx("button",{type:"button",className:"size-5 shrink-0 flex items-center justify-center rounded-md transition-colors hover:bg-foreground/10",onClick:a,"aria-label":"Create project",children:n.jsx(Ke,{size:16,className:"text-muted-foreground"})}),e[2]=a,e[3]=m):m=e[3];let f;e[4]!==d||e[5]!==m?(f=n.jsxs("div",{className:"flex items-center justify-between h-10 px-3 border-b border-border",children:[d,m]}),e[4]=d,e[5]=m,e[6]=f):f=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Tn,{}),e[7]=u):u=e[7];let p;e[8]!==l||e[9]!==o||e[10]!==i||e[11]!==c||e[12]!==s?(p=n.jsx("div",{className:"flex flex-col gap-0.5 p-1 flex-1 overflow-y-auto",children:n.jsx(y.Suspense,{fallback:u,children:n.jsx(Mn,{organizationId:s,currentProjectSlug:l,onProjectSelect:o,onProjectSettings:i,orgSlug:c})})}),e[8]=l,e[9]=o,e[10]=i,e[11]=c,e[12]=s,e[13]=p):p=e[13];let x;return e[14]!==f||e[15]!==p?(x=n.jsxs("div",{className:"flex flex-col min-w-[250px] border-l border-border",children:[f,p]}),e[14]=f,e[15]=p,e[16]=x):x=e[16],x}function Jt(t){const e=N.c(81),{open:s,onOpenChange:r,user:l,userImage:o}=t,[i,a]=Ve(),[c,d]=y.useState(!1);let m;e[0]!==l.id?(m=()=>{navigator.clipboard.writeText(l.id),d(!0),setTimeout(()=>d(!1),2e3)},e[0]=l.id,e[1]=m):m=e[1];const f=m;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(As,{className:"text-base",children:"Profile Settings"}),e[2]=u):u=e[2];let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsxs(Ls,{className:"px-6 pt-6 pb-4 border-b border-border shrink-0 relative",children:[u,n.jsxs(Ds,{className:"absolute top-1/2 right-4 -translate-y-1/2 cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[n.jsx(Fe,{size:16}),n.jsx("span",{className:"sr-only",children:"Close"})]})]}),e[3]=p):p=e[3];const x=l.name||"U";let h;e[4]!==x||e[5]!==o?(h=n.jsx(me,{url:o,fallback:x,shape:"circle",size:"xl",className:"h-16 w-16"}),e[4]=x,e[5]=o,e[6]=h):h=e[6];const j=l.name||"User";let b;e[7]!==j?(b=n.jsx("span",{className:"text-base font-medium text-foreground",children:j}),e[7]=j,e[8]=b):b=e[8];let g;e[9]!==l.email?(g=n.jsx("span",{className:"text-sm text-muted-foreground",children:l.email}),e[9]=l.email,e[10]=g):g=e[10];let v;e[11]!==b||e[12]!==g?(v=n.jsxs("div",{className:"flex flex-col gap-1",children:[b,g]}),e[11]=b,e[12]=g,e[13]=v):v=e[13];let S;e[14]!==h||e[15]!==v?(S=n.jsxs("div",{className:"flex items-center gap-4",children:[h,v]}),e[14]=h,e[15]=v,e[16]=S):S=e[16];let C;e[17]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Preferences"}),e[17]=C):C=e[17];let w;e[18]!==a?(w=()=>a(Bn),e[18]=a,e[19]=w):w=e[19];let _;e[20]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[n.jsxs(qe,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[n.jsx(Us,{size:16,className:"text-muted-foreground"}),"Developer Mode"]}),n.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Show technical details like JSON input/output for tool calls"})]}),e[20]=_):_=e[20];let P;e[21]!==a?(P=fe=>a(ue=>({...ue,devMode:fe})),e[21]=a,e[22]=P):P=e[22];let k;e[23]!==i.devMode||e[24]!==P?(k=n.jsx("div",{onClick:Un,children:n.jsx(Je,{checked:i.devMode,onCheckedChange:P})}),e[23]=i.devMode,e[24]=P,e[25]=k):k=e[25];let $;e[26]!==w||e[27]!==k?($=n.jsxs("div",{className:"flex flex-col gap-2",children:[C,n.jsxs("button",{type:"button",onClick:w,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[_,k]})]}),e[26]=w,e[27]=k,e[28]=$):$=e[28];let I,M;e[29]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Experimental"}),M=n.jsx("p",{className:"text-xs text-muted-foreground",children:"Experimental features are unstable and may change or stop working at any time."}),e[29]=I,e[30]=M):(I=e[29],M=e[30]);let T;e[31]!==a?(T=()=>a(Hn),e[31]=a,e[32]=T):T=e[32];let B;e[33]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[n.jsxs(qe,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[n.jsx(xt,{size:16,className:"text-muted-foreground"}),"Projects"]}),n.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Enable the projects feature in the sidebar"})]}),e[33]=B):B=e[33];let E;e[34]!==a?(E=fe=>a(ue=>({...ue,experimental_projects:fe})),e[34]=a,e[35]=E):E=e[35];let D;e[36]!==i.experimental_projects||e[37]!==E?(D=n.jsx("div",{onClick:Rn,children:n.jsx(Je,{checked:i.experimental_projects,onCheckedChange:E})}),e[36]=i.experimental_projects,e[37]=E,e[38]=D):D=e[38];let R;e[39]!==T||e[40]!==D?(R=n.jsxs("button",{type:"button",onClick:T,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[B,D]}),e[39]=T,e[40]=D,e[41]=R):R=e[41];let A;e[42]!==a?(A=()=>a(Dn),e[42]=a,e[43]=A):A=e[43];let H;e[44]===Symbol.for("react.memo_cache_sentinel")?(H=n.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[n.jsxs(qe,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[n.jsx(kt,{size:16,className:"text-muted-foreground"}),"Tasks"]}),n.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Enable the tasks feature in the sidebar"})]}),e[44]=H):H=e[44];let F;e[45]!==a?(F=fe=>a(ue=>({...ue,experimental_tasks:fe})),e[45]=a,e[46]=F):F=e[46];let U;e[47]!==i.experimental_tasks||e[48]!==F?(U=n.jsx("div",{onClick:Ln,children:n.jsx(Je,{checked:i.experimental_tasks,onCheckedChange:F})}),e[47]=i.experimental_tasks,e[48]=F,e[49]=U):U=e[49];let W;e[50]!==A||e[51]!==U?(W=n.jsxs("button",{type:"button",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:[H,U]}),e[50]=A,e[51]=U,e[52]=W):W=e[52];let V;e[53]!==R||e[54]!==W?(V=n.jsxs("div",{className:"flex flex-col gap-2",children:[I,M,R,W]}),e[53]=R,e[54]=W,e[55]=V):V=e[55];let Z;e[56]!==S||e[57]!==$||e[58]!==V?(Z=n.jsxs("div",{className:"p-5 space-y-6 min-h-[225px]",children:[S,$,V]}),e[56]=S,e[57]=$,e[58]=V,e[59]=Z):Z=e[59];let q;e[60]!==l.id?(q=n.jsx("span",{className:"font-mono text-xs",children:l.id}),e[60]=l.id,e[61]=q):q=e[61];let J;e[62]!==c?(J=c?n.jsx(Oe,{size:14,className:"text-green-600"}):n.jsx(It,{size:14,className:"opacity-0 group-hover:opacity-100 transition-opacity"}),e[62]=c,e[63]=J):J=e[63];let G;e[64]!==f||e[65]!==q||e[66]!==J?(G=n.jsx(Ue,{asChild:!0,children:n.jsxs("button",{type:"button",onClick:f,className:"group flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[q,J]})}),e[64]=f,e[65]=q,e[66]=J,e[67]=G):G=e[67];let K;e[68]===Symbol.for("react.memo_cache_sentinel")?(K=n.jsx(He,{side:"top",children:n.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[68]=K):K=e[68];let X;e[69]!==G?(X=n.jsx(vt,{children:n.jsxs(Be,{children:[G,K]})}),e[69]=G,e[70]=X):X=e[70];let Y;e[71]===Symbol.for("react.memo_cache_sentinel")?(Y=n.jsxs("span",{className:"text-xs text-muted-foreground/75",children:["v","2.88.0"]}),e[71]=Y):Y=e[71];let O;e[72]!==X?(O=n.jsxs("div",{className:"border-t border-border px-5 py-4 flex items-center justify-between shrink-0",children:[X,Y]}),e[72]=X,e[73]=O):O=e[73];let L;e[74]!==Z||e[75]!==O?(L=n.jsxs(Rs,{className:"sm:max-w-lg sm:max-h-[85vh] p-0 flex flex-col",closeButtonClassName:"hidden",children:[p,n.jsxs("div",{className:"flex flex-col",children:[Z,O]})]}),e[74]=Z,e[75]=O,e[76]=L):L=e[76];let Q;return e[77]!==r||e[78]!==s||e[79]!==L?(Q=n.jsx(Hs,{open:s,onOpenChange:r,children:L}),e[77]=r,e[78]=s,e[79]=L,e[80]=Q):Q=e[80],Q}function Ln(t){return t.stopPropagation()}function Dn(t){return{...t,experimental_tasks:!t.experimental_tasks}}function Rn(t){return t.stopPropagation()}function Hn(t){return{...t,experimental_projects:!t.experimental_projects}}function Un(t){return t.stopPropagation()}function Bn(t){return{...t,devMode:!t.devMode}}function Xt(t){const e=N.c(77),{isCollapsed:s,variant:r,onCreateProject:l}=t,o=s===void 0?!1:s,i=r===void 0?"light":r,[a]=Ve();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}=ie.useListOrganizations(),{data:u}=ie.useSession(),p=xe(),x=i==="dark",j=ae()?.project;let b;e[1]!==d||e[2]!==f?(b=f?.find(ne=>ne.slug===d),e[1]=d,e[2]=f,e[3]=b):b=e[3];const g=b,[v,S]=y.useState(!1),[C,w]=y.useState(!1),[_,P]=y.useState(!1),[k,$]=y.useState(null),I=u?.user,M=I?.image;let T;e[4]!==g||e[5]!==k||e[6]!==f?(T=k?f?.find(ne=>ne.id===k):g,e[4]=g,e[5]=k,e[6]=f,e[7]=T):T=e[7];const B=T;let E;e[8]!==p?(E=ne=>{S(!1),p({to:"/$org/$project/settings",params:{org:ne,project:ee}})},e[8]=p,e[9]=E):E=e[9];const D=E;let R;e[10]!==p?(R=ne=>{S(!1),p({to:"/$org/$project",params:{org:ne,project:ee}})},e[10]=p,e[11]=R):R=e[11];const A=R;let H;e[12]!==p?(H=(ne,Ye)=>{S(!1),p({to:"/$org/$project",params:{org:ne,project:Ye}})},e[12]=p,e[13]=H):H=e[13];const F=H;let U;e[14]!==p?(U=(ne,Ye)=>{S(!1),p({to:"/$org/$project/settings",params:{org:ne,project:Ye}})},e[14]=p,e[15]=U):U=e[15];const W=U;let V;e[16]!==l?(V=l?()=>{S(!1),l()}:void 0,e[16]=l,e[17]=V):V=e[17];const Z=V;let q;e[18]===Symbol.for("react.memo_cache_sentinel")?(q=ne=>{S(ne),ne||$(null)},e[18]=q):q=e[18];const J=q;let G;e[19]!==g?(G=()=>{g&&$(g.id)},e[19]=g,e[20]=G):G=e[20];const K=G,X=x?"hover:bg-zinc-800 text-white":"hover:bg-sidebar-accent",Y=o?"justify-center":"justify-start",O=o?"":"pl-0.5! px-1.5 gap-1.5";let L;e[21]!==X||e[22]!==Y||e[23]!==O?(L=z("h-7 min-w-0 max-w-full",X,Y,O),e[21]=X,e[22]=Y,e[23]=O,e[24]=L):L=e[24];const Q=g?.logo??"",fe=g?.name??"",ue=x&&"border-none";let he;e[25]!==ue?(he=z("shrink-0 rounded-[5px]",ue),e[25]=ue,e[26]=he):he=e[26];let ge;e[27]!==Q||e[28]!==fe||e[29]!==he?(ge=n.jsx(me,{url:Q,fallback:fe,size:"xs",className:he,objectFit:"cover"}),e[27]=Q,e[28]=fe,e[29]=he,e[30]=ge):ge=e[30];let je;e[31]!==g?.name||e[32]!==j||e[33]!==o||e[34]!==x?(je=!o&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"min-w-0 flex-1 text-left",children:x&&j?n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"text-[10px] text-zinc-500 leading-none truncate",children:g?.name??"Select org"}),n.jsx("p",{className:"text-sm text-white font-normal leading-tight mt-0.5 truncate",children:j.name??j.slug})]}):n.jsx("span",{className:"block truncate text-[14px] tracking-[-0.00625rem] font-medium text-foreground",children:g?.name??"Select org"})}),x?n.jsx(Nt,{className:"size-3 text-zinc-500 shrink-0"}):n.jsx(nt,{className:"size-3.5 text-muted-foreground shrink-0"})]}),e[31]=g?.name,e[32]=j,e[33]=o,e[34]=x,e[35]=je):je=e[35];let be;e[36]!==K||e[37]!==L||e[38]!==ge||e[39]!==je?(be=n.jsx(lt,{asChild:!0,children:n.jsxs(se,{variant:"ghost",size:"sm",onClick:K,className:L,children:[ge,je]})}),e[36]=K,e[37]=L,e[38]=ge,e[39]=je,e[40]=be):be=e[40];let ve;e[41]!==I||e[42]!==M?(ve=I&&n.jsx(zn,{user:I,userImage:M,onOpenSettings:()=>{w(!0),S(!1)}}),e[41]=I,e[42]=M,e[43]=ve):ve=e[43];let Ae,Le;e[44]===Symbol.for("react.memo_cache_sentinel")?(Ae=()=>S(!1),Le=()=>P(!0),e[44]=Ae,e[45]=Le):(Ae=e[44],Le=e[45]);let Ne;e[46]!==D||e[47]!==A||e[48]!==k||e[49]!==d?(Ne=n.jsx(On,{currentOrgSlug:d,hoveredOrgId:k,onOrgSelect:A,onOrgSettings:D,onPopoverClose:Ae,onCreateOrganization:Le,onOrgHover:$}),e[46]=D,e[47]=A,e[48]=k,e[49]=d,e[50]=Ne):Ne=e[50];let Se;e[51]!==Z||e[52]!==W||e[53]!==F||e[54]!==B||e[55]!==d||e[56]!==a.experimental_projects||e[57]!==m?(Se=a.experimental_projects&&B&&n.jsx(An,{organizationId:B.id,organizationName:B.name,orgSlug:B.slug,currentProjectSlug:B.slug===d?m:void 0,onProjectSelect:F,onProjectSettings:W,onCreateProject:Z}),e[51]=Z,e[52]=W,e[53]=F,e[54]=B,e[55]=d,e[56]=a.experimental_projects,e[57]=m,e[58]=Se):Se=e[58];let ye;e[59]!==ve||e[60]!==Ne||e[61]!==Se?(ye=n.jsxs(ot,{align:"start",side:"bottom",className:"p-0 flex w-auto h-88 overflow-hidden",children:[ve,Ne,Se]}),e[59]=ve,e[60]=Ne,e[61]=Se,e[62]=ye):ye=e[62];let we;e[63]!==v||e[64]!==be||e[65]!==ye?(we=n.jsxs(rt,{open:v,onOpenChange:J,children:[be,ye]}),e[63]=v,e[64]=be,e[65]=ye,e[66]=we):we=e[66];let Ce;e[67]!==C||e[68]!==I||e[69]!==M?(Ce=I&&C&&I.email&&n.jsx(Jt,{open:C,onOpenChange:w,user:{...I,name:I.name??void 0,email:I.email},userImage:M}),e[67]=C,e[68]=I,e[69]=M,e[70]=Ce):Ce=e[70];let ke;e[71]!==_?(ke=n.jsx($t,{open:_,onOpenChange:P}),e[71]=_,e[72]=ke):ke=e[72];let De;return e[73]!==we||e[74]!==Ce||e[75]!==ke?(De=n.jsxs(n.Fragment,{children:[we,Ce,ke]}),e[73]=we,e[74]=Ce,e[75]=ke,e[76]=De):De=e[76],De}Xt.Skeleton=function({variant:e="light"}){const s=e==="dark";return n.jsxs("div",{className:z("flex items-center gap-1.5 h-7 px-1.5 w-full",s&&"text-white"),children:[n.jsx(te,{className:z("size-5 rounded-[5px] shrink-0",s&&"bg-zinc-800")}),n.jsx(te,{className:z("h-3.5 flex-1",s&&"bg-zinc-800")})]})};function et(t){const e=N.c(71),{onCreateProject:s}=t,{state:r,toggleSidebar:l}=Ze(),o=r==="collapsed",[i,a]=Ge(),{locator:c}=ae();let d;e[0]!==c?(d=ze.isOrgAdminProject(c),e[0]=c,e[1]=d):d=e[1];const f=!d;let u;e[2]!==a?(u=()=>{a(Fn)},e[2]=a,e[3]=u):u=e[3];const p=u,x=f&&"bg-[#030302] border-b border-zinc-800";let h;e[4]!==x?(h=z("h-12 gap-0 pt-0 border-r",x),e[4]=x,e[5]=h):h=e[5];const j=o&&"group-hover/switcher:opacity-0 group-hover/switcher:pointer-events-none group-hover/switcher:invisible";let b;e[6]!==j?(b=z("w-full min-w-0 transition-opacity",j),e[6]=j,e[7]=b):b=e[7];const g=f?"dark":"light";let v;e[8]!==o||e[9]!==s||e[10]!==g?(v=n.jsx(Xt,{isCollapsed:o,variant:g,onCreateProject:s}),e[8]=o,e[9]=s,e[10]=g,e[11]=v):v=e[11];let S;e[12]!==b||e[13]!==v?(S=n.jsx("div",{className:b,children:v}),e[12]=b,e[13]=v,e[14]=S):S=e[14];const C=f?"hover:bg-zinc-800 text-zinc-400":"hover:bg-sidebar-accent",w=o?"opacity-0 invisible pointer-events-none group-hover/switcher:opacity-100 group-hover/switcher:visible group-hover/switcher:pointer-events-auto":"opacity-0 invisible pointer-events-none";let _;e[15]!==C||e[16]!==w?(_=z("absolute inset-0 m-auto size-7 transition-opacity",C,w),e[15]=C,e[16]=w,e[17]=_):_=e[17];const P=!o,k=f?"text-zinc-400":"text-muted-foreground";let $;e[18]!==k?($=z("size-4 shrink-0",k),e[18]=k,e[19]=$):$=e[19];let I;e[20]!==$?(I=n.jsx(Rt,{className:$}),e[20]=$,e[21]=I):I=e[21];let M;e[22]!==_||e[23]!==P||e[24]!==I||e[25]!==l?(M=n.jsx(se,{variant:"ghost",size:"icon",className:_,onClick:l,"aria-label":"Expand sidebar",disabled:P,children:I}),e[22]=_,e[23]=P,e[24]=I,e[25]=l,e[26]=M):M=e[26];let T;e[27]!==M||e[28]!==S?(T=n.jsxs("div",{className:"group/switcher relative flex items-center justify-center gap-1.5 min-w-0 flex-1 overflow-hidden",children:[S,M]}),e[27]=M,e[28]=S,e[29]=T):T=e[29];const B=o&&"hidden";let E;e[30]!==B?(E=z("flex items-center gap-0.5 shrink-0",B),e[30]=B,e[31]=E):E=e[31];const D=f?"hover:bg-zinc-800 text-zinc-400 hover:text-white":"hover:bg-sidebar-accent";let R;e[32]!==D?(R=z("size-7",D),e[32]=D,e[33]=R):R=e[33];const A=f?"text-zinc-400":"text-muted-foreground";let H;e[34]!==A?(H=z("size-4",A),e[34]=A,e[35]=H):H=e[35];let F;e[36]!==H?(F=n.jsx(Dt,{className:H}),e[36]=H,e[37]=F):F=e[37];let U;e[38]!==o||e[39]!==R||e[40]!==F||e[41]!==l?(U=n.jsx(Ue,{asChild:!0,children:n.jsx(se,{variant:"ghost",size:"icon",className:R,onClick:l,"aria-label":"Collapse sidebar",disabled:o,children:F})}),e[38]=o,e[39]=R,e[40]=F,e[41]=l,e[42]=U):U=e[42];let W;e[43]===Symbol.for("react.memo_cache_sentinel")?(W=n.jsx(He,{side:"bottom",children:"Collapse sidebar"}),e[43]=W):W=e[43];let V;e[44]!==U?(V=n.jsxs(Be,{children:[U,W]}),e[44]=U,e[45]=V):V=e[45];let Z;e[46]!==i||e[47]!==f?(Z=z("size-7",f?z("hover:bg-zinc-800 text-zinc-400 hover:text-white",i&&"bg-zinc-800 text-white"):z("hover:bg-sidebar-accent",i&&"bg-sidebar-accent")),e[46]=i,e[47]=f,e[48]=Z):Z=e[48];const q=f?"text-inherit":"text-muted-foreground";let J;e[49]!==q?(J=z(q),e[49]=q,e[50]=J):J=e[50];let G;e[51]!==J?(G=n.jsx(St,{size:11,className:J}),e[51]=J,e[52]=G):G=e[52];let K;e[53]!==o||e[54]!==Z||e[55]!==G||e[56]!==p?(K=n.jsx(Ue,{asChild:!0,children:n.jsx(se,{variant:"ghost",size:"icon",className:Z,onClick:p,"aria-label":"Toggle Decopilot",disabled:o,children:G})}),e[53]=o,e[54]=Z,e[55]=G,e[56]=p,e[57]=K):K=e[57];let X;e[58]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx(He,{side:"bottom",children:"Toggle Decopilot"}),e[58]=X):X=e[58];let Y;e[59]!==K?(Y=n.jsxs(Be,{children:[K,X]}),e[59]=K,e[60]=Y):Y=e[60];let O;e[61]!==E||e[62]!==V||e[63]!==Y?(O=n.jsxs("div",{className:E,children:[V,Y]}),e[61]=E,e[62]=V,e[63]=Y,e[64]=O):O=e[64];let L;e[65]!==T||e[66]!==O?(L=n.jsx(pe,{children:n.jsx(oe,{children:n.jsxs("div",{className:"flex items-center justify-between w-full h-12",children:[T,O]})})}),e[65]=T,e[66]=O,e[67]=L):L=e[67];let Q;return e[68]!==L||e[69]!==h?(Q=n.jsx(Zt,{className:h,children:L}),e[68]=L,e[69]=h,e[70]=Q):Q=e[70],Q}function Fn(t){return!t}et.Skeleton=function({isDark:e=!1}){return n.jsx(Zt,{className:z("h-12 gap-0 pt-0",e&&"bg-[#030302] border-b border-zinc-800"),children:n.jsx(pe,{children:n.jsx(oe,{children:n.jsxs("div",{className:"flex items-center justify-between w-full h-12",children:[n.jsxs("div",{className:"flex items-center gap-1.5 min-w-0 flex-1 px-1.5",children:[n.jsx(te,{className:z("size-5 rounded-[5px] shrink-0",e&&"bg-zinc-800")}),n.jsx(te,{className:z("h-3.5 w-16",e&&"bg-zinc-800")})]}),n.jsxs("div",{className:"flex items-center gap-0.5",children:[n.jsx(te,{className:z("size-7 rounded-lg",e&&"bg-zinc-800")}),n.jsx(te,{className:z("size-7 rounded-lg",e&&"bg-zinc-800")})]})]})})})})};function Wn(){const t=N.c(10),{locator:e}=ae(),s=xe(),l=We().location.pathname;let o;t[0]!==l?(o=l.includes("/settings"),t[0]=l,t[1]=o):o=t[1];const i=o;let a;t[2]!==e||t[3]!==s?(a=()=>{s({to:"/$org/$project/settings",params:ze.parse(e)})},t[2]=e,t[3]=s,t[4]=a):a=t[4];const c=a;let d,m;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:n.jsx(it,{})}),m=n.jsx("span",{className:"truncate",children:"Settings"}),t[5]=d,t[6]=m):(d=t[5],m=t[6]);let f;return t[7]!==c||t[8]!==i?(f=n.jsx(gn,{className:"py-2 border-r",children:n.jsx(pe,{children:n.jsx(oe,{children:n.jsxs(Ee,{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:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(at,{className:"my-2 -ml-1"}),e[0]=r):r=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(oe,{children:n.jsx("div",{className:"group-data-[collapsible=icon]:hidden px-2 py-0 text-xs font-medium h-6 text-muted-foreground flex items-center justify-between",children:n.jsx("span",{className:"whitespace-nowrap",children:"Pinned Views"})})}),e[1]=l):l=e[1];let o;return e[2]!==s?(o=n.jsxs(n.Fragment,{children:[r,l,s]}),e[2]=s,e[3]=o):o=e[3],o}function Vn(t){const e=N.c(26),{item:s}=t,r=xe(),{org:l}=ae(),o=Ot(l.id),i=Bs(l.id);let a;e[0]!==i.update||e[1]!==s.url||e[2]!==o?.sidebar_items?(a=async()=>{const S=(o?.sidebar_items||[]).filter(C=>C.url!==s.url);await i.update.mutateAsync({sidebar_items:S})},e[0]=i.update,e[1]=s.url,e[2]=o?.sidebar_items,e[3]=a):a=e[3];const c=a;let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=/^https?:\/\/.+/,e[4]=d):d=e[4];let m;e[5]!==s.icon?(m=d.test(s.icon),e[5]=s.icon,e[6]=m):m=e[6];const f=m;let u;e[7]!==s.url||e[8]!==r?(u=()=>{r({to:s.url})},e[7]=s.url,e[8]=r,e[9]=u):u=e[9];const p=s.title;let x;e[10]!==f||e[11]!==s.icon||e[12]!==s.title?(x=n.jsx("div",{className:"flex items-center justify-center shrink-0",children:f?n.jsx("img",{src:s.icon,alt:s.title,className:"h-4 w-4 rounded object-cover"}):n.jsx(Fs,{size:16,className:"text-muted-foreground group-hover/item:text-foreground transition-colors"})}),e[10]=f,e[11]=s.icon,e[12]=s.title,e[13]=x):x=e[13];let h;e[14]!==s.title?(h=s.title.toLocaleLowerCase(),e[14]=s.title,e[15]=h):h=e[15];let j;e[16]!==h?(j=n.jsx("div",{className:"flex-1 min-w-0 flex flex-col items-start",children:n.jsx("span",{className:"truncate text-sm w-full capitalize",children:h})}),e[16]=h,e[17]=j):j=e[17];let b;e[18]!==c?(b=n.jsx(Fe,{size:16,className:"text-muted-foreground opacity-0 group-hover/item:opacity-50 hover:opacity-100 cursor-pointer",onClick:v=>{v.preventDefault(),v.stopPropagation(),c()}}),e[18]=c,e[19]=b):b=e[19];let g;return e[20]!==s.title||e[21]!==u||e[22]!==x||e[23]!==j||e[24]!==b?(g=n.jsx(oe,{children:n.jsxs(Ee,{className:"w-full pr-2 group/item relative cursor-pointer text-foreground/90 hover:text-foreground",onClick:u,tooltip:p,children:[x,j,b]})}),e[20]=s.title,e[21]=u,e[22]=x,e[23]=j,e[24]=b,e[25]=g):g=e[25],g}function pt(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(oe,{children:n.jsx("div",{className:"flex items-center gap-2 px-4 py-2",children:n.jsx(te,{className:"h-4 flex-1"})})}),t[0]=e):e=t[0],e}function Gn(){const t=N.c(4),{org:e}=ae(),r=Ot(e.id)?.sidebar_items;if(!r?.length)return null;let l;t[0]!==r?(l=r.map(Kn),t[0]=r,t[1]=l):l=t[1];let o;return t[2]!==l?(o=n.jsx(Qt,{children:l}),t[2]=l,t[3]=o):o=t[3],o}function Kn(t){return n.jsx(Vn,{item:t},t.url)}function Zn(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(y.Suspense,{fallback:n.jsxs(Qt,{children:[n.jsx(pt,{}),n.jsx(pt,{})]}),children:n.jsx(Gn,{})}),t[0]=e):e=t[0],e}function Yn(t){const e=N.c(11),{project:s}=t,r=s.ui?.themeColor??"#60a5fa";if(s.ui?.icon){let c;return e[0]!==s.ui.icon?(c=n.jsx("img",{src:s.ui.icon,alt:"",className:"size-4 rounded object-cover border border-border/50"}),e[0]=s.ui.icon,e[1]=c):c=e[1],c}let l;e[2]!==r?(l={backgroundColor:r},e[2]=r,e[3]=l):l=e[3];let o;e[4]!==s.name?(o=s.name.charAt(0).toUpperCase(),e[4]=s.name,e[5]=o):o=e[5];let i;e[6]!==o?(i=n.jsx("span",{className:"text-[10px] font-medium text-white",children:o}),e[6]=o,e[7]=i):i=e[7];let a;return e[8]!==l||e[9]!==i?(a=n.jsx("div",{className:"size-4 rounded flex items-center justify-center border border-border/50",style:l,children:i}),e[8]=l,e[9]=i,e[10]=a):a=e[10],a}function qn(t){const e=N.c(14),{project:s}=t,r=xe(),{org:l}=ae();let o;e[0]!==r||e[1]!==l.slug||e[2]!==s.slug?(o=()=>{r({to:"/$org/$project",params:{org:l.slug,project:s.slug}})},e[0]=r,e[1]=l.slug,e[2]=s.slug,e[3]=o):o=e[3];let i;e[4]!==s?(i=n.jsx(Yn,{project:s}),e[4]=s,e[5]=i):i=e[5];let a;e[6]!==s.name?(a=n.jsx("span",{className:"truncate flex-1",children:s.name}),e[6]=s.name,e[7]=a):a=e[7];let c;e[8]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(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]!==s.name||e[10]!==o||e[11]!==i||e[12]!==a?(d=n.jsx(oe,{children:n.jsxs(Ee,{className:"group/item cursor-pointer text-foreground/90 hover:text-foreground",onClick:o,tooltip:s.name,children:[i,a,c]})}),e[9]=s.name,e[10]=o,e[11]=i,e[12]=a,e[13]=d):d=e[13],d}function Jn(){const t=N.c(54),{org:e}=ae(),{data:s,isLoading:r}=_t(e.id),[l,o]=y.useState(!0),[i,a]=y.useState(!1);let c,d,m,f,u,p,x,h,j,b,g,v,S;if(t[0]!==r||t[1]!==l||t[2]!==s){S=Symbol.for("react.early_return_sentinel");e:{const M=s?.filter(Qn)??[];if(r){let H;t[16]===Symbol.for("react.memo_cache_sentinel")?(H=n.jsx(oe,{children:n.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[n.jsx(te,{className:"h-4 w-4 rounded"}),n.jsx(te,{className:"h-4 flex-1"})]})}),t[16]=H):H=t[16];let F;t[17]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsx(Pe,{className:"py-0",children:n.jsx(Te,{children:n.jsxs(pe,{className:"gap-0.5",children:[H,n.jsx(oe,{children:n.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[n.jsx(te,{className:"h-4 w-4 rounded"}),n.jsx(te,{className:"h-4 flex-1"})]})})]})})}),t[17]=F):F=t[17],S=F;break e}t[18]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(at,{className:"my-2"}),t[18]=v):v=t[18],u=Ss,b=l,g=o,f=Pe,j="py-0",m=Te,d=pe,x="gap-0.5";let T;t[19]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx("span",{children:"Projects"}),t[19]=T):T=t[19];const B=!l&&"-rotate-90";let E;t[20]!==B?(E=z("transition-transform",B),t[20]=B,t[21]=E):E=t[21];let D;t[22]!==E?(D=n.jsx(ys,{asChild:!0,children:n.jsxs("button",{type:"button",className:"flex items-center gap-1 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors",children:[T,n.jsx(nt,{size:12,className:E})]})}),t[22]=E,t[23]=D):D=t[23];let R;t[24]===Symbol.for("react.memo_cache_sentinel")?(R=()=>a(!0),t[24]=R):R=t[24];let A;t[25]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx("button",{type:"button",onClick:R,className:"text-muted-foreground hover:text-foreground transition-colors p-0.5 rounded hover:bg-accent",title:"Create new project",children:n.jsx(Ke,{size:16})}),t[25]=A):A=t[25],t[26]!==D?(h=n.jsx(oe,{children:n.jsxs("div",{className:"flex items-center justify-between px-2 h-6",children:[D,A]})}),t[26]=D,t[27]=h):h=t[27],c=ws,p=M.length===0?n.jsx(oe,{children:n.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:"No projects yet"})}):M.map(Xn)}t[0]=r,t[1]=l,t[2]=s,t[3]=c,t[4]=d,t[5]=m,t[6]=f,t[7]=u,t[8]=p,t[9]=x,t[10]=h,t[11]=j,t[12]=b,t[13]=g,t[14]=v,t[15]=S}else c=t[3],d=t[4],m=t[5],f=t[6],u=t[7],p=t[8],x=t[9],h=t[10],j=t[11],b=t[12],g=t[13],v=t[14],S=t[15];if(S!==Symbol.for("react.early_return_sentinel"))return S;let C;t[28]!==c||t[29]!==p?(C=n.jsx(c,{children:p}),t[28]=c,t[29]=p,t[30]=C):C=t[30];let w;t[31]!==d||t[32]!==x||t[33]!==h||t[34]!==C?(w=n.jsxs(d,{className:x,children:[h,C]}),t[31]=d,t[32]=x,t[33]=h,t[34]=C,t[35]=w):w=t[35];let _;t[36]!==m||t[37]!==w?(_=n.jsx(m,{children:w}),t[36]=m,t[37]=w,t[38]=_):_=t[38];let P;t[39]!==f||t[40]!==_||t[41]!==j?(P=n.jsx(f,{className:j,children:_}),t[39]=f,t[40]=_,t[41]=j,t[42]=P):P=t[42];let k;t[43]!==u||t[44]!==P||t[45]!==b||t[46]!==g?(k=n.jsx(u,{open:b,onOpenChange:g,children:P}),t[43]=u,t[44]=P,t[45]=b,t[46]=g,t[47]=k):k=t[47];let $;t[48]!==i?($=n.jsx(Ct,{open:i,onOpenChange:a}),t[48]=i,t[49]=$):$=t[49];let I;return t[50]!==k||t[51]!==$||t[52]!==v?(I=n.jsxs(n.Fragment,{children:[v,k,$]}),t[50]=k,t[51]=$,t[52]=v,t[53]=I):I=t[53],I}function Xn(t){return n.jsx(qn,{project:t},t.id)}function Qn(t){return t.slug!==ee}function er(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(y.Suspense,{fallback:n.jsx(Pe,{className:"py-0",children:n.jsx(Te,{children:n.jsx(pe,{className:"gap-0.5",children:n.jsx(oe,{children:n.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[n.jsx(te,{className:"h-4 w-4 rounded"}),n.jsx(te,{className:"h-4 flex-1"})]})})})})}),children:n.jsx(Jn,{})}),t[0]=e):e=t[0],e}function tr(t){const e=N.c(16),{onCreateProject:s}=t,[r]=Ve(),l=nn(),{locator:o}=ae();let i;e[0]!==o?(i=ze.isOrgAdminProject(o),e[0]=o,e[1]=i):i=e[1];const a=i;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(et.Skeleton,{}),e[2]=c):c=e[2];let d;e[3]!==s?(d=n.jsx(y.Suspense,{fallback:c,children:n.jsx(et,{onCreateProject:s})}),e[3]=s,e[4]=d):d=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(Wn,{}),e[5]=m):m=e[5];let f;e[6]!==a||e[7]!==r?(f=a?r.experimental_projects?n.jsx(er,{}):null:n.jsx(Zn,{}),e[6]=a,e[7]=r,e[8]=f):f=e[8];let u;e[9]!==f?(u=n.jsx(wt,{children:n.jsx(y.Suspense,{fallback:null,children:f})}),e[9]=f,e[10]=u):u=e[10];const p=a?void 0:"pt-3";let x;return e[11]!==l||e[12]!==d||e[13]!==u||e[14]!==p?(x=n.jsx(qt,{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 sr(t){const e=N.c(12);let s,r,l,o;e[0]!==t?({className:s,orientation:l,decorative:o,...r}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o):(s=e[1],r=e[2],l=e[3],o=e[4]);const i=l===void 0?"horizontal":l,a=o===void 0?!0:o;let c;e[5]!==s?(c=z("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",s),e[5]=s,e[6]=c):c=e[6];let d;return e[7]!==a||e[8]!==i||e[9]!==r||e[10]!==c?(d=n.jsx(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=y.createContext(null);function nr(){const t=y.useContext(es);if(!t)throw new Error("TopbarSwitcher compound components must be used within TopbarSwitcher.Root");return t}function rr(t){const e=N.c(10),{children:s,onItemHover:r}=t,[l,o]=y.useState(null);let i;e[0]!==r?(i=f=>{o(f),r?.(f)},e[0]=r,e[1]=i):i=e[1];const a=i;let c;e[2]!==l||e[3]!==a?(c={hoveredItem:l,setHoveredItem:a},e[2]=l,e[3]=a,e[4]=c):c=e[4];let d;e[5]!==s?(d=n.jsx(rt,{children:s}),e[5]=s,e[6]=d):d=e[6];let m;return e[7]!==c||e[8]!==d?(m=n.jsx(es.Provider,{value:c,children:d}),e[7]=c,e[8]=d,e[9]=m):m=e[9],m}function lr(t){const e=N.c(6),{children:s,onClick:r}=t;let l;e[0]!==s||e[1]!==r?(l=n.jsx(se,{variant:"link",className:"p-0.5 h-auto",onClick:r,type:"button",children:s}),e[0]=s,e[1]=r,e[2]=l):l=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(lt,{asChild:!0,children:n.jsx(se,{size:"icon",variant:"ghost",className:"w-6 h-6 p-0",children:n.jsx(Nt,{size:16,className:"opacity-50"})})}),e[3]=o):o=e[3];let i;return e[4]!==l?(i=n.jsxs("div",{className:"flex items-center gap-1",children:[l,o]}),e[4]=l,e[5]=i):i=e[5],i}function or(t){const e=N.c(8),{item:s,fallback:r}=t,l=r===void 0?"":r,o=s?.avatarUrl??"",i=s?.name??l;let a;e[0]!==o||e[1]!==i?(a=n.jsx(me,{url:o,fallback:i,size:"xs",objectFit:"contain"}),e[0]=o,e[1]=i,e[2]=a):a=e[2];const c=s?.name??l;let d;e[3]!==c?(d=n.jsx("span",{children:c}),e[3]=c,e[4]=d):d=e[4];let m;return e[5]!==a||e[6]!==d?(m=n.jsxs("div",{className:"flex items-center gap-2",children:[a,d]}),e[5]=a,e[6]=d,e[7]=m):m=e[7],m}function ir(t){const e=N.c(6),{children:s,align:r}=t,l=r===void 0?"start":r,i=y.Children.toArray(s).filter(ar).length===1?"280px":"480px";let a;e[0]!==i?(a={width:i},e[0]=i,e[1]=a):a=e[1];let c;return e[2]!==l||e[3]!==s||e[4]!==a?(c=n.jsx(ot,{align:l,className:"p-0 flex items-start",style:a,children:s}),e[2]=l,e[3]=s,e[4]=a,e[5]=c):c=e[5],c}function ar(t){return y.isValidElement(t)&&(t.type===ss||t.type===ts)}function ts(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex flex-col border-border w-[240px] border-r last:border-r-0 last:w-full",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}const ss=ts;function cr(t){const e=N.c(6),{placeholder:s,value:r,onChange:l}=t,o=s===void 0?"Search...":s;let i;e[0]!==l?(i=c=>l(c.target.value),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==o||e[3]!==i||e[4]!==r?(a=n.jsx(Ws,{placeholder:o,value:r,onChange:i,className:"rounded-none border-t-0 border-x-0 focus-visible:border-border focus-visible:ring-0"}),e[2]=o,e[3]=i,e[4]=r,e[5]=a):a=e[5],a}function dr(t){const e=N.c(6),{children:s,emptyMessage:r}=t,l=r===void 0?"No items found.":r,o=y.Children.count(s)>0;let i;e[0]!==l||e[1]!==o?(i=!o&&n.jsx("div",{className:"text-muted-foreground text-sm px-1 py-8 text-center",children:l}),e[0]=l,e[1]=o,e[2]=i):i=e[2];let a;return e[3]!==s||e[4]!==i?(a=n.jsxs("div",{className:"flex flex-col gap-0.5 p-1 max-h-44 overflow-y-auto",children:[i,s]}),e[3]=s,e[4]=i,e[5]=a):a=e[5],a}function mr(t){const e=N.c(15),{item:s,onClick:r,onHover:l,children:o}=t,i=nr();let a;e[0]!==i||e[1]!==s||e[2]!==l?(a=()=>{i.setHoveredItem(s.slug),l?.(s)},e[0]=i,e[1]=s,e[2]=l,e[3]=a):a=e[3];const c=a;let d;e[4]!==s||e[5]!==r?(d=()=>r(s),e[4]=s,e[5]=r,e[6]=d):d=e[6];let m;e[7]!==o||e[8]!==s.avatarUrl||e[9]!==s.name?(m=o||n.jsxs(n.Fragment,{children:[n.jsx(me,{url:s.avatarUrl??"",fallback:s.name,size:"xs",className:"w-[22px]! h-[22px]!",objectFit:"contain"}),n.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:s.name})]}),e[7]=o,e[8]=s.avatarUrl,e[9]=s.name,e[10]=m):m=e[10];let f;return e[11]!==c||e[12]!==d||e[13]!==m?(f=n.jsx(se,{onClick:d,onMouseEnter:c,variant:"ghost",size:"sm",className:"w-full justify-start font-normal",children:m}),e[11]=c,e[12]=d,e[13]=m,e[14]=f):f=e[14],f}function fr(t){const e=N.c(2),{children:s}=t;let r;return e[0]!==s?(r=n.jsx("div",{className:"px-1 pb-1 pt-0.5",children:s}),e[0]=s,e[1]=r):r=e[1],r}function ur(t){const e=N.c(11),{onClick:s,icon:r,children:l,variant:o}=t,a=(o===void 0?"default":o)==="muted"&&"text-muted-foreground";let c;e[0]!==a?(c=z("w-full justify-start font-normal",a),e[0]=a,e[1]=c):c=e[1];let d;e[2]!==r?(d=r&&n.jsx("span",{className:"[&>svg]:size-4",children:r}),e[2]=r,e[3]=d):d=e[3];let m;e[4]!==l?(m=n.jsx("span",{children:l}),e[4]=l,e[5]=m):m=e[5];let f;return e[6]!==s||e[7]!==c||e[8]!==d||e[9]!==m?(f=n.jsxs(se,{variant:"ghost",size:"sm",className:c,onClick:s,children:[d,m]}),e[6]=s,e[7]=c,e[8]=d,e[9]=m,e[10]=f):f=e[10],f}function pr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(sr,{}),t[0]=e):e=t[0],e}function xr(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"h-4 w-16 bg-accent rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const re=Object.assign(rr,{Trigger:lr,CurrentItem:or,Content:ir,Panel:ss,Search:cr,Items:dr,Item:mr,Actions:fr,Action:ur,Separator:pr,Skeleton:xr});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:s}=st(e),{data:r}=ie.useListOrganizations(),l=xe();let o;t[1]!==s||t[2]!==r?(o=r?.find(B=>B.slug===s),t[1]=s,t[2]=r,t[3]=o):o=t[3];const i=o,[a,c]=y.useState(""),[d,m]=y.useState(!1);let f,u,p,x,h,j,b,g;if(t[4]!==i||t[5]!==l||t[6]!==s||t[7]!==a||t[8]!==r){const E=(r?(()=>{const U=r.filter(W=>W.name.toLowerCase().includes(a.toLowerCase()));if(s){const W=U.findIndex(V=>V.slug===s);if(W>0){const V=U[W];V&&(U.splice(W,1),U.unshift(V))}}return U})():[]).map(hr);let D;t[17]!==i?(D=i?{slug:i.slug,name:i.name,avatarUrl:i.logo}:void 0,t[17]=i,t[18]=D):D=t[18];const R=D;x=re;let A;t[19]!==l||t[20]!==s?(A=()=>l({to:"/$org",params:{org:s??""}}),t[19]=l,t[20]=s,t[21]=A):A=t[21];let H;t[22]!==R?(H=n.jsx(re.CurrentItem,{item:R}),t[22]=R,t[23]=H):H=t[23],t[24]!==A||t[25]!==H?(g=n.jsx(re.Trigger,{onClick:A,children:H}),t[24]=A,t[25]=H,t[26]=g):g=t[26],p=re.Content,u=re.Panel,t[27]!==a?(b=n.jsx(re.Search,{placeholder:"Search organizations...",value:a,onChange:c}),t[27]=a,t[28]=b):b=t[28],f=re.Items,h="No organizations found.";let F;t[29]!==l?(F=U=>n.jsx(re.Item,{item:U,onClick:W=>l({to:"/$org",params:{org:W.slug}})},U.slug),t[29]=l,t[30]=F):F=t[30],j=E.map(F),t[4]=i,t[5]=l,t[6]=s,t[7]=a,t[8]=r,t[9]=f,t[10]=u,t[11]=p,t[12]=x,t[13]=h,t[14]=j,t[15]=b,t[16]=g}else f=t[9],u=t[10],p=t[11],x=t[12],h=t[13],j=t[14],b=t[15],g=t[16];let v;t[31]!==f||t[32]!==h||t[33]!==j?(v=n.jsx(f,{emptyMessage:h,children:j}),t[31]=f,t[32]=h,t[33]=j,t[34]=v):v=t[34];let S,C;t[35]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(re.Actions,{children:n.jsx(re.Action,{onClick:()=>m(!0),variant:"muted",children:"+ Create organization"})}),C=n.jsx(re.Separator,{}),t[35]=S,t[36]=C):(S=t[35],C=t[36]);let w;t[37]!==l?(w=()=>l({to:"/"}),t[37]=l,t[38]=w):w=t[38];let _;t[39]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(Vs,{}),t[39]=_):_=t[39];let P;t[40]!==w?(P=n.jsx(re.Actions,{children:n.jsx(re.Action,{onClick:w,icon:_,children:"See all organizations"})}),t[40]=w,t[41]=P):P=t[41];let k;t[42]!==u||t[43]!==P||t[44]!==b||t[45]!==v?(k=n.jsxs(u,{children:[b,v,S,C,P]}),t[42]=u,t[43]=P,t[44]=b,t[45]=v,t[46]=k):k=t[46];let $;t[47]!==p||t[48]!==k?($=n.jsx(p,{children:k}),t[47]=p,t[48]=k,t[49]=$):$=t[49];let I;t[50]!==x||t[51]!==$||t[52]!==g?(I=n.jsxs(x,{children:[g,$]}),t[50]=x,t[51]=$,t[52]=g,t[53]=I):I=t[53];let M;t[54]!==d?(M=n.jsx($t,{open:d,onOpenChange:m}),t[54]=d,t[55]=M):M=t[55];let T;return t[56]!==I||t[57]!==M?(T=n.jsxs(n.Fragment,{children:[I,M]}),t[56]=I,t[57]=M,t[58]=T):T=t[58],T}function hr(t){return{slug:t.slug,name:t.name,avatarUrl:t.logo}}tt.Skeleton=re.Skeleton;function gr(){const t=N.c(10),{locator:e}=ae(),s=Gs();if(ze.isOrgAdminProject(e))return null;const l=s?.leftRef;let o;t[0]!==l?(o=n.jsx("div",{ref:l,className:"flex items-center gap-2 flex-1 min-w-0"}),t[0]=l,t[1]=o):o=t[1];const i=s?.centerRef;let a;t[2]!==i?(a=n.jsx("div",{ref:i,className:"flex flex-1 h-full items-center justify-center px-4 min-w-0 [&:empty]:hidden"}),t[2]=i,t[3]=a):a=t[3];const c=s?.rightRef;let d;t[4]!==c?(d=n.jsx("div",{ref:c,className:"flex flex-1 gap-2 h-full items-center justify-end min-w-0 [&:empty]:hidden"}),t[4]=c,t[5]=d):d=t[5];let m;return t[6]!==o||t[7]!==a||t[8]!==d?(m=n.jsx("div",{className:"dark",children:n.jsxs("header",{className:"sticky top-0 z-50 h-12 bg-background flex items-center px-4 shrink-0",children:[o,a,d]})}),t[6]=o,t[7]=a,t[8]=d,t[9]=m):m=t[9],m}function jr({prop:t,defaultProp:e,onChange:s=()=>{}}){const[r,l]=br({defaultProp:e,onChange:s}),o=t!==void 0,i=o?t:r,a=gt(s),c=y.useCallback(d=>{if(o){const f=typeof d=="function"?d(t):d;f!==t&&a(f)}else l(d)},[o,t,l,a]);return[i,c]}function br({defaultProp:t,onChange:e}){const s=y.useState(t),[r]=s,l=y.useRef(r),o=gt(e);return y.useEffect(()=>{l.current!==r&&(o(r),l.current=r)},[r,l,o]),s}function vr(t){const e=N.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let r;return e[2]!==s?(r=n.jsx($e.Root,{"data-slot":"drawer",...s}),e[2]=s,e[3]=r):r=e[3],r}function Nr(t){const e=N.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let r;return e[2]!==s?(r=n.jsx($e.Trigger,{"data-slot":"drawer-trigger",...s}),e[2]=s,e[3]=r):r=e[3],r}function Sr(t){const e=N.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let r;return e[2]!==s?(r=n.jsx($e.Portal,{"data-slot":"drawer-portal",...s}),e[2]=s,e[3]=r):r=e[3],r}function yr(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx($e.Overlay,{"data-slot":"drawer-overlay",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function wr(t){const e=N.c(12);let s,r,l;e[0]!==t?({className:r,children:s,...l}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l):(s=e[1],r=e[2],l=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(yr,{}),e[4]=o):o=e[4];let i;e[5]!==r?(i=z("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",r),e[5]=r,e[6]=i):i=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=a):a=e[7];let c;return e[8]!==s||e[9]!==l||e[10]!==i?(c=n.jsxs(Sr,{"data-slot":"drawer-portal",children:[o,n.jsxs($e.Content,{"data-slot":"drawer-content",className:i,...l,children:[a,s]})]}),e[8]=s,e[9]=l,e[10]=i,e[11]=c):c=e[11],c}function Cr(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("flex flex-col gap-1.5 px-4 py-2",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx("div",{"data-slot":"drawer-header",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}function kr(t){const e=N.c(8);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=z("text-foreground font-semibold",s),e[3]=s,e[4]=l):l=e[4];let o;return e[5]!==r||e[6]!==l?(o=n.jsx($e.Title,{"data-slot":"drawer-title",className:l,...r}),e[5]=r,e[6]=l,e[7]=o):o=e[7],o}const ns=y.createContext({setOpen:()=>{}}),_r=()=>y.useContext(ns),zr=t=>{const e=N.c(25);let s,r,l,o,i;e[0]!==t?({children:s,defaultOpen:r,open:o,onOpenChange:l,...i}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=l,e[4]=o,e[5]=i):(s=e[1],r=e[2],l=e[3],o=e[4],i=e[5]);const a=r??!1;let c;e[6]!==l||e[7]!==o||e[8]!==a?(c={prop:o,defaultProp:a,onChange:l},e[6]=l,e[7]=o,e[8]=a,e[9]=c):c=e[9];const[d,m]=jr(c);let f;e[10]!==m?(f={setOpen:m},e[10]=m,e[11]=f):f=e[11];let u;e[12]!==s||e[13]!==d||e[14]!==i||e[15]!==m?(u=n.jsx(vr,{open:d,onOpenChange:m,...i,children:s}),e[12]=s,e[13]=d,e[14]=i,e[15]=m,e[16]=u):u=e[16];let p;e[17]!==d||e[18]!==i||e[19]!==m||e[20]!==u?(p=n.jsx(qs,{open:d,onOpenChange:m,...i,children:u}),e[17]=d,e[18]=i,e[19]=m,e[20]=u,e[21]=p):p=e[21];let x;return e[22]!==f||e[23]!==p?(x=n.jsx(ns.Provider,{value:f,children:p}),e[22]=f,e[23]=p,e[24]=x):x=e[24],x},$r=t=>{const{children:e,title:s,...r}=t,l=Me(),{className:o,...i}=r;return l?n.jsxs(wr,{...i,children:[n.jsx(Cr,{className:"hidden",children:n.jsx(kr,{children:s})}),n.jsx("div",{className:z("flex flex-col gap-2 p-2 py-4",o),children:e})]}):n.jsx(Ys,{...r,children:e})},Ir=t=>{const{children:e,...s}=t,{setOpen:r}=_r(),l=Me(),{className:o,...i}=s;return l?n.jsx("div",{...i,onClick:a=>{r(!1);const{onClick:c}=i;c?.(a)},className:z("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),children:e}):n.jsx(Js,{...s,children:e})},Or=t=>{const e=N.c(7);let s,r;e[0]!==t?({children:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);const l=Me();let o;return e[3]!==s||e[4]!==l||e[5]!==r?(o=l?n.jsx(Nr,{asChild:!0,children:s}):n.jsx(Zs,{...r,children:s}),e[3]=s,e[4]=l,e[5]=r,e[6]=o):o=e[6],o},Pr=t=>{const e=N.c(7);let s,r;e[0]!==t?({className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r):(s=e[1],r=e[2]);const l=Me();let o;return e[3]!==s||e[4]!==l||e[5]!==r?(o=l?n.jsx(ft,{className:z(s),...r}):n.jsx(ft,{className:z(s),...r}),e[3]=s,e[4]=l,e[5]=r,e[6]=o):o=e[6],o};function Tr(t){const e=N.c(11),{user:s,trigger:r,align:l,children:o}=t,i=l===void 0?"start":l;let a;e[0]!==r||e[1]!==s?(a=r(s),e[0]=r,e[1]=s,e[2]=a):a=e[2];let c;e[3]!==a?(c=n.jsx(Or,{asChild:!0,children:n.jsx("div",{children:a})}),e[3]=a,e[4]=c):c=e[4];let d;e[5]!==i||e[6]!==o?(d=n.jsx($r,{side:"top",align:i,className:"md:w-[240px]",children:o}),e[5]=i,e[6]=o,e[7]=d):d=e[7];let m;return e[8]!==c||e[9]!==d?(m=n.jsxs(zr,{children:[c,d]}),e[8]=c,e[9]=d,e[10]=m):m=e[10],m}function Mr(t){const e=N.c(8),{children:s,onClick:r,className:l,asChild:o}=t;let i;e[0]!==o||e[1]!==s||e[2]!==r?(i=o?s:n.jsx("button",{type:"button",className:"flex items-center gap-2 text-sm w-full cursor-pointer",onClick:r,children:s}),e[0]=o,e[1]=s,e[2]=r,e[3]=i):i=e[3];let a;return e[4]!==o||e[5]!==l||e[6]!==i?(a=n.jsx(Ir,{asChild:o,className:l,children:i}),e[4]=o,e[5]=l,e[6]=i,e[7]=a):a=e[7],a}function Er(t){const e=N.c(2),{className:s}=t;let r;return e[0]!==s?(r=n.jsx(Pr,{className:s}),e[0]=s,e[1]=r):r=e[1],r}function Ar(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const ce=Object.assign(Tr,{Item:Mr,Separator:Er,Skeleton:Ar});function Lr(t){const e=N.c(49),{user:s,userImage:r}=t,[l,o]=y.useState(!1),[i,a]=y.useState(!1);let c;e[0]!==s.email||e[1]!==s.id||e[2]!==s.name?(c=()=>{const A=`ID: ${s.id}
|
|
4
|
-
Name: ${s.name||"N/A"}
|
|
5
|
-
Email: ${s.email}`;navigator.clipboard.writeText(A),a(!0),de.success("User info copied to clipboard"),setTimeout(()=>a(!1),2e3)},e[0]=s.email,e[1]=s.id,e[2]=s.name,e[3]=c):c=e[3];const d=c;let m;e[4]!==s.email||e[5]!==s.name||e[6]!==r?(m=()=>n.jsx(me,{url:r,fallback:s.name||s.email||"U",shape:"circle",size:"sm",className:"cursor-pointer hover:ring-2 ring-muted-foreground transition-all h-7 w-7"}),e[4]=s.email,e[5]=s.name,e[6]=r,e[7]=m):m=e[7];const f=s.name||s.email||"U";let u;e[8]!==f||e[9]!==r?(u=n.jsx(me,{url:r,fallback:f,shape:"circle",size:"sm"}),e[8]=f,e[9]=r,e[10]=u):u=e[10];const p=s.name||"User";let x;e[11]!==p?(x=n.jsx("div",{className:"text-sm font-medium truncate",children:p}),e[11]=p,e[12]=x):x=e[12];let h;e[13]!==s.email?(h=n.jsx("div",{className:"text-xs text-muted-foreground truncate",children:s.email}),e[13]=s.email,e[14]=h):h=e[14];let j;e[15]!==x||e[16]!==h?(j=n.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[x,h]}),e[15]=x,e[16]=h,e[17]=j):j=e[17];let b;e[18]!==i?(b=n.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:i?n.jsx(Oe,{size:16,className:"text-green-600"}):n.jsx(It,{size:16,className:"text-muted-foreground"})}),e[18]=i,e[19]=b):b=e[19];let g;e[20]!==u||e[21]!==j||e[22]!==b?(g=n.jsxs("div",{className:"group flex items-center gap-3 w-full py-1",children:[u,j,b]}),e[20]=u,e[21]=j,e[22]=b,e[23]=g):g=e[23];let v;e[24]!==d||e[25]!==g?(v=n.jsx(ce.Item,{onClick:d,children:g}),e[24]=d,e[25]=g,e[26]=v):v=e[26];let S;e[27]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(ce.Separator,{}),e[27]=S):S=e[27];let C,w;e[28]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsxs(ce.Item,{onClick:()=>o(!0),children:[n.jsx(Xs,{className:"text-muted-foreground",size:18}),"Profile Settings"]}),w=n.jsx(ce.Separator,{}),e[28]=C,e[29]=w):(C=e[28],w=e[29]);let _;e[30]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(ht,{className:"w-4 h-4 text-muted-foreground"}),e[30]=_):_=e[30];let P;e[31]===Symbol.for("react.memo_cache_sentinel")?(P=n.jsx(ce.Item,{asChild:!0,children:n.jsxs("a",{href:"https://github.com/decocms/admin",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[_,"decocms/admin",n.jsx(ut,{size:18,className:"text-muted-foreground ml-auto"})]})}),e[31]=P):P=e[31];let k;e[32]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(Ut,{className:"text-muted-foreground",size:18}),e[32]=k):k=e[32];let $,I;e[33]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx(ce.Item,{asChild:!0,children:n.jsxs("a",{href:"https://decocms.com",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[k,"Homepage",n.jsx(ut,{size:18,className:"ml-auto text-muted-foreground"})]})}),I=n.jsx(ce.Separator,{}),e[33]=$,e[34]=I):($=e[33],I=e[34]);let M,T,B;e[35]===Symbol.for("react.memo_cache_sentinel")?(M=n.jsxs(ce.Item,{onClick:Dr,children:[n.jsx(Ft,{size:18,className:"text-muted-foreground"}),"Log out"]}),T=n.jsx(ce.Separator,{}),B=n.jsxs("div",{className:"px-2 py-1.5 text-[11px] text-muted-foreground/75",children:["v","2.88.0"]}),e[35]=M,e[36]=T,e[37]=B):(M=e[35],T=e[36],B=e[37]);let E;e[38]!==v||e[39]!==m||e[40]!==s?(E=n.jsxs(ce,{user:s,trigger:m,align:"end",children:[v,S,C,w,P,$,I,M,T,B]}),e[38]=v,e[39]=m,e[40]=s,e[41]=E):E=e[41];let D;e[42]!==l||e[43]!==s||e[44]!==r?(D=l&&n.jsx(Jt,{open:l,onOpenChange:o,user:s,userImage:r}),e[42]=l,e[43]=s,e[44]=r,e[45]=D):D=e[45];let R;return e[46]!==E||e[47]!==D?(R=n.jsxs(n.Fragment,{children:[E,D]}),e[46]=E,e[47]=D,e[48]=R):R=e[48],R}function Dr(){return ie.signOut()}function Rr(){const t=N.c(7),{data:e}=ie.useSession();if(!e?.user){let c;return t[0]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(me,{url:void 0,fallback:"U",shape:"circle",size:"sm",className:"cursor-pointer h-7 w-7",muted:!0}),t[0]=c):c=t[0],c}const s=e.user,r=s.name??void 0;let l;t[1]!==r||t[2]!==s?(l={...s,name:r},t[1]=r,t[2]=s,t[3]=l):l=t[3];const o=l,i=s.image;let a;return t[4]!==i||t[5]!==o?(a=n.jsx(Lr,{user:o,userImage:i}),t[4]=i,t[5]=o,t[6]=a):a=t[6],a}function Hr(){const t=N.c(2),s=We().location.href;let r;return t[0]!==s?(r=n.jsx(ps,{to:"/login",search:{next:s},replace:!0}),t[0]=s,t[1]=r):r=t[1],r}function Ur(t){const e=N.c(6),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ms,{children:n.jsx(jt,{})}),e[0]=r):r=e[0];let l;e[1]!==s?(l=n.jsx(fs,{children:s}),e[1]=s,e[2]=l):l=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(us,{children:n.jsx(Hr,{})}),e[3]=o):o=e[3];let i;return e[4]!==l?(i=n.jsxs(n.Fragment,{children:[r,l,o]}),e[4]=l,e[5]=i):i=e[5],i}function Br(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("fixed top-0 left-0 right-0 z-20 bg-background flex items-center w-full h-12 border-b border-border",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Fr(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex items-center justify-center px-2.5 h-full border-r border-border",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Wr(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex items-center gap-2 px-2 h-full",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Vr(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex items-center gap-2 px-2 h-full flex-1",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Gr(t){const e=N.c(5),{children:s,className:r}=t;let l;e[0]!==r?(l=z("flex items-center gap-2 px-2 h-full ml-auto",r),e[0]=r,e[1]=l):l=e[1];let o;return e[2]!==s||e[3]!==l?(o=n.jsx("div",{className:l,children:s}),e[2]=s,e[3]=l,e[4]=o):o=e[4],o}function Kr(){const t=N.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex items-center justify-center px-2 h-full border-r border-border",children:n.jsx("div",{className:"w-8 h-8 bg-muted rounded-md animate-pulse"})}),t[0]=e):e=t[0];let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx("div",{className:"flex items-center gap-2 px-2 h-full",children:n.jsx("div",{className:"w-32 h-6 bg-muted rounded-md animate-pulse"})}),t[1]=s):s=t[1];let r;return t[2]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsxs("div",{className:"fixed top-0 left-0 right-0 z-20 bg-background flex items-center w-full h-12 border-b border-border",children:[e,s,n.jsx("div",{className:"flex items-center gap-2 px-2 h-full ml-auto",children:n.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"})})]}),t[2]=r):r=t[2],r}const Re=Object.assign(Br,{Sidebar:Fr,Left:Wr,Center:Vr,Right:Gr,Skeleton:Kr});function rs(){const t=N.c(3),{toggleSidebar:e}=Ze();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(Bt,{className:"text-muted-foreground/85 group-hover:text-foreground transition-colors",size:18}),t[0]=s):s=t[0];let r;return t[1]!==e?(r=n.jsx(n.Fragment,{children:n.jsx(se,{onClick:e,size:"icon",variant:"ghost",className:"w-7 h-7 rounded-md",children:s})}),t[1]=e,t[2]=r):r=t[2],r}rs.Skeleton=function(){return n.jsx("div",{className:"w-7 h-7 bg-muted rounded-md animate-pulse"})};function Zr({showSidebarToggle:t=!1,showOrgSwitcher:e=!1,showDecoChat:s=!1,disableDecoChat:r=!1}){const[l,o]=Ge(),i=y.useRef(r);r&&l&&i.current!==r&&o(!1),i.current=r;const a=()=>{r||o(c=>!c)};return n.jsxs(Re,{children:[t&&n.jsx(Re.Sidebar,{children:n.jsx(rs,{})}),n.jsx(Re.Left,{children:e&&n.jsx(y.Suspense,{fallback:n.jsx(tt.Skeleton,{}),children:n.jsx(tt,{})})}),n.jsxs(Re.Right,{className:"gap-2",children:[s&&!r&&n.jsxs(se,{size:"sm",variant:"default",onClick:a,className:"h-7 gap-2",children:[n.jsx(St,{size:16}),"Chat"]}),n.jsx(Rr,{})]})]})}function Yr(t){const e=N.c(10),{children:s,className:r}=t,[,l]=y.useTransition();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=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]!==s||e[7]!==d||e[8]!==m?(f=n.jsx(Mt,{defaultSize:i,minSize:20,className:m,onResize:d,children:s}),e[5]=i,e[6]=s,e[7]=d,e[8]=m,e[9]=f):f=e[9],f}function qr(t){const e=N.c(5),{children:s}=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]!==s||e[2]!==o||e[3]!==l?(i=n.jsx(mn,{open:l,onOpenChange:o,children:s}),e[1]=s,e[2]=o,e[3]=l,e[4]=i):i=e[4],i}function Jr(t){const e=N.c(6),{disableChat:s}=t,r=s===void 0?!1:s,[l]=Ge();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Mt,{className:"bg-background",children:n.jsx(bt,{})}),e[0]=o):o=e[0];let i;e[1]!==l||e[2]!==r?(i=!r&&n.jsxs(n.Fragment,{children:[n.jsx(Qs,{withHandle:l}),n.jsx(Yr,{className:z(l?"max-w-none":"max-w-0"),children:n.jsx(sn,{})})]}),e[1]=l,e[2]=r,e[3]=i):i=e[3];let a;return e[4]!==i?(a=n.jsxs(en,{direction:"horizontal",children:[o,i]}),e[4]=i,e[5]=a):a=e[5],a}function Xr(){const{org:t,project:e}=st({strict:!1}),s=We(),[r,l]=y.useState(!1),o=s.location.pathname===`/${t}/${e}`||s.location.pathname===`/${t}/${e}/`,i=e??ee,{data:a}=xs({queryKey:hs.activeOrganization(t),queryFn:async()=>{if(!t)return null;const{data:d}=await ie.organization.setActive({organizationSlug:t});return{org:d,project:{slug:i,isOrgAdmin:i===ee}}},gcTime:1/0,staleTime:1/0,refetchOnWindowFocus:!1,refetchOnMount:!1});if(!a)return n.jsxs("div",{className:"min-h-screen bg-background",children:[n.jsx(Zr,{}),n.jsx("div",{className:"pt-12",children:n.jsx(bt,{})})]});if(!a.org)return window.location.pathname!=="/"&&(window.location.href="/"),null;const c={...a,project:{...a.project,slug:i,isOrgAdmin:i===ee}};return n.jsxs(gs,{...c,children:[n.jsx(qr,{children:n.jsxs("div",{className:"flex flex-col h-screen",style:{"--project-topbar-height":i===ee?"0px":"48px"},children:[n.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
|
-
`}),n.jsx(le.Provider,{children:n.jsxs(pn,{className:"flex-1 bg-sidebar",style:{"--sidebar-width":"13rem","--sidebar-width-mobile":"11rem"},children:[n.jsx(tr,{onCreateProject:()=>l(!0)}),n.jsx(hn,{className:"flex flex-col",children:n.jsxs(Ks,{children:[n.jsx(gr,{}),n.jsx("div",{className:"flex-1 overflow-hidden",children:n.jsx(Jr,{disableChat:o})})]})})]})})]})}),n.jsx(Ct,{open:r,onOpenChange:l})]})}function go(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Ur,{children:n.jsx(y.Suspense,{fallback:n.jsx(jt,{}),children:n.jsx(Xr,{})})}),t[0]=e):e=t[0],e}export{go as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as B,j as r,r as F,u as O,m as W,n as Q,K as Y}from"./index-BnM6zXPK.js";import"./index-lkQ_SnE8.js";import{C as G,a as J}from"./collection-table-wrapper-DpXz70UJ.js";import{C as X}from"./collection-search-kC3At3KN.js";import{E as I}from"./empty-state-CJnfgDRv.js";import{E as Z}from"./error-boundary-D1nW3qw3.js";import{P as h}from"./index-BzK60eGa.js";import{u as ee,U as te}from"./use-list-state-sOyPYO4a.js";import{f as re}from"./format-time-CMKyl-GC.js";import{a as se,u as oe}from"./constants-pTCFS1GU.js";import{B as ie,a as ae,b as le,c as ne}from"./breadcrumb-C8TKHD4-.js";import{B as f}from"./badge-DnrGjfKN.js";import{i as ce}from"./AlertCircle-fs-iLCxQ.js";import{c as me}from"./AlertOctagon-DJgNSLd2.js";import{n as V}from"./CheckDone01-CaHocOrI.js";import{i as de}from"./Check-woCJI4Zk.js";import{s as pe}from"./monaco-editor-lPTVHX05.js";import{i as R}from"./Loading01-CVxzxkEA.js";import{u as ue}from"./use-deco-chat-open-BpzqC0Eg.js";import"./button-ds0Xf2u_.js";import"./popover-BDHymXMd.js";import"./spinner-Bx7trFel.js";import"./integration-icon-GQvaX0z4.js";import"./index-B-34EG7J.js";import"./use-mcp-prompts-GQRi1KzV.js";import"./useQuery-B8N1a1vY.js";import"./dialog-1X4BWtmD.js";import"./X-DbHlFzca.js";import"./form-CCnPwGY1.js";import"./label-By7PTlud.js";import"./input-CoSRI0XN.js";import"./ArrowUp-D5TY17yS.js";import"./ChevronDown--AD2MLIh.js";import"./Edit01-DwOJTHYN.js";import"./Users03-DUHQ5891.js";import"./ArrowLeft-BOU-qvMz.js";import"./Code01-DOUE7D86.js";import"./infiniteQueryObserver-DwX9yony.js";import"./use-virtual-mcp-B-em4IGd.js";import"./use-connection-AuebM5gu.js";import"./useMutation-OCNp6OYx.js";import"./SearchMd-Ctirl108.js";import"./use-create-virtual-mcp-AQ2ouFC3.js";import"./usage-B8eRkRZY.js";import"./ChevronRight-DhFCl7fQ.js";import"./Copy01-DhF1Yrkw.js";import"./Terminal-DjfPKa_L.js";import"./localstorage-keys-DEZN3FMx.js";import"./generate-id-Dyweu44Y.js";import"./Trash01-h3f3UFq5.js";import"./dropdown-menu-Ckg1hXqa.js";import"./Grid01-BvWVxRRn.js";import"./List-D28XJ4eE.js";import"./view-mode-toggle-DEltdBOB.js";import"./table-D7pbHUDB.js";import"./avatar-CB2Y6aAq.js";import"./use-mobile-BxIj_uNd.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-llm-D32w61hb.js";import"./use-binding-C0O2f-XN.js";import"./binder-DWar94Dz.js";import"./select-DMMlFWJe.js";import"./File06-BaXucUWw.js";import"./Image01-CD-baYxu.js";import"./RefreshCcw01-DQu-afd1.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(de,{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(ce,{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(me,{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(pe,{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 _;e[16]!==v||e[17]!==s.slug||e[18]!==a.slug||e[19]!==k?(_=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]=_):_=e[20];const E=_;let b;e[21]===Symbol.for("react.memo_cache_sentinel")?(b=[{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]=b):b=e[21];const A=b;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 c;e[24]!==t.handleSort||e[25]!==t.setViewMode||e[26]!==t.sortDirection||e[27]!==t.sortKey||e[28]!==t.viewMode?(c=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]=c):c=e[29];let m;e[30]!==t?(m=i=>{i.key==="Escape"&&(t.setSearch(""),i.target.blur())},e[30]=t,e[31]=m):m=e[31];let d;e[32]!==t.search||e[33]!==t.setSearch||e[34]!==m?(d=r.jsx(X,{value:t.search,onChange:t.setSearch,placeholder:"Search tasks...",onKeyDown:m}),e[32]=t.search,e[33]=t.setSearch,e[34]=m,e[35]=d):d=e[35];let p;e[36]!==t.search?(p=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]=p):p=e[37];let u;e[38]!==t.handleSort||e[39]!==t.sortDirection||e[40]!==t.sortKey||e[41]!==E||e[42]!==p||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:p})})}),e[38]=t.handleSort,e[39]=t.sortDirection,e[40]=t.sortKey,e[41]=E,e[42]=p,e[43]=K,e[44]=u):u=e[44];let N;return e[45]!==c||e[46]!==d||e[47]!==u?(N=r.jsxs(h,{children:[c,d,u]}),e[45]=c,e[46]=d,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 Mt(){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{Mt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as u}from"./infiniteQueryObserver-DwX9yony.js";import{a5 as i}from"./index-BnM6zXPK.js";function t(e,r){return i(e,u,r)}export{t as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a5 as u,a8 as s}from"./index-BnM6zXPK.js";function o(e,r){return u(e,s,r)}export{o as u};
|