@decocms/mesh 2.59.2 → 2.59.4
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--GzH2vta.js → AlertCircle-DcHEglIM.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DzpTEYvO.js → ArrowLeft-Dlm4CF9d.js} +1 -1
- package/dist/client/assets/{ArrowUp-BfBrilbk.js → ArrowUp-CC-2uYGu.js} +1 -1
- package/dist/client/assets/Calendar-PdB3o_9d.js +1 -0
- package/dist/client/assets/{Check-CXkamnnr.js → Check-BzMGOxMB.js} +1 -1
- package/dist/client/assets/{ChevronDown-DaqG_J6Z.js → ChevronDown-BV0rwdFr.js} +1 -1
- package/dist/client/assets/{Code01-BNQVP8-g.js → Code01-KWN4ist8.js} +1 -1
- package/dist/client/assets/{Copy01-CpBgXJFP.js → Copy01-DH_iV9-n.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-BDAFctKq.js → DotsHorizontal-CFL9xkGv.js} +1 -1
- package/dist/client/assets/{DotsVertical-D5MnD2QZ.js → DotsVertical-DOgWrY6o.js} +1 -1
- package/dist/client/assets/{Download01-4Tu3o0-K.js → Download01-npnn9kWB.js} +1 -1
- package/dist/client/assets/{Edit01-7Ak8JL9W.js → Edit01-CH6U7DHj.js} +1 -1
- package/dist/client/assets/File02-Cuc-ZPtg.js +1 -0
- package/dist/client/assets/{File06-C7QVLRp6.js → File06-BUwGdOjl.js} +1 -1
- package/dist/client/assets/{FilterLines-UNZ5Kk_X.js → FilterLines-ia0H5bBk.js} +1 -1
- package/dist/client/assets/{Grid01-C_dMOr-7.js → Grid01-DmaR0g3f.js} +1 -1
- package/dist/client/assets/{Home02-Cfg1gm8U.js → Home02-Cagj2miO.js} +1 -1
- package/dist/client/assets/{Image01-C6IcS9Ip.js → Image01-BCcbzsoK.js} +1 -1
- package/dist/client/assets/{Inbox01-D1IW7Je7.js → Inbox01-DoVQ3gCk.js} +1 -1
- package/dist/client/assets/{InfoCircle-Dwuc2RiH.js → InfoCircle-qTETvFXb.js} +1 -1
- package/dist/client/assets/{Key01-CrwOIsjX.js → Key01-CHZQ8Cf-.js} +1 -1
- package/dist/client/assets/{LinkExternal01-yVEf-2cT.js → LinkExternal01-Cq8yx7fP.js} +1 -1
- package/dist/client/assets/{List-d88_8fTd.js → List-DZ53jWcW.js} +1 -1
- package/dist/client/assets/{Loading01-Bf56vlFv.js → Loading01-Bo9vDQAp.js} +1 -1
- package/dist/client/assets/{Lock01-CQ0bp8OP.js → Lock01-C1QZkjy0.js} +1 -1
- package/dist/client/assets/{Pin01-DBKe5RmK.js → Pin01-NWg5BL2M.js} +1 -1
- package/dist/client/assets/Play-D2yqwct8.js +1 -0
- package/dist/client/assets/{Plus-CcqPpwU0.js → Plus-DAW17Fqf.js} +1 -1
- package/dist/client/assets/{SearchMd-Ns-pswyj.js → SearchMd-D9E7kgub.js} +1 -1
- package/dist/client/assets/{Share07-B5yrbjwk.js → Share07-CN4FUsWW.js} +1 -1
- package/dist/client/assets/{Terminal-qZhwvVsv.js → Terminal-1HZulC_H.js} +1 -1
- package/dist/client/assets/Tool01-Ir04gLyn.js +1 -0
- package/dist/client/assets/{Trash01-DVYV3BJw.js → Trash01-BUkAP1vf.js} +1 -1
- package/dist/client/assets/{Upload01-CCAaxnrW.js → Upload01-DPPzM8Sw.js} +1 -1
- package/dist/client/assets/{Users03-CSRHEIl2.js → Users03-DscKVk_U.js} +1 -1
- package/dist/client/assets/{X-Dz8JZ2ZX.js → X-DyyqPnhR.js} +1 -1
- package/dist/client/assets/{XClose-BhgPfyG3.js → XClose-nvPI0OtD.js} +1 -1
- package/dist/client/assets/agent-detail-pV-lC3Zh.js +1 -0
- package/dist/client/assets/{agents-4MJAHJGV.js → agents-DepniFRU.js} +1 -1
- package/dist/client/assets/{alert-dialog-5t1wq8Xl.js → alert-dialog-QzYPe_ae.js} +3 -3
- package/dist/client/assets/{auth-catchall-CTOFzXVU.js → auth-catchall-COlMpx6Y.js} +1 -1
- package/dist/client/assets/{avatar-Cx4ORVtq.js → avatar-KkS1NpLz.js} +1 -1
- package/dist/client/assets/{badge-DfeUgg96.js → badge-CfH2vrIM.js} +1 -1
- package/dist/client/assets/{binder-Dh-m11Sm.js → binder-Cyeq_Zec.js} +1 -1
- package/dist/client/assets/{button-C83AQWC1.js → button-D_0RTXDt.js} +1 -1
- package/dist/client/assets/{card-CbXWWn3M.js → card-BmOa96dk.js} +1 -1
- package/dist/client/assets/{checkbox-DcPieRc5.js → checkbox-CUtYbeQD.js} +1 -1
- package/dist/client/assets/{circle-alert-ChrxIBwd.js → circle-alert-BnmazpCh.js} +1 -1
- package/dist/client/assets/collapsible-0N2BB6Bm.js +23 -0
- package/dist/client/assets/{collection-detail-B_qs3xwg.js → collection-detail-CeAvZaUS.js} +4 -4
- package/dist/client/assets/{collection-display-button-DlAEKbje.js → collection-display-button-Cm0zQnM_.js} +1 -1
- package/dist/client/assets/{collection-header-Fc9BtUxQ.js → collection-header-CbT_At3k.js} +1 -1
- package/dist/client/assets/{collection-page-DvzZtNQd.js → collection-page-CpAhF9Tg.js} +1 -1
- package/dist/client/assets/collection-search-DRZ8ScZP.js +1 -0
- package/dist/client/assets/{collection-tab-BB_A78nH.js → collection-tab-CyuO9CaU.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Ch8oh2UW.js → collection-table-wrapper-CspbeKNx.js} +1 -1
- package/dist/client/assets/connect-Dx3Myol5.js +1 -0
- package/dist/client/assets/{connection-card-BZU7F7-m.js → connection-card-C6VYrDSx.js} +1 -1
- package/dist/client/assets/connection-detail-BAO1w9SL.js +1 -0
- package/dist/client/assets/{connections-dluTnyJM.js → connections-xwpD87cp.js} +1 -1
- package/dist/client/assets/{constants-ytntCGH9.js → constants-D8fdcBr8.js} +1 -1
- package/dist/client/assets/constants-rfrR0uMr.js +1 -0
- package/dist/client/assets/{create-organization-dialog-GjXRxTaj.js → create-organization-dialog-D96wehG4.js} +1 -1
- package/dist/client/assets/{dialog-D_ebnPDF.js → dialog-B-A0vnh-.js} +1 -1
- package/dist/client/assets/dropdown-menu-CMmh8IDN.js +1 -0
- package/dist/client/assets/{dynamic-plugin-layout-DrCIvG61.js → dynamic-plugin-layout-D5OcFZH0.js} +1 -1
- package/dist/client/assets/{empty-state-CxA9hap0.js → empty-state-BS0aVQHO.js} +1 -1
- package/dist/client/assets/{empty-state-Cr5g6Vh9.js → empty-state-DKQ_J1zp.js} +1 -1
- package/dist/client/assets/{env-vars-editor-DXJo5cdV.js → env-vars-editor-BFfuzqB5.js} +1 -1
- package/dist/client/assets/{error-boundary-Dg0Af8BA.js → error-boundary-ynZ9rF8y.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BYPMZtVW.js → extract-connection-data-5Dbbyfmc.js} +1 -1
- package/dist/client/assets/file-browser-DWYmbjoP.js +2 -0
- package/dist/client/assets/{form-BISYEAnP.js → form-DngqlMy0.js} +1 -1
- package/dist/client/assets/grid-view-DBdpM4tG.js +1 -0
- package/dist/client/assets/home-Dh3O7N9x.js +1 -0
- package/dist/client/assets/index-B8BaCPuX.js +25 -0
- package/dist/client/assets/index-BWcrkV98.js +1 -0
- package/dist/client/assets/index-BtGsFE3_.js +233 -0
- package/dist/client/assets/{index-B-pYSGnK.js → index-C_CYTppS.js} +1 -1
- package/dist/client/assets/index-CqeIU8-o.css +1 -0
- package/dist/client/assets/index-DaiP89U7.js +1 -0
- package/dist/client/assets/{index-C8OOnmm1.js → index-Dho9MRVw.js} +2 -2
- package/dist/client/assets/{infiniteQueryObserver-B1N6PF-z.js → infiniteQueryObserver-DDmbfPGP.js} +1 -1
- package/dist/client/assets/{input-CrR0FEof.js → input-trZWilTG.js} +1 -1
- package/dist/client/assets/layout-BZ8_9wgI.js +1 -0
- package/dist/client/assets/localstorage-keys-B7V7cQcH.js +1 -0
- package/dist/client/assets/{login-BFXWEB6t.js → login-D61ut3BQ.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BkqLXiLL.js → mcp-oauth-kjSe-9sd.js} +1 -1
- package/dist/client/assets/{mcp-server-card-CkDDvd5o.js → mcp-server-card-DkR0AaJs.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-CuItqIIY.js → mcp-server-detail-Bq0lDMH3.js} +2 -2
- package/dist/client/assets/members-DqAGtLhZ.js +3 -0
- package/dist/client/assets/{monaco-editor-gim9RLZ3.js → monaco-editor-KzPiR_VS.js} +4 -4
- package/dist/client/assets/{monitoring-AmN2oTrM.js → monitoring-DkEahA8B.js} +5 -5
- package/dist/client/assets/{oauth-callback-BO8hRY4t.js → oauth-callback-C_OPSpWp.js} +1 -1
- package/dist/client/assets/page-BQkgsSw9.js +1 -0
- package/dist/client/assets/{page-BcZkyr2a.js → page-DWOf0lbq.js} +1 -1
- package/dist/client/assets/{pin-to-sidebar-button-DbV8w54G.js → pin-to-sidebar-button-Cdnz6iok.js} +1 -1
- package/dist/client/assets/plugin-empty-state-Dr-6CK5g.js +1 -0
- package/dist/client/assets/plugin-header-CAC6QLaV.js +1 -0
- package/dist/client/assets/plugins-57qT4Dil.js +1 -0
- package/dist/client/assets/popover-Bkt9Kfhi.js +1 -0
- package/dist/client/assets/{registry-utils-DekIcM3F.js → registry-utils-tiv71gSA.js} +1 -1
- package/dist/client/assets/{resizable-V4jINWPU.js → resizable-BdOXbYHL.js} +1 -1
- package/dist/client/assets/{resource-tabs-BsRvwnyx.js → resource-tabs-G-U5EIhm.js} +1 -1
- package/dist/client/assets/select-reGYS0Ly.js +1 -0
- package/dist/client/assets/settings-zvu2qyde.js +1 -0
- package/dist/client/assets/shell-layout-C-8OlUFV.js +3 -0
- package/dist/client/assets/{spinner-CwfYynNt.js → spinner-E8mBz_Z6.js} +1 -1
- package/dist/client/assets/{store-invite-BErtY6PV.js → store-invite-DnYGNBjx.js} +1 -1
- package/dist/client/assets/switch-t5mcsF2Z.js +1 -0
- package/dist/client/assets/{textarea-DRMuRqUv.js → textarea-x7X_L353.js} +1 -1
- package/dist/client/assets/{tools-list-DesNUyav.js → tools-list-DQZuaE9M.js} +1 -1
- package/dist/client/assets/tooltip-Cw2xVvTD.js +1 -0
- package/dist/client/assets/typewriter-title-BK26jx8M.js +16 -0
- package/dist/client/assets/use-binding-BVBmgj67.js +23 -0
- package/dist/client/assets/use-collections-CVO4vm4G.js +1 -0
- package/dist/client/assets/{use-connection-TLrid9RM.js → use-connection-BU-nKbTz.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Bi6QQFl1.js → use-create-virtual-mcp-Cr2fOp7g.js} +1 -1
- package/dist/client/assets/use-deco-chat-open-D-b5da72.js +1 -0
- package/dist/client/assets/{use-list-state-DuKw_MMV.js → use-list-state-ClsnlmlI.js} +1 -1
- package/dist/client/assets/use-mcp-prompts-B5zcyY9X.js +1 -0
- package/dist/client/assets/{use-members-g_5Yt7ve.js → use-members-CVUMGKct.js} +1 -1
- package/dist/client/assets/{use-mobile-DQ806XzQ.js → use-mobile-VoJXvE1W.js} +1 -1
- package/dist/client/assets/use-organization-settings-CeE0FyqT.js +1 -0
- package/dist/client/assets/{use-virtual-mcp-C8lLKpyG.js → use-virtual-mcp-DbjvrtSR.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CVAyTLiO.js +1 -0
- package/dist/client/assets/useMutation-Lj_Cbq0P.js +1 -0
- package/dist/client/assets/useQuery-C2zqJzGD.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-BS0TxHG_.js +1 -0
- package/dist/client/assets/{view-mode-toggle-jPeow5hv.js → view-mode-toggle-BagEO4CJ.js} +1 -1
- package/dist/client/assets/{workflow-pPSpZECL.js → workflow-BuhbYm_s.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +169 -169
- package/dist/server/migrate.js +176 -176
- package/dist/server/server.js +160 -160
- package/package.json +1 -1
- package/dist/client/assets/FlipBackward-Cc_OirbM.js +0 -1
- package/dist/client/assets/Play-l95VP5u9.js +0 -1
- package/dist/client/assets/agent-detail-nBBUtMd0.js +0 -1
- package/dist/client/assets/collection-search-bOTNZP0b.js +0 -1
- package/dist/client/assets/connect-DYIKCRWy.js +0 -1
- package/dist/client/assets/connection-detail-D3-I_W38.js +0 -1
- package/dist/client/assets/constants-CnfPGmdA.js +0 -1
- package/dist/client/assets/dropdown-menu-CzQCi3DZ.js +0 -1
- package/dist/client/assets/file-browser-2RP-n1Xp.js +0 -2
- package/dist/client/assets/grid-view-BzgHSliB.js +0 -1
- package/dist/client/assets/home-CZ1MSx2E.js +0 -1
- package/dist/client/assets/index-CIvJ2wFV.js +0 -255
- package/dist/client/assets/index-CmUKmcyS.js +0 -1
- package/dist/client/assets/index-HgNYu27A.js +0 -1
- package/dist/client/assets/index-c6ju_hIh.js +0 -25
- package/dist/client/assets/index-cFLiAqt_.css +0 -1
- package/dist/client/assets/layout-BGZtLEwK.js +0 -1
- package/dist/client/assets/localstorage-keys-N4jrVxvr.js +0 -1
- package/dist/client/assets/members-C3Nvqq2t.js +0 -3
- package/dist/client/assets/page-D-IBJ4SW.js +0 -1
- package/dist/client/assets/plugin-empty-state-Df2LAyPv.js +0 -1
- package/dist/client/assets/plugin-header-e5FObvvx.js +0 -1
- package/dist/client/assets/plugins-BOsIh96E.js +0 -1
- package/dist/client/assets/popover-B2yKs5LA.js +0 -1
- package/dist/client/assets/select-BlFReF6r.js +0 -1
- package/dist/client/assets/settings-cRTESMAX.js +0 -1
- package/dist/client/assets/shell-layout-BfC0vVyw.js +0 -3
- package/dist/client/assets/switch-DjW_2nBx.js +0 -1
- package/dist/client/assets/tool-set-selector-Btgo2YwH.js +0 -1
- package/dist/client/assets/tooltip-aHeHMhKh.js +0 -1
- package/dist/client/assets/typewriter-title-DRU6uRKP.js +0 -16
- package/dist/client/assets/use-binding-C2mDgpbB.js +0 -23
- package/dist/client/assets/use-collections-CkAaybvR.js +0 -1
- package/dist/client/assets/use-mcp-prompts-D5tApqEs.js +0 -1
- package/dist/client/assets/use-organization-settings-C-IzAdi1.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BUOCgX3w.js +0 -1
- package/dist/client/assets/useMutation-C4aXMLv3.js +0 -1
- package/dist/client/assets/useQuery-DNOH3p7p.js +0 -1
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r}from"./index-C8OOnmm1.js";const i=({size:e=24,color:t="currentColor",...o})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},r.createElement("path",{d:"M3 9h13.5a4.5 4.5 0 1 1 0 9H12M3 9l4-4M3 9l4 4"}));i.displayName="FlipBackward";export{i};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t}from"./index-C8OOnmm1.js";const a=({size:e=24,color:r="currentColor",...o})=>t.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:r,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},t.createElement("path",{d:"M21 10H3m13-8v4M8 2v4m-.2 16h8.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 19.72 21 18.88 21 17.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C18.72 4 17.88 4 16.2 4H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 6.28 3 7.12 3 8.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 22 6.12 22 7.8 22Z"}));a.displayName="Calendar";const i=({size:e=24,color:r="currentColor",...o})=>t.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:r,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},t.createElement("path",{d:"M5 4.99c0-.972 0-1.457.202-1.725a1 1 0 0 1 .738-.395c.335-.02.74.25 1.548.788l10.515 7.01c.668.446 1.002.668 1.118.949a1 1 0 0 1 0 .766c-.116.28-.45.503-1.118.948l-10.515 7.01c-.809.54-1.213.809-1.548.789a1 1 0 0 1-.738-.395C5 20.467 5 19.98 5 19.01V4.99Z"}));i.displayName="Play";export{i,a as n};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as y,c as M,j as s,p as st,l as qe,a as ot,f as nt,V as lt,s as rt,bj as it,bt as at,u as ct,h as dt,k as mt,ab as Re}from"./index-C8OOnmm1.js";import{I as ze,E as ut}from"./empty-state-Cr5g6Vh9.js";import{E as Ue}from"./error-boundary-Dg0Af8BA.js";import{C as We}from"./checkbox-DcPieRc5.js";import{c as Y,B as G}from"./button-C83AQWC1.js";import{i as ft}from"./ArrowLeft-DzpTEYvO.js";import{b as Ye}from"./use-connection-TLrid9RM.js";import{C as ht}from"./collection-search-bOTNZP0b.js";import{I as Ae}from"./input-CrR0FEof.js";import{s as xt}from"./Plus-CcqPpwU0.js";import{i as pt}from"./X-Dz8JZ2ZX.js";import{P as gt}from"./pin-to-sidebar-button-DbV8w54G.js";import{T as bt}from"./tool-set-selector-Btgo2YwH.js";import{I as jt,R as vt,a as yt,u as Ee}from"./index-CmUKmcyS.js";import{c as De,K as Fe}from"./constants-ytntCGH9.js";import{l as Ct,a as Nt}from"./use-mcp-prompts-D5tApqEs.js";import{u as St,a as _t}from"./use-virtual-mcp-C8lLKpyG.js";import{s as Ge}from"./slugify-CEUa2lfQ.js";import{B as He}from"./badge-DfeUgg96.js";import{b as wt,c as kt,a as It,D as Tt}from"./dialog-D_ebnPDF.js";import{F as ve,a as Mt,b as ye,d as Ce,f as Ne,c as $t}from"./form-BISYEAnP.js";import{R as Pt}from"./resource-tabs-BsRvwnyx.js";import{S as Rt}from"./switch-DjW_2nBx.js";import{T as zt}from"./textarea-DRMuRqUv.js";import{b as le,c as re,T as ie,a as ae}from"./tooltip-aHeHMhKh.js";import{i as Ke}from"./Check-CXkamnnr.js";import{i as At}from"./Code01-BNQVP8-g.js";import{a as Vt}from"./Copy01-CpBgXJFP.js";import{i as Et}from"./FlipBackward-Cc_OirbM.js";import{i as Me}from"./InfoCircle-Dwuc2RiH.js";import{i as Pe}from"./Loading01-Bf56vlFv.js";import{i as Dt}from"./Share07-B5yrbjwk.js";import{t as Ft}from"./Users03-CSRHEIl2.js";import{a as Lt,V as Bt,b as Ot}from"./layout-BGZtLEwK.js";import"./use-collections-CkAaybvR.js";import"./useMutation-C4aXMLv3.js";import"./useQuery-DNOH3p7p.js";import"./SearchMd-Ns-pswyj.js";import"./Pin01-DBKe5RmK.js";import"./use-organization-settings-C-IzAdi1.js";const Qe=({size:o=24,color:e="currentColor",...t})=>y.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},y.createElement("path",{d:"M4 7h11m0 0-4 4m4-4-4-4M4 17h16m0 0-4 4m4-4-4-4"}));Qe.displayName="ArrowsRight";const Je=({size:o=24,color:e="currentColor",...t})=>y.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},y.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}));Je.displayName="Circle";const Ze=({size:o=24,color:e="currentColor",...t})=>y.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},y.createElement("path",{d:"M10 17.659V20a2 2 0 1 0 4 0v-2.341M12 2v1m-9 9H2m3.5-6.5-.6-.6m13.6.6.6-.6M22 12h-1m-3 0a6 6 0 1 1-12 0 6 6 0 0 1 12 0Z"}));Ze.displayName="Lightbulb02";const Xe=({size:o=24,color:e="currentColor",...t})=>y.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},y.createElement("path",{d:"M7 3v3.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C7.76 8 8.04 8 8.6 8h6.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C17 7.24 17 6.96 17 6.4V4m0 17v-6.4c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C16.24 13 15.96 13 15.4 13H8.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C7 13.76 7 14.04 7 14.6V21M21 9.325V16.2c0 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 3h6.875c.489 0 .733 0 .963.055.204.05.4.13.579.24.201.123.374.296.72.642l3.126 3.126c.346.346.519.519.642.72.11.18.19.374.24.579.055.23.055.474.055.963Z"}));Xe.displayName="Save01";const qt=y.memo(function(e){const t=M.c(20),{connection:n,isSelected:l,hasItemsEnabled:r,activeItemsCount:i,totalItemsCount:a,onSelect:m,onToggle:c}=e,d=l?"bg-accent/50":"hover:bg-muted/50";let u;t[0]!==d?(u=Y("flex items-center gap-3 p-2 rounded-lg transition-colors will-change-auto",d),t[0]=d,t[1]=u):u=t[1];let f;t[2]!==n.icon||t[3]!==n.title?(f=s.jsx(ze,{icon:n.icon,name:n.title,size:"xs"}),t[2]=n.icon,t[3]=n.title,t[4]=f):f=t[4];let x;t[5]!==n.title?(x=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:n.title})}),t[5]=n.title,t[6]=x):x=t[6];let p;t[7]!==m||t[8]!==f||t[9]!==x?(p=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:m,children:[f,x]}),t[7]=m,t[8]=f,t[9]=x,t[10]=p):p=t[10];let g;t[11]!==i||t[12]!==r||t[13]!==c||t[14]!==a?(g=a>0&&s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[i,"/",a]}),s.jsx(We,{checked:r,onCheckedChange:c,onClick:Wt})]}),t[11]=i,t[12]=r,t[13]=c,t[14]=a,t[15]=g):g=t[15];let N;return t[16]!==u||t[17]!==p||t[18]!==g?(N=s.jsxs("div",{className:u,children:[p,g]}),t[16]=u,t[17]=p,t[18]=g,t[19]=N):N=t[19],N}),Ut=y.memo(function(e){const t=M.c(18),{connectionId:n,item:l,isSelected:r,onToggle:i}=e,a=`item-${n}-${l.id}`,m=r?"text-foreground":"text-muted-foreground";let c;t[0]!==m?(c=Y("text-sm font-medium",m),t[0]=m,t[1]=c):c=t[1];let d;t[2]!==l.name||t[3]!==c?(d=s.jsx("div",{className:"flex items-center gap-2 mb-1",children:s.jsx("span",{className:c,children:l.name})}),t[2]=l.name,t[3]=c,t[4]=d):d=t[4];let u;t[5]!==l.description?(u=l.description&&s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:l.description}),t[5]=l.description,t[6]=u):u=t[6];let f;t[7]!==d||t[8]!==u?(f=s.jsxs("div",{className:"flex-1 min-w-0",children:[d,u]}),t[7]=d,t[8]=u,t[9]=f):f=t[9];const x=`item-${n}-${l.id}`;let p;t[10]!==r||t[11]!==i||t[12]!==x?(p=s.jsx("div",{className:"flex items-center shrink-0",children:s.jsx(We,{id:x,checked:r,onCheckedChange:i,onClick:Yt})}),t[10]=r,t[11]=i,t[12]=x,t[13]=p):p=t[13];let g;return t[14]!==a||t[15]!==f||t[16]!==p?(g=s.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 cursor-pointer group will-change-auto",htmlFor:a,children:[f,p]}),t[14]=a,t[15]=f,t[16]=p,t[17]=g):g=t[17],g});function et({itemSet:o,onItemSetChange:e,getItems:t,itemLabel:n,emptyItemsMessage:l,extraContent:r,excludeVirtualMcpId:i}){const[a,m]=y.useState(""),c=y.useDeferredValue(a),[d,u]=y.useState("all"),[f,x]=y.useState(!1),p=y.useRef(new Set(Object.keys(o))),g=Ye({searchTerm:c.trim()||void 0}),N=i?g.filter(h=>h.connection_type!=="VIRTUAL"?!0:st(h.connection_url)!==i):g,S=p.current,I=[...S.values()].map(h=>N.find(C=>C.id===h)).filter(h=>h!==void 0),k=N.filter(h=>!S.has(h.id)),b=[...I,...k],v=h=>{const C=o[h];return C!==void 0&&C.length>0},_=b.filter(h=>{if(d==="all")return!0;const C=v(h.id);return d==="selected"?C:d==="unselected"?!C:!0}),[T,$]=y.useState(b[0]?.id??null),w=T?b.find(h=>h.id===T)??null:null,P=w?t(w):[],V=(h,C)=>o[h]?.includes(C)??!1,R=(h,C)=>{const D=o[h]??[],F=D.includes(C),q={...o};if(F){const U=D.filter(H=>H!==C);U.length===0?delete q[h]:q[h]=U}else q[h]=[...D,C];e(q)},z=h=>{const C=b.find(B=>B.id===h);if(!C)return;const D=t(C);if(D.length===0)return;const F=o[h]??[],q=D.map(B=>B.id),U=F.length>0&&q.every(B=>F.includes(B)),H={...o};U?delete H[h]:(H[h]=q,$(h)),e(H)},E=h=>{$(h),x(!0)},L=()=>{x(!1)};return s.jsxs("div",{className:"flex h-full",children:[s.jsxs("div",{className:Y("w-full md:w-80 border-r border-border flex flex-col",f&&"hidden md:flex"),children:[s.jsx(ht,{value:a,onChange:m,placeholder:"Search Connections..."}),s.jsxs("div",{className:"flex gap-1 p-2 border-b border-border",children:[s.jsx("button",{onClick:()=>u("all"),className:Y("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",d==="all"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"All"}),s.jsx("button",{onClick:()=>u("selected"),className:Y("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",d==="selected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Selected"}),s.jsx("button",{onClick:()=>u("unselected"),className:Y("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",d==="unselected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Unselected"})]}),s.jsx("div",{className:"flex-1 overflow-auto",children:_.length===0?s.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:a?"No connections found":d==="selected"?"No servers selected":d==="unselected"?"No unselected servers":"No connections available"}):s.jsx("div",{className:"p-2 space-y-1",children:_.map(h=>{const D=t(h).length,F=o[h.id]?.length??0;return s.jsx(qt,{connection:h,isSelected:T===h.id,hasItemsEnabled:v(h.id),activeItemsCount:F,totalItemsCount:D,onSelect:()=>E(h.id),onToggle:()=>z(h.id)},h.id)})})})]}),s.jsx("div",{className:Y("flex-1 flex-col",f?"flex":"hidden md:flex"),children:w?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"md:hidden border-b border-border p-4 flex items-center gap-3",children:[s.jsx(G,{variant:"ghost",size:"sm",onClick:L,className:"h-8 w-8 p-0 shrink-0",children:s.jsx(ft,{size:20})}),s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[s.jsx(ze,{icon:w.icon,name:w.title,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:w.title}),w.description&&s.jsx("p",{className:"text-sm text-muted-foreground truncate",children:w.description})]})]})]}),r,s.jsx("div",{className:"flex-1 overflow-auto p-4",children:P.length===0?s.jsx("div",{className:"text-sm text-muted-foreground text-center py-8",children:l||`This connection has no ${n} available`}):s.jsx("div",{className:"space-y-2",children:P.map(h=>s.jsx(Ut,{connectionId:w.id,item:h,isSelected:V(w.id,h.id),onToggle:()=>R(w.id,h.id)},h.id))})})]}):s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:["Select a connection to view its ",n]})})})]})}function Wt(o){return o.stopPropagation()}function Yt(o){return o.stopPropagation()}function Gt(o){const e=M.c(7),{promptSet:t,onPromptSetChange:n,connectionPrompts:l,excludeVirtualMcpId:r}=o;let i;e[0]!==l?(i=c=>(l.get(c.id)??[]).map(Ht),e[0]=l,e[1]=i):i=e[1];const a=i;let m;return e[2]!==r||e[3]!==a||e[4]!==n||e[5]!==t?(m=s.jsx(et,{itemSet:t,onItemSetChange:n,getItems:a,itemLabel:"prompts",emptyItemsMessage:"This connection has no prompts available",excludeVirtualMcpId:r}),e[2]=r,e[3]=a,e[4]=n,e[5]=t,e[6]=m):m=e[6],m}function Ht(o){return{id:o.name,name:o.name,description:o.description}}function Kt(o){return o.includes("*")}function Qt(o){const e=M.c(27),{patterns:t,onAddPattern:n,onRemovePattern:l}=o,[r,i]=y.useState("");let a;e[0]!==r||e[1]!==n||e[2]!==t?(a=()=>{const f=r.trim();f&&!t.includes(f)&&(n(f),i(""))},e[0]=r,e[1]=n,e[2]=t,e[3]=a):a=e[3];const m=a;let c;e[4]!==m?(c=f=>{f.key==="Enter"&&(f.preventDefault(),m())},e[4]=m,e[5]=c):c=e[5];const d=c;let u;if(e[6]!==m||e[7]!==d||e[8]!==r||e[9]!==l||e[10]!==t){const f=t.filter(Kt);let x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("code",{children:"*"}),e[12]=x):x=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs("div",{className:"text-xs text-muted-foreground",children:["Add URI patterns to match multiple resources. Use ",x," for single segment and ",s.jsx("code",{children:"**"})," for multiple segments."]}),e[13]=p):p=e[13];let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=_=>i(_.target.value),e[14]=g):g=e[14];let N;e[15]!==d||e[16]!==r?(N=s.jsx(Ae,{value:r,onChange:g,onKeyDown:d,placeholder:"e.g., file:///**/*.ts or db://users/*",className:"flex-1 text-sm"}),e[15]=d,e[16]=r,e[17]=N):N=e[17];let S;e[18]!==r?(S=r.trim(),e[18]=r,e[19]=S):S=e[19];const I=!S;let k;e[20]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(xt,{size:16}),e[20]=k):k=e[20];let b;e[21]!==m||e[22]!==I?(b=s.jsx(G,{type:"button",variant:"outline",size:"sm",onClick:m,disabled:I,children:k}),e[21]=m,e[22]=I,e[23]=b):b=e[23];let v;e[24]!==b||e[25]!==N?(v=s.jsxs("div",{className:"flex gap-2",children:[N,b]}),e[24]=b,e[25]=N,e[26]=v):v=e[26],u=s.jsxs("div",{className:"border-b border-border p-4 space-y-3",children:[p,v,f.length>0&&s.jsx("div",{className:"flex flex-wrap gap-2",children:f.map(_=>s.jsxs("div",{className:"flex items-center gap-1 px-2 py-1 bg-muted rounded-md text-xs",children:[s.jsx("code",{className:"text-foreground",children:_}),s.jsx("button",{type:"button",onClick:()=>l(_),className:"text-muted-foreground hover:text-foreground",children:s.jsx(pt,{size:12})})]},_))})]}),e[6]=m,e[7]=d,e[8]=r,e[9]=l,e[10]=t,e[11]=u}else u=e[11];return u}function Jt(o){const e=M.c(24),{resourceSet:t,onResourceSetChange:n,connectionResources:l,excludeVirtualMcpId:r}=o,[i]=y.useState(null);let a;e[0]!==l?(a=b=>(l.get(b.id)??[]).map(Zt),e[0]=l,e[1]=a):a=e[1];const m=a;let c;e[2]!==n||e[3]!==t?(c=(b,v)=>{const _=t[b]??[];_.includes(v)||n({...t,[b]:[..._,v]})},e[2]=n,e[3]=t,e[4]=c):c=e[4];const d=c;let u;e[5]!==n||e[6]!==t?(u=(b,v)=>{const T=(t[b]??[]).filter($=>$!==v);if(T.length===0){const $={...t};delete $[b],n($)}else n({...t,[b]:T})},e[5]=n,e[6]=t,e[7]=u):u=e[7];const f=u;let x;e[8]!==n?(x=b=>{n(b)},e[8]=n,e[9]=x):x=e[9];const p=x;let g;e[10]!==t||e[11]!==i?(g=i?t[i]??[]:[],e[10]=t,e[11]=i,e[12]=g):g=e[12];const N=g;let S;e[13]!==d||e[14]!==f||e[15]!==i||e[16]!==N?(S=i?s.jsx(Qt,{patterns:N,onAddPattern:b=>d(i,b),onRemovePattern:b=>f(i,b)}):null,e[13]=d,e[14]=f,e[15]=i,e[16]=N,e[17]=S):S=e[17];const I=S;let k;return e[18]!==r||e[19]!==I||e[20]!==m||e[21]!==p||e[22]!==t?(k=s.jsx("div",{className:"h-full",children:s.jsx(et,{itemSet:t,onItemSetChange:p,getItems:m,itemLabel:"resources",emptyItemsMessage:"This connection has no resources available",extraContent:I,excludeVirtualMcpId:r})}),e[18]=r,e[19]=I,e[20]=m,e[21]=p,e[22]=t,e[23]=k):k=e[23],k}function Zt(o){return{id:o.uri,name:o.name||o.uri,description:o.description||o.uri}}function Xt(o){const e=M.c(8);let t,n;e[0]!==o?({className:t,...n}=o,e[0]=o,e[1]=t,e[2]=n):(t=e[1],n=e[2]);let l;e[3]!==t?(l=Y("grid gap-3",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=s.jsx(vt,{"data-slot":"radio-group",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function $e(o){const e=M.c(9);let t,n;e[0]!==o?({className:t,...n}=o,e[0]=o,e[1]=t,e[2]=n):(t=e[1],n=e[2]);let l;e[3]!==t?(l=Y("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),e[3]=t,e[4]=l):l=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(yt,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:s.jsx(Je,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})}),e[5]=r):r=e[5];let i;return e[6]!==n||e[7]!==l?(i=s.jsx(jt,{"data-slot":"radio-group-item",className:l,...n,children:r}),e[6]=n,e[7]=l,e[8]=i):i=e[8],i}function es(o){const t=new TextEncoder().encode(o),n=Array.from(t,l=>String.fromCharCode(l)).join("");return btoa(n)}const ts=lt.pick({title:!0,description:!0,status:!0,metadata:!0}).extend({title:rt().min(1,"Name is required").max(255)});function Le(o,e){const t={};for(const n of o.connections)if(n.selected_tools===null){const l=e.get(n.connection_id)??[];l.length>0&&(t[n.connection_id]=l)}else n.selected_tools.length>0&&(t[n.connection_id]=n.selected_tools);return t}function Be(o){const e={};for(const t of o.connections)t.selected_resources!==null&&t.selected_resources!==void 0&&t.selected_resources.length>0&&(e[t.connection_id]=t.selected_resources);return e}function Oe(o){const e={};for(const t of o.connections)t.selected_prompts!==null&&t.selected_prompts!==void 0&&t.selected_prompts.length>0&&(e[t.connection_id]=t.selected_prompts);return e}function ss(o,e,t,n){const l=new Set([...Object.keys(o),...Object.keys(e),...Object.keys(t)]);return Array.from(l).map(r=>{const i=o[r]??[],a=n.get(r)??[],m=a.length>0&&a.every(c=>i.includes(c));return{connection_id:r,selected_tools:i.length===0||m?null:i,selected_resources:e[r]??null,selected_prompts:t[r]??null}})}function os(o){const e=M.c(10),{url:t}=o,[n,l]=y.useState(!1);let r;e[0]!==t?(r=async()=>{await navigator.clipboard.writeText(t),l(!0),Re.success("Agent URL copied to clipboard"),setTimeout(()=>l(!1),2e3)},e[0]=t,e[1]=r):r=e[1];const i=r;let a;e[2]!==n?(a=n?s.jsx(Ke,{size:20,className:"text-green-600"}):s.jsx(Vt,{size:20}),e[2]=n,e[3]=a):a=e[3];const m=n?"Copied!":"Copy URL";let c;e[4]!==m?(c=s.jsx("span",{className:"text-xs font-medium",children:m}),e[4]=m,e[5]=c):c=e[5];let d;return e[6]!==i||e[7]!==a||e[8]!==c?(d=s.jsxs(G,{type:"button",variant:"outline",onClick:i,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[a,c]}),e[6]=i,e[7]=a,e[8]=c,e[9]=d):d=e[9],d}function ns(o){const e=M.c(7),{url:t,serverName:n}=o;let l;e[0]!==n||e[1]!==t?(l=()=>{const c=Ge(n),u=es(JSON.stringify({type:"http",url:t,headers:{"x-mesh-client":"Cursor"}},null,2)),f=`cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(c)}&config=${encodeURIComponent(u)}`;window.open(f,"_blank"),Re.success("Opening Cursor...")},e[0]=n,e[1]=t,e[2]=l):l=e[2];const r=l;let i,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("img",{src:"/logos/cursor.svg",alt:"Cursor",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(11%) sepia(8%) saturate(785%) hue-rotate(1deg) brightness(95%) contrast(89%)"}}),a=s.jsx("span",{className:"text-xs font-medium",children:"Install on Cursor"}),e[3]=i,e[4]=a):(i=e[3],a=e[4]);let m;return e[5]!==r?(m=s.jsxs(G,{type:"button",variant:"outline",onClick:r,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[i,a]}),e[5]=r,e[6]=m):m=e[6],m}function ls(o){const e=M.c(11),{url:t,serverName:n}=o,[l,r]=y.useState(!1);let i;e[0]!==n||e[1]!==t?(i=async()=>{const f=Ge(n),p=JSON.stringify({type:"http",url:t,headers:{"x-mesh-client":"Claude Code"}},null,2),g=`claude mcp add-json "${f}" '${p.replace(/'/g,"'\\''")}'`;await navigator.clipboard.writeText(g),r(!0),Re.success("Claude Code command copied to clipboard"),setTimeout(()=>r(!1),2e3)},e[0]=n,e[1]=t,e[2]=i):i=e[2];const a=i;let m;e[3]!==l?(m=l?s.jsx(Ke,{size:20,className:"text-green-600"}):s.jsx("img",{src:"/logos/Claude Code.svg",alt:"Claude Code",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(55%) sepia(31%) saturate(1264%) hue-rotate(331deg) brightness(92%) contrast(86%)"}}),e[3]=l,e[4]=m):m=e[4];const c=l?"Copied!":"Install on Claude";let d;e[5]!==c?(d=s.jsx("span",{className:"text-xs font-medium",children:c}),e[5]=c,e[6]=d):d=e[6];let u;return e[7]!==a||e[8]!==m||e[9]!==d?(u=s.jsxs(G,{type:"button",variant:"outline",onClick:a,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[m,d]}),e[7]=a,e[8]=m,e[9]=d,e[10]=u):u=e[10],u}function rs(o){const e=M.c(40),{open:t,onOpenChange:n,virtualMcp:l}=o,[r,i]=y.useState("code_execution");let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=C=>{(C==="passthrough"||C==="smart_tool_selection"||C==="code_execution")&&i(C)},e[0]=a):a=e[0];const m=a;let c;e[1]!==r||e[2]!==l.id?(c=new URL(`/mcp/virtual-mcp/${l.id}`,window.location.origin),c.searchParams.set("mode",r),e[1]=r,e[2]=l.id,e[3]=c):c=e[3];let d;e[4]!==l.id||e[5]!==l.title?(d=l.title||`agent-${l.id?.slice(0,8)??"default"}`,e[4]=l.id,e[5]=l.title,e[6]=d):d=e[6];const u=d;let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(wt,{children:s.jsx(kt,{children:"Share Agent"})}),e[7]=f):f=e[7];let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{children:s.jsx("h4",{className:"text-sm font-medium text-foreground mt-1",children:"How should this agent work?"})}),e[8]=x):x=e[8];let p;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx("div",{className:"p-1.5 shrink-0",children:s.jsx(Qe,{className:"size-5 text-muted-foreground"})}),e[9]=p):p=e[9];let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx("span",{className:"text-sm font-medium text-foreground",children:"Direct access"}),e[10]=g):g=e[10];let N;e[11]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(ie,{asChild:!0,children:s.jsx(Me,{className:"size-3.5 text-muted-foreground"})}),e[11]=N):N=e[11];let S;e[12]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsxs("label",{htmlFor:"mode-passthrough",className:"flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[p,s.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[g,s.jsx(le,{children:s.jsxs(re,{children:[N,s.jsx(ae,{className:"max-w-xs",children:s.jsx("p",{className:"text-xs",children:"All tools are exposed directly via tools/list. Best for small tool surfaces with deterministic behavior."})})]})})]}),s.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Best for small teams or when you need predictable behavior"})]}),s.jsx($e,{id:"mode-passthrough",value:"passthrough"})]}),e[12]=S):S=e[12];let I;e[13]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx("div",{className:"p-1.5 shrink-0",children:s.jsx(Ze,{className:"size-5 text-muted-foreground"})}),e[13]=I):I=e[13];let k;e[14]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("span",{className:"text-sm font-medium text-foreground",children:"Smart discovery"}),e[14]=k):k=e[14];let b;e[15]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(ie,{asChild:!0,children:s.jsx(Me,{className:"size-3.5 text-muted-foreground"})}),e[15]=b):b=e[15];let v;e[16]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs("label",{htmlFor:"mode-smart",className:"flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[I,s.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[k,s.jsx(le,{children:s.jsxs(re,{children:[b,s.jsx(ae,{className:"max-w-xs",children:s.jsx("p",{className:"text-xs",children:"Uses meta-tools (GATEWAY_SEARCH_TOOLS, GATEWAY_DESCRIBE_TOOLS, GATEWAY_CALL_TOOL) to keep the tool list small and request details on demand."})})]})})]}),s.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Ideal for large teams with many tools - AI finds what it needs"})]}),s.jsx($e,{id:"mode-smart",value:"smart_tool_selection"})]}),e[16]=v):v=e[16];let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("div",{className:"p-1.5 shrink-0",children:s.jsx(At,{className:"size-5 text-muted-foreground"})}),e[17]=_):_=e[17];let T;e[18]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx("span",{className:"text-sm font-medium text-foreground",children:"Smart execution"}),e[18]=T):T=e[18];let $;e[19]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(ie,{asChild:!0,children:s.jsx(Me,{className:"size-3.5 text-muted-foreground"})}),e[19]=$):$=e[19];let w;e[20]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsxs("label",{htmlFor:"mode-code",className:"relative flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[_,s.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[T,s.jsx(le,{children:s.jsxs(re,{children:[$,s.jsx(ae,{className:"max-w-xs",children:s.jsx("p",{className:"text-xs",children:"Exposes meta-tools for discovery + sandboxed execution (GATEWAY_RUN_CODE). Reduces overhead on large surfaces by shifting work into a controlled runtime."})})]})})]}),s.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Maximum flexibility - AI can write code to orchestrate tools"})]}),s.jsx($e,{id:"mode-code",value:"code_execution"}),s.jsx(He,{variant:"outline",className:"absolute -top-2.5 left-1/2 -translate-x-1/2 bg-background z-10",children:"Recommended"})]}),e[20]=w):w=e[20];let P;e[21]!==r?(P=s.jsxs("div",{className:"flex flex-col gap-3",children:[x,s.jsxs(Xt,{value:r,onValueChange:m,className:"flex flex-col gap-4.5",children:[S,v,w]})]}),e[21]=r,e[22]=P):P=e[22];let V;e[23]!==c.href?(V=s.jsx(os,{url:c.href}),e[23]=c.href,e[24]=V):V=e[24];let R,z;e[25]!==u||e[26]!==c.href?(R=s.jsx(ns,{url:c.href,serverName:u}),z=s.jsx(ls,{url:c.href,serverName:u}),e[25]=u,e[26]=c.href,e[27]=R,e[28]=z):(R=e[27],z=e[28]);let E;e[29]!==V||e[30]!==R||e[31]!==z?(E=s.jsx("div",{className:"flex flex-col gap-3 pt-2",children:s.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[V,R,z]})}),e[29]=V,e[30]=R,e[31]=z,e[32]=E):E=e[32];let L;e[33]!==P||e[34]!==E?(L=s.jsxs(It,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[f,s.jsxs("div",{className:"flex flex-col gap-6",children:[P,E]})]}),e[33]=P,e[34]=E,e[35]=L):L=e[35];let h;return e[36]!==n||e[37]!==t||e[38]!==L?(h=s.jsx(Tt,{open:t,onOpenChange:n,children:L}),e[36]=n,e[37]=t,e[38]=L,e[39]=h):h=e[39],h}function is(o){const e=M.c(25),{form:t,icon:n}=o;let l;e[0]!==t?(l=t.watch("title")||"Agent",e[0]=t,e[1]=l):l=e[1];let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ft,{}),e[2]=r):r=e[2];let i;e[3]!==n||e[4]!==l?(i=s.jsx(ze,{icon:n,name:l,size:"lg",className:"shrink-0 shadow-sm",fallbackIcon:r}),e[3]=n,e[4]=l,e[5]=i):i=e[5];let a;e[6]!==t.control?(a=s.jsx(ve,{control:t.control,name:"status",render:ms}),e[6]=t.control,e[7]=a):a=e[7];let m;e[8]!==i||e[9]!==a?(m=s.jsxs("div",{className:"flex items-start justify-between",children:[i,a]}),e[8]=i,e[9]=a,e[10]=m):m=e[10];let c;e[11]!==t.control?(c=s.jsxs("div",{className:"flex flex-col",children:[s.jsx(ve,{control:t.control,name:"title",render:ds}),s.jsx(ve,{control:t.control,name:"description",render:cs})]}),e[11]=t.control,e[12]=c):c=e[12];let d;e[13]!==m||e[14]!==c?(d=s.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[m,c]}),e[13]=m,e[14]=c,e[15]=d):d=e[15];let u;e[16]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("div",{className:"flex flex-col gap-4 p-5 border-b border-border"}),e[16]=u):u=e[16];let f;e[17]!==t.control?(f=s.jsx("div",{className:"flex flex-col gap-3 p-5",children:s.jsx(ve,{control:t.control,name:"metadata",render:as})}),e[17]=t.control,e[18]=f):f=e[18];let x;e[19]!==d||e[20]!==f?(x=s.jsxs("div",{className:"flex flex-col",children:[d,u,f]}),e[19]=d,e[20]=f,e[21]=x):x=e[21];let p;return e[22]!==t||e[23]!==x?(p=s.jsx("div",{className:"flex flex-col h-full overflow-auto",children:s.jsx(Mt,{...t,children:x})}),e[22]=t,e[23]=x,e[24]=p):p=e[24],p}function as(o){const{field:e}=o;return s.jsxs(ye,{children:[s.jsxs("div",{children:[s.jsx($t,{className:"text-sm font-medium text-foreground mb-1",children:"Instructions"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Define the agent's role, capabilities, and behavior to guide how it interprets requests, uses available tools, and responds to users."})]}),s.jsx(Ce,{children:s.jsx(zt,{value:e.value?.instructions??"",onChange:t=>e.onChange({...e.value??{},instructions:t.target.value||void 0}),placeholder:"You are a helpful assistant that specializes in customer support. Your role is to help users resolve issues and answer questions...",className:"min-h-[240px] resize-none text-sm leading-relaxed"})}),s.jsx(Ne,{})]})}function cs(o){const{field:e}=o;return s.jsxs(ye,{className:"w-full space-y-0",children:[s.jsx(Ce,{children:s.jsx(Ae,{...e,value:e.value||"",className:"h-auto text-base text-muted-foreground leading-6 px-0 border-transparent hover:border-input focus:border-input bg-transparent transition-all",placeholder:"Add a description..."})}),s.jsx(Ne,{})]})}function ds(o){const{field:e}=o;return s.jsxs(ye,{className:"w-full space-y-0",children:[s.jsx(Ce,{children:s.jsx(Ae,{...e,className:"h-auto text-lg! font-medium leading-7 px-0 border-transparent hover:border-input focus:border-input bg-transparent transition-all",placeholder:"Agent Name"})}),s.jsx(Ne,{})]})}function ms(o){const{field:e}=o;return s.jsxs(ye,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(He,{variant:e.value==="active"?"success":"outline",children:e.value==="active"?"Active":"Inactive"}),s.jsx(Ce,{children:s.jsx(Rt,{checked:e.value==="active",onCheckedChange:t=>e.onChange(t?"active":"inactive")})})]}),s.jsx(Ne,{})]})}function us(o){const e=M.c(75),{virtualMcp:t,virtualMcpId:n,requestedTabId:l}=o,i=it().location.href,a=at();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={from:"/$org/agents/$agentId"},e[0]=m):m=e[0];const c=qe(m),d=_t(),{org:u}=ct();let f;e[1]===Symbol.for("react.memo_cache_sentinel")?(f={},e[1]=f):f=e[1];const x=Ye(f),p=x.map(ps);let g;e[2]!==u?(g=j=>({queryKey:Fe.connectionPrompts(j),queryFn:async()=>{try{const A=await De({connectionId:j,orgId:u.id});return await Ct(A)}catch{return{prompts:[]}}},staleTime:6e4,retry:!1}),e[2]=u,e[3]=g):g=e[3];const N=Ee({queries:p.map(g)});let S;e[4]!==u?(S=j=>({queryKey:Fe.connectionResources(j),queryFn:async()=>{try{const A=await De({connectionId:j,orgId:u.id});return await Nt(A)}catch{return{resources:[]}}},staleTime:6e4,retry:!1}),e[4]=u,e[5]=S):S=e[5];const I=Ee({queries:p.map(S)}),k=new Map;p.forEach((j,A)=>{const K=N[A];K?.data?k.set(j,K.data.prompts.map(xs)):k.set(j,[])});const b=new Map;p.forEach((j,A)=>{const K=I[A];K?.data?b.set(j,K.data.resources.map(hs)):b.set(j,[])});let v;if(e[6]!==x){v=new Map;for(const j of x)j.tools&&j.tools.length>0&&v.set(j.id,j.tools.map(fs));e[6]=x,e[7]=v}else v=e[7];let _;e[8]!==v||e[9]!==t?(_=()=>Le(t,v),e[8]=v,e[9]=t,e[10]=_):_=e[10];const[T,$]=y.useState(_);let w;e[11]!==t?(w=()=>Be(t),e[11]=t,e[12]=w):w=e[12];const[P,V]=y.useState(w);let R;e[13]!==t?(R=()=>Oe(t),e[13]=t,e[14]=R):R=e[14];const[z,E]=y.useState(R),[L,h]=y.useState(!1),[C,D]=y.useState(!1);let F;e[15]===Symbol.for("react.memo_cache_sentinel")?(F=j=>{$(j),h(!0)},e[15]=F):F=e[15];const q=F;let U;e[16]===Symbol.for("react.memo_cache_sentinel")?(U=j=>{V(j),h(!0)},e[16]=U):U=e[16];const H=U;let B;e[17]===Symbol.for("react.memo_cache_sentinel")?(B=j=>{E(j),h(!0)},e[17]=B):B=e[17];const tt=B;let de;e[18]===Symbol.for("react.memo_cache_sentinel")?(de=dt(ts),e[18]=de):de=e[18];let Q;e[19]!==t.metadata?(Q=t.metadata??{instructions:""},e[19]=t.metadata,e[20]=Q):Q=e[20];let me;e[21]!==Q||e[22]!==t.description||e[23]!==t.status||e[24]!==t.title?(me={resolver:de,defaultValues:{title:t.title,description:t.description,status:t.status,metadata:Q}},e[21]=Q,e[22]=t.description,e[23]=t.status,e[24]=t.title,e[25]=me):me=e[25];const W=mt(me),Se=W.formState.isDirty||L;let ue;e[26]!==d.update||e[27]!==v||e[28]!==W||e[29]!==z||e[30]!==P||e[31]!==T||e[32]!==n?(ue=async()=>{try{const j=W.getValues(),A=ss(T,P,z,v),K={title:j.title,description:j.description,status:j.status,metadata:j.metadata,connections:A};await d.update.mutateAsync({id:n,data:K}),W.reset(j),h(!1)}catch(j){console.error("Failed to save virtual MCP:",j)}},e[26]=d.update,e[27]=v,e[28]=W,e[29]=z,e[30]=P,e[31]=T,e[32]=n,e[33]=ue):ue=e[33];const _e=ue;let fe;e[34]!==v||e[35]!==W||e[36]!==t?(fe=()=>{W.reset({title:t.title,description:t.description,status:t.status,metadata:t.metadata??{instructions:""}}),$(Le(t,v)),V(Be(t)),E(Oe(t)),h(!1)},e[34]=v,e[35]=W,e[36]=t,e[37]=fe):fe=e[37];const we=fe;let he;e[38]===Symbol.for("react.memo_cache_sentinel")?(he=[{id:"settings",label:"Settings"},{id:"tools",label:"Tools"},{id:"resources",label:"Resources"},{id:"prompts",label:"Prompts"}],e[38]=he):he=e[38];const Ve=he,O=Ve.some(j=>j.id===l)?l:"settings";let xe;e[39]!==c?(xe=j=>{c({search:A=>({...A,tab:j}),replace:!0})},e[39]=c,e[40]=xe):xe=e[40];const ke=xe,ce=d.update.isPending;let J;e[41]!==a.history?(J=()=>a.history.back(),e[41]=a.history,e[42]=J):J=e[42];let Z;e[43]!==O||e[44]!==ke?(Z=s.jsx(Lt,{children:s.jsx(Pt,{tabs:Ve,activeTab:O,onTabChange:ke})}),e[43]=O,e[44]=ke,e[45]=Z):Z=e[45];let X;e[46]!==we||e[47]!==_e||e[48]!==Se||e[49]!==ce?(X=Se&&s.jsxs(s.Fragment,{children:[s.jsx(le,{children:s.jsxs(re,{delayDuration:0,children:[s.jsx(ie,{asChild:!0,children:s.jsx("span",{className:"inline-block",children:s.jsx(G,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:ce,onClick:we,"aria-label":"Cancel",children:s.jsx(Et,{size:14})})})}),s.jsx(ae,{side:"bottom",children:"Cancel"})]})}),s.jsx(le,{children:s.jsxs(re,{delayDuration:0,children:[s.jsx(ie,{asChild:!0,children:s.jsx("span",{className:"inline-block",children:s.jsx(G,{variant:"outline",size:"icon",className:"size-7 border border-input",disabled:ce,onClick:_e,"aria-label":"Save",children:ce?s.jsx(Pe,{size:14,className:"animate-spin"}):s.jsx(Xe,{size:14})})})}),s.jsx(ae,{side:"bottom",children:"Save"})]})})]}),e[46]=we,e[47]=_e,e[48]=Se,e[49]=ce,e[50]=X):X=e[50];let pe;e[51]===Symbol.for("react.memo_cache_sentinel")?(pe=()=>D(!0),e[51]=pe):pe=e[51];let ge;e[52]===Symbol.for("react.memo_cache_sentinel")?(ge=s.jsx(le,{children:s.jsxs(re,{delayDuration:0,children:[s.jsx(ie,{asChild:!0,children:s.jsx("span",{className:"inline-block",children:s.jsx(G,{variant:"outline",size:"icon",className:"size-7 border border-input",onClick:pe,"aria-label":"Share",children:s.jsx(Dt,{size:14})})})}),s.jsx(ae,{side:"bottom",children:"Share"})]})}),e[52]=ge):ge=e[52];const Ie=t.icon??"cpu_chip";let ee;e[53]!==Ie||e[54]!==i||e[55]!==t.title?(ee=s.jsx(gt,{title:t.title,url:i,icon:Ie}),e[53]=Ie,e[54]=i,e[55]=t.title,e[56]=ee):ee=e[56];let te;e[57]!==X||e[58]!==ee?(te=s.jsxs(Bt,{children:[X,ge,ee]}),e[57]=X,e[58]=ee,e[59]=te):te=e[59];let be;e[60]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx("div",{className:"flex h-full items-center justify-center",children:s.jsx(Pe,{size:32,className:"animate-spin text-muted-foreground"})}),e[60]=be):be=e[60];const Te=O==="settings"?s.jsx(is,{form:W,icon:t.icon}):O==="tools"?s.jsx(bt,{toolSet:T,onToolSetChange:q,excludeVirtualMcpId:n}):O==="resources"?s.jsx(Jt,{resourceSet:P,onResourceSetChange:H,connectionResources:b,excludeVirtualMcpId:n}):O==="prompts"?s.jsx(Gt,{promptSet:z,onPromptSetChange:tt,connectionPrompts:k,excludeVirtualMcpId:n}):null;let se;e[61]!==Te?(se=s.jsx(y.Suspense,{fallback:be,children:Te}),e[61]=Te,e[62]=se):se=e[62];let oe;e[63]!==O||e[64]!==se?(oe=s.jsx("div",{className:"flex h-full w-full bg-background overflow-hidden",children:s.jsx("div",{className:"flex-1 flex flex-col min-w-0 bg-background overflow-hidden",children:s.jsx("div",{className:"h-full overflow-auto",children:s.jsx(Ue,{children:se},O)})})}),e[63]=O,e[64]=se,e[65]=oe):oe=e[65];let ne;e[66]!==C||e[67]!==t?(ne=s.jsx(rs,{open:C,onOpenChange:D,virtualMcp:t}),e[66]=C,e[67]=t,e[68]=ne):ne=e[68];let je;return e[69]!==J||e[70]!==Z||e[71]!==te||e[72]!==oe||e[73]!==ne?(je=s.jsxs(Ot,{onBack:J,children:[Z,te,oe,ne]}),e[69]=J,e[70]=Z,e[71]=te,e[72]=oe,e[73]=ne,e[74]=je):je=e[74],je}function fs(o){return o.name}function hs(o){return{uri:o.uri,name:o.name,description:o.description}}function xs(o){return{name:o.name,description:o.description}}function ps(o){return o.id}function gs(){const o=M.c(10);let e;o[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/$org/agents/$agentId"},o[0]=e):e=o[0];const t=qe(e);let n;o[1]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},o[1]=n):n=o[1];const l=ot(n),{org:r}=l,i=l.agentId??l.virtualMcpId??"";let a;o[2]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},o[2]=a):a=o[2];const c=nt(a).tab||"settings",d=St(i);if(!d){let f;return o[3]!==t||o[4]!==r?(f=s.jsx("div",{className:"flex h-full w-full bg-background",children:s.jsx(ut,{title:"Agent not found",description:"This Agent may have been deleted or you may not have access.",actions:s.jsx(G,{variant:"outline",onClick:()=>t({to:"/$org/agents",params:{org:r}}),children:"Back to agents"})})}),o[3]=t,o[4]=r,o[5]=f):f=o[5],f}let u;return o[6]!==c||o[7]!==d||o[8]!==i?(u=s.jsx(us,{virtualMcp:d,virtualMcpId:i,requestedTabId:c}),o[6]=c,o[7]=d,o[8]=i,o[9]=u):u=o[9],u}function bs(){const o=M.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Ue,{children:s.jsx(y.Suspense,{fallback:s.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:s.jsx(Pe,{size:32,className:"animate-spin text-muted-foreground"})}),children:s.jsx(gs,{})})}),o[0]=e):e=o[0],e}function ro(){const o=M.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(bs,{}),o[0]=e):e=o[0],e}export{ro as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as g,j as a}from"./index-C8OOnmm1.js";import{i as b}from"./Loading01-Bf56vlFv.js";import{i as j}from"./SearchMd-Ns-pswyj.js";import{I as N}from"./input-CrR0FEof.js";import{c as v}from"./button-C83AQWC1.js";function E(h){const e=g.c(17),{value:n,onChange:c,placeholder:x,onKeyDown:m,className:f,isSearching:d}=h,p=x===void 0?"Search...":x;let s;e[0]!==f?(s=v("shrink-0 w-full border-b border-border h-12",f),e[0]=f,e[1]=s):s=e[1];let t;e[2]!==d?(t=d?a.jsx(b,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):a.jsx(j,{size:16,className:"text-muted-foreground shrink-0"}),e[2]=d,e[3]=t):t=e[3];let r;e[4]!==c?(r=u=>c(u.target.value),e[4]=c,e[5]=r):r=e[5];let o;e[6]!==m||e[7]!==p||e[8]!==r||e[9]!==n?(o=a.jsx(N,{value:n,onChange:r,onKeyDown:m,placeholder:p,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"}),e[6]=m,e[7]=p,e[8]=r,e[9]=n,e[10]=o):o=e[10];let l;e[11]!==t||e[12]!==o?(l=a.jsxs("label",{className:"flex items-center gap-2.5 h-12 px-4 cursor-text",children:[t,o]}),e[11]=t,e[12]=o,e[13]=l):l=e[13];let i;return e[14]!==s||e[15]!==l?(i=a.jsx("div",{className:s,children:l}),e[14]=s,e[15]=l,e[16]=i):i=e[16],i}export{E as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as T,bx as M,j as e,by as P,Y as q,r as R,ab as h,a as O}from"./index-C8OOnmm1.js";import{u as A}from"./useQuery-DNOH3p7p.js";import{u as _}from"./useMutation-C4aXMLv3.js";import{B as y}from"./button-C83AQWC1.js";import{C as N,a as v}from"./card-CbXWWn3M.js";import{i as L,a as U}from"./mcp-oauth-BkqLXiLL.js";import{c as C,C as K,a as k}from"./circle-alert-ChrxIBwd.js";const Q=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],D=C("external-link",Q);const H=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],w=C("loader-circle",H);const J=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Y=C("refresh-cw",J),B=t=>{const n=T.c(6);let i;n[0]!==t?({...i}=t,n[0]=t,n[1]=i):i=n[1];const{theme:a}=M(),d=a===void 0?"system":a;let r;n[2]===Symbol.for("react.memo_cache_sentinel")?(r={"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},n[2]=r):r=n[2];let m;return n[3]!==i||n[4]!==d?(m=e.jsx(P,{theme:d,className:"toaster group",style:r,...i}),n[3]=i,n[4]=d,n[5]=m):m=n[5],m},b={session:t=>["user-sandbox-session",t]};function V({sessionId:t,onComplete:n,onError:i}){const a=q(),[p,d]=R.useState(null),{data:r,isLoading:m,error:j}=A({queryKey:b.session(t),queryFn:async()=>{const s=await fetch(`/api/user-sandbox/sessions/${t}`);if(!s.ok){const o=await s.json();throw new Error(o.error||"Failed to load session")}return s.json()}}),F=_({mutationFn:async({appName:s,connectionId:o})=>{const l=await fetch(`/api/user-sandbox/sessions/${t}/configure`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({app_name:s,connection_id:o})});if(!l.ok){const u=await l.json();throw new Error(u.error||"Configuration failed")}return l.json()},onSuccess:()=>{a.invalidateQueries({queryKey:b.session(t)})}}),x=_({mutationFn:async()=>{const s=await fetch(`/api/user-sandbox/sessions/${t}/complete`,{method:"POST",headers:{"Content-Type":"application/json"}});if(!s.ok){const o=await s.json();throw new Error(o.error||"Failed to complete")}return s.json()},onSuccess:s=>{s.redirectUrl?window.location.href=s.redirectUrl:(h.success("Setup complete!"),a.invalidateQueries({queryKey:b.session(t)}),n?.({agentId:s.agentId,redirectUrl:s.redirectUrl}))},onError:s=>{const o=s instanceof Error?s:new Error("Failed to complete");h.error(o.message),i?.(o)}}),S=async s=>{d(s.app_name);try{const o=await fetch(`/api/user-sandbox/sessions/${t}/provision`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({app_name:s.app_name})});if(!o.ok){const g=await o.json();throw new Error(g.error||"Failed to provision connection")}const u=(await o.json()).connection_id;if(s.connection_type==="HTTP"||s.connection_type==="SSE"||s.connection_type==="Websocket"){const g=`/mcp/${u}`,z=await L({url:g,token:null});if(!z.isAuthenticated&&z.supportsOAuth){h.info("Opening authentication window...");const c=await U({connectionId:u,clientName:s.title,timeout:3e5});if(c.error)throw new Error(c.error);if(c.tokenInfo){const E=await fetch(`/api/connections/${u}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accessToken:c.tokenInfo.accessToken,refreshToken:c.tokenInfo.refreshToken,expiresIn:c.tokenInfo.expiresIn,scope:c.tokenInfo.scope,clientId:c.tokenInfo.clientId,clientSecret:c.tokenInfo.clientSecret,tokenEndpoint:c.tokenInfo.tokenEndpoint})});if(!E.ok){const $=await E.json().catch(()=>({}));throw new Error($.error||"Failed to save authentication tokens. Please try again.")}}}}await F.mutateAsync({appName:s.app_name,connectionId:u}),h.success(`${s.title} connected successfully`)}catch(o){console.error("Connection error:",o);const l=o instanceof Error?o:new Error("Failed to connect");h.error(l.message),i?.(l)}finally{d(null)}},I=r?.apps.every(s=>s.status.configured),f=r?.session.status==="completed";return m?e.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:e.jsx(w,{className:"size-8 animate-spin text-muted-foreground"})}):j?e.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:e.jsx(N,{className:"max-w-md w-full",children:e.jsx(v,{className:"pt-6",children:e.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[e.jsx("div",{className:"size-12 rounded-full bg-destructive/10 flex items-center justify-center",children:e.jsx(K,{className:"size-6 text-destructive"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Session Error"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:j instanceof Error?j.message:"Failed to load"})]})]})})})}):r?e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(B,{}),e.jsxs("div",{className:"max-w-lg mx-auto px-4 py-12",children:[e.jsxs("div",{className:"text-center mb-8",children:[r.template.icon&&e.jsx("div",{className:"size-16 mx-auto mb-4 rounded-xl bg-muted flex items-center justify-center overflow-hidden",children:e.jsx("img",{src:r.template.icon,alt:"",className:"size-10 object-contain"})}),e.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:r.template.title}),r.template.description&&e.jsx("p",{className:"text-muted-foreground mt-2",children:r.template.description})]}),f&&e.jsx(N,{className:"mb-6 border-green-500/20 bg-green-500/5",children:e.jsx(v,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"size-10 rounded-full bg-green-500/10 flex items-center justify-center",children:e.jsx(k,{className:"size-5 text-green-500"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:"Setup Complete"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Your integrations are ready to use."})]})]})})}),e.jsx("div",{className:"space-y-3",children:r.apps.map(s=>e.jsx(N,{children:e.jsx(v,{className:"py-4",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"size-10 rounded-lg bg-muted flex items-center justify-center shrink-0 overflow-hidden",children:s.icon?e.jsx("img",{src:s.icon,alt:"",className:"size-6 object-contain"}):e.jsx("span",{className:"text-lg",children:"📦"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-medium truncate",children:s.title}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s.status.configured?e.jsxs("span",{className:"text-green-600 dark:text-green-400 flex items-center gap-1",children:[e.jsx(k,{className:"size-3"})," Connected"]}):s.requires_oauth?"Requires authentication":"Ready to connect"})]}),!s.status.configured&&!f&&e.jsx(y,{size:"sm",onClick:()=>S(s),disabled:p!==null||x.isPending,children:p===s.app_name?e.jsxs(e.Fragment,{children:[e.jsx(w,{className:"size-4 mr-2 animate-spin"}),"Connecting..."]}):e.jsxs(e.Fragment,{children:[e.jsx(D,{className:"size-4 mr-2"}),"Connect"]})}),s.status.configured&&!f&&e.jsxs(y,{size:"sm",variant:"outline",onClick:()=>S(s),disabled:p!==null||x.isPending,children:[e.jsx(Y,{className:"size-4 mr-2"}),"Reconnect"]}),f&&e.jsx("div",{className:"size-8 rounded-full bg-green-500/10 flex items-center justify-center",children:e.jsx(k,{className:"size-4 text-green-500"})})]})})},s.app_name))}),I&&!f&&e.jsx("div",{className:"mt-6",children:e.jsx(y,{className:"w-full",size:"lg",onClick:()=>x.mutate(),disabled:x.isPending,children:x.isPending?e.jsxs(e.Fragment,{children:[e.jsx(w,{className:"size-4 mr-2 animate-spin"}),"Completing..."]}):"Complete Setup"})}),e.jsx("div",{className:"mt-8 pt-6 border-t text-center",children:e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Session expires:"," ",new Date(r.session.expires_at).toLocaleString()]})})]})]}):null}function oe(){const t=T.c(3);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/connect/$sessionId"},t[0]=n):n=t[0];const{sessionId:i}=O(n);let a;return t[1]!==i?(a=e.jsx(V,{sessionId:i}),t[1]=i,t[2]=a):a=t[2],a}export{oe as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as q,j as o,l as H,bj as X,r as Q,a as ce,u as ae,f as le,bt as me}from"./index-C8OOnmm1.js";import{E as G,I as Y}from"./empty-state-Cr5g6Vh9.js";import{E as Z}from"./error-boundary-Dg0Af8BA.js";import{b as de}from"./use-binding-C2mDgpbB.js";import{u as ue,S as pe}from"./index-c6ju_hIh.js";import{f as fe}from"./use-collections-CkAaybvR.js";import{u as J,a as he}from"./use-connection-TLrid9RM.js";import{u as xe}from"./constants-ytntCGH9.js";import{b as ge,c as be}from"./use-mcp-prompts-D5tApqEs.js";import{B as je}from"./button-C83AQWC1.js";import{R as ye}from"./resource-tabs-BsRvwnyx.js";import{i as ee}from"./Loading01-Bf56vlFv.js";import{V as te,a as Se,b as Ce}from"./layout-BGZtLEwK.js";import{C as ve}from"./collection-tab-BB_A78nH.js";import{C as oe}from"./collection-display-button-DlAEKbje.js";import{C as se}from"./collection-search-bOTNZP0b.js";import{C as ne}from"./collection-table-wrapper-Ch8oh2UW.js";import{P as re}from"./pin-to-sidebar-button-DbV8w54G.js";import{C as ie}from"./card-CbXWWn3M.js";import{R as Ne,T as Te}from"./tools-list-DesNUyav.js";import"./binder-Dh-m11Sm.js";import"./mcp-oauth-BkqLXiLL.js";import"./env-vars-editor-DXJo5cdV.js";import"./input-CrR0FEof.js";import"./Plus-CcqPpwU0.js";import"./Trash01-DVYV3BJw.js";import"./File06-C7QVLRp6.js";import"./Key01-CrwOIsjX.js";import"./badge-DfeUgg96.js";import"./dropdown-menu-CzQCi3DZ.js";import"./Grid01-C_dMOr-7.js";import"./form-BISYEAnP.js";import"./select-BlFReF6r.js";import"./tooltip-aHeHMhKh.js";import"./Check-CXkamnnr.js";import"./ChevronDown-DaqG_J6Z.js";import"./extract-connection-data-BYPMZtVW.js";import"./constants-CnfPGmdA.js";import"./github-icon-Dp3wHhYE.js";import"./registry-utils-DekIcM3F.js";import"./generate-id-Dyweu44Y.js";import"./Terminal-qZhwvVsv.js";import"./Users03-CSRHEIl2.js";import"./use-virtual-mcp-C8lLKpyG.js";import"./index-CmUKmcyS.js";import"./index-B-pYSGnK.js";import"./circle-alert-ChrxIBwd.js";import"./index-CIvJ2wFV.js";import"./X-Dz8JZ2ZX.js";import"./monaco-editor-gim9RLZ3.js";import"./infiniteQueryObserver-B1N6PF-z.js";import"./spinner-CwfYynNt.js";import"./localstorage-keys-N4jrVxvr.js";import"./useQuery-DNOH3p7p.js";import"./useMutation-C4aXMLv3.js";import"./popover-B2yKs5LA.js";import"./Image01-C6IcS9Ip.js";import"./SearchMd-Ns-pswyj.js";import"./dialog-D_ebnPDF.js";import"./AlertCircle--GzH2vta.js";import"./ArrowUp-BfBrilbk.js";import"./Edit01-7Ak8JL9W.js";import"./Copy01-CpBgXJFP.js";import"./use-create-virtual-mcp-Bi6QQFl1.js";import"./ArrowLeft-DzpTEYvO.js";import"./DotsVertical-D5MnD2QZ.js";import"./use-list-state-DuKw_MMV.js";import"./use-mobile-DQ806XzQ.js";import"./empty-state-CxA9hap0.js";import"./Inbox01-D1IW7Je7.js";import"./avatar-Cx4ORVtq.js";import"./alert-dialog-5t1wq8Xl.js";import"./List-d88_8fTd.js";import"./view-mode-toggle-jPeow5hv.js";import"./Pin01-DBKe5RmK.js";import"./use-organization-settings-C-IzAdi1.js";function we(t){const e=q.c(42),{prompts:n,connectionId:s,org:r,connectionTitle:d,connectionIcon:l,onPromptClick:b,showToolbar:T,emptyMessage:E}=t,I=T===void 0?!0:T,R=E===void 0?"This connection doesn't have any prompts yet.":E,u=H(),x=X().location.href,[j,f]=Q.useState(""),[g,i]=Q.useState("table"),[p,w]=Q.useState("name"),[m,D]=Q.useState("asc");let V;e[0]!==m||e[1]!==p?(V=h=>{p===h?(D(_e),m==="desc"&&w(void 0)):(w(h),D("asc"))},e[0]=m,e[1]=p,e[2]=V):V=e[2];const v=V;let k;e[3]!==s||e[4]!==u||e[5]!==b||e[6]!==r?(k=h=>{b?b(h):s&&r&&u({to:"/$org/mcps/$connectionId/$collectionName/$itemId",params:{org:r,connectionId:s,collectionName:"prompts",itemId:encodeURIComponent(h.name)}})},e[3]=s,e[4]=u,e[5]=b,e[6]=r,e[7]=k):k=e[7];const _=k;let $;if(e[8]!==n||e[9]!==j||e[10]!==m||e[11]!==p){const h=!n||n.length===0?[]:j.trim()?(()=>{const K=j.toLowerCase();return n.filter(B=>B.name.toLowerCase().includes(K)||B.description&&B.description.toLowerCase().includes(K))})():n;$=!p||!m?h:[...h].sort((K,B)=>{const F=K[p]||"",U=B[p]||"",W=String(F).localeCompare(String(U));return m==="asc"?W:-W}),e[8]=n,e[9]=j,e[10]=m,e[11]=p,e[12]=$}else $=e[12];const N=$;let O;e[13]===Symbol.for("react.memo_cache_sentinel")?(O=[{id:"name",header:"Name",render:ke,sortable:!0},{id:"description",header:"Description",render:Re,cellClassName:"flex-1",sortable:!0}],e[13]=O):O=e[13];const L=O;let a;e[14]===Symbol.for("react.memo_cache_sentinel")?(a=L.filter(Ie).map($e),e[14]=a):a=e[14];const A=a;let y;e[15]!==l||e[16]!==d||e[17]!==v||e[18]!==I||e[19]!==m||e[20]!==p||e[21]!==x||e[22]!==g?(y=I&&o.jsxs(te,{children:[o.jsx(oe,{viewMode:g,onViewModeChange:i,sortKey:p,sortDirection:m,onSort:v,sortOptions:A}),o.jsx(re,{title:d?`${d}: Prompts`:"Prompts",url:x,icon:l??"description"})]}),e[15]=l,e[16]=d,e[17]=v,e[18]=I,e[19]=m,e[20]=p,e[21]=x,e[22]=g,e[23]=y):y=e[23];let S;e[24]===Symbol.for("react.memo_cache_sentinel")?(S=h=>{h.key==="Escape"&&(f(""),h.target.blur())},e[24]=S):S=e[24];let C;e[25]!==j?(C=o.jsx(se,{value:j,onChange:f,placeholder:"Search prompts...",onKeyDown:S}),e[25]=j,e[26]=C):C=e[26];let c;e[27]!==R||e[28]!==_||e[29]!==v||e[30]!==j||e[31]!==m||e[32]!==p||e[33]!==N||e[34]!==g?(c=g==="cards"?o.jsx("div",{className:"flex-1 overflow-auto p-5",children:N.length===0?o.jsx(G,{image:null,title:j?"No prompts found":"No prompts available",description:j?"Try adjusting your search terms":R}):o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:N.map(h=>o.jsx(ie,{className:"cursor-pointer transition-colors",onClick:()=>_(h),children:o.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[o.jsx(Y,{icon:null,name:h.name,size:"md",className:"shrink-0 shadow-sm"}),o.jsxs("div",{className:"flex flex-col gap-0",children:[o.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:h.name}),o.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:h.description||"No description"})]})]})},h.name))})}):o.jsx(ne,{columns:L,data:N,isLoading:!1,sortKey:p,sortDirection:m,onSort:v,onRowClick:h=>_(h),emptyState:o.jsx(G,{image:null,title:j?"No prompts found":"No prompts available",description:j?"Try adjusting your search terms":R})}),e[27]=R,e[28]=_,e[29]=v,e[30]=j,e[31]=m,e[32]=p,e[33]=N,e[34]=g,e[35]=c):c=e[35];let P;e[36]!==C||e[37]!==c?(P=o.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[C,c]}),e[36]=C,e[37]=c,e[38]=P):P=e[38];let M;return e[39]!==P||e[40]!==y?(M=o.jsxs(o.Fragment,{children:[y,P]}),e[39]=P,e[40]=y,e[41]=M):M=e[41],M}function $e(t){return{id:t.id,label:typeof t.header=="string"?t.header:t.id}}function Ie(t){return t.sortable}function Re(t){return o.jsx("span",{className:"text-sm text-foreground",children:t.description||"—"})}function ke(t){return o.jsx("span",{className:"text-sm font-medium font-mono text-foreground",children:t.name})}function _e(t){return t==="asc"?"desc":t==="desc"?null:"asc"}function Le(t){const e=q.c(6),{prompts:n,connectionId:s,org:r}=t,d=J(s),l=d?.title,b=d?.icon;let T;return e[0]!==s||e[1]!==r||e[2]!==n||e[3]!==l||e[4]!==b?(T=o.jsx(we,{prompts:n,connectionId:s,org:r,connectionTitle:l,connectionIcon:b}),e[0]=s,e[1]=r,e[2]=n,e[3]=l,e[4]=b,e[5]=T):T=e[5],T}function Pe(t){const e=q.c(2),{repository:n}=t;let s;return e[0]!==n?(s=o.jsx("div",{className:"flex-1 overflow-y-auto bg-background",children:o.jsx(Ne,{repository:n})}),e[0]=n,e[1]=s):s=e[1],s}function Me(t){const e=q.c(39),{resources:n,connectionTitle:s,connectionIcon:r,onResourceClick:d,showToolbar:l,emptyMessage:b}=t,T=l===void 0?!0:l,E=b===void 0?"This connection doesn't have any resources yet.":b,R=X().location.href,[u,z]=Q.useState(""),[x,j]=Q.useState("table"),[f,g]=Q.useState("name"),[i,p]=Q.useState("asc");let w;e[0]!==i||e[1]!==f?(w=c=>{f===c?(p(Ue),i==="desc"&&g(void 0)):(g(c),p("asc"))},e[0]=i,e[1]=f,e[2]=w):w=e[2];const m=w;let D;e[3]!==d?(D=c=>{d&&d(c)},e[3]=d,e[4]=D):D=e[4];const V=D;let v;if(e[5]!==n||e[6]!==u||e[7]!==i||e[8]!==f){const c=!n||n.length===0?[]:u.trim()?(()=>{const P=u.toLowerCase();return n.filter(M=>M.uri.toLowerCase().includes(P)||M.name&&M.name.toLowerCase().includes(P)||M.description&&M.description.toLowerCase().includes(P))})():n;v=!f||!i?c:[...c].sort((P,M)=>{const h=P[f]||"",K=M[f]||"",B=String(h).localeCompare(String(K));return i==="asc"?B:-B}),e[5]=n,e[6]=u,e[7]=i,e[8]=f,e[9]=v}else v=e[9];const k=v;let _;e[10]===Symbol.for("react.memo_cache_sentinel")?(_=[{id:"name",header:"Name",render:Be,sortable:!0},{id:"uri",header:"URI",render:Oe,sortable:!0},{id:"description",header:"Description",render:De,cellClassName:"flex-1",sortable:!0},{id:"mimeType",header:"Type",render:Ee,sortable:!0}],e[10]=_):_=e[10];const $=_;let N;e[11]===Symbol.for("react.memo_cache_sentinel")?(N=$.filter(Ae).map(Ve),e[11]=N):N=e[11];const O=N;let L;e[12]!==r||e[13]!==s||e[14]!==m||e[15]!==T||e[16]!==i||e[17]!==f||e[18]!==R||e[19]!==x?(L=T&&o.jsxs(te,{children:[o.jsx(oe,{viewMode:x,onViewModeChange:j,sortKey:f,sortDirection:i,onSort:m,sortOptions:O}),o.jsx(re,{title:s?`${s}: Resources`:"Resources",url:R,icon:r??"folder"})]}),e[12]=r,e[13]=s,e[14]=m,e[15]=T,e[16]=i,e[17]=f,e[18]=R,e[19]=x,e[20]=L):L=e[20];let a;e[21]===Symbol.for("react.memo_cache_sentinel")?(a=c=>{c.key==="Escape"&&(z(""),c.target.blur())},e[21]=a):a=e[21];let A;e[22]!==u?(A=o.jsx(se,{value:u,onChange:z,placeholder:"Search resources...",onKeyDown:a}),e[22]=u,e[23]=A):A=e[23];let y;e[24]!==E||e[25]!==V||e[26]!==m||e[27]!==u||e[28]!==i||e[29]!==f||e[30]!==k||e[31]!==x?(y=x==="cards"?o.jsx("div",{className:"flex-1 overflow-auto p-5",children:k.length===0?o.jsx(G,{image:null,title:u?"No resources found":"No resources available",description:u?"Try adjusting your search terms":E}):o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:k.map(c=>o.jsx(ie,{className:"cursor-pointer transition-colors",onClick:()=>V(c),children:o.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[o.jsx(Y,{icon:null,name:c.name||c.uri,size:"md",className:"shrink-0 shadow-sm"}),o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:c.name||c.uri}),o.jsx("p",{className:"text-xs font-mono text-muted-foreground truncate",children:c.uri}),c.description&&o.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 mt-1",children:c.description})]})]})},c.uri))})}):o.jsx(ne,{columns:$,data:k,isLoading:!1,sortKey:f,sortDirection:i,onSort:m,onRowClick:c=>V(c),emptyState:o.jsx(G,{image:null,title:u?"No resources found":"No resources available",description:u?"Try adjusting your search terms":E})}),e[24]=E,e[25]=V,e[26]=m,e[27]=u,e[28]=i,e[29]=f,e[30]=k,e[31]=x,e[32]=y):y=e[32];let S;e[33]!==A||e[34]!==y?(S=o.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[A,y]}),e[33]=A,e[34]=y,e[35]=S):S=e[35];let C;return e[36]!==S||e[37]!==L?(C=o.jsxs(o.Fragment,{children:[L,S]}),e[36]=S,e[37]=L,e[38]=C):C=e[38],C}function Ve(t){return{id:t.id,label:typeof t.header=="string"?t.header:t.id}}function Ae(t){return t.sortable}function Ee(t){return o.jsx("span",{className:"text-sm text-muted-foreground",children:t.mimeType||"—"})}function De(t){return o.jsx("span",{className:"text-sm text-foreground",children:t.description||"—"})}function Oe(t){return o.jsx("span",{className:"text-sm font-mono text-muted-foreground",children:t.uri})}function Be(t){return o.jsx("span",{className:"text-sm font-medium text-foreground",children:t.name||t.uri})}function Ue(t){return t==="asc"?"desc":t==="desc"?null:"asc"}function Ke(t){const e=q.c(6),{resources:n,connectionId:s,org:r}=t,d=J(s),l=d?.title,b=d?.icon;let T;return e[0]!==s||e[1]!==r||e[2]!==n||e[3]!==l||e[4]!==b?(T=o.jsx(Me,{resources:n,connectionId:s,org:r,connectionTitle:l,connectionIcon:b}),e[0]=s,e[1]=r,e[2]=n,e[3]=l,e[4]=b,e[5]=T):T=e[5],T}function ze(t){const e=q.c(5),{tools:n,connectionId:s,org:r,isLoading:d}=t;let l;return e[0]!==s||e[1]!==d||e[2]!==r||e[3]!==n?(l=o.jsx(Te,{tools:n,connectionId:s,org:r,isLoading:d}),e[0]=s,e[1]=d,e[2]=r,e[3]=n,e[4]=l):l=e[4],l}function Qe(t){const e=q.c(66),{connection:n,connectionId:s,org:r,requestedTabId:d,collections:l,onUpdate:b,isUpdating:T,prompts:E,resources:I,tools:R,isLoadingTools:u}=t,z=me();let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x={from:"/$org/mcps/$connectionId"},e[0]=x):x=e[0];const j=H(x);let f;e[1]!==s?(f={connectionId:s},e[1]=s,e[2]=f):f=e[2];const g=ue(f),i=g.isAuthenticated,p=n?.metadata?.repository,w=!!p?.url,m=R.length,D=E.length,V=I.length,v=m>0||u;let k;e[3]===Symbol.for("react.memo_cache_sentinel")?(k={id:"settings",label:"Settings"},e[3]=k):k=e[3];let _;e[4]!==u||e[5]!==i||e[6]!==v||e[7]!==m?(_=i&&v?[{id:"tools",label:"Tools",count:u?void 0:m}]:[],e[4]=u,e[5]=i,e[6]=v,e[7]=m,e[8]=_):_=e[8];let $;e[9]!==i||e[10]!==D?($=i&&D>0?[{id:"prompts",label:"Prompts",count:D}]:[],e[9]=i,e[10]=D,e[11]=$):$=e[11];let N;e[12]!==i||e[13]!==V?(N=i&&V>0?[{id:"resources",label:"Resources",count:V}]:[],e[12]=i,e[13]=V,e[14]=N):N=e[14];let O;if(e[15]!==l||e[16]!==w||e[17]!==i||e[18]!==_||e[19]!==$||e[20]!==N){let U;e[22]!==w?(U=w?[{id:"readme",label:"README"}]:[],e[22]=w,e[23]=U):U=e[23],O=[k,..._,...$,...N,...i?(l||[]).map(qe):[],...U],e[15]=l,e[16]=w,e[17]=i,e[18]=_,e[19]=$,e[20]=N,e[21]=O}else O=e[21];const L=O,a=L.some(U=>U.id===d)?d:"settings";let A;e[24]!==j?(A=U=>{j({search:W=>({...W,tab:U}),replace:!0})},e[24]=j,e[25]=A):A=e[25];const y=A;let S;e[26]!==l?(S=l||[],e[26]=l,e[27]=S):S=e[27];let C;if(e[28]!==a||e[29]!==S){let U;e[31]!==a?(U=W=>W.name===a,e[31]=a,e[32]=U):U=e[32],C=S.find(U),e[28]=a,e[29]=S,e[30]=C}else C=e[30];const c=C;let P;e[33]!==z.history?(P=()=>z.history.back(),e[33]=z.history,e[34]=P):P=e[34];let M;e[35]!==a||e[36]!==y||e[37]!==L?(M=o.jsx(Se,{children:o.jsx(ye,{tabs:L,activeTab:a,onTabChange:y})}),e[35]=a,e[36]=y,e[37]=L,e[38]=M):M=e[38];let h;e[39]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(ee,{size:32,className:"animate-spin text-muted-foreground"})}),e[39]=h):h=e[39];let K;e[40]!==c||e[41]!==a||e[42]!==g.hasOAuthToken||e[43]!==g.isServerError||e[44]!==g.supportsOAuth||e[45]!==n||e[46]!==s||e[47]!==y||e[48]!==w||e[49]!==u||e[50]!==i||e[51]!==T||e[52]!==b||e[53]!==r||e[54]!==E||e[55]!==p||e[56]!==I||e[57]!==R?(K=o.jsx(Q.Suspense,{fallback:h,children:a==="tools"?o.jsx(ze,{tools:R,connectionId:s,org:r,isLoading:u}):a==="prompts"?o.jsx(Le,{prompts:E,connectionId:s,org:r}):a==="resources"?o.jsx(Ke,{resources:I,connectionId:s,org:r}):a==="settings"?o.jsx(pe,{connection:n,onUpdate:b,isUpdating:T,isMCPAuthenticated:i,supportsOAuth:g.supportsOAuth,hasOAuthToken:g.hasOAuthToken,isServerError:g.isServerError,onViewReadme:w?()=>y("readme"):void 0}):a==="readme"&&w?o.jsx(Pe,{repository:p}):c&&i?o.jsx(ve,{connectionId:s,org:r,activeCollection:c},a):o.jsx(G,{title:"Collection not found",description:"This collection may have been deleted or you may not have access."})}),e[40]=c,e[41]=a,e[42]=g.hasOAuthToken,e[43]=g.isServerError,e[44]=g.supportsOAuth,e[45]=n,e[46]=s,e[47]=y,e[48]=w,e[49]=u,e[50]=i,e[51]=T,e[52]=b,e[53]=r,e[54]=E,e[55]=p,e[56]=I,e[57]=R,e[58]=K):K=e[58];let B;e[59]!==a||e[60]!==K?(B=o.jsx("div",{className:"flex h-full w-full bg-background overflow-hidden",children:o.jsx("div",{className:"flex-1 flex flex-col min-w-0 bg-background overflow-auto",children:o.jsx(Z,{children:K},a)})}),e[59]=a,e[60]=K,e[61]=B):B=e[61];let F;return e[62]!==P||e[63]!==M||e[64]!==B?(F=o.jsxs(Ce,{onBack:P,children:[M,B]}),e[62]=P,e[63]=M,e[64]=B,e[65]=F):F=e[65],F}function qe(t){return{id:t.name,label:t.displayName}}function Fe(){const t=q.c(43);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/$org/mcps/$connectionId"},t[0]=e):e=t[0];const n=H(e);let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org/mcps/$connectionId"},t[1]=s):s=t[1];const{connectionId:r,org:d}=ce(s),{org:l}=ae();let b;t[2]===Symbol.for("react.memo_cache_sentinel")?(b={from:"/shell/$org/mcps/$connectionId"},t[2]=b):b=t[2];const E=le(b).tab||"settings",I=J(r),R=he(),u=de(I??void 0);let z;t[3]!==r||t[4]!==l.id?(z={connectionId:r,orgId:l.id},t[3]=r,t[4]=l.id,t[5]=z):z=t[5];const x=xe(z);let j;t[6]!==x?(j={client:x},t[6]=x,t[7]=j):j=t[7];const{data:f}=ge(j);let g;t[8]!==x?(g={client:x},t[8]=x,t[9]=g):g=t[9];const{data:i}=be(g),p=I?.tools&&I.tools.length>0,w=!p;let m;t[10]!==x||t[11]!==w?(m={client:x,enabled:w},t[10]=x,t[11]=w,t[12]=m):m=t[12];const{data:D,isLoading:V}=fe(m);let v;t[13]!==f?.prompts?(v=f?.prompts??[],t[13]=f?.prompts,t[14]=v):v=t[14];let k;t[15]!==v?(k=v.map(He),t[15]=v,t[16]=k):k=t[16];const _=k;let $;t[17]!==i?.resources?($=i?.resources??[],t[17]=i?.resources,t[18]=$):$=t[18];let N;t[19]!==$?(N=$.map(Ge),t[19]=$,t[20]=N):N=t[20];const O=N;let L;t[21]!==I||t[22]!==p||t[23]!==D?.tools?(L=p?I.tools??[]:(D?.tools??[]).map(We),t[21]=I,t[22]=p,t[23]=D?.tools,t[24]=L):L=t[24];const a=L;let A;t[25]!==R.update||t[26]!==r?(A=async C=>{await R.update.mutateAsync({id:r,data:C})},t[25]=R.update,t[26]=r,t[27]=A):A=t[27];const y=A;if(!I){let C;return t[28]!==n||t[29]!==d?(C=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(G,{title:"Connection not found",description:"This connection may have been deleted or you may not have access.",actions:o.jsx(je,{variant:"outline",onClick:()=>n({to:"/$org/mcps",params:{org:d}}),children:"Back to connections"})})}),t[28]=n,t[29]=d,t[30]=C):C=t[30],C}let S;return t[31]!==R.update.isPending||t[32]!==u||t[33]!==I||t[34]!==r||t[35]!==y||t[36]!==V||t[37]!==d||t[38]!==_||t[39]!==E||t[40]!==O||t[41]!==a?(S=o.jsx(Qe,{org:d,connection:I,connectionId:r,requestedTabId:E,collections:u,onUpdate:y,isUpdating:R.update.isPending,prompts:_,resources:O,tools:a,isLoadingTools:V}),t[31]=R.update.isPending,t[32]=u,t[33]=I,t[34]=r,t[35]=y,t[36]=V,t[37]=d,t[38]=_,t[39]=E,t[40]=O,t[41]=a,t[42]=S):S=t[42],S}function We(t){return{name:t.name,description:t.description,inputSchema:t.inputSchema}}function Ge(t){return{uri:t.uri,name:t.name,description:t.description}}function He(t){return{name:t.name,description:t.description}}function Je(){const t=q.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(Z,{children:o.jsx(Q.Suspense,{fallback:o.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:o.jsx(ee,{size:32,className:"animate-spin text-muted-foreground"})}),children:o.jsx(Fe,{})})}),t[0]=e):e=t[0],e}function yo(){const t=q.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(Je,{}),t[0]=e):e=t[0],e}export{yo as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{E as t,F as a}from"./index-C8OOnmm1.js";const e=t(a,{target:"draft-7"});export{e as B};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c,j as i,G as p,H as f,I as m,J as g,M as x,Q as v,U as b,W as w,X as h}from"./index-C8OOnmm1.js";import{i as j}from"./Grid01-C_dMOr-7.js";import{c as u}from"./button-C83AQWC1.js";function M(s){const e=c.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let o;return e[2]!==t?(o=i.jsx(p,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=o):o=e[3],o}function S(s){const e=c.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let o;return e[2]!==t?(o=i.jsx(f,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=o):o=e[3],o}function $(s){const e=c.c(10);let t,o,a;e[0]!==s?({className:t,sideOffset:a,...o}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=a):(t=e[1],o=e[2],a=e[3]);const n=a===void 0?4:a;let r;e[4]!==t?(r=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let d;return e[6]!==o||e[7]!==n||e[8]!==r?(d=i.jsx(m,{children:i.jsx(g,{"data-slot":"dropdown-menu-content",sideOffset:n,className:r,...o})}),e[6]=o,e[7]=n,e[8]=r,e[9]=d):d=e[9],d}function y(s){const e=c.c(12);let t,o,a,n;e[0]!==s?({className:t,inset:o,variant:n,...a}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=a,e[4]=n):(t=e[1],o=e[2],a=e[3],n=e[4]);const r=n===void 0?"default":n;let d;e[5]!==t?(d=u("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-pointer 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",t),e[5]=t,e[6]=d):d=e[6];let l;return e[7]!==o||e[8]!==a||e[9]!==d||e[10]!==r?(l=i.jsx(x,{"data-slot":"dropdown-menu-item","data-inset":o,"data-variant":r,className:d,...a}),e[7]=o,e[8]=a,e[9]=d,e[10]=r,e[11]=l):l=e[11],l}function _(s){const e=c.c(8);let t,o;e[0]!==s?({className:t,...o}=s,e[0]=s,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let a;e[3]!==t?(a=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=a):a=e[4];let n;return e[5]!==o||e[6]!==a?(n=i.jsx(h,{"data-slot":"dropdown-menu-separator",className:a,...o}),e[5]=o,e[6]=a,e[7]=n):n=e[7],n}function C(s){const e=c.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let o;return e[2]!==t?(o=i.jsx(v,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=o):o=e[3],o}function T(s){const e=c.c(13);let t,o,a,n;e[0]!==s?({className:o,inset:a,children:t,...n}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=a,e[4]=n):(t=e[1],o=e[2],a=e[3],n=e[4]);let r;e[5]!==o?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",o),e[5]=o,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(j,{className:"ml-auto size-4"}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==a||e[10]!==n||e[11]!==r?(l=i.jsxs(b,{"data-slot":"dropdown-menu-sub-trigger","data-inset":a,className:r,...n,children:[t,d]}),e[8]=t,e[9]=a,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function I(s){const e=c.c(8);let t,o;e[0]!==s?({className:t,...o}=s,e[0]=s,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let a;e[3]!==t?(a=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=a):a=e[4];let n;return e[5]!==o||e[6]!==a?(n=i.jsx(w,{"data-slot":"dropdown-menu-sub-content",className:a,...o}),e[5]=o,e[6]=a,e[7]=n):n=e[7],n}export{M as D,S as a,$ as b,y as c,C as d,T as e,I as f,_ as g};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/grid-view-BzgHSliB.js","assets/index-C8OOnmm1.js","assets/index-cFLiAqt_.css","assets/button-C83AQWC1.js","assets/AlertCircle--GzH2vta.js","assets/Download01-4Tu3o0-K.js","assets/File06-C7QVLRp6.js","assets/Image01-C6IcS9Ip.js","assets/Loading01-Bf56vlFv.js","assets/Trash01-DVYV3BJw.js","assets/Upload01-CCAaxnrW.js","assets/useMutation-C4aXMLv3.js","assets/useQuery-DNOH3p7p.js","assets/useInfiniteQuery-BUOCgX3w.js","assets/infiniteQueryObserver-B1N6PF-z.js","assets/checkbox-DcPieRc5.js","assets/Check-CXkamnnr.js","assets/Grid01-C_dMOr-7.js","assets/Home02-Cfg1gm8U.js","assets/List-d88_8fTd.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as M,c as K,bu as Q,bv as A,Y as X,j as t,ab as L,bw as ee,$ as te}from"./index-C8OOnmm1.js";import{u as se}from"./useInfiniteQuery-BUOCgX3w.js";import{B as _,c as W}from"./button-C83AQWC1.js";import{C as $}from"./checkbox-DcPieRc5.js";import{i as ae}from"./AlertCircle--GzH2vta.js";import{c as H,i as ie}from"./Grid01-C_dMOr-7.js";import{n as re}from"./Download01-4Tu3o0-K.js";import{a as oe}from"./Home02-Cfg1gm8U.js";import{i as V}from"./List-d88_8fTd.js";import{i as D}from"./Loading01-Bf56vlFv.js";import{s as J}from"./Trash01-DVYV3BJw.js";import{i as U}from"./Upload01-CCAaxnrW.js";import{u as G}from"./useMutation-C4aXMLv3.js";const Z=({size:s=24,color:e="currentColor",...a})=>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",...a},M.createElement("path",{d:"M14 11H8m2 4H8m8-8H8m12-.2v10.4c0 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 2h6.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C20 4.28 20 5.12 20 6.8Z"}));Z.displayName="File02";const Y=({size:s=24,color:e="currentColor",...a})=>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",...a},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"}));Y.displayName="FolderPlus";const R={objects:(s,e,a=!1,o=100)=>["object-storage","objects",s,e,{flat:a,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 a;e[0]!==s?(a=s===void 0?{}:s,e[0]=s,e[1]=a):a=e[1];const o=a,{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 i=>{const{pageParam:r}=i;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:w,isFetchingNextPage:g,hasNextPage:y,fetchNextPage:h,error:z}=se(E);let v;if(l){let i;e[15]!==p?.pages?(i=p?.pages.flatMap(he).filter(pe).map(xe)??[],e[15]=p?.pages,e[16]=i):i=e[16],v=i}else{let i;if(e[17]!==p?.pages){const r=p?.pages[0]?.commonPrefixes?.map(ue)??[],j=p?.pages.flatMap(de)??[];i=[...r.sort(ce),...j],e[17]=p?.pages,e[18]=i}else i=e[18];v=i}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=z;let k;return e[23]!==g||e[24]!==w||e[25]!==C||e[26]!==v||e[27]!==P||e[28]!==F?(k={objects:v,isLoading:w,isFetchingMore:g,hasMore:F,loadMore:C,error:P},e[23]=g,e[24]=w,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"],a=1024,o=Math.floor(Math.log(s)/Math.log(a));return`${parseFloat((s/Math.pow(a,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=[],a=s.split("/").filter(Boolean);let o="";for(const n of a)o+=n+"/",e.push({name:n,path:o});return e}function $e(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(()=>ee(()=>import("./grid-view-BzgHSliB.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])));function be(s){const e=K.c(50),{item:a,selected:o,showFullPath:n,onSelect:x,onNavigate:d,onDownload:m,onDelete:l}=s,c=n===void 0?!1:n;let b;e[0]!==a.key||e[1]!==c?(b=c?a.key:I(a.key),e[0]=a.key,e[1]=c,e[2]=b):b=e[2];const S=b;let f;e[3]!==x||e[4]!==o?(f=t.jsx($,{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]!==a.isFolder||e[7]!==a.key||e[8]!==d?(u=()=>a.isFolder?d(a.key):void 0,e[6]=a.isFolder,e[7]=a.key,e[8]=d,e[9]=u):u=e[9];const E=a.isFolder&&"cursor-pointer hover:text-primary";let p;e[10]!==E?(p=W("flex items-center gap-2 flex-1 min-w-0 text-left",E),e[10]=E,e[11]=p):p=e[11];let w;e[12]!==a.isFolder?(w=a.isFolder?t.jsx(te,{size:18,className:"text-amber-500 shrink-0"}):t.jsx(Z,{size:18,className:"text-muted-foreground shrink-0"}),e[12]=a.isFolder,e[13]=w):w=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]!==w||e[19]!==g?(y=t.jsxs("button",{type:"button",onClick:u,className:p,children:[w,g]}),e[16]=u,e[17]=p,e[18]=w,e[19]=g,e[20]=y):y=e[20];let h;e[21]!==a.isFolder||e[22]!==a.size?(h=a.isFolder?"-":je(a.size),e[21]=a.isFolder,e[22]=a.size,e[23]=h):h=e[23];let z;e[24]!==h?(z=t.jsx("span",{className:"text-sm text-muted-foreground w-20 text-right shrink-0",children:h}),e[24]=h,e[25]=z):z=e[25];let v;e[26]!==a.isFolder||e[27]!==a.lastModified?(v=a.isFolder?"-":ye(a.lastModified),e[26]=a.isFolder,e[27]=a.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]!==a.isFolder||e[32]!==a.key||e[33]!==m?(C=!a.isFolder&&t.jsx(_,{variant:"ghost",size:"sm",className:"size-7 p-0",onClick:()=>m(a.key),children:t.jsx(re,{size:14})}),e[31]=a.isFolder,e[32]=a.key,e[33]=m,e[34]=C):C=e[34];let F;e[35]!==a.key||e[36]!==l?(F=()=>l(a.key),e[35]=a.key,e[36]=l,e[37]=F):F=e[37];let P;e[38]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(J,{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 i;e[41]!==C||e[42]!==k?(i=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]=i):i=e[43];let r;return e[44]!==z||e[45]!==N||e[46]!==i||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,z,N,i]}),e[44]=z,e[45]=N,e[46]=i,e[47]=f,e[48]=y,e[49]=r):r=e[49],r}function q(s){const e=K.c(8),{prefix:a,onNavigate:o}=s;let n;if(e[0]!==o||e[1]!==a){const x=ve(a);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(ie,{size:14,className:"text-muted-foreground"}),t.jsx("button",{type:"button",onClick:()=>o(c.path),className:W("hover:text-primary",b===x.length-1?"font-medium text-foreground":"text-muted-foreground"),children:c.name})]},c.path))]}),e[0]=o,e[1]=a,e[2]=n}else n=e[2];return n}function ke(){const{path:s="",flat:e=!1,view:a="table"}=A.useSearch({from:"/"}),o=A.useNavigate(),[n,x]=M.useState(new Set),d=i=>{x(new Set),o({to:"/",search:{path:i||void 0,flat:e,view:a}})},m=i=>{x(new Set),o({to:"/",search:{path:i?void 0:s||void 0,flat:i,view:a}})},l=i=>{x(new Set),o({to:"/",search:{path:s||void 0,flat:e,view:i}})},c=M.useRef(null),b=X(),{connectionId:S,toolCaller:f}=Q(),{objects:u,isLoading:E,isFetchingMore:p,hasMore:w,loadMore:g,error:y}=le({prefix:s,flat:e}),h=G({mutationFn:async i=>{const r=s+i.name,{url:j}=await f("PUT_PRESIGNED_URL",{key:r,contentType:i.type||"application/octet-stream"}),T=await fetch(j,{method:"PUT",body:i,headers:{"Content-Type":i.type||"application/octet-stream"}});if(!T.ok)throw new Error(`Upload failed: ${T.statusText}`);return r},onSuccess:i=>{L.success(`Uploaded ${I(i)}`),b.invalidateQueries({queryKey:R.objects(S,s)})},onError:i=>{L.error(`Upload failed: ${i.message}`)}}),z=G({mutationFn:async i=>i.length===1&&i[0]?f("DELETE_OBJECT",{key:i[0]}):f("DELETE_OBJECTS",{keys:i}),onSuccess:()=>{L.success("Deleted successfully"),x(new Set),b.invalidateQueries({queryKey:R.objects(S,s)})},onError:i=>{L.error(`Delete failed: ${i.message}`)}}),v=async i=>{try{const{url:r}=await f("GET_PRESIGNED_URL",{key:i}),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(i),document.body.appendChild(B),B.click(),document.body.removeChild(B),URL.revokeObjectURL(O)}catch(r){L.error(`Download failed: ${r instanceof Error?r.message:"Unknown error"}`)}},N=i=>{const r=i.target.files;if(r){for(const j of Array.from(r))h.mutate(j);i.target.value=""}},C=(i,r)=>{const j=new Set(n);r?j.add(i):j.delete(i),x(j)},F=i=>{x(i?new Set(u.map(r=>r.key)):new Set)},P=()=>{n.size!==0&&z.mutate(Array.from(n))},k=i=>{if(!w||p)return;const r=i.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(ae,{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})]}):a==="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(q,{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($,{checked:!e,onCheckedChange:i=>m(!i)}),t.jsx("span",{className:"text-muted-foreground",children:"Show as directories"})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(_,{variant:a==="grid"?"secondary":"ghost",size:"sm",className:"size-8 p-0",onClick:()=>l("grid"),children:t.jsx(H,{size:16})}),t.jsx(_,{variant:a==="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(D,{size:14,className:"mr-1 animate-spin"}):t.jsx(U,{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(D,{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(q,{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($,{checked:!e,onCheckedChange:i=>m(!i)}),t.jsx("span",{className:"text-muted-foreground",children:"Show as directories"})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(_,{variant:a==="grid"?"secondary":"ghost",size:"sm",className:"size-8 p-0",onClick:()=>l("grid"),children:t.jsx(H,{size:16})}),t.jsx(_,{variant:a==="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:z.isPending,children:[t.jsx(J,{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(D,{size:14,className:"mr-1 animate-spin"}):t.jsx(U,{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($,{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(D,{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(Y,{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(U,{size:14,className:"mr-1"}),"Upload files"]})]}):t.jsxs(t.Fragment,{children:[u.map(i=>t.jsx(be,{item:i,selected:n.has(i.key),showFullPath:e,onSelect:r=>C(i.key,r),onNavigate:d,onDownload:v,onDelete:r=>z.mutate([r])},i.key)),p&&t.jsx("div",{className:"flex justify-center py-4",children:t.jsx(D,{size:20,className:"animate-spin text-muted-foreground"})})]})})]})}const Ue=Object.freeze(Object.defineProperty({__proto__:null,default:ke},Symbol.toStringTag,{value:"Module"}));export{R as K,$e as a,Ue as b,je as f,I as g,Z as i,Y as s,le as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as v,c as M,bu as D,j as s,Y as q,ab as w,$ as H}from"./index-C8OOnmm1.js";import{K as L,u as Z,g as R,s as Q,a as W,i as I,f as U}from"./file-browser-2RP-n1Xp.js";import{c as $,B as E}from"./button-C83AQWC1.js";import{i as S}from"./AlertCircle--GzH2vta.js";import{n as A}from"./Download01-4Tu3o0-K.js";import{i as J}from"./File06-C7QVLRp6.js";import{a as P}from"./Image01-C6IcS9Ip.js";import{i as T}from"./Loading01-Bf56vlFv.js";import{s as V}from"./Trash01-DVYV3BJw.js";import{i as Y}from"./Upload01-CCAaxnrW.js";import{u as _}from"./useMutation-C4aXMLv3.js";import{u as X}from"./useQuery-DNOH3p7p.js";import"./useInfiniteQuery-BUOCgX3w.js";import"./infiniteQueryObserver-B1N6PF-z.js";import"./checkbox-DcPieRc5.js";import"./Check-CXkamnnr.js";import"./Grid01-C_dMOr-7.js";import"./Home02-Cfg1gm8U.js";import"./List-d88_8fTd.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 b;e[7]!==u||e[8]!==a||e[9]!==f?(b={queryKey:a,queryFn:f,enabled:u,staleTime:3e5,gcTime:6e5},e[7]=u,e[8]=a,e[9]=f,e[10]=b):b=e[10];const{data:k,isLoading:x,error:j}=X(b);let p;e[11]!==d?(p=$("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]!==k||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})}):k?s.jsx("img",{src:k,alt:g||t,className:"w-full h-full object-cover",loading:"lazy"}):null,e[13]=g,e[14]=j,e[15]=k,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:I,File02:I,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]||I;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 b=!a&&"p-4",k=t.isFolder?"cursor-pointer":"cursor-default";let x;e[9]!==b||e[10]!==k?(x=$("flex flex-col items-center justify-center w-full h-full",b,k),e[9]=b,e[10]=k,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:$(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 Fe({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}),b=_({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}`)}}),k=_({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))b.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=>k.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{Fe as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as f,j as s,g as I,r as C,bd as F,l as E,Y as O,ab as w}from"./index-C8OOnmm1.js";import{C as k}from"./card-CbXWWn3M.js";import{c as y,B as $}from"./button-C83AQWC1.js";import{A as R}from"./avatar-Cx4ORVtq.js";import{i as D}from"./AlertCircle--GzH2vta.js";import{i as H}from"./Check-CXkamnnr.js";import{s as G}from"./Plus-CcqPpwU0.js";import{i as Q}from"./SearchMd-Ns-pswyj.js";import{s as q}from"./XClose-BhgPfyG3.js";import{I as B}from"./input-CrR0FEof.js";import{C as T}from"./create-organization-dialog-GjXRxTaj.js";import"./alert-dialog-5t1wq8Xl.js";import"./form-BISYEAnP.js";import"./spinner-CwfYynNt.js";import"./useMutation-C4aXMLv3.js";function U(t){const e=f.c(10),{children:n,className:l,onNavigate:i,showHoverRing:r}=t,d=r===void 0?!1:r;let o;e[0]!==i?(o=p=>{i&&i(p)},e[0]=i,e[1]=o):o=e[1];const m=o,x=i&&"cursor-pointer",a=d&&"hover:ring-2 hover:ring-primary";let c;e[2]!==l||e[3]!==x||e[4]!==a?(c=y("group transition-all flex flex-col gap-0",x,a,l),e[2]=l,e[3]=x,e[4]=a,e[5]=c):c=e[5];let g;return e[6]!==n||e[7]!==m||e[8]!==c?(g=s.jsx(k,{className:c,onClick:m,children:n}),e[6]=n,e[7]=m,e[8]=c,e[9]=g):g=e[9],g}function M(t){const e=f.c(7),{url:n,fallback:l,shape:i,size:r,objectFit:d,className:o}=t,m=i===void 0?"square":i,x=r===void 0?"lg":r,a=d===void 0?"contain":d;let c;return e[0]!==o||e[1]!==l||e[2]!==a||e[3]!==m||e[4]!==x||e[5]!==n?(c=s.jsx(R,{url:n,fallback:l,shape:m,size:x,objectFit:a,className:o}),e[0]=o,e[1]=l,e[2]=a,e[3]=m,e[4]=x,e[5]=n,e[6]=c):c=e[6],c}function Y(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("p-4 flex flex-col gap-4",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function P(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("font-medium truncate",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("p",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function V(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("text-sm text-muted-foreground truncate",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("h3",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function X(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("flex flex-col gap-[2px]",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function J(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("flex justify-between items-start",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function K(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("p-4 border-t border-border flex justify-between items-center",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function W(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("flex items-center text-xs text-muted-foreground",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function Z(){const t=f.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex justify-between items-start",children:s.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg animate-pulse"})}),t[0]=e):e=t[0];let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[e,s.jsxs("div",{className:"flex flex-col gap-[2px]",children:[s.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg animate-pulse"}),s.jsx("div",{className:"h-4 w-40 bg-muted rounded-lg animate-pulse"})]})]}),t[1]=n):n=t[1];let l;return t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs(k,{className:"group transition-colors flex flex-col",children:[n,s.jsxs("div",{className:"p-4 border-t border-border flex justify-between items-center",children:[s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]}),t[2]=l):l=t[2],l}const u=Object.assign(U,{Avatar:M,AvatarSection:J,Header:Y,Title:P,Subtitle:V,Content:X,Footer:K,Badge:W,Skeleton:Z}),ee={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8"},te={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8"},se={1:"@min-3xl:grid-cols-1",2:"@min-3xl:grid-cols-2",3:"@min-3xl:grid-cols-3",4:"@min-3xl:grid-cols-4",5:"@min-3xl:grid-cols-5",6:"@min-3xl:grid-cols-6",7:"@min-3xl:grid-cols-7",8:"@min-3xl:grid-cols-8"},ie={1:"@min-6xl:grid-cols-1",2:"@min-6xl:grid-cols-2",3:"@min-6xl:grid-cols-3",4:"@min-6xl:grid-cols-4",5:"@min-6xl:grid-cols-5",6:"@min-6xl:grid-cols-6",7:"@min-6xl:grid-cols-7",8:"@min-6xl:grid-cols-8"},le={1:"@min-7xl:grid-cols-1",2:"@min-7xl:grid-cols-2",3:"@min-7xl:grid-cols-3",4:"@min-7xl:grid-cols-4",5:"@min-7xl:grid-cols-5",6:"@min-7xl:grid-cols-6",7:"@min-7xl:grid-cols-7",8:"@min-7xl:grid-cols-8"},ne={1:"@min-8xl:grid-cols-1",2:"@min-8xl:grid-cols-2",3:"@min-8xl:grid-cols-3",4:"@min-8xl:grid-cols-4",5:"@min-8xl:grid-cols-5",6:"@min-8xl:grid-cols-6",7:"@min-8xl:grid-cols-7",8:"@min-8xl:grid-cols-8"};function L(t){const e=f.c(13),{children:n,columns:l,gap:i,className:r}=t;let d;e[0]!==l?(d=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=d):d=e[1];const o=d,x=ee[i===void 0?4:i],a=o.sm&&te[o.sm],c=o.md&&se[o.md],g=o.lg&&ie[o.lg],p=o.xl&&le[o.xl],v=o["2xl"]&&ne[o["2xl"]];let N;e[2]!==r||e[3]!==x||e[4]!==a||e[5]!==c||e[6]!==g||e[7]!==p||e[8]!==v?(N=y("w-full grid",x,a,c,g,p,v,r),e[2]=r,e[3]=x,e[4]=a,e[5]=c,e[6]=g,e[7]=p,e[8]=v,e[9]=N):N=e[9];const b=N;let h;return e[10]!==n||e[11]!==b?(h=s.jsx("div",{className:b,children:n}),e[10]=n,e[11]=b,e[12]=h):h=e[12],h}function re(t){const e=f.c(9),{count:n,columns:l,gap:i,className:r}=t,d=n===void 0?8:n;let o;e[0]!==l?(o=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=o):o=e[1];const m=o,x=i===void 0?4:i;let a;e[2]!==d?(a=Array.from({length:d}).map(ae),e[2]=d,e[3]=a):a=e[3];let c;return e[4]!==r||e[5]!==m||e[6]!==x||e[7]!==a?(c=s.jsx(L,{columns:m,gap:x,className:r,children:a}),e[4]=r,e[5]=m,e[6]=x,e[7]=a,e[8]=c):c=e[8],c}function ae(t,e){return s.jsxs("div",{className:"bg-card hover:bg-accent transition-colors flex flex-col rounded-lg animate-pulse",children:[s.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[s.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg"}),s.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"}),s.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"})]}),s.jsxs("div",{className:"p-4 border-t border-border flex items-center",children:[s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"}),s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]},e)}const A=Object.assign(L,{Skeleton:re});function oe({invitation:t}){const[e,n]=C.useState(!1),[l,i]=C.useState(!1),r=O(),d=E(),o=async()=>{n(!0);try{const a=await I.organization.acceptInvitation({invitationId:t.id});if(a.error)w.error(a.error.message),n(!1);else{const c=await I.organization.setActive({organizationId:t.organizationId});c?.data?.slug?(w.success("Invitation accepted!"),d({to:"/$org",params:{org:c.data.slug}})):(w.success("Invitation accepted! Redirecting..."),d({to:"/"}))}}catch{w.error("Failed to accept invitation"),n(!1)}},m=async()=>{i(!0);try{const a=await I.organization.rejectInvitation({invitationId:t.id});a.error?(w.error(a.error.message),i(!1)):(w.success("Invitation rejected"),await r.invalidateQueries(),i(!1))}catch{w.error("Failed to reject invitation"),i(!1)}},x=t.organizationName||t.organizationId;return s.jsxs(u,{className:"border-dashed",children:[s.jsxs(u.Header,{children:[s.jsx(u.AvatarSection,{children:s.jsx(u.Avatar,{url:"",fallback:x,size:"lg",objectFit:"contain"})}),s.jsxs(u.Content,{children:[s.jsx(u.Subtitle,{children:"You've been invited to join"}),s.jsx(u.Title,{children:x})]})]}),s.jsx(u.Footer,{className:"border-t border-dashed",children:s.jsxs("div",{className:"flex h-3.5 items-center gap-2 w-full",children:[s.jsx($,{onClick:o,disabled:e||l,className:"flex-1",size:"sm",children:e?"Accepting...":s.jsxs(s.Fragment,{children:[s.jsx(H,{size:16}),"Accept"]})}),s.jsx($,{variant:"outline",onClick:m,disabled:e||l,className:"flex-1",size:"sm",children:l?"Declining...":s.jsxs(s.Fragment,{children:[s.jsx(q,{size:16}),"Decline"]})})]})})]})}function ce({query:t}){const e=C.useContext(F),{data:n}=e.hooks.useListUserInvitations(),i=(n??[]).filter(d=>d.status==="pending"&&new Date(d.expiresAt)>new Date),r=t?(()=>{const d=t.toLowerCase();return i.filter(o=>o.organizationName?.toLowerCase().includes(d)||o.organizationId.toLowerCase().includes(d))})():i;return r.length===0?null:s.jsxs("div",{className:"mb-16",children:[s.jsx("h2",{className:"text-lg font-medium pb-2 border-b border-border/50 mb-6 px-2",children:"Invitations"}),s.jsx(A,{columns:{sm:2,md:3,lg:4},children:r.map(d=>s.jsx(oe,{invitation:d},d.id))})]})}function de(t){const e=f.c(14),{query:n}=t,{data:l}=I.useListOrganizations(),i=E();let r;e[0]!==l||e[1]!==n?(r=l?n?(()=>{const a=n.toLowerCase();return l.filter(c=>c.name.toLowerCase().includes(a)||c.slug.toLowerCase().includes(a))})():l:[],e[0]=l,e[1]=n,e[2]=r):r=e[2];const d=r;if(!l||l.length===0){let a;return e[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:s.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"No organizations yet. Create your first organization to get started."})}),e[3]=a):a=e[3],a}if(d.length===0){let a;return e[4]!==n?(a=s.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:s.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:['No organizations found matching "',n,'".']})}),e[4]=n,e[5]=a):a=e[5],a}let o;e[6]===Symbol.for("react.memo_cache_sentinel")?(o={sm:2,md:3,lg:4},e[6]=o):o=e[6];let m;if(e[7]!==d||e[8]!==i){let a;e[10]!==i?(a=c=>s.jsxs(u,{onNavigate:()=>i({to:"/$org",params:{org:c.slug}}),children:[s.jsxs(u.Header,{children:[s.jsx(u.AvatarSection,{children:s.jsx(u.Avatar,{url:c.logo||"",fallback:c.name,size:"lg",objectFit:"contain"})}),s.jsxs(u.Content,{children:[s.jsxs(u.Subtitle,{children:["@",c.slug]}),s.jsx(u.Title,{children:c.name})]})]}),s.jsx(u.Footer,{children:s.jsxs("div",{className:"flex h-3.5 items-center text-xs text-muted-foreground",children:["Created:"," ",new Date(c.createdAt).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})]})})]},c.id),e[10]=i,e[11]=a):a=e[11],m=d.map(a),e[7]=d,e[8]=i,e[9]=m}else m=e[9];let x;return e[12]!==m?(x=s.jsx(A,{columns:o,children:m}),e[12]=m,e[13]=x):x=e[13],x}function me(t){const e=f.c(3),{error:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(D,{size:24,className:"text-destructive"}),e[0]=l):l=e[0];let i;return e[1]!==n.message?(i=s.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:[l,s.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:["Error loading organizations: ",n.message]})]}),e[1]=n.message,e[2]=i):i=e[2],i}function xe(){const t=f.c(27),{error:e,isPending:n}=I.useListOrganizations(),[l,i]=C.useState(""),[r,d]=C.useState(!1),o=C.useDeferredValue(l);if(n){let j;return t[0]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("div",{className:"max-w-6xl mx-auto p-8",children:s.jsx("div",{className:"@container",children:s.jsx(A.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}})})}),t[0]=j):j=t[0],j}if(e){let j;return t[1]!==e?(j=s.jsx("div",{className:"max-w-6xl mx-auto p-8",children:s.jsx(me,{error:e})}),t[1]=e,t[2]=j):j=t[2],j}let m;t[3]!==o?(m=s.jsx(C.Suspense,{fallback:null,children:s.jsx(ce,{query:o})}),t[3]=o,t[4]=m):m=t[4];let x;t[5]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("h2",{className:"text-lg font-medium",children:"My organizations"}),t[5]=x):x=t[5];let a;t[6]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Q,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),t[6]=a):a=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=j=>i(j.target.value),t[7]=c):c=t[7];let g;t[8]!==l?(g=s.jsxs("div",{className:"relative",children:[a,s.jsx(B,{className:"pl-8 h-8 w-52 border-none shadow-none focus-visible:ring-0",placeholder:"Search organizations...",value:l,onChange:c})]}),t[8]=l,t[9]=g):g=t[9];let p;t[10]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs($,{size:"sm",onClick:()=>d(!0),children:[s.jsx(G,{size:16}),s.jsx("span",{children:"New organization"})]}),t[10]=p):p=t[10];let v;t[11]!==g?(v=s.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-border/50 mb-6 px-2",children:[x,s.jsxs("div",{className:"flex items-center gap-3",children:[g,p]})]}),t[11]=g,t[12]=v):v=t[12];let N;t[13]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(A.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}}),t[13]=N):N=t[13];let b;t[14]!==o?(b=s.jsx(C.Suspense,{fallback:N,children:s.jsx(de,{query:o})}),t[14]=o,t[15]=b):b=t[15];let h;t[16]!==v||t[17]!==b?(h=s.jsxs("div",{children:[v,b]}),t[16]=v,t[17]=b,t[18]=h):h=t[18];let S;t[19]!==m||t[20]!==h?(S=s.jsxs("div",{className:"@container",children:[m,h]}),t[19]=m,t[20]=h,t[21]=S):S=t[21];let z;t[22]!==r?(z=s.jsx(T,{open:r,onOpenChange:d}),t[22]=r,t[23]=z):z=t[23];let _;return t[24]!==S||t[25]!==z?(_=s.jsxs("div",{className:"max-w-6xl mx-auto p-8",children:[S,z]}),t[24]=S,t[25]=z,t[26]=_):_=t[26],_}function _e(){const t=f.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"min-h-full",children:s.jsx(xe,{})}),t[0]=e):e=t[0],e}export{_e as default};
|