@decocms/mesh 1.0.0-alpha.40 → 1.0.0-alpha.41
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-DXrRWAdV.js → AlertCircle-D6ztaobt.js} +1 -1
- package/dist/client/assets/{ArrowLeft-B2kSl8Am.js → ArrowLeft-CjVyVt-H.js} +1 -1
- package/dist/client/assets/{CheckCircle-BjfQSM1r.js → CheckCircle-DgunLZQR.js} +1 -1
- package/dist/client/assets/{ChevronDown-LB39JZIr.js → ChevronDown-BbXb_40w.js} +1 -1
- package/dist/client/assets/{Clock-umdgxXOC.js → Clock-YTJnTBDI.js} +1 -1
- package/dist/client/assets/{Copy01-Bilz-YTB.js → Copy01-CCevdGb6.js} +1 -1
- package/dist/client/assets/{CpuChip02-CHm038ee.js → CpuChip02-CTGBZdsr.js} +1 -1
- package/dist/client/assets/{DotsVertical-Bpn8NPVg.js → DotsVertical-DWgbGhdO.js} +1 -1
- package/dist/client/assets/{File06-88jNCz1V.js → File06-CRfao4L4.js} +1 -1
- package/dist/client/assets/{Grid01-irgYf3_6.js → Grid01-S3S2kEug.js} +1 -1
- package/dist/client/assets/{Inbox01-CoVSGBs_.js → Inbox01-CdZg2SI6.js} +1 -1
- package/dist/client/assets/{InfoCircle-D7V0pgdh.js → InfoCircle-CEqhPApg.js} +1 -1
- package/dist/client/assets/{Key01-CKDDrXuQ.js → Key01-7zjlT7bl.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BWsuTDiz.js → LinkExternal01-Zdv63NPa.js} +1 -1
- package/dist/client/assets/{Loading01-BWm5a2UX.js → Loading01-CNHBx4kI.js} +1 -1
- package/dist/client/assets/{Plus-Slubr3Mn.js → Plus-DfnNWvZl.js} +1 -1
- package/dist/client/assets/{SearchMd-D-BfTFbd.js → SearchMd-DBUkNw9d.js} +1 -1
- package/dist/client/assets/{Trash01-QqFxB-ic.js → Trash01-CC4RWtjd.js} +1 -1
- package/dist/client/assets/{Upload01-BSDcq_ig.js → Upload01-ZzW7ToAX.js} +1 -1
- package/dist/client/assets/{X-qVvh8Z0J.js → X-CmV6VETi.js} +1 -1
- package/dist/client/assets/{XClose-Crvz7f11.js → XClose-C_Ro2jwa.js} +1 -1
- package/dist/client/assets/{alert-dialog-BKLc86P2.js → alert-dialog-DKN25P9n.js} +1 -1
- package/dist/client/assets/{auth-catchall-BAv_qdLN.js → auth-catchall-wEPMHcQu.js} +1 -1
- package/dist/client/assets/{auth-g7Ue41hR.js → auth-y34g-zyR.js} +1 -1
- package/dist/client/assets/{avatar-7mHRD9aF.js → avatar-D6wdL-4h.js} +1 -1
- package/dist/client/assets/{badge-CuERIkGI.js → badge-D5IC8-XQ.js} +1 -1
- package/dist/client/assets/{button-WiHHb1ae.js → button-n-dnBUcs.js} +1 -1
- package/dist/client/assets/{card-BCizSi8r.js → card--RtELIXA.js} +1 -1
- package/dist/client/assets/{checkbox-D_yjB9VU.js → checkbox-ByvFrlEw.js} +1 -1
- package/dist/client/assets/{collection-detail-CgNwKBY0.js → collection-detail-CBSvkQ-g.js} +1 -1
- package/dist/client/assets/{collection-display-button-C_wVSNLi.js → collection-display-button-BziK2H4v.js} +1 -1
- package/dist/client/assets/{collection-header-l34pbgNv.js → collection-header-AOGSaKJV.js} +1 -1
- package/dist/client/assets/{collection-page-BP2Cy5Z_.js → collection-page-Dx7W84ZY.js} +1 -1
- package/dist/client/assets/{collection-search-ByjFbpzN.js → collection-search-D33egpeg.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-PcMFmqtb.js → collection-table-wrapper-BWoWsFFZ.js} +1 -1
- package/dist/client/assets/{connection-card-DeV1geDy.js → connection-card-BPbF-94Z.js} +1 -1
- package/dist/client/assets/connection-detail-CwV1WRCA.js +1 -0
- package/dist/client/assets/{connections-FFVYK2AT.js → connections-D2Osqpr9.js} +1 -1
- package/dist/client/assets/{core-BdjBMvYV.js → core-BhcYClLI.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-DVhMCLRC.js → create-organization-dialog-CJOAZXZ4.js} +1 -1
- package/dist/client/assets/{deco-chat-skeleton-DyT_mbhr.js → deco-chat-skeleton-DgwTbso-.js} +3 -3
- package/dist/client/assets/{dialog-CbMK5n2S.js → dialog-Dn--K_0P.js} +1 -1
- package/dist/client/assets/{dropdown-menu-24ciec9y.js → dropdown-menu-DSDzjgEf.js} +1 -1
- package/dist/client/assets/{error-boundary-Bstevc3G.js → error-boundary-kZqJcvYt.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BDRFIBL1.js → extract-connection-data-PMNMoMwh.js} +1 -1
- package/dist/client/assets/{form-BrDOMpvk.js → form-BSFKQpec.js} +1 -1
- package/dist/client/assets/formatDistanceToNow-Mwdq3o1w.js +1 -0
- package/dist/client/assets/gateway-detail-DOneoUn2.js +1 -0
- package/dist/client/assets/{gateways-DSDcO81b.js → gateways-CjpiwVjc.js} +1 -1
- package/dist/client/assets/{home-jplK_fO7.js → home-M1jCNsQa.js} +1 -1
- package/dist/client/assets/{index-RVsrtNt7.js → index-Bg7J5oIq.js} +1 -1
- package/dist/client/assets/{index-C3HgpkDC.js → index-CXP-3IgR.js} +1 -1
- package/dist/client/assets/index-C_LVkq3-.js +32 -0
- package/dist/client/assets/{index-BXYAUeFB.js → index-DDrssUsd.js} +14 -14
- package/dist/client/assets/{index-CyW1ja-u.css → index-DPE8fUfl.css} +1 -1
- package/dist/client/assets/{input-BElOouK2.js → input-8OLj0EZ_.js} +1 -1
- package/dist/client/assets/json-_ojk50i2.js +1 -0
- package/dist/client/assets/{json-syntax-highlighter-D6mKVwSQ.js → json-syntax-highlighter-DefdwgI_.js} +2 -2
- package/dist/client/assets/{layout-BDLGK1gR.js → layout-BlymenNb.js} +1 -1
- package/dist/client/assets/{lazy-highlighter-nw4fsvsj.js → lazy-highlighter-DB5NDxPR.js} +1 -1
- package/dist/client/assets/{localstorage-keys-BbAFEk_U.js → localstorage-keys-CKN9Xi55.js} +1 -1
- package/dist/client/assets/{login-DlVoXdaF.js → login-sBeHDiTP.js} +1 -1
- package/dist/client/assets/{mcp-oauth-O6gPUgdn.js → mcp-oauth-2aNbgRyW.js} +1 -1
- package/dist/client/assets/{members-DnI1WLbh.js → members-6chwwhsu.js} +1 -1
- package/dist/client/assets/{monitoring-WJqycdC6.js → monitoring-Cb6EoA-b.js} +1 -1
- package/dist/client/assets/{oauth-callback-C-msM3ED.js → oauth-callback-DAWi3xsa.js} +1 -1
- package/dist/client/assets/{page-CKHPoEps.js → page-BZMAJRR4.js} +1 -1
- package/dist/client/assets/{popover--gsKamR2.js → popover-CgBSUikh.js} +1 -1
- package/dist/client/assets/prism-light-B2_4LIBk.js +1 -0
- package/dist/client/assets/resource-tabs-DfS272DC.js +1 -0
- package/dist/client/assets/{schema-DxhaF6b0.js → schema-CcHURukQ.js} +1 -1
- package/dist/client/assets/{select-DuRyb06m.js → select-D032IwwR.js} +1 -1
- package/dist/client/assets/{settings-Cf2w5DBP.js → settings-CdDiUrft.js} +1 -1
- package/dist/client/assets/shell-layout-BrTksREn.js +17 -0
- package/dist/client/assets/{spinner-CkZFBFUf.js → spinner-CnnM_4YL.js} +1 -1
- package/dist/client/assets/{store-BCi6vudl.js → store-PUlSXJGE.js} +1 -1
- package/dist/client/assets/store-app-detail-C7BmJzlu.js +1 -0
- package/dist/client/assets/{switch-D3JJPNlW.js → switch-y8R7z10u.js} +1 -1
- package/dist/client/assets/{textarea-4CYb655q.js → textarea-BFoLEajE.js} +1 -1
- package/dist/client/assets/tools-list-DoiOjPde.js +1 -0
- package/dist/client/assets/{tooltip-Dgdin-_i.js → tooltip-CScUy2XK.js} +1 -1
- package/dist/client/assets/{types-DaSChKd_.js → types-xAaKjcGO.js} +1 -1
- package/dist/client/assets/{use-binding-BgnJVxG_.js → use-binding-Csa06z5J.js} +2 -2
- package/dist/client/assets/{use-connection-DcTy916p.js → use-connection-DrLts5Bh.js} +1 -1
- package/dist/client/assets/{use-gateway-I6Ko0Jgt.js → use-gateway-D8DNYcSu.js} +1 -1
- package/dist/client/assets/{use-list-state-SFgQOu4M.js → use-list-state-XxCjYHe0.js} +1 -1
- package/dist/client/assets/{use-mcp-CiOCImLK.js → use-mcp-8IvMYP4j.js} +1 -1
- package/dist/client/assets/{use-members-DZwzW0q9.js → use-members-BpQaxhYw.js} +1 -1
- package/dist/client/assets/{use-mobile-_Q7J0JGT.js → use-mobile-D-4KOtW8.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CWarZMrC.js → use-organization-settings-DFt-PXFE.js} +1 -1
- package/dist/client/assets/use-tool-call-Ega50w5M.js +1 -0
- package/dist/client/assets/useQuery-iHOeESxa.js +1 -0
- package/dist/client/assets/utils-BNxGaTF3.js +1 -0
- package/dist/client/assets/{well-known-mcp-6m7w8EhN.js → well-known-mcp-DyxrC_Rx.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +164 -164
- package/dist/server/migrate.js +124 -124
- package/dist/server/server.js +123 -123
- package/package.json +1 -1
- package/dist/client/assets/connection-detail-z_aMgOoM.js +0 -1
- package/dist/client/assets/formatDistanceToNow-Ctx6mZEP.js +0 -1
- package/dist/client/assets/gateway-detail-DT2HrSfW.js +0 -1
- package/dist/client/assets/index-1pyJ2pUa.js +0 -32
- package/dist/client/assets/json-CtipqR6C.js +0 -1
- package/dist/client/assets/prism-light-DntDK3V1.js +0 -1
- package/dist/client/assets/resource-tabs-BwUWNlYE.js +0 -1
- package/dist/client/assets/shell-layout-Ca0-di6U.js +0 -17
- package/dist/client/assets/store-app-detail-CjU1HPaK.js +0 -1
- package/dist/client/assets/use-tool-call-BWqj0h3N.js +0 -1
- package/dist/client/assets/useQuery-C_tbj2zS.js +0 -1
- package/dist/client/assets/utils-D2m6QoGq.js +0 -1
- /package/dist/client/assets/{resource-tabs-CSRUKxnt.css → tools-list-CSRUKxnt.css} +0 -0
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as ie,c as L,j as t,f as Ee,a as lt,t as rt,d as at,b as ct,av as dt}from"./index-BXYAUeFB.js";import{E as Oe}from"./SearchMd-D-BfTFbd.js";import{E as Ue}from"./error-boundary-Bstevc3G.js";import{I as Ke,b as We,d as mt,e as ut,c as ft,a as pt}from"./use-connection-DcTy916p.js";import{b as ht}from"./use-binding-BgnJVxG_.js";import{E as Ve,P as xt,u as gt,S as jt}from"./index-1pyJ2pUa.js";import{B as xe}from"./button-WiHHb1ae.js";import{i as qe}from"./Loading01-BWm5a2UX.js";import{a as bt,T as Ct,R as vt}from"./resource-tabs-BwUWNlYE.js";import{V as yt,a as wt,b as Nt}from"./layout-BDLGK1gR.js";import{g as Be}from"./generate-id-Dyweu44Y.js";import{C as Ge}from"./collection-display-button-C_wVSNLi.js";import{C as St}from"./collection-search-ByjFbpzN.js";import{C as _t}from"./card-BCizSi8r.js";import{b as He,D as Je,a as Ze,c as V}from"./dropdown-menu-24ciec9y.js";import{a as Qe}from"./Copy01-Bilz-YTB.js";import{i as Xe}from"./DotsVertical-Bpn8NPVg.js";import{s as Ye,u as It}from"./use-list-state-SFgQOu4M.js";import{s as et}from"./Trash01-QqFxB-ic.js";import{C as Tt}from"./collection-table-wrapper-PcMFmqtb.js";import{n as Re}from"./Inbox01-CoVSGBs_.js";import{B as At}from"./extract-connection-data-BDRFIBL1.js";import{A as Dt,g as $t,c as Pt,b as kt,d as Et,e as Ot,a as zt,f as Mt}from"./alert-dialog-BKLc86P2.js";import{s as Lt}from"./Plus-Slubr3Mn.js";import"./utils-D2m6QoGq.js";import"./tooltip-Dgdin-_i.js";import"./auth-g7Ue41hR.js";import"./mcp-oauth-O6gPUgdn.js";import"./use-organization-settings-CWarZMrC.js";import"./use-tool-call-BWqj0h3N.js";import"./File06-88jNCz1V.js";import"./Key01-CKDDrXuQ.js";import"./form-BrDOMpvk.js";import"./input-BElOouK2.js";import"./select-DuRyb06m.js";import"./ChevronDown-LB39JZIr.js";import"./use-gateway-I6Ko0Jgt.js";import"./Grid01-irgYf3_6.js";import"./CpuChip02-CHm038ee.js";import"./formatDistanceToNow-Ctx6mZEP.js";import"./registry-utils-ulDDT0d8.js";import"./index-RVsrtNt7.js";import"./index-C3HgpkDC.js";import"./schema-DxhaF6b0.js";import"./useQuery-C_tbj2zS.js";import"./badge-CuERIkGI.js";import"./ArrowLeft-B2kSl8Am.js";import"./use-mobile-_Q7J0JGT.js";const ze=({size:s=24,color:e="currentColor",...o})=>ie.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},ie.createElement("path",{d:"M2.876 18.116c.046-.414.069-.62.131-.814a2 2 0 0 1 .234-.485c.111-.17.259-.317.553-.61L17 3a2.828 2.828 0 1 1 4 4L7.794 20.206c-.294.294-.442.442-.611.553a2 2 0 0 1-.485.233c-.193.063-.4.086-.814.132L2.5 21.5l.376-3.384Z"}));ze.displayName="Edit01";function Vt(s,e){const o=s.properties||{};for(const n in o){const r=o[n];if(r&&r.type==="string"&&(r.format==="url"||r.format==="uri")&&e&&typeof e=="object"&&n in e&&e[n])return e[n]}const l=["image","img","avatar","icon","logo","thumbnail","cover"];for(const n of l)if(e&&typeof e=="object"&&n in e&&typeof e[n]=="string")return e[n]}function Bt(s){const e=L.c(25),{item:o,schema:l,actions:n}=s;let r;e[0]!==o||e[1]!==l?(r=Vt(l,o),e[0]=o,e[1]=l,e[2]=r):r=e[2];const d=r,f=o&&typeof o=="object"&&"description"in o&&typeof o.description=="string"?o.description:void 0;let C;e[3]!==n?(C=n&&Object.keys(n).length>0,e[3]=n,e[4]=C):C=e[4];const i=C;let c;e[5]!==d||e[6]!==o.title?(c=t.jsx(Ke,{icon:d,name:o.title,size:"md",className:"shrink-0 shadow-sm"}),e[5]=d,e[6]=o.title,e[7]=c):c=e[7];let j;e[8]!==o.title?(j=t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:o.title}),e[8]=o.title,e[9]=j):j=e[9];const m=f||"No description";let u;e[10]!==m?(u=t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:m}),e[10]=m,e[11]=u):u=e[11];let p;e[12]!==j||e[13]!==u?(p=t.jsxs("div",{className:"flex flex-col gap-0 flex-1",children:[j,u]}),e[12]=j,e[13]=u,e[14]=p):p=e[14];let g;e[15]!==c||e[16]!==p?(g=t.jsxs("div",{className:"flex flex-col gap-4 p-6 flex-1",children:[c,p]}),e[15]=c,e[16]=p,e[17]=g):g=e[17];let a;e[18]!==n||e[19]!==i||e[20]!==o?(a=i&&t.jsx("div",{className:"absolute top-6 right-6 opacity-0 group-hover:opacity-100 transition-opacity",onClick:Kt,onMouseDown:Ut,children:t.jsxs(He,{children:[t.jsx(Je,{asChild:!0,children:t.jsx(xe,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:Ft,children:t.jsx(Xe,{size:20})})}),t.jsxs(Ze,{align:"end",onClick:Rt,children:[n.open&&t.jsxs(V,{onClick:v=>{v.stopPropagation(),n.open?.(o)},children:[t.jsx(Ye,{size:16}),"Open"]}),n.edit&&t.jsxs(V,{onClick:v=>{v.stopPropagation(),n.edit?.(o)},children:[t.jsx(ze,{size:16}),"Edit"]}),n.duplicate&&t.jsxs(V,{onClick:v=>{v.stopPropagation(),n.duplicate?.(o)},children:[t.jsx(Qe,{size:16}),"Duplicate"]}),n.delete&&t.jsxs(V,{variant:"destructive",onClick:v=>{v.stopPropagation(),n.delete?.(o)},children:[t.jsx(et,{size:16}),"Delete"]})]})]})}),e[18]=n,e[19]=i,e[20]=o,e[21]=a):a=e[21];let T;return e[22]!==g||e[23]!==a?(T=t.jsxs(_t,{className:"cursor-pointer transition-colors h-full flex flex-col group relative",children:[g,a]}),e[22]=g,e[23]=a,e[24]=T):T=e[24],T}function Rt(s){return s.stopPropagation()}function Ft(s){return s.stopPropagation()}function Ut(s){return s.stopPropagation()}function Kt(s){return s.stopPropagation()}const Wt=["icon","avatar","logo"],Fe=["created_at","created_by","id"];function qt(s){return Object.keys(s).find(e=>Wt.includes(e.toLowerCase()))}function tt(s,e){return Object.keys(s.properties||{}).filter(o=>["id","created_at","updated_at","created_by","updated_by"].includes(o)?!1:e?e.includes(o):!0).map(o=>({id:o,label:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," ")}))}function Gt(s){const e=L.c(32),{data:o,schema:l,viewMode:n,onViewModeChange:r,search:d,sortKey:f,sortDirection:C,onSort:i,actions:c,onItemClick:j,headerActions:m,emptyState:u,readOnly:p,columns:g,hideToolbar:a,sortableFields:T}=s,v=r===void 0?Xt:r,b=C===void 0?"asc":C,P=i===void 0?Qt:i;let w;e[0]!==c?(w=c===void 0?{}:c,e[0]=c,e[1]=w):w=e[1];const h=w,A=j===void 0?Zt:j,D=m===void 0?null:m,y=u===void 0?null:u,k=p===void 0?!1:p,_=g===void 0?void 0:g,E=a===void 0?!1:a,N=T===void 0?void 0:T;let z;e[2]!==_||e[3]!==l||e[4]!==N?(z=_?_.filter(Jt).filter(M=>!N||N.includes(M.id)).map(Ht):tt(l,N),e[2]=_,e[3]=l,e[4]=N,e[5]=z):z=e[5];const I=z;let S;e[6]!==D||e[7]!==E||e[8]!==P||e[9]!==v||e[10]!==b||e[11]!==f||e[12]!==I||e[13]!==n?(S=!E&&t.jsx("div",{className:"shrink-0 w-full border-b border-border h-12",children:t.jsxs("div",{className:"flex items-center gap-3 h-12 px-4",children:[t.jsx("div",{className:"flex items-center gap-2 flex-1",children:D}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(Ge,{viewMode:n,onViewModeChange:v,sortKey:f,sortDirection:b,onSort:P,sortOptions:I})})]})}),e[6]=D,e[7]=E,e[8]=P,e[9]=v,e[10]=b,e[11]=f,e[12]=I,e[13]=n,e[14]=S):S=e[14];let O;e[15]!==h||e[16]!==_||e[17]!==o||e[18]!==y||e[19]!==A||e[20]!==P||e[21]!==k||e[22]!==l||e[23]!==d||e[24]!==b||e[25]!==f||e[26]!==N||e[27]!==n?(O=n==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:o.length===0?t.jsx("div",{className:"flex items-center justify-center h-full",children:y||t.jsx(Ve,{icon:t.jsx(Re,{size:36,className:"text-muted-foreground"}),title:"No items found",description:d?"Try adjusting your search":"No items to display"})}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:o.map(M=>t.jsx("div",{onClick:()=>A?.(M),className:"cursor-pointer h-full",children:t.jsx(Bt,{item:M,schema:l,readOnly:k,actions:h})},M.id))})}):t.jsx(Tt,{columns:ts(_,l,N,h),data:o,sortKey:f,sortDirection:b,onSort:P,onRowClick:A,emptyState:y||t.jsx(Ve,{icon:t.jsx(Re,{size:36,className:"text-muted-foreground"}),title:"No items found",description:d?"Try adjusting your search":"No items to display"})}),e[15]=h,e[16]=_,e[17]=o,e[18]=y,e[19]=A,e[20]=P,e[21]=k,e[22]=l,e[23]=d,e[24]=b,e[25]=f,e[26]=N,e[27]=n,e[28]=O):O=e[28];let x;return e[29]!==S||e[30]!==O?(x=t.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[S,O]}),e[29]=S,e[30]=O,e[31]=x):x=e[31],x}function Ht(s){return{id:s.id,label:typeof s.header=="string"?s.header:s.id}}function Jt(s){return s.sortable!==!1}function Zt(){}function Qt(){}function Xt(){}function Yt(s){return{id:"actions",header:"",render:e=>t.jsxs(He,{children:[t.jsx(Je,{asChild:!0,children:t.jsx(xe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:o=>o.stopPropagation(),children:t.jsx(Xe,{size:20})})}),t.jsxs(Ze,{align:"end",onClick:o=>o.stopPropagation(),children:[s.open&&t.jsxs(V,{onClick:o=>{o.stopPropagation(),s.open?.(e)},children:[t.jsx(Ye,{size:16}),"Open"]}),s.edit&&t.jsxs(V,{onClick:o=>{o.stopPropagation(),s.edit?.(e)},children:[t.jsx(ze,{size:16}),"Edit"]}),s.duplicate&&t.jsxs(V,{onClick:o=>{o.stopPropagation(),s.duplicate?.(e)},children:[t.jsx(Qe,{size:16}),"Duplicate"]}),s.delete&&t.jsxs(V,{variant:"destructive",onClick:o=>{o.stopPropagation(),s.delete?.(e)},children:[t.jsx(et,{size:16}),"Delete"]})]})]}),cellClassName:"w-[60px]",sortable:!1}}function st(s){const e=s.type;return Array.isArray(e)?e.every(o=>st({type:o})):e==="string"||e==="number"||e==="integer"||e==="boolean"||e==="null"}function es(s,e){const o=s.properties||{},l=Object.keys(o).filter(i=>{const c=o[i];return c&&st(c)}),n=qt(o),r=[],d=new Set;n&&l.includes(n)&&(r.push(n),d.add(n));const f=["title","description","updated_at","updated_by"];for(const i of f)l.includes(i)&&!d.has(i)&&(r.push(i),d.add(i));const C=l.filter(i=>!d.has(i)&&!Fe.includes(i)).sort((i,c)=>i.localeCompare(c));for(const i of C)r.push(i),d.add(i);for(const i of Fe)l.includes(i)&&!d.has(i)&&(r.push(i),d.add(i));return r.map(i=>{const c=o[i],j=e?e.includes(i):!["id"].includes(i);return i===n?{id:i,header:"",render:m=>{const u=m[i];return t.jsx(Ke,{icon:u,name:m.title,size:"sm",className:"shrink-0 shadow-sm"})},sortable:!1,cellClassName:"w-16 shrink-0",wrap:!0}:i==="description"?{id:i,header:"Description",render:m=>{const u=m[i];return u==null?"—":t.jsx("span",{className:"block truncate max-w-[50ch]",children:String(u)})},sortable:j,cellClassName:"max-w-[50ch]"}:c?.format==="date-time"||i.endsWith("_at")?{id:i,header:i.charAt(0).toUpperCase()+i.slice(1).replace(/_/g," "),render:m=>{const u=m[i];return u?t.jsx("span",{className:"block truncate max-w-full",children:new Date(u).toLocaleDateString()}):"—"},sortable:j,cellClassName:"max-w-[200px]"}:{id:i,header:i.charAt(0).toUpperCase()+i.slice(1).replace(/_/g," "),render:m=>{const u=m[i];return u==null?"—":t.jsx("span",{className:"block truncate max-w-full",children:String(u)})},sortable:j,cellClassName:"max-w-[200px]"}})}function ts(s,e,o,l){const n=s||es(e,o);return n.some(f=>f.id==="actions")?n:Object.keys(l).length>0?[...n,Yt(l)]:n}function ss(s){const e=L.c(117),{connectionId:o,org:l,activeCollection:n}=s,r=n.name,d=n.schema??At,f=n.hasCreateTool,C=n.hasUpdateTool,i=n.hasDeleteTool,c=Ee(),{data:j}=lt.useSession(),m=j?.user?.id||"unknown",u=We(o);let p;e[0]!==o?(p=ft(o),e[0]=o,e[1]=p):p=e[1];const g=p,a=mt(o,r,g),T=`${o}-${r}`;let v;e[2]!==l||e[3]!==T?(v={namespace:l,resource:T,defaultSortKey:"updated_at"},e[2]=l,e[3]=T,e[4]=v):v=e[4];const{search:b,searchTerm:P,setSearch:w,viewMode:h,setViewMode:A,sortKey:D,sortDirection:y,handleSort:k}=It(v);let _;e[5]!==P||e[6]!==y||e[7]!==D?(_={searchTerm:P,sortKey:D,sortDirection:y},e[5]=P,e[6]=y,e[7]=D,e[8]=_):_=e[8];const E=ut(o,r,g,_),N=!f&&!C&&!i;let z;e[9]!==r||e[10]!==o||e[11]!==c||e[12]!==l?(z=$=>{c({to:"/$org/mcps/$connectionId/$collectionName/$itemId",params:{org:l,connectionId:o,collectionName:r,itemId:$.id}})},e[9]=r,e[10]=o,e[11]=c,e[12]=l,e[13]=z):z=e[13];const I=z;let S;e[14]!==a.create||e[15]!==m?(S=async $=>{const he=new Date().toISOString();await a.create.mutateAsync({...$,id:Be("conn"),title:`${$.title} (Copy)`,created_at:he,updated_at:he,created_by:m,updated_by:m})},e[14]=a.create,e[15]=m,e[16]=S):S=e[16];const O=S,[x,M]=ie.useState(null);let le;e[17]===Symbol.for("react.memo_cache_sentinel")?(le=$=>{M($)},e[17]=le):le=e[17];const ot=le;let B;e[18]!==I||e[19]!==C?(B=C&&{edit:I},e[18]=I,e[19]=C,e[20]=B):B=e[20];let R;e[21]!==O||e[22]!==f?(R=f&&{duplicate:O},e[21]=O,e[22]=f,e[23]=R):R=e[23];let F;e[24]!==i?(F=i&&{delete:ot},e[24]=i,e[25]=F):F=e[25];let re;e[26]!==F||e[27]!==B||e[28]!==R?(re={...B,...R,...F},e[26]=F,e[27]=B,e[28]=R,e[29]=re):re=e[29];const ge=re;let ae;e[30]!==a.delete||e[31]!==x?(ae=async()=>{x&&(await a.delete.mutateAsync(x.id),M(null))},e[30]=a.delete,e[31]=x,e[32]=ae):ae=e[32];const je=ae;let ce;e[33]!==a.create||e[34]!==r||e[35]!==o||e[36]!==f||e[37]!==c||e[38]!==l||e[39]!==m?(ce=async()=>{if(!f){rt.error("Create operation is not available for this collection");return}const $=new Date().toISOString(),he={id:Be("conn"),title:"New Item",description:"A brief description of the item",created_at:$,updated_at:$,created_by:m,updated_by:m};try{const ke=await a.create.mutateAsync(he);c({to:"/$org/mcps/$connectionId/$collectionName/$itemId",params:{org:l,connectionId:o,collectionName:r,itemId:ke.id}})}catch(ke){console.error("Failed to create item:",ke)}},e[33]=a.create,e[34]=r,e[35]=o,e[36]=f,e[37]=c,e[38]=l,e[39]=m,e[40]=ce):ce=e[40];const be=ce;let de;e[41]!==d?(de=tt(d),e[41]=d,e[42]=de):de=e[42];const Ce=de,Me=(E?.length??0)>0,nt=f&&Me,it=f&&!Me&&!b;let me;e[43]!==a.create||e[44]!==be||e[45]!==f?(me=f?t.jsxs(xe,{onClick:be,size:"sm",disabled:a.create.isPending,className:"h-7",children:[t.jsx(Lt,{className:"mr-2 h-4 w-4"}),a.create.isPending?"Creating...":"Create"]}):null,e[43]=a.create,e[44]=be,e[45]=f,e[46]=me):me=e[46];const Le=me,ve=D;let U;e[47]!==k||e[48]!==A||e[49]!==y||e[50]!==Ce||e[51]!==ve||e[52]!==h?(U=t.jsx(Ge,{viewMode:h,onViewModeChange:A,sortKey:ve,sortDirection:y,onSort:k,sortOptions:Ce}),e[47]=k,e[48]=A,e[49]=y,e[50]=Ce,e[51]=ve,e[52]=h,e[53]=U):U=e[53];const ye=`${r}s`,we=u?.icon??"grid_view";let K;e[54]!==o||e[55]!==ye||e[56]!==we?(K=t.jsx(xt,{connectionId:o,title:ye,icon:we}),e[54]=o,e[55]=ye,e[56]=we,e[57]=K):K=e[57];const Ne=nt&&Le;let W;e[58]!==U||e[59]!==K||e[60]!==Ne?(W=t.jsxs(yt,{children:[U,K,Ne]}),e[58]=U,e[59]=K,e[60]=Ne,e[61]=W):W=e[61];const Se=`Search ${r}...`;let q;e[62]!==w?(q=$=>{$.key==="Escape"&&(w(""),$.target.blur())},e[62]=w,e[63]=q):q=e[63];let G;e[64]!==b||e[65]!==w||e[66]!==Se||e[67]!==q?(G=t.jsx(St,{value:b,onChange:w,placeholder:Se,onKeyDown:q}),e[64]=b,e[65]=w,e[66]=Se,e[67]=q,e[68]=G):G=e[68];let H;e[69]!==E?(H=E??[],e[69]=E,e[70]=H):H=e[70];const _e=D;let J;e[71]!==I?(J=$=>I($),e[71]=I,e[72]=J):J=e[72];const Ie="No items found",Te=b?"Try adjusting your search terms":"This collection doesn't have any items yet.",Ae=it?Le:void 0;let Z;e[73]!==Ie||e[74]!==Te||e[75]!==Ae?(Z=t.jsx(Oe,{image:null,title:Ie,description:Te,actions:Ae}),e[73]=Ie,e[74]=Te,e[75]=Ae,e[76]=Z):Z=e[76];let Q;e[77]!==k||e[78]!==N||e[79]!==ge||e[80]!==d||e[81]!==b||e[82]!==w||e[83]!==A||e[84]!==y||e[85]!==H||e[86]!==_e||e[87]!==J||e[88]!==Z||e[89]!==h?(Q=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(Gt,{hideToolbar:!0,data:H,schema:d,viewMode:h,onViewModeChange:A,search:b,onSearchChange:w,sortKey:_e,sortDirection:y,onSort:k,actions:ge,onItemClick:J,readOnly:N,emptyState:Z})}),e[77]=k,e[78]=N,e[79]=ge,e[80]=d,e[81]=b,e[82]=w,e[83]=A,e[84]=y,e[85]=H,e[86]=_e,e[87]=J,e[88]=Z,e[89]=h,e[90]=Q):Q=e[90];let X;e[91]!==G||e[92]!==Q?(X=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[G,Q]}),e[91]=G,e[92]=Q,e[93]=X):X=e[93];const De=!!x;let ue;e[94]===Symbol.for("react.memo_cache_sentinel")?(ue=$=>{$||M(null)},e[94]=ue):ue=e[94];let fe;e[95]===Symbol.for("react.memo_cache_sentinel")?(fe=t.jsx(Pt,{children:"Delete item?"}),e[95]=fe):fe=e[95];const $e=x?.title;let Y;e[96]!==$e?(Y=t.jsxs(kt,{children:[fe,t.jsxs(Et,{children:['Are you sure you want to delete "',$e,'"? This action cannot be undone.']})]}),e[96]=$e,e[97]=Y):Y=e[97];let ee;e[98]!==a.delete.isPending?(ee=t.jsx(Dt,{disabled:a.delete.isPending,children:"Cancel"}),e[98]=a.delete.isPending,e[99]=ee):ee=e[99];const Pe=a.delete.isPending?"Deleting...":"Delete";let te;e[100]!==a.delete.isPending||e[101]!==je||e[102]!==Pe?(te=t.jsx($t,{onClick:je,disabled:a.delete.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Pe}),e[100]=a.delete.isPending,e[101]=je,e[102]=Pe,e[103]=te):te=e[103];let se;e[104]!==ee||e[105]!==te?(se=t.jsxs(Ot,{children:[ee,te]}),e[104]=ee,e[105]=te,e[106]=se):se=e[106];let oe;e[107]!==Y||e[108]!==se?(oe=t.jsxs(zt,{children:[Y,se]}),e[107]=Y,e[108]=se,e[109]=oe):oe=e[109];let ne;e[110]!==De||e[111]!==oe?(ne=t.jsx(Mt,{open:De,onOpenChange:ue,children:oe}),e[110]=De,e[111]=oe,e[112]=ne):ne=e[112];let pe;return e[113]!==W||e[114]!==X||e[115]!==ne?(pe=t.jsxs(t.Fragment,{children:[W,X,ne]}),e[113]=W,e[114]=X,e[115]=ne,e[116]=pe):pe=e[116],pe}function os(s){const e=L.c(2),{repository:o}=s;let l;return e[0]!==o?(l=t.jsx("div",{className:"flex-1 overflow-y-auto bg-background",children:t.jsx(bt,{repository:o})}),e[0]=o,e[1]=l):l=e[1],l}function ns(s){const e=L.c(4),{tools:o,connectionId:l,org:n}=s;let r;return e[0]!==l||e[1]!==n||e[2]!==o?(r=t.jsx(Ct,{tools:o,connectionId:l,org:n}),e[0]=l,e[1]=n,e[2]=o,e[3]=r):r=e[3],r}function is(s){const e=L.c(50),{connection:o,connectionId:l,org:n,requestedTabId:r,collections:d,onUpdate:f,isUpdating:C}=s,i=dt();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={from:"/$org/mcps/$connectionId"},e[0]=c):c=e[0];const j=Ee(c);let m;e[1]!==l?(m={connectionId:l},e[1]=l,e[2]=m):m=e[2];const u=gt(m),p=u.isAuthenticated,g=o?.metadata?.repository,a=!!g?.url,T=o?.tools?.length??0;let v;e[3]===Symbol.for("react.memo_cache_sentinel")?(v={id:"settings",label:"Settings"},e[3]=v):v=e[3];let b;e[4]!==p||e[5]!==T?(b=p&&T>0?[{id:"tools",label:"Tools",count:T}]:[],e[4]=p,e[5]=T,e[6]=b):b=e[6];let P;if(e[7]!==d||e[8]!==a||e[9]!==p||e[10]!==b){let x;e[12]!==a?(x=a?[{id:"readme",label:"README"}]:[],e[12]=a,e[13]=x):x=e[13],P=[v,...b,...p?(d||[]).map(ls):[],...x],e[7]=d,e[8]=a,e[9]=p,e[10]=b,e[11]=P}else P=e[11];const w=P,h=w.some(x=>x.id===r)?r:"settings";let A;e[14]!==j?(A=x=>{j({search:M=>({...M,tab:x}),replace:!0})},e[14]=j,e[15]=A):A=e[15];const D=A;let y;e[16]!==d?(y=d||[],e[16]=d,e[17]=y):y=e[17];let k;if(e[18]!==h||e[19]!==y){let x;e[21]!==h?(x=M=>M.name===h,e[21]=h,e[22]=x):x=e[22],k=y.find(x),e[18]=h,e[19]=y,e[20]=k}else k=e[20];const _=k;let E;e[23]!==i.history?(E=()=>i.history.back(),e[23]=i.history,e[24]=E):E=e[24];let N;e[25]!==h||e[26]!==D||e[27]!==w?(N=t.jsx(wt,{children:t.jsx(vt,{tabs:w,activeTab:h,onTabChange:D})}),e[25]=h,e[26]=D,e[27]=w,e[28]=N):N=e[28];let z;e[29]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(qe,{size:32,className:"animate-spin text-muted-foreground"})}),e[29]=z):z=e[29];let I;e[30]!==_||e[31]!==h||e[32]!==u.supportsOAuth||e[33]!==o||e[34]!==l||e[35]!==D||e[36]!==a||e[37]!==p||e[38]!==C||e[39]!==f||e[40]!==n||e[41]!==g?(I=t.jsx(ie.Suspense,{fallback:z,children:h==="tools"?t.jsx(ns,{tools:o.tools??void 0,connectionId:l,org:n}):h==="settings"?t.jsx(jt,{connection:o,onUpdate:f,isUpdating:C,isMCPAuthenticated:p,supportsOAuth:u.supportsOAuth,onViewReadme:a?()=>D("readme"):void 0}):h==="readme"&&a?t.jsx(os,{repository:g}):_&&p?t.jsx(ss,{connectionId:l,org:n,activeCollection:_},h):t.jsx(Oe,{title:"Collection not found",description:"This collection may have been deleted or you may not have access."})}),e[30]=_,e[31]=h,e[32]=u.supportsOAuth,e[33]=o,e[34]=l,e[35]=D,e[36]=a,e[37]=p,e[38]=C,e[39]=f,e[40]=n,e[41]=g,e[42]=I):I=e[42];let S;e[43]!==h||e[44]!==I?(S=t.jsx("div",{className:"flex h-full w-full bg-background overflow-hidden",children:t.jsx("div",{className:"flex-1 flex flex-col min-w-0 bg-background overflow-auto",children:t.jsx(Ue,{children:I},h)})}),e[43]=h,e[44]=I,e[45]=S):S=e[45];let O;return e[46]!==N||e[47]!==S||e[48]!==E?(O=t.jsxs(Nt,{onBack:E,children:[N,S]}),e[46]=N,e[47]=S,e[48]=E,e[49]=O):O=e[49],O}function ls(s){return{id:s.name,label:s.displayName}}function rs(){const s=L.c(17);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/$org/mcps/$connectionId"},s[0]=e):e=s[0];const o=Ee(e);let l;s[1]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org/mcps/$connectionId"},s[1]=l):l=s[1];const{connectionId:n,org:r}=at(l);let d;s[2]===Symbol.for("react.memo_cache_sentinel")?(d={from:"/shell/$org/mcps/$connectionId"},s[2]=d):d=s[2];const C=ct(d).tab||"settings",i=We(n),c=pt(),j=ht(i??void 0);let m;s[3]!==c.update||s[4]!==n?(m=async g=>{await c.update.mutateAsync({id:n,data:g})},s[3]=c.update,s[4]=n,s[5]=m):m=s[5];const u=m;if(!i){let g;return s[6]!==o||s[7]!==r?(g=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Oe,{title:"Connection not found",description:"This connection may have been deleted or you may not have access.",actions:t.jsx(xe,{variant:"outline",onClick:()=>o({to:"/$org/mcps",params:{org:r}}),children:"Back to connections"})})}),s[6]=o,s[7]=r,s[8]=g):g=s[8],g}let p;return s[9]!==c.update.isPending||s[10]!==j||s[11]!==i||s[12]!==n||s[13]!==u||s[14]!==r||s[15]!==C?(p=t.jsx(is,{org:r,connection:i,connectionId:n,requestedTabId:C,collections:j,onUpdate:u,isUpdating:c.update.isPending}),s[9]=c.update.isPending,s[10]=j,s[11]=i,s[12]=n,s[13]=u,s[14]=r,s[15]=C,s[16]=p):p=s[16],p}function as(){const s=L.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ue,{children:t.jsx(ie.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(qe,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(rs,{})})}),s[0]=e):e=s[0],e}function no(){const s=L.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(as,{}),s[0]=e):e=s[0],e}export{no as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const P=Symbol.for("constructDateFrom");function p(t,n){return typeof t=="function"?t(n):t&&typeof t=="object"&&P in t?t[P](n):t instanceof Date?new t.constructor(n):new Date(n)}function h(t,n){return p(t,t)}let S={};function k(){return S}function W(t){const n=h(t),e=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return e.setUTCFullYear(n.getFullYear()),+t-+e}function v(t,...n){const e=p.bind(null,t||n.find(o=>typeof o=="object"));return n.map(e)}function M(t,n){const e=+h(t)-+h(n);return e<0?-1:e>0?1:e}function F(t){return p(t,Date.now())}function x(t,n,e){const[o,a]=v(e?.in,t,n),s=o.getFullYear()-a.getFullYear(),i=o.getMonth()-a.getMonth();return s*12+i}function T(t){return n=>{const o=(t?Math[t]:Math.trunc)(n);return o===0?0:o}}function C(t,n){return+h(t)-+h(n)}function X(t,n){const e=h(t);return e.setHours(23,59,59,999),e}function A(t,n){const e=h(t),o=e.getMonth();return e.setFullYear(e.getFullYear(),o+1,0),e.setHours(23,59,59,999),e}function I(t,n){const e=h(t);return+X(e)==+A(e)}function O(t,n,e){const[o,a,s]=v(e?.in,t,t,n),i=M(a,s),r=Math.abs(x(a,s));if(r<1)return 0;a.getMonth()===1&&a.getDate()>27&&a.setDate(30),a.setMonth(a.getMonth()-i*r);let d=M(a,s)===-i;I(o)&&r===1&&M(o,s)===1&&(d=!1);const c=i*(r-+d);return c===0?0:c}function j(t,n,e){const o=C(t,n)/1e3;return T(e?.roundingMethod)(o)}const Y={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},_=(t,n,e)=>{let o;const a=Y[t];return typeof a=="string"?o=a:n===1?o=a.one:o=a.other.replace("{{count}}",n.toString()),e?.addSuffix?e.comparison&&e.comparison>0?"in "+o:o+" ago":o};function D(t){return(n={})=>{const e=n.width?String(n.width):t.defaultWidth;return t.formats[e]||t.formats[t.defaultWidth]}}const N={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},z={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},V={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},q={date:D({formats:N,defaultWidth:"full"}),time:D({formats:z,defaultWidth:"full"}),dateTime:D({formats:V,defaultWidth:"full"})},J={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},L=(t,n,e,o)=>J[t];function g(t){return(n,e)=>{const o=e?.context?String(e.context):"standalone";let a;if(o==="formatting"&&t.formattingValues){const i=t.defaultFormattingWidth||t.defaultWidth,r=e?.width?String(e.width):i;a=t.formattingValues[r]||t.formattingValues[i]}else{const i=t.defaultWidth,r=e?.width?String(e.width):t.defaultWidth;a=t.values[r]||t.values[i]}const s=t.argumentCallback?t.argumentCallback(n):n;return a[s]}}const R={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},E={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},H={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Q={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},U={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},B={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},K=(t,n)=>{const e=Number(t),o=e%100;if(o>20||o<10)switch(o%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},$={ordinalNumber:K,era:g({values:R,defaultWidth:"wide"}),quarter:g({values:E,defaultWidth:"wide",argumentCallback:t=>t-1}),month:g({values:H,defaultWidth:"wide"}),day:g({values:Q,defaultWidth:"wide"}),dayPeriod:g({values:U,defaultWidth:"wide",formattingValues:B,defaultFormattingWidth:"wide"})};function b(t){return(n,e={})=>{const o=e.width,a=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=n.match(a);if(!s)return null;const i=s[0],r=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],d=Array.isArray(r)?Z(r,y=>y.test(i)):G(r,y=>y.test(i));let c;c=t.valueCallback?t.valueCallback(d):d,c=e.valueCallback?e.valueCallback(c):c;const l=n.slice(i.length);return{value:c,rest:l}}}function G(t,n){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&n(t[e]))return e}function Z(t,n){for(let e=0;e<t.length;e++)if(n(t[e]))return e}function tt(t){return(n,e={})=>{const o=n.match(t.matchPattern);if(!o)return null;const a=o[0],s=n.match(t.parsePattern);if(!s)return null;let i=t.valueCallback?t.valueCallback(s[0]):s[0];i=e.valueCallback?e.valueCallback(i):i;const r=n.slice(a.length);return{value:i,rest:r}}}const et=/^(\d+)(th|st|nd|rd)?/i,nt=/\d+/i,at={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ot={any:[/^b/i,/^(a|c)/i]},rt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},it={any:[/1/i,/2/i,/3/i,/4/i]},st={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},ut={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},ct={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},dt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},lt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},mt={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},ht={ordinalNumber:tt({matchPattern:et,parsePattern:nt,valueCallback:t=>parseInt(t,10)}),era:b({matchPatterns:at,defaultMatchWidth:"wide",parsePatterns:ot,defaultParseWidth:"any"}),quarter:b({matchPatterns:rt,defaultMatchWidth:"wide",parsePatterns:it,defaultParseWidth:"any",valueCallback:t=>t+1}),month:b({matchPatterns:st,defaultMatchWidth:"wide",parsePatterns:ut,defaultParseWidth:"any"}),day:b({matchPatterns:ct,defaultMatchWidth:"wide",parsePatterns:dt,defaultParseWidth:"any"}),dayPeriod:b({matchPatterns:lt,defaultMatchWidth:"any",parsePatterns:mt,defaultParseWidth:"any"})},ft={code:"en-US",formatDistance:_,formatLong:q,formatRelative:L,localize:$,match:ht,options:{weekStartsOn:0,firstWeekContainsDate:1}};function yt(t,n,e){const o=k(),a=e?.locale??o.locale??ft,s=2520,i=M(t,n);if(isNaN(i))throw new RangeError("Invalid time value");const r=Object.assign({},e,{addSuffix:e?.addSuffix,comparison:i}),[d,c]=v(e?.in,...i>0?[n,t]:[t,n]),l=j(c,d),y=(W(c)-W(d))/1e3,u=Math.round((l-y)/60);let f;if(u<2)return e?.includeSeconds?l<5?a.formatDistance("lessThanXSeconds",5,r):l<10?a.formatDistance("lessThanXSeconds",10,r):l<20?a.formatDistance("lessThanXSeconds",20,r):l<40?a.formatDistance("halfAMinute",0,r):l<60?a.formatDistance("lessThanXMinutes",1,r):a.formatDistance("xMinutes",1,r):u===0?a.formatDistance("lessThanXMinutes",1,r):a.formatDistance("xMinutes",u,r);if(u<45)return a.formatDistance("xMinutes",u,r);if(u<90)return a.formatDistance("aboutXHours",1,r);if(u<1440){const m=Math.round(u/60);return a.formatDistance("aboutXHours",m,r)}else{if(u<s)return a.formatDistance("xDays",1,r);if(u<43200){const m=Math.round(u/1440);return a.formatDistance("xDays",m,r)}else if(u<43200*2)return f=Math.round(u/43200),a.formatDistance("aboutXMonths",f,r)}if(f=O(c,d),f<12){const m=Math.round(u/43200);return a.formatDistance("xMonths",m,r)}else{const m=f%12,w=Math.trunc(f/12);return m<3?a.formatDistance("aboutXYears",w,r):m<9?a.formatDistance("overXYears",w,r):a.formatDistance("almostXYears",w+1,r)}}function gt(t,n){return yt(t,F(t),n)}export{gt as f};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as O,j as t,r as U,f as be,d as _e,v as ve,by as oe,w as ae,av as we,x as Ce,y as Ne,t as ie}from"./index-BXYAUeFB.js";import{E as Se}from"./SearchMd-D-BfTFbd.js";import{E as ce}from"./error-boundary-Bstevc3G.js";import{u as Te,I as ke}from"./use-connection-DcTy916p.js";import{S as Ie,T as $e}from"./switch-D3JJPNlW.js";import{b as Ee,a as Fe}from"./use-gateway-I6Ko0Jgt.js";import{B as L}from"./button-WiHHb1ae.js";import{a as M,c as q,b as W,T as H,i as re}from"./tooltip-Dgdin-_i.js";import{a as Ge}from"./Copy01-Bilz-YTB.js";import{i as ze}from"./CpuChip02-CHm038ee.js";import{i as de}from"./InfoCircle-D7V0pgdh.js";import{i as le}from"./Loading01-BWm5a2UX.js";import{I as me}from"./input-BElOouK2.js";import{F as J,a as Ae,b as Q,d as X,f as Y,c as fe}from"./form-BrDOMpvk.js";import{S as ue,a as xe,b as he,c as pe,d as K}from"./select-DuRyb06m.js";import{s as Ve}from"./slugify-CEUa2lfQ.js";import{V as De,b as Pe}from"./layout-BDLGK1gR.js";import{f as Be}from"./formatDistanceToNow-Ctx6mZEP.js";import"./utils-D2m6QoGq.js";import"./checkbox-D_yjB9VU.js";import"./ArrowLeft-B2kSl8Am.js";import"./collection-search-ByjFbpzN.js";import"./ChevronDown-LB39JZIr.js";function Ue(o){const s=new TextEncoder().encode(o),l=Array.from(s,a=>String.fromCharCode(a)).join("");return btoa(l)}function Oe(o){const e=O.c(52),{serverName:s,gatewayUrl:l}=o,[a,c]=U.useState(!1),[i,f]=U.useState(null),n=Ve(s);let r,d,g,j;if(e[0]!==l||e[1]!==n){const ee={type:"http",url:l},te={[n]:ee};r=JSON.stringify(te,null,2);const ne=ye=>JSON.stringify({...ee,headers:{"x-mesh-client":ye}},null,2),ge=Ue(ne("Cursor"));d=`cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(n)}&config=${encodeURIComponent(ge)}`;const je=ne("Claude Code");g=n;let se;e[6]===Symbol.for("react.memo_cache_sentinel")?(se=/'/g,e[6]=se):se=e[6],j=je.replace(se,"'\\''"),e[0]=l,e[1]=n,e[2]=r,e[3]=d,e[4]=g,e[5]=j}else r=e[2],d=e[3],g=e[4],j=e[5];const y=`claude mcp add "${g}" --config '${j}'`;let p;e[7]!==r?(p=async()=>{await navigator.clipboard.writeText(r),c(!0),ie.success("Configuration copied to clipboard"),setTimeout(()=>c(!1),2e3)},e[7]=r,e[8]=p):p=e[8];const x=p;let u;e[9]===Symbol.for("react.memo_cache_sentinel")?(u=async(ee,te)=>{await navigator.clipboard.writeText(ee),f(te),ie.success(`${te} command copied`),setTimeout(()=>f(null),2e3)},e[9]=u):u=e[9];const F=u,R=Re;let z;e[10]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx("div",{children:t.jsx("h4",{className:"text-sm font-medium text-foreground mb-1",children:"Install in your IDE"})}),e[10]=z):z=e[10];let h;e[11]!==a?(h=a?t.jsx(re,{size:14}):t.jsx(Ge,{size:14}),e[11]=a,e[12]=h):h=e[12];let B;e[13]!==x||e[14]!==h?(B=t.jsx(W,{asChild:!0,children:t.jsx(L,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 shrink-0",onClick:x,children:h})}),e[13]=x,e[14]=h,e[15]=B):B=e[15];let V;e[16]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx(H,{children:"Copy configuration"}),e[16]=V):V=e[16];let S;e[17]!==B?(S=t.jsx("div",{className:"absolute top-2 right-2",children:t.jsx(M,{children:t.jsxs(q,{children:[B,V]})})}),e[17]=B,e[18]=S):S=e[18];let G;e[19]!==r||e[20]!==x?(G=t.jsx("pre",{className:"text-xs font-mono text-foreground overflow-auto max-h-40 whitespace-pre-wrap wrap-break-word cursor-pointer",onClick:x,children:r}),e[19]=r,e[20]=x,e[21]=G):G=e[21];let b;e[22]!==G||e[23]!==S?(b=t.jsxs("div",{className:"relative flex flex-col gap-2 p-3 bg-muted/50 rounded-lg",children:[S,G]}),e[22]=G,e[23]=S,e[24]=b):b=e[24];let _;e[25]!==d?(_=()=>R(d),e[25]=d,e[26]=_):_=e[26];let T,k;e[27]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx("img",{src:"/logos/cursor.svg",alt:"Cursor",className:"h-6 w-6",style:{filter:"brightness(0) saturate(100%) invert(11%) sepia(8%) saturate(785%) hue-rotate(1deg) brightness(95%) contrast(89%)"}}),k=t.jsx("span",{className:"text-sm font-medium",children:"Cursor"}),e[27]=T,e[28]=k):(T=e[27],k=e[28]);let v;e[29]!==_?(v=t.jsx(W,{asChild:!0,children:t.jsxs(L,{variant:"outline",className:"h-auto py-3 px-4 justify-center gap-2 flex-1 min-w-fit",onClick:_,children:[T,k]})}),e[29]=_,e[30]=v):v=e[30];let D;e[31]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx(H,{children:"Add to Cursor"}),e[31]=D):D=e[31];let w;e[32]!==v?(w=t.jsx(M,{children:t.jsxs(q,{children:[v,D]})}),e[32]=v,e[33]=w):w=e[33];let I;e[34]!==y?(I=()=>F(y,"Claude"),e[34]=y,e[35]=I):I=e[35];let $,E;e[36]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx("img",{src:"/logos/Claude Code.svg",alt:"Claude Code",className:"h-6 w-6",style:{filter:"brightness(0) saturate(100%) invert(55%) sepia(31%) saturate(1264%) hue-rotate(331deg) brightness(92%) contrast(86%)"}}),E=t.jsx("span",{className:"text-sm font-medium",children:"Claude Code"}),e[36]=$,e[37]=E):($=e[36],E=e[37]);let C;e[38]!==i?(C=i==="Claude"&&t.jsx(re,{size:14,className:"ml-2 text-green-500"}),e[38]=i,e[39]=C):C=e[39];let N;e[40]!==I||e[41]!==C?(N=t.jsx(W,{asChild:!0,children:t.jsxs(L,{variant:"outline",className:"h-auto py-3 px-4 justify-center gap-2 flex-1 min-w-fit",onClick:I,children:[$,E,C]})}),e[40]=I,e[41]=C,e[42]=N):N=e[42];let A;e[43]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(H,{children:"Add to Claude Code"}),e[43]=A):A=e[43];let m;e[44]!==N?(m=t.jsx(M,{children:t.jsxs(q,{children:[N,A]})}),e[44]=N,e[45]=m):m=e[45];let P;e[46]!==w||e[47]!==m?(P=t.jsxs("div",{className:"flex flex-wrap gap-2",children:[w,m]}),e[46]=w,e[47]=m,e[48]=P):P=e[48];let Z;return e[49]!==b||e[50]!==P?(Z=t.jsxs("div",{className:"flex flex-col gap-4",children:[z,b,P]}),e[49]=b,e[50]=P,e[51]=Z):Z=e[51],Z}function Re(o){window.open(o,"_blank")}const Je=ve({title:ae().min(1,"Name is required").max(255),description:ae().nullable(),status:oe(["active","inactive"]),tool_selection_mode:oe(["inclusion","exclusion"]),tool_selection_strategy:oe(["passthrough","smart_tool_selection","code_execution"])});function Le(o,e){const s={};for(const l of o.connections)if(l.selected_tools===null){const a=e.get(l.connection_id)??[];a.length>0&&(s[l.connection_id]=a)}else l.selected_tools.length>0&&(s[l.connection_id]=l.selected_tools);return s}function Me(o,e){return Object.entries(o).map(([s,l])=>{const a=e.get(s)??[],c=a.length>0&&a.every(i=>l.includes(i));return{connection_id:s,selected_tools:c?null:l}})}function qe(o){const e=O.c(29),{form:s,toolSet:l,onToolSetChange:a,icon:c}=o;let i;e[0]!==s?(i=s.watch("title")||"Gateway",e[0]=s,e[1]=i):i=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(ze,{}),e[2]=f):f=e[2];let n;e[3]!==c||e[4]!==i?(n=t.jsx(ke,{icon:c,name:i,size:"lg",className:"shrink-0 shadow-sm",fallbackIcon:f}),e[3]=c,e[4]=i,e[5]=n):n=e[5];let r;e[6]!==s.control?(r=t.jsx(J,{control:s.control,name:"status",render:Xe}),e[6]=s.control,e[7]=r):r=e[7];let d;e[8]!==n||e[9]!==r?(d=t.jsxs("div",{className:"flex items-start justify-between",children:[n,r]}),e[8]=n,e[9]=r,e[10]=d):d=e[10];let g;e[11]!==s.control?(g=t.jsxs("div",{className:"flex flex-col",children:[t.jsx(J,{control:s.control,name:"title",render:Qe}),t.jsx(J,{control:s.control,name:"description",render:Ke})]}),e[11]=s.control,e[12]=g):g=e[12];let j;e[13]!==d||e[14]!==g?(j=t.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[d,g]}),e[13]=d,e[14]=g,e[15]=j):j=e[15];let y;e[16]!==s.control?(y=t.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[t.jsx(J,{control:s.control,name:"tool_selection_mode",render:He}),t.jsx(J,{control:s.control,name:"tool_selection_strategy",render:We})]}),e[16]=s.control,e[17]=y):y=e[17];let p;e[18]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex-1 flex items-center justify-center p-5",children:t.jsx(le,{size:32,className:"animate-spin text-muted-foreground"})}),e[18]=p):p=e[18];let x;e[19]!==a||e[20]!==l?(x=t.jsx("div",{className:"flex-1 min-h-0 overflow-auto",children:t.jsx(ce,{children:t.jsx(U.Suspense,{fallback:p,children:t.jsx($e,{toolSet:l,onToolSetChange:a})})})}),e[19]=a,e[20]=l,e[21]=x):x=e[21];let u;e[22]!==x||e[23]!==j||e[24]!==y?(u=t.jsxs("div",{className:"flex flex-col h-full",children:[j,y,x]}),e[22]=x,e[23]=j,e[24]=y,e[25]=u):u=e[25];let F;return e[26]!==s||e[27]!==u?(F=t.jsx(Ae,{...s,children:u}),e[26]=s,e[27]=u,e[28]=F):F=e[28],F}function We(o){const{field:e}=o;return t.jsxs(Q,{children:[t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx(fe,{className:"mb-0",children:"Gateway Strategy"}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(M,{children:t.jsxs(q,{children:[t.jsx(W,{asChild:!0,children:t.jsx("button",{type:"button",className:"cursor-help flex items-center",children:t.jsx(de,{size:14,className:"text-muted-foreground"})})}),t.jsx(H,{side:"left",className:"max-w-sm",children:t.jsxs("div",{className:"text-xs space-y-1",children:[t.jsxs("div",{children:[t.jsx("strong",{children:"Passthrough:"})," Pass tools through as-is (default)."]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Smart Tool Selection:"})," Intelligent tool selection behavior."]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Code Execution:"})," Code execution behavior."]})]})})]})}),t.jsxs(ue,{value:e.value,onValueChange:e.onChange,children:[t.jsx(X,{children:t.jsx(xe,{className:"w-[180px]",children:t.jsx(he,{})})}),t.jsxs(pe,{children:[t.jsx(K,{value:"passthrough",children:"Passthrough"}),t.jsx(K,{value:"smart_tool_selection",children:"Smart Tool Selection"}),t.jsx(K,{value:"code_execution",children:"Code Execution"})]})]})]})]}),t.jsx(Y,{})]})}function He(o){const{field:e}=o;return t.jsxs(Q,{children:[t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx(fe,{className:"mb-0",children:"Tool Selection Mode"}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(M,{children:t.jsxs(q,{children:[t.jsx(W,{asChild:!0,children:t.jsx("button",{type:"button",className:"cursor-help flex items-center",children:t.jsx(de,{size:14,className:"text-muted-foreground"})})}),t.jsx(H,{side:"left",className:"max-w-sm",children:t.jsxs("div",{className:"text-xs space-y-1",children:[t.jsxs("div",{children:[t.jsx("strong",{children:"Include:"})," Only selected connections/tools are exposed."]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Exclude:"})," All connections/tools except selected ones are exposed."]})]})})]})}),t.jsxs(ue,{value:e.value,onValueChange:e.onChange,children:[t.jsx(X,{children:t.jsx(xe,{className:"w-[180px]",children:t.jsx(he,{})})}),t.jsxs(pe,{children:[t.jsx(K,{value:"inclusion",children:"Include Selected"}),t.jsx(K,{value:"exclusion",children:"Exclude Selected"})]})]})]})]}),t.jsx(Y,{})]})}function Ke(o){const{field:e}=o;return t.jsxs(Q,{className:"w-full space-y-0",children:[t.jsx(X,{children:t.jsx(me,{...e,value:e.value||"",className:"h-auto text-base text-muted-foreground leading-6 px-0 border-transparent hover:border-input focus:border-input bg-transparent transition-all",placeholder:"Add a description..."})}),t.jsx(Y,{})]})}function Qe(o){const{field:e}=o;return t.jsxs(Q,{className:"w-full space-y-0",children:[t.jsx(X,{children:t.jsx(me,{...e,className:"h-auto text-lg! font-medium leading-7 px-0 border-transparent hover:border-input focus:border-input bg-transparent transition-all",placeholder:"Gateway Name"})}),t.jsx(Y,{})]})}function Xe(o){const{field:e}=o;return t.jsxs(Q,{children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"text-sm text-muted-foreground",children:e.value==="active"?"Active":"Inactive"}),t.jsx(X,{children:t.jsx(Ie,{checked:e.value==="active",onCheckedChange:s=>e.onChange(s?"active":"inactive")})})]}),t.jsx(Y,{})]})}function Ye(o){const e=O.c(53),{gateway:s,gatewayId:l}=o,a=we(),c=Fe();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={},e[0]=i):i=e[0];const f=Te(i);let n;if(e[1]!==f){n=new Map;for(const m of f)m.tools&&m.tools.length>0&&n.set(m.id,m.tools.map(Ze));e[1]=f,e[2]=n}else n=e[2];let r;e[3]!==n||e[4]!==s?(r=()=>Le(s,n),e[3]=n,e[4]=s,e[5]=r):r=e[5];const[d,g]=U.useState(r),[j,y]=U.useState(!1);let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=m=>{g(m),y(!0)},e[6]=p):p=e[6];const x=p;let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=Ce(Je),e[7]=u):u=e[7];const F=s.tool_selection_mode??"inclusion",R=s.tool_selection_strategy??"passthrough";let z;e[8]!==s.description||e[9]!==s.status||e[10]!==s.title||e[11]!==F||e[12]!==R?(z={resolver:u,defaultValues:{title:s.title,description:s.description,status:s.status,tool_selection_mode:F,tool_selection_strategy:R}},e[8]=s.description,e[9]=s.status,e[10]=s.title,e[11]=F,e[12]=R,e[13]=z):z=e[13];const h=Ne(z),V=h.formState.isDirty||j;let S;e[14]!==c.update||e[15]!==n||e[16]!==h||e[17]!==l||e[18]!==d?(S=async()=>{const m=h.getValues(),P=Me(d,n);await c.update.mutateAsync({id:l,data:{title:m.title,description:m.description,status:m.status,tool_selection_mode:m.tool_selection_mode,tool_selection_strategy:m.tool_selection_strategy,connections:P}}),h.reset(m),y(!1)},e[14]=c.update,e[15]=n,e[16]=h,e[17]=l,e[18]=d,e[19]=S):S=e[19];const G=S;let b;e[20]!==a.history?(b=()=>a.history.back(),e[20]=a.history,e[21]=b):b=e[21];let _;e[22]!==c.update.isPending||e[23]!==G||e[24]!==V?(_=V&&t.jsxs(L,{onClick:G,disabled:c.update.isPending,size:"sm",className:"h-7",children:[c.update.isPending&&t.jsx(le,{size:16,className:"mr-2 animate-spin"}),"Save Changes"]}),e[22]=c.update.isPending,e[23]=G,e[24]=V,e[25]=_):_=e[25];let T;e[26]!==_?(T=t.jsx(De,{children:_}),e[26]=_,e[27]=T):T=e[27];let k;e[28]!==h||e[29]!==s.icon||e[30]!==d?(k=t.jsx("div",{className:"lg:border-r border-b lg:border-b-0 border-border overflow-auto",children:t.jsx(qe,{form:h,toolSet:d,onToolSetChange:x,icon:s.icon})}),e[28]=h,e[29]=s.icon,e[30]=d,e[31]=k):k=e[31];let v;e[32]!==s.id||e[33]!==s.title?(v=s.title||`gateway-${s.id.slice(0,8)}`,e[32]=s.id,e[33]=s.title,e[34]=v):v=e[34];const D=`${window.location.origin}/mcp/gateway/${s.id}`;let w;e[35]!==v||e[36]!==D?(w=t.jsx("div",{className:"p-5",children:t.jsx(Oe,{serverName:v,gatewayUrl:D})}),e[35]=v,e[36]=D,e[37]=w):w=e[37];let I;e[38]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx("span",{className:"flex-1 text-sm text-foreground",children:"Last Updated"}),e[38]=I):I=e[38];let $;e[39]!==s.updated_at?($=s.updated_at?Be(new Date(s.updated_at),{addSuffix:!1}):"Unknown",e[39]=s.updated_at,e[40]=$):$=e[40];let E;e[41]!==$?(E=t.jsxs("div",{className:"flex items-center gap-4 p-5 border-t border-border",children:[I,t.jsx("span",{className:"text-muted-foreground uppercase text-xs",children:$})]}),e[41]=$,e[42]=E):E=e[42];let C;e[43]!==w||e[44]!==E?(C=t.jsxs("div",{className:"flex flex-col overflow-auto",children:[w,E]}),e[43]=w,e[44]=E,e[45]=C):C=e[45];let N;e[46]!==k||e[47]!==C?(N=t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[2fr_1fr] h-full",children:[k,C]}),e[46]=k,e[47]=C,e[48]=N):N=e[48];let A;return e[49]!==T||e[50]!==N||e[51]!==b?(A=t.jsxs(Pe,{onBack:b,children:[T,N]}),e[49]=T,e[50]=N,e[51]=b,e[52]=A):A=e[52],A}function Ze(o){return o.name}function et(){const o=O.c(8);let e;o[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/$org/gateways/$gatewayId"},o[0]=e):e=o[0];const s=be(e);let l;o[1]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org/gateways/$gatewayId"},o[1]=l):l=o[1];const{gatewayId:a,org:c}=_e(l),i=Ee(a);if(!i){let n;return o[2]!==s||o[3]!==c?(n=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Se,{title:"Gateway not found",description:"This gateway may have been deleted or you may not have access.",actions:t.jsx(L,{variant:"outline",onClick:()=>s({to:"/$org/gateways",params:{org:c}}),children:"Back to gateways"})})}),o[2]=s,o[3]=c,o[4]=n):n=o[4],n}let f;return o[5]!==i||o[6]!==a?(f=t.jsx(Ye,{gateway:i,gatewayId:a}),o[5]=i,o[6]=a,o[7]=f):f=o[7],f}function tt(){const o=O.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(ce,{children:t.jsx(U.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(le,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(et,{})})}),o[0]=e):e=o[0],e}function Nt(){const o=O.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(tt,{}),o[0]=e):e=o[0],e}export{Nt as default};
|