@decocms/mesh 2.74.0 → 2.75.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-C_hR5usO.js → AlertCircle-BtLmHyy8.js} +1 -1
- package/dist/client/assets/{ArrowUp-DnJUZ1OS.js → ArrowUp-CS3ZollZ.js} +1 -1
- package/dist/client/assets/{Calendar-Dnf0_EY9.js → Calendar-D6iDOsnM.js} +1 -1
- package/dist/client/assets/{Check-Sa4xK5Hg.js → Check-D3ubYXxc.js} +1 -1
- package/dist/client/assets/{CheckCircle-DRhauZbp.js → CheckCircle-BLc2ASgN.js} +1 -1
- package/dist/client/assets/{CheckDone01-I6GfoGdi.js → CheckDone01-C2olQLcp.js} +1 -1
- package/dist/client/assets/{ChevronDown-DmXLJeAy.js → ChevronDown-DGc_B_pI.js} +1 -1
- package/dist/client/assets/{ChevronRight-By4KEpZh.js → ChevronRight-BTZr-xye.js} +1 -1
- package/dist/client/assets/{Code01-h_k8K-1e.js → Code01-BgIlNb0q.js} +1 -1
- package/dist/client/assets/{Copy01-jvqvZrKj.js → Copy01-VJRVowHJ.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-CQJNqVgu.js → DotsHorizontal-J1HamufO.js} +1 -1
- package/dist/client/assets/{DotsVertical-gLXmVMYI.js → DotsVertical-XxVvTjZe.js} +1 -1
- package/dist/client/assets/{Download01-BKmVPJWY.js → Download01-B76QpppS.js} +1 -1
- package/dist/client/assets/{Edit01-BT8zEtQL.js → Edit01-B5aM7o8H.js} +1 -1
- package/dist/client/assets/{File02-BNE7fmK0.js → File02-nG54lqZh.js} +1 -1
- package/dist/client/assets/{File06-WU23pV9H.js → File06-BTrZX4-T.js} +1 -1
- package/dist/client/assets/{FilterLines-DJEB3mgx.js → FilterLines-GHETfQYS.js} +1 -1
- package/dist/client/assets/{Globe02-Dp5eUbS2.js → Globe02-Dk07oP0z.js} +1 -1
- package/dist/client/assets/{Grid01-CSAsqBFD.js → Grid01-RAa135S1.js} +1 -1
- package/dist/client/assets/{Home02-BUr926Eo.js → Home02-QIpDHMcj.js} +1 -1
- package/dist/client/assets/{Image01-BnbXZOf7.js → Image01-B2o6vVhA.js} +1 -1
- package/dist/client/assets/{Inbox01-XFeiQPbg.js → Inbox01-VryQyU0X.js} +1 -1
- package/dist/client/assets/{InfoCircle-5xWfOa8P.js → InfoCircle-DNjRzSWE.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BJLPX8tt.js → LinkExternal01-CDCzG7Bd.js} +1 -1
- package/dist/client/assets/{List-kXpaJIIp.js → List-DS9PzQZf.js} +1 -1
- package/dist/client/assets/{Loading01-D8zw0cyg.js → Loading01-B_72CFT3.js} +1 -1
- package/dist/client/assets/{Lock01-DCDiY4HG.js → Lock01-D4kTXh33.js} +1 -1
- package/dist/client/assets/{Pin01-DWsvacVo.js → Pin01-BnjsacaS.js} +1 -1
- package/dist/client/assets/{Play-Yhg_pcqU.js → Play-vW8bpCNs.js} +1 -1
- package/dist/client/assets/{Plus-BBD2SckJ.js → Plus-_EIrkETO.js} +1 -1
- package/dist/client/assets/{SearchMd-CGuwiAQe.js → SearchMd-DglsF9__.js} +1 -1
- package/dist/client/assets/{Settings01-D7-sGWon.js → Settings01-CFqjPjGn.js} +1 -1
- package/dist/client/assets/{Share07-C8iek9k4.js → Share07-O85vTLMC.js} +1 -1
- package/dist/client/assets/{Terminal-CyioLjuI.js → Terminal-Cy7QpUCs.js} +1 -1
- package/dist/client/assets/{Tool01-DF-lT9RC.js → Tool01-DkjdoaMq.js} +1 -1
- package/dist/client/assets/{Trash01-CLqhrRia.js → Trash01-CKqlebDm.js} +1 -1
- package/dist/client/assets/{Upload01-DrtXkSgF.js → Upload01-DYCMxAjY.js} +1 -1
- package/dist/client/assets/{Users03-oV4Gx6fu.js → Users03-CLwVIYNp.js} +1 -1
- package/dist/client/assets/{X-CuhyLwhM.js → X-CSVVvPO3.js} +1 -1
- package/dist/client/assets/{XClose-BFt2trBc.js → XClose-BOh776sq.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-D4bn0NTx.js → agent-connections-preview-DSNJFr0O.js} +1 -1
- package/dist/client/assets/{agent-detail-D8YR1Y7H.js → agent-detail-CRgviLOX.js} +1 -1
- package/dist/client/assets/{agents-BMyluA59.js → agents-CZ4ZklqY.js} +1 -1
- package/dist/client/assets/{alert-dialog-BxcV0D_1.js → alert-dialog-CMFFNJg5.js} +1 -1
- package/dist/client/assets/{auth-catchall-DLJkIPQ0.js → auth-catchall-Y9hKDakc.js} +1 -1
- package/dist/client/assets/{avatar-D3z5_V3I.js → avatar-C0cccS60.js} +1 -1
- package/dist/client/assets/{badge-BklHLRcK.js → badge-67pGhcsZ.js} +1 -1
- package/dist/client/assets/{binder-ak1AkjZY.js → binder-BQNmKBxJ.js} +1 -1
- package/dist/client/assets/{breadcrumb-B_Yxwj4p.js → breadcrumb-C5T3dJE6.js} +1 -1
- package/dist/client/assets/{button-CcO5M7F7.js → button-AB9cXWBb.js} +1 -1
- package/dist/client/assets/{card-BNt4WjQv.js → card-DatbcemW.js} +1 -1
- package/dist/client/assets/{checkbox-CirsSPdM.js → checkbox-lsjWL6i2.js} +1 -1
- package/dist/client/assets/{circle-alert-BcHtOytY.js → circle-alert-BctrA2dR.js} +1 -1
- package/dist/client/assets/{collection-detail-iX-6m_0X.js → collection-detail-HRUP2PWH.js} +3 -3
- package/dist/client/assets/{collection-search-Cyt8_oQV.js → collection-search-CNaPV8pR.js} +1 -1
- package/dist/client/assets/{collection-tab-Cbay3Q2-.js → collection-tab-DV_TP_WM.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CFNweZN1.js → collection-table-wrapper-DSM2ewq2.js} +1 -1
- package/dist/client/assets/{collection-tabs-Dh2bhvAY.js → collection-tabs-CnXL2suk.js} +1 -1
- package/dist/client/assets/{command-8Q_FGz0v.js → command-DDT6AGtU.js} +1 -1
- package/dist/client/assets/{connect-1mhMrmD4.js → connect-Cvc6-UMK.js} +1 -1
- package/dist/client/assets/{connection-card-BGd7kcn-.js → connection-card-BoD60JtX.js} +1 -1
- package/dist/client/assets/{connection-detail-dEdcHJ4u.js → connection-detail-CGxZSMNC.js} +1 -1
- package/dist/client/assets/{connections-DmGFiu1f.js → connections-CkMfBeE_.js} +1 -1
- package/dist/client/assets/constants-DBa8dlFt.js +1 -0
- package/dist/client/assets/{constants-DuSOM18S.js → constants-Dd61XPju.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-j_P7xuhv.js → create-organization-dialog-lVschU-T.js} +1 -1
- package/dist/client/assets/{create-project-dialog-C-mSn_Ux.js → create-project-dialog-oeLTBCgQ.js} +1 -1
- package/dist/client/assets/{dialog-B_iTVR3h.js → dialog-V-G7cm4S.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BTPpCOPE.js → dropdown-menu-Cr68JTqs.js} +1 -1
- package/dist/client/assets/dynamic-plugin-layout-BDN43EV9.js +1 -0
- package/dist/client/assets/{empty-state-Ct1fZFlf.js → empty-state-DTsFurx5.js} +1 -1
- package/dist/client/assets/{empty-state--JD6ZxUc.js → empty-state-DXDgk150.js} +1 -1
- package/dist/client/assets/{env-vars-editor-B4EebJEK.js → env-vars-editor-CJIkUQFq.js} +1 -1
- package/dist/client/assets/{error-boundary-DlgelpJG.js → error-boundary-CyPUBnGI.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BM37afPK.js → extract-connection-data-Cr8RzppI.js} +1 -1
- package/dist/client/assets/file-browser-BMnqO_1p.js +2 -0
- package/dist/client/assets/{form-CSsv2IBt.js → form-Dk1BQhBM.js} +1 -1
- package/dist/client/assets/grid-view-DowLXjS7.js +1 -0
- package/dist/client/assets/{home-D16zlSya.js → home-B0Y3Di4D.js} +1 -1
- package/dist/client/assets/{index--g69ISoA.css → index-BEdPWc-P.css} +1 -1
- package/dist/client/assets/{index-Bo7hWTur.js → index-CLOGlhow.js} +1 -1
- package/dist/client/assets/{index-DZ7G-bvr.js → index-CMGKEOx9.js} +1 -1
- package/dist/client/assets/{index-CZtqakWK.js → index-COO_eJWG.js} +1 -1
- package/dist/client/assets/{index-DJCm-wAr.js → index-CPvkxTJI.js} +1 -1
- package/dist/client/assets/{index-a2nqbblp.js → index-CffYvbOk.js} +1 -1
- package/dist/client/assets/{index-CHcJPAjT.js → index-D8Damm96.js} +1 -1
- package/dist/client/assets/{index-BHu7Lc_d.js → index-DcpUI1e8.js} +1 -1
- package/dist/client/assets/{index-Bn2rDd42.js → index-KcN9jfkO.js} +29 -29
- package/dist/client/assets/{index-fr6MaGoE.js → index-XIgm4U89.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-VnhrjjoH.js → infiniteQueryObserver-BPw7at1z.js} +1 -1
- package/dist/client/assets/{input-DBvMwxwE.js → input-DpQoaQfS.js} +1 -1
- package/dist/client/assets/{integration-icon-C8seGsuO.js → integration-icon-DzX6vjWU.js} +1 -1
- package/dist/client/assets/{label-BjQxQJkg.js → label-B4u_PB72.js} +1 -1
- package/dist/client/assets/{layout-ZTsfxACA.js → layout-1uXnWnKk.js} +1 -1
- package/dist/client/assets/{localstorage-keys-BhunmwZg.js → localstorage-keys-BM3WWg3m.js} +1 -1
- package/dist/client/assets/{login-H0BwFxqL.js → login-B56MGOs9.js} +1 -1
- package/dist/client/assets/{mcp-oauth-ZUujauBG.js → mcp-oauth-CKAjCVZP.js} +1 -1
- package/dist/client/assets/{mcp-server-card-KgRAONYw.js → mcp-server-card-DoPF_WVv.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-Ce9SGjoZ.js → mcp-server-detail-CkS0PbuH.js} +2 -2
- package/dist/client/assets/{members-C925BdC6.js → members-BB1doSO5.js} +1 -1
- package/dist/client/assets/{monaco-editor-D7Ghoc8y.js → monaco-editor-DEHFPbnX.js} +1 -1
- package/dist/client/assets/{monitoring-DI8QAuDx.js → monitoring-DOjL9t3e.js} +1 -1
- package/dist/client/assets/{oauth-callback-DqKFxIqr.js → oauth-callback-BBcJg1UX.js} +1 -1
- package/dist/client/assets/{page-DCfXF14g.js → page-B3KFw8CR.js} +1 -1
- package/dist/client/assets/{page-B2cjdb1f.js → page-C7jIzvcm.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-BYB8Yhjv.js → plugin-empty-state-NBfVVy0l.js} +1 -1
- package/dist/client/assets/{plugin-header-CLRCQ1W3.js → plugin-header-BXDOmgaW.js} +1 -1
- package/dist/client/assets/{popover-BkKSdvGf.js → popover-BuD0r9BV.js} +1 -1
- package/dist/client/assets/{project-layout-DzX_Lv0I.js → project-layout-Cnrq-SYE.js} +1 -1
- package/dist/client/assets/{project-settings-lapjGGi3.js → project-settings-QWIujTPO.js} +1 -1
- package/dist/client/assets/{projects-list-DZgOrcLS.js → projects-list-D8sP5qSm.js} +1 -1
- package/dist/client/assets/{registry-utils-BsLp7zXK.js → registry-utils-DBaLa5Rh.js} +1 -1
- package/dist/client/assets/{resizable-CdUSPFqv.js → resizable-CgvrBBsS.js} +1 -1
- package/dist/client/assets/{select-J2aavKNi.js → select-Bc3qnIp8.js} +1 -1
- package/dist/client/assets/shell-layout-BNnUTIs6.js +12 -0
- package/dist/client/assets/{spinner-Bn-tqgsf.js → spinner-rSR6baPa.js} +1 -1
- package/dist/client/assets/{store-invite-C8stGp_k.js → store-invite-pQr9-dk3.js} +1 -1
- package/dist/client/assets/{switch-CG0LWjwI.js → switch-DdokomeM.js} +1 -1
- package/dist/client/assets/{table-BNxQWMxG.js → table-a_0ITwUC.js} +1 -1
- package/dist/client/assets/{tasks-C_RAoHGr.js → tasks-CTttayn-.js} +1 -1
- package/dist/client/assets/{textarea-CKlKOzV4.js → textarea-DYwKTx03.js} +1 -1
- package/dist/client/assets/{tools-list-D0G5KWHg.js → tools-list-C7hTP47S.js} +1 -1
- package/dist/client/assets/topbar-portal-_MNJb0ke.js +1 -0
- package/dist/client/assets/{typewriter-title-BqfnndCW.js → typewriter-title-BZ5Kpwdd.js} +1 -1
- package/dist/client/assets/{use-binding-Dgjl_Htk.js → use-binding-Dm7Ehllr.js} +1 -1
- package/dist/client/assets/{use-connection-CVk8Bzpz.js → use-connection-0mxTykry.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BpXLuk-p.js → use-create-virtual-mcp-DokNG_Sw.js} +1 -1
- package/dist/client/assets/{use-deco-chat-open-CfZI9mqc.js → use-deco-chat-open-ChpE6vuj.js} +5 -5
- package/dist/client/assets/{use-install-from-registry-5UUqPBO7.js → use-install-from-registry-1t9k1vMV.js} +1 -1
- package/dist/client/assets/{use-list-state-D_1V56-b.js → use-list-state-iF5wqfMX.js} +1 -1
- package/dist/client/assets/{use-llm-Ca3pgrIB.js → use-llm-cYoJ456l.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-Cn7tm6ug.js → use-mcp-prompts-DZbjmEdn.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Ddi2i1Nb.js → use-mcp-tools-BQRPyYnS.js} +1 -1
- package/dist/client/assets/{use-mobile-p03CcGW0.js → use-mobile-B5hu4mxq.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DHZKDAPt.js → use-organization-settings-8Md9ygEM.js} +1 -1
- package/dist/client/assets/{use-project-D-mK4K9b.js → use-project-Dun345CA.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-C83o4Rih.js → use-virtual-mcp-DSRU0zGP.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-D6oUaKP2.js +1 -0
- package/dist/client/assets/{useMutation-CnTeRHmv.js → useMutation-ClyYx3N6.js} +1 -1
- package/dist/client/assets/useQuery-DUPTaiAP.js +1 -0
- package/dist/client/assets/utils-Ck2p4uOz.js +1 -0
- package/dist/client/assets/{view-mode-toggle-CJkT6m07.js → view-mode-toggle-x6y4jYTo.js} +1 -1
- package/dist/client/assets/{workflow-2rDY9uo2.js → workflow-Da57Slbz.js} +1 -1
- package/dist/client/index.html +2 -2
- package/package.json +1 -1
- package/dist/client/assets/constants-QC26G_cT.js +0 -1
- package/dist/client/assets/dynamic-plugin-layout-BsqDni3U.js +0 -1
- package/dist/client/assets/file-browser-DQeqPq9E.js +0 -2
- package/dist/client/assets/grid-view-DBKftgaD.js +0 -1
- package/dist/client/assets/shell-layout-DOBmQ9ah.js +0 -12
- package/dist/client/assets/useInfiniteQuery-DDUEUpOZ.js +0 -1
- package/dist/client/assets/useQuery-Ct96KcZp.js +0 -1
- package/dist/client/assets/utils-Ckc2UwOp.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as b,c as N,u as B,K as I,j as x}from"./index-
|
|
1
|
+
import{r as b,c as N,u as B,K as I,j as x}from"./index-KcN9jfkO.js";import{A as _}from"./avatar-C0cccS60.js";import{c as C}from"./utils-Ck2p4uOz.js";import{u as L}from"./useQuery-DUPTaiAP.js";import{a as U,u as D}from"./constants-Dd61XPju.js";import{u as P}from"./use-mobile-B5hu4mxq.js";const A=({size:i=24,color:e="currentColor",...t})=>b.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},b.createElement("path",{d:"M2.42 12.713c-.136-.215-.204-.323-.242-.49a1.173 1.173 0 0 1 0-.446c.038-.167.106-.274.242-.49C3.546 9.505 6.895 5 12 5s8.455 4.505 9.58 6.287c.137.215.205.323.243.49.029.125.029.322 0 .446-.038.167-.106.274-.242.49C20.455 14.495 17.105 19 12 19c-5.106 0-8.455-4.505-9.58-6.287Z"}),b.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}));A.displayName="Eye";function R(i){const e=N.c(11),{org:t}=B();let c;e[0]!==t.id?(c={connectionId:U,orgId:t.id},e[0]=t.id,e[1]=c):c=e[1];const r=D(c);let s;e[2]!==i?(s=I.user(i),e[2]=i,e[3]=s):s=e[3];let o;e[4]!==r||e[5]!==i?(o=async()=>{const p=await r.callTool({name:"USER_GET",arguments:{id:i}});return(p.structuredContent??p).user},e[4]=r,e[5]=i,e[6]=o):o=e[6];const a=!!i;let l;return e[7]!==s||e[8]!==o||e[9]!==a?(l={queryKey:s,queryFn:o,staleTime:3e5,retry:1,enabled:a},e[7]=s,e[8]=o,e[9]=a,e[10]=l):l=e[10],L(l)}function H(i){const e=N.c(39),{id:t,size:c,showEmail:r,className:s}=i,o=c===void 0?"xs":c,a=r===void 0?!1:r,{data:l,isLoading:p,isError:j}=R(t);if(p){let u;e[0]!==s?(u=C("flex items-center gap-2",s),e[0]=s,e[1]=u):u=e[1];let n;e[2]!==o?(n=x.jsx(_.Skeleton,{shape:"circle",size:o}),e[2]=o,e[3]=n):n=e[3];let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=x.jsx("div",{className:"h-3 w-24 bg-muted animate-pulse rounded"}),e[4]=g):g=e[4];let h;e[5]!==a?(h=a&&x.jsx("div",{className:"h-2 w-32 bg-muted animate-pulse rounded"}),e[5]=a,e[6]=h):h=e[6];let w;e[7]!==h?(w=x.jsxs("div",{className:"flex flex-col gap-1",children:[g,h]}),e[7]=h,e[8]=w):w=e[8];let M;return e[9]!==u||e[10]!==n||e[11]!==w?(M=x.jsxs("div",{className:u,children:[n,w]}),e[9]=u,e[10]=n,e[11]=w,e[12]=M):M=e[12],M}if(j||!l){let u;e[13]!==s?(u=C("flex items-center gap-2",s),e[13]=s,e[14]=u):u=e[14];let n;e[15]!==o?(n=x.jsx(_,{shape:"circle",size:o,fallback:"?",muted:!0}),e[15]=o,e[16]=n):n=e[16];let g;e[17]===Symbol.for("react.memo_cache_sentinel")?(g=x.jsx("div",{className:"flex flex-col",children:x.jsx("div",{className:"text-sm text-muted-foreground",children:"Unknown User"})}),e[17]=g):g=e[17];let h;return e[18]!==u||e[19]!==n?(h=x.jsxs("div",{className:u,children:[n,g]}),e[18]=u,e[19]=n,e[20]=h):h=e[20],h}let v;e[21]!==s?(v=C("flex items-center gap-2",s),e[21]=s,e[22]=v):v=e[22];const y=l.image??void 0;let m;e[23]!==o||e[24]!==y||e[25]!==l.name?(m=x.jsx(_,{shape:"circle",size:o,url:y,fallback:l.name}),e[23]=o,e[24]=y,e[25]=l.name,e[26]=m):m=e[26];let d;e[27]!==l.name?(d=x.jsx("div",{className:"text-sm font-medium",children:l.name}),e[27]=l.name,e[28]=d):d=e[28];let f;e[29]!==a||e[30]!==l.email?(f=a&&x.jsx("div",{className:"text-xs text-muted-foreground",children:l.email}),e[29]=a,e[30]=l.email,e[31]=f):f=e[31];let S;e[32]!==d||e[33]!==f?(S=x.jsxs("div",{className:"flex flex-col",children:[d,f]}),e[32]=d,e[33]=f,e[34]=S):S=e[34];let E;return e[35]!==v||e[36]!==m||e[37]!==S?(E=x.jsxs("div",{className:v,children:[m,S]}),e[35]=v,e[36]=m,e[37]=S,e[38]=E):E=e[38],E}function W(i){const e=`deco-filters-${i}`,[t,c]=b.useState(()=>{try{const s=globalThis.localStorage?.getItem(e);if(s)return JSON.parse(s)}catch(s){console.error("Failed to parse stored filters:",s)}return[]});return[t,s=>{c(s);try{globalThis.localStorage?.setItem(e,JSON.stringify(s))}catch(o){console.error("Failed to save filters:",o)}}]}function z(i){const e=N.c(7),[t,c]=b.useState(i),[r,s]=b.useState(i?"desc":null);let o;e[0]!==r||e[1]!==t?(o=p=>{t!==p?(c(p),s("asc")):r==="asc"?s("desc"):r==="desc"&&(c(void 0),s(null))},e[0]=r,e[1]=t,e[2]=o):o=e[2];const a=o;let l;return e[3]!==a||e[4]!==r||e[5]!==t?(l={sortKey:t,sortDirection:r,handleSort:a},e[3]=a,e[4]=r,e[5]=t,e[6]=l):l=e[6],l}function q(i,e){const t=N.c(12),c=e===void 0?"cards":e,r=P(),s=b.useRef(r),o=i?`deco-view-mode-${i}`:"deco-view-mode";let a;t[0]!==c||t[1]!==o?(a=()=>{const f=globalThis.localStorage?.getItem(o);return f==="cards"||f==="table"?f:c},t[0]=c,t[1]=o,t[2]=a):a=t[2];const[l,p]=b.useState(a);let j;t[3]!==o?(j=f=>{p(f),globalThis.localStorage?.setItem(o,f)},t[3]=o,t[4]=j):j=t[4];const v=j;let y,m;t[5]!==r||t[6]!==l?(y=()=>{!s.current&&r&&l==="table"&&p("cards"),s.current=r},m=[r,l],t[5]=r,t[6]=l,t[7]=y,t[8]=m):(y=t[7],m=t[8]),b.useEffect(y,m);let d;return t[9]!==v||t[10]!==l?(d=[l,v],t[9]=v,t[10]=l,t[11]=d):d=t[11],d}function X(i){const e=N.c(20),{namespace:t,resource:c,defaultSortKey:r,defaultViewMode:s}=i,o=r===void 0?"title":r,a=s===void 0?"table":s,[l,p]=b.useState(""),j=b.useDeferredValue(l),v=`${t}-${c}`,[y,m]=W(v),d=`mesh-${c}-filter-visible-${t}`;let f;e[0]!==d?(f=()=>globalThis.localStorage?.getItem(d)==="true",e[0]=d,e[1]=f):f=e[1];const[S,E]=b.useState(f);let u;e[2]!==d?(u=T=>{E(T),globalThis.localStorage?.setItem(d,String(T))},e[2]=d,e[3]=u):u=e[3];const n=u;let g;e[4]!==S||e[5]!==n?(g=()=>{n(!S)},e[4]=S,e[5]=n,e[6]=g):g=e[6];const h=g,[w,M]=q(`mesh-${c}-${t}`,a),{sortKey:k,sortDirection:K,handleSort:F}=z(o),V=k;let $;return e[7]!==S||e[8]!==y||e[9]!==F||e[10]!==l||e[11]!==j||e[12]!==n||e[13]!==m||e[14]!==M||e[15]!==K||e[16]!==V||e[17]!==h||e[18]!==w?($={search:l,searchTerm:j,setSearch:p,filters:y,setFilters:m,filterBarVisible:S,setFilterBarVisible:n,toggleFilterBar:h,viewMode:w,setViewMode:M,sortKey:V,sortDirection:K,handleSort:F},e[7]=S,e[8]=y,e[9]=F,e[10]=l,e[11]=j,e[12]=n,e[13]=m,e[14]=M,e[15]=K,e[16]=V,e[17]=h,e[18]=w,e[19]=$):$=e[19],$}export{H as U,A as s,X as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,u}from"./index-
|
|
1
|
+
import{c,u}from"./index-KcN9jfkO.js";import{h as m,e as a}from"./use-connection-0mxTykry.js";import{j as p}from"./constants-Dd61XPju.js";import{a as C}from"./use-binding-Dm7Ehllr.js";function x(n,s){const o=c.c(5);let e;o[0]!==s?(e=s===void 0?{}:s,o[0]=s,o[1]=e):e=o[1];const r=e,{org:i}=u();let t;o[2]!==n||o[3]!==i.id?(t={connectionId:n,orgId:i.id},o[2]=n,o[3]=i.id,o[4]=t):t=o[4];const l=p(t);return a(n??"no-connection","LLM",l,r)}function j(){const n=c.c(2),s=m();let o;return n[0]!==s?(o={connections:s,binding:"LLMS"},n[0]=s,n[1]=o):o=n[1],C(o)}export{x as a,j as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,y as c}from"./index-
|
|
1
|
+
import{c as u,y as c}from"./index-KcN9jfkO.js";import{u as p}from"./useQuery-DUPTaiAP.js";import{K as n}from"./constants-Dd61XPju.js";async function f(l){return l.getServerCapabilities()?.resources?await l.listResources():{resources:[]}}async function b(l,e){return await l.readResource({uri:e})}function R(l){const e=u.c(12);let t,s;e[0]!==l?({client:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n.mcpResourcesList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>f(t),e[5]=t,e[6]=i):i=e[6];const o=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==o?(a={...s,queryKey:r,queryFn:i,staleTime:o,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=o,e[11]=a):a=e[11],c(a)}function L(l){const e=u.c(12);let t,s;e[0]!==l?({client:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n.mcpResourcesList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>f(t),e[5]=t,e[6]=i):i=e[6];const o=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==o?(a={...s,queryKey:r,queryFn:i,staleTime:o,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=o,e[11]=a):a=e[11],p(a)}async function m(l){return l.getServerCapabilities()?.prompts?await l.listPrompts():{prompts:[]}}async function T(l,e,t){if(!l.getServerCapabilities()?.prompts)throw new Error("Prompts capability not supported");return await l.getPrompt({name:e,arguments:t??{}})}function g(l){const e=u.c(12);let t,s;e[0]!==l?({client:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n.mcpPromptsList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>m(t),e[5]=t,e[6]=i):i=e[6];const o=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==o?(a={...s,queryKey:r,queryFn:i,staleTime:o,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=o,e[11]=a):a=e[11],c(a)}function C(l){const e=u.c(12);let t,s;e[0]!==l?({client:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n.mcpPromptsList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>m(t),e[5]=t,e[6]=i):i=e[6];const o=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==o?(a={...s,queryKey:r,queryFn:i,staleTime:o,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=o,e[11]=a):a=e[11],p(a)}export{f as a,C as b,R as c,L as d,T as g,m as l,b as r,g as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as m,y as p}from"./index-
|
|
1
|
+
import{c as m,y as p}from"./index-KcN9jfkO.js";import{u as q}from"./useQuery-DUPTaiAP.js";import{u as C}from"./useMutation-ClyYx3N6.js";import{K as T}from"./constants-Dd61XPju.js";function w(r){const e=m.c(12);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let o;e[5]!==t?(o=async()=>await t.listTools(),e[5]=t,e[6]=o):o=e[6];const i=s.staleTime??3e4;let n;return e[7]!==s||e[8]!==l||e[9]!==o||e[10]!==i?(n={...s,queryKey:l,queryFn:o,staleTime:i,retry:!1},e[7]=s,e[8]=l,e[9]=o,e[10]=i,e[11]=n):n=e[11],p(n)}function F(r){const e=m.c(12);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let o;e[5]!==t?(o=async()=>await t.listTools(),e[5]=t,e[6]=o):o=e[6];const i=s.staleTime??3e4;let n;return e[7]!==s||e[8]!==l||e[9]!==o||e[10]!==i?(n={...s,queryKey:l,queryFn:o,staleTime:i,retry:!1},e[7]=s,e[8]=l,e[9]=o,e[10]=i,e[11]=n):n=e[11],q(n)}function P(r){const e=m.c(21);let t,s,l,o;e[0]!==r?({client:t,toolName:o,toolArguments:l,...s}=r,e[0]=r,e[1]=t,e[2]=s,e[3]=l,e[4]=o):(t=e[1],s=e[2],l=e[3],o=e[4]);let i,n,u;if(e[5]!==t||e[6]!==s||e[7]!==l||e[8]!==o){const y=JSON.stringify(l??{});u=p,i=s,n=T.mcpToolCall(t,o,y),e[5]=t,e[6]=s,e[7]=l,e[8]=o,e[9]=i,e[10]=n,e[11]=u}else i=e[9],n=e[10],u=e[11];let a;e[12]!==t||e[13]!==l||e[14]!==o?(a=async()=>await t.callTool({name:o,arguments:l}),e[12]=t,e[13]=l,e[14]=o,e[15]=a):a=e[15];const f=s.staleTime??3e4;let c;return e[16]!==i||e[17]!==n||e[18]!==a||e[19]!==f?(c={...i,queryKey:n,queryFn:a,staleTime:f,retry:!1},e[16]=i,e[17]=n,e[18]=a,e[19]=f,e[20]=c):c=e[20],u(c)}function $(r){const e=m.c(21);let t,s,l,o;e[0]!==r?({client:t,toolName:o,toolArguments:l,...s}=r,e[0]=r,e[1]=t,e[2]=s,e[3]=l,e[4]=o):(t=e[1],s=e[2],l=e[3],o=e[4]);let i,n,u;if(e[5]!==t||e[6]!==s||e[7]!==l||e[8]!==o){const y=JSON.stringify(l??{});u=q,i=s,n=T.mcpToolCall(t,o,y),e[5]=t,e[6]=s,e[7]=l,e[8]=o,e[9]=i,e[10]=n,e[11]=u}else i=e[9],n=e[10],u=e[11];let a;e[12]!==t||e[13]!==l||e[14]!==o?(a=async()=>await t.callTool({name:o,arguments:l}),e[12]=t,e[13]=l,e[14]=o,e[15]=a):a=e[15];const f=s.staleTime??3e4;let c;return e[16]!==i||e[17]!==n||e[18]!==a||e[19]!==f?(c={...i,queryKey:n,queryFn:a,staleTime:f,retry:!1},e[16]=i,e[17]=n,e[18]=a,e[19]=f,e[20]=c):c=e[20],u(c)}function L(r){const e=m.c(8);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=async i=>await t.callTool(i),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o={...s,mutationFn:l},e[5]=s,e[6]=l,e[7]=o):o=e[7],C(o)}export{L as a,$ as b,w as c,F as d,P as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as m,r}from"./index-
|
|
1
|
+
import{c as m,r}from"./index-KcN9jfkO.js";const a=768,o=()=>globalThis.innerWidth<a;function u(){const e=m.c(2),[l,n]=r.useState(o);let t,s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{const i=()=>n(o),c=globalThis.matchMedia(`(max-width: ${a-1}px)`);return c.addEventListener("change",i),n(o),()=>c.removeEventListener("change",i)},s=[],e[0]=t,e[1]=s):(t=e[0],s=e[1]),r.useEffect(t,s),l}export{u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as m,u as T,y as A,z as d,K as g}from"./index-
|
|
1
|
+
import{c as m,u as T,y as A,z as d,K as g}from"./index-KcN9jfkO.js";import{u as _}from"./useMutation-ClyYx3N6.js";import{a as p,u as y}from"./constants-Dd61XPju.js";function D(e){const t=m.c(10),{org:i}=T();let l;t[0]!==i.id?(l={connectionId:p,orgId:i.id},t[0]=i.id,t[1]=l):l=t[1];const c=y(l);let u;t[2]!==e?(u=g.organizationSettings(e),t[2]=e,t[3]=u):u=t[3];let s;t[4]!==c||t[5]!==e?(s=async()=>{const a=await c.callTool({name:"ORGANIZATION_SETTINGS_GET",arguments:{}}),r=a.structuredContent??a;return r||{organizationId:e,sidebar_items:null,enabled_plugins:null,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}},t[4]=c,t[5]=e,t[6]=s):s=t[6];let n;t[7]!==u||t[8]!==s?(n={queryKey:u,queryFn:s,staleTime:6e4},t[7]=u,t[8]=s,t[9]=n):n=t[9];const{data:o}=A(n);return o}function G(e){const t=m.c(13),i=d(),{org:l}=T();let c;t[0]!==l.id?(c={connectionId:p,orgId:l.id},t[0]=l.id,t[1]=c):c=t[1];const u=y(c);let s;t[2]!==u||t[3]!==e?(s=async S=>{const f=await u.callTool({name:"ORGANIZATION_SETTINGS_UPDATE",arguments:{organizationId:e,...S}});return f.structuredContent??f},t[2]=u,t[3]=e,t[4]=s):s=t[4];let n;t[5]!==e||t[6]!==i?(n=S=>{i.setQueryData(g.organizationSettings(e),S)},t[5]=e,t[6]=i,t[7]=n):n=t[7];let o;t[8]!==s||t[9]!==n?(o={mutationFn:s,onSuccess:n},t[8]=s,t[9]=n,t[10]=o):o=t[10];const a=_(o);let r;return t[11]!==a?(r={update:a},t[11]=a,t[12]=r):r=t[12],r}export{G as a,D as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{K as m,c as C}from"./index-
|
|
1
|
+
import{K as m,c as C}from"./index-KcN9jfkO.js";import{u as y}from"./useQuery-DUPTaiAP.js";import{u as f,a}from"./constants-Dd61XPju.js";function q(t,s){const e=C.c(13);let l;e[0]!==t?(l={connectionId:a,orgId:t},e[0]=t,e[1]=l):l=e[1];const u=f(l);let r;e[2]!==t||e[3]!==s?(r=m.project(t,s),e[2]=t,e[3]=s,e[4]=r):r=e[4];let c;e[5]!==u||e[6]!==t||e[7]!==s?(c=async()=>{const p=await u.callTool({name:"PROJECT_GET",arguments:{organizationId:t,slug:s}});return(p.structuredContent??p).project},e[5]=u,e[6]=t,e[7]=s,e[8]=c):c=e[8];const n=!!t&&!!s;let o;return e[9]!==r||e[10]!==c||e[11]!==n?(o={queryKey:r,queryFn:c,enabled:n,staleTime:3e4},e[9]=r,e[10]=c,e[11]=n,e[12]=o):o=e[12],y(o)}function _(t,s){const e=f({connectionId:a,orgId:t}),l={queryKey:m.projects(t),queryFn:async()=>{const u=await e.callTool({name:"PROJECT_LIST",arguments:{organizationId:t}});return(u.structuredContent??u).projects.map(c=>({...c,organizationId:t}))},staleTime:3e4};return y({...l,enabled:!!t})}export{_ as a,q as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,u as r}from"./index-
|
|
1
|
+
import{c,u as r}from"./index-KcN9jfkO.js";import{e as a,u as C,d as I}from"./use-connection-0mxTykry.js";import{a as l,u}from"./constants-Dd61XPju.js";function m(i){const t=c.c(4);let o;t[0]!==i?(o=i===void 0?{}:i,t[0]=i,t[1]=o):o=t[1];const n=o,{org:e}=r();let s;t[2]!==e.id?(s={connectionId:l,orgId:e.id},t[2]=e.id,t[3]=s):s=t[3];const d=u(s);return a(e.id,"VIRTUAL_MCP",d,n)}function V(i){const t=c.c(2),{org:o}=r();let n;t[0]!==o.id?(n={connectionId:l,orgId:o.id},t[0]=o.id,t[1]=n):n=t[1];const e=u(n);return I(o.id,"VIRTUAL_MCP",i??void 0,e)}function p(){const i=c.c(2),{org:t}=r();let o;i[0]!==t.id?(o={connectionId:l,orgId:t.id},i[0]=t.id,i[1]=o):o=i[1];const n=u(o);return C(t.id,"VIRTUAL_MCP",n)}export{p as a,m as b,V as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as u}from"./infiniteQueryObserver-BPw7at1z.js";import{a5 as i}from"./index-KcN9jfkO.js";function t(e,r){return i(e,u,r)}export{t as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{aO as l,aP as p,aQ as n,aR as d,aS as h,z as b,r as o,aT as m,aU as f}from"./index-KcN9jfkO.js";var v=class extends l{#s;#i=void 0;#t;#e;constructor(t,s){super(),this.#s=t,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const s=this.options;this.options=this.#s.defaultMutationOptions(t),p(this.options,s)||this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),s?.mutationKey&&this.options.mutationKey&&n(s.mutationKey)!==n(this.options.mutationKey)?this.reset():this.#t?.state.status==="pending"&&this.#t.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#t?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#i}reset(){this.#t?.removeObserver(this),this.#t=void 0,this.#r(),this.#o()}mutate(t,s){return this.#e=s,this.#t?.removeObserver(this),this.#t=this.#s.getMutationCache().build(this.#s,this.options),this.#t.addObserver(this),this.#t.execute(t)}#r(){const t=this.#t?.state??d();this.#i={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){h.batch(()=>{if(this.#e&&this.hasListeners()){const s=this.#i.variables,i=this.#i.context,e={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#e.onSuccess?.(t.data,s,i,e),this.#e.onSettled?.(t.data,null,s,i,e)):t?.type==="error"&&(this.#e.onError?.(t.error,s,i,e),this.#e.onSettled?.(void 0,t.error,s,i,e))}this.listeners.forEach(s=>{s(this.#i)})})}};function O(t,s){const i=b(s),[e]=o.useState(()=>new v(i,t));o.useEffect(()=>{e.setOptions(t)},[e,t]);const r=o.useSyncExternalStore(o.useCallback(a=>e.subscribe(h.batchCalls(a)),[e]),()=>e.getCurrentResult(),()=>e.getCurrentResult()),u=o.useCallback((a,c)=>{e.mutate(a,c).catch(m)},[e]);if(r.error&&f(e.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:u,mutateAsync:r.mutate}}export{O as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a5 as u,a8 as s}from"./index-KcN9jfkO.js";function o(e,r){return u(e,s,r)}export{o as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ac as a,ad as c}from"./index-KcN9jfkO.js";function e(...r){return a(c(r))}export{e as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as Y,r as V,j as i}from"./index-
|
|
1
|
+
import{c as Y,r as V,j as i}from"./index-KcN9jfkO.js";import{c as n}from"./utils-Ck2p4uOz.js";const Z={sm:{button:"size-7",icon:"size-4"},md:{button:"size-9",icon:"size-5"},lg:{button:"size-12",icon:"size-6"}};function oe(J){const e=Y.c(66),{value:o,onValueChange:l,options:t,size:D,fullWidth:F,className:W}=J,K=D===void 0?"sm":D,w=F===void 0?!1:F,G=V.useRef(null),H=V.useRef(null);let R;e[0]===Symbol.for("react.memo_cache_sentinel")?(R={left:0,width:0,opacity:0},e[0]=R):R=e[0];const[N,O]=V.useState(R);let _;e[1]===Symbol.for("react.memo_cache_sentinel")?(_=S=>{if(!S.current)return;const{offsetLeft:U,offsetWidth:X}=S.current;O({left:U,width:X,opacity:1})},e[1]=_):_=e[1];const Q=_;let C;e[2]!==t[0].value||e[3]!==o?(C=()=>{const S=o===t[0].value?G:H;Q(S)},e[2]=t[0].value,e[3]=o,e[4]=C):C=e[4];let E;e[5]!==t||e[6]!==o?(E=[o,t],e[5]=t,e[6]=o,e[7]=E):E=e[7],V.useEffect(C,E);const s=Z[K];let a;e[8]!==W?(a=n("relative flex gap-0 bg-muted rounded-lg",W),e[8]=W,e[9]=a):a=e[9];let c;e[10]!==l||e[11]!==t[0].value?(c=()=>l(t[0].value),e[10]=l,e[11]=t[0].value,e[12]=c):c=e[12];const $=w?"flex-1 h-12 px-4":s.button,I=!w&&t[0].label?"px-3":"";let r;e[13]!==I||e[14]!==$?(r=n("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",$,I),e[13]=I,e[14]=$,e[15]=r):r=e[15];const P=o===t[0].value?"text-foreground":"text-muted-foreground";let u;e[16]!==s.icon||e[17]!==P?(u=n("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",s.icon,P),e[16]=s.icon,e[17]=P,e[18]=u):u=e[18];let f;e[19]!==t[0].icon||e[20]!==u?(f=i.jsx("span",{className:u,children:t[0].icon}),e[19]=t[0].icon,e[20]=u,e[21]=f):f=e[21];let d;e[22]!==t[0].label||e[23]!==t[0].value||e[24]!==o?(d=t[0].label&&i.jsx("span",{className:n("text-xs transition-colors ease-out duration-200 whitespace-nowrap",o===t[0].value?"text-foreground":"text-muted-foreground"),children:t[0].label}),e[22]=t[0].label,e[23]=t[0].value,e[24]=o,e[25]=d):d=e[25];let m;e[26]!==r||e[27]!==f||e[28]!==d||e[29]!==c?(m=i.jsxs("button",{ref:G,type:"button",onClick:c,className:r,children:[f,d]}),e[26]=r,e[27]=f,e[28]=d,e[29]=c,e[30]=m):m=e[30];let x;e[31]!==l||e[32]!==t[1].value?(x=()=>l(t[1].value),e[31]=l,e[32]=t[1].value,e[33]=x):x=e[33];const L=w?"flex-1 h-12 px-4":s.button,M=!w&&t[1].label?"px-3":"";let p;e[34]!==L||e[35]!==M?(p=n("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",L,M),e[34]=L,e[35]=M,e[36]=p):p=e[36];const T=o===t[1].value?"text-foreground":"text-muted-foreground";let b;e[37]!==s.icon||e[38]!==T?(b=n("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",s.icon,T),e[37]=s.icon,e[38]=T,e[39]=b):b=e[39];let v;e[40]!==t[1].icon||e[41]!==b?(v=i.jsx("span",{className:b,children:t[1].icon}),e[40]=t[1].icon,e[41]=b,e[42]=v):v=e[42];let g;e[43]!==t[1].label||e[44]!==t[1].value||e[45]!==o?(g=t[1].label&&i.jsx("span",{className:n("text-xs transition-colors ease-out duration-200 whitespace-nowrap",o===t[1].value?"text-foreground":"text-muted-foreground"),children:t[1].label}),e[43]=t[1].label,e[44]=t[1].value,e[45]=o,e[46]=g):g=e[46];let h;e[47]!==x||e[48]!==p||e[49]!==v||e[50]!==g?(h=i.jsxs("button",{ref:H,type:"button",onClick:x,className:p,children:[v,g]}),e[47]=x,e[48]=p,e[49]=v,e[50]=g,e[51]=h):h=e[51];const q=w?"h-12":s.button;let y;e[52]!==q?(y=n("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",q),e[52]=q,e[53]=y):y=e[53];const A=`${N.left}px`,B=`${N.width}px`;let j;e[54]!==N.opacity||e[55]!==A||e[56]!==B?(j={left:A,width:B,opacity:N.opacity},e[54]=N.opacity,e[55]=A,e[56]=B,e[57]=j):j=e[57];let z;e[58]!==y||e[59]!==j?(z=i.jsx("div",{className:y,style:j}),e[58]=y,e[59]=j,e[60]=z):z=e[60];let k;return e[61]!==m||e[62]!==h||e[63]!==z||e[64]!==a?(k=i.jsxs("div",{className:a,children:[m,h,z]}),e[61]=m,e[62]=h,e[63]=z,e[64]=a,e[65]=k):k=e[65],k}export{oe as V};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as L,g as W,m as O,r as B,j as e,O as k,c as P}from"./index-
|
|
1
|
+
import{u as L,g as W,m as O,r as B,j as e,O as k,c as P}from"./index-KcN9jfkO.js";import{e as R}from"./constants-Dd61XPju.js";import{C as A}from"./collection-tab-DV_TP_WM.js";import{g as M,h as z}from"./use-connection-0mxTykry.js";import{B as v}from"./button-AB9cXWBb.js";import{E as F}from"./empty-state-DXDgk150.js";import{P as y}from"./index-DcpUI1e8.js";import{B as G,a as H,b as T,c as D}from"./breadcrumb-C5T3dJE6.js";import{a as J,b as U}from"./use-binding-Dm7Ehllr.js";import{i as V}from"./Loading01-B_72CFT3.js";import"./generate-id-Dyweu44Y.js";import"./collection-table-wrapper-DSM2ewq2.js";import"./dropdown-menu-Cr68JTqs.js";import"./ChevronRight-BTZr-xye.js";import"./utils-Ck2p4uOz.js";import"./ArrowUp-CS3ZollZ.js";import"./Check-D3ubYXxc.js";import"./Grid01-RAa135S1.js";import"./List-DS9PzQZf.js";import"./integration-icon-DzX6vjWU.js";import"./index-CMGKEOx9.js";import"./view-mode-toggle-x6y4jYTo.js";import"./table-a_0ITwUC.js";import"./collection-search-CNaPV8pR.js";import"./SearchMd-DglsF9__.js";import"./input-DpQoaQfS.js";import"./card-DatbcemW.js";import"./Copy01-VJRVowHJ.js";import"./DotsVertical-XxVvTjZe.js";import"./Edit01-B5aM7o8H.js";import"./use-list-state-iF5wqfMX.js";import"./avatar-C0cccS60.js";import"./useQuery-DUPTaiAP.js";import"./use-mobile-B5hu4mxq.js";import"./Trash01-CKqlebDm.js";import"./empty-state-DTsFurx5.js";import"./Inbox01-VryQyU0X.js";import"./constants-DBa8dlFt.js";import"./alert-dialog-CMFFNJg5.js";import"./Plus-_EIrkETO.js";import"./layout-1uXnWnKk.js";import"./useMutation-ClyYx3N6.js";import"./binder-BQNmKBxJ.js";function q({title:i,description:t,wellKnownMcp:o,imageSrc:n,onConnected:s}){const l=M(),{org:{slug:m}}=L(),{data:j}=W.useSession(),d=O(),[a,N]=B.useState(!1),r=async()=>{if(!(!o||!j?.user?.id)){N(!0);try{const c=await l.create.mutateAsync(o);s?.(c.id),d({to:"/$org/$project/mcps/$connectionId",params:{org:m,project:k,connectionId:c.id}})}finally{N(!1)}}},C=()=>{d({to:"/$org/$project/mcps",params:{org:m,project:k},search:{action:"create"}})};return e.jsx(F,{image:n?e.jsx("img",{src:n,alt:i,width:336,height:320,className:"max-w-full h-auto"}):null,title:i,description:t,actions:e.jsxs(e.Fragment,{children:[e.jsxs(v,{variant:"outline",onClick:r,disabled:a||!o,children:[o?.icon&&e.jsx("img",{src:o.icon,alt:"",className:"size-4"}),a?"Installing...":`Install ${o?.title||"MCP"}`]}),e.jsx(v,{variant:"outline",onClick:C,children:"Custom Connection"})]})})}function Q(i){const t=P.c(28),{bindingName:o,collectionName:n,title:s,emptyState:l,wellKnownMcp:m}=i,{org:j}=L(),d=z();let a;t[0]!==d||t[1]!==o?(a={connections:d,binding:o},t[0]=d,t[1]=o,t[2]=a):a=t[2];const r=J(a)[0],C=U(r);let c;if(t[3]!==n||t[4]!==C){let h;t[6]!==n?(h=_=>_.name.toLowerCase()===n.toLowerCase(),t[6]=n,t[7]=h):h=t[7],c=C.find(h),t[3]=n,t[4]=C,t[5]=c}else c=t[5];const b=c,[$,E]=B.useState(null),w=r&&b&&(r.id||$);let p;t[8]!==s?(p=e.jsx(y.Header,{children:e.jsx(y.Header.Left,{children:e.jsx(G,{children:e.jsx(H,{children:e.jsx(T,{children:e.jsx(D,{children:s})})})})})}),t[8]=s,t[9]=p):p=t[9];let S;t[10]===Symbol.for("react.memo_cache_sentinel")?(S=e.jsx(V,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t[10]=S):S=t[10];let u;t[11]!==s?(u=s.toLowerCase(),t[11]=s,t[12]=u):u=t[12];let f;t[13]!==u?(f=e.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[S,e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Loading ",u,"..."]})]}),t[13]=u,t[14]=f):f=t[14];let g;t[15]!==b||t[16]!==r||t[17]!==l||t[18]!==j||t[19]!==w||t[20]!==m?(g=w?e.jsx(A,{connectionId:r.id,org:j.slug,activeCollection:b}):e.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:e.jsx(q,{title:l.title,description:l.description,wellKnownMcp:m,imageSrc:l.imageSrc,onConnected:h=>{E(h)}})}),t[15]=b,t[16]=r,t[17]=l,t[18]=j,t[19]=w,t[20]=m,t[21]=g):g=t[21];let x;t[22]!==f||t[23]!==g?(x=e.jsx(y.Content,{children:e.jsx(B.Suspense,{fallback:f,children:g})}),t[22]=f,t[23]=g,t[24]=x):x=t[24];let I;return t[25]!==p||t[26]!==x?(I=e.jsxs(y,{children:[p,x]}),t[25]=p,t[26]=x,t[27]=I):I=t[27],I}function zt(){const i=P.c(1);let t;return i[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(Q,{bindingName:"WORKFLOW",collectionName:"workflow",title:"Workflows",emptyState:{title:"Create Workflows",description:"Install MCP Studio to create and manage automated workflows with multiple steps and integrations."},wellKnownMcp:R()}),i[0]=t):t=i[0],t}export{zt as default};
|
package/dist/client/index.html
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<title>MCP Mesh</title>
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
6
|
-
<script type="module" crossorigin src="/assets/index-
|
|
7
|
-
<link rel="stylesheet" crossorigin href="/assets/index
|
|
6
|
+
<script type="module" crossorigin src="/assets/index-KcN9jfkO.js"></script>
|
|
7
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BEdPWc-P.css">
|
|
8
8
|
</head>
|
|
9
9
|
<body>
|
|
10
10
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{M as t,Q as a}from"./index-Bn2rDd42.js";const e=t(a,{target:"draft-7"});export{e as B};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as A,u as W,a as D,g as X,K as Z,j as n,aM as $,r as q,l as J,aN as ee,aO as te}from"./index-Bn2rDd42.js";import{i as v}from"./Loading01-D8zw0cyg.js";import{c as ne}from"./binder-ak1AkjZY.js";import{u as se}from"./useQuery-Ct96KcZp.js";import{h as ie}from"./use-connection-CVk8Bzpz.js";import{a as oe,u as le,j as re}from"./constants-DuSOM18S.js";import{t as ae}from"./Settings01-D7-sGWon.js";import{B as ce}from"./button-CcO5M7F7.js";import{P as E}from"./index-BHu7Lc_d.js";import"./useMutation-CnTeRHmv.js";import"./utils-Ckc2UwOp.js";function de(t,e){return t?t.filter(m=>ne(m,e)):[]}function R(t){return{id:t.id,title:t.title,icon:t.icon,description:t.description,app_name:t.app_name,app_id:t.app_id,tools:t.tools,metadata:t.metadata}}function me(t){const e=A.c(35),{binding:m,renderHeader:f,renderEmptyState:s}=t,{org:o,project:l}=W();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[0]=c):c=e[0];const{org:r,project:g,pluginId:u}=D(c),Q=ie(),{data:y}=X.useSession();let _;e[1]!==o.id?(_={connectionId:oe,orgId:o.id},e[1]=o.id,e[2]=_):_=e[2];const H=le(_);let x;e[3]!==u||e[4]!==l.id?(x=Z.projectPluginConfig(l.id??"",u),e[3]=u,e[4]=l.id,e[5]=x):x=e[5];let p;e[6]!==u||e[7]!==l.id||e[8]!==H?(p=async()=>{const i=await H.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:l.id,pluginId:u}});return i.structuredContent??i},e[6]=u,e[7]=l.id,e[8]=H,e[9]=p):p=e[9];const T=!!l.id&&!!u;let b;e[10]!==x||e[11]!==p||e[12]!==T?(b={queryKey:x,queryFn:p,enabled:T},e[10]=x,e[11]=p,e[12]=T,e[13]=b):b=e[13];const{data:U,isLoading:Y}=se(b),F=de(Q,m),K=U?.config?.connectionId,j=K?F.find(i=>i.id===K):null,S=re({connectionId:j?.id,orgId:o.id}),w=y?.user?{user:{id:y.user.id,name:y.user.name,email:y.user.email,image:y.user.image}}:null,z={id:o.id,slug:o.slug,name:o.name};if(Y){let i;return e[14]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(v,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),e[14]=i):i=e[14],i}if(F.length===0){const i={connectionId:null,connection:null,toolCaller:null,org:z,session:w};let a;e[15]!==s?(a=s(),e[15]=s,e[16]=a):a=e[16];let d;return e[17]!==a?(d=n.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:a}),e[17]=a,e[18]=d):d=e[18],n.jsx($,{value:i,children:d})}if(!j){const i={connectionId:null,connection:null,toolCaller:null,org:z,session:w};let a;e[19]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsxs("div",{className:"flex flex-col items-center gap-2 text-center max-w-md",children:[n.jsx(ae,{size:48,className:"text-muted-foreground mb-2"}),n.jsx("h2",{className:"text-lg font-semibold",children:"Plugin Not Configured"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"This plugin requires a connection to be configured. Go to project settings to select which integration to use."})]}),e[19]=a):a=e[19];const d=r??o.slug,k=g??l.slug??"";let L;return e[20]!==d||e[21]!==k?(L=n.jsxs("div",{className:"h-full flex flex-col items-center justify-center gap-4 p-8",children:[a,n.jsx(ce,{asChild:!0,children:n.jsx(ee,{to:"/$org/$project/settings",params:{org:d,project:k},children:"Go to Project Settings"})})]}),e[20]=d,e[21]=k,e[22]=L):L=e[22],n.jsx($,{value:i,children:L})}let N;e[23]!==S?(N=(i,a)=>S?S.callTool({name:i,arguments:a}).then(fe):Promise.reject(new Error("MCP client is not available")),e[23]=S,e[24]=N):N=e[24];const V={connectionId:j.id,connection:R(j),toolCaller:N,org:z,session:w},B=E,G=E,M=E,O=f({connections:[R(j)],selectedConnectionId:j.id,onConnectionChange:ue});let h;e[25]!==O||e[26]!==M.Header.Left?(h=n.jsx(M.Header.Left,{children:O}),e[25]=O,e[26]=M.Header.Left,e[27]=h):h=e[27];let C;e[28]!==h||e[29]!==G.Header?(C=n.jsx(G.Header,{children:h}),e[28]=h,e[29]=G.Header,e[30]=C):C=e[30];let P;e[31]===Symbol.for("react.memo_cache_sentinel")?(P=n.jsx(E.Content,{children:n.jsx(q.Suspense,{fallback:n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(v,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),children:n.jsx(J,{})})}),e[31]=P):P=e[31];let I;return e[32]!==B||e[33]!==C?(I=n.jsxs(B,{children:[C,P]}),e[32]=B,e[33]=C,e[34]=I):I=e[34],n.jsx($,{value:V,children:I})}function ue(){}function fe(t){return t.structuredContent??t}function Pe(){const t=A.c(12);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{pluginId:m}=D(e);let f;t[1]!==m?(f=te.find(r=>r.id===m),t[1]=m,t[2]=f):f=t[2];const s=f;if(s?.renderHeader&&s?.renderEmptyState){let r;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(v,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading plugin..."})]}),t[3]=r):r=t[3];let g;return t[4]!==s.binding||t[5]!==s.renderEmptyState||t[6]!==s.renderHeader?(g=n.jsx(q.Suspense,{fallback:r,children:n.jsx(me,{binding:s.binding,renderHeader:s.renderHeader,renderEmptyState:s.renderEmptyState})}),t[4]=s.binding,t[5]=s.renderEmptyState,t[6]=s.renderHeader,t[7]=g):g=t[7],g}const o=s?.LayoutComponent;if(!o){let r;return t[8]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(J,{}),t[8]=r):r=t[8],r}let l;t[9]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(v,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading plugin..."})]}),t[9]=l):l=t[9];let c;return t[10]!==o?(c=n.jsx(q.Suspense,{fallback:l,children:n.jsx(o,{})}),t[10]=o,t[11]=c):c=t[11],c}export{Pe as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/grid-view-DBKftgaD.js","assets/index-Bn2rDd42.js","assets/index--g69ISoA.css","assets/button-CcO5M7F7.js","assets/utils-Ckc2UwOp.js","assets/AlertCircle-C_hR5usO.js","assets/Download01-BKmVPJWY.js","assets/File02-BNE7fmK0.js","assets/File06-WU23pV9H.js","assets/Image01-BnbXZOf7.js","assets/Loading01-D8zw0cyg.js","assets/Trash01-CLqhrRia.js","assets/Upload01-DrtXkSgF.js","assets/useMutation-CnTeRHmv.js","assets/useQuery-Ct96KcZp.js","assets/useInfiniteQuery-DDUEUpOZ.js","assets/infiniteQueryObserver-VnhrjjoH.js","assets/checkbox-CirsSPdM.js","assets/Check-Sa4xK5Hg.js","assets/ChevronRight-By4KEpZh.js","assets/Grid01-CSAsqBFD.js","assets/Home02-BUr926Eo.js","assets/List-kXpaJIIp.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as M,c as K,bm as Q,bn as A,z as Y,j as t,t as D,bo as X,a4 as ee}from"./index-Bn2rDd42.js";import{u as te}from"./useInfiniteQuery-DDUEUpOZ.js";import{B as _}from"./button-CcO5M7F7.js";import{C as U}from"./checkbox-CirsSPdM.js";import{c as J}from"./utils-Ckc2UwOp.js";import{i as se}from"./AlertCircle-C_hR5usO.js";import{i as ae}from"./ChevronRight-By4KEpZh.js";import{n as ie}from"./Download01-BKmVPJWY.js";import{i as re}from"./File02-BNE7fmK0.js";import{c as G}from"./Grid01-CSAsqBFD.js";import{a as oe}from"./Home02-BUr926Eo.js";import{i as V}from"./List-kXpaJIIp.js";import{i as L}from"./Loading01-D8zw0cyg.js";import{s as W}from"./Trash01-CLqhrRia.js";import{i as $}from"./Upload01-DrtXkSgF.js";import{u as q}from"./useMutation-CnTeRHmv.js";const Z=({size:s=24,color:e="currentColor",...i})=>M.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},M.createElement("path",{d:"m13 7-1.116-2.231c-.32-.642-.481-.963-.72-1.198a2 2 0 0 0-.748-.462C10.1 3 9.74 3 9.022 3H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 4.52 2 5.08 2 6.2V7m0 0h15.2c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C22 9.28 22 10.12 22 11.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2V7Zm10 10v-6m-3 3h6"}));Z.displayName="FolderPlus";const R={objects:(s,e,i=!1,o=100)=>["object-storage","objects",s,e,{flat:i,pageSize:o}],metadata:(s,e)=>["object-storage","metadata",s,e],imagePreview:(s,e)=>["object-storage","image-preview",s,e]},ne=100;function le(s){const e=K.c(30);let i;e[0]!==s?(i=s===void 0?{}:s,e[0]=s,e[1]=i):i=e[1];const o=i,{prefix:n,flat:x,pageSize:d}=o,m=n===void 0?"":n,l=x===void 0?!1:x,c=d===void 0?ne:d,{connectionId:b,toolCaller:S}=Q();let f;e[2]!==b||e[3]!==l||e[4]!==c||e[5]!==m?(f=R.objects(b,m,l,c),e[2]=b,e[3]=l,e[4]=c,e[5]=m,e[6]=f):f=e[6];let u;e[7]!==l||e[8]!==c||e[9]!==m||e[10]!==S?(u=async a=>{const{pageParam:r}=a;return await S("LIST_OBJECTS",{prefix:m||void 0,maxKeys:c,continuationToken:r,delimiter:l?void 0:"/"})},e[7]=l,e[8]=c,e[9]=m,e[10]=S,e[11]=u):u=e[11];let E;e[12]!==f||e[13]!==u?(E={queryKey:f,queryFn:u,initialPageParam:void 0,getNextPageParam:ge,staleTime:3e4},e[12]=f,e[13]=u,e[14]=E):E=e[14];const{data:p,isLoading:z,isFetchingNextPage:g,hasNextPage:y,fetchNextPage:h,error:w}=te(E);let v;if(l){let a;e[15]!==p?.pages?(a=p?.pages.flatMap(he).filter(pe).map(xe)??[],e[15]=p?.pages,e[16]=a):a=e[16],v=a}else{let a;if(e[17]!==p?.pages){const r=p?.pages[0]?.commonPrefixes?.map(ue)??[],j=p?.pages.flatMap(de)??[];a=[...r.sort(ce),...j],e[17]=p?.pages,e[18]=a}else a=e[18];v=a}let N;e[19]!==h||e[20]!==y||e[21]!==g?(N=()=>{y&&!g&&h()},e[19]=h,e[20]=y,e[21]=g,e[22]=N):N=e[22];const C=N,F=y??!1,P=w;let k;return e[23]!==g||e[24]!==z||e[25]!==C||e[26]!==v||e[27]!==P||e[28]!==F?(k={objects:v,isLoading:z,isFetchingMore:g,hasMore:F,loadMore:C,error:P},e[23]=g,e[24]=z,e[25]=C,e[26]=v,e[27]=P,e[28]=F,e[29]=k):k=e[29],k}function ce(s,e){return s.key.localeCompare(e.key)}function de(s){return s.objects.filter(fe).map(me)}function me(s){return{key:s.key,size:s.size,lastModified:s.lastModified,etag:s.etag,isFolder:!1}}function fe(s){return!s.key.endsWith("/")}function ue(s){return{key:s,size:0,lastModified:"",etag:"",isFolder:!0}}function xe(s){return{key:s.key,size:s.size,lastModified:s.lastModified,etag:s.etag,isFolder:!1}}function pe(s){return!s.key.endsWith("/")}function he(s){return s.objects}function ge(s){return s.nextContinuationToken}function I(s){const e=s.split("/").filter(Boolean);return e[e.length-1]||s}function je(s){if(s===0)return"0 B";const e=["B","KB","MB","GB","TB"],i=1024,o=Math.floor(Math.log(s)/Math.log(i));return`${parseFloat((s/Math.pow(i,o)).toFixed(1))} ${e[o]}`}function ye(s){return new Date(s).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}function ve(s){const e=[],i=s.split("/").filter(Boolean);let o="";for(const n of i)o+=n+"/",e.push({name:n,path:o});return e}function Ie(s,e){switch(s.split(".").pop()?.toLowerCase()){case"jpg":case"jpeg":case"png":case"gif":case"webp":case"svg":return"Image01";case"mp4":case"mov":case"avi":case"webm":return"VideoRecorder";case"mp3":case"wav":case"ogg":return"Music01";case"pdf":return"File06";case"zip":case"tar":case"gz":case"rar":return"File07";case"js":case"ts":case"tsx":case"jsx":case"json":case"html":case"css":return"FileCode01";case"md":case"txt":return"File04";default:return"File02"}}const Ne=M.lazy(()=>X(()=>import("./grid-view-DBKftgaD.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22])));function be(s){const e=K.c(50),{item:i,selected:o,showFullPath:n,onSelect:x,onNavigate:d,onDownload:m,onDelete:l}=s,c=n===void 0?!1:n;let b;e[0]!==i.key||e[1]!==c?(b=c?i.key:I(i.key),e[0]=i.key,e[1]=c,e[2]=b):b=e[2];const S=b;let f;e[3]!==x||e[4]!==o?(f=t.jsx(U,{checked:o,onCheckedChange:x,className:"opacity-0 group-hover:opacity-100 focus:opacity-100 data-[state=checked]:opacity-100"}),e[3]=x,e[4]=o,e[5]=f):f=e[5];let u;e[6]!==i.isFolder||e[7]!==i.key||e[8]!==d?(u=()=>i.isFolder?d(i.key):void 0,e[6]=i.isFolder,e[7]=i.key,e[8]=d,e[9]=u):u=e[9];const E=i.isFolder&&"cursor-pointer hover:text-primary";let p;e[10]!==E?(p=J("flex items-center gap-2 flex-1 min-w-0 text-left",E),e[10]=E,e[11]=p):p=e[11];let z;e[12]!==i.isFolder?(z=i.isFolder?t.jsx(ee,{size:18,className:"text-amber-500 shrink-0"}):t.jsx(re,{size:18,className:"text-muted-foreground shrink-0"}),e[12]=i.isFolder,e[13]=z):z=e[13];let g;e[14]!==S?(g=t.jsx("span",{className:"truncate",children:S}),e[14]=S,e[15]=g):g=e[15];let y;e[16]!==u||e[17]!==p||e[18]!==z||e[19]!==g?(y=t.jsxs("button",{type:"button",onClick:u,className:p,children:[z,g]}),e[16]=u,e[17]=p,e[18]=z,e[19]=g,e[20]=y):y=e[20];let h;e[21]!==i.isFolder||e[22]!==i.size?(h=i.isFolder?"-":je(i.size),e[21]=i.isFolder,e[22]=i.size,e[23]=h):h=e[23];let w;e[24]!==h?(w=t.jsx("span",{className:"text-sm text-muted-foreground w-20 text-right shrink-0",children:h}),e[24]=h,e[25]=w):w=e[25];let v;e[26]!==i.isFolder||e[27]!==i.lastModified?(v=i.isFolder?"-":ye(i.lastModified),e[26]=i.isFolder,e[27]=i.lastModified,e[28]=v):v=e[28];let N;e[29]!==v?(N=t.jsx("span",{className:"text-sm text-muted-foreground w-28 text-right shrink-0",children:v}),e[29]=v,e[30]=N):N=e[30];let C;e[31]!==i.isFolder||e[32]!==i.key||e[33]!==m?(C=!i.isFolder&&t.jsx(_,{variant:"ghost",size:"sm",className:"size-7 p-0",onClick:()=>m(i.key),children:t.jsx(ie,{size:14})}),e[31]=i.isFolder,e[32]=i.key,e[33]=m,e[34]=C):C=e[34];let F;e[35]!==i.key||e[36]!==l?(F=()=>l(i.key),e[35]=i.key,e[36]=l,e[37]=F):F=e[37];let P;e[38]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(W,{size:14}),e[38]=P):P=e[38];let k;e[39]!==F?(k=t.jsx(_,{variant:"ghost",size:"sm",className:"size-7 p-0 text-destructive hover:text-destructive",onClick:F,children:P}),e[39]=F,e[40]=k):k=e[40];let a;e[41]!==C||e[42]!==k?(a=t.jsxs("div",{className:"flex items-center gap-1 w-16 justify-end shrink-0 opacity-0 group-hover:opacity-100",children:[C,k]}),e[41]=C,e[42]=k,e[43]=a):a=e[43];let r;return e[44]!==w||e[45]!==N||e[46]!==a||e[47]!==f||e[48]!==y?(r=t.jsxs("div",{className:"group flex items-center gap-3 px-4 py-2 hover:bg-muted/50 border-b border-border last:border-b-0",children:[f,y,w,N,a]}),e[44]=w,e[45]=N,e[46]=a,e[47]=f,e[48]=y,e[49]=r):r=e[49],r}function H(s){const e=K.c(8),{prefix:i,onNavigate:o}=s;let n;if(e[0]!==o||e[1]!==i){const x=ve(i);let d;e[3]!==o?(d=()=>o(""),e[3]=o,e[4]=d):d=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(oe,{size:16}),e[5]=m):m=e[5];let l;e[6]!==d?(l=t.jsx("button",{type:"button",onClick:d,className:"flex items-center gap-1 text-muted-foreground hover:text-foreground",children:m}),e[6]=d,e[7]=l):l=e[7],n=t.jsxs("div",{className:"flex items-center gap-1 text-sm",children:[l,x.map((c,b)=>t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(ae,{size:14,className:"text-muted-foreground"}),t.jsx("button",{type:"button",onClick:()=>o(c.path),className:J("hover:text-primary",b===x.length-1?"font-medium text-foreground":"text-muted-foreground"),children:c.name})]},c.path))]}),e[0]=o,e[1]=i,e[2]=n}else n=e[2];return n}function ke(){const{path:s="",flat:e=!1,view:i="table"}=A.useSearch({from:"/"}),o=A.useNavigate(),[n,x]=M.useState(new Set),d=a=>{x(new Set),o({to:"/",search:{path:a||void 0,flat:e,view:i}})},m=a=>{x(new Set),o({to:"/",search:{path:a?void 0:s||void 0,flat:a,view:i}})},l=a=>{x(new Set),o({to:"/",search:{path:s||void 0,flat:e,view:a}})},c=M.useRef(null),b=Y(),{connectionId:S,toolCaller:f}=Q(),{objects:u,isLoading:E,isFetchingMore:p,hasMore:z,loadMore:g,error:y}=le({prefix:s,flat:e}),h=q({mutationFn:async a=>{const r=s+a.name,{url:j}=await f("PUT_PRESIGNED_URL",{key:r,contentType:a.type||"application/octet-stream"}),T=await fetch(j,{method:"PUT",body:a,headers:{"Content-Type":a.type||"application/octet-stream"}});if(!T.ok)throw new Error(`Upload failed: ${T.statusText}`);return r},onSuccess:a=>{D.success(`Uploaded ${I(a)}`),b.invalidateQueries({queryKey:R.objects(S,s)})},onError:a=>{D.error(`Upload failed: ${a.message}`)}}),w=q({mutationFn:async a=>a.length===1&&a[0]?f("DELETE_OBJECT",{key:a[0]}):f("DELETE_OBJECTS",{keys:a}),onSuccess:()=>{D.success("Deleted successfully"),x(new Set),b.invalidateQueries({queryKey:R.objects(S,s)})},onError:a=>{D.error(`Delete failed: ${a.message}`)}}),v=async a=>{try{const{url:r}=await f("GET_PRESIGNED_URL",{key:a}),j=await fetch(r);if(!j.ok)throw new Error(`Failed to fetch file: ${j.statusText}`);const T=await j.blob(),O=URL.createObjectURL(T),B=document.createElement("a");B.href=O,B.download=I(a),document.body.appendChild(B),B.click(),document.body.removeChild(B),URL.revokeObjectURL(O)}catch(r){D.error(`Download failed: ${r instanceof Error?r.message:"Unknown error"}`)}},N=a=>{const r=a.target.files;if(r){for(const j of Array.from(r))h.mutate(j);a.target.value=""}},C=(a,r)=>{const j=new Set(n);r?j.add(a):j.delete(a),x(j)},F=a=>{x(a?new Set(u.map(r=>r.key)):new Set)},P=()=>{n.size!==0&&w.mutate(Array.from(n))},k=a=>{if(!z||p)return;const r=a.currentTarget;r.scrollHeight-r.scrollTop-r.clientHeight<200&&g()};return y?t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(se,{size:48,className:"text-destructive mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading files"}),t.jsx("p",{className:"text-muted-foreground text-center",children:y.message})]}):i==="grid"?t.jsxs("div",{className:"flex flex-col h-full",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-background",children:[e?t.jsx("span",{className:"text-sm text-muted-foreground",children:"All files (flat)"}):t.jsx(H,{prefix:s,onNavigate:d}),t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[t.jsx(U,{checked:!e,onCheckedChange:a=>m(!a)}),t.jsx("span",{className:"text-muted-foreground",children:"Show as directories"})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(_,{variant:i==="grid"?"secondary":"ghost",size:"sm",className:"size-8 p-0",onClick:()=>l("grid"),children:t.jsx(G,{size:16})}),t.jsx(_,{variant:i==="table"?"secondary":"ghost",size:"sm",className:"size-8 p-0",onClick:()=>l("table"),children:t.jsx(V,{size:16})})]}),t.jsx("input",{ref:c,type:"file",multiple:!0,className:"hidden",onChange:N}),t.jsxs(_,{variant:"outline",size:"sm",onClick:()=>c.current?.click(),disabled:h.isPending,children:[h.isPending?t.jsx(L,{size:14,className:"mr-1 animate-spin"}):t.jsx($,{size:14,className:"mr-1"}),"Upload"]})]})]}),t.jsx(M.Suspense,{fallback:t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(L,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Ne,{prefix:s,flat:e,onNavigate:d})})]}):t.jsxs("div",{className:"flex flex-col h-full",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-background",children:[e?t.jsx("span",{className:"text-sm text-muted-foreground",children:"All files (flat)"}):t.jsx(H,{prefix:s,onNavigate:d}),t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[t.jsx(U,{checked:!e,onCheckedChange:a=>m(!a)}),t.jsx("span",{className:"text-muted-foreground",children:"Show as directories"})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(_,{variant:i==="grid"?"secondary":"ghost",size:"sm",className:"size-8 p-0",onClick:()=>l("grid"),children:t.jsx(G,{size:16})}),t.jsx(_,{variant:i==="table"?"secondary":"ghost",size:"sm",className:"size-8 p-0",onClick:()=>l("table"),children:t.jsx(V,{size:16})})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[n.size>0&&t.jsxs(_,{variant:"outline",size:"sm",className:"text-destructive",onClick:P,disabled:w.isPending,children:[t.jsx(W,{size:14,className:"mr-1"}),"Delete (",n.size,")"]}),t.jsx("input",{ref:c,type:"file",multiple:!0,className:"hidden",onChange:N}),t.jsxs(_,{variant:"outline",size:"sm",onClick:()=>c.current?.click(),disabled:h.isPending,children:[h.isPending?t.jsx(L,{size:14,className:"mr-1 animate-spin"}):t.jsx($,{size:14,className:"mr-1"}),"Upload"]})]})]})]}),t.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-border bg-muted/30 text-sm font-medium text-muted-foreground",children:[t.jsx(U,{checked:n.size>0&&n.size===u.length,onCheckedChange:F}),t.jsx("span",{className:"flex-1",children:"Name"}),t.jsx("span",{className:"w-20 text-right",children:"Size"}),t.jsx("span",{className:"w-28 text-right",children:"Modified"}),t.jsx("span",{className:"w-16"})]}),t.jsx("div",{className:"flex-1 overflow-y-auto",onScroll:k,children:E?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[t.jsx(L,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading files..."})]}):u.length===0?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(Z,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"This folder is empty"}),t.jsx("p",{className:"text-muted-foreground mb-4",children:"Upload files to get started"}),t.jsxs(_,{variant:"outline",onClick:()=>c.current?.click(),children:[t.jsx($,{size:14,className:"mr-1"}),"Upload files"]})]}):t.jsxs(t.Fragment,{children:[u.map(a=>t.jsx(be,{item:a,selected:n.has(a.key),showFullPath:e,onSelect:r=>C(a.key,r),onNavigate:d,onDownload:v,onDelete:r=>w.mutate([r])},a.key)),p&&t.jsx("div",{className:"flex justify-center py-4",children:t.jsx(L,{size:20,className:"animate-spin text-muted-foreground"})})]})})]})}const Ke=Object.freeze(Object.defineProperty({__proto__:null,default:ke},Symbol.toStringTag,{value:"Module"}));export{R as K,Ie as a,Ke as b,je as f,I as g,Z as s,le as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as v,c as M,bm as D,j as s,z as q,t as w,a4 as H}from"./index-Bn2rDd42.js";import{K as L,u as Z,g as R,s as Q,a as W,f as U}from"./file-browser-DQeqPq9E.js";import{B as E}from"./button-CcO5M7F7.js";import{c as I}from"./utils-Ckc2UwOp.js";import{i as S}from"./AlertCircle-C_hR5usO.js";import{n as A}from"./Download01-BKmVPJWY.js";import{i as $}from"./File02-BNE7fmK0.js";import{i as J}from"./File06-WU23pV9H.js";import{a as P}from"./Image01-BnbXZOf7.js";import{i as T}from"./Loading01-D8zw0cyg.js";import{s as V}from"./Trash01-CLqhrRia.js";import{i as Y}from"./Upload01-DrtXkSgF.js";import{u as _}from"./useMutation-CnTeRHmv.js";import{u as X}from"./useQuery-Ct96KcZp.js";import"./useInfiniteQuery-DDUEUpOZ.js";import"./infiniteQueryObserver-VnhrjjoH.js";import"./checkbox-CirsSPdM.js";import"./Check-Sa4xK5Hg.js";import"./ChevronRight-By4KEpZh.js";import"./Grid01-CSAsqBFD.js";import"./Home02-BUr926Eo.js";import"./List-kXpaJIIp.js";const B=({size:i=24,color:e="currentColor",...t})=>v.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},v.createElement("path",{d:"M14 2.27V6.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C14.76 8 15.04 8 15.6 8h4.13M20 9.988V17.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 22 16.88 22 15.2 22H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 19.72 4 18.88 4 17.2V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C6.28 2 7.12 2 8.8 2h3.212c.733 0 1.1 0 1.446.083.306.073.598.195.867.36.303.185.562.444 1.08.963l3.19 3.188c.518.519.777.778.963 1.081a3 3 0 0 1 .36.867c.082.346.082.712.082 1.446Z"}));B.displayName="File04";const G=({size:i=24,color:e="currentColor",...t})=>v.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},v.createElement("path",{d:"M14 2.27V6.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437c.214.11.494.11 1.054.11h4.13M8 15v3m8-5v5m-4-7.5V18m8-8.012V17.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 22 16.88 22 15.2 22H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 19.72 4 18.88 4 17.2V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C6.28 2 7.12 2 8.8 2h3.212c.733 0 1.1 0 1.446.083.306.073.598.195.867.36.303.185.562.444 1.08.963l3.19 3.188c.518.519.777.778.963 1.081a3 3 0 0 1 .36.867c.082.346.082.712.082 1.446Z"}));G.displayName="File07";const K=({size:i=24,color:e="currentColor",...t})=>v.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},v.createElement("path",{d:"M14 2.27V6.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437c.214.11.494.11 1.054.11h4.13M14 17.5l2.5-2.5-2.5-2.5m-4 0L7.5 15l2.5 2.5m10-7.512V17.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 22 16.88 22 15.2 22H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 19.72 4 18.88 4 17.2V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C6.28 2 7.12 2 8.8 2h3.212c.733 0 1.1 0 1.446.083.306.073.598.195.867.36.303.185.562.444 1.08.963l3.19 3.188c.518.519.777.778.963 1.081a3 3 0 0 1 .36.867c.082.346.082.712.082 1.446Z"}));K.displayName="FileCode01";const O=({size:i=24,color:e="currentColor",...t})=>v.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},v.createElement("path",{d:"M22 8.931c0-.605 0-.908-.12-1.049a.5.5 0 0 0-.42-.173c-.183.014-.397.228-.826.657L17 12l3.634 3.634c.429.429.643.643.827.657a.5.5 0 0 0 .42-.173c.119-.14.119-.444.119-1.05V8.932ZM2 9.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C4.28 5 5.12 5 6.8 5h5.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C17 7.28 17 8.12 17 9.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C14.72 19 13.88 19 12.2 19H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 16.72 2 15.88 2 14.2V9.8Z"}));O.displayName="VideoRecorder";function ee(i){const e=M.c(5),[t,g]=v.useState(!1),c=v.useRef(null),d=v.useRef(!1);let n;e[0]!==i?(n=u=>{c.current&&(c.current.disconnect(),c.current=null),u&&!d.current&&(c.current=new IntersectionObserver(y=>{const[a]=y;a?.isIntersecting&&!d.current&&(d.current=!0,g(!0),c.current?.disconnect(),c.current=null)},i),c.current.observe(u))},e[0]=i,e[1]=n):n=e[1];const l=n;let h;return e[2]!==t||e[3]!==l?(h=[t,l],e[2]=t,e[3]=l,e[4]=h):h=e[4],h}function te(i){const e=M.c(24),{objectKey:t,alt:g,className:c}=i,d=c===void 0?"":c,{connectionId:n,toolCaller:l}=D();let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={rootMargin:"100px",threshold:0},e[0]=h):h=e[0];const[u,y]=ee(h);let a;e[1]!==n||e[2]!==t?(a=L.imagePreview(n,t),e[1]=n,e[2]=t,e[3]=a):a=e[3];let f;e[4]!==t||e[5]!==l?(f=async()=>{const{url:m}=await l("GET_PRESIGNED_URL",{key:t});return m},e[4]=t,e[5]=l,e[6]=f):f=e[6];let k;e[7]!==u||e[8]!==a||e[9]!==f?(k={queryKey:a,queryFn:f,enabled:u,staleTime:3e5,gcTime:6e5},e[7]=u,e[8]=a,e[9]=f,e[10]=k):k=e[10];const{data:b,isLoading:x,error:j}=X(k);let p;e[11]!==d?(p=I("relative w-full h-full flex items-center justify-center overflow-hidden",d),e[11]=d,e[12]=p):p=e[12];let r;e[13]!==g||e[14]!==j||e[15]!==b||e[16]!==x||e[17]!==u||e[18]!==t?(r=!u||x?s.jsx("div",{className:"flex flex-col items-center justify-center text-muted-foreground",children:x?s.jsx(T,{size:24,className:"animate-spin"}):s.jsx(P,{size:48})}):j?s.jsx("div",{className:"flex flex-col items-center justify-center text-muted-foreground",children:s.jsx(S,{size:24})}):b?s.jsx("img",{src:b,alt:g||t,className:"w-full h-full object-cover",loading:"lazy"}):null,e[13]=g,e[14]=j,e[15]=b,e[16]=x,e[17]=u,e[18]=t,e[19]=r):r=e[19];let o;return e[20]!==y||e[21]!==p||e[22]!==r?(o=s.jsx("div",{ref:y,className:p,children:r}),e[20]=y,e[21]=p,e[22]=r,e[23]=o):o=e[23],o}const z=12,se={Image01:P,VideoRecorder:O,Music01:$,File02:$,File04:B,File06:J,File07:G,FileCode01:K,Folder:H};function re(i){const e=i.split(".").pop()?.toLowerCase();return["jpg","jpeg","png","gif","webp","svg","bmp","ico"].includes(e||"")}function oe(i){const e=M.c(41),{item:t,onNavigate:g,onDownload:c,onDelete:d}=i;let n;e[0]!==t.key?(n=R(t.key),e[0]=t.key,e[1]=n):n=e[1];const l=n,h=t.isFolder?"Folder":W(t.key),u=se[h]||$;let y;e[2]!==t.isFolder||e[3]!==t.key?(y=!t.isFolder&&re(t.key),e[2]=t.isFolder,e[3]=t.key,e[4]=y):y=e[4];const a=y;let f;e[5]!==t.isFolder||e[6]!==t.key||e[7]!==g?(f=()=>t.isFolder?g(t.key):void 0,e[5]=t.isFolder,e[6]=t.key,e[7]=g,e[8]=f):f=e[8];const k=!a&&"p-4",b=t.isFolder?"cursor-pointer":"cursor-default";let x;e[9]!==k||e[10]!==b?(x=I("flex flex-col items-center justify-center w-full h-full",k,b),e[9]=k,e[10]=b,e[11]=x):x=e[11];let j;e[12]!==u||e[13]!==a||e[14]!==t.isFolder||e[15]!==t.key||e[16]!==l?(j=a?s.jsx("div",{className:"absolute inset-0",children:s.jsx(te,{objectKey:t.key,alt:l})}):s.jsx(u,{size:48,className:I(t.isFolder?"text-amber-500":"text-muted-foreground")}),e[12]=u,e[13]=a,e[14]=t.isFolder,e[15]=t.key,e[16]=l,e[17]=j):j=e[17];let p;e[18]!==a||e[19]!==t.isFolder||e[20]!==t.size||e[21]!==l?(p=a?s.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-2 pt-6",children:[s.jsx("span",{className:"text-sm text-white text-center line-clamp-1 block",children:l}),s.jsx("span",{className:"text-xs text-white/70 text-center block",children:U(t.size)})]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"mt-3 text-sm text-center line-clamp-2 px-2",children:l}),!t.isFolder&&s.jsx("span",{className:"mt-1 text-xs text-muted-foreground",children:U(t.size)})]}),e[18]=a,e[19]=t.isFolder,e[20]=t.size,e[21]=l,e[22]=p):p=e[22];let r;e[23]!==f||e[24]!==x||e[25]!==j||e[26]!==p?(r=s.jsxs("button",{type:"button",onClick:f,className:x,children:[j,p]}),e[23]=f,e[24]=x,e[25]=j,e[26]=p,e[27]=r):r=e[27];let o;e[28]!==t.isFolder||e[29]!==t.key||e[30]!==d||e[31]!==c?(o=!t.isFolder&&s.jsxs("div",{className:"absolute top-2 right-2 flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[s.jsx(E,{variant:"secondary",size:"sm",className:"size-7 p-0",onClick:F=>{F.stopPropagation(),c(t.key)},children:s.jsx(A,{size:14})}),s.jsx(E,{variant:"secondary",size:"sm",className:"size-7 p-0 text-destructive hover:text-destructive",onClick:F=>{F.stopPropagation(),d(t.key)},children:s.jsx(V,{size:14})})]}),e[28]=t.isFolder,e[29]=t.key,e[30]=d,e[31]=c,e[32]=o):o=e[32];let m;e[33]!==t.isFolder||e[34]!==t.key||e[35]!==d?(m=t.isFolder&&s.jsx("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",children:s.jsx(E,{variant:"secondary",size:"sm",className:"size-7 p-0 text-destructive hover:text-destructive",onClick:F=>{F.stopPropagation(),d(t.key)},children:s.jsx(V,{size:14})})}),e[33]=t.isFolder,e[34]=t.key,e[35]=d,e[36]=m):m=e[36];let N;return e[37]!==o||e[38]!==m||e[39]!==r?(N=s.jsxs("div",{className:"group relative aspect-square bg-muted/30 rounded-lg border border-border hover:border-primary/50 hover:bg-muted/50 transition-colors overflow-hidden",children:[r,o,m]}),e[37]=o,e[38]=m,e[39]=r,e[40]=N):N=e[40],N}function Ee({prefix:i,flat:e,onNavigate:t}){const g=v.useRef(null),c=q(),{connectionId:d,toolCaller:n}=D(),{objects:l,isLoading:h,isFetchingMore:u,hasMore:y,loadMore:a,error:f}=Z({prefix:i,flat:e,pageSize:z}),k=_({mutationFn:async r=>{const o=i+r.name,{url:m}=await n("PUT_PRESIGNED_URL",{key:o,contentType:r.type||"application/octet-stream"}),N=await fetch(m,{method:"PUT",body:r,headers:{"Content-Type":r.type||"application/octet-stream"}});if(!N.ok)throw new Error(`Upload failed: ${N.statusText}`);return o},onSuccess:r=>{w.success(`Uploaded ${R(r)}`),c.invalidateQueries({queryKey:L.objects(d,i,e,z)})},onError:r=>{w.error(`Upload failed: ${r.message}`)}}),b=_({mutationFn:async r=>r.length===1&&r[0]?n("DELETE_OBJECT",{key:r[0]}):n("DELETE_OBJECTS",{keys:r}),onSuccess:()=>{w.success("Deleted successfully"),c.invalidateQueries({queryKey:L.objects(d,i,e,z)})},onError:r=>{w.error(`Delete failed: ${r.message}`)}}),x=async r=>{try{const{url:o}=await n("GET_PRESIGNED_URL",{key:r}),m=await fetch(o);if(!m.ok)throw new Error(`Failed to fetch file: ${m.statusText}`);const N=await m.blob(),F=URL.createObjectURL(N),C=document.createElement("a");C.href=F,C.download=R(r),document.body.appendChild(C),C.click(),document.body.removeChild(C),URL.revokeObjectURL(F)}catch(o){w.error(`Download failed: ${o instanceof Error?o.message:"Unknown error"}`)}},j=r=>{const o=r.target.files;if(o){for(const m of Array.from(o))k.mutate(m);r.target.value=""}},p=r=>{if(!y||u)return;const o=r.currentTarget;o.scrollHeight-o.scrollTop-o.clientHeight<200&&a()};return f?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[s.jsx(S,{size:48,className:"text-destructive mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading files"}),s.jsx("p",{className:"text-muted-foreground text-center",children:f.message})]}):s.jsx("div",{className:"flex-1 overflow-y-auto p-4",onScroll:p,children:h?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[s.jsx(T,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading files..."})]}):l.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(Q,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"This folder is empty"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Upload files to get started"}),s.jsx("input",{ref:g,type:"file",multiple:!0,className:"hidden",onChange:j}),s.jsxs(E,{variant:"outline",onClick:()=>g.current?.click(),children:[s.jsx(Y,{size:14,className:"mr-1"}),"Upload files"]})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-4",children:l.map(r=>s.jsx(oe,{item:r,onNavigate:t,onDownload:x,onDelete:o=>b.mutate([o])},r.key))}),u&&s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(T,{size:24,className:"animate-spin text-muted-foreground"})})]})})}export{Ee as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{r as N,c as w,j as n,u as ae,m as ke,bt as Re,L as Ce,bp as Jt,bC as Xt,O as ne,a4 as Qt,q as es,x as ts,g as re,t as ie,a_ as ss,bD as ot,a as qe,bE as ns,b2 as at,bF as _e,b as rs,S as ct,d as is,e as ls,N as os,y as as,K as cs,l as dt,P as ds}from"./index-Bn2rDd42.js";import{C as te,i as ms,u as fs}from"./index-CZtqakWK.js";import{I as us,n as ps,a as Ee,c as mt,T as Me,b as Ae}from"./integration-icon-C8seGsuO.js";import{P as Se}from"./index-BHu7Lc_d.js";import{b as He,u as hs,S as de,d as ft}from"./use-deco-chat-open-CfZI9mqc.js";import{c as _}from"./utils-Ckc2UwOp.js";import{d as xs}from"./constants-DuSOM18S.js";import{T as gs,i as bs,b as js,S as vs,c as ws,d as Ns,e as Ss,f as Cs,t as ut}from"./typewriter-title-BqfnndCW.js";import{s as pt}from"./Plus-BBD2SckJ.js";import{t as ht}from"./Users03-oV4Gx6fu.js";import{i as Le}from"./X-CuhyLwhM.js";import{E as xt}from"./error-boundary-DlgelpJG.js";import{C as ys}from"./create-project-dialog-C-mSn_Ux.js";import{n as ks}from"./CheckDone01-I6GfoGdi.js";import{a as _s}from"./Home02-BUr926Eo.js";import{u as zs}from"./use-project-D-mK4K9b.js";import{u as $e}from"./use-mobile-p03CcGW0.js";import{t as gt}from"./ChevronDown-DmXLJeAy.js";import{B as X}from"./button-CcO5M7F7.js";import{A as oe}from"./avatar-D3z5_V3I.js";import{b as Je,P as Xe,a as Qe}from"./popover-BkKSdvGf.js";import{n as tt}from"./Inbox01-XFeiQPbg.js";import{B as st}from"./badge-BklHLRcK.js";import{i as De}from"./Check-Sa4xK5Hg.js";import{s as nt}from"./XClose-BFt2trBc.js";import{i as $s}from"./ChevronRight-By4KEpZh.js";import{C as bt}from"./create-organization-dialog-j_P7xuhv.js";import{c as Is,b as Os,g as Ts,a as Ps,D as Es}from"./dialog-B_iTVR3h.js";import{L as Ms}from"./label-BjQxQJkg.js";import{S as As}from"./switch-CG0LWjwI.js";import{i as Ls}from"./Code01-h_k8K-1e.js";import{a as jt}from"./Copy01-jvqvZrKj.js";import{u as vt,a as Ds}from"./use-organization-settings-DHZKDAPt.js";import{i as Rs}from"./File06-WU23pV9H.js";import{I as Hs}from"./input-DBvMwxwE.js";import{c as Bs}from"./Grid01-CSAsqBFD.js";import{a as Us,b as Ws,D as Fs,c as Vs,g as rt}from"./dropdown-menu-BTPpCOPE.js";import{n as it}from"./LinkExternal01-BJLPX8tt.js";import{t as Gs}from"./Settings01-D7-sGWon.js";import{u as wt,L as Nt}from"./localstorage-keys-BhunmwZg.js";import{R as Zs,a as St,b as Ks}from"./resizable-CdUSPFqv.js";import"./spinner-Bn-tqgsf.js";import"./use-mcp-prompts-Cn7tm6ug.js";import"./useQuery-Ct96KcZp.js";import"./form-CSsv2IBt.js";import"./AlertCircle-C_hR5usO.js";import"./ArrowUp-DnJUZ1OS.js";import"./Edit01-BT8zEtQL.js";import"./Terminal-CyioLjuI.js";import"./monaco-editor-D7Ghoc8y.js";import"./empty-state--JD6ZxUc.js";import"./use-connection-CVk8Bzpz.js";import"./useMutation-CnTeRHmv.js";import"./generate-id-Dyweu44Y.js";import"./SearchMd-CGuwiAQe.js";import"./Trash01-CLqhrRia.js";import"./use-virtual-mcp-C83o4Rih.js";import"./use-create-virtual-mcp-BpXLuk-p.js";import"./index-DZ7G-bvr.js";import"./use-llm-Ca3pgrIB.js";import"./use-binding-Dgjl_Htk.js";import"./binder-ak1AkjZY.js";import"./select-J2aavKNi.js";import"./Image01-BnbXZOf7.js";import"./textarea-CKlKOzV4.js";import"./alert-dialog-BxcV0D_1.js";import"./infiniteQueryObserver-VnhrjjoH.js";const Ge=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"M7 17 17 7m0 0H7m10 0v10"}));Ge.displayName="ArrowUpRight";const Ct=({size:t=24,color:e="currentColor",...s})=>N.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},N.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"}));Ct.displayName="BarChart10";const yt=({size:t=24,color:e="currentColor",...s})=>N.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},N.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"}));yt.displayName="BookOpen01";const kt=({size:t=24,color:e="currentColor",...s})=>N.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},N.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"}));kt.displayName="Building02";const _t=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"m18 17-5-5 5-5m-7 10-5-5 5-5"}));_t.displayName="ChevronLeftDouble";const zt=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"m6 17 5-5-5-5m7 10 5-5-5-5"}));zt.displayName="ChevronRightDouble";const Ze=({size:t=24,color:e="currentColor",...s})=>N.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},N.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"}));Ze.displayName="Dataflow03";const $t=({size:t=24,color:e="currentColor",...s})=>N.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},N.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"}));$t.displayName="FaceSmile";const It=({size:t=24,color:e="currentColor",...s})=>N.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},N.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"}));It.displayName="Globe01";const Ot=({size:t=24,color:e="currentColor",...s})=>N.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},N.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"}));Ot.displayName="LayoutRight";const Tt=({size:t=24,color:e="currentColor",...s})=>N.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},N.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"}));Tt.displayName="LogOut01";const Pt=({size:t=24,color:e="currentColor",...s})=>N.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},N.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"}));Pt.displayName="LogOut02";const Et=({size:t=24,color:e="currentColor",...s})=>N.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},N.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"}));Et.displayName="Mail01";const et=({size:t=24,color:e="currentColor",...s})=>N.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},N.createElement("path",{d:"m9.395 19.371.585 1.315a2.212 2.212 0 0 0 4.044 0l.584-1.315a2.426 2.426 0 0 1 2.47-1.423l1.43.152a2.212 2.212 0 0 0 2.023-3.502l-.847-1.164a2.428 2.428 0 0 1-.46-1.434c0-.513.163-1.014.464-1.429l.847-1.163a2.211 2.211 0 0 0-2.022-3.502l-1.43.152a2.433 2.433 0 0 1-1.47-.312 2.426 2.426 0 0 1-1-1.117l-.589-1.315a2.212 2.212 0 0 0-4.044 0L9.395 4.63c-.207.468-.557.86-1 1.117-.445.256-.96.365-1.47.312l-1.434-.152a2.212 2.212 0 0 0-2.023 3.502l.847 1.163a2.43 2.43 0 0 1 0 2.858l-.847 1.163a2.21 2.21 0 0 0 .786 3.273c.382.195.811.274 1.237.23l1.43-.153a2.434 2.434 0 0 1 2.474 1.43Z"}),N.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}));et.displayName="Settings02";const Mt=({size:t=24,color:e="currentColor",...s})=>N.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},N.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"}));Mt.displayName="Settings04";function Ys(){const t=w.c(65),{org:e}=ae(),[,s]=He(),{selectedVirtualMcp:r,modelsConnections:i,isChatEmpty:l,activeThreadId:o,createThread:c,switchToThread:a,threads:d}=hs();let m;if(t[0]!==o||t[1]!==d){let F;t[3]!==o?(F=I=>I.id===o,t[3]=o,t[4]=F):F=t[4],m=d.find(F),t[0]=o,t[1]=d,t[2]=m}else m=t[2];const f=m,[u,p]=N.useState(!1),[x,h]=N.useTransition();let b;t[5]!==e.id?(b=xs(e.id),t[5]=e.id,t[6]=b):b=t[6];const j=r??b;let v;t[7]!==c?(v=()=>{h(()=>{c()})},t[7]=c,t[8]=v):v=t[8];const S=v;if(i.length===0){let F;t[9]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsx(Se.Header.Left,{className:"gap-2"}),t[9]=F):F=t[9];let I;t[10]!==s?(I=()=>s(!1),t[10]=s,t[11]=I):I=t[11];let D;t[12]===Symbol.for("react.memo_cache_sentinel")?(D=n.jsx(Le,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[12]=D):D=t[12];let G;t[13]!==I?(G=n.jsxs(Se.Header,{className:"flex-none",children:[F,n.jsx(Se.Header.Right,{className:"gap-1",children:n.jsx("button",{type:"button",onClick:I,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:D})})]}),t[13]=I,t[14]=G):G=t[14];let Y;t[15]!==e?(Y=n.jsx(te.Main,{className:"flex flex-col items-center",children:n.jsx(te.EmptyState,{children:n.jsx(te.NoLlmBindingEmptyState,{title:"No model provider connected",description:"Connect to a model provider to unlock AI-powered features.",org:e})})}),t[15]=e,t[16]=Y):Y=t[16];let J;return t[17]!==G||t[18]!==Y?(J=n.jsxs(te,{children:[G,Y]}),t[17]=G,t[18]=Y,t[19]=J):J=t[19],J}const y=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 C;t[20]!==y?(C=_("absolute inset-0 flex flex-col transition-all ease-in-out",y),t[20]=y,t[21]=C):C=t[21];let z;t[22]!==f||t[23]!==l?(z=!l&&f?.title&&n.jsx(gs,{text:f.title,className:"text-sm font-medium text-foreground"}),t[22]=f,t[23]=l,t[24]=z):z=t[24];let O;t[25]!==z?(O=n.jsx(Se.Header.Left,{className:"gap-2",children:z}),t[25]=z,t[26]=O):O=t[26];let $;t[27]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx(pt,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[27]=$):$=t[27];let k;t[28]!==S||t[29]!==x?(k=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:$}),t[28]=S,t[29]=x,t[30]=k):k=t[30];let T;t[31]===Symbol.for("react.memo_cache_sentinel")?(T=()=>p(!0),t[31]=T):T=t[31];let P;t[32]===Symbol.for("react.memo_cache_sentinel")?(P=n.jsx("button",{type:"button",onClick:T,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"Chat history",children:n.jsx(bs,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})}),t[32]=P):P=t[32];let E;t[33]!==s?(E=()=>s(!1),t[33]=s,t[34]=E):E=t[34];let L;t[35]===Symbol.for("react.memo_cache_sentinel")?(L=n.jsx(Le,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[35]=L):L=t[35];let A;t[36]!==E?(A=n.jsx("button",{type:"button",onClick:E,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:L}),t[36]=E,t[37]=A):A=t[37];let M;t[38]!==A||t[39]!==k?(M=n.jsxs(Se.Header.Right,{className:"gap-1",children:[k,P,A]}),t[38]=A,t[39]=k,t[40]=M):M=t[40];let B;t[41]!==M||t[42]!==O?(B=n.jsxs(Se.Header,{className:"flex-none",children:[O,M]}),t[41]=M,t[42]=O,t[43]=B):B=t[43];let Z;t[44]!==j||t[45]!==l?(Z=n.jsx(te.Main,{children:l?n.jsx(te.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(us,{icon:j.icon,name:j.title,size:"lg",fallbackIcon:n.jsx(ht,{size:32}),className:"size-[60px]! rounded-[18px]!"}),n.jsx("h3",{className:"text-xl font-medium text-foreground",children:j.title}),n.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:j.description??"Ask anything about configuring model providers or using MCP Mesh."})]}),n.jsx(te.IceBreakers,{})]})}):n.jsx(te.Messages,{})}),t[44]=j,t[45]=l,t[46]=Z):Z=t[46];let U;t[47]===Symbol.for("react.memo_cache_sentinel")?(U=n.jsx(te.Footer,{children:n.jsx(te.Input,{})}),t[47]=U):U=t[47];let R;t[48]!==B||t[49]!==Z||t[50]!==C?(R=n.jsxs("div",{className:C,children:[B,Z,U]}),t[48]=B,t[49]=Z,t[50]=C,t[51]=R):R=t[51];const H=u?"opacity-100 translate-x-0":"opacity-0 translate-x-4 pointer-events-none";let W;t[52]!==H?(W=_("absolute inset-0 flex flex-col transition-all duration-300 ease-in-out",H),t[52]=H,t[53]=W):W=t[53];let V;t[54]===Symbol.for("react.memo_cache_sentinel")?(V=()=>p(!1),t[54]=V):V=t[54];let K;t[55]!==o||t[56]!==a||t[57]!==d?(K=n.jsx(js,{threads:d,activeThreadId:o,onThreadSelect:a,onClose:V}),t[55]=o,t[56]=a,t[57]=d,t[58]=K):K=t[58];let se;t[59]!==W||t[60]!==K?(se=n.jsx("div",{className:W,children:K}),t[59]=W,t[60]=K,t[61]=se):se=t[61];let q;return t[62]!==R||t[63]!==se?(q=n.jsxs(te,{className:"relative overflow-hidden",children:[R,se]}),t[62]=R,t[63]=se,t[64]=q):q=t[64],q}function qs(){const t=w.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(te.Skeleton,{}),t[0]=e):e=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(xt,{fallback:e,children:n.jsx(N.Suspense,{fallback:n.jsx(te.Skeleton,{}),children:n.jsx(Ys,{})})}),t[1]=s):s=t[1],s}const Js=!1;function Xs(){const t=w.c(33),{locator:e,org:s}=ae(),r=ke(),i=Re(),{org:l,project:o}=Ce.parse(e),c=Ce.isOrgAdminProject(e),{data:a}=zs(s.id,o);let d;t[0]!==a?.enabledPlugins?(d=a?.enabledPlugins??[],t[0]=a?.enabledPlugins,t[1]=d):d=t[1];const m=d;let f;t[2]!==m?(f=I=>m.includes(I.pluginId),t[2]=m,t[3]=f):f=t[3];const u=Jt.filter(f),p=i.location.pathname===`/${l}/${o}`||i.location.pathname===`/${l}/${o}/`;let x;t[4]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(_s,{}),t[4]=x):x=t[4];const h={key:"home",label:"Home",icon:x,onClick:()=>{p?window.dispatchEvent(new CustomEvent("reset-home-view")):r({to:"/$org/$project",params:{org:l,project:o}})}};let b;t[5]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(ks,{}),t[5]=b):b=t[5];const g={key:"tasks",label:"Tasks",icon:b,onClick:()=>r({to:"/$org/$project/tasks",params:{org:l,project:ne}})};let j;t[6]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(ps,{}),t[6]=j):j=t[6];const v={key:"mcps",label:"Connections",icon:j,onClick:()=>r({to:"/$org/$project/mcps",params:{org:l,project:ne}})};let S;t[7]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(Qt,{}),t[7]=S):S=t[7];let y;t[8]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(kt,{}),t[8]=y):y=t[8];const C={key:"store",label:"Store",icon:y,onClick:()=>r({to:"/$org/$project/store",params:{org:l,project:ne}})};let z;t[9]===Symbol.for("react.memo_cache_sentinel")?(z=n.jsx(ht,{}),t[9]=z):z=t[9];const O={key:"agents",label:"Agents",icon:z,onClick:()=>r({to:"/$org/$project/agents",params:{org:l,project:ne}})};let $;t[10]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx(Ct,{}),t[10]=$):$=t[10];const k={key:"monitoring",label:"Monitor",icon:$,onClick:()=>r({to:"/$org/$project/monitoring",params:{org:l,project:ne}})};let T;t[11]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(Ze,{}),t[11]=T):T=t[11];const P={key:"workflows",label:"Workflows",icon:T,onClick:()=>r({to:"/$org/$project/workflows",params:{org:l,project:ne}})};let E;t[12]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx($t,{}),t[12]=E):E=t[12];const A=[g,v,P,C,O,k,{key:"members",label:"Members",icon:E,onClick:()=>r({to:"/$org/$project/members",params:{org:l,project:ne}})}],M=u.map(I=>({key:I.pluginId,label:I.label,icon:I.icon,onClick:()=>r({to:"/$org/$project/$pluginId",params:{org:l,project:o,pluginId:I.pluginId}})}));let B;t[13]!==m?(B=I=>m.includes(I.pluginId),t[13]=m,t[14]=B):B=t[14];const U=Xt.filter(B).map(I=>({type:"group",group:{id:`${I.pluginId}-${I.id}`,label:I.label,items:I.items.map((D,G)=>({key:`${I.pluginId}-${I.id}-${G}`,label:D.label,icon:D.icon,onClick:()=>r({to:"/$org/$project/$pluginId",params:{org:l,project:o,pluginId:I.pluginId}})})),defaultExpanded:I.defaultExpanded??!0}}));if(c){const I=[{type:"items",items:[h,...A]}];if(M.length>0){let D;t[15]===Symbol.for("react.memo_cache_sentinel")?(D={type:"divider"},t[15]=D):D=t[15],I.push(D);let G;t[16]!==M?(G={type:"items",items:M},t[16]=M,t[17]=G):G=t[17],I.push(G)}if(U.length>0){if(M.length===0){let D;t[18]===Symbol.for("react.memo_cache_sentinel")?(D={type:"divider"},t[18]=D):D=t[18],I.push(D)}I.push(...U)}return I}let R;t[19]===Symbol.for("react.memo_cache_sentinel")?(R=n.jsx(ms,{}),t[19]=R):R=t[19];let H;t[20]!==r||t[21]!==l||t[22]!==o?(H={key:"tasks",label:"Tasks",icon:R,onClick:()=>r({to:"/$org/$project/tasks",params:{org:l,project:o}})},t[20]=r,t[21]=l,t[22]=o,t[23]=H):H=t[23];const W=H;let V;t[24]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx(Ze,{}),t[24]=V):V=t[24];let K;t[25]!==r||t[26]!==l||t[27]!==o?(K={key:"workflows",label:"Workflows",icon:V,onClick:()=>r({to:"/$org/$project/workflows",params:{org:l,project:o}})},t[25]=r,t[26]=l,t[27]=o,t[28]=K):K=t[28];const F=[{type:"items",items:[h,W,K]}];if(M.length>0){let I;t[29]===Symbol.for("react.memo_cache_sentinel")?(I={type:"divider"},t[29]=I):I=t[29],F.push(I);let D;t[30]!==M?(D={type:"items",items:M},t[30]=M,t[31]=D):D=t[31],F.push(D)}if(U.length>0){if(M.length===0){let I;t[32]===Symbol.for("react.memo_cache_sentinel")?(I={type:"divider"},t[32]=I):I=t[32],F.push(I)}F.push(...U)}return F}const Qs="sidebar_state",en=3600*24*7,tn="16rem",sn="18rem",nn="3rem",rn="b",At=N.createContext(null);function Be(){const t=N.useContext(At);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function ln(t){const e=w.c(21),{defaultOpen:s,open:r,onOpenChange:i,children:l}=t,o=s===void 0?!0:s,c=$e(),[a,d]=N.useState(!1),[m,f]=N.useState(o),u=r??m;let p;e[0]!==u||e[1]!==i?(p=O=>{const $=typeof O=="function"?O(u):O;i?i($):f($),document.cookie=`${Qs}=${$}; path=/; max-age=${en}`},e[0]=u,e[1]=i,e[2]=p):p=e[2];const x=p;let h;e[3]!==c||e[4]!==x?(h=()=>c?d(an):x(on),e[3]=c,e[4]=x,e[5]=h):h=e[5];const b=h;let g,j;e[6]!==b?(g=()=>{const O=$=>{if($.key===rn&&($.metaKey||$.ctrlKey)){const k=$.target;if(k.tagName==="INPUT"||k.tagName==="TEXTAREA"||k.isContentEditable)return;$.preventDefault(),b()}};return globalThis.addEventListener("keydown",O),()=>globalThis.removeEventListener("keydown",O)},j=[b],e[6]=b,e[7]=g,e[8]=j):(g=e[7],j=e[8]),N.useEffect(g,j);const v=u?"expanded":"collapsed";let S;e[9]!==c||e[10]!==u||e[11]!==a||e[12]!==x||e[13]!==v||e[14]!==b?(S={state:v,open:u,setOpen:x,isMobile:c,openMobile:a,setOpenMobile:d,toggleSidebar:b},e[9]=c,e[10]=u,e[11]=a,e[12]=x,e[13]=v,e[14]=b,e[15]=S):S=e[15];const y=S;let C;e[16]!==l?(C=n.jsx(mt,{delayDuration:0,children:l}),e[16]=l,e[17]=C):C=e[17];let z;return e[18]!==y||e[19]!==C?(z=n.jsx(At.Provider,{value:y,children:C}),e[18]=y,e[19]=C,e[20]=z):z=e[20],z}function on(t){return!t}function an(t){return!t}function cn(t){const e=w.c(14);let s,r,i,l;e[0]!==t?({className:r,style:l,children:s,...i}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=i,e[4]=l):(s=e[1],r=e[2],i=e[3],l=e[4]);let o;e[5]!==l?(o={"--sidebar-width":tn,"--sidebar-width-icon":nn,...l},e[5]=l,e[6]=o):o=e[6];const c=o;let a;e[7]!==r?(a=_("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",r),e[7]=r,e[8]=a):a=e[8];let d;return e[9]!==s||e[10]!==i||e[11]!==c||e[12]!==a?(d=n.jsx("div",{"data-slot":"sidebar-wrapper",style:c,className:a,...i,children:s}),e[9]=s,e[10]=i,e[11]=c,e[12]=a,e[13]=d):d=e[13],d}function dn(t){const e=w.c(46);let s,r,i,l,o,c;e[0]!==t?({side:l,variant:o,collapsible:c,className:r,children:s,...i}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=i,e[4]=l,e[5]=o,e[6]=c):(s=e[1],r=e[2],i=e[3],l=e[4],o=e[5],c=e[6]);const a=l===void 0?"left":l,d=o===void 0?"sidebar":o,m=c===void 0?"offcanvas":c,{isMobile:f,state:u,openMobile:p,setOpenMobile:x}=Be();if(m==="none"){let $;e[7]!==r?($=_("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),e[7]=r,e[8]=$):$=e[8];let k;return e[9]!==s||e[10]!==i||e[11]!==$?(k=n.jsx("div",{"data-slot":"sidebar",className:$,...i,children:s}),e[9]=s,e[10]=i,e[11]=$,e[12]=k):k=e[12],k}if(f){let $;e[13]===Symbol.for("react.memo_cache_sentinel")?($={"--sidebar-width":sn},e[13]=$):$=e[13];let k;e[14]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsxs(ws,{className:"sr-only",children:[n.jsx(Ns,{children:"Sidebar"}),n.jsx(Ss,{children:"Displays the mobile sidebar."})]}),e[14]=k):k=e[14];let T;e[15]!==s?(T=n.jsx("div",{className:"flex h-full w-full flex-col",children:s}),e[15]=s,e[16]=T):T=e[16];let P;e[17]!==a||e[18]!==T?(P=n.jsxs(Cs,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:$,side:a,children:[k,T]}),e[17]=a,e[18]=T,e[19]=P):P=e[19];let E;return e[20]!==p||e[21]!==i||e[22]!==x||e[23]!==P?(E=n.jsx(vs,{open:p,onOpenChange:x,...i,children:P}),e[20]=p,e[21]=i,e[22]=x,e[23]=P,e[24]=E):E=e[24],E}const h=u==="collapsed"?m:"",b=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 g;e[25]!==b?(g=_("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",b),e[25]=b,e[26]=g):g=e[26];let j;e[27]!==g?(j=n.jsx("div",{"data-slot":"sidebar-gap",className:g}),e[27]=g,e[28]=j):j=e[28];const v=a==="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 y;e[29]!==r||e[30]!==v||e[31]!==S?(y=_("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]=y):y=e[32];let C;e[33]!==s?(C=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]=C):C=e[34];let z;e[35]!==i||e[36]!==y||e[37]!==C?(z=n.jsx("div",{"data-slot":"sidebar-container",className:y,...i,children:C}),e[35]=i,e[36]=y,e[37]=C,e[38]=z):z=e[38];let O;return e[39]!==a||e[40]!==u||e[41]!==z||e[42]!==h||e[43]!==j||e[44]!==d?(O=n.jsxs("div",{className:"group peer text-foreground hidden md:block","data-state":u,"data-collapsible":h,"data-variant":d,"data-side":a,"data-slot":"sidebar",children:[j,z]}),e[39]=a,e[40]=u,e[41]=z,e[42]=h,e[43]=j,e[44]=d,e[45]=O):O=e[45],O}function mn(t){const e=w.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 i;e[3]!==s?(i=_("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]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx("main",{"data-slot":"sidebar-inset",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function Lt(t){const e=w.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 i;e[3]!==s?(i=_("flex flex-col gap-2 p-2",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function fn(t){const e=w.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 i;e[3]!==s?(i=_("flex flex-col gap-2 px-2 items-start justify-start",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function Dt(t){const e=w.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 i;e[3]!==s?(i=_("h-4 m-0! w-full",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx("div",{"data-sidebar":"separator",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function un(t){const e=w.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 i;e[3]!==s?(i=_("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function Rt(t){const e=w.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 i;e[3]!==s?(i=_("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function Ht(t){const e=w.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 i;e[3]!==s?(i=_("w-full text-sm",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function ye(t){const e=w.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 i;e[3]!==s?(i=_("flex w-full min-w-0 flex-col gap-1",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function me(t){const e=w.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 i;e[3]!==s?(i=_("group/menu-item relative",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}const pn=ts("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 Ue(t){const e=w.c(28);let s,r,i,l,o,c,a;e[0]!==t?({asChild:i,isActive:l,variant:o,size:c,tooltip:a,className:s,...r}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=i,e[4]=l,e[5]=o,e[6]=c,e[7]=a):(s=e[1],r=e[2],i=e[3],l=e[4],o=e[5],c=e[6],a=e[7]);const d=i===void 0?!1:i,m=l===void 0?!1:l,f=o===void 0?"default":o,u=c===void 0?"default":c,p=d?es:"button",{isMobile:x,state:h}=Be();let b;e[8]!==s||e[9]!==u||e[10]!==f?(b=_(pn({variant:f,size:u}),s),e[8]=s,e[9]=u,e[10]=f,e[11]=b):b=e[11];let g;e[12]!==p||e[13]!==m||e[14]!==r||e[15]!==u||e[16]!==b?(g=n.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":u,"data-active":m,className:b,...r}),e[12]=p,e[13]=m,e[14]=r,e[15]=u,e[16]=b,e[17]=g):g=e[17];const j=g;if(!a)return j;if(typeof a=="string"){let z;e[18]!==a?(z={children:a},e[18]=a,e[19]=z):z=e[19],a=z}let v;e[20]!==j?(v=n.jsx(Me,{asChild:!0,children:j}),e[20]=j,e[21]=v):v=e[21];const S=h!=="collapsed"||x;let y;e[22]!==S||e[23]!==a?(y=n.jsx(Ee,{side:"right",align:"center",hidden:S,...a}),e[22]=S,e[23]=a,e[24]=y):y=e[24];let C;return e[25]!==v||e[26]!==y?(C=n.jsxs(Ae,{children:[v,y]}),e[25]=v,e[26]=y,e[27]=C):C=e[27],C}function hn(t){const e=w.c(18),{label:s,children:r,defaultExpanded:i}=t,l=i===void 0?!0:i,[o,c]=N.useState(l);let a;e[0]!==o?(a=()=>c(!o),e[0]=o,e[1]=a):a=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=!o&&"-rotate-90";let f;e[4]!==m?(f=_("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(gt,{size:12,className:f}),e[6]=f,e[7]=u):u=e[7];let p;e[8]!==a||e[9]!==d||e[10]!==u?(p=n.jsx(ye,{children:n.jsx(me,{children:n.jsxs(Ue,{className:"h-6 cursor-pointer select-none",onClick:a,children:[d,u]})})}),e[8]=a,e[9]=d,e[10]=u,e[11]=p):p=e[11];let x;e[12]!==r||e[13]!==o?(x=o&&n.jsx(Ht,{children:n.jsx(ye,{className:"gap-0.5",children:r})}),e[12]=r,e[13]=o,e[14]=x):x=e[14];let h;return e[15]!==p||e[16]!==x?(h=n.jsxs(Rt,{className:"py-0",children:[p,x]}),e[15]=p,e[16]=x,e[17]=h):h=e[17],h}function Bt(t){const e=w.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 i;e[2]!==s.label?(i=n.jsx("span",{className:"truncate",children:s.label}),e[2]=s.label,e[3]=i):i=e[3];let l;e[4]!==s.isActive||e[5]!==s.label||e[6]!==s.onClick||e[7]!==r||e[8]!==i?(l=n.jsxs(Ue,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:s.onClick,isActive:s.isActive,tooltip:s.label,children:[r,i]}),e[4]=s.isActive,e[5]=s.label,e[6]=s.onClick,e[7]=r,e[8]=i,e[9]=l):l=e[9];let o;return e[10]!==s.key||e[11]!==l?(o=n.jsx(me,{children:l},s.key),e[10]=s.key,e[11]=l,e[12]=o):o=e[12],o}function xn(t){const e=w.c(12),{section:s}=t;switch(s.type){case"divider":{let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Dt,{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,i=s.group.defaultExpanded;let l;e[2]!==s.group.items?(l=s.group.items.map(bn),e[2]=s.group.items,e[3]=l):l=e[3];let o;return e[4]!==s.group.defaultExpanded||e[5]!==s.group.label||e[6]!==l?(o=n.jsx(hn,{label:r,defaultExpanded:i,children:l}),e[4]=s.group.defaultExpanded,e[5]=s.group.label,e[6]=l,e[7]=o):o=e[7],o}case"items":{let r;e[8]!==s.items?(r=s.items.map(gn),e[8]=s.items,e[9]=r):r=e[9];let i;return e[10]!==r?(i=n.jsx(Rt,{className:"py-0",children:n.jsx(Ht,{children:n.jsx(ye,{className:"gap-0.5",children:r})})}),e[10]=r,e[11]=i):i=e[11],i}}}function gn(t){return n.jsx(Bt,{item:t},t.key)}function bn(t){return n.jsx(Bt,{item:t},t.key)}function Ut(t){const e=w.c(14),{sections:s,header:r,footer:i,additionalContent:l,variant:o,collapsible:c,contentClassName:a}=t,d=o===void 0?"sidebar":o,m=c===void 0?"icon":c;let f;e[0]!==a?(f=_("flex flex-col flex-1 overflow-x-hidden font-medium border-r pb-2",a),e[0]=a,e[1]=f):f=e[1];let u;e[2]!==s?(u=s.map(jn),e[2]=s,e[3]=u):u=e[3];let p;e[4]!==l||e[5]!==f||e[6]!==u?(p=n.jsxs(un,{className:f,children:[u,l]}),e[4]=l,e[5]=f,e[6]=u,e[7]=p):p=e[7];let x;return e[8]!==m||e[9]!==i||e[10]!==r||e[11]!==p||e[12]!==d?(x=n.jsxs(dn,{variant:d,collapsible:m,children:[r,p,i]}),e[8]=m,e[9]=i,e[10]=r,e[11]=p,e[12]=d,e[13]=x):x=e[13],x}function jn(t,e){return n.jsx(xn,{section:t},e)}Ut.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(de,{className:"h-full bg-sidebar-accent rounded-md"})},s))})};const vn="w-full h-8 justify-start gap-2 px-2 text-sm font-[450] text-sidebar-foreground hover:text-sidebar-foreground hover:bg-sidebar-accent active:bg-sidebar-accent/75 [&>svg]:size-[18px] [&>svg]:text-muted-foreground hover:[&>svg]:text-sidebar-foreground";function ze(t){const e=w.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 i;e[3]!==s?(i=_(vn,s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx(X,{variant:"ghost",size:"sm",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function wn({invitation:t,onStatusChange:e}){const[s,r]=N.useState(!1),[i,l]=N.useState(!1),o=ke(),c=async()=>{r(!0);try{const p=await re.organization.acceptInvitation({invitationId:t.id});if(p.error)ie.error(p.error.message),r(!1);else{e(t.id,"accepted");const x=await re.organization.setActive({organizationId:t.organizationId});x?.data?.slug?(ie.success("Invitation accepted!"),o({to:"/$org",params:{org:x.data.slug}})):(ie.success("Invitation accepted! Redirecting..."),o({to:"/"}))}}catch{ie.error("Failed to accept invitation"),r(!1)}},a=async()=>{l(!0);try{const p=await re.organization.rejectInvitation({invitationId:t.id});p.error?(ie.error(p.error.message),l(!1)):(ie.success("Invitation rejected"),e(t.id,"rejected"),l(!1))}catch{ie.error("Failed to reject invitation"),l(!1)}},d=t.organizationName||t.organizationId,m=t.status==="pending",f=t.status==="accepted",u=t.status==="rejected";return n.jsxs("div",{className:_("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(Et,{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(X,{variant:"ghost",size:"icon",onClick:a,disabled:s||i,className:"h-8 w-8",children:n.jsx(nt,{size:14})}),n.jsx(X,{variant:"outline",size:"icon",onClick:c,disabled:s||i,className:"h-8 w-8",children:n.jsx(De,{size:14})})]}):f?n.jsxs(st,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx(De,{size:12}),"Accepted"]}):u?n.jsxs(st,{variant:"outline",className:"h-6 px-2 text-xs",children:[n.jsx(nt,{size:12}),"Declined"]}):null})]})}function Nn(){const[t,e]=N.useState(!1),s=N.useContext(ss),{data:r}=s.hooks.useListUserInvitations(),{data:i}=re.useListOrganizations(),[l,o]=N.useState({}),m=(r??[]).filter(h=>new Date(h.expiresAt)>new Date).map(h=>{const b=(i??[]).find(g=>g.id===h.organizationId);return{...h,organizationSlug:b?.slug||h.organizationSlug,organizationName:b?.name||h.organizationName}}).map(h=>({...h,status:l[h.id]||h.status})),f=[...m].sort((h,b)=>{const g={pending:0,accepted:1,rejected:2};return(g[h.status]??999)-(g[b.status]??999)}),p=m.filter(h=>h.status==="pending").length>0,x=(h,b)=>{o(g=>({...g,[h]:b}))};return n.jsxs(Je,{open:t,onOpenChange:e,children:[n.jsx(Xe,{asChild:!0,children:n.jsxs(ze,{children:[n.jsx(tt,{size:18}),"Inbox",p&&n.jsx("span",{className:"ml-auto h-2 w-2 rounded-full bg-destructive"})]})}),n.jsxs(Qe,{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(wn,{invitation:h,onStatusChange:x},h.id)):n.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[n.jsx(tt,{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 Sn(t){const e=w.c(28),{user:s,userImage:r,onOpenSettings:i}=t;let l;e[0]!==s?(l=async()=>{if(!s)return;const C=`ID: ${s.id}
|
|
2
|
-
Name: ${s.name||"N/A"}
|
|
3
|
-
Email: ${s.email}`;try{await navigator.clipboard.writeText(C),ie.success("User info copied to clipboard")}catch{ie.error("Failed to copy user info to clipboard")}},e[0]=s,e[1]=l):l=e[1];const o=l,c=s.name||s.email||"U";let a;e[2]!==c||e[3]!==r?(a=n.jsx(oe,{url:r,fallback:c,shape:"circle",size:"sm",className:"size-8 shrink-0"}),e[2]=c,e[3]=r,e[4]=a):a=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]!==o||e[13]!==a||e[14]!==u?(p=n.jsxs(X,{variant:"ghost",onClick:o,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:[a,u]}),e[12]=o,e[13]=a,e[14]=u,e[15]=p):p=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Nn,{}),e[16]=x):x=e[16];let h;e[17]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Mt,{size:18}),e[17]=h):h=e[17];let b;e[18]!==i?(b=n.jsxs(ze,{onClick:i,children:[h,"Preferences"]}),e[18]=i,e[19]=b):b=e[19];let g;e[20]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(ze,{asChild:!0,children:n.jsxs("a",{href:"https://www.decocms.com/terms-of-use",target:"_blank",rel:"noopener noreferrer",children:[n.jsx(yt,{size:18}),n.jsx("span",{className:"flex-1",children:"Terms & Conditions"}),n.jsx(Ge,{size:14})]})}),e[20]=g):g=e[20];let j;e[21]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(ze,{asChild:!0,children:n.jsxs("a",{href:"https://github.com/decocms/mesh",target:"_blank",rel:"noopener noreferrer",children:[n.jsx(ot,{className:"size-[18px]"}),n.jsx("span",{className:"flex-1",children:"decocms/mesh"}),n.jsx(Ge,{size:14})]})}),e[21]=j):j=e[21];let v;e[22]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsxs(ze,{onClick:Cn,children:[n.jsx(Pt,{size:18}),"Log out"]}),e[22]=v):v=e[22];let S;e[23]!==b?(S=n.jsxs("div",{className:"p-1 flex flex-col",children:[x,b,g,j,v]}),e[23]=b,e[24]=S):S=e[24];let y;return e[25]!==S||e[26]!==p?(y=n.jsx(n.Fragment,{children:n.jsxs("div",{className:"flex flex-col gap-0.5 bg-sidebar min-w-[250px]",children:[p,S]})}),e[25]=S,e[26]=p,e[27]=y):y=e[27],y}function Cn(){return re.signOut()}function yn(t){const e=w.c(26),{org:s,isActive:r,isHovered:i,onClick:l,onSettings:o,onHover:c}=t,a=r,d=i&&!r,m=i&&"bg-accent/50",f=r&&!i&&"bg-accent hover:bg-accent";let u;e[0]!==m||e[1]!==f?(u=_("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]!==l?(p=S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),l?.())},e[3]=l,e[4]=p):p=e[4];let x;e[5]!==c||e[6]!==s.id?(x=()=>c?.(s.id),e[5]=c,e[6]=s.id,e[7]=x):x=e[7];const h=s.logo??void 0;let b;e[8]!==s.name||e[9]!==h?(b=n.jsx(oe,{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]=b):b=e[10];let g;e[11]!==s.name?(g=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]=g):g=e[12];let j;e[13]!==o||e[14]!==s.name||e[15]!==d||e[16]!==a?(j=o&&a?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(et,{size:16,className:"text-muted-foreground"})}):d?n.jsx($s,{size:16,className:"text-muted-foreground shrink-0"}):n.jsx("span",{className:"size-5 shrink-0","aria-hidden":"true"}),e[13]=o,e[14]=s.name,e[15]=d,e[16]=a,e[17]=j):j=e[17];let v;return e[18]!==l||e[19]!==u||e[20]!==p||e[21]!==x||e[22]!==b||e[23]!==g||e[24]!==j?(v=n.jsxs("div",{role:"button",tabIndex:0,className:u,onClick:l,onKeyDown:p,onMouseEnter:x,children:[b,g,j]}),e[18]=l,e[19]=u,e[20]=p,e[21]=x,e[22]=b,e[23]=g,e[24]=j,e[25]=v):v=e[25],v}function kn(t){const e=w.c(34),{currentOrgSlug:s,hoveredOrgId:r,onOrgSelect:i,onOrgSettings:l,onPopoverClose:o,onCreateOrganization:c,onOrgHover:a}=t,{data:d}=re.useListOrganizations();let m,f,u,p;if(e[0]!==s||e[1]!==r||e[2]!==c||e[3]!==a||e[4]!==i||e[5]!==l||e[6]!==o||e[7]!==d){let b;e[12]!==s?(b=(C,z)=>C.slug===s?-1:z.slug===s?1:C.name.localeCompare(z.name),e[12]=s,e[13]=b):b=e[13];const g=[...d??[]].sort(b);u="flex flex-col min-w-[240px] border-l border-border";let j;e[14]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx("span",{className:"text-xs text-muted-foreground truncate",children:"Your Organizations"}),e[14]=j):j=e[14];let v;e[15]!==c||e[16]!==o?(v=()=>{o(),c()},e[15]=c,e[16]=o,e[17]=v):v=e[17];let S;e[18]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(pt,{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:[j,n.jsx(X,{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 y;e[21]!==s||e[22]!==r||e[23]!==a||e[24]!==i||e[25]!==l?(y=C=>n.jsx(yn,{org:C,isActive:C.slug===s,isHovered:C.id===r,onClick:()=>i(C.slug),onSettings:()=>l(C.slug),onHover:a},C.slug),e[21]=s,e[22]=r,e[23]=a,e[24]=i,e[25]=l,e[26]=y):y=e[26],f=g.map(y),e[0]=s,e[1]=r,e[2]=c,e[3]=a,e[4]=i,e[5]=l,e[6]=o,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 Wt(t){const e=w.c(48),{open:s,onOpenChange:r,user:i,userImage:l}=t,[o,c]=fs(),[a,d]=N.useState(!1);let m;e[0]!==i.id?(m=()=>{navigator.clipboard.writeText(i.id),d(!0),setTimeout(()=>d(!1),2e3)},e[0]=i.id,e[1]=m):m=e[1];const f=m;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Is,{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(Os,{className:"px-6 pt-6 pb-4 border-b border-border shrink-0 relative",children:[u,n.jsxs(Ts,{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(Le,{size:16}),n.jsx("span",{className:"sr-only",children:"Close"})]})]}),e[3]=p):p=e[3];const x=i.name||"U";let h;e[4]!==x||e[5]!==l?(h=n.jsx(oe,{url:l,fallback:x,shape:"circle",size:"xl",className:"h-16 w-16"}),e[4]=x,e[5]=l,e[6]=h):h=e[6];const b=i.name||"User";let g;e[7]!==b?(g=n.jsx("span",{className:"text-base font-medium text-foreground",children:b}),e[7]=b,e[8]=g):g=e[8];let j;e[9]!==i.email?(j=n.jsx("span",{className:"text-sm text-muted-foreground",children:i.email}),e[9]=i.email,e[10]=j):j=e[10];let v;e[11]!==g||e[12]!==j?(v=n.jsxs("div",{className:"flex flex-col gap-1",children:[g,j]}),e[11]=g,e[12]=j,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 y;e[17]!==o||e[18]!==c?(y=()=>c(!o),e[17]=o,e[18]=c,e[19]=y):y=e[19];let C;e[20]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[n.jsxs(Ms,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[n.jsx(Ls,{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]=C):C=e[20];let z;e[21]!==o||e[22]!==c?(z=n.jsx("div",{onClick:_n,children:n.jsx(As,{checked:o,onCheckedChange:c})}),e[21]=o,e[22]=c,e[23]=z):z=e[23];let O;e[24]!==y||e[25]!==z?(O=n.jsxs("button",{type:"button",onClick:y,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[C,z]}),e[24]=y,e[25]=z,e[26]=O):O=e[26];let $;e[27]!==S||e[28]!==O?($=n.jsxs("div",{className:"p-5 space-y-6 min-h-[225px]",children:[S,O]}),e[27]=S,e[28]=O,e[29]=$):$=e[29];let k;e[30]!==i.id?(k=n.jsx("span",{className:"font-mono text-xs",children:i.id}),e[30]=i.id,e[31]=k):k=e[31];let T;e[32]!==a?(T=a?n.jsx(De,{size:14,className:"text-green-600"}):n.jsx(jt,{size:14,className:"opacity-0 group-hover:opacity-100 transition-opacity"}),e[32]=a,e[33]=T):T=e[33];let P;e[34]!==f||e[35]!==k||e[36]!==T?(P=n.jsx(Me,{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:[k,T]})}),e[34]=f,e[35]=k,e[36]=T,e[37]=P):P=e[37];let E;e[38]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx(Ee,{side:"top",children:n.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[38]=E):E=e[38];let L;e[39]!==P?(L=n.jsx("div",{className:"border-t border-border px-5 py-4 flex items-center shrink-0",children:n.jsx(mt,{children:n.jsxs(Ae,{children:[P,E]})})}),e[39]=P,e[40]=L):L=e[40];let A;e[41]!==$||e[42]!==L?(A=n.jsxs(Ps,{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:[$,L]})]}),e[41]=$,e[42]=L,e[43]=A):A=e[43];let M;return e[44]!==r||e[45]!==s||e[46]!==A?(M=n.jsx(Es,{open:s,onOpenChange:r,children:A}),e[44]=r,e[45]=s,e[46]=A,e[47]=M):M=e[47],M}function _n(t){return t.stopPropagation()}function Ft(t){const e=w.c(76),{isCollapsed:s,variant:r,onCreateProject:i}=t,l=s===void 0?!1:s,o=r===void 0?"light":r;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[0]=c):c=e[0];const{org:a,project:d}=qe(c),{data:m}=re.useListOrganizations(),{data:f}=re.useSession(),u=ke(),p=o==="dark",h=ae()?.project;let b;e[1]!==a||e[2]!==m?(b=m?.find(Q=>Q.slug===a),e[1]=a,e[2]=m,e[3]=b):b=e[3];const g=b,[j,v]=N.useState(!1),[S,y]=N.useState(!1),[C,z]=N.useState(!1),[O,$]=N.useState(null),k=f?.user,T=k?.image;let P;e[4]!==g||e[5]!==O||e[6]!==m?(P=O?m?.find(Q=>Q.id===O):g,e[4]=g,e[5]=O,e[6]=m,e[7]=P):P=e[7];const E=P;let L;e[8]!==u?(L=Q=>{v(!1),u({to:"/$org/$project/settings",params:{org:Q,project:ne}})},e[8]=u,e[9]=L):L=e[9];const A=L;let M;e[10]!==u?(M=Q=>{v(!1),u({to:"/$org/$project",params:{org:Q,project:ne}})},e[10]=u,e[11]=M):M=e[11];const B=M;let Z;e[12]!==u?(Z=(Q,Ve)=>{v(!1),u({to:"/$org/$project",params:{org:Q,project:Ve}})},e[12]=u,e[13]=Z):Z=e[13];const U=Z;let R;e[14]!==u?(R=(Q,Ve)=>{v(!1),u({to:"/$org/$project/settings",params:{org:Q,project:Ve}})},e[14]=u,e[15]=R):R=e[15];const H=R;let W;e[16]!==i?(W=i?()=>{v(!1),i()}:void 0,e[16]=i,e[17]=W):W=e[17];const V=W;let K;e[18]===Symbol.for("react.memo_cache_sentinel")?(K=Q=>{v(Q),Q||$(null)},e[18]=K):K=e[18];const se=K;let q;e[19]!==g?(q=()=>{g&&$(g.id)},e[19]=g,e[20]=q):q=e[20];const F=q,I=p?"hover:bg-zinc-800 text-white":"hover:bg-sidebar-accent",D=l?"justify-center":"justify-start",G=l?"":"pl-0.5! px-1.5 gap-1.5";let Y;e[21]!==I||e[22]!==D||e[23]!==G?(Y=_("h-7 min-w-0 max-w-full",I,D,G),e[21]=I,e[22]=D,e[23]=G,e[24]=Y):Y=e[24];const J=g?.logo??"",ce=g?.name??"",Fe=p&&"border-none";let fe;e[25]!==Fe?(fe=_("shrink-0 rounded-[5px]",Fe),e[25]=Fe,e[26]=fe):fe=e[26];let ue;e[27]!==J||e[28]!==ce||e[29]!==fe?(ue=n.jsx(oe,{url:J,fallback:ce,size:"xs",className:fe,objectFit:"cover"}),e[27]=J,e[28]=ce,e[29]=fe,e[30]=ue):ue=e[30];let pe;e[31]!==g?.name||e[32]!==h||e[33]!==l||e[34]!==p?(pe=!l&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:_("min-w-0 text-left",p&&"flex-1"),children:p&&h?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:h.name??h.slug})]}):n.jsx("span",{className:"truncate text-[14px] tracking-[-0.00625rem] font-medium text-foreground",children:g?.name??"Select org"})}),p?n.jsx(ft,{className:"size-3 text-zinc-500 shrink-0"}):n.jsx(gt,{className:"size-3.5 text-muted-foreground shrink-0"})]}),e[31]=g?.name,e[32]=h,e[33]=l,e[34]=p,e[35]=pe):pe=e[35];let he;e[36]!==F||e[37]!==Y||e[38]!==ue||e[39]!==pe?(he=n.jsx(Xe,{asChild:!0,children:n.jsxs(X,{variant:"ghost",size:"sm",onClick:F,className:Y,children:[ue,pe]})}),e[36]=F,e[37]=Y,e[38]=ue,e[39]=pe,e[40]=he):he=e[40];let xe;e[41]!==k||e[42]!==T?(xe=k&&n.jsx(Sn,{user:k,userImage:T,onOpenSettings:()=>{y(!0),v(!1)}}),e[41]=k,e[42]=T,e[43]=xe):xe=e[43];let Ie,Oe;e[44]===Symbol.for("react.memo_cache_sentinel")?(Ie=()=>v(!1),Oe=()=>z(!0),e[44]=Ie,e[45]=Oe):(Ie=e[44],Oe=e[45]);let ge;e[46]!==A||e[47]!==B||e[48]!==O||e[49]!==a?(ge=n.jsx(kn,{currentOrgSlug:a,hoveredOrgId:O,onOrgSelect:B,onOrgSettings:A,onPopoverClose:Ie,onCreateOrganization:Oe,onOrgHover:$}),e[46]=A,e[47]=B,e[48]=O,e[49]=a,e[50]=ge):ge=e[50];let be;e[51]!==V||e[52]!==H||e[53]!==U||e[54]!==E||e[55]!==a||e[56]!==d?(be=Js,e[51]=V,e[52]=H,e[53]=U,e[54]=E,e[55]=a,e[56]=d,e[57]=be):be=e[57];let je;e[58]!==xe||e[59]!==ge||e[60]!==be?(je=n.jsxs(Qe,{align:"start",side:"bottom",className:"p-0 flex w-auto h-88 overflow-hidden",children:[xe,ge,be]}),e[58]=xe,e[59]=ge,e[60]=be,e[61]=je):je=e[61];let ve;e[62]!==j||e[63]!==he||e[64]!==je?(ve=n.jsxs(Je,{open:j,onOpenChange:se,children:[he,je]}),e[62]=j,e[63]=he,e[64]=je,e[65]=ve):ve=e[65];let we;e[66]!==S||e[67]!==k||e[68]!==T?(we=k&&S&&k.email&&n.jsx(Wt,{open:S,onOpenChange:y,user:{...k,name:k.name??void 0,email:k.email},userImage:T}),e[66]=S,e[67]=k,e[68]=T,e[69]=we):we=e[69];let Ne;e[70]!==C?(Ne=n.jsx(bt,{open:C,onOpenChange:z}),e[70]=C,e[71]=Ne):Ne=e[71];let Te;return e[72]!==ve||e[73]!==we||e[74]!==Ne?(Te=n.jsxs(n.Fragment,{children:[ve,we,Ne]}),e[72]=ve,e[73]=we,e[74]=Ne,e[75]=Te):Te=e[75],Te}Ft.Skeleton=function({variant:e="light"}){const s=e==="dark";return n.jsxs("div",{className:_("flex items-center gap-1.5 h-7 px-1.5 w-full",s&&"text-white"),children:[n.jsx(de,{className:_("size-5 rounded-[5px] shrink-0",s&&"bg-zinc-800")}),n.jsx(de,{className:_("h-3.5 flex-1",s&&"bg-zinc-800")})]})};function Ke(t){const e=w.c(71),{onCreateProject:s}=t,{state:r,toggleSidebar:i}=Be(),l=r==="collapsed",[o,c]=He(),{locator:a}=ae();let d;e[0]!==a?(d=Ce.isOrgAdminProject(a),e[0]=a,e[1]=d):d=e[1];const f=!d;let u;e[2]!==c?(u=()=>{c(zn)},e[2]=c,e[3]=u):u=e[3];const p=u,x=f&&"bg-[#030302] border-b border-zinc-800";let h;e[4]!==x?(h=_("h-12 gap-0 pt-0 border-r",x),e[4]=x,e[5]=h):h=e[5];const b=l&&"group-hover/switcher:opacity-0 group-hover/switcher:pointer-events-none group-hover/switcher:invisible";let g;e[6]!==b?(g=_("w-full min-w-0 transition-opacity",b),e[6]=b,e[7]=g):g=e[7];const j=f?"dark":"light";let v;e[8]!==l||e[9]!==s||e[10]!==j?(v=n.jsx(Ft,{isCollapsed:l,variant:j,onCreateProject:s}),e[8]=l,e[9]=s,e[10]=j,e[11]=v):v=e[11];let S;e[12]!==g||e[13]!==v?(S=n.jsx("div",{className:g,children:v}),e[12]=g,e[13]=v,e[14]=S):S=e[14];const y=f?"hover:bg-zinc-800 text-zinc-400":"hover:bg-sidebar-accent",C=l?"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 z;e[15]!==y||e[16]!==C?(z=_("absolute inset-0 m-auto size-7 transition-opacity",y,C),e[15]=y,e[16]=C,e[17]=z):z=e[17];const O=!l,$=f?"text-zinc-400":"text-muted-foreground";let k;e[18]!==$?(k=_("size-4 shrink-0",$),e[18]=$,e[19]=k):k=e[19];let T;e[20]!==k?(T=n.jsx(zt,{className:k}),e[20]=k,e[21]=T):T=e[21];let P;e[22]!==z||e[23]!==O||e[24]!==T||e[25]!==i?(P=n.jsx(X,{variant:"ghost",size:"icon",className:z,onClick:i,"aria-label":"Expand sidebar",disabled:O,children:T}),e[22]=z,e[23]=O,e[24]=T,e[25]=i,e[26]=P):P=e[26];let E;e[27]!==P||e[28]!==S?(E=n.jsxs("div",{className:"group/switcher relative flex items-center justify-center gap-1.5 min-w-0 flex-1 overflow-hidden",children:[S,P]}),e[27]=P,e[28]=S,e[29]=E):E=e[29];const L=l&&"hidden";let A;e[30]!==L?(A=_("flex items-center gap-0.5 shrink-0",L),e[30]=L,e[31]=A):A=e[31];const M=f?"hover:bg-zinc-800 text-zinc-400 hover:text-white":"hover:bg-sidebar-accent";let B;e[32]!==M?(B=_("size-7",M),e[32]=M,e[33]=B):B=e[33];const Z=f?"text-zinc-400":"text-muted-foreground";let U;e[34]!==Z?(U=_("size-4",Z),e[34]=Z,e[35]=U):U=e[35];let R;e[36]!==U?(R=n.jsx(_t,{className:U}),e[36]=U,e[37]=R):R=e[37];let H;e[38]!==l||e[39]!==B||e[40]!==R||e[41]!==i?(H=n.jsx(Me,{asChild:!0,children:n.jsx(X,{variant:"ghost",size:"icon",className:B,onClick:i,"aria-label":"Collapse sidebar",disabled:l,children:R})}),e[38]=l,e[39]=B,e[40]=R,e[41]=i,e[42]=H):H=e[42];let W;e[43]===Symbol.for("react.memo_cache_sentinel")?(W=n.jsx(Ee,{side:"bottom",children:"Collapse sidebar"}),e[43]=W):W=e[43];let V;e[44]!==H?(V=n.jsxs(Ae,{children:[H,W]}),e[44]=H,e[45]=V):V=e[45];let K;e[46]!==o||e[47]!==f?(K=_("size-7",f?_("hover:bg-zinc-800 text-zinc-400 hover:text-white",o&&"bg-zinc-800 text-white"):_("hover:bg-sidebar-accent",o&&"bg-sidebar-accent")),e[46]=o,e[47]=f,e[48]=K):K=e[48];const se=f?"text-inherit":"text-muted-foreground";let q;e[49]!==se?(q=_(se),e[49]=se,e[50]=q):q=e[50];let F;e[51]!==q?(F=n.jsx(ut,{size:11,className:q}),e[51]=q,e[52]=F):F=e[52];let I;e[53]!==l||e[54]!==K||e[55]!==F||e[56]!==p?(I=n.jsx(Me,{asChild:!0,children:n.jsx(X,{variant:"ghost",size:"icon",className:K,onClick:p,"aria-label":"Toggle Decopilot",disabled:l,children:F})}),e[53]=l,e[54]=K,e[55]=F,e[56]=p,e[57]=I):I=e[57];let D;e[58]===Symbol.for("react.memo_cache_sentinel")?(D=n.jsx(Ee,{side:"bottom",children:"Toggle Decopilot"}),e[58]=D):D=e[58];let G;e[59]!==I?(G=n.jsxs(Ae,{children:[I,D]}),e[59]=I,e[60]=G):G=e[60];let Y;e[61]!==A||e[62]!==V||e[63]!==G?(Y=n.jsxs("div",{className:A,children:[V,G]}),e[61]=A,e[62]=V,e[63]=G,e[64]=Y):Y=e[64];let J;e[65]!==E||e[66]!==Y?(J=n.jsx(ye,{children:n.jsx(me,{children:n.jsxs("div",{className:"flex items-center justify-between w-full h-12",children:[E,Y]})})}),e[65]=E,e[66]=Y,e[67]=J):J=e[67];let ce;return e[68]!==J||e[69]!==h?(ce=n.jsx(Lt,{className:h,children:J}),e[68]=J,e[69]=h,e[70]=ce):ce=e[70],ce}function zn(t){return!t}Ke.Skeleton=function({isDark:e=!1}){return n.jsx(Lt,{className:_("h-12 gap-0 pt-0",e&&"bg-[#030302] border-b border-zinc-800"),children:n.jsx(ye,{children:n.jsx(me,{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(de,{className:_("size-5 rounded-[5px] shrink-0",e&&"bg-zinc-800")}),n.jsx(de,{className:_("h-3.5 w-16",e&&"bg-zinc-800")})]}),n.jsxs("div",{className:"flex items-center gap-0.5",children:[n.jsx(de,{className:_("size-7 rounded-lg",e&&"bg-zinc-800")}),n.jsx(de,{className:_("size-7 rounded-lg",e&&"bg-zinc-800")})]})]})})})})};function $n(){const t=w.c(10),{locator:e}=ae(),s=ke(),i=Re().location.pathname;let l;t[0]!==i?(l=i.includes("/settings"),t[0]=i,t[1]=l):l=t[1];const o=l;let c;t[2]!==e||t[3]!==s?(c=()=>{s({to:"/$org/$project/settings",params:Ce.parse(e)})},t[2]=e,t[3]=s,t[4]=c):c=t[4];const a=c;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(et,{})}),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]!==a||t[8]!==o?(f=n.jsx(fn,{className:"py-2 border-r",children:n.jsx(ye,{children:n.jsx(me,{children:n.jsxs(Ue,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:a,isActive:o,tooltip:"Settings",children:[d,m]})})})}),t[7]=a,t[8]=o,t[9]=f):f=t[9],f}function Vt(t){const e=w.c(4),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Dt,{className:"my-2 -ml-1"}),e[0]=r):r=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(me,{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]=i):i=e[1];let l;return e[2]!==s?(l=n.jsxs(n.Fragment,{children:[r,i,s]}),e[2]=s,e[3]=l):l=e[3],l}function In(t){const e=w.c(26),{item:s}=t,r=ke(),{org:i}=ae(),l=vt(i.id),o=Ds(i.id);let c;e[0]!==o.update||e[1]!==s.url||e[2]!==l?.sidebar_items?(c=async()=>{const S=(l?.sidebar_items||[]).filter(y=>y.url!==s.url);await o.update.mutateAsync({sidebar_items:S})},e[0]=o.update,e[1]=s.url,e[2]=l?.sidebar_items,e[3]=c):c=e[3];const a=c;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(Rs,{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 b;e[16]!==h?(b=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]=b):b=e[17];let g;e[18]!==a?(g=n.jsx(Le,{size:16,className:"text-muted-foreground opacity-0 group-hover/item:opacity-50 hover:opacity-100 cursor-pointer",onClick:v=>{v.preventDefault(),v.stopPropagation(),a()}}),e[18]=a,e[19]=g):g=e[19];let j;return e[20]!==s.title||e[21]!==u||e[22]!==x||e[23]!==b||e[24]!==g?(j=n.jsx(me,{children:n.jsxs(Ue,{className:"w-full pr-2 group/item relative cursor-pointer text-foreground/90 hover:text-foreground",onClick:u,tooltip:p,children:[x,b,g]})}),e[20]=s.title,e[21]=u,e[22]=x,e[23]=b,e[24]=g,e[25]=j):j=e[25],j}function lt(){const t=w.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(me,{children:n.jsx("div",{className:"flex items-center gap-2 px-4 py-2",children:n.jsx(de,{className:"h-4 flex-1"})})}),t[0]=e):e=t[0],e}function On(){const t=w.c(4),{org:e}=ae(),r=vt(e.id)?.sidebar_items;if(!r?.length)return null;let i;t[0]!==r?(i=r.map(Tn),t[0]=r,t[1]=i):i=t[1];let l;return t[2]!==i?(l=n.jsx(Vt,{children:i}),t[2]=i,t[3]=l):l=t[3],l}function Tn(t){return n.jsx(In,{item:t},t.url)}function Pn(){const t=w.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(N.Suspense,{fallback:n.jsxs(Vt,{children:[n.jsx(lt,{}),n.jsx(lt,{})]}),children:n.jsx(On,{})}),t[0]=e):e=t[0],e}function En(t){const e=w.c(15),{onCreateProject:s}=t,r=Xs(),{locator:i}=ae();let l;e[0]!==i?(l=Ce.isOrgAdminProject(i),e[0]=i,e[1]=l):l=e[1];const o=l;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Ke.Skeleton,{}),e[2]=c):c=e[2];let a;e[3]!==s?(a=n.jsx(N.Suspense,{fallback:c,children:n.jsx(Ke,{onCreateProject:s})}),e[3]=s,e[4]=a):a=e[4];let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx($n,{}),e[5]=d):d=e[5];let m;e[6]!==o?(m=o?null:n.jsx(Pn,{}),e[6]=o,e[7]=m):m=e[7];let f;e[8]!==m?(f=n.jsx(xt,{children:n.jsx(N.Suspense,{fallback:null,children:m})}),e[8]=m,e[9]=f):f=e[9];const u=o?void 0:"pt-3";let p;return e[10]!==r||e[11]!==a||e[12]!==f||e[13]!==u?(p=n.jsx(Ut,{sections:r,header:a,footer:d,additionalContent:f,contentClassName:u}),e[10]=r,e[11]=a,e[12]=f,e[13]=u,e[14]=p):p=e[14],p}function Mn(t){const e=w.c(12);let s,r,i,l;e[0]!==t?({className:s,orientation:i,decorative:l,...r}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=i,e[4]=l):(s=e[1],r=e[2],i=e[3],l=e[4]);const o=i===void 0?"horizontal":i,c=l===void 0?!0:l;let a;e[5]!==s?(a=_("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]=a):a=e[6];let d;return e[7]!==c||e[8]!==o||e[9]!==r||e[10]!==a?(d=n.jsx(ns,{"data-slot":"separator-root",decorative:c,orientation:o,className:a,...r}),e[7]=c,e[8]=o,e[9]=r,e[10]=a,e[11]=d):d=e[11],d}const Gt=N.createContext(null);function An(){const t=N.useContext(Gt);if(!t)throw new Error("TopbarSwitcher compound components must be used within TopbarSwitcher.Root");return t}function Ln(t){const e=w.c(10),{children:s,onItemHover:r}=t,[i,l]=N.useState(null);let o;e[0]!==r?(o=f=>{l(f),r?.(f)},e[0]=r,e[1]=o):o=e[1];const c=o;let a;e[2]!==i||e[3]!==c?(a={hoveredItem:i,setHoveredItem:c},e[2]=i,e[3]=c,e[4]=a):a=e[4];let d;e[5]!==s?(d=n.jsx(Je,{children:s}),e[5]=s,e[6]=d):d=e[6];let m;return e[7]!==a||e[8]!==d?(m=n.jsx(Gt.Provider,{value:a,children:d}),e[7]=a,e[8]=d,e[9]=m):m=e[9],m}function Dn(t){const e=w.c(6),{children:s,onClick:r}=t;let i;e[0]!==s||e[1]!==r?(i=n.jsx(X,{variant:"link",className:"p-0.5 h-auto",onClick:r,type:"button",children:s}),e[0]=s,e[1]=r,e[2]=i):i=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Xe,{asChild:!0,children:n.jsx(X,{size:"icon",variant:"ghost",className:"w-6 h-6 p-0",children:n.jsx(ft,{size:16,className:"opacity-50"})})}),e[3]=l):l=e[3];let o;return e[4]!==i?(o=n.jsxs("div",{className:"flex items-center gap-1",children:[i,l]}),e[4]=i,e[5]=o):o=e[5],o}function Rn(t){const e=w.c(8),{item:s,fallback:r}=t,i=r===void 0?"":r,l=s?.avatarUrl??"",o=s?.name??i;let c;e[0]!==l||e[1]!==o?(c=n.jsx(oe,{url:l,fallback:o,size:"xs",objectFit:"contain"}),e[0]=l,e[1]=o,e[2]=c):c=e[2];const a=s?.name??i;let d;e[3]!==a?(d=n.jsx("span",{children:a}),e[3]=a,e[4]=d):d=e[4];let m;return e[5]!==c||e[6]!==d?(m=n.jsxs("div",{className:"flex items-center gap-2",children:[c,d]}),e[5]=c,e[6]=d,e[7]=m):m=e[7],m}function Hn(t){const e=w.c(6),{children:s,align:r}=t,i=r===void 0?"start":r,o=N.Children.toArray(s).filter(Bn).length===1?"280px":"480px";let c;e[0]!==o?(c={width:o},e[0]=o,e[1]=c):c=e[1];let a;return e[2]!==i||e[3]!==s||e[4]!==c?(a=n.jsx(Qe,{align:i,className:"p-0 flex items-start",style:c,children:s}),e[2]=i,e[3]=s,e[4]=c,e[5]=a):a=e[5],a}function Bn(t){return N.isValidElement(t)&&(t.type===Kt||t.type===Zt)}function Zt(t){const e=w.c(5),{children:s,className:r}=t;let i;e[0]!==r?(i=_("flex flex-col border-border w-[240px] border-r last:border-r-0 last:w-full",r),e[0]=r,e[1]=i):i=e[1];let l;return e[2]!==s||e[3]!==i?(l=n.jsx("div",{className:i,children:s}),e[2]=s,e[3]=i,e[4]=l):l=e[4],l}const Kt=Zt;function Un(t){const e=w.c(6),{placeholder:s,value:r,onChange:i}=t,l=s===void 0?"Search...":s;let o;e[0]!==i?(o=a=>i(a.target.value),e[0]=i,e[1]=o):o=e[1];let c;return e[2]!==l||e[3]!==o||e[4]!==r?(c=n.jsx(Hs,{placeholder:l,value:r,onChange:o,className:"rounded-none border-t-0 border-x-0 focus-visible:border-border focus-visible:ring-0"}),e[2]=l,e[3]=o,e[4]=r,e[5]=c):c=e[5],c}function Wn(t){const e=w.c(6),{children:s,emptyMessage:r}=t,i=r===void 0?"No items found.":r,l=N.Children.count(s)>0;let o;e[0]!==i||e[1]!==l?(o=!l&&n.jsx("div",{className:"text-muted-foreground text-sm px-1 py-8 text-center",children:i}),e[0]=i,e[1]=l,e[2]=o):o=e[2];let c;return e[3]!==s||e[4]!==o?(c=n.jsxs("div",{className:"flex flex-col gap-0.5 p-1 max-h-44 overflow-y-auto",children:[o,s]}),e[3]=s,e[4]=o,e[5]=c):c=e[5],c}function Fn(t){const e=w.c(15),{item:s,onClick:r,onHover:i,children:l}=t,o=An();let c;e[0]!==o||e[1]!==s||e[2]!==i?(c=()=>{o.setHoveredItem(s.slug),i?.(s)},e[0]=o,e[1]=s,e[2]=i,e[3]=c):c=e[3];const a=c;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]!==l||e[8]!==s.avatarUrl||e[9]!==s.name?(m=l||n.jsxs(n.Fragment,{children:[n.jsx(oe,{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]=l,e[8]=s.avatarUrl,e[9]=s.name,e[10]=m):m=e[10];let f;return e[11]!==a||e[12]!==d||e[13]!==m?(f=n.jsx(X,{onClick:d,onMouseEnter:a,variant:"ghost",size:"sm",className:"w-full justify-start font-normal",children:m}),e[11]=a,e[12]=d,e[13]=m,e[14]=f):f=e[14],f}function Vn(t){const e=w.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 Gn(t){const e=w.c(11),{onClick:s,icon:r,children:i,variant:l}=t,c=(l===void 0?"default":l)==="muted"&&"text-muted-foreground";let a;e[0]!==c?(a=_("w-full justify-start font-normal",c),e[0]=c,e[1]=a):a=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]!==i?(m=n.jsx("span",{children:i}),e[4]=i,e[5]=m):m=e[5];let f;return e[6]!==s||e[7]!==a||e[8]!==d||e[9]!==m?(f=n.jsxs(X,{variant:"ghost",size:"sm",className:a,onClick:s,children:[d,m]}),e[6]=s,e[7]=a,e[8]=d,e[9]=m,e[10]=f):f=e[10],f}function Zn(){const t=w.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Mn,{}),t[0]=e):e=t[0],e}function Kn(){const t=w.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 ee=Object.assign(Ln,{Trigger:Dn,CurrentItem:Rn,Content:Hn,Panel:Kt,Search:Un,Items:Wn,Item:Fn,Actions:Vn,Action:Gn,Separator:Zn,Skeleton:Kn});function Ye(){const t=w.c(59);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:s}=qe(e),{data:r}=re.useListOrganizations(),i=ke();let l;t[1]!==s||t[2]!==r?(l=r?.find(L=>L.slug===s),t[1]=s,t[2]=r,t[3]=l):l=t[3];const o=l,[c,a]=N.useState(""),[d,m]=N.useState(!1);let f,u,p,x,h,b,g,j;if(t[4]!==o||t[5]!==i||t[6]!==s||t[7]!==c||t[8]!==r){const A=(r?(()=>{const H=r.filter(W=>W.name.toLowerCase().includes(c.toLowerCase()));if(s){const W=H.findIndex(V=>V.slug===s);if(W>0){const V=H[W];V&&(H.splice(W,1),H.unshift(V))}}return H})():[]).map(Yn);let M;t[17]!==o?(M=o?{slug:o.slug,name:o.name,avatarUrl:o.logo}:void 0,t[17]=o,t[18]=M):M=t[18];const B=M;x=ee;let Z;t[19]!==i||t[20]!==s?(Z=()=>i({to:"/$org",params:{org:s??""}}),t[19]=i,t[20]=s,t[21]=Z):Z=t[21];let U;t[22]!==B?(U=n.jsx(ee.CurrentItem,{item:B}),t[22]=B,t[23]=U):U=t[23],t[24]!==Z||t[25]!==U?(j=n.jsx(ee.Trigger,{onClick:Z,children:U}),t[24]=Z,t[25]=U,t[26]=j):j=t[26],p=ee.Content,u=ee.Panel,t[27]!==c?(g=n.jsx(ee.Search,{placeholder:"Search organizations...",value:c,onChange:a}),t[27]=c,t[28]=g):g=t[28],f=ee.Items,h="No organizations found.";let R;t[29]!==i?(R=H=>n.jsx(ee.Item,{item:H,onClick:W=>i({to:"/$org",params:{org:W.slug}})},H.slug),t[29]=i,t[30]=R):R=t[30],b=A.map(R),t[4]=o,t[5]=i,t[6]=s,t[7]=c,t[8]=r,t[9]=f,t[10]=u,t[11]=p,t[12]=x,t[13]=h,t[14]=b,t[15]=g,t[16]=j}else f=t[9],u=t[10],p=t[11],x=t[12],h=t[13],b=t[14],g=t[15],j=t[16];let v;t[31]!==f||t[32]!==h||t[33]!==b?(v=n.jsx(f,{emptyMessage:h,children:b}),t[31]=f,t[32]=h,t[33]=b,t[34]=v):v=t[34];let S,y;t[35]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(ee.Actions,{children:n.jsx(ee.Action,{onClick:()=>m(!0),variant:"muted",children:"+ Create organization"})}),y=n.jsx(ee.Separator,{}),t[35]=S,t[36]=y):(S=t[35],y=t[36]);let C;t[37]!==i?(C=()=>i({to:"/"}),t[37]=i,t[38]=C):C=t[38];let z;t[39]===Symbol.for("react.memo_cache_sentinel")?(z=n.jsx(Bs,{}),t[39]=z):z=t[39];let O;t[40]!==C?(O=n.jsx(ee.Actions,{children:n.jsx(ee.Action,{onClick:C,icon:z,children:"See all organizations"})}),t[40]=C,t[41]=O):O=t[41];let $;t[42]!==u||t[43]!==O||t[44]!==g||t[45]!==v?($=n.jsxs(u,{children:[g,v,S,y,O]}),t[42]=u,t[43]=O,t[44]=g,t[45]=v,t[46]=$):$=t[46];let k;t[47]!==p||t[48]!==$?(k=n.jsx(p,{children:$}),t[47]=p,t[48]=$,t[49]=k):k=t[49];let T;t[50]!==x||t[51]!==k||t[52]!==j?(T=n.jsxs(x,{children:[j,k]}),t[50]=x,t[51]=k,t[52]=j,t[53]=T):T=t[53];let P;t[54]!==d?(P=n.jsx(bt,{open:d,onOpenChange:m}),t[54]=d,t[55]=P):P=t[55];let E;return t[56]!==T||t[57]!==P?(E=n.jsxs(n.Fragment,{children:[T,P]}),t[56]=T,t[57]=P,t[58]=E):E=t[58],E}function Yn(t){return{slug:t.slug,name:t.name,avatarUrl:t.logo}}Ye.Skeleton=ee.Skeleton;function We(t){const e=w.c(10),{left:s,center:r,right:i}=t,{locator:l}=ae();if(Ce.isOrgAdminProject(l))return null;let c;e[0]!==s?(c=n.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:s}),e[0]=s,e[1]=c):c=e[1];let a;e[2]!==r?(a=r&&n.jsx("div",{className:"flex flex-1 h-full items-center justify-center px-4 min-w-0",children:r}),e[2]=r,e[3]=a):a=e[3];let d;e[4]!==i?(d=i&&n.jsx("div",{className:"flex flex-1 gap-2 h-full items-center justify-end min-w-0",children:i}),e[4]=i,e[5]=d):d=e[5];let m;return e[6]!==c||e[7]!==a||e[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:[c,a,d]})}),e[6]=c,e[7]=a,e[8]=d,e[9]=m):m=e[9],m}We.Left=function({children:e}){return n.jsx("div",{className:"flex items-center gap-2",children:e})};We.Center=function({children:e}){return n.jsx("div",{className:"flex-1 flex justify-center",children:e})};We.Right=function({children:e}){return n.jsx("div",{className:"flex items-center gap-2",children:e})};function qn({prop:t,defaultProp:e,onChange:s=()=>{}}){const[r,i]=Jn({defaultProp:e,onChange:s}),l=t!==void 0,o=l?t:r,c=at(s),a=N.useCallback(d=>{if(l){const f=typeof d=="function"?d(t):d;f!==t&&c(f)}else i(d)},[l,t,i,c]);return[o,a]}function Jn({defaultProp:t,onChange:e}){const s=N.useState(t),[r]=s,i=N.useRef(r),l=at(e);return N.useEffect(()=>{i.current!==r&&(l(r),i.current=r)},[r,i,l]),s}function Xn(t){const e=w.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 Qn(t){const e=w.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 er(t){const e=w.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 tr(t){const e=w.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 i;e[3]!==s?(i=_("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]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx(_e.Overlay,{"data-slot":"drawer-overlay",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function sr(t){const e=w.c(12);let s,r,i;e[0]!==t?({className:r,children:s,...i}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=i):(s=e[1],r=e[2],i=e[3]);let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(tr,{}),e[4]=l):l=e[4];let o;e[5]!==r?(o=_("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]=o):o=e[6];let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=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]=c):c=e[7];let a;return e[8]!==s||e[9]!==i||e[10]!==o?(a=n.jsxs(er,{"data-slot":"drawer-portal",children:[l,n.jsxs(_e.Content,{"data-slot":"drawer-content",className:o,...i,children:[c,s]})]}),e[8]=s,e[9]=i,e[10]=o,e[11]=a):a=e[11],a}function nr(t){const e=w.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 i;e[3]!==s?(i=_("flex flex-col gap-1.5 px-4 py-2",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx("div",{"data-slot":"drawer-header",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}function rr(t){const e=w.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 i;e[3]!==s?(i=_("text-foreground font-semibold",s),e[3]=s,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==i?(l=n.jsx(_e.Title,{"data-slot":"drawer-title",className:i,...r}),e[5]=r,e[6]=i,e[7]=l):l=e[7],l}const Yt=N.createContext({setOpen:()=>{}}),ir=()=>N.useContext(Yt),lr=t=>{const e=w.c(25);let s,r,i,l,o;e[0]!==t?({children:s,defaultOpen:r,open:l,onOpenChange:i,...o}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=i,e[4]=l,e[5]=o):(s=e[1],r=e[2],i=e[3],l=e[4],o=e[5]);const c=r??!1;let a;e[6]!==i||e[7]!==l||e[8]!==c?(a={prop:l,defaultProp:c,onChange:i},e[6]=i,e[7]=l,e[8]=c,e[9]=a):a=e[9];const[d,m]=qn(a);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]!==o||e[15]!==m?(u=n.jsx(Xn,{open:d,onOpenChange:m,...o,children:s}),e[12]=s,e[13]=d,e[14]=o,e[15]=m,e[16]=u):u=e[16];let p;e[17]!==d||e[18]!==o||e[19]!==m||e[20]!==u?(p=n.jsx(Fs,{open:d,onOpenChange:m,...o,children:u}),e[17]=d,e[18]=o,e[19]=m,e[20]=u,e[21]=p):p=e[21];let x;return e[22]!==f||e[23]!==p?(x=n.jsx(Yt.Provider,{value:f,children:p}),e[22]=f,e[23]=p,e[24]=x):x=e[24],x},or=t=>{const{children:e,title:s,...r}=t,i=$e(),{className:l,...o}=r;return i?n.jsxs(sr,{...o,children:[n.jsx(nr,{className:"hidden",children:n.jsx(rr,{children:s})}),n.jsx("div",{className:_("flex flex-col gap-2 p-2 py-4",l),children:e})]}):n.jsx(Ws,{...r,children:e})},ar=t=>{const{children:e,...s}=t,{setOpen:r}=ir(),i=$e(),{className:l,...o}=s;return i?n.jsx("div",{...o,onClick:c=>{r(!1);const{onClick:a}=o;a?.(c)},className:_("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",l),children:e}):n.jsx(Vs,{...s,children:e})},cr=t=>{const e=w.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 i=$e();let l;return e[3]!==s||e[4]!==i||e[5]!==r?(l=i?n.jsx(Qn,{asChild:!0,children:s}):n.jsx(Us,{...r,children:s}),e[3]=s,e[4]=i,e[5]=r,e[6]=l):l=e[6],l},dr=t=>{const e=w.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 i=$e();let l;return e[3]!==s||e[4]!==i||e[5]!==r?(l=i?n.jsx(rt,{className:_(s),...r}):n.jsx(rt,{className:_(s),...r}),e[3]=s,e[4]=i,e[5]=r,e[6]=l):l=e[6],l};function mr(t){const e=w.c(11),{user:s,trigger:r,align:i,children:l}=t,o=i===void 0?"start":i;let c;e[0]!==r||e[1]!==s?(c=r(s),e[0]=r,e[1]=s,e[2]=c):c=e[2];let a;e[3]!==c?(a=n.jsx(cr,{asChild:!0,children:n.jsx("div",{children:c})}),e[3]=c,e[4]=a):a=e[4];let d;e[5]!==o||e[6]!==l?(d=n.jsx(or,{side:"top",align:o,className:"md:w-[240px]",children:l}),e[5]=o,e[6]=l,e[7]=d):d=e[7];let m;return e[8]!==a||e[9]!==d?(m=n.jsxs(lr,{children:[a,d]}),e[8]=a,e[9]=d,e[10]=m):m=e[10],m}function fr(t){const e=w.c(8),{children:s,onClick:r,className:i,asChild:l}=t;let o;e[0]!==l||e[1]!==s||e[2]!==r?(o=l?s:n.jsx("button",{type:"button",className:"flex items-center gap-2 text-sm w-full cursor-pointer",onClick:r,children:s}),e[0]=l,e[1]=s,e[2]=r,e[3]=o):o=e[3];let c;return e[4]!==l||e[5]!==i||e[6]!==o?(c=n.jsx(ar,{asChild:l,className:i,children:o}),e[4]=l,e[5]=i,e[6]=o,e[7]=c):c=e[7],c}function ur(t){const e=w.c(2),{className:s}=t;let r;return e[0]!==s?(r=n.jsx(dr,{className:s}),e[0]=s,e[1]=r):r=e[1],r}function pr(){const t=w.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 le=Object.assign(mr,{Item:fr,Separator:ur,Skeleton:pr});function hr(t){const e=w.c(47),{user:s,userImage:r}=t,[i,l]=N.useState(!1),[o,c]=N.useState(!1);let a;e[0]!==s.email||e[1]!==s.id||e[2]!==s.name?(a=()=>{const M=`ID: ${s.id}
|
|
4
|
-
Name: ${s.name||"N/A"}
|
|
5
|
-
Email: ${s.email}`;navigator.clipboard.writeText(M),c(!0),ie.success("User info copied to clipboard"),setTimeout(()=>c(!1),2e3)},e[0]=s.email,e[1]=s.id,e[2]=s.name,e[3]=a):a=e[3];const d=a;let m;e[4]!==s.email||e[5]!==s.name||e[6]!==r?(m=()=>n.jsx(oe,{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(oe,{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 b;e[15]!==x||e[16]!==h?(b=n.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[x,h]}),e[15]=x,e[16]=h,e[17]=b):b=e[17];let g;e[18]!==o?(g=n.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:o?n.jsx(De,{size:16,className:"text-green-600"}):n.jsx(jt,{size:16,className:"text-muted-foreground"})}),e[18]=o,e[19]=g):g=e[19];let j;e[20]!==u||e[21]!==b||e[22]!==g?(j=n.jsxs("div",{className:"group flex items-center gap-3 w-full py-1",children:[u,b,g]}),e[20]=u,e[21]=b,e[22]=g,e[23]=j):j=e[23];let v;e[24]!==d||e[25]!==j?(v=n.jsx(le.Item,{onClick:d,children:j}),e[24]=d,e[25]=j,e[26]=v):v=e[26];let S;e[27]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(le.Separator,{}),e[27]=S):S=e[27];let y,C;e[28]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsxs(le.Item,{onClick:()=>l(!0),children:[n.jsx(Gs,{className:"text-muted-foreground",size:18}),"Profile Settings"]}),C=n.jsx(le.Separator,{}),e[28]=y,e[29]=C):(y=e[28],C=e[29]);let z;e[30]===Symbol.for("react.memo_cache_sentinel")?(z=n.jsx(ot,{className:"w-4 h-4 text-muted-foreground"}),e[30]=z):z=e[30];let O;e[31]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(le.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:[z,"decocms/admin",n.jsx(it,{size:18,className:"text-muted-foreground ml-auto"})]})}),e[31]=O):O=e[31];let $;e[32]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx(It,{className:"text-muted-foreground",size:18}),e[32]=$):$=e[32];let k,T;e[33]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(le.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:[$,"Homepage",n.jsx(it,{size:18,className:"ml-auto text-muted-foreground"})]})}),T=n.jsx(le.Separator,{}),e[33]=k,e[34]=T):(k=e[33],T=e[34]);let P;e[35]===Symbol.for("react.memo_cache_sentinel")?(P=n.jsxs(le.Item,{onClick:xr,children:[n.jsx(Tt,{size:18,className:"text-muted-foreground"}),"Log out"]}),e[35]=P):P=e[35];let E;e[36]!==v||e[37]!==m||e[38]!==s?(E=n.jsxs(le,{user:s,trigger:m,align:"end",children:[v,S,y,C,O,k,T,P]}),e[36]=v,e[37]=m,e[38]=s,e[39]=E):E=e[39];let L;e[40]!==i||e[41]!==s||e[42]!==r?(L=i&&n.jsx(Wt,{open:i,onOpenChange:l,user:s,userImage:r}),e[40]=i,e[41]=s,e[42]=r,e[43]=L):L=e[43];let A;return e[44]!==E||e[45]!==L?(A=n.jsxs(n.Fragment,{children:[E,L]}),e[44]=E,e[45]=L,e[46]=A):A=e[46],A}function xr(){return re.signOut()}function gr(){const t=w.c(7),{data:e}=re.useSession();if(!e?.user){let a;return t[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(oe,{url:void 0,fallback:"U",shape:"circle",size:"sm",className:"cursor-pointer h-7 w-7",muted:!0}),t[0]=a):a=t[0],a}const s=e.user,r=s.name??void 0;let i;t[1]!==r||t[2]!==s?(i={...s,name:r},t[1]=r,t[2]=s,t[3]=i):i=t[3];const l=i,o=s.image;let c;return t[4]!==o||t[5]!==l?(c=n.jsx(hr,{user:l,userImage:o}),t[4]=o,t[5]=l,t[6]=c):c=t[6],c}function br(){const t=w.c(2),s=Re().location.href;let r;return t[0]!==s?(r=n.jsx(os,{to:"/login",search:{next:s},replace:!0}),t[0]=s,t[1]=r):r=t[1],r}function jr(t){const e=w.c(6),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(rs,{children:n.jsx(ct,{})}),e[0]=r):r=e[0];let i;e[1]!==s?(i=n.jsx(is,{children:s}),e[1]=s,e[2]=i):i=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(ls,{children:n.jsx(br,{})}),e[3]=l):l=e[3];let o;return e[4]!==i?(o=n.jsxs(n.Fragment,{children:[r,i,l]}),e[4]=i,e[5]=o):o=e[5],o}function vr(t){const e=w.c(5),{children:s,className:r}=t;let i;e[0]!==r?(i=_("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]=i):i=e[1];let l;return e[2]!==s||e[3]!==i?(l=n.jsx("div",{className:i,children:s}),e[2]=s,e[3]=i,e[4]=l):l=e[4],l}function wr(t){const e=w.c(5),{children:s,className:r}=t;let i;e[0]!==r?(i=_("flex items-center justify-center px-2.5 h-full border-r border-border",r),e[0]=r,e[1]=i):i=e[1];let l;return e[2]!==s||e[3]!==i?(l=n.jsx("div",{className:i,children:s}),e[2]=s,e[3]=i,e[4]=l):l=e[4],l}function Nr(t){const e=w.c(5),{children:s,className:r}=t;let i;e[0]!==r?(i=_("flex items-center gap-2 px-2 h-full",r),e[0]=r,e[1]=i):i=e[1];let l;return e[2]!==s||e[3]!==i?(l=n.jsx("div",{className:i,children:s}),e[2]=s,e[3]=i,e[4]=l):l=e[4],l}function Sr(t){const e=w.c(5),{children:s,className:r}=t;let i;e[0]!==r?(i=_("flex items-center gap-2 px-2 h-full flex-1",r),e[0]=r,e[1]=i):i=e[1];let l;return e[2]!==s||e[3]!==i?(l=n.jsx("div",{className:i,children:s}),e[2]=s,e[3]=i,e[4]=l):l=e[4],l}function Cr(t){const e=w.c(5),{children:s,className:r}=t;let i;e[0]!==r?(i=_("flex items-center gap-2 px-2 h-full ml-auto",r),e[0]=r,e[1]=i):i=e[1];let l;return e[2]!==s||e[3]!==i?(l=n.jsx("div",{className:i,children:s}),e[2]=s,e[3]=i,e[4]=l):l=e[4],l}function yr(){const t=w.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 Pe=Object.assign(vr,{Sidebar:wr,Left:Nr,Center:Sr,Right:Cr,Skeleton:yr});function qt(){const t=w.c(3),{toggleSidebar:e}=Be();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(Ot,{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(X,{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}qt.Skeleton=function(){return n.jsx("div",{className:"w-7 h-7 bg-muted rounded-md animate-pulse"})};function kr({showSidebarToggle:t=!1,showOrgSwitcher:e=!1,showDecoChat:s=!1,disableDecoChat:r=!1}){const[i,l]=He(),o=N.useRef(r);r&&i&&o.current!==r&&l(!1),o.current=r;const c=()=>{r||l(a=>!a)};return n.jsxs(Pe,{children:[t&&n.jsx(Pe.Sidebar,{children:n.jsx(qt,{})}),n.jsx(Pe.Left,{children:e&&n.jsx(N.Suspense,{fallback:n.jsx(Ye.Skeleton,{}),children:n.jsx(Ye,{})})}),n.jsxs(Pe.Right,{className:"gap-2",children:[s&&!r&&n.jsxs(X,{size:"sm",variant:"default",onClick:c,className:"h-7 gap-2",children:[n.jsx(ut,{size:16}),"Chat"]}),n.jsx(gr,{})]})]})}function _r(t){const e=w.c(10),{children:s,className:r}=t,[,i]=N.useTransition();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=Nt.decoChatPanelWidth(),e[0]=l):l=e[0];const[o,c]=wt(l,30);let a;e[1]!==c?(a=u=>i(()=>c(u)),e[1]=c,e[2]=a):a=e[2];const d=a;let m;e[3]!==r?(m=_("min-w-0",r),e[3]=r,e[4]=m):m=e[4];let f;return e[5]!==o||e[6]!==s||e[7]!==d||e[8]!==m?(f=n.jsx(St,{defaultSize:o,minSize:20,className:m,onResize:d,children:s}),e[5]=o,e[6]=s,e[7]=d,e[8]=m,e[9]=f):f=e[9],f}function zr(t){const e=w.c(5),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=Nt.sidebarOpen(),e[0]=r):r=e[0];const[i,l]=wt(r,!0);let o;return e[1]!==s||e[2]!==l||e[3]!==i?(o=n.jsx(ln,{open:i,onOpenChange:l,children:s}),e[1]=s,e[2]=l,e[3]=i,e[4]=o):o=e[4],o}function $r(t){const e=w.c(6),{disableChat:s}=t,r=s===void 0?!1:s,[i]=He();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(St,{className:"bg-background",children:n.jsx(dt,{})}),e[0]=l):l=e[0];let o;e[1]!==i||e[2]!==r?(o=!r&&n.jsxs(n.Fragment,{children:[n.jsx(Zs,{withHandle:i}),n.jsx(_r,{className:_(i?"max-w-none":"max-w-0"),children:n.jsx(qs,{})})]}),e[1]=i,e[2]=r,e[3]=o):o=e[3];let c;return e[4]!==o?(c=n.jsxs(Ks,{direction:"horizontal",children:[l,o]}),e[4]=o,e[5]=c):c=e[5],c}function Ir(){const{org:t,project:e}=qe({strict:!1}),s=Re(),[r,i]=N.useState(!1),l=s.location.pathname===`/${t}/${e}`||s.location.pathname===`/${t}/${e}/`,o=e??ne,{data:c}=as({queryKey:cs.activeOrganization(t),queryFn:async()=>{if(!t)return null;const{data:d}=await re.organization.setActive({organizationSlug:t});return{org:d,project:{slug:o,isOrgAdmin:o===ne}}},gcTime:1/0,staleTime:1/0,refetchOnWindowFocus:!1,refetchOnMount:!1});if(!c)return n.jsxs("div",{className:"min-h-screen bg-background",children:[n.jsx(kr,{}),n.jsx("div",{className:"pt-12",children:n.jsx(dt,{})})]});if(!c.org)return window.location.pathname!=="/"&&(window.location.href="/"),null;const a={...c,project:{...c.project,slug:o,isOrgAdmin:o===ne}};return n.jsxs(ds,{...a,children:[n.jsx(zr,{children:n.jsxs("div",{className:"flex flex-col h-screen",style:{"--project-topbar-height":o===ne?"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(te.Provider,{children:n.jsxs(cn,{className:"flex-1 bg-sidebar",style:{"--sidebar-width":"13rem","--sidebar-width-mobile":"11rem"},children:[n.jsx(En,{onCreateProject:()=>i(!0)}),n.jsxs(mn,{className:"flex flex-col",children:[n.jsx(We,{}),n.jsx("div",{className:"flex-1 overflow-hidden",children:n.jsx($r,{disableChat:l})})]})]})})]})}),n.jsx(ys,{open:r,onOpenChange:i})]})}function Fi(){const t=w.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(jr,{children:n.jsx(N.Suspense,{fallback:n.jsx(ct,{}),children:n.jsx(Ir,{})})}),t[0]=e):e=t[0],e}export{Fi as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as u}from"./infiniteQueryObserver-VnhrjjoH.js";import{a5 as i}from"./index-Bn2rDd42.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-Bn2rDd42.js";function o(e,r){return u(e,s,r)}export{o as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ac as a,ad as c}from"./index-Bn2rDd42.js";function e(...r){return a(c(r))}export{e as c};
|