@decocms/mesh 1.12.0 → 1.13.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.
Files changed (105) hide show
  1. package/dist/client/assets/{AlertCircle-CRLweBkr.js → AlertCircle-DHCtv9wC.js} +1 -1
  2. package/dist/client/assets/{ArrowLeft-DfQz7YbP.js → ArrowLeft-DuzlVMpS.js} +1 -1
  3. package/dist/client/assets/{ChevronDown-ZO3Wlgkk.js → ChevronDown-DFL_ztkL.js} +1 -1
  4. package/dist/client/assets/{ChevronRight-BPIYvimG.js → ChevronRight-Cys1zrTj.js} +1 -1
  5. package/dist/client/assets/{Copy01-CQZAbEwU.js → Copy01-0LOMQTHB.js} +1 -1
  6. package/dist/client/assets/{DotsHorizontal-gKr61GPJ.js → DotsHorizontal-BEBpYaEz.js} +1 -1
  7. package/dist/client/assets/{DotsVertical-BRB99_wf.js → DotsVertical-CNQmKxkm.js} +1 -1
  8. package/dist/client/assets/{File06-AZUmgwwB.js → File06-c_emyfHw.js} +1 -1
  9. package/dist/client/assets/{FilterLines-BVJGM8Yy.js → FilterLines-CETFD3LG.js} +1 -1
  10. package/dist/client/assets/{FlipBackward-D2snIvVA.js → FlipBackward-7gT7dG1L.js} +1 -1
  11. package/dist/client/assets/{GitBranch01-BqxbNL1-.js → GitBranch01-C03cI4QK.js} +1 -1
  12. package/dist/client/assets/{Grid01-DvNuuuCQ.js → Grid01-CCmKx6B5.js} +1 -1
  13. package/dist/client/assets/{Inbox01-CpKg5AaJ.js → Inbox01-D0Xr5pJB.js} +1 -1
  14. package/dist/client/assets/{InfoCircle-Bn9chr5H.js → InfoCircle-CvJnwAvU.js} +1 -1
  15. package/dist/client/assets/{Key01-C7wPsHjA.js → Key01-KVYt5hIJ.js} +1 -1
  16. package/dist/client/assets/{LinkExternal01-DBWs13wu.js → LinkExternal01-Dk04u5a1.js} +1 -1
  17. package/dist/client/assets/{Loading01-ol6YE3uU.js → Loading01-DKaPtj3-.js} +1 -1
  18. package/dist/client/assets/{Lock01-CaL8sf5y.js → Lock01-CmhDm4Lj.js} +1 -1
  19. package/dist/client/assets/{Play-QpPR3uuS.js → Play-C5xISjoh.js} +1 -1
  20. package/dist/client/assets/{Plus-Dj_8zgGI.js → Plus-BOhWr_Yd.js} +1 -1
  21. package/dist/client/assets/{Terminal-BcZbtSfr.js → Terminal-BLJp9JlG.js} +1 -1
  22. package/dist/client/assets/{Trash01-dxE-iYht.js → Trash01-B7rtyZ6_.js} +1 -1
  23. package/dist/client/assets/{X-BvKeBLsh.js → X-EQV0BNWQ.js} +1 -1
  24. package/dist/client/assets/{XClose-BnA_V6wK.js → XClose-RGDSgm2c.js} +1 -1
  25. package/dist/client/assets/{alert-dialog-DRnTpMl_.js → alert-dialog-DRjbecrO.js} +1 -1
  26. package/dist/client/assets/{auth-kMcVrAGe.js → auth-C_fy8E36.js} +1 -1
  27. package/dist/client/assets/{auth-catchall-DEYgws1t.js → auth-catchall-CeKnYT3I.js} +1 -1
  28. package/dist/client/assets/{avatar-CSdVudJi.js → avatar-mRj3EYSY.js} +1 -1
  29. package/dist/client/assets/{badge-DgawqffN.js → badge-BB4ToOP0.js} +1 -1
  30. package/dist/client/assets/{button-DNDGU2TI.js → button-DfMRfE6U.js} +1 -1
  31. package/dist/client/assets/{card-Bm3Srv__.js → card-DtNOepPc.js} +1 -1
  32. package/dist/client/assets/{checkbox-khNtwUU2.js → checkbox-DyAJP3m7.js} +1 -1
  33. package/dist/client/assets/{collection-detail-BsVxb5vf.js → collection-detail-BoPy1AgN.js} +1 -1
  34. package/dist/client/assets/{collection-display-button-Bg2te3H-.js → collection-display-button-NCEXG76d.js} +1 -1
  35. package/dist/client/assets/{collection-header-Cg64mtbo.js → collection-header-CYfWhq42.js} +1 -1
  36. package/dist/client/assets/{collection-page-DgWl3hcu.js → collection-page-B--o_GqQ.js} +1 -1
  37. package/dist/client/assets/collection-search-CEIFKuWa.js +1 -0
  38. package/dist/client/assets/{collection-tab-CkvC0Ng5.js → collection-tab-GuOa5x6Z.js} +1 -1
  39. package/dist/client/assets/{collection-table-wrapper-BziKCd5v.js → collection-table-wrapper-Bkcq39C4.js} +1 -1
  40. package/dist/client/assets/{connection-card-zLdRh2-_.js → connection-card-CxBsRTZ8.js} +1 -1
  41. package/dist/client/assets/{connection-detail-DZjDWBtk.js → connection-detail-kOdx4UfG.js} +1 -1
  42. package/dist/client/assets/{connections-CtPrTwps.js → connections-S2JdypuK.js} +1 -1
  43. package/dist/client/assets/constants-CF9rgZdG.js +1 -0
  44. package/dist/client/assets/{create-organization-dialog-ChswR6No.js → create-organization-dialog-CW3a_met.js} +1 -1
  45. package/dist/client/assets/{dialog-BQAmZYkz.js → dialog-Degt7wMI.js} +1 -1
  46. package/dist/client/assets/{dropdown-menu-DrJ8JVyD.js → dropdown-menu-DhuyLWwf.js} +1 -1
  47. package/dist/client/assets/{empty-state-B4Ut902H.js → empty-state-x5wxMoGj.js} +1 -1
  48. package/dist/client/assets/{env-vars-editor-CENWD4Cw.js → env-vars-editor-CkUGE9dS.js} +1 -1
  49. package/dist/client/assets/{error-boundary-CdDh2rh4.js → error-boundary-xrmWNOPn.js} +1 -1
  50. package/dist/client/assets/{extract-connection-data-BbV8sTs8.js → extract-connection-data-BWCaylf6.js} +1 -1
  51. package/dist/client/assets/{form-CeAHJl1w.js → form-Dq2sl6Cm.js} +1 -1
  52. package/dist/client/assets/{formatDistanceToNow-DjIxnUs1.js → formatDistanceToNow-B81mYZyY.js} +1 -1
  53. package/dist/client/assets/{gateway-detail-8Dc836Ad.js → gateway-detail-CfpW5gPv.js} +1 -1
  54. package/dist/client/assets/{gateway-selector-BUzUwyXz.js → gateway-selector-MP0YklU9.js} +1 -1
  55. package/dist/client/assets/{gateways-B6IfFHkd.js → gateways-tQbC21bA.js} +1 -1
  56. package/dist/client/assets/{home-CRBWRUEj.js → home-CQP5bDUs.js} +1 -1
  57. package/dist/client/assets/{index-1K95O_Cd.js → index-CsUeJADK.js} +1 -1
  58. package/dist/client/assets/{index-DKhlCI_x.js → index-Cum2JwLw.js} +2 -2
  59. package/dist/client/assets/{index-DxooMZcP.js → index-DRktqaBU.js} +1 -1
  60. package/dist/client/assets/{input-DebjWxRP.js → input-BhavpdOt.js} +1 -1
  61. package/dist/client/assets/{layout-IbRPe8u0.js → layout-CdDgPBcy.js} +1 -1
  62. package/dist/client/assets/{lazy-highlighter-_VEiNIwF.js → lazy-highlighter-OELIkKsF.js} +1 -1
  63. package/dist/client/assets/{localstorage-keys--yzYYtLR.js → localstorage-keys-BKXJOX3Y.js} +1 -1
  64. package/dist/client/assets/{login-DJYtWwhL.js → login-BtwJxKzK.js} +1 -1
  65. package/dist/client/assets/{mcp-oauth-Di1GqXp6.js → mcp-oauth-Cz0S6MIP.js} +1 -1
  66. package/dist/client/assets/{mcp-server-detail-BkrHrvqf.js → mcp-server-detail-DN0Hql3Q.js} +1 -1
  67. package/dist/client/assets/{members-GgcoJjv3.js → members-BFIAKP8F.js} +1 -1
  68. package/dist/client/assets/{monaco-editor-BuCuW23d.js → monaco-editor-DpKdmnKA.js} +1 -1
  69. package/dist/client/assets/{monitoring-B6ODnzEG.js → monitoring-CKREIN1T.js} +5 -5
  70. package/dist/client/assets/{oauth-callback-tl2SaLew.js → oauth-callback-BYVQDobu.js} +1 -1
  71. package/dist/client/assets/page-BHC8n492.js +1 -0
  72. package/dist/client/assets/{page-DPTyuA_g.js → page-CMI8w1FF.js} +1 -1
  73. package/dist/client/assets/{pin-to-sidebar-button-CLRQf-ha.js → pin-to-sidebar-button-C-oxRlVk.js} +1 -1
  74. package/dist/client/assets/{popover-Cp6Pxses.js → popover-CwpGwJqe.js} +1 -1
  75. package/dist/client/assets/{project-context-provider-d0n4IqI8.js → project-context-provider-BYGGoCTs.js} +1 -1
  76. package/dist/client/assets/{resizable-BaqsD3z5.js → resizable-DRCfYS1c.js} +1 -1
  77. package/dist/client/assets/{resource-tabs-B7IS9MYq.js → resource-tabs-BVIqlO4B.js} +1 -1
  78. package/dist/client/assets/{select-CbMi2p4J.js → select-Cmw9Rvde.js} +1 -1
  79. package/dist/client/assets/{settings-B3v-qHnr.js → settings-ss7bwESF.js} +1 -1
  80. package/dist/client/assets/{shell-layout-VY8-JBMj.js → shell-layout-z2JyzVod.js} +1 -1
  81. package/dist/client/assets/{spinner-BNiD7mdl.js → spinner-7MBS50fZ.js} +1 -1
  82. package/dist/client/assets/{switch-0oisonmD.js → switch-Ww9aXtlU.js} +1 -1
  83. package/dist/client/assets/{textarea-CH1xmcup.js → textarea-woJVrhbJ.js} +1 -1
  84. package/dist/client/assets/{thread-history-popover-CRZLvWh-.js → thread-history-popover-B-3eSv1_.js} +3 -3
  85. package/dist/client/assets/{tools-list-B-vCEw-I.js → tools-list-CFumR28e.js} +1 -1
  86. package/dist/client/assets/{use-binding-DTexNl5P.js → use-binding-bczXt8eF.js} +1 -1
  87. package/dist/client/assets/{use-connection-BijkkxIc.js → use-connection-B2okCga5.js} +1 -1
  88. package/dist/client/assets/{use-connection-resources-0t3vJgjj.js → use-connection-resources-Cq0HZKp9.js} +1 -1
  89. package/dist/client/assets/{use-gateway-DgOBTOgO.js → use-gateway-D2qdAc1R.js} +1 -1
  90. package/dist/client/assets/{use-list-state-BdubfiP7.js → use-list-state-B4BSsLOv.js} +1 -1
  91. package/dist/client/assets/{use-mcp-CYeeos2J.js → use-mcp-5u2AwQ4e.js} +1 -1
  92. package/dist/client/assets/{use-members-Ooe4w4iC.js → use-members-BwVy6fr3.js} +1 -1
  93. package/dist/client/assets/{use-mobile-GFCY3ihJ.js → use-mobile-CSmulDRc.js} +1 -1
  94. package/dist/client/assets/{use-organization-settings-BpZsf9_f.js → use-organization-settings-Ct9LJ7XR.js} +1 -1
  95. package/dist/client/assets/{use-tool-call-C_ljOxo5.js → use-tool-call-Yp-s5M9H.js} +1 -1
  96. package/dist/client/assets/useQuery-DhRmRhz6.js +1 -0
  97. package/dist/client/assets/{value-DdxHI7TH.js → value-N7gQABmO.js} +1 -1
  98. package/dist/client/assets/{view-mode-toggle-DHIMDUvK.js → view-mode-toggle-UYulkxW-.js} +1 -1
  99. package/dist/client/assets/{workflow-DLx3xIl6.js → workflow-BrLXpIDZ.js} +1 -1
  100. package/dist/client/index.html +1 -1
  101. package/package.json +1 -1
  102. package/dist/client/assets/collection-search-D_WbnaGd.js +0 -1
  103. package/dist/client/assets/constants-DKCqnrVH.js +0 -1
  104. package/dist/client/assets/page-DNKosrcW.js +0 -1
  105. package/dist/client/assets/useQuery-BcmdVjIq.js +0 -1
