@decocms/mesh 2.18.0 → 2.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-CahACZDg.js → AlertCircle-DZfqNByx.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DlLOWSTj.js → ArrowLeft-Cd6RM4A6.js} +1 -1
- package/dist/client/assets/{ArrowUp-Ck0taqJi.js → ArrowUp-VMKONnWJ.js} +1 -1
- package/dist/client/assets/{Check-Cjgi2ZiG.js → Check-Clnl6VO2.js} +1 -1
- package/dist/client/assets/{ChevronDown-BuVzyKHq.js → ChevronDown-CUCzTkUk.js} +1 -1
- package/dist/client/assets/{Code01-XpAoNs3W.js → Code01-BAik7hF-.js} +1 -1
- package/dist/client/assets/{Copy01-De4SwxDv.js → Copy01-CCfh45Hm.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-D-Bv2U6B.js → DotsHorizontal-H1CDe03p.js} +1 -1
- package/dist/client/assets/{DotsVertical-BhTwPxq7.js → DotsVertical-CubHWPM8.js} +1 -1
- package/dist/client/assets/{Download01-DhkFfGKV.js → Download01-DUxaWCdv.js} +1 -1
- package/dist/client/assets/{Edit01-DsRHb45T.js → Edit01-tXex8wx0.js} +1 -1
- package/dist/client/assets/{File06-BiIPMtEV.js → File06-1GHbOIr4.js} +1 -1
- package/dist/client/assets/{FilterLines-C_UJwG_t.js → FilterLines-Ttp2swRG.js} +1 -1
- package/dist/client/assets/{FlipBackward-CQnTJKeB.js → FlipBackward-BkcMu9OY.js} +1 -1
- package/dist/client/assets/{GitBranch01-ClS9Bk6n.js → GitBranch01-V6D4YBhB.js} +1 -1
- package/dist/client/assets/{Grid01-CRALWbj6.js → Grid01-Bf8eAyhK.js} +1 -1
- package/dist/client/assets/{Home02-ofwnyeoV.js → Home02-8q2bbK8n.js} +1 -1
- package/dist/client/assets/{Image01-Cb4gQMH4.js → Image01-Ba0mxAoN.js} +1 -1
- package/dist/client/assets/{Inbox01-CKGdnZFH.js → Inbox01-BvYPvM_p.js} +1 -1
- package/dist/client/assets/{InfoCircle-_4UsKVMw.js → InfoCircle-DKA0-FHH.js} +1 -1
- package/dist/client/assets/{Key01-BFJBGJng.js → Key01-CrI4HON6.js} +1 -1
- package/dist/client/assets/{LinkExternal01-C1dAUI0b.js → LinkExternal01-CqAE-za3.js} +1 -1
- package/dist/client/assets/{List-DOmOO2Cw.js → List-C6tpn114.js} +1 -1
- package/dist/client/assets/{Loading01-JwelopeC.js → Loading01-wy6i08TR.js} +1 -1
- package/dist/client/assets/{Lock01-B7TIX2sZ.js → Lock01-CGlDIBQ9.js} +1 -1
- package/dist/client/assets/{Play-CMKLF_6n.js → Play-BvhASZjZ.js} +1 -1
- package/dist/client/assets/{Plus-Df2M6Ns2.js → Plus-DaMIylfN.js} +1 -1
- package/dist/client/assets/{SearchMd-Cgfgcbdz.js → SearchMd-DsK25qy7.js} +1 -1
- package/dist/client/assets/{Terminal-C8LHfiOW.js → Terminal-cal0VHQd.js} +1 -1
- package/dist/client/assets/{Trash01-KvZ0cVo9.js → Trash01-pB5oOXYU.js} +1 -1
- package/dist/client/assets/{Upload01-TiwmYxO-.js → Upload01-BRGUFGKZ.js} +1 -1
- package/dist/client/assets/{X-DhyaYbLb.js → X-Bq7VzczH.js} +1 -1
- package/dist/client/assets/{XClose-2bShEltc.js → XClose-zOphE63W.js} +1 -1
- package/dist/client/assets/{alert-dialog-gZhceV_v.js → alert-dialog-BBkPKiLO.js} +1 -1
- package/dist/client/assets/{auth-catchall-Dz8qCpUP.js → auth-catchall-D7-AwG4p.js} +1 -1
- package/dist/client/assets/{avatar-d8M8JpvZ.js → avatar-CumXES9B.js} +1 -1
- package/dist/client/assets/{badge-CKe-ib_i.js → badge-tnyrO2LA.js} +1 -1
- package/dist/client/assets/{binder-iKe3ndXq.js → binder-BxHiGQ64.js} +1 -1
- package/dist/client/assets/{button-DXl1hVqx.js → button-BQMZIX_4.js} +1 -1
- package/dist/client/assets/{card-D0GcpRPY.js → card-B-rrjyBF.js} +1 -1
- package/dist/client/assets/{checkbox-D1tHbcIN.js → checkbox-CJvAgYlu.js} +1 -1
- package/dist/client/assets/{collection-detail-BQkjgYb7.js → collection-detail-w6psdBlt.js} +1 -1
- package/dist/client/assets/{collection-display-button-B_KC-ent.js → collection-display-button-Bi_NXbuN.js} +1 -1
- package/dist/client/assets/{collection-header-BA9HTLmg.js → collection-header-BfNxri-N.js} +1 -1
- package/dist/client/assets/{collection-page-CDkTC45g.js → collection-page-DJtrTRMH.js} +1 -1
- package/dist/client/assets/{collection-search-pUdl1eNx.js → collection-search-9baWd84b.js} +1 -1
- package/dist/client/assets/{collection-tab-BofyxU3Y.js → collection-tab-Ct4krCcB.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-wARoPZXo.js → collection-table-wrapper-Cu-yqUsH.js} +1 -1
- package/dist/client/assets/{connection-ByVJuREK.js → connection-BdWKvn2K.js} +1 -1
- package/dist/client/assets/{connection-card-DjK0GZ2u.js → connection-card-CwhA62aK.js} +1 -1
- package/dist/client/assets/{connection-detail-BGizcg4Z.js → connection-detail-BvvvvXz6.js} +1 -1
- package/dist/client/assets/{connections-B3vaIw3-.js → connections-CfRRCGSZ.js} +1 -1
- package/dist/client/assets/constants-BoL9C76L.js +1 -0
- package/dist/client/assets/{create-organization-dialog-DKwU0dfN.js → create-organization-dialog-gxAB4wwP.js} +1 -1
- package/dist/client/assets/{dialog-1B3YWWMu.js → dialog-BOTxth8M.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Hp4qYTud.js → dropdown-menu-Cwg_0qoi.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-j2gEmQEr.js → dynamic-plugin-layout-DcLqC1O8.js} +1 -1
- package/dist/client/assets/{empty-state-D-JjObLi.js → empty-state-2SJ3WxPr.js} +1 -1
- package/dist/client/assets/{empty-state-C7Gr5Tg2.js → empty-state-DeORHrTg.js} +1 -1
- package/dist/client/assets/{env-vars-editor-D4XTsyk0.js → env-vars-editor-qkfhYptd.js} +1 -1
- package/dist/client/assets/{error-boundary-rr4tK3fB.js → error-boundary-KUKN2TxD.js} +1 -1
- package/dist/client/assets/{extract-connection-data-37AfzoCx.js → extract-connection-data-37AfJqs-.js} +1 -1
- package/dist/client/assets/{file-browser-BECnO7FM.js → file-browser-D3uR2C9M.js} +2 -2
- package/dist/client/assets/{form-BQupN7IV.js → form-o9xmUpnK.js} +1 -1
- package/dist/client/assets/gateway-detail-B6zUy6TE.js +1 -0
- package/dist/client/assets/{gateways-jpQl136Z.js → gateways-fe-SAKln.js} +1 -1
- package/dist/client/assets/{grid-view-BwLKimb0.js → grid-view-vZ2Zpkzy.js} +1 -1
- package/dist/client/assets/{home-9vMYPTYi.js → home-OB-BKE3S.js} +1 -1
- package/dist/client/assets/{index-D0CzZUCs.js → index-BGlkGnRh.js} +1 -1
- package/dist/client/assets/{index-DEuqpeVv.js → index-BdoGlqOh.js} +2 -2
- package/dist/client/assets/{index-Bpy9plQL.js → index-DB3RU6w4.js} +1 -1
- package/dist/client/assets/{index-u_K3efbu.js → index-DuoIQX0P.js} +1 -1
- package/dist/client/assets/{index-DVolwMvn.js → index-nfXEOl8p.js} +31 -31
- package/dist/client/assets/{infiniteQueryObserver-BXdaScti.js → infiniteQueryObserver-B-zosqIG.js} +1 -1
- package/dist/client/assets/{input-CqqzkfyF.js → input-B0JGK4qg.js} +1 -1
- package/dist/client/assets/{layout-D7T4rJzl.js → layout-LCGR_e4n.js} +1 -1
- package/dist/client/assets/{lazy-highlighter-U-fd28FU.js → lazy-highlighter-7Ygumnp-.js} +1 -1
- package/dist/client/assets/{localstorage-keys-kemGZMIp.js → localstorage-keys-DJgrMpsR.js} +1 -1
- package/dist/client/assets/{login-AsctHrUh.js → login-CPHiXmVM.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DqZqwRXe.js → mcp-oauth-DHBNZNZN.js} +1 -1
- package/dist/client/assets/{mcp-server-card-DfoQ5M8z.js → mcp-server-card-CCJD8rY5.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-GLsULv7B.js → mcp-server-detail-B2BLpdBe.js} +1 -1
- package/dist/client/assets/{members-eia2aN0I.js → members-BUKGWKo1.js} +1 -1
- package/dist/client/assets/{monaco-editor-rl0nEzOU.js → monaco-editor-2dgkKSmS.js} +1 -1
- package/dist/client/assets/{monitoring-DWEGkU9y.js → monitoring-Co2ahvWI.js} +1 -1
- package/dist/client/assets/{oauth-callback-BFr0fBNT.js → oauth-callback-DqMgYj7o.js} +1 -1
- package/dist/client/assets/{page-GoE2bJQh.js → page-CUhEXv2W.js} +1 -1
- package/dist/client/assets/{page-BeG_Zpat.js → page-Xy2zuFaN.js} +1 -1
- package/dist/client/assets/{pin-to-sidebar-button-CrzVxc9I.js → pin-to-sidebar-button-BcuLv1ea.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-CvQbqnfg.js → plugin-empty-state-BMZ2lKdt.js} +1 -1
- package/dist/client/assets/{plugin-header-BaWUIpLx.js → plugin-header-CzG6IJ7x.js} +1 -1
- package/dist/client/assets/{plugins-Q7uqmYFh.js → plugins-DrfogMhA.js} +1 -1
- package/dist/client/assets/{popover-BcOo6EXw.js → popover-CXUBdgho.js} +1 -1
- package/dist/client/assets/{project-context-provider-Dn1-l4h2.js → project-context-provider-DhgIBvJ2.js} +1 -1
- package/dist/client/assets/{registry-utils-85b65tFI.js → registry-utils-C1MEHnjt.js} +1 -1
- package/dist/client/assets/{resizable-DkFmgcsj.js → resizable-CwvNlApq.js} +1 -1
- package/dist/client/assets/{resource-tabs-DkDSMlFB.js → resource-tabs-BnWaqzvN.js} +1 -1
- package/dist/client/assets/{select-Bv7J3zlQ.js → select--nDzC8in.js} +1 -1
- package/dist/client/assets/{settings-BK8QvMDL.js → settings-18XrU-68.js} +1 -1
- package/dist/client/assets/shell-layout-DPrrZeqr.js +3 -0
- package/dist/client/assets/{spinner-D0hdWfev.js → spinner-BJxZd1VB.js} +1 -1
- package/dist/client/assets/{switch-ugX7u7WU.js → switch-BFRma3Oi.js} +1 -1
- package/dist/client/assets/{textarea-BUrXtpl5.js → textarea-CZGp5M36.js} +1 -1
- package/dist/client/assets/{tool-set-selector-a1uFioE0.js → tool-set-selector-D-ihTeCw.js} +1 -1
- package/dist/client/assets/{tools-list-DpFBj-bw.js → tools-list-DdaO5B-A.js} +1 -1
- package/dist/client/assets/{tooltip-vUrxHIt0.js → tooltip-DSjdME5j.js} +1 -1
- package/dist/client/assets/{typewriter-title-7_SusDya.js → typewriter-title-D3pHLziM.js} +1 -1
- package/dist/client/assets/{use-binding-B0VMz_Ex.js → use-binding-CdMfLY85.js} +1 -1
- package/dist/client/assets/{use-collections-Cflasxiq.js → use-collections-B_r4T3b1.js} +1 -1
- package/dist/client/assets/{use-connection-DhRUkVvI.js → use-connection-W2V2j8pE.js} +1 -1
- package/dist/client/assets/{use-connection-resources-C-wyp48q.js → use-connection-resources-_fz_82N5.js} +1 -1
- package/dist/client/assets/{use-create-gateway-DMkdPgfy.js → use-create-gateway-DGaCqRhz.js} +1 -1
- package/dist/client/assets/{use-gateway-D5VVN1xE.js → use-gateway-CijYzCU9.js} +1 -1
- package/dist/client/assets/use-gateway-system-prompt-CusPzWe3.js +1 -0
- package/dist/client/assets/{use-list-state-BYREPRxy.js → use-list-state-DNPGmD9A.js} +1 -1
- package/dist/client/assets/{use-mcp-CZeMxRgK.js → use-mcp-fzL3ILVj.js} +1 -1
- package/dist/client/assets/{use-members-Bi0eIvBO.js → use-members-Cs5znkoZ.js} +1 -1
- package/dist/client/assets/{use-mobile-CI2w7svc.js → use-mobile-DPzmQj9d.js} +1 -1
- package/dist/client/assets/{use-organization-settings-D0kNSjbq.js → use-organization-settings-sFF34W-p.js} +1 -1
- package/dist/client/assets/{use-tool-call-CoI4ZCZe.js → use-tool-call-CCdok443.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Bx9UQHNH.js +1 -0
- package/dist/client/assets/{useMutation-xcmVYLP7.js → useMutation-mOecCzvG.js} +1 -1
- package/dist/client/assets/useQuery-B_cnJjvx.js +1 -0
- package/dist/client/assets/{value-C7rJ457O.js → value-C7yMc_BN.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-CTWk8Dkt.js → view-mode-toggle-DdRtk7o-.js} +1 -1
- package/dist/client/assets/{workflow-ClKgdB2v.js → workflow-Ca7LNIxD.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +11 -11
- package/dist/server/server.js +11 -11
- package/package.json +1 -1
- package/dist/client/assets/constants-DQVDVC-J.js +0 -1
- package/dist/client/assets/gateway-detail-B1f7bt6s.js +0 -1
- package/dist/client/assets/shell-layout-DImgzYtx.js +0 -3
- package/dist/client/assets/use-gateway-system-prompt-B3fSaA6r.js +0 -1
- package/dist/client/assets/useInfiniteQuery-ckN_t7ea.js +0 -1
- package/dist/client/assets/useQuery-BKyLWvSZ.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as ee,j as t,r as te,f as oe}from"./index-
|
|
1
|
+
import{c as ee,j as t,r as te,f as oe}from"./index-BdoGlqOh.js";import{C as re}from"./collection-header-BfNxri-N.js";import{C as ie}from"./collection-page-DJtrTRMH.js";import{C as ne}from"./collection-search-9baWd84b.js";import{C as ae}from"./collection-table-wrapper-Cu-yqUsH.js";import{C as le}from"./connection-card-CwhA62aK.js";import{E as W,I as ce}from"./empty-state-DeORHrTg.js";import{E as de}from"./error-boundary-KUKN2TxD.js";import{u as me,a as ue,i as x}from"./use-gateway-CijYzCU9.js";import{u as pe,s as J}from"./use-list-state-DNPGmD9A.js";import{u as ge}from"./use-create-gateway-DGaCqRhz.js";import{u as he}from"./project-context-provider-DhgIBvJ2.js";import{c as fe,b as xe,d as je,A as Ce,e as we,g as ye,a as Ne,f as De}from"./alert-dialog-BBkPKiLO.js";import{B as se}from"./badge-tnyrO2LA.js";import{B as q}from"./button-BQMZIX_4.js";import{b as Q,D as U,a as X,c as O}from"./dropdown-menu-Cwg_0qoi.js";import{i as Y}from"./DotsVertical-CubHWPM8.js";import{i as Se}from"./Loading01-wy6i08TR.js";import{s as Z}from"./Trash01-pB5oOXYU.js";import"./collection-display-button-Bi_NXbuN.js";import"./ArrowUp-VMKONnWJ.js";import"./Check-Clnl6VO2.js";import"./Grid01-Bf8eAyhK.js";import"./List-C6tpn114.js";import"./tooltip-DSjdME5j.js";import"./view-mode-toggle-DdRtk7o-.js";import"./SearchMd-DsK25qy7.js";import"./input-B0JGK4qg.js";import"./card-B-rrjyBF.js";import"./connection-BdWKvn2K.js";import"./use-collections-B_r4T3b1.js";import"./useMutation-mOecCzvG.js";import"./use-mobile-DPzmQj9d.js";function ve(e,r){switch(r.type){case"delete":return{mode:"deleting",gateway:r.gateway};case"close":return{mode:"idle"}}}function be(){const e=ee.c(63),{org:r}=he(),n=oe();let j;e[0]!==r.slug?(j={namespace:r.slug,resource:"gateways"},e[0]=r.slug,e[1]=j):j=e[1];const s=pe(j),f=me(s);let C;e[2]===Symbol.for("react.memo_cache_sentinel")?(C={navigateOnCreate:!0},e[2]=C):C=e[2];const{createGateway:B,isCreating:w}=ge(C),G=ue();let y;e[3]===Symbol.for("react.memo_cache_sentinel")?(y={mode:"idle"},e[3]=y):y=e[3];const[i,N]=te.useReducer(ve,y);let D;e[4]!==G||e[5]!==i.gateway||e[6]!==i.mode?(D=async()=>{if(i.mode!=="deleting")return;const o=i.gateway.id;N({type:"close"});try{await G.delete.mutateAsync(o)}catch{}},e[4]=G,e[5]=i.gateway,e[6]=i.mode,e[7]=D):D=e[7];const R=D;let S,v,b,k,_,A;e[8]===Symbol.for("react.memo_cache_sentinel")?(S={id:"icon",header:"",render:Ke,cellClassName:"w-16 shrink-0",wrap:!0},v={id:"title",header:"Name",render:Pe,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},b={id:"description",header:"Description",render:Ee,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},k={id:"mode",header:"Mode",accessor:$e,cellClassName:"w-[100px]"},_={id:"connections",header:"Connections",render:ze,cellClassName:"w-24 shrink-0"},A={id:"status",header:"Status",render:Me,cellClassName:"w-24 shrink-0",sortable:!0},e[8]=S,e[9]=v,e[10]=b,e[11]=k,e[12]=_,e[13]=A):(S=e[8],v=e[9],b=e[10],k=e[11],_=e[12],A=e[13]);let I;e[14]!==n||e[15]!==r.slug?(I=[S,v,b,k,_,A,{id:"actions",header:"",render:o=>t.jsxs(Q,{children:[t.jsx(U,{asChild:!0,children:t.jsx(q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Ie,children:t.jsx(Y,{size:20})})}),t.jsxs(X,{align:"end",onClick:Ae,children:[t.jsxs(O,{onClick:a=>{a.stopPropagation(),n({to:"/$org/gateways/$gatewayId",params:{org:r.slug,gatewayId:o.id}})},children:[t.jsx(J,{size:16}),"Open"]}),t.jsxs(O,{variant:"destructive",onClick:a=>{a.stopPropagation(),N({type:"delete",gateway:o})},children:[t.jsx(Z,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"}],e[14]=n,e[15]=r.slug,e[16]=I):I=e[16];const T=I,V=w?"Creating...":"Create Agent";let M;e[17]!==B||e[18]!==w||e[19]!==V?(M=t.jsx(q,{onClick:B,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:w,children:V}),e[17]=B,e[18]=w,e[19]=V,e[20]=M):M=e[20];const H=M,L=i.mode==="deleting";let z;e[21]===Symbol.for("react.memo_cache_sentinel")?(z=o=>!o&&N({type:"close"}),e[21]=z):z=e[21];let $;e[22]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(fe,{children:"Delete Agent?"}),e[22]=$):$=e[22];const F=i.mode==="deleting"&&i.gateway.title;let l;e[23]!==F?(l=t.jsxs(xe,{children:[$,t.jsxs(je,{children:["This action cannot be undone. This will permanently delete"," ",t.jsx("span",{className:"font-medium text-foreground",children:F}),"."]})]}),e[23]=F,e[24]=l):l=e[24];let E;e[25]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(Ce,{children:"Cancel"}),e[25]=E):E=e[25];let c;e[26]!==R?(c=t.jsxs(we,{children:[E,t.jsx(ye,{onClick:R,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[26]=R,e[27]=c):c=e[27];let d;e[28]!==l||e[29]!==c?(d=t.jsxs(Ne,{children:[l,c]}),e[28]=l,e[29]=c,e[30]=d):d=e[30];let m;e[31]!==L||e[32]!==d?(m=t.jsx(De,{open:L,onOpenChange:z,children:d}),e[31]=L,e[32]=d,e[33]=m):m=e[33];let P;e[34]===Symbol.for("react.memo_cache_sentinel")?(P=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"status",label:"Status"}],e[34]=P):P=e[34];let u;e[35]!==H||e[36]!==s.handleSort||e[37]!==s.setViewMode||e[38]!==s.sortDirection||e[39]!==s.sortKey||e[40]!==s.viewMode?(u=t.jsx(re,{title:"Agents",viewMode:s.viewMode,onViewModeChange:s.setViewMode,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,sortOptions:P,ctaButton:H}),e[35]=H,e[36]=s.handleSort,e[37]=s.setViewMode,e[38]=s.sortDirection,e[39]=s.sortKey,e[40]=s.viewMode,e[41]=u):u=e[41];let p;e[42]!==s?(p=o=>{o.key==="Escape"&&(s.setSearch(""),o.target.blur())},e[42]=s,e[43]=p):p=e[43];let g;e[44]!==s.search||e[45]!==s.setSearch||e[46]!==p?(g=t.jsx(ne,{value:s.search,onChange:s.setSearch,placeholder:"Search for an agent...",onKeyDown:p}),e[44]=s.search,e[45]=s.setSearch,e[46]=p,e[47]=g):g=e[47];let h;e[48]!==T||e[49]!==f||e[50]!==s.handleSort||e[51]!==s.search||e[52]!==s.sortDirection||e[53]!==s.sortKey||e[54]!==s.viewMode||e[55]!==n||e[56]!==r.slug?(h=s.viewMode==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:f.length===0?t.jsx(W,{image:t.jsx(x,{size:36,className:"text-muted-foreground"}),title:s.search?"No agents found":"No agents yet",description:s.search?`No agents match "${s.search}"`:"Create an agent to aggregate tools from multiple Connections."}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:f.map(o=>t.jsx(le,{connection:{id:o.id,title:o.title,description:o.description,icon:o.icon,status:o.status},fallbackIcon:t.jsx(x,{}),onClick:()=>n({to:"/$org/gateways/$gatewayId",params:{org:r.slug,gatewayId:o.id}}),footer:t.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[t.jsxs("span",{children:[o.connections.length," connection",o.connections.length!==1?"s":""]}),t.jsx("span",{children:"•"}),t.jsx("span",{children:o.tool_selection_mode==="exclusion"?"Exclude":"Include"})]}),headerActions:t.jsxs(Q,{children:[t.jsx(U,{asChild:!0,children:t.jsx(q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:_e,children:t.jsx(Y,{size:20})})}),t.jsxs(X,{align:"end",onClick:ke,children:[t.jsxs(O,{onClick:a=>{a.stopPropagation(),n({to:"/$org/gateways/$gatewayId",params:{org:r.slug,gatewayId:o.id}})},children:[t.jsx(J,{size:16}),"Open"]}),t.jsxs(O,{variant:"destructive",onClick:a=>{a.stopPropagation(),N({type:"delete",gateway:o})},children:[t.jsx(Z,{size:16}),"Delete"]})]})]})},o.id))})}):t.jsx(ae,{columns:T,data:f,isLoading:!1,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,onRowClick:o=>n({to:"/$org/gateways/$gatewayId",params:{org:r.slug,gatewayId:o.id}}),emptyState:s.search?t.jsx(W,{image:t.jsx(x,{size:36,className:"text-muted-foreground"}),title:"No agents found",description:`No agents match "${s.search}"`}):t.jsx(W,{image:t.jsx(x,{size:36,className:"text-muted-foreground"}),title:"No agents yet",description:"Create an agent to aggregate tools from multiple Connections."})}),e[48]=T,e[49]=f,e[50]=s.handleSort,e[51]=s.search,e[52]=s.sortDirection,e[53]=s.sortKey,e[54]=s.viewMode,e[55]=n,e[56]=r.slug,e[57]=h):h=e[57];let K;return e[58]!==m||e[59]!==u||e[60]!==g||e[61]!==h?(K=t.jsxs(ie,{children:[m,u,g,h]}),e[58]=m,e[59]=u,e[60]=g,e[61]=h,e[62]=K):K=e[62],K}function ke(e){return e.stopPropagation()}function _e(e){return e.stopPropagation()}function Ae(e){return e.stopPropagation()}function Ie(e){return e.stopPropagation()}function Me(e){return t.jsx(se,{variant:e.status==="active"?"default":"outline",children:e.status})}function ze(e){return t.jsx("span",{className:"text-sm text-muted-foreground",children:e.connections.length})}function $e(e){return t.jsx(se,{variant:"outline",className:"text-xs",children:e.tool_selection_mode==="exclusion"?"Exclude":"Include"})}function Ee(e){return t.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:e.description||"—"})}function Pe(e){return t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:e.title})}function Ke(e){return t.jsx(ce,{icon:e.icon,name:e.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:t.jsx(x,{size:16})})}function ft(){const e=ee.c(1);let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(de,{children:t.jsx(te.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Se,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(be,{})})}),e[0]=r):r=e[0],r}export{ft as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as b,c as I,bM as _,j as s,x as O,t as F,bL as q}from"./index-DEuqpeVv.js";import{K as z,u as H,g as L,s as Z,a as Q,i as R,f as T}from"./file-browser-BECnO7FM.js";import{B as w}from"./button-DXl1hVqx.js";import{i as D}from"./AlertCircle-CahACZDg.js";import{n as W}from"./Download01-DhkFfGKV.js";import{i as A}from"./File06-BiIPMtEV.js";import{a as S}from"./Image01-Cb4gQMH4.js";import{i as $}from"./Loading01-JwelopeC.js";import{s as U}from"./Trash01-KvZ0cVo9.js";import{i as J}from"./Upload01-TiwmYxO-.js";import{u as V}from"./useMutation-xcmVYLP7.js";import{u as Y}from"./useQuery-BKyLWvSZ.js";import"./useInfiniteQuery-ckN_t7ea.js";import"./infiniteQueryObserver-BXdaScti.js";import"./checkbox-D1tHbcIN.js";import"./Check-Cjgi2ZiG.js";import"./Grid01-CRALWbj6.js";import"./Home02-ofwnyeoV.js";import"./List-DOmOO2Cw.js";const P=({size:o=24,color:e="currentColor",...t})=>b.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},b.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"}));P.displayName="File04";const B=({size:o=24,color:e="currentColor",...t})=>b.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},b.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"}));B.displayName="File07";const G=({size:o=24,color:e="currentColor",...t})=>b.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},b.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"}));G.displayName="FileCode01";const K=({size:o=24,color:e="currentColor",...t})=>b.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},b.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"}));K.displayName="VideoRecorder";function X(o){const e=I.c(5),[t,g]=b.useState(!1),c=b.useRef(null),f=b.useRef(!1);let n;e[0]!==o?(n=d=>{c.current&&(c.current.disconnect(),c.current=null),d&&!f.current&&(c.current=new IntersectionObserver(y=>{const[a]=y;a?.isIntersecting&&!f.current&&(f.current=!0,g(!0),c.current?.disconnect(),c.current=null)},o),c.current.observe(d))},e[0]=o,e[1]=n):n=e[1];const l=n;let p;return e[2]!==t||e[3]!==l?(p=[t,l],e[2]=t,e[3]=l,e[4]=p):p=e[4],p}function ee(o){const e=I.c(22),{objectKey:t,alt:g,className:c}=o,f=c===void 0?"":c,{connectionId:n,toolCaller:l}=_();let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p={rootMargin:"100px",threshold:0},e[0]=p):p=e[0];const[d,y]=X(p);let a;e[1]!==n||e[2]!==t?(a=z.imagePreview(n,t),e[1]=n,e[2]=t,e[3]=a):a=e[3];let m;e[4]!==t||e[5]!==l?(m=async()=>{const{url:u}=await l("GET_PRESIGNED_URL",{key:t});return u},e[4]=t,e[5]=l,e[6]=m):m=e[6];let k;e[7]!==d||e[8]!==a||e[9]!==m?(k={queryKey:a,queryFn:m,enabled:d,staleTime:3e5,gcTime:6e5},e[7]=d,e[8]=a,e[9]=m,e[10]=k):k=e[10];const{data:h,isLoading:x,error:j}=Y(k),v=`relative w-full h-full flex items-center justify-center overflow-hidden ${f}`;let r;e[11]!==g||e[12]!==j||e[13]!==h||e[14]!==x||e[15]!==d||e[16]!==t?(r=!d||x?s.jsx("div",{className:"flex flex-col items-center justify-center text-muted-foreground",children:x?s.jsx($,{size:24,className:"animate-spin"}):s.jsx(S,{size:48})}):j?s.jsx("div",{className:"flex flex-col items-center justify-center text-muted-foreground",children:s.jsx(D,{size:24})}):h?s.jsx("img",{src:h,alt:g||t,className:"w-full h-full object-cover",loading:"lazy"}):null,e[11]=g,e[12]=j,e[13]=h,e[14]=x,e[15]=d,e[16]=t,e[17]=r):r=e[17];let i;return e[18]!==y||e[19]!==v||e[20]!==r?(i=s.jsx("div",{ref:y,className:v,children:r}),e[18]=y,e[19]=v,e[20]=r,e[21]=i):i=e[21],i}const E=12,te={Image01:S,VideoRecorder:K,Music01:R,File02:R,File04:P,File06:A,File07:B,FileCode01:G,Folder:q};function se(o){const e=o.split(".").pop()?.toLowerCase();return["jpg","jpeg","png","gif","webp","svg","bmp","ico"].includes(e||"")}function re(o){const e=I.c(38),{item:t,onNavigate:g,onDownload:c,onDelete:f}=o;let n;e[0]!==t.key?(n=L(t.key),e[0]=t.key,e[1]=n):n=e[1];const l=n,p=t.isFolder?"Folder":Q(t.key),d=te[p]||R;let y;e[2]!==t.isFolder||e[3]!==t.key?(y=!t.isFolder&&se(t.key),e[2]=t.isFolder,e[3]=t.key,e[4]=y):y=e[4];const a=y;let m;e[5]!==t.isFolder||e[6]!==t.key||e[7]!==g?(m=()=>t.isFolder?g(t.key):void 0,e[5]=t.isFolder,e[6]=t.key,e[7]=g,e[8]=m):m=e[8];const k=`flex flex-col items-center justify-center w-full h-full ${a?"":"p-4"} ${t.isFolder?"cursor-pointer":"cursor-default"}`;let h;e[9]!==d||e[10]!==a||e[11]!==t.isFolder||e[12]!==t.key||e[13]!==l?(h=a?s.jsx("div",{className:"absolute inset-0",children:s.jsx(ee,{objectKey:t.key,alt:l})}):s.jsx(d,{size:48,className:t.isFolder?"text-amber-500":"text-muted-foreground"}),e[9]=d,e[10]=a,e[11]=t.isFolder,e[12]=t.key,e[13]=l,e[14]=h):h=e[14];let x;e[15]!==a||e[16]!==t.isFolder||e[17]!==t.size||e[18]!==l?(x=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:T(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:T(t.size)})]}),e[15]=a,e[16]=t.isFolder,e[17]=t.size,e[18]=l,e[19]=x):x=e[19];let j;e[20]!==m||e[21]!==k||e[22]!==h||e[23]!==x?(j=s.jsxs("button",{type:"button",onClick:m,className:k,children:[h,x]}),e[20]=m,e[21]=k,e[22]=h,e[23]=x,e[24]=j):j=e[24];let v;e[25]!==t.isFolder||e[26]!==t.key||e[27]!==f||e[28]!==c?(v=!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(w,{variant:"secondary",size:"sm",className:"size-7 p-0",onClick:u=>{u.stopPropagation(),c(t.key)},children:s.jsx(W,{size:14})}),s.jsx(w,{variant:"secondary",size:"sm",className:"size-7 p-0 text-destructive hover:text-destructive",onClick:u=>{u.stopPropagation(),f(t.key)},children:s.jsx(U,{size:14})})]}),e[25]=t.isFolder,e[26]=t.key,e[27]=f,e[28]=c,e[29]=v):v=e[29];let r;e[30]!==t.isFolder||e[31]!==t.key||e[32]!==f?(r=t.isFolder&&s.jsx("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",children:s.jsx(w,{variant:"secondary",size:"sm",className:"size-7 p-0 text-destructive hover:text-destructive",onClick:u=>{u.stopPropagation(),f(t.key)},children:s.jsx(U,{size:14})})}),e[30]=t.isFolder,e[31]=t.key,e[32]=f,e[33]=r):r=e[33];let i;return e[34]!==j||e[35]!==v||e[36]!==r?(i=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:[j,v,r]}),e[34]=j,e[35]=v,e[36]=r,e[37]=i):i=e[37],i}function Ne({prefix:o,flat:e,onNavigate:t}){const g=b.useRef(null),c=O(),{connectionId:f,toolCaller:n}=_(),{objects:l,isLoading:p,isFetchingMore:d,hasMore:y,loadMore:a,error:m}=H({prefix:o,flat:e,pageSize:E}),k=V({mutationFn:async r=>{const i=o+r.name,{url:u}=await n("PUT_PRESIGNED_URL",{key:i,contentType:r.type||"application/octet-stream"}),C=await fetch(u,{method:"PUT",body:r,headers:{"Content-Type":r.type||"application/octet-stream"}});if(!C.ok)throw new Error(`Upload failed: ${C.statusText}`);return i},onSuccess:r=>{F.success(`Uploaded ${L(r)}`),c.invalidateQueries({queryKey:z.objects(f,o,e,E)})},onError:r=>{F.error(`Upload failed: ${r.message}`)}}),h=V({mutationFn:async r=>r.length===1&&r[0]?n("DELETE_OBJECT",{key:r[0]}):n("DELETE_OBJECTS",{keys:r}),onSuccess:()=>{F.success("Deleted successfully"),c.invalidateQueries({queryKey:z.objects(f,o,e,E)})},onError:r=>{F.error(`Delete failed: ${r.message}`)}}),x=async r=>{try{const{url:i}=await n("GET_PRESIGNED_URL",{key:r}),u=await fetch(i);if(!u.ok)throw new Error(`Failed to fetch file: ${u.statusText}`);const C=await u.blob(),M=URL.createObjectURL(C),N=document.createElement("a");N.href=M,N.download=L(r),document.body.appendChild(N),N.click(),document.body.removeChild(N),URL.revokeObjectURL(M)}catch(i){F.error(`Download failed: ${i instanceof Error?i.message:"Unknown error"}`)}},j=r=>{const i=r.target.files;if(i){for(const u of Array.from(i))k.mutate(u);r.target.value=""}},v=r=>{if(!y||d)return;const i=r.currentTarget;i.scrollHeight-i.scrollTop-i.clientHeight<200&&a()};return m?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[s.jsx(D,{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:m.message})]}):s.jsx("div",{className:"flex-1 overflow-y-auto p-4",onScroll:v,children:p?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[s.jsx($,{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(Z,{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(w,{variant:"outline",onClick:()=>g.current?.click(),children:[s.jsx(J,{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(re,{item:r,onNavigate:t,onDownload:x,onDelete:i=>h.mutate([i])},r.key))}),d&&s.jsx("div",{className:"flex justify-center py-8",children:s.jsx($,{size:24,className:"animate-spin text-muted-foreground"})})]})})}export{Ne as default};
|
|
1
|
+
import{r as b,c as I,bM as _,j as s,x as O,t as F,bL as q}from"./index-BdoGlqOh.js";import{K as z,u as H,g as L,s as Z,a as Q,i as R,f as T}from"./file-browser-D3uR2C9M.js";import{B as w}from"./button-BQMZIX_4.js";import{i as D}from"./AlertCircle-DZfqNByx.js";import{n as W}from"./Download01-DUxaWCdv.js";import{i as A}from"./File06-1GHbOIr4.js";import{a as S}from"./Image01-Ba0mxAoN.js";import{i as $}from"./Loading01-wy6i08TR.js";import{s as U}from"./Trash01-pB5oOXYU.js";import{i as J}from"./Upload01-BRGUFGKZ.js";import{u as V}from"./useMutation-mOecCzvG.js";import{u as Y}from"./useQuery-B_cnJjvx.js";import"./useInfiniteQuery-Bx9UQHNH.js";import"./infiniteQueryObserver-B-zosqIG.js";import"./checkbox-CJvAgYlu.js";import"./Check-Clnl6VO2.js";import"./Grid01-Bf8eAyhK.js";import"./Home02-8q2bbK8n.js";import"./List-C6tpn114.js";const P=({size:o=24,color:e="currentColor",...t})=>b.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},b.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"}));P.displayName="File04";const B=({size:o=24,color:e="currentColor",...t})=>b.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},b.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"}));B.displayName="File07";const G=({size:o=24,color:e="currentColor",...t})=>b.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},b.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"}));G.displayName="FileCode01";const K=({size:o=24,color:e="currentColor",...t})=>b.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},b.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"}));K.displayName="VideoRecorder";function X(o){const e=I.c(5),[t,g]=b.useState(!1),c=b.useRef(null),f=b.useRef(!1);let n;e[0]!==o?(n=d=>{c.current&&(c.current.disconnect(),c.current=null),d&&!f.current&&(c.current=new IntersectionObserver(y=>{const[a]=y;a?.isIntersecting&&!f.current&&(f.current=!0,g(!0),c.current?.disconnect(),c.current=null)},o),c.current.observe(d))},e[0]=o,e[1]=n):n=e[1];const l=n;let p;return e[2]!==t||e[3]!==l?(p=[t,l],e[2]=t,e[3]=l,e[4]=p):p=e[4],p}function ee(o){const e=I.c(22),{objectKey:t,alt:g,className:c}=o,f=c===void 0?"":c,{connectionId:n,toolCaller:l}=_();let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p={rootMargin:"100px",threshold:0},e[0]=p):p=e[0];const[d,y]=X(p);let a;e[1]!==n||e[2]!==t?(a=z.imagePreview(n,t),e[1]=n,e[2]=t,e[3]=a):a=e[3];let m;e[4]!==t||e[5]!==l?(m=async()=>{const{url:u}=await l("GET_PRESIGNED_URL",{key:t});return u},e[4]=t,e[5]=l,e[6]=m):m=e[6];let k;e[7]!==d||e[8]!==a||e[9]!==m?(k={queryKey:a,queryFn:m,enabled:d,staleTime:3e5,gcTime:6e5},e[7]=d,e[8]=a,e[9]=m,e[10]=k):k=e[10];const{data:h,isLoading:x,error:j}=Y(k),v=`relative w-full h-full flex items-center justify-center overflow-hidden ${f}`;let r;e[11]!==g||e[12]!==j||e[13]!==h||e[14]!==x||e[15]!==d||e[16]!==t?(r=!d||x?s.jsx("div",{className:"flex flex-col items-center justify-center text-muted-foreground",children:x?s.jsx($,{size:24,className:"animate-spin"}):s.jsx(S,{size:48})}):j?s.jsx("div",{className:"flex flex-col items-center justify-center text-muted-foreground",children:s.jsx(D,{size:24})}):h?s.jsx("img",{src:h,alt:g||t,className:"w-full h-full object-cover",loading:"lazy"}):null,e[11]=g,e[12]=j,e[13]=h,e[14]=x,e[15]=d,e[16]=t,e[17]=r):r=e[17];let i;return e[18]!==y||e[19]!==v||e[20]!==r?(i=s.jsx("div",{ref:y,className:v,children:r}),e[18]=y,e[19]=v,e[20]=r,e[21]=i):i=e[21],i}const E=12,te={Image01:S,VideoRecorder:K,Music01:R,File02:R,File04:P,File06:A,File07:B,FileCode01:G,Folder:q};function se(o){const e=o.split(".").pop()?.toLowerCase();return["jpg","jpeg","png","gif","webp","svg","bmp","ico"].includes(e||"")}function re(o){const e=I.c(38),{item:t,onNavigate:g,onDownload:c,onDelete:f}=o;let n;e[0]!==t.key?(n=L(t.key),e[0]=t.key,e[1]=n):n=e[1];const l=n,p=t.isFolder?"Folder":Q(t.key),d=te[p]||R;let y;e[2]!==t.isFolder||e[3]!==t.key?(y=!t.isFolder&&se(t.key),e[2]=t.isFolder,e[3]=t.key,e[4]=y):y=e[4];const a=y;let m;e[5]!==t.isFolder||e[6]!==t.key||e[7]!==g?(m=()=>t.isFolder?g(t.key):void 0,e[5]=t.isFolder,e[6]=t.key,e[7]=g,e[8]=m):m=e[8];const k=`flex flex-col items-center justify-center w-full h-full ${a?"":"p-4"} ${t.isFolder?"cursor-pointer":"cursor-default"}`;let h;e[9]!==d||e[10]!==a||e[11]!==t.isFolder||e[12]!==t.key||e[13]!==l?(h=a?s.jsx("div",{className:"absolute inset-0",children:s.jsx(ee,{objectKey:t.key,alt:l})}):s.jsx(d,{size:48,className:t.isFolder?"text-amber-500":"text-muted-foreground"}),e[9]=d,e[10]=a,e[11]=t.isFolder,e[12]=t.key,e[13]=l,e[14]=h):h=e[14];let x;e[15]!==a||e[16]!==t.isFolder||e[17]!==t.size||e[18]!==l?(x=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:T(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:T(t.size)})]}),e[15]=a,e[16]=t.isFolder,e[17]=t.size,e[18]=l,e[19]=x):x=e[19];let j;e[20]!==m||e[21]!==k||e[22]!==h||e[23]!==x?(j=s.jsxs("button",{type:"button",onClick:m,className:k,children:[h,x]}),e[20]=m,e[21]=k,e[22]=h,e[23]=x,e[24]=j):j=e[24];let v;e[25]!==t.isFolder||e[26]!==t.key||e[27]!==f||e[28]!==c?(v=!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(w,{variant:"secondary",size:"sm",className:"size-7 p-0",onClick:u=>{u.stopPropagation(),c(t.key)},children:s.jsx(W,{size:14})}),s.jsx(w,{variant:"secondary",size:"sm",className:"size-7 p-0 text-destructive hover:text-destructive",onClick:u=>{u.stopPropagation(),f(t.key)},children:s.jsx(U,{size:14})})]}),e[25]=t.isFolder,e[26]=t.key,e[27]=f,e[28]=c,e[29]=v):v=e[29];let r;e[30]!==t.isFolder||e[31]!==t.key||e[32]!==f?(r=t.isFolder&&s.jsx("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",children:s.jsx(w,{variant:"secondary",size:"sm",className:"size-7 p-0 text-destructive hover:text-destructive",onClick:u=>{u.stopPropagation(),f(t.key)},children:s.jsx(U,{size:14})})}),e[30]=t.isFolder,e[31]=t.key,e[32]=f,e[33]=r):r=e[33];let i;return e[34]!==j||e[35]!==v||e[36]!==r?(i=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:[j,v,r]}),e[34]=j,e[35]=v,e[36]=r,e[37]=i):i=e[37],i}function Ne({prefix:o,flat:e,onNavigate:t}){const g=b.useRef(null),c=O(),{connectionId:f,toolCaller:n}=_(),{objects:l,isLoading:p,isFetchingMore:d,hasMore:y,loadMore:a,error:m}=H({prefix:o,flat:e,pageSize:E}),k=V({mutationFn:async r=>{const i=o+r.name,{url:u}=await n("PUT_PRESIGNED_URL",{key:i,contentType:r.type||"application/octet-stream"}),C=await fetch(u,{method:"PUT",body:r,headers:{"Content-Type":r.type||"application/octet-stream"}});if(!C.ok)throw new Error(`Upload failed: ${C.statusText}`);return i},onSuccess:r=>{F.success(`Uploaded ${L(r)}`),c.invalidateQueries({queryKey:z.objects(f,o,e,E)})},onError:r=>{F.error(`Upload failed: ${r.message}`)}}),h=V({mutationFn:async r=>r.length===1&&r[0]?n("DELETE_OBJECT",{key:r[0]}):n("DELETE_OBJECTS",{keys:r}),onSuccess:()=>{F.success("Deleted successfully"),c.invalidateQueries({queryKey:z.objects(f,o,e,E)})},onError:r=>{F.error(`Delete failed: ${r.message}`)}}),x=async r=>{try{const{url:i}=await n("GET_PRESIGNED_URL",{key:r}),u=await fetch(i);if(!u.ok)throw new Error(`Failed to fetch file: ${u.statusText}`);const C=await u.blob(),M=URL.createObjectURL(C),N=document.createElement("a");N.href=M,N.download=L(r),document.body.appendChild(N),N.click(),document.body.removeChild(N),URL.revokeObjectURL(M)}catch(i){F.error(`Download failed: ${i instanceof Error?i.message:"Unknown error"}`)}},j=r=>{const i=r.target.files;if(i){for(const u of Array.from(i))k.mutate(u);r.target.value=""}},v=r=>{if(!y||d)return;const i=r.currentTarget;i.scrollHeight-i.scrollTop-i.clientHeight<200&&a()};return m?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[s.jsx(D,{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:m.message})]}):s.jsx("div",{className:"flex-1 overflow-y-auto p-4",onScroll:v,children:p?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[s.jsx($,{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(Z,{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(w,{variant:"outline",onClick:()=>g.current?.click(),children:[s.jsx(J,{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(re,{item:r,onNavigate:t,onDownload:x,onDelete:i=>h.mutate([i])},r.key))}),d&&s.jsx("div",{className:"flex justify-center py-8",children:s.jsx($,{size:24,className:"animate-spin text-muted-foreground"})})]})})}export{Ne as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,j as s,a as I,r as C,e as F,f as E,x as O,t as w}from"./index-DEuqpeVv.js";import{C as k}from"./card-D0GcpRPY.js";import{c as y,B as $}from"./button-DXl1hVqx.js";import{A as R}from"./avatar-d8M8JpvZ.js";import{i as D}from"./AlertCircle-CahACZDg.js";import{i as H}from"./Check-Cjgi2ZiG.js";import{s as G}from"./Plus-Df2M6Ns2.js";import{i as Q}from"./SearchMd-Cgfgcbdz.js";import{s as q}from"./XClose-2bShEltc.js";import{I as B}from"./input-CqqzkfyF.js";import{C as T}from"./create-organization-dialog-DKwU0dfN.js";import"./alert-dialog-gZhceV_v.js";import"./form-BQupN7IV.js";import"./spinner-D0hdWfev.js";import"./useMutation-xcmVYLP7.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 P(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 V(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 X(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 Y(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:P,Title:V,Subtitle:X,Content:Y,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"),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};
|
|
1
|
+
import{c as f,j as s,a as I,r as C,e as F,f as E,x as O,t as w}from"./index-BdoGlqOh.js";import{C as k}from"./card-B-rrjyBF.js";import{c as y,B as $}from"./button-BQMZIX_4.js";import{A as R}from"./avatar-CumXES9B.js";import{i as D}from"./AlertCircle-DZfqNByx.js";import{i as H}from"./Check-Clnl6VO2.js";import{s as G}from"./Plus-DaMIylfN.js";import{i as Q}from"./SearchMd-DsK25qy7.js";import{s as q}from"./XClose-zOphE63W.js";import{I as B}from"./input-B0JGK4qg.js";import{C as T}from"./create-organization-dialog-gxAB4wwP.js";import"./alert-dialog-BBkPKiLO.js";import"./form-o9xmUpnK.js";import"./spinner-BJxZd1VB.js";import"./useMutation-mOecCzvG.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 P(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 V(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 X(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 Y(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:P,Title:V,Subtitle:X,Content:Y,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"),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};
|