@@ -1 +1 @@
1
- import{c as te,j as t,r as se,h as re,t as ie}from"./index-DKhlCI_x.js";import{C as ne}from"./collection-header-Cg64mtbo.js";import{C as ae}from"./collection-page-DgWl3hcu.js";import{C as le}from"./collection-search-D_WbnaGd.js";import{C as ce}from"./collection-table-wrapper-BziKCd5v.js";import{C as de}from"./connection-card-zLdRh2-_.js";import{u as me,E as q,I as ue}from"./use-connection-BijkkxIc.js";import{E as he}from"./error-boundary-CdDh2rh4.js";import{a as ge,u as pe,i as j}from"./use-gateway-DgOBTOgO.js";import{u as fe,s as Q}from"./use-list-state-BdubfiP7.js";import{u as xe}from"./project-context-provider-d0n4IqI8.js";import{c as je,b as ye,d as we,A as Ce,e as be,g as Ne,a as De,f as Se}from"./alert-dialog-DRnTpMl_.js";import{B as oe}from"./badge-DgawqffN.js";import{B as J}from"./button-DNDGU2TI.js";import{b as U,D as X,a as Y,c as B}from"./dropdown-menu-DrJ8JVyD.js";import{i as Z}from"./DotsVertical-BRB99_wf.js";import{i as ve}from"./Loading01-ol6YE3uU.js";import{s as ee}from"./Trash01-dxE-iYht.js";import"./collection-display-button-Bg2te3H-.js";import"./Grid01-DvNuuuCQ.js";import"./view-mode-toggle-DHIMDUvK.js";import"./input-DebjWxRP.js";import"./card-Bm3Srv__.js";import"./use-mobile-GFCY3ihJ.js";import"./ChevronRight-BPIYvimG.js";function ke(e,r){switch(r.type){case"delete":return{mode:"deleting",gateway:r.gateway};case"close":return{mode:"idle"}}}function _e(){const e=te.c(68),{org:r}=xe(),i=re();let y;e[0]!==r.slug?(y={namespace:r.slug,resource:"gateways"},e[0]=r.slug,e[1]=y):y=e[1];const s=fe(y),n=ge(),x=pe(s);let w;e[2]===Symbol.for("react.memo_cache_sentinel")?(w={},e[2]=w):w=e[2];const G=me(w);let C;e[3]===Symbol.for("react.memo_cache_sentinel")?(C={mode:"idle"},e[3]=C):C=e[3];const[a,b]=se.useReducer(ke,C);let N;e[4]!==n.create||e[5]!==G.length||e[6]!==i||e[7]!==r.slug?(N=async()=>{if(G.length===0){ie.error("Create at least one Connection first");return}const o=await n.create.mutateAsync({title:"New Hub",description:"Hubs let you securely expose integrated tools to the outside world.",status:"active",tool_selection_strategy:"passthrough",tool_selection_mode:"inclusion",connections:[]});i({to:"/$org/gateways/$gatewayId",params:{org:r.slug,gatewayId:o.id}})},e[4]=n.create,e[5]=G.length,e[6]=i,e[7]=r.slug,e[8]=N):N=e[8];const R=N;let D;e[9]!==n.delete||e[10]!==a.gateway||e[11]!==a.mode?(D=async()=>{if(a.mode!=="deleting")return;const o=a.gateway.id;b({type:"close"});try{await n.delete.mutateAsync(o)}catch{}},e[9]=n.delete,e[10]=a.gateway,e[11]=a.mode,e[12]=D):D=e[12];const T=D;let S,v,k,_,I,$;e[13]===Symbol.for("react.memo_cache_sentinel")?(v={id:"icon",header:"",render:Be,cellClassName:"w-16 shrink-0",wrap:!0},k={id:"title",header:"Name",render:He,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},_={id:"description",header:"Description",render:Ke,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},I={id:"mode",header:"Mode",accessor:Ee,cellClassName:"w-[100px]"},$={id:"connections",header:"Connections",render:Pe,cellClassName:"w-24 shrink-0"},S={id:"status",header:"Status",render:Ae,cellClassName:"w-24 shrink-0",sortable:!0},e[13]=S,e[14]=v,e[15]=k,e[16]=_,e[17]=I,e[18]=$):(S=e[13],v=e[14],k=e[15],_=e[16],I=e[17],$=e[18]);let M;e[19]!==i||e[20]!==r.slug?(M=[v,k,_,I,$,S,{id:"actions",header:"",render:o=>t.jsxs(U,{children:[t.jsx(X,{asChild:!0,children:t.jsx(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:ze,children:t.jsx(Z,{size:20})})}),t.jsxs(Y,{align:"end",onClick:Me,children:[t.jsxs(B,{onClick:l=>{l.stopPropagation(),i({to:"/$org/gateways/$gatewayId",params:{org:r.slug,gatewayId:o.id}})},children:[t.jsx(Q,{size:16}),"Inspect"]}),t.jsxs(B,{variant:"destructive",onClick:l=>{l.stopPropagation(),b({type:"delete",gateway:o})},children:[t.jsx(ee,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"}],e[19]=i,e[20]=r.slug,e[21]=M):M=e[21];const O=M,V=n.create.isPending?"Creating...":"Create Hub";let z;e[22]!==n.create.isPending||e[23]!==R||e[24]!==V?(z=t.jsx(J,{onClick:R,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:n.create.isPending,children:V}),e[22]=n.create.isPending,e[23]=R,e[24]=V,e[25]=z):z=e[25];const L=z,F=a.mode==="deleting";let A;e[26]===Symbol.for("react.memo_cache_sentinel")?(A=o=>!o&&b({type:"close"}),e[26]=A):A=e[26];let P;e[27]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(je,{children:"Delete Hub?"}),e[27]=P):P=e[27];const W=a.mode==="deleting"&&a.gateway.title;let c;e[28]!==W?(c=t.jsxs(ye,{children:[P,t.jsxs(we,{children:["This action cannot be undone. This will permanently delete"," ",t.jsx("span",{className:"font-medium text-foreground",children:W}),"."]})]}),e[28]=W,e[29]=c):c=e[29];let E;e[30]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(Ce,{children:"Cancel"}),e[30]=E):E=e[30];let d;e[31]!==T?(d=t.jsxs(be,{children:[E,t.jsx(Ne,{onClick:T,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[31]=T,e[32]=d):d=e[32];let m;e[33]!==c||e[34]!==d?(m=t.jsxs(De,{children:[c,d]}),e[33]=c,e[34]=d,e[35]=m):m=e[35];let u;e[36]!==F||e[37]!==m?(u=t.jsx(Se,{open:F,onOpenChange:A,children:m}),e[36]=F,e[37]=m,e[38]=u):u=e[38];let K;e[39]===Symbol.for("react.memo_cache_sentinel")?(K=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"status",label:"Status"}],e[39]=K):K=e[39];let h;e[40]!==L||e[41]!==s.handleSort||e[42]!==s.setViewMode||e[43]!==s.sortDirection||e[44]!==s.sortKey||e[45]!==s.viewMode?(h=t.jsx(ne,{title:"Hubs",viewMode:s.viewMode,onViewModeChange:s.setViewMode,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,sortOptions:K,ctaButton:L}),e[40]=L,e[41]=s.handleSort,e[42]=s.setViewMode,e[43]=s.sortDirection,e[44]=s.sortKey,e[45]=s.viewMode,e[46]=h):h=e[46];let g;e[47]!==s?(g=o=>{o.key==="Escape"&&(s.setSearch(""),o.target.blur())},e[47]=s,e[48]=g):g=e[48];let p;e[49]!==s.search||e[50]!==s.setSearch||e[51]!==g?(p=t.jsx(le,{value:s.search,onChange:s.setSearch,placeholder:"Search for a hub...",onKeyDown:g}),e[49]=s.search,e[50]=s.setSearch,e[51]=g,e[52]=p):p=e[52];let f;e[53]!==O||e[54]!==x||e[55]!==s.handleSort||e[56]!==s.search||e[57]!==s.sortDirection||e[58]!==s.sortKey||e[59]!==s.viewMode||e[60]!==i||e[61]!==r.slug?(f=s.viewMode==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:x.length===0?t.jsx(q,{image:t.jsx(j,{size:36,className:"text-muted-foreground"}),title:s.search?"No hubs found":"No hubs yet",description:s.search?`No hubs match "${s.search}"`:"Create a hub 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:x.map(o=>t.jsx(de,{connection:{id:o.id,title:o.title,description:o.description,icon:o.icon,status:o.status},fallbackIcon:t.jsx(j,{}),onClick:()=>i({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(U,{children:[t.jsx(X,{asChild:!0,children:t.jsx(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:$e,children:t.jsx(Z,{size:20})})}),t.jsxs(Y,{align:"end",onClick:Ie,children:[t.jsxs(B,{onClick:l=>{l.stopPropagation(),i({to:"/$org/gateways/$gatewayId",params:{org:r.slug,gatewayId:o.id}})},children:[t.jsx(Q,{size:16}),"Inspect"]}),t.jsxs(B,{variant:"destructive",onClick:l=>{l.stopPropagation(),b({type:"delete",gateway:o})},children:[t.jsx(ee,{size:16}),"Delete"]})]})]})},o.id))})}):t.jsx(ce,{columns:O,data:x,isLoading:!1,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,onRowClick:o=>i({to:"/$org/gateways/$gatewayId",params:{org:r.slug,gatewayId:o.id}}),emptyState:s.search?t.jsx(q,{image:t.jsx(j,{size:36,className:"text-muted-foreground"}),title:"No hubs found",description:`No hubs match "${s.search}"`}):t.jsx(q,{image:t.jsx(j,{size:36,className:"text-muted-foreground"}),title:"No hubs yet",description:"Create a hub to aggregate tools from multiple Connections."})}),e[53]=O,e[54]=x,e[55]=s.handleSort,e[56]=s.search,e[57]=s.sortDirection,e[58]=s.sortKey,e[59]=s.viewMode,e[60]=i,e[61]=r.slug,e[62]=f):f=e[62];let H;return e[63]!==u||e[64]!==h||e[65]!==p||e[66]!==f?(H=t.jsxs(ae,{children:[u,h,p,f]}),e[63]=u,e[64]=h,e[65]=p,e[66]=f,e[67]=H):H=e[67],H}function Ie(e){return e.stopPropagation()}function $e(e){return e.stopPropagation()}function Me(e){return e.stopPropagation()}function ze(e){return e.stopPropagation()}function Ae(e){return t.jsx(oe,{variant:e.status==="active"?"default":"outline",children:e.status})}function Pe(e){return t.jsx("span",{className:"text-sm text-muted-foreground",children:e.connections.length})}function Ee(e){return t.jsx(oe,{variant:"outline",className:"text-xs",children:e.tool_selection_mode==="exclusion"?"Exclude":"Include"})}function Ke(e){return t.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:e.description||"—"})}function He(e){return t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:e.title})}function Be(e){return t.jsx(ue,{icon:e.icon,name:e.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:t.jsx(j,{size:16})})}function dt(){const e=te.c(1);let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(he,{children:t.jsx(se.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ve,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(_e,{})})}),e[0]=r):r=e[0],r}export{dt as default};
1
+ import{c as te,j as t,r as se,h as re,t as ie}from"./index-Cum2JwLw.js";import{C as ne}from"./collection-header-CYfWhq42.js";import{C as ae}from"./collection-page-B--o_GqQ.js";import{C as le}from"./collection-search-CEIFKuWa.js";import{C as ce}from"./collection-table-wrapper-Bkcq39C4.js";import{C as de}from"./connection-card-CxBsRTZ8.js";import{u as me,E as q,I as ue}from"./use-connection-B2okCga5.js";import{E as he}from"./error-boundary-xrmWNOPn.js";import{a as ge,u as pe,i as j}from"./use-gateway-D2qdAc1R.js";import{u as fe,s as Q}from"./use-list-state-B4BSsLOv.js";import{u as xe}from"./project-context-provider-BYGGoCTs.js";import{c as je,b as ye,d as we,A as Ce,e as be,g as Ne,a as De,f as Se}from"./alert-dialog-DRjbecrO.js";import{B as oe}from"./badge-BB4ToOP0.js";import{B as J}from"./button-DfMRfE6U.js";import{b as U,D as X,a as Y,c as B}from"./dropdown-menu-DhuyLWwf.js";import{i as Z}from"./DotsVertical-CNQmKxkm.js";import{i as ve}from"./Loading01-DKaPtj3-.js";import{s as ee}from"./Trash01-B7rtyZ6_.js";import"./collection-display-button-NCEXG76d.js";import"./Grid01-CCmKx6B5.js";import"./view-mode-toggle-UYulkxW-.js";import"./input-BhavpdOt.js";import"./card-DtNOepPc.js";import"./use-mobile-CSmulDRc.js";import"./ChevronRight-Cys1zrTj.js";function ke(e,r){switch(r.type){case"delete":return{mode:"deleting",gateway:r.gateway};case"close":return{mode:"idle"}}}function _e(){const e=te.c(68),{org:r}=xe(),i=re();let y;e[0]!==r.slug?(y={namespace:r.slug,resource:"gateways"},e[0]=r.slug,e[1]=y):y=e[1];const s=fe(y),n=ge(),x=pe(s);let w;e[2]===Symbol.for("react.memo_cache_sentinel")?(w={},e[2]=w):w=e[2];const G=me(w);let C;e[3]===Symbol.for("react.memo_cache_sentinel")?(C={mode:"idle"},e[3]=C):C=e[3];const[a,b]=se.useReducer(ke,C);let N;e[4]!==n.create||e[5]!==G.length||e[6]!==i||e[7]!==r.slug?(N=async()=>{if(G.length===0){ie.error("Create at least one Connection first");return}const o=await n.create.mutateAsync({title:"New Hub",description:"Hubs let you securely expose integrated tools to the outside world.",status:"active",tool_selection_strategy:"passthrough",tool_selection_mode:"inclusion",connections:[]});i({to:"/$org/gateways/$gatewayId",params:{org:r.slug,gatewayId:o.id}})},e[4]=n.create,e[5]=G.length,e[6]=i,e[7]=r.slug,e[8]=N):N=e[8];const R=N;let D;e[9]!==n.delete||e[10]!==a.gateway||e[11]!==a.mode?(D=async()=>{if(a.mode!=="deleting")return;const o=a.gateway.id;b({type:"close"});try{await n.delete.mutateAsync(o)}catch{}},e[9]=n.delete,e[10]=a.gateway,e[11]=a.mode,e[12]=D):D=e[12];const T=D;let S,v,k,_,I,$;e[13]===Symbol.for("react.memo_cache_sentinel")?(v={id:"icon",header:"",render:Be,cellClassName:"w-16 shrink-0",wrap:!0},k={id:"title",header:"Name",render:He,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},_={id:"description",header:"Description",render:Ke,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},I={id:"mode",header:"Mode",accessor:Ee,cellClassName:"w-[100px]"},$={id:"connections",header:"Connections",render:Pe,cellClassName:"w-24 shrink-0"},S={id:"status",header:"Status",render:Ae,cellClassName:"w-24 shrink-0",sortable:!0},e[13]=S,e[14]=v,e[15]=k,e[16]=_,e[17]=I,e[18]=$):(S=e[13],v=e[14],k=e[15],_=e[16],I=e[17],$=e[18]);let M;e[19]!==i||e[20]!==r.slug?(M=[v,k,_,I,$,S,{id:"actions",header:"",render:o=>t.jsxs(U,{children:[t.jsx(X,{asChild:!0,children:t.jsx(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:ze,children:t.jsx(Z,{size:20})})}),t.jsxs(Y,{align:"end",onClick:Me,children:[t.jsxs(B,{onClick:l=>{l.stopPropagation(),i({to:"/$org/gateways/$gatewayId",params:{org:r.slug,gatewayId:o.id}})},children:[t.jsx(Q,{size:16}),"Inspect"]}),t.jsxs(B,{variant:"destructive",onClick:l=>{l.stopPropagation(),b({type:"delete",gateway:o})},children:[t.jsx(ee,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"}],e[19]=i,e[20]=r.slug,e[21]=M):M=e[21];const O=M,V=n.create.isPending?"Creating...":"Create Hub";let z;e[22]!==n.create.isPending||e[23]!==R||e[24]!==V?(z=t.jsx(J,{onClick:R,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:n.create.isPending,children:V}),e[22]=n.create.isPending,e[23]=R,e[24]=V,e[25]=z):z=e[25];const L=z,F=a.mode==="deleting";let A;e[26]===Symbol.for("react.memo_cache_sentinel")?(A=o=>!o&&b({type:"close"}),e[26]=A):A=e[26];let P;e[27]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(je,{children:"Delete Hub?"}),e[27]=P):P=e[27];const W=a.mode==="deleting"&&a.gateway.title;let c;e[28]!==W?(c=t.jsxs(ye,{children:[P,t.jsxs(we,{children:["This action cannot be undone. This will permanently delete"," ",t.jsx("span",{className:"font-medium text-foreground",children:W}),"."]})]}),e[28]=W,e[29]=c):c=e[29];let E;e[30]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(Ce,{children:"Cancel"}),e[30]=E):E=e[30];let d;e[31]!==T?(d=t.jsxs(be,{children:[E,t.jsx(Ne,{onClick:T,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[31]=T,e[32]=d):d=e[32];let m;e[33]!==c||e[34]!==d?(m=t.jsxs(De,{children:[c,d]}),e[33]=c,e[34]=d,e[35]=m):m=e[35];let u;e[36]!==F||e[37]!==m?(u=t.jsx(Se,{open:F,onOpenChange:A,children:m}),e[36]=F,e[37]=m,e[38]=u):u=e[38];let K;e[39]===Symbol.for("react.memo_cache_sentinel")?(K=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"status",label:"Status"}],e[39]=K):K=e[39];let h;e[40]!==L||e[41]!==s.handleSort||e[42]!==s.setViewMode||e[43]!==s.sortDirection||e[44]!==s.sortKey||e[45]!==s.viewMode?(h=t.jsx(ne,{title:"Hubs",viewMode:s.viewMode,onViewModeChange:s.setViewMode,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,sortOptions:K,ctaButton:L}),e[40]=L,e[41]=s.handleSort,e[42]=s.setViewMode,e[43]=s.sortDirection,e[44]=s.sortKey,e[45]=s.viewMode,e[46]=h):h=e[46];let g;e[47]!==s?(g=o=>{o.key==="Escape"&&(s.setSearch(""),o.target.blur())},e[47]=s,e[48]=g):g=e[48];let p;e[49]!==s.search||e[50]!==s.setSearch||e[51]!==g?(p=t.jsx(le,{value:s.search,onChange:s.setSearch,placeholder:"Search for a hub...",onKeyDown:g}),e[49]=s.search,e[50]=s.setSearch,e[51]=g,e[52]=p):p=e[52];let f;e[53]!==O||e[54]!==x||e[55]!==s.handleSort||e[56]!==s.search||e[57]!==s.sortDirection||e[58]!==s.sortKey||e[59]!==s.viewMode||e[60]!==i||e[61]!==r.slug?(f=s.viewMode==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:x.length===0?t.jsx(q,{image:t.jsx(j,{size:36,className:"text-muted-foreground"}),title:s.search?"No hubs found":"No hubs yet",description:s.search?`No hubs match "${s.search}"`:"Create a hub 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:x.map(o=>t.jsx(de,{connection:{id:o.id,title:o.title,description:o.description,icon:o.icon,status:o.status},fallbackIcon:t.jsx(j,{}),onClick:()=>i({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(U,{children:[t.jsx(X,{asChild:!0,children:t.jsx(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:$e,children:t.jsx(Z,{size:20})})}),t.jsxs(Y,{align:"end",onClick:Ie,children:[t.jsxs(B,{onClick:l=>{l.stopPropagation(),i({to:"/$org/gateways/$gatewayId",params:{org:r.slug,gatewayId:o.id}})},children:[t.jsx(Q,{size:16}),"Inspect"]}),t.jsxs(B,{variant:"destructive",onClick:l=>{l.stopPropagation(),b({type:"delete",gateway:o})},children:[t.jsx(ee,{size:16}),"Delete"]})]})]})},o.id))})}):t.jsx(ce,{columns:O,data:x,isLoading:!1,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,onRowClick:o=>i({to:"/$org/gateways/$gatewayId",params:{org:r.slug,gatewayId:o.id}}),emptyState:s.search?t.jsx(q,{image:t.jsx(j,{size:36,className:"text-muted-foreground"}),title:"No hubs found",description:`No hubs match "${s.search}"`}):t.jsx(q,{image:t.jsx(j,{size:36,className:"text-muted-foreground"}),title:"No hubs yet",description:"Create a hub to aggregate tools from multiple Connections."})}),e[53]=O,e[54]=x,e[55]=s.handleSort,e[56]=s.search,e[57]=s.sortDirection,e[58]=s.sortKey,e[59]=s.viewMode,e[60]=i,e[61]=r.slug,e[62]=f):f=e[62];let H;return e[63]!==u||e[64]!==h||e[65]!==p||e[66]!==f?(H=t.jsxs(ae,{children:[u,h,p,f]}),e[63]=u,e[64]=h,e[65]=p,e[66]=f,e[67]=H):H=e[67],H}function Ie(e){return e.stopPropagation()}function $e(e){return e.stopPropagation()}function Me(e){return e.stopPropagation()}function ze(e){return e.stopPropagation()}function Ae(e){return t.jsx(oe,{variant:e.status==="active"?"default":"outline",children:e.status})}function Pe(e){return t.jsx("span",{className:"text-sm text-muted-foreground",children:e.connections.length})}function Ee(e){return t.jsx(oe,{variant:"outline",className:"text-xs",children:e.tool_selection_mode==="exclusion"?"Exclude":"Include"})}function Ke(e){return t.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:e.description||"—"})}function He(e){return t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:e.title})}function Be(e){return t.jsx(ue,{icon:e.icon,name:e.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:t.jsx(j,{size:16})})}function dt(){const e=te.c(1);let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(he,{children:t.jsx(se.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ve,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(_e,{})})}),e[0]=r):r=e[0],r}export{dt as default};
@@ -1 +1 @@
1
- import{c as u,j as i,a as w,r as C,h as E}from"./index-DKhlCI_x.js";import{C as _}from"./card-Bm3Srv__.js";import{c as v,B as $}from"./button-DNDGU2TI.js";import{A as k}from"./avatar-CSdVudJi.js";import{i as A}from"./AlertCircle-CRLweBkr.js";import{s as O}from"./Plus-Dj_8zgGI.js";import{I as L}from"./input-DebjWxRP.js";import{C as D}from"./create-organization-dialog-ChswR6No.js";import"./alert-dialog-DRnTpMl_.js";import"./form-CeAHJl1w.js";import"./spinner-BNiD7mdl.js";function F(t){const e=u.c(10),{children:n,className:l,onNavigate:s,showHoverRing:r}=t,x=r===void 0?!1:r;let a;e[0]!==s?(a=p=>{s&&s(p)},e[0]=s,e[1]=a):a=e[1];const m=a,d=s&&"cursor-pointer",c=x&&"hover:ring-2 hover:ring-primary";let o;e[2]!==l||e[3]!==d||e[4]!==c?(o=v("group transition-all flex flex-col gap-0",d,c,l),e[2]=l,e[3]=d,e[4]=c,e[5]=o):o=e[5];let g;return e[6]!==n||e[7]!==m||e[8]!==o?(g=i.jsx(_,{className:o,onClick:m,children:n}),e[6]=n,e[7]=m,e[8]=o,e[9]=g):g=e[9],g}function H(t){const e=u.c(7),{url:n,fallback:l,shape:s,size:r,objectFit:x,className:a}=t,m=s===void 0?"square":s,d=r===void 0?"lg":r,c=x===void 0?"contain":x;let o;return e[0]!==a||e[1]!==l||e[2]!==c||e[3]!==m||e[4]!==d||e[5]!==n?(o=i.jsx(k,{url:n,fallback:l,shape:m,size:d,objectFit:c,className:a}),e[0]=a,e[1]=l,e[2]=c,e[3]=m,e[4]=d,e[5]=n,e[6]=o):o=e[6],o}function R(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("p-4 flex flex-col gap-4",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function B(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("font-medium truncate",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("p",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function G(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("text-sm text-muted-foreground truncate",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("h3",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function q(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("flex flex-col gap-[2px]",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function I(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("flex justify-between items-start",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function M(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("p-4 border-t border-border flex justify-between items-center",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function Q(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("flex items-center text-xs text-muted-foreground",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function T(){const t=u.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("div",{className:"flex justify-between items-start",children:i.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=i.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[e,i.jsxs("div",{className:"flex flex-col gap-[2px]",children:[i.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg animate-pulse"}),i.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=i.jsxs(_,{className:"group transition-colors flex flex-col",children:[n,i.jsxs("div",{className:"p-4 border-t border-border flex justify-between items-center",children:[i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]}),t[2]=l):l=t[2],l}const b=Object.assign(F,{Avatar:H,AvatarSection:I,Header:R,Title:B,Subtitle:G,Content:q,Footer:M,Badge:Q,Skeleton:T}),P={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8"},V={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"},X={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"},J={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"},K={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"},U={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 z(t){const e=u.c(13),{children:n,columns:l,gap:s,className:r}=t;let x;e[0]!==l?(x=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=x):x=e[1];const a=x,d=P[s===void 0?4:s],c=a.sm&&V[a.sm],o=a.md&&X[a.md],g=a.lg&&J[a.lg],p=a.xl&&K[a.xl],j=a["2xl"]&&U[a["2xl"]];let h;e[2]!==r||e[3]!==d||e[4]!==c||e[5]!==o||e[6]!==g||e[7]!==p||e[8]!==j?(h=v("w-full grid",d,c,o,g,p,j,r),e[2]=r,e[3]=d,e[4]=c,e[5]=o,e[6]=g,e[7]=p,e[8]=j,e[9]=h):h=e[9];const N=h;let f;return e[10]!==n||e[11]!==N?(f=i.jsx("div",{className:N,children:n}),e[10]=n,e[11]=N,e[12]=f):f=e[12],f}function W(t){const e=u.c(9),{count:n,columns:l,gap:s,className:r}=t,x=n===void 0?8:n;let a;e[0]!==l?(a=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=a):a=e[1];const m=a,d=s===void 0?4:s;let c;e[2]!==x?(c=Array.from({length:x}).map(Y),e[2]=x,e[3]=c):c=e[3];let o;return e[4]!==r||e[5]!==m||e[6]!==d||e[7]!==c?(o=i.jsx(z,{columns:m,gap:d,className:r,children:c}),e[4]=r,e[5]=m,e[6]=d,e[7]=c,e[8]=o):o=e[8],o}function Y(t,e){return i.jsxs("div",{className:"bg-card hover:bg-accent transition-colors flex flex-col rounded-lg animate-pulse",children:[i.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[i.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg"}),i.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"}),i.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"})]}),i.jsxs("div",{className:"p-4 border-t border-border flex items-center",children:[i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"}),i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]},e)}const S=Object.assign(z,{Skeleton:W});function Z(t){const e=u.c(14),{query:n}=t,{data:l}=w.useListOrganizations(),s=E();let r;e[0]!==l||e[1]!==n?(r=l?n?(()=>{const c=n.toLowerCase();return l.filter(o=>o.name.toLowerCase().includes(c)||o.slug.toLowerCase().includes(c))})():l:[],e[0]=l,e[1]=n,e[2]=r):r=e[2];const x=r;if(!l||l.length===0){let c;return e[3]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4 p-8",children:i.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"No organizations yet. Create your first organization to get started."})}),e[3]=c):c=e[3],c}if(x.length===0){let c;return e[4]!==n?(c=i.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4 p-8",children:i.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:['No organizations found matching "',n,'".']})}),e[4]=n,e[5]=c):c=e[5],c}let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a={sm:2,md:3,lg:4},e[6]=a):a=e[6];let m;if(e[7]!==x||e[8]!==s){let c;e[10]!==s?(c=o=>i.jsxs(b,{onNavigate:()=>s({to:"/$org",params:{org:o.slug}}),children:[i.jsxs(b.Header,{children:[i.jsx(b.AvatarSection,{children:i.jsx(b.Avatar,{url:o.logo||"",fallback:o.name,size:"lg",objectFit:"contain"})}),i.jsxs(b.Content,{children:[i.jsxs(b.Subtitle,{children:["@",o.slug]}),i.jsx(b.Title,{children:o.name})]})]}),i.jsx(b.Footer,{children:i.jsxs("div",{className:"text-xs text-muted-foreground",children:["Created:"," ",new Date(o.createdAt).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})]})})]},o.id),e[10]=s,e[11]=c):c=e[11],m=x.map(c),e[7]=x,e[8]=s,e[9]=m}else m=e[9];let d;return e[12]!==m?(d=i.jsx(S,{columns:a,children:m}),e[12]=m,e[13]=d):d=e[13],d}function ee(t){const e=u.c(3),{error:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(A,{size:24,className:"text-destructive"}),e[0]=l):l=e[0];let s;return e[1]!==n.message?(s=i.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4 p-8",children:[l,i.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:["Error loading organizations: ",n.message]})]}),e[1]=n.message,e[2]=s):s=e[2],s}function te(){const t=u.c(20),{error:e,isPending:n}=w.useListOrganizations(),[l,s]=C.useState(""),[r,x]=C.useState(!1),a=C.useDeferredValue(l);if(n){let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx("div",{className:"flex items-center justify-between mb-8",children:i.jsx("h2",{className:"text-xl font-medium",children:"My organizations"})}),t[0]=f):f=t[0];let y;return t[1]===Symbol.for("react.memo_cache_sentinel")?(y=i.jsxs("div",{className:"max-w-6xl mx-auto p-8",children:[f,i.jsx("div",{className:"@container",children:i.jsx(S.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}})})]}),t[1]=y):y=t[1],y}if(e){let f;return t[2]!==e?(f=i.jsx(ee,{error:e}),t[2]=e,t[3]=f):f=t[3],f}let m;t[4]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx("h2",{className:"text-xl font-medium",children:"My organizations"}),t[4]=m):m=t[4];let d;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=f=>s(f.target.value),t[5]=d):d=t[5];let c;t[6]!==l?(c=i.jsx(L,{className:"max-w-xs",placeholder:"Search",value:l,onChange:d}),t[6]=l,t[7]=c):c=t[7];let o;t[8]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsxs($,{variant:"default",onClick:()=>x(!0),children:[i.jsx(O,{size:16}),i.jsx("span",{children:"New organization"})]}),t[8]=o):o=t[8];let g;t[9]!==c?(g=i.jsxs("div",{className:"flex items-center justify-between mb-8",children:[m,i.jsxs("div",{className:"flex items-center gap-2",children:[c,o]})]}),t[9]=c,t[10]=g):g=t[10];let p;t[11]===Symbol.for("react.memo_cache_sentinel")?(p=i.jsx(S.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}}),t[11]=p):p=t[11];let j;t[12]!==a?(j=i.jsx("div",{className:"@container",children:i.jsx(C.Suspense,{fallback:p,children:i.jsx(Z,{query:a})})}),t[12]=a,t[13]=j):j=t[13];let h;t[14]!==r?(h=i.jsx(D,{open:r,onOpenChange:x}),t[14]=r,t[15]=h):h=t[15];let N;return t[16]!==g||t[17]!==j||t[18]!==h?(N=i.jsxs("div",{className:"max-w-6xl mx-auto p-8",children:[g,j,h]}),t[16]=g,t[17]=j,t[18]=h,t[19]=N):N=t[19],N}function fe(){const t=u.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("div",{className:"min-h-full",children:i.jsx(te,{})}),t[0]=e):e=t[0],e}export{fe as default};
1
+ import{c as u,j as i,a as w,r as C,h as E}from"./index-Cum2JwLw.js";import{C as _}from"./card-DtNOepPc.js";import{c as v,B as $}from"./button-DfMRfE6U.js";import{A as k}from"./avatar-mRj3EYSY.js";import{i as A}from"./AlertCircle-DHCtv9wC.js";import{s as O}from"./Plus-BOhWr_Yd.js";import{I as L}from"./input-BhavpdOt.js";import{C as D}from"./create-organization-dialog-CW3a_met.js";import"./alert-dialog-DRjbecrO.js";import"./form-Dq2sl6Cm.js";import"./spinner-7MBS50fZ.js";function F(t){const e=u.c(10),{children:n,className:l,onNavigate:s,showHoverRing:r}=t,x=r===void 0?!1:r;let a;e[0]!==s?(a=p=>{s&&s(p)},e[0]=s,e[1]=a):a=e[1];const m=a,d=s&&"cursor-pointer",c=x&&"hover:ring-2 hover:ring-primary";let o;e[2]!==l||e[3]!==d||e[4]!==c?(o=v("group transition-all flex flex-col gap-0",d,c,l),e[2]=l,e[3]=d,e[4]=c,e[5]=o):o=e[5];let g;return e[6]!==n||e[7]!==m||e[8]!==o?(g=i.jsx(_,{className:o,onClick:m,children:n}),e[6]=n,e[7]=m,e[8]=o,e[9]=g):g=e[9],g}function H(t){const e=u.c(7),{url:n,fallback:l,shape:s,size:r,objectFit:x,className:a}=t,m=s===void 0?"square":s,d=r===void 0?"lg":r,c=x===void 0?"contain":x;let o;return e[0]!==a||e[1]!==l||e[2]!==c||e[3]!==m||e[4]!==d||e[5]!==n?(o=i.jsx(k,{url:n,fallback:l,shape:m,size:d,objectFit:c,className:a}),e[0]=a,e[1]=l,e[2]=c,e[3]=m,e[4]=d,e[5]=n,e[6]=o):o=e[6],o}function R(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("p-4 flex flex-col gap-4",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function B(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("font-medium truncate",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("p",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function G(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("text-sm text-muted-foreground truncate",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("h3",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function q(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("flex flex-col gap-[2px]",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function I(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("flex justify-between items-start",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function M(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("p-4 border-t border-border flex justify-between items-center",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function Q(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("flex items-center text-xs text-muted-foreground",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function T(){const t=u.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("div",{className:"flex justify-between items-start",children:i.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=i.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[e,i.jsxs("div",{className:"flex flex-col gap-[2px]",children:[i.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg animate-pulse"}),i.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=i.jsxs(_,{className:"group transition-colors flex flex-col",children:[n,i.jsxs("div",{className:"p-4 border-t border-border flex justify-between items-center",children:[i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]}),t[2]=l):l=t[2],l}const b=Object.assign(F,{Avatar:H,AvatarSection:I,Header:R,Title:B,Subtitle:G,Content:q,Footer:M,Badge:Q,Skeleton:T}),P={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8"},V={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"},X={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"},J={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"},K={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"},U={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 z(t){const e=u.c(13),{children:n,columns:l,gap:s,className:r}=t;let x;e[0]!==l?(x=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=x):x=e[1];const a=x,d=P[s===void 0?4:s],c=a.sm&&V[a.sm],o=a.md&&X[a.md],g=a.lg&&J[a.lg],p=a.xl&&K[a.xl],j=a["2xl"]&&U[a["2xl"]];let h;e[2]!==r||e[3]!==d||e[4]!==c||e[5]!==o||e[6]!==g||e[7]!==p||e[8]!==j?(h=v("w-full grid",d,c,o,g,p,j,r),e[2]=r,e[3]=d,e[4]=c,e[5]=o,e[6]=g,e[7]=p,e[8]=j,e[9]=h):h=e[9];const N=h;let f;return e[10]!==n||e[11]!==N?(f=i.jsx("div",{className:N,children:n}),e[10]=n,e[11]=N,e[12]=f):f=e[12],f}function W(t){const e=u.c(9),{count:n,columns:l,gap:s,className:r}=t,x=n===void 0?8:n;let a;e[0]!==l?(a=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=a):a=e[1];const m=a,d=s===void 0?4:s;let c;e[2]!==x?(c=Array.from({length:x}).map(Y),e[2]=x,e[3]=c):c=e[3];let o;return e[4]!==r||e[5]!==m||e[6]!==d||e[7]!==c?(o=i.jsx(z,{columns:m,gap:d,className:r,children:c}),e[4]=r,e[5]=m,e[6]=d,e[7]=c,e[8]=o):o=e[8],o}function Y(t,e){return i.jsxs("div",{className:"bg-card hover:bg-accent transition-colors flex flex-col rounded-lg animate-pulse",children:[i.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[i.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg"}),i.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"}),i.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"})]}),i.jsxs("div",{className:"p-4 border-t border-border flex items-center",children:[i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"}),i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]},e)}const S=Object.assign(z,{Skeleton:W});function Z(t){const e=u.c(14),{query:n}=t,{data:l}=w.useListOrganizations(),s=E();let r;e[0]!==l||e[1]!==n?(r=l?n?(()=>{const c=n.toLowerCase();return l.filter(o=>o.name.toLowerCase().includes(c)||o.slug.toLowerCase().includes(c))})():l:[],e[0]=l,e[1]=n,e[2]=r):r=e[2];const x=r;if(!l||l.length===0){let c;return e[3]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4 p-8",children:i.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"No organizations yet. Create your first organization to get started."})}),e[3]=c):c=e[3],c}if(x.length===0){let c;return e[4]!==n?(c=i.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4 p-8",children:i.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:['No organizations found matching "',n,'".']})}),e[4]=n,e[5]=c):c=e[5],c}let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a={sm:2,md:3,lg:4},e[6]=a):a=e[6];let m;if(e[7]!==x||e[8]!==s){let c;e[10]!==s?(c=o=>i.jsxs(b,{onNavigate:()=>s({to:"/$org",params:{org:o.slug}}),children:[i.jsxs(b.Header,{children:[i.jsx(b.AvatarSection,{children:i.jsx(b.Avatar,{url:o.logo||"",fallback:o.name,size:"lg",objectFit:"contain"})}),i.jsxs(b.Content,{children:[i.jsxs(b.Subtitle,{children:["@",o.slug]}),i.jsx(b.Title,{children:o.name})]})]}),i.jsx(b.Footer,{children:i.jsxs("div",{className:"text-xs text-muted-foreground",children:["Created:"," ",new Date(o.createdAt).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})]})})]},o.id),e[10]=s,e[11]=c):c=e[11],m=x.map(c),e[7]=x,e[8]=s,e[9]=m}else m=e[9];let d;return e[12]!==m?(d=i.jsx(S,{columns:a,children:m}),e[12]=m,e[13]=d):d=e[13],d}function ee(t){const e=u.c(3),{error:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(A,{size:24,className:"text-destructive"}),e[0]=l):l=e[0];let s;return e[1]!==n.message?(s=i.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4 p-8",children:[l,i.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:["Error loading organizations: ",n.message]})]}),e[1]=n.message,e[2]=s):s=e[2],s}function te(){const t=u.c(20),{error:e,isPending:n}=w.useListOrganizations(),[l,s]=C.useState(""),[r,x]=C.useState(!1),a=C.useDeferredValue(l);if(n){let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx("div",{className:"flex items-center justify-between mb-8",children:i.jsx("h2",{className:"text-xl font-medium",children:"My organizations"})}),t[0]=f):f=t[0];let y;return t[1]===Symbol.for("react.memo_cache_sentinel")?(y=i.jsxs("div",{className:"max-w-6xl mx-auto p-8",children:[f,i.jsx("div",{className:"@container",children:i.jsx(S.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}})})]}),t[1]=y):y=t[1],y}if(e){let f;return t[2]!==e?(f=i.jsx(ee,{error:e}),t[2]=e,t[3]=f):f=t[3],f}let m;t[4]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx("h2",{className:"text-xl font-medium",children:"My organizations"}),t[4]=m):m=t[4];let d;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=f=>s(f.target.value),t[5]=d):d=t[5];let c;t[6]!==l?(c=i.jsx(L,{className:"max-w-xs",placeholder:"Search",value:l,onChange:d}),t[6]=l,t[7]=c):c=t[7];let o;t[8]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsxs($,{variant:"default",onClick:()=>x(!0),children:[i.jsx(O,{size:16}),i.jsx("span",{children:"New organization"})]}),t[8]=o):o=t[8];let g;t[9]!==c?(g=i.jsxs("div",{className:"flex items-center justify-between mb-8",children:[m,i.jsxs("div",{className:"flex items-center gap-2",children:[c,o]})]}),t[9]=c,t[10]=g):g=t[10];let p;t[11]===Symbol.for("react.memo_cache_sentinel")?(p=i.jsx(S.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}}),t[11]=p):p=t[11];let j;t[12]!==a?(j=i.jsx("div",{className:"@container",children:i.jsx(C.Suspense,{fallback:p,children:i.jsx(Z,{query:a})})}),t[12]=a,t[13]=j):j=t[13];let h;t[14]!==r?(h=i.jsx(D,{open:r,onOpenChange:x}),t[14]=r,t[15]=h):h=t[15];let N;return t[16]!==g||t[17]!==j||t[18]!==h?(N=i.jsxs("div",{className:"max-w-6xl mx-auto p-8",children:[g,j,h]}),t[16]=g,t[17]=j,t[18]=h,t[19]=N):N=t[19],N}function fe(){const t=u.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("div",{className:"min-h-full",children:i.jsx(te,{})}),t[0]=e):e=t[0],e}export{fe as default};