@decocms/mesh 1.0.0-alpha.4 → 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/README.md +287 -0
- package/dist/client/assets/AlertCircle-D6ztaobt.js +1 -0
- package/dist/client/assets/ArrowLeft-CjVyVt-H.js +1 -0
- package/dist/client/assets/CheckCircle-DgunLZQR.js +1 -0
- package/dist/client/assets/ChevronDown-BbXb_40w.js +1 -0
- package/dist/client/assets/Clock-YTJnTBDI.js +1 -0
- package/dist/client/assets/Copy01-CCevdGb6.js +1 -0
- package/dist/client/assets/CpuChip02-CTGBZdsr.js +1 -0
- package/dist/client/assets/DotsVertical-DWgbGhdO.js +1 -0
- package/dist/client/assets/File06-CRfao4L4.js +1 -0
- package/dist/client/assets/Grid01-S3S2kEug.js +1 -0
- package/dist/client/assets/Inbox01-CdZg2SI6.js +1 -0
- package/dist/client/assets/InfoCircle-CEqhPApg.js +1 -0
- package/dist/client/assets/Key01-7zjlT7bl.js +1 -0
- package/dist/client/assets/LinkExternal01-Zdv63NPa.js +1 -0
- package/dist/client/assets/Loading01-CNHBx4kI.js +1 -0
- package/dist/client/assets/Plus-DfnNWvZl.js +1 -0
- package/dist/client/assets/SearchMd-DBUkNw9d.js +1 -0
- package/dist/client/assets/Trash01-CC4RWtjd.js +1 -0
- package/dist/client/assets/Upload01-ZzW7ToAX.js +1 -0
- package/dist/client/assets/X-CmV6VETi.js +1 -0
- package/dist/client/assets/XClose-C_Ro2jwa.js +1 -0
- package/dist/client/assets/{alert-dialog-BvyEfL2D.js → alert-dialog-DKN25P9n.js} +2 -2
- package/dist/client/assets/app-name-gTETL9So.js +1 -0
- package/dist/client/assets/{auth-catchall-BBilN1Dc.js → auth-catchall-wEPMHcQu.js} +1 -1
- package/dist/client/assets/auth-y34g-zyR.js +1 -0
- package/dist/client/assets/avatar-D6wdL-4h.js +1 -0
- package/dist/client/assets/badge-D5IC8-XQ.js +1 -0
- package/dist/client/assets/button-n-dnBUcs.js +1 -0
- package/dist/client/assets/{card-DFBJ_uBy.js → card--RtELIXA.js} +1 -1
- package/dist/client/assets/checkbox-ByvFrlEw.js +1 -0
- package/dist/client/assets/collection-detail-CBSvkQ-g.js +1 -0
- package/dist/client/assets/collection-display-button-BziK2H4v.js +1 -0
- package/dist/client/assets/collection-header-AOGSaKJV.js +1 -0
- package/dist/client/assets/{collection-page-DwBYqm_T.js → collection-page-Dx7W84ZY.js} +1 -1
- package/dist/client/assets/collection-search-D33egpeg.js +1 -0
- package/dist/client/assets/collection-table-wrapper-BWoWsFFZ.js +1 -0
- package/dist/client/assets/connection-card-BPbF-94Z.js +1 -0
- package/dist/client/assets/connection-detail-CwV1WRCA.js +1 -0
- package/dist/client/assets/connections-D2Osqpr9.js +1 -0
- package/dist/client/assets/core-BhcYClLI.js +6 -0
- package/dist/client/assets/create-organization-dialog-CJOAZXZ4.js +1 -0
- package/dist/client/assets/deco-chat-skeleton-DgwTbso-.js +124 -0
- package/dist/client/assets/dialog-Dn--K_0P.js +1 -0
- package/dist/client/assets/dropdown-menu-DSDzjgEf.js +1 -0
- package/dist/client/assets/error-boundary-kZqJcvYt.js +1 -0
- package/dist/client/assets/{extract-connection-data-DrneYG29.js → extract-connection-data-PMNMoMwh.js} +1 -1
- package/dist/client/assets/form-BSFKQpec.js +1 -0
- package/dist/client/assets/formatDistanceToNow-Mwdq3o1w.js +1 -0
- package/dist/client/assets/gateway-detail-DOneoUn2.js +1 -0
- package/dist/client/assets/gateways-CjpiwVjc.js +1 -0
- package/dist/client/assets/home-M1jCNsQa.js +1 -0
- package/dist/client/assets/index-Bg7J5oIq.js +1 -0
- package/dist/client/assets/index-CXP-3IgR.js +1 -0
- package/dist/client/assets/index-C_LVkq3-.js +32 -0
- package/dist/client/assets/index-DDrssUsd.js +118 -0
- package/dist/client/assets/index-DPE8fUfl.css +1 -0
- package/dist/client/assets/{input-NL8_dTk4.js → input-8OLj0EZ_.js} +1 -1
- package/dist/client/assets/json-BESjz4hO.js +1 -0
- package/dist/client/assets/json-_ojk50i2.js +1 -0
- package/dist/client/assets/json-syntax-highlighter-DefdwgI_.js +2 -0
- package/dist/client/assets/layout-BlymenNb.js +1 -0
- package/dist/client/assets/lazy-highlighter-DB5NDxPR.js +4 -0
- package/dist/client/assets/localstorage-keys-CKN9Xi55.js +1 -0
- package/dist/client/assets/login-sBeHDiTP.js +1 -0
- package/dist/client/assets/mcp-oauth-2aNbgRyW.js +1 -0
- package/dist/client/assets/members-6chwwhsu.js +3 -0
- package/dist/client/assets/monitoring-Cb6EoA-b.js +1 -0
- package/dist/client/assets/oauth-callback-DAWi3xsa.js +1 -0
- package/dist/client/assets/page-BZMAJRR4.js +21 -0
- package/dist/client/assets/page-BZV40eAE.css +1 -0
- package/dist/client/assets/popover-CgBSUikh.js +1 -0
- 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-CcHURukQ.js +1 -0
- package/dist/client/assets/select-D032IwwR.js +1 -0
- package/dist/client/assets/settings-CdDiUrft.js +1 -0
- package/dist/client/assets/shell-layout-BrTksREn.js +17 -0
- package/dist/client/assets/slugify-CEUa2lfQ.js +1 -0
- package/dist/client/assets/spinner-CnnM_4YL.js +1 -0
- package/dist/client/assets/store-PUlSXJGE.js +1 -0
- package/dist/client/assets/store-app-detail-C7BmJzlu.js +1 -0
- package/dist/client/assets/switch-y8R7z10u.js +1 -0
- package/dist/client/assets/{textarea-DAuZp-vs.js → textarea-BFoLEajE.js} +1 -1
- package/dist/client/assets/tools-list-DoiOjPde.js +1 -0
- package/dist/client/assets/tooltip-CScUy2XK.js +1 -0
- package/dist/client/assets/types-xAaKjcGO.js +44 -0
- package/dist/client/assets/use-binding-Csa06z5J.js +5 -0
- package/dist/client/assets/use-connection-DrLts5Bh.js +2 -0
- package/dist/client/assets/{use-gateway-gKeEvLRE.js → use-gateway-D8DNYcSu.js} +1 -1
- package/dist/client/assets/use-list-state-XxCjYHe0.js +1 -0
- package/dist/client/assets/use-mcp-8IvMYP4j.js +1 -0
- package/dist/client/assets/use-members-BpQaxhYw.js +1 -0
- package/dist/client/assets/{use-mobile-BXGgFxUH.js → use-mobile-D-4KOtW8.js} +1 -1
- package/dist/client/assets/use-organization-settings-DFt-PXFE.js +1 -0
- 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-DyxrC_Rx.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +247 -254
- package/dist/server/migrate.js +206 -204
- package/dist/server/server.js +261 -270
- package/package.json +10 -7
- package/dist/client/assets/app-name-DQPOjnhR.js +0 -1
- package/dist/client/assets/auth-CYg5mzvi.js +0 -1
- package/dist/client/assets/avatar-UcUmG598.js +0 -1
- package/dist/client/assets/badge-DO3BPtZ-.js +0 -1
- package/dist/client/assets/button-BeTb9YZU.js +0 -1
- package/dist/client/assets/checkbox-Ep63AJ5F.js +0 -1
- package/dist/client/assets/chunk-2RRQPJJO-DGhxLrrR.js +0 -1
- package/dist/client/assets/circle-alert-BjmT_0vz.js +0 -1
- package/dist/client/assets/collection-detail-sG8EIVfm.js +0 -1
- package/dist/client/assets/collection-display-button-DE8BFxrp.js +0 -1
- package/dist/client/assets/collection-header-DNBGdgEG.js +0 -1
- package/dist/client/assets/collection-search-C3auuf0Y.js +0 -1
- package/dist/client/assets/collection-table-wrapper-z4CuwV_C.js +0 -1
- package/dist/client/assets/connection-card-BbhdU3sl.js +0 -1
- package/dist/client/assets/connection-detail-DfywFkvi.js +0 -1
- package/dist/client/assets/connections-DgCJgxmU.js +0 -1
- package/dist/client/assets/create-organization-dialog-Bde9CI-n.js +0 -1
- package/dist/client/assets/dialog-BT08DzpN.js +0 -1
- package/dist/client/assets/dropdown-menu-DsWv8lkW.js +0 -1
- package/dist/client/assets/empty-state-DCGHu7Ht.js +0 -1
- package/dist/client/assets/error-boundary-dk0EDCPp.js +0 -1
- package/dist/client/assets/form-BmmDx2Hv.js +0 -1
- package/dist/client/assets/formatDistanceToNow-Ctx6mZEP.js +0 -1
- package/dist/client/assets/gateway-detail-DlujL-fA.js +0 -1
- package/dist/client/assets/gateways-C0s_xtLd.js +0 -1
- package/dist/client/assets/home-BUeYyp--.js +0 -1
- package/dist/client/assets/icon-HmCDqOPd.js +0 -1
- package/dist/client/assets/index-BMEwImqy.js +0 -32
- package/dist/client/assets/index-BrYbjxXv.js +0 -1
- package/dist/client/assets/index-CxSCpakB.js +0 -118
- package/dist/client/assets/index-DmUDvTrM.js +0 -1
- package/dist/client/assets/index-Dt9jPzUp.js +0 -1
- package/dist/client/assets/index-feMggVqN.css +0 -1
- package/dist/client/assets/integration-icon-B5ZzeehM.js +0 -1
- package/dist/client/assets/layout-CKQw59Ep.js +0 -1
- package/dist/client/assets/lazy-highlighter-DOxi3dm5.js +0 -1
- package/dist/client/assets/localstorage-keys-CT9IjLo2.js +0 -1
- package/dist/client/assets/login-CVO6DM5O.js +0 -1
- package/dist/client/assets/members-DloLkRIF.js +0 -1
- package/dist/client/assets/monitoring-BzP-NKj7.js +0 -1
- package/dist/client/assets/monitoring-stats-row-D3nSXKWj.js +0 -42
- package/dist/client/assets/oauth-callback-CNapBDIq.js +0 -10
- package/dist/client/assets/page-CYEiDnba.js +0 -1
- package/dist/client/assets/popover-Dqhqu57Q.js +0 -1
- package/dist/client/assets/prism-BM0Im-Yv.js +0 -9
- package/dist/client/assets/resource-tabs-Cyi6PwbN.js +0 -1
- package/dist/client/assets/schema-DlhuekEX.js +0 -1
- package/dist/client/assets/select-BOj5RERj.js +0 -1
- package/dist/client/assets/settings-C_okskGZ.js +0 -1
- package/dist/client/assets/shell-layout-DWIG-gbq.js +0 -124
- package/dist/client/assets/spinner-wv31KLi9.js +0 -1
- package/dist/client/assets/store-Czna7Dgw.js +0 -1
- package/dist/client/assets/store-app-detail-Kn0xLpzy.js +0 -1
- package/dist/client/assets/tool-set-selector-BYF6NlFy.js +0 -1
- package/dist/client/assets/tooltip-BKoAX5gw.js +0 -1
- package/dist/client/assets/upload-DnaQ_f0x.js +0 -1
- package/dist/client/assets/use-binding-BfGhaGVE.js +0 -5
- package/dist/client/assets/use-connection-v-w_yxra.js +0 -2
- package/dist/client/assets/use-list-state-j-4cxeBJ.js +0 -1
- package/dist/client/assets/use-members-C80sliR8.js +0 -1
- package/dist/client/assets/use-organization-settings-ClRwCrjK.js +0 -1
- package/dist/client/assets/use-tool-call-CqAWykKA.js +0 -1
- package/dist/client/assets/useQuery-CkIva3b0.js +0 -1
- package/dist/client/assets/utils-BGgJIaEU.js +0 -1
- package/dist/client/assets/well-known-mcp-Dq2j3ucM.js +0 -1
- /package/dist/client/assets/{resource-tabs-CSRUKxnt.css → tools-list-CSRUKxnt.css} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as C,c as A,d as K,j as t,av as se,x as he,y as pe,i as ge,b as je,t as ve}from"./index-DDrssUsd.js";import{U as q,f as be,d as le,c as ne,b as ie,I as Ne,n as ye}from"./use-connection-DrLts5Bh.js";import{d as we,C as J,j as ae,G as Se,M as Ce}from"./deco-chat-skeleton-DgwTbso-.js";import{E as ce}from"./SearchMd-DBUkNw9d.js";import{E as X}from"./error-boundary-kZqJcvYt.js";import{u as ke,L as Ie}from"./localstorage-keys-CKN9Xi55.js";import{u as _e,a as $e,c as Ee,b as Te,T as Ae}from"./tooltip-CScUy2XK.js";import{B as G}from"./button-n-dnBUcs.js";import{F as V,a as ze,b as Z,c as Y,d as oe}from"./form-BSFKQpec.js";import{I as re}from"./input-8OLj0EZ_.js";import{T as ee}from"./textarea-BFoLEajE.js";import{c as W}from"./utils-BNxGaTF3.js";import{A as Oe}from"./use-binding-Csa06z5J.js";import{i as H}from"./Loading01-CNHBx4kI.js";import{s as Me}from"./Plus-DfnNWvZl.js";import{i as Le}from"./Upload01-ZzW7ToAX.js";import{V as de,b as te,a as Be}from"./layout-BlymenNb.js";import{i as Re}from"./AlertCircle-D6ztaobt.js";import{s as De}from"./Clock-YTJnTBDI.js";import{a as Fe}from"./Copy01-CCevdGb6.js";import{i as Pe,J as Ue}from"./json-syntax-highlighter-DefdwgI_.js";import{s as Je}from"./XClose-C_Ro2jwa.js";import{u as Ve,O as We,M as Ge,P as qe,E as He}from"./index-C_LVkq3-.js";import{u as Ke}from"./use-mcp-8IvMYP4j.js";import"./Grid01-S3S2kEug.js";import"./CpuChip02-CTGBZdsr.js";import"./select-D032IwwR.js";import"./ChevronDown-BbXb_40w.js";import"./use-mobile-D-4KOtW8.js";import"./use-gateway-D8DNYcSu.js";import"./connection-card-BPbF-94Z.js";import"./card--RtELIXA.js";import"./LinkExternal01-Zdv63NPa.js";import"./spinner-CnnM_4YL.js";import"./File06-CRfao4L4.js";import"./InfoCircle-CEqhPApg.js";import"./useQuery-iHOeESxa.js";import"./auth-y34g-zyR.js";import"./ArrowLeft-CjVyVt-H.js";import"./mcp-oauth-2aNbgRyW.js";import"./use-organization-settings-DFt-PXFE.js";import"./use-tool-call-Ega50w5M.js";import"./Key01-7zjlT7bl.js";import"./formatDistanceToNow-Mwdq3o1w.js";import"./extract-connection-data-PMNMoMwh.js";import"./registry-utils-ulDDT0d8.js";import"./generate-id-Dyweu44Y.js";import"./index-Bg7J5oIq.js";import"./index-CXP-3IgR.js";import"./schema-CcHURukQ.js";const me=({size:s=24,color:e="currentColor",...n})=>C.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},C.createElement("path",{d:"M20.5 8v8.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.22 21 17.38 21 15.7 21H8.3c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3.5 18.72 3.5 17.88 3.5 16.2V8m.1-5h16.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C22 3.76 22 4.04 22 4.6v1.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C21.24 8 20.96 8 20.4 8H3.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C2 7.24 2 6.96 2 6.4V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C2.76 3 3.04 3 3.6 3Zm6 8.5h4.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C16 12.26 16 12.54 16 13.1v.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437c-.214.109-.494.109-1.054.109H9.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C8 14.74 8 14.46 8 13.9v-.8c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C8.76 11.5 9.04 11.5 9.6 11.5Z"}));me.displayName="Box";const ue=({size:s=24,color:e="currentColor",...n})=>C.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},C.createElement("path",{d:"m16 18 6-6-6-6M8 6l-6 6 6 6"}));ue.displayName="Code01";const fe=({size:s=24,color:e="currentColor",...n})=>C.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},C.createElement("path",{d:"M21 5c0 1.657-4.03 3-9 3S3 6.657 3 5m18 0c0-1.657-4.03-3-9-3S3 3.343 3 5m18 0v14c0 1.66-4 3-9 3s-9-1.34-9-3V5m18 7c0 1.66-4 3-9 3s-9-1.34-9-3"}));fe.displayName="Database01";const xe=({size:s=24,color:e="currentColor",...n})=>C.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},C.createElement("path",{d:"M11 4H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 6.28 2 7.12 2 8.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 22 5.12 22 6.8 22h8.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C20 19.72 20 18.88 20 17.2V13M8 16h1.675c.489 0 .733 0 .963-.055.204-.05.4-.13.579-.24.201-.123.374-.296.72-.642L21.5 5.5a2.121 2.121 0 0 0-3-3l-9.563 9.563c-.346.346-.519.519-.642.72a2 2 0 0 0-.24.579c-.055.23-.055.474-.055.963V16Z"}));xe.displayName="Edit05";const Q=({size:s=24,color:e="currentColor",...n})=>C.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},C.createElement("path",{d:"M16 3.468a4.5 4.5 0 0 1 0 8.064m2 5.234c1.512.684 2.872 1.799 4 3.234M2 20c1.946-2.477 4.59-4 7.5-4s5.553 1.523 7.5 4M14 7.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Z"}));Q.displayName="Users02";function Ze(s){const e=A.c(20),{form:n}=s;let r;e[0]!==n?(r=v=>{const{field:p}=v;return t.jsx(nt,{size:"md",value:p.value,onChange:p.onChange,alt:n.watch("title")})},e[0]=n,e[1]=r):r=e[1];let o;e[2]!==n.control||e[3]!==r?(o=t.jsx(V,{control:n.control,name:"avatar",render:r}),e[2]=n.control,e[3]=r,e[4]=o):o=e[4];let l;e[5]!==n.control?(l=t.jsxs("div",{className:"flex flex-col gap-3 flex-1 min-w-0",children:[t.jsx(V,{control:n.control,name:"title",render:tt}),t.jsx(V,{control:n.control,name:"description",render:et})]}),e[5]=n.control,e[6]=l):l=e[6];let a;e[7]!==o||e[8]!==l?(a=t.jsxs("div",{className:"flex gap-4 items-start",children:[o,l]}),e[7]=o,e[8]=l,e[9]=a):a=e[9];let i,d;e[10]!==n.control?(i=t.jsxs("div",{className:"flex gap-4",children:[t.jsx(V,{control:n.control,name:"gateway_id",render:Xe}),t.jsx(V,{control:n.control,name:"model",render:Qe})]}),d=t.jsx(V,{control:n.control,name:"system_prompt",render:Ye}),e[10]=n.control,e[11]=i,e[12]=d):(i=e[11],d=e[12]);let m;e[13]!==a||e[14]!==i||e[15]!==d?(m=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-2xl mx-auto w-full min-w-0 gap-6 overflow-y-auto",children:[a,i,d]}),e[13]=a,e[14]=i,e[15]=d,e[16]=m):m=e[16];let h;return e[17]!==n||e[18]!==m?(h=t.jsx(ze,{...n,children:m}),e[17]=n,e[18]=m,e[19]=h):h=e[19],h}function Ye(s){const{field:e}=s;return t.jsxs(Z,{className:"flex-1 flex flex-col min-h-0",children:[t.jsx(Y,{className:"text-xs text-muted-foreground",children:"System prompt"}),t.jsx(oe,{children:t.jsx(ee,{...e,placeholder:"You are a helpful assistant...",className:"flex-1 min-h-[200px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})]})}function Qe(s){const{field:e}=s;return t.jsxs(Z,{className:"flex-1",children:[t.jsx(Y,{className:"text-xs text-muted-foreground",children:"Model"}),t.jsx(Ce,{selectedModel:e.value?{id:e.value.id,connectionId:e.value.connectionId}:void 0,onModelChange:n=>e.onChange({id:n.id,connectionId:n.connectionId}),placeholder:"Select model",variant:"bordered",className:"w-full"})]})}function Xe(s){const{field:e}=s;return t.jsxs(Z,{className:"flex-1",children:[t.jsx(Y,{className:"text-xs text-muted-foreground",children:"Gateway"}),t.jsx(Se,{selectedGatewayId:e.value,onGatewayChange:e.onChange,placeholder:"Select gateway",variant:"bordered",className:"w-full"})]})}function et(s){const{field:e}=s;return t.jsxs(Z,{children:[t.jsx(Y,{className:"text-xs text-muted-foreground",children:"Description"}),t.jsx(oe,{children:t.jsx(re,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function tt(s){const{field:e}=s;return t.jsxs(Z,{children:[t.jsx(Y,{className:"text-xs text-muted-foreground",children:"Name"}),t.jsx(oe,{children:t.jsx(re,{...e,placeholder:"Untitled assistant",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function st(s){const e=A.c(53),{activeThreadId:n,mode:r,assistant:o,form:l}=s;let a;e[0]!==n||e[1]!==o.system_prompt?(a={threadId:n,systemPrompt:o.system_prompt},e[0]=n,e[1]=o.system_prompt,e[2]=a):a=e[2];const i=we(a),d=!!o.gateway_id&&!!o.model?.id&&!!o.model?.connectionId;let m;e[3]!==n||e[4]!==o.gateway_id||e[5]!==o.model||e[6]!==i||e[7]!==d?(m=async O=>{if(!d)return;const B={created_at:new Date().toISOString(),thread_id:n,model:{id:o.model.id,connectionId:o.model.connectionId},gateway:{id:o.gateway_id??""},user:{name:"you"}};await i.sendMessage(O,B)},e[3]=n,e[4]=o.gateway_id,e[5]=o.model,e[6]=i,e[7]=d,e[8]=m):m=e[8];const h=m;let v;e[9]!==o.avatar||e[10]!==o.title?(v=o.avatar?t.jsx("div",{className:"size-[60px] rounded-[18px] border border-border shrink-0 overflow-hidden",children:t.jsx("img",{src:o.avatar,alt:o.title,className:"h-full w-full object-cover"})}):t.jsx("div",{className:"size-[60px] rounded-[18px] border border-border shrink-0 overflow-hidden bg-muted/20 flex items-center justify-center",children:t.jsx(Q,{size:28,className:"text-muted-foreground"})}),e[9]=o.avatar,e[10]=o.title,e[11]=v):v=e[11];let p;e[12]!==o.title?(p=t.jsx("h3",{className:"text-xl font-medium text-foreground",children:o.title}),e[12]=o.title,e[13]=p):p=e[13];let y;e[14]!==o.description?(y=o.description?t.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:o.description}):null,e[14]=o.description,e[15]=y):y=e[15];let _;e[16]!==v||e[17]!==p||e[18]!==y?(_=t.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 p-8 text-center",children:[v,p,y]}),e[16]=v,e[17]=p,e[18]=y,e[19]=_):_=e[19];const u=_,k=r==="edit",g=k?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none";let b;e[20]!==g?(b=W("absolute inset-0 px-2 transition-opacity duration-200 ease-out",g),e[20]=g,e[21]=b):b=e[21];let w;e[22]!==l?(w=t.jsx(Ze,{form:l}),e[22]=l,e[23]=w):w=e[23];let f;e[24]!==b||e[25]!==w?(f=t.jsx("div",{className:b,children:w}),e[24]=b,e[25]=w,e[26]=f):f=e[26];const N=k?"opacity-0 pointer-events-none":"opacity-100";let E;e[27]!==N?(E=W("h-full transition-opacity duration-200 ease-out",N),e[27]=N,e[28]=E):E=e[28];let S;e[29]!==i.messages||e[30]!==i.status||e[31]!==u?(S=i.messages.length===0?t.jsx(J.EmptyState,{children:u}):t.jsx(J.Messages,{messages:i.messages,status:i.status,minHeightOffset:240}),e[29]=i.messages,e[30]=i.status,e[31]=u,e[32]=S):S=e[32];let I;e[33]!==E||e[34]!==S?(I=t.jsx("div",{className:E,children:S}),e[33]=E,e[34]=S,e[35]=I):I=e[35];let $;e[36]!==f||e[37]!==I?($=t.jsxs(J.Main,{className:"h-full relative overflow-hidden",innerClassName:"px-2",children:[f,I]}),e[36]=f,e[37]=I,e[38]=$):$=e[38];const L=k?"translate-y-full":"translate-y-0";let T;e[39]!==L?(T=W("transition-transform duration-300 ease-out",L),e[39]=L,e[40]=T):T=e[40];const z=!d,M=i.status==="submitted"||i.status==="streaming";let c;e[41]!==i.messages||e[42]!==i.stop||e[43]!==h||e[44]!==z||e[45]!==M?(c=t.jsx(J.Footer,{children:t.jsx("div",{className:"max-w-2xl mx-auto w-full min-w-0",children:t.jsx(J.Input,{onSubmit:h,onStop:i.stop,disabled:z,isStreaming:M,placeholder:"Ask anything or @ for context",usageMessages:i.messages})})}),e[41]=i.messages,e[42]=i.stop,e[43]=h,e[44]=z,e[45]=M,e[46]=c):c=e[46];let j;e[47]!==T||e[48]!==c?(j=t.jsx("div",{className:T,children:c}),e[47]=T,e[48]=c,e[49]=j):j=e[49];let x;return e[50]!==$||e[51]!==j?(x=t.jsxs(J,{children:[$,j]}),e[50]=$,e[51]=j,e[52]=x):x=e[52],x}function nt(s){const e=A.c(18),{value:n,onChange:r,alt:o,size:l}=s,a=l===void 0?"md":l,i=C.useRef(null),d=a==="xs"?"h-6 w-6":a==="sm"?"h-8 w-8":"h-16 w-16",m=a==="xs"?"h-3 w-3":a==="sm"?"h-4 w-4":"h-6 w-6",h=a==="xs"?"h-3 w-3":a==="sm"?"h-3.5 w-3.5":"h-5 w-5";let v;e[0]!==r?(v=E=>{const S=E.target.files?.[0];if(!S)return;const I=new FileReader;I.onloadend=()=>{const $=I.result;r($)},I.readAsDataURL(S)},e[0]=r,e[1]=v):v=e[1];const p=v;let y;e[2]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{i.current?.click()},e[2]=y):y=e[2];const _=y,u=`relative ${d} shrink-0 cursor-pointer group`;let k;e[3]!==p?(k=t.jsx("input",{type:"file",ref:i,className:"hidden",accept:"image/*",onChange:p}),e[3]=p,e[4]=k):k=e[4];let g;e[5]!==o||e[6]!==m||e[7]!==n?(g=n?t.jsx("img",{src:n,alt:o||"Avatar",className:"w-full h-full object-cover"}):t.jsx("div",{className:"w-full h-full flex items-center justify-center text-muted-foreground",children:t.jsx(Q,{className:m})}),e[5]=o,e[6]=m,e[7]=n,e[8]=g):g=e[8];const b=`${h} text-white`;let w;e[9]!==b?(w=t.jsx("div",{className:"absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center rounded-xl",children:t.jsx(Le,{className:b})}),e[9]=b,e[10]=w):w=e[10];let f;e[11]!==g||e[12]!==w?(f=t.jsxs("div",{className:"h-full w-full rounded-xl border border-border bg-muted/20 overflow-hidden relative",children:[g,w]}),e[11]=g,e[12]=w,e[13]=f):f=e[13];let N;return e[14]!==u||e[15]!==k||e[16]!==f?(N=t.jsxs("div",{className:u,onClick:_,children:[k,f]}),e[14]=u,e[15]=k,e[16]=f,e[17]=N):N=e[17],N}function ot(s){const e=A.c(49),{providerId:n,assistantId:r,onBack:o}=s,l=se();let a;e[0]!==o||e[1]!==l?(a=o??(()=>l.history.back()),e[0]=o,e[1]=l,e[2]=a):a=e[2];const i=a,{locator:d}=_e();let m;e[3]!==r||e[4]!==d?(m=Ie.assistantChatActiveThread(d,r),e[3]=r,e[4]=d,e[5]=m):m=e[5];const[h,v]=ke(m,rt),p=n||q;let y;e[6]!==p?(y=ne(p),e[6]=p,e[7]=y):y=e[7];const _=y,u=be(n,"ASSISTANT",r,_),k=le(n,"ASSISTANT",_),g=k.update.isPending,[b,w]=C.useState(u?.model.id&&u?.gateway_id?"chat":"edit");let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=he(Oe),e[8]=f):f=e[8];const N=u??void 0;let E;e[9]!==N?(E={resolver:f,values:N},e[9]=N,e[10]=E):E=e[10];const S=pe(E);let I;e[11]!==k.update||e[12]!==r||e[13]!==S?(I=S.handleSubmit(async R=>{const D=await k.update.mutateAsync({id:r,data:R});S.reset(D),w("chat")}),e[11]=k.update,e[12]=r,e[13]=S,e[14]=I):I=e[14];const $=I;if(!u){let R;e[15]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx(ae,{}),e[15]=R):R=e[15];let D;e[16]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(ce,{title:"Assistant not found",description:"This assistant may have been deleted or you may not have access to it."})}),e[16]=D):D=e[16];let F;return e[17]!==i?(F=t.jsx(X,{children:t.jsx(C.Suspense,{fallback:R,children:t.jsx(te,{onBack:i,children:D})})}),e[17]=i,e[18]=F):F=e[18],F}let L;e[19]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx(ae,{}),e[19]=L):L=e[19];let T;e[20]!==u.avatar||e[21]!==u.title?(T=t.jsx("div",{className:"h-6 w-6 min-w-6 rounded-lg border border-border bg-muted/20 overflow-hidden shrink-0",children:u.avatar?t.jsx("img",{src:u.avatar,alt:u.title,className:"h-full w-full object-cover"}):t.jsx("div",{className:"h-full w-full flex items-center justify-center text-muted-foreground",children:t.jsx(Q,{size:12,className:"text-muted-foreground"})})}),e[20]=u.avatar,e[21]=u.title,e[22]=T):T=e[22];let z;e[23]!==u.title?(z=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:u.title}),e[23]=u.title,e[24]=z):z=e[24];let M;e[25]!==u.description?(M=u.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:u.description})]}):null,e[25]=u.description,e[26]=M):M=e[26];let c;e[27]!==z||e[28]!==M?(c=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[z,M]}),e[27]=z,e[28]=M,e[29]=c):c=e[29];let j;e[30]!==T||e[31]!==c?(j=t.jsx(Be,{children:t.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[T,c]})}),e[30]=T,e[31]=c,e[32]=j):j=e[32];let x;e[33]!==S.formState.isDirty||e[34]!==g||e[35]!==b||e[36]!==$||e[37]!==v?(x=t.jsx(de,{children:b==="chat"?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>v(crypto.randomUUID()),title:"New thread",className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",children:t.jsx(Me,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})}),t.jsx("button",{type:"button",onClick:()=>w("edit"),title:"Edit",className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",children:t.jsx(xe,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(G,{variant:"ghost",size:"sm",className:"h-7 gap-1.5",disabled:g,onClick:()=>w("chat"),children:"Cancel"}),t.jsx(G,{variant:"default",size:"sm",className:"h-7 gap-1.5",disabled:!S.formState.isDirty||g,onClick:()=>{$()},children:g?t.jsxs(t.Fragment,{children:[t.jsx(H,{size:14,className:"animate-spin"}),"Saving..."]}):"Save"})]})}),e[33]=S.formState.isDirty,e[34]=g,e[35]=b,e[36]=$,e[37]=v,e[38]=x):x=e[38];let O;e[39]!==h||e[40]!==u||e[41]!==S||e[42]!==b?(O=t.jsx("div",{className:"h-full",children:t.jsx(st,{activeThreadId:h,mode:b,assistant:u,form:S},S.formState.submitCount)}),e[39]=h,e[40]=u,e[41]=S,e[42]=b,e[43]=O):O=e[43];let B;return e[44]!==i||e[45]!==j||e[46]!==x||e[47]!==O?(B=t.jsx(X,{children:t.jsx(C.Suspense,{fallback:L,children:t.jsxs(te,{onBack:i,children:[j,x,O]})})}),e[44]=i,e[45]=j,e[46]=x,e[47]=O,e[48]=B):B=e[48],B}function rt(s){return s||crypto.randomUUID()}function at(s){const e=A.c(6),{itemId:n,onBack:r}=s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[0]=o):o=e[0];const a=K(o).connectionId??q;if(!a||a===q){let d;return e[1]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(ce,{title:"Assistant not found",description:"Missing connection information in the current route."})}),e[1]=d):d=e[1],d}let i;return e[2]!==a||e[3]!==n||e[4]!==r?(i=t.jsx(ot,{providerId:a,assistantId:n,onBack:r}),e[2]=a,e[3]=n,e[4]=r,e[5]=i):i=e[5],i}const lt=ge("relative w-full rounded-lg border px-4 py-3 text-sm flex items-start gap-3 [&>svg]:size-4 [&>svg]:flex-shrink-0 [&>svg]:mt-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-destructive/5 text-destructive border-destructive/25 [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-warning/10 text-warning-foreground border-warning [&>svg]:text-current *:data-[slot=alert-description]:text-warning-foreground/90",success:"bg-success/10 text-success-foreground border-success [&>svg]:text-current *:data-[slot=alert-description]:text-success-foreground/90",info:"bg-card text-card-foreground border-border [&>svg]:text-current *:data-[slot=alert-description]:text-muted-foreground/90"}},defaultVariants:{variant:"default"}});function it(s){const e=A.c(10);let n,r,o;e[0]!==s?({className:n,variant:o,...r}=s,e[0]=s,e[1]=n,e[2]=r,e[3]=o):(n=e[1],r=e[2],o=e[3]);let l;e[4]!==n||e[5]!==o?(l=W(lt({variant:o}),n),e[4]=n,e[5]=o,e[6]=l):l=e[6];let a;return e[7]!==r||e[8]!==l?(a=t.jsx("div",{"data-slot":"alert",role:"alert",className:l,...r}),e[7]=r,e[8]=l,e[9]=a):a=e[9],a}function ct(s){const e=A.c(8);let n,r;e[0]!==s?({className:n,...r}=s,e[0]=s,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=W("line-clamp-1 min-h-4 font-medium tracking-tight",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==r||e[6]!==o?(l=t.jsx("div",{"data-slot":"alert-title",className:o,...r}),e[5]=r,e[6]=o,e[7]=l):l=e[7],l}function dt(s){const e=A.c(8);let n,r;e[0]!==s?({className:n,...r}=s,e[0]=s,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=W("text-muted-foreground leading-relaxed",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==r||e[6]!==o?(l=t.jsx("div",{"data-slot":"alert-description",className:o,...r}),e[5]=r,e[6]=o,e[7]=l):l=e[7],l}const mt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function ut(s){const e=A.c(13),{toolName:n,connectionId:r,onBack:o}=s,l=`/mcp/${r}`;let a;e[0]!==l?(a=new URL(l,window.location.origin),e[0]=l,e[1]=a):a=e[1];const i=a;let d;e[2]!==r?(d={connectionId:r},e[2]=r,e[3]=d):d=e[3];const m=Ve(d);if(!m.isAuthenticated){let p;return e[4]!==m.supportsOAuth||e[5]!==o?(p=t.jsx("div",{className:"flex h-full items-center justify-center",children:m.supportsOAuth?t.jsx(We,{onAuthenticate:()=>o(),buttonText:"Go back to authenticate"}):t.jsx(Ge,{hasReadme:!1})}),e[4]=m.supportsOAuth,e[5]=o,e[6]=p):p=e[6],p}const h=`${r}:${n}`;let v;return e[7]!==r||e[8]!==i||e[9]!==o||e[10]!==h||e[11]!==n?(v=t.jsx(ft,{toolName:n,connectionId:r,mcpProxyUrl:i,onBack:o},h),e[7]=r,e[8]=i,e[9]=o,e[10]=h,e[11]=n,e[12]=v):v=e[12],v}function ft({toolName:s,connectionId:e,mcpProxyUrl:n,onBack:r}){const{replayId:o}=je({strict:!1}),l=(()=>{if(!o)return null;const c=`replay-${o}`,j=sessionStorage.getItem(c);if(!j)return null;sessionStorage.removeItem(c);try{return JSON.parse(j)}catch{return null}})(),a=(()=>{if(!l)return null;const c={};for(const[j,x]of Object.entries(l))x!==null&&typeof x=="object"?c[j]=JSON.stringify(x,null,2):c[j]=x;return c})(),[i,d]=C.useState(a??{}),[m,h]=C.useState(l?JSON.stringify(l,null,2):"{}"),[v,p]=C.useState(null),[y,_]=C.useState(null),[u,k]=C.useState(!1),[g,b]=C.useState(null),w=ie(e),f=Ke({url:n.href});C.useEffect(()=>{f.error&&console.error("MCP Error:",f.error)},[f.error]);const N=f.tools?.find(c=>c.name===s),E=N?.inputSchema?.properties,S=E?Object.keys(E):[],I=S.length>0,$={};if(I&&N?.inputSchema?.properties)for(const c of S)$[c]=N.inputSchema.required?.includes(c)?"":void 0;const L=c=>Object.prototype.hasOwnProperty.call(i,c),T=async()=>{k(!0),_(null),p(null),b(null);const c=performance.now(),j=ne(e);try{const x=I?{...$,...i}:(()=>{const P=m.trim();if(!P)return{};const U=JSON.parse(P);if(U&&typeof U=="object")return U;throw new Error("Raw JSON input must be an object.")})();I&&N?.inputSchema?.properties&&Object.entries(N.inputSchema.properties).forEach(([P,U])=>{if((U.type==="object"||U.type==="array")&&typeof x[P]=="string")try{x[P]=JSON.parse(x[P])}catch{}});const O=await j(s,x),B=performance.now(),R=Math.round(B-c);p(O);const D=JSON.stringify(O),F=new TextEncoder().encode(D).length;b({duration:`${R}ms`,bytes:`${F} bytes`,tokens:`~${Math.ceil(F/4)} tokens`,cost:"$0.0000"})}catch(x){const O=x instanceof Error?x.message:String(x);_(O||"Unknown error occurred");const B=performance.now();b({duration:`${Math.round(B-c)}ms`})}finally{k(!1)}},z=(c,j)=>{d(x=>({...x,[c]:j}))},M=()=>{p(null),_(null),b(null)};return t.jsxs(te,{onBack:r,children:[t.jsx(de,{children:t.jsx(qe,{connectionId:e,title:N?.name??mt(s),icon:"build"})}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 h-full",children:[t.jsx("div",{className:"flex flex-col border-r border-border overflow-hidden",children:t.jsxs("div",{className:"flex-1 overflow-auto",children:[t.jsx("div",{className:"flex flex-col gap-4 p-6 border-b border-border min-h-28",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(Ne,{icon:w?.icon||null,name:w?.title||s,size:"sm",className:"shadow-sm shrink-0"}),t.jsx("h1",{className:"text-lg font-medium text-foreground leading-none",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit",children:[f.state==="ready"?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):f.state==="connecting"?t.jsx(H,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:f.state.replace("_"," ")})]})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:N?.description||"No description available"})]})}),t.jsxs("div",{className:"flex flex-col p-6 gap-4",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),N?.inputSchema?.required&&N.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),t.jsx("div",{className:"space-y-4",children:I&&N?.inputSchema?.properties?Object.entries(N.inputSchema.properties).map(([c,j])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[c,N.inputSchema?.required?.includes(c)&&t.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:j.type})]}),j.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:j.description}),j.type==="object"||j.type==="array"?t.jsx(ee,{className:"font-mono text-xs",value:L(c)?i[c]??"":$[c]??"",onChange:x=>z(c,x.target.value),placeholder:`Enter ${c} as JSON...`,rows:3}):t.jsx(re,{value:L(c)?i[c]??"":$[c]??"",onChange:x=>z(c,x.target.value),placeholder:`Enter ${c}...`})]},c)):N?.inputSchema&&!I?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),t.jsx(ee,{className:"font-mono text-xs min-h-[120px]",value:m,onChange:c=>h(c.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})})]})]})}),t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-t lg:border-t-0 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),g&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(De,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:g.duration})]}),g.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(me,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:g.tokens})]}),g.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(fe,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:g.bytes})]}),g.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:g.cost})})]})]}),t.jsx("div",{className:"flex items-center justify-end lg:justify-between px-4 h-14 border-b border-border bg-background",children:t.jsxs("div",{className:"flex items-center gap-2 w-full lg:w-auto",children:[t.jsx(G,{size:"sm",variant:"default",className:"h-8 gap-2 flex-1 lg:flex-none",onClick:T,disabled:u,children:u?t.jsxs(t.Fragment,{children:[t.jsx(H,{size:14,className:"animate-spin"}),"Executing..."]}):t.jsxs(t.Fragment,{children:[t.jsx(Pe,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})}),t.jsx($e,{children:t.jsxs(Ee,{children:[t.jsx(Te,{asChild:!0,children:t.jsx(G,{size:"icon",variant:"outline",className:"h-8 w-8 shrink-0",onClick:M,disabled:!v&&!y,children:t.jsx(Je,{size:14})})}),t.jsx(Ae,{children:t.jsx("p",{children:"Clear results"})})]})})]})}),y&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(it,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Re,{className:"h-4 w-4"}),t.jsx(ct,{className:"mb-0",children:"Execution Failed"})]}),t.jsx(dt,{className:"text-xs text-destructive",children:y})]})})}),t.jsx("div",{className:"relative flex-1 overflow-auto bg-muted/50",children:v?t.jsxs(t.Fragment,{children:[t.jsx(Ue,{jsonString:JSON.stringify(v,null,2),padding:"1.5rem"}),t.jsx(G,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(v,null,2)),ve.success("Copied to clipboard")},children:t.jsx(Fe,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(ue,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]})]})]})}function xt(s){const e=A.c(7),{itemId:n,onBack:r}=s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[0]=o):o=e[0];const a=K(o).connectionId??q;if(!ie(a)){let h;return e[1]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[t.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[1]=h):h=e[1],h}let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(H,{size:32,className:"animate-spin text-muted-foreground"})}),e[2]=d):d=e[2];let m;return e[3]!==a||e[4]!==r||e[5]!==n?(m=t.jsx(C.Suspense,{fallback:d,children:t.jsx(ut,{toolName:n,connectionId:a,onBack:r})}),e[3]=a,e[4]=r,e[5]=n,e[6]=m):m=e[6],m}const ht={assistant:at};function pt(){const s=A.c(6),e=se();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/mcps/$connectionId/$collectionName/$itemId"},s[0]=n):n=s[0];const r=K(n),o=decodeURIComponent(r.itemId);let l;s[1]!==e.history?(l=()=>{e.history.back()},s[1]=e.history,s[2]=l):l=s[2];const a=l,i=gt;let d;return s[3]!==a||s[4]!==o?(d=t.jsx(xt,{itemId:o,onBack:a,onUpdate:i}),s[3]=a,s[4]=o,s[5]=d):d=s[5],d}async function gt(s){return Promise.resolve()}function jt(){const s=A.c(18),e=se();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/mcps/$connectionId/$collectionName/$itemId"},s[0]=n):n=s[0];const r=K(n),o=r.connectionId,l=decodeURIComponent(r.collectionName),a=decodeURIComponent(r.itemId);let i;s[1]!==e.history?(i=()=>{e.history.back()},s[1]=e.history,s[2]=i):i=s[2];const d=i,m=o??q;let h;s[3]!==m?(h=ne(m),s[3]=m,s[4]=h):h=s[4];const p=le(m,l,h);let y;s[5]!==p||s[6]!==a?(y=async f=>{a&&await p.update.mutateAsync({id:a,data:f})},s[5]=p,s[6]=a,s[7]=y):y=s[7];const _=y;let u;s[8]!==l?(u=l?.toLowerCase(),s[8]=l,s[9]=u):u=s[9];const k=u,g=k&&ht[k];if(g){let f;return s[10]!==g||s[11]!==d||s[12]!==_||s[13]!==a?(f=t.jsx(g,{itemId:a,onBack:d,onUpdate:_}),s[10]=g,s[11]=d,s[12]=_,s[13]=a,s[14]=f):f=s[14],f}let b;s[15]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(ye,{size:36,className:"text-muted-foreground"}),s[15]=b):b=s[15];let w;return s[16]!==d?(w=t.jsx(He,{icon:b,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:d,children:"Go back"}}),s[16]=d,s[17]=w):w=s[17],w}function vt(){const s=A.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/mcps/$connectionId/$collectionName/$itemId"},s[0]=e):e=s[0];const n=K(e);if(decodeURIComponent(n.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(pt,{}),s[1]=a):a=s[1],a}let l;return s[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(jt,{}),s[2]=l):l=s[2],l}function ps(){const s=A.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(X,{children:t.jsx(C.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(H,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(vt,{})})}),s[0]=e):e=s[0],e}export{ps as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as a,c as Q,j as s}from"./index-DDrssUsd.js";import{B as se}from"./button-n-dnBUcs.js";import{c as oe,D as ie,b as ne,a as le}from"./dropdown-menu-DSDzjgEf.js";import{a as re,c as ae}from"./Grid01-S3S2kEug.js";import{i as ce,a as de,c as ue,b as fe,T as me}from"./tooltip-CScUy2XK.js";import{c as m}from"./utils-BNxGaTF3.js";const U=({size:i=24,color:e="currentColor",...o})=>a.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},a.createElement("path",{d:"M12 5v14m0 0 7-7m-7 7-7-7"}));U.displayName="ArrowDown";const X=({size:i=24,color:e="currentColor",...o})=>a.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},a.createElement("path",{d:"M21 12H9m12-6H9m12 12H9m-4-6a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm0-6a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm0 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"}));X.displayName="List";const Y=({size:i=24,color:e="currentColor",...o})=>a.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},a.createElement("path",{d:"M5 21v-7m0-4V3m7 18v-9m0-4V3m7 18v-5m0-4V3M2 14h6m1-6h6m1 8h6"}));Y.displayName="Sliders01";const xe={sm:{button:"size-7",icon:"size-4"},md:{button:"size-9",icon:"size-5"},lg:{button:"size-12",icon:"size-6"}};function he(i){const e=Q.c(66),{value:o,onValueChange:l,options:t,size:p,fullWidth:g,className:x}=i,j=p===void 0?"sm":p,r=g===void 0?!1:g,v=a.useRef(null),b=a.useRef(null);let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={left:0,width:0,opacity:0},e[0]=c):c=e[0];const[n,h]=a.useState(c);let d;e[1]===Symbol.for("react.memo_cache_sentinel")?(d=I=>{if(!I.current)return;const{offsetLeft:ee,offsetWidth:te}=I.current;h({left:ee,width:te,opacity:1})},e[1]=d):d=e[1];const w=d;let u;e[2]!==t[0].value||e[3]!==o?(u=()=>{const I=o===t[0].value?v:b;w(I)},e[2]=t[0].value,e[3]=o,e[4]=u):u=e[4];let R;e[5]!==t||e[6]!==o?(R=[o,t],e[5]=t,e[6]=o,e[7]=R):R=e[7],a.useEffect(u,R);const f=xe[j];let y;e[8]!==x?(y=m("relative flex gap-0 bg-muted rounded-lg",x),e[8]=x,e[9]=y):y=e[9];let N;e[10]!==l||e[11]!==t[0].value?(N=()=>l(t[0].value),e[10]=l,e[11]=t[0].value,e[12]=N):N=e[12];const P=r?"flex-1 h-12 px-4":f.button,Z=!r&&t[0].label?"px-3":"";let z;e[13]!==Z||e[14]!==P?(z=m("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",P,Z),e[13]=Z,e[14]=P,e[15]=z):z=e[15];const O=o===t[0].value?"text-foreground":"text-muted-foreground";let k;e[16]!==f.icon||e[17]!==O?(k=m("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",f.icon,O),e[16]=f.icon,e[17]=O,e[18]=k):k=e[18];let C;e[19]!==t[0].icon||e[20]!==k?(C=s.jsx("span",{className:k,children:t[0].icon}),e[19]=t[0].icon,e[20]=k,e[21]=C):C=e[21];let M;e[22]!==t[0].label||e[23]!==t[0].value||e[24]!==o?(M=t[0].label&&s.jsx("span",{className:m("text-xs transition-colors ease-out duration-200 whitespace-nowrap",o===t[0].value?"text-foreground":"text-muted-foreground"),children:t[0].label}),e[22]=t[0].label,e[23]=t[0].value,e[24]=o,e[25]=M):M=e[25];let S;e[26]!==z||e[27]!==C||e[28]!==M||e[29]!==N?(S=s.jsxs("button",{ref:v,type:"button",onClick:N,className:z,children:[C,M]}),e[26]=z,e[27]=C,e[28]=M,e[29]=N,e[30]=S):S=e[30];let _;e[31]!==l||e[32]!==t[1].value?(_=()=>l(t[1].value),e[31]=l,e[32]=t[1].value,e[33]=_):_=e[33];const A=r?"flex-1 h-12 px-4":f.button,K=!r&&t[1].label?"px-3":"";let E;e[34]!==A||e[35]!==K?(E=m("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",A,K),e[34]=A,e[35]=K,e[36]=E):E=e[36];const q=o===t[1].value?"text-foreground":"text-muted-foreground";let D;e[37]!==f.icon||e[38]!==q?(D=m("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",f.icon,q),e[37]=f.icon,e[38]=q,e[39]=D):D=e[39];let L;e[40]!==t[1].icon||e[41]!==D?(L=s.jsx("span",{className:D,children:t[1].icon}),e[40]=t[1].icon,e[41]=D,e[42]=L):L=e[42];let T;e[43]!==t[1].label||e[44]!==t[1].value||e[45]!==o?(T=t[1].label&&s.jsx("span",{className:m("text-xs transition-colors ease-out duration-200 whitespace-nowrap",o===t[1].value?"text-foreground":"text-muted-foreground"),children:t[1].label}),e[43]=t[1].label,e[44]=t[1].value,e[45]=o,e[46]=T):T=e[46];let V;e[47]!==_||e[48]!==E||e[49]!==L||e[50]!==T?(V=s.jsxs("button",{ref:b,type:"button",onClick:_,className:E,children:[L,T]}),e[47]=_,e[48]=E,e[49]=L,e[50]=T,e[51]=V):V=e[51];const F=r?"h-12":f.button;let W;e[52]!==F?(W=m("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",F),e[52]=F,e[53]=W):W=e[53];const G=`${n.left}px`,J=`${n.width}px`;let $;e[54]!==n.opacity||e[55]!==G||e[56]!==J?($={left:G,width:J,opacity:n.opacity},e[54]=n.opacity,e[55]=G,e[56]=J,e[57]=$):$=e[57];let B;e[58]!==W||e[59]!==$?(B=s.jsx("div",{className:W,style:$}),e[58]=W,e[59]=$,e[60]=B):B=e[60];let H;return e[61]!==S||e[62]!==V||e[63]!==B||e[64]!==y?(H=s.jsxs("div",{className:y,children:[S,V,B]}),e[61]=S,e[62]=V,e[63]=B,e[64]=y,e[65]=H):H=e[65],H}function ye(i){const e=Q.c(16),{viewMode:o,onViewModeChange:l,sortKey:t,sortDirection:p,onSort:g,sortOptions:x}=i;let j;e[0]!==x?(j=x===void 0?[]:x,e[0]=x,e[1]=j):j=e[1];const r=j;let v;e[2]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(de,{children:s.jsxs(ue,{children:[s.jsx(fe,{asChild:!0,children:s.jsx(ie,{asChild:!0,children:s.jsx(se,{variant:"outline",size:"icon",className:"size-7 border border-input",children:s.jsx(Y,{size:16})})})}),s.jsx(me,{children:"Search filters"})]})}),e[2]=v):v=e[2];let b;e[3]===Symbol.for("react.memo_cache_sentinel")?(b={value:"table",icon:s.jsx(X,{})},e[3]=b):b=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=[b,{value:"cards",icon:s.jsx(ae,{})}],e[4]=c):c=e[4];let n;e[5]!==l||e[6]!==o?(n=s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(he,{value:o,onValueChange:l,fullWidth:!0,options:c})}),e[5]=l,e[6]=o,e[7]=n):n=e[7];let h;e[8]!==g||e[9]!==p||e[10]!==t||e[11]!==r?(h=r.length>0&&g&&s.jsxs("div",{className:"p-2",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Sort by"}),r.map(w=>{const u=t===w.id;return s.jsx(oe,{onClick:()=>g(w.id),className:m("h-8 px-2 py-0 cursor-pointer",u&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[u&&s.jsx(ce,{size:16,className:"text-foreground shrink-0"}),!u&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:w.label}),u&&p&&(p==="asc"?s.jsx(re,{size:16,className:"text-foreground shrink-0"}):s.jsx(U,{size:16,className:"text-foreground shrink-0"}))]})},w.id)})]}),e[8]=g,e[9]=p,e[10]=t,e[11]=r,e[12]=h):h=e[12];let d;return e[13]!==n||e[14]!==h?(d=s.jsxs(ne,{children:[v,s.jsxs(le,{align:"end",className:"w-[200px] p-0 gap-0",children:[n,h]})]}),e[13]=n,e[14]=h,e[15]=d):d=e[15],d}export{ye as C,he as V,U as n};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as j,j as i}from"./index-DDrssUsd.js";import{C as b}from"./collection-display-button-BziK2H4v.js";function g(h){const e=j.c(17),{title:d,viewMode:r,onViewModeChange:l,sortKey:m,sortDirection:f,onSort:x,sortOptions:n,ctaButton:p}=h;let c;e[0]!==n?(c=n===void 0?[]:n,e[0]=n,e[1]=c):c=e[1];const u=c;let t;e[2]!==d?(t=i.jsx("h1",{className:"text-sm font-medium text-foreground",children:d}),e[2]=d,e[3]=t):t=e[3];let s;e[4]!==x||e[5]!==l||e[6]!==f||e[7]!==m||e[8]!==u||e[9]!==r?(s=r&&l&&i.jsx(b,{viewMode:r,onViewModeChange:l,sortKey:m,sortDirection:f,onSort:x,sortOptions:u}),e[4]=x,e[5]=l,e[6]=f,e[7]=m,e[8]=u,e[9]=r,e[10]=s):s=e[10];let o;e[11]!==p||e[12]!==s?(o=i.jsxs("div",{className:"flex items-center gap-2",children:[s,p]}),e[11]=p,e[12]=s,e[13]=o):o=e[13];let a;return e[14]!==t||e[15]!==o?(a=i.jsx("div",{className:"shrink-0 w-full border-b border-border h-12",children:i.jsxs("div",{className:"flex items-center justify-between gap-3 h-12 px-4",children:[t,o]})}),e[14]=t,e[15]=o,e[16]=a):a=e[16],a}export{g as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as s,j as c}from"./index-
|
|
1
|
+
import{c as s,j as c}from"./index-DDrssUsd.js";function r(t){const e=s.c(2),{children:l}=t;let o;return e[0]!==l?(o=c.jsx("div",{className:"flex flex-col h-full bg-background overflow-hidden",children:l}),e[0]=l,e[1]=o):o=e[1],o}export{r as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as x,j as a}from"./index-DDrssUsd.js";import{i as u}from"./SearchMd-DBUkNw9d.js";import{I as b}from"./input-8OLj0EZ_.js";import{c as g}from"./utils-BNxGaTF3.js";function w(h){const e=x.c(13),{value:n,onChange:c,placeholder:d,onKeyDown:i,className:m}=h,f=d===void 0?"Search...":d;let t;e[0]!==m?(t=g("shrink-0 w-full border-b border-border h-12",m),e[0]=m,e[1]=t):t=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsx(u,{size:16,className:"text-muted-foreground shrink-0"}),e[2]=o):o=e[2];let r;e[3]!==c?(r=p=>c(p.target.value),e[3]=c,e[4]=r):r=e[4];let s;e[5]!==i||e[6]!==f||e[7]!==r||e[8]!==n?(s=a.jsxs("label",{className:"flex items-center gap-2.5 h-12 px-4 cursor-text",children:[o,a.jsx(b,{value:n,onChange:r,onKeyDown:i,placeholder:f,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"})]}),e[5]=i,e[6]=f,e[7]=r,e[8]=n,e[9]=s):s=e[9];let l;return e[10]!==t||e[11]!==s?(l=a.jsx("div",{className:t,children:s}),e[10]=t,e[11]=s,e[12]=l):l=e[12],l}export{w as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as g,j as o}from"./index-DDrssUsd.js";import{c as u}from"./utils-BNxGaTF3.js";import{n as T}from"./collection-display-button-BziK2H4v.js";import{a as $}from"./Grid01-S3S2kEug.js";function R(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("div",{"data-slot":"table-container",className:"relative w-full min-w-0",children:o.jsx("table",{"data-slot":"table",className:l,...s})}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function H(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("[&_tr]:border-b",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("thead",{"data-slot":"table-header",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function L(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("tbody",{"data-slot":"table-body",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function S(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("tr",{"data-slot":"table-row",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function z(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("th",{"data-slot":"table-head",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function D(a){const e=g.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==s||e[6]!==l?(r=o.jsx("td",{"data-slot":"table-cell",className:l,...s}),e[5]=s,e[6]=l,e[7]=r):r=e[7],r}function E(a){const e=g.c(29),{columns:t,data:s,sortKey:l,sortDirection:r,onSort:f,onRowClick:c,rowClassName:x}=a;let h;e[0]!==r?(h=function(n,N){return o.jsx("div",{className:"w-4 flex items-center justify-center",children:N&&r&&(r==="asc"?o.jsx($,{size:16,className:"text-muted-foreground transition-colors"}):o.jsx(T,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=r,e[1]=h):h=e[1];const w=h;let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=function(n,N){let C="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-xs h-9 uppercase tracking-wider";return n===N-1&&(C="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-xs h-9 uppercase tracking-wider w-8"),C},e[2]=p):p=e[2];const i=p;let d;if(e[3]!==t||e[4]!==f||e[5]!==w||e[6]!==l){let m;e[8]!==t.length||e[9]!==f||e[10]!==w||e[11]!==l?(m=(n,N)=>{const C=l===n.id;return o.jsx(z,{className:u(i(N,t.length),"group transition-colors select-none",n.sortable&&"hover:bg-accent cursor-pointer",n.rowClassName,n.cellClassName),onClick:n.sortable&&f?()=>f(n.id):void 0,children:o.jsxs("span",{className:"flex items-center gap-1",children:[n.header,n.sortable&&w(n.id,C)]})},n.id)},e[8]=t.length,e[9]=f,e[10]=w,e[11]=l,e[12]=m):m=e[12],d=t.map(m),e[3]=t,e[4]=f,e[5]=w,e[6]=l,e[7]=d}else d=e[7];let j;e[13]!==d?(j=o.jsx(H,{className:"sticky top-0 z-10 border-b-0 bg-muted/30",children:o.jsx(S,{className:"h-9 hover:bg-transparent border-b border-border",children:d})}),e[13]=d,e[14]=j):j=e[14];let v;if(e[15]!==t||e[16]!==s||e[17]!==c||e[18]!==x){let m;e[20]!==t||e[21]!==c||e[22]!==x?(m=(n,N)=>{const C=x?.(n);return o.jsx(S,{"data-row-index":N,className:u("group/data-row transition-colors border-b-0 hover:bg-accent/50",c?"cursor-pointer":"",C),onClick:c?()=>c(n):void 0,children:t.map(b=>o.jsx(D,{className:u("px-5 py-4 h-16 align-middle text-sm text-foreground",b.cellClassName,b.wrap?"whitespace-normal wrap-break-word":""),children:o.jsx("div",{className:u(b.wrap?"w-full":"min-w-0 w-full",!b.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:b.render?b.render(n):b.accessor?b.accessor(n):null})},b.id))},N)},e[20]=t,e[21]=c,e[22]=x,e[23]=m):m=e[23],v=s.map(m),e[15]=t,e[16]=s,e[17]=c,e[18]=x,e[19]=v}else v=e[19];let y;e[24]!==v?(y=o.jsx(L,{children:v}),e[24]=v,e[25]=y):y=e[25];let k;return e[26]!==j||e[27]!==y?(k=o.jsx("div",{className:"w-full bg-background min-w-0",children:o.jsxs(R,{className:"w-full border-collapse",children:[j,y]})}),e[26]=j,e[27]=y,e[28]=k):k=e[28],k}function W(a){const e=g.c(12),{columns:t,data:s,isLoading:l,sortKey:r,sortDirection:f,onSort:c,onRowClick:x,emptyState:h}=a;if(l===void 0?!1:l){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"flex items-center justify-center h-full",children:o.jsx("div",{className:"text-muted-foreground",children:"Loading..."})}),e[0]=i):i=e[0],i}if(s.length===0){let i;e[1]!==h?(i=h||o.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No items found"}),e[1]=h,e[2]=i):i=e[2];let d;return e[3]!==i?(d=o.jsx("div",{className:"flex items-center justify-center h-full",children:i}),e[3]=i,e[4]=d):d=e[4],d}let p;return e[5]!==t||e[6]!==s||e[7]!==x||e[8]!==c||e[9]!==f||e[10]!==r?(p=o.jsx("div",{className:"flex-1 overflow-auto",children:o.jsx(E,{columns:t,data:s,sortKey:r,sortDirection:f,onSort:c,onRowClick:x})}),e[5]=t,e[6]=s,e[7]=x,e[8]=c,e[9]=f,e[10]=r,e[11]=p):p=e[11],p}export{W as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as S,j as s}from"./index-DDrssUsd.js";import{C as _}from"./card--RtELIXA.js";import{c as j}from"./utils-BNxGaTF3.js";import{I as A}from"./use-connection-DrLts5Bh.js";function H(h){const e=S.c(40),{connection:t,onClick:g,headerActions:v,footer:C,className:k,size:R,fallbackIcon:z}=h,b=R===void 0?"md":R,y=b==="sm"?"p-4":"p-6",I=b==="sm"?"text-sm":"text-base",w=b==="sm"?"text-xs":"text-sm",E=g&&"hover:bg-muted/50";let i;e[0]!==k||e[1]!==E?(i=j("cursor-pointer transition-colors group",E,k),e[0]=k,e[1]=E,e[2]=i):i=e[2];let l;e[3]!==y?(l=j("flex flex-col gap-4 relative",y),e[3]=y,e[4]=l):l=e[4];let o;e[5]!==t.icon||e[6]!==t.title||e[7]!==z?(o=s.jsx(A,{icon:t.icon,name:t.title,size:"md",className:"shrink-0 shadow-sm",fallbackIcon:z}),e[5]=t.icon,e[6]=t.title,e[7]=z,e[8]=o):o=e[8];let n;e[9]!==v?(n=v&&s.jsx("div",{className:j("transition-opacity","opacity-0 group-hover:opacity-100"),onClick:q,children:v}),e[9]=v,e[10]=n):n=e[10];let c;e[11]!==n?(c=s.jsx("div",{className:"relative",children:n}),e[11]=n,e[12]=c):c=e[12];let r;e[13]!==o||e[14]!==c?(r=s.jsxs("div",{className:"flex items-start justify-between",children:[o,c]}),e[13]=o,e[14]=c,e[15]=r):r=e[15];let a;e[16]!==I?(a=j("font-medium text-foreground truncate",I),e[16]=I,e[17]=a):a=e[17];let m;e[18]!==t.title||e[19]!==a?(m=s.jsx("h3",{className:a,children:t.title}),e[18]=t.title,e[19]=a,e[20]=m):m=e[20];let d;e[21]!==w?(d=j("text-muted-foreground line-clamp-2",w),e[21]=w,e[22]=d):d=e[22];const P=t.description||"No description";let f;e[23]!==d||e[24]!==P?(f=s.jsx("p",{className:d,children:P}),e[23]=d,e[24]=P,e[25]=f):f=e[25];let p;e[26]!==m||e[27]!==f?(p=s.jsxs("div",{className:"flex flex-col gap-0",children:[m,f]}),e[26]=m,e[27]=f,e[28]=p):p=e[28];let x;e[29]!==C?(x=C&&s.jsx("div",{onClick:$,children:C}),e[29]=C,e[30]=x):x=e[30];let u;e[31]!==p||e[32]!==x||e[33]!==l||e[34]!==r?(u=s.jsxs("div",{className:l,children:[r,p,x]}),e[31]=p,e[32]=x,e[33]=l,e[34]=r,e[35]=u):u=e[35];let N;return e[36]!==g||e[37]!==u||e[38]!==i?(N=s.jsx(_,{className:i,onClick:g,children:u}),e[36]=g,e[37]=u,e[38]=i,e[39]=N):N=e[39],N}function $(h){return h.stopPropagation()}function q(h){return h.stopPropagation()}export{H as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as ie,c as L,j as t,g as Ee,a as lt,t as rt,d as at,b as ct,av as dt}from"./index-DDrssUsd.js";import{E as Oe}from"./SearchMd-DBUkNw9d.js";import{E as Ue}from"./error-boundary-kZqJcvYt.js";import{I as Ke,b as We,d as mt,e as ut,c as ft,a as pt}from"./use-connection-DrLts5Bh.js";import{b as ht}from"./use-binding-Csa06z5J.js";import{E as Re,P as xt,u as gt,S as jt}from"./index-C_LVkq3-.js";import{B as xe}from"./button-n-dnBUcs.js";import{i as qe}from"./Loading01-CNHBx4kI.js";import{R as bt}from"./resource-tabs-DfS272DC.js";import{V as Ct,a as vt,b as yt}from"./layout-BlymenNb.js";import{g as Ve}from"./generate-id-Dyweu44Y.js";import{C as Ge}from"./collection-display-button-BziK2H4v.js";import{C as wt}from"./collection-search-D33egpeg.js";import{C as Nt}from"./card--RtELIXA.js";import{b as He,D as Je,a as Ze,c as R}from"./dropdown-menu-DSDzjgEf.js";import{a as Qe}from"./Copy01-CCevdGb6.js";import{i as Xe}from"./DotsVertical-DWgbGhdO.js";import{s as Ye,u as St}from"./use-list-state-XxCjYHe0.js";import{s as et}from"./Trash01-CC4RWtjd.js";import{C as _t}from"./collection-table-wrapper-BWoWsFFZ.js";import{n as Be}from"./Inbox01-CdZg2SI6.js";import{B as It}from"./extract-connection-data-PMNMoMwh.js";import{A as Tt,g as At,c as Dt,b as $t,d as Pt,e as kt,a as Et,f as Ot}from"./alert-dialog-DKN25P9n.js";import{s as zt}from"./Plus-DfnNWvZl.js";import{R as Mt,T as Lt}from"./tools-list-DoiOjPde.js";import"./utils-BNxGaTF3.js";import"./tooltip-CScUy2XK.js";import"./auth-y34g-zyR.js";import"./mcp-oauth-2aNbgRyW.js";import"./use-organization-settings-DFt-PXFE.js";import"./use-tool-call-Ega50w5M.js";import"./File06-CRfao4L4.js";import"./Key01-7zjlT7bl.js";import"./form-BSFKQpec.js";import"./input-8OLj0EZ_.js";import"./select-D032IwwR.js";import"./ChevronDown-BbXb_40w.js";import"./use-gateway-D8DNYcSu.js";import"./Grid01-S3S2kEug.js";import"./CpuChip02-CTGBZdsr.js";import"./formatDistanceToNow-Mwdq3o1w.js";import"./registry-utils-ulDDT0d8.js";import"./index-Bg7J5oIq.js";import"./index-CXP-3IgR.js";import"./schema-CcHURukQ.js";import"./badge-D5IC8-XQ.js";import"./ArrowLeft-CjVyVt-H.js";import"./use-mobile-D-4KOtW8.js";import"./useQuery-iHOeESxa.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 Rt(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 Vt(s){const e=L.c(25),{item:o,schema:l,actions:n}=s;let r;e[0]!==o||e[1]!==l?(r=Rt(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:Bt,children:[n.open&&t.jsxs(R,{onClick:v=>{v.stopPropagation(),n.open?.(o)},children:[t.jsx(Ye,{size:16}),"Open"]}),n.edit&&t.jsxs(R,{onClick:v=>{v.stopPropagation(),n.edit?.(o)},children:[t.jsx(ze,{size:16}),"Edit"]}),n.duplicate&&t.jsxs(R,{onClick:v=>{v.stopPropagation(),n.duplicate?.(o)},children:[t.jsx(Qe,{size:16}),"Duplicate"]}),n.delete&&t.jsxs(R,{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(Nt,{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 Bt(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(Re,{icon:t.jsx(Be,{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(Vt,{item:M,schema:l,readOnly:k,actions:h})},M.id))})}):t.jsx(_t,{columns:ts(_,l,N,h),data:o,sortKey:f,sortDirection:b,onSort:P,onRowClick:A,emptyState:y||t.jsx(Re,{icon:t.jsx(Be,{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(R,{onClick:o=>{o.stopPropagation(),s.open?.(e)},children:[t.jsx(Ye,{size:16}),"Open"]}),s.edit&&t.jsxs(R,{onClick:o=>{o.stopPropagation(),s.edit?.(e)},children:[t.jsx(ze,{size:16}),"Edit"]}),s.duplicate&&t.jsxs(R,{onClick:o=>{o.stopPropagation(),s.duplicate?.(e)},children:[t.jsx(Qe,{size:16}),"Duplicate"]}),s.delete&&t.jsxs(R,{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??It,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}=St(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:Ve("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 V;e[18]!==I||e[19]!==C?(V=C&&{edit:I},e[18]=I,e[19]=C,e[20]=V):V=e[20];let B;e[21]!==O||e[22]!==f?(B=f&&{duplicate:O},e[21]=O,e[22]=f,e[23]=B):B=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]!==V||e[28]!==B?(re={...V,...B,...F},e[26]=F,e[27]=V,e[28]=B,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:Ve("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(zt,{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(Ct,{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(wt,{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(Dt,{children:"Delete item?"}),e[95]=fe):fe=e[95];const $e=x?.title;let Y;e[96]!==$e?(Y=t.jsxs($t,{children:[fe,t.jsxs(Pt,{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(Tt,{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(At,{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(kt,{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(Et,{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(Ot,{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(Mt,{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(Lt,{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(vt,{children:t.jsx(bt,{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(yt,{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 io(){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{io as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as Fe,j as t,r as Me,g as He,b as Oe,a as Re,x as Ve,y as Le}from"./index-DDrssUsd.js";import{C as Ue}from"./schema-CcHURukQ.js";import{C as We}from"./collection-header-AOGSaKJV.js";import{C as qe}from"./collection-page-Dx7W84ZY.js";import{C as Ge}from"./collection-search-D33egpeg.js";import{C as Je}from"./collection-table-wrapper-BWoWsFFZ.js";import{C as Qe}from"./connection-card-BPbF-94Z.js";import{E as ke}from"./SearchMd-DBUkNw9d.js";import{E as Xe}from"./error-boundary-kZqJcvYt.js";import{a as Ye,u as Ze,n as Ke,I as et}from"./use-connection-DrLts5Bh.js";import{u as tt,s as Pe}from"./use-list-state-XxCjYHe0.js";import{u as nt}from"./tooltip-CScUy2XK.js";import{c as ot,b as st,d as it,A as rt,e as lt,g as ct,a as at,f as dt}from"./alert-dialog-DKN25P9n.js";import{B as mt}from"./badge-D5IC8-XQ.js";import{B as E}from"./button-n-dnBUcs.js";import{a as ut,b as pt,D as ht,f as ft,c as gt,d as xt}from"./dialog-Dn--K_0P.js";import{b as Te,D as $e,a as Ae,c as he}from"./dropdown-menu-DSDzjgEf.js";import{F as K,a as jt,b as B,c as H,d as O,f as R}from"./form-BSFKQpec.js";import{i as ze}from"./DotsVertical-DWgbGhdO.js";import{i as Ct}from"./Loading01-CNHBx4kI.js";import{s as Ee}from"./Trash01-CC4RWtjd.js";import{I as Ie}from"./input-8OLj0EZ_.js";import{S as _t,a as St,b as yt,c as vt,d as Ne}from"./select-D032IwwR.js";import{T as wt}from"./textarea-BFoLEajE.js";import{g as bt}from"./generate-id-Dyweu44Y.js";import"./collection-display-button-BziK2H4v.js";import"./Grid01-S3S2kEug.js";import"./utils-BNxGaTF3.js";import"./card--RtELIXA.js";import"./use-mobile-D-4KOtW8.js";import"./X-CmV6VETi.js";import"./ChevronDown-BbXb_40w.js";const Dt=Ue.pick({title:!0,description:!0,connection_type:!0,connection_url:!0,connection_token:!0}).partial({description:!0,connection_token:!0});function kt(e,n){switch(n.type){case"edit":return{mode:"editing",connection:n.connection};case"delete":return{mode:"deleting",connection:n.connection};case"close":return{mode:"idle"}}}function Nt(){const e=Fe.c(126),{org:n}=nt(),r=He();let V;e[0]===Symbol.for("react.memo_cache_sentinel")?(V={strict:!1},e[0]=V):V=e[0];const Be=Oe(V),{data:fe}=Re.useSession();let L;e[1]!==n.slug?(L={namespace:n.slug,resource:"connections"},e[1]=n.slug,e[2]=L):L=e[2];const o=tt(L),d=Ye(),F=Ze(o);let U;e[3]===Symbol.for("react.memo_cache_sentinel")?(U={mode:"idle"},e[3]=U):U=e[3];const[c,m]=Me.useReducer(kt,U),W=Be.action==="create";let q;e[4]!==r||e[5]!==n.slug?(q=()=>{r({to:"/$org/mcps",params:{org:n.slug},search:{action:"create"}})},e[4]=r,e[5]=n.slug,e[6]=q):q=e[6];const ge=q;let G;e[7]!==r||e[8]!==n.slug?(G=()=>{r({to:"/$org/mcps",params:{org:n.slug},search:{}})},e[7]=r,e[8]=n.slug,e[9]=G):G=e[9];const u=G;let J;e[10]===Symbol.for("react.memo_cache_sentinel")?(J={resolver:Ve(Dt),defaultValues:{title:"",description:null,connection_type:"HTTP",connection_url:"",connection_token:null}},e[10]=J):J=e[10];const i=Le(J),l=c.mode==="editing"?c.connection:null;let Q,X;e[11]!==l||e[12]!==i?(Q=()=>{l?i.reset({title:l.title,description:l.description,connection_type:l.connection_type,connection_url:l.connection_url,connection_token:null}):i.reset({title:"",description:null,connection_type:"HTTP",connection_url:"",connection_token:null})},X=[l,i],e[11]=l,e[12]=i,e[13]=Q,e[14]=X):(Q=e[13],X=e[14]),Me.useEffect(Q,X);let Y;e[15]!==d||e[16]!==c.connection||e[17]!==c.mode?(Y=async()=>{if(c.mode!=="deleting")return;const s=c.connection.id;m({type:"close"});try{await d.delete.mutateAsync(s)}catch{}},e[15]=d,e[16]=c.connection,e[17]=c.mode,e[18]=Y):Y=e[18];const xe=Y;let Z;e[19]!==d||e[20]!==u||e[21]!==l||e[22]!==i||e[23]!==r||e[24]!==n.id||e[25]!==n.slug||e[26]!==fe?.user?.id?(Z=async s=>{if(l){await d.update.mutateAsync({id:l.id,data:{title:s.title,description:s.description||null,connection_type:s.connection_type,connection_url:s.connection_url,...s.connection_token&&{connection_token:s.connection_token}}}),m({type:"close"}),i.reset();return}const a=bt("conn");await d.create.mutateAsync({id:a,title:s.title,description:s.description||null,connection_type:s.connection_type,connection_url:s.connection_url,connection_token:s.connection_token||null,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:fe?.user?.id||"system",organization_id:n.id,icon:null,app_name:null,app_id:null,connection_headers:null,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),u(),i.reset(),r({to:"/$org/mcps/$connectionId",params:{org:n.slug,connectionId:a}})},e[19]=d,e[20]=u,e[21]=l,e[22]=i,e[23]=r,e[24]=n.id,e[25]=n.slug,e[26]=fe?.user?.id,e[27]=Z):Z=e[27];const je=Z;let ee;e[28]!==u||e[29]!==i||e[30]!==W?(ee=s=>{s||(W?u():m({type:"close"}),i.reset())},e[28]=u,e[29]=i,e[30]=W,e[31]=ee):ee=e[31];const p=ee;let te,ne,oe,se,ie,re;e[32]===Symbol.for("react.memo_cache_sentinel")?(te={id:"icon",header:"",render:Vt,cellClassName:"w-16 shrink-0",wrap:!0},ne={id:"title",header:"Name",render:Rt,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},oe={id:"description",header:"Description",render:Ot,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},se={id:"connection_type",header:"Type",accessor:Ht,cellClassName:"w-24 shrink-0",sortable:!0},ie={id:"connection_url",header:"URL",render:Bt,wrap:!0,cellClassName:"w-48 min-w-0 shrink-0"},re={id:"status",header:"Status",render:Kt,cellClassName:"w-24 shrink-0",sortable:!0},e[32]=te,e[33]=ne,e[34]=oe,e[35]=se,e[36]=ie,e[37]=re):(te=e[32],ne=e[33],oe=e[34],se=e[35],ie=e[36],re=e[37]);let le;e[38]!==r||e[39]!==n.slug?(le=[te,ne,oe,se,ie,re,{id:"actions",header:"",render:s=>t.jsxs(Te,{children:[t.jsx($e,{asChild:!0,children:t.jsx(E,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Ft,children:t.jsx(ze,{size:20})})}),t.jsxs(Ae,{align:"end",onClick:Et,children:[t.jsxs(he,{onClick:a=>{a.stopPropagation(),r({to:"/$org/mcps/$connectionId",params:{org:n.slug,connectionId:s.id}})},children:[t.jsx(Pe,{size:16}),"Inspect"]}),t.jsxs(he,{variant:"destructive",onClick:a=>{a.stopPropagation(),m({type:"delete",connection:s})},children:[t.jsx(Ee,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"}],e[38]=r,e[39]=n.slug,e[40]=le):le=e[40];const Ce=le;let h;e[41]!==r||e[42]!==n.slug?(h=t.jsx(E,{variant:"outline",onClick:()=>r({to:"/$org/store",params:{org:n.slug}}),size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",children:"Browse Store"}),e[41]=r,e[42]=n.slug,e[43]=h):h=e[43];let f;e[44]!==ge?(f=t.jsx(E,{onClick:ge,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",children:"Connect MCP Server"}),e[44]=ge,e[45]=f):f=e[45];let ce;e[46]!==h||e[47]!==f?(ce=t.jsxs("div",{className:"flex items-center gap-2",children:[h,f]}),e[46]=h,e[47]=f,e[48]=ce):ce=e[48];const _e=ce,Se=W||c.mode==="editing",ye=l?"Edit Connection":"Create New Connection";let g;e[49]!==ye?(g=t.jsx(ut,{children:ye}),e[49]=ye,e[50]=g):g=e[50];const ve=l?"Update the connection details below.":"Add a new connection to your organization. Fill in the details below.";let x;e[51]!==ve?(x=t.jsx(pt,{children:ve}),e[51]=ve,e[52]=x):x=e[52];let j;e[53]!==g||e[54]!==x?(j=t.jsxs(ht,{children:[g,x]}),e[53]=g,e[54]=x,e[55]=j):j=e[55];let C;e[56]!==i||e[57]!==je?(C=i.handleSubmit(je),e[56]=i,e[57]=je,e[58]=C):C=e[58];let _;e[59]!==i.control?(_=t.jsxs("div",{className:"grid gap-4 py-4",children:[t.jsx(K,{control:i.control,name:"title",render:zt}),t.jsx(K,{control:i.control,name:"description",render:At}),t.jsx(K,{control:i.control,name:"connection_type",render:$t}),t.jsx(K,{control:i.control,name:"connection_url",render:Tt}),t.jsx(K,{control:i.control,name:"connection_token",render:Pt})]}),e[59]=i.control,e[60]=_):_=e[60];let S;e[61]!==p?(S=t.jsx(E,{type:"button",variant:"outline",onClick:()=>p(!1),children:"Cancel"}),e[61]=p,e[62]=S):S=e[62];const we=i.formState.isSubmitting?"Saving...":l?"Update Connection":"Create Connection";let y;e[63]!==i.formState.isSubmitting||e[64]!==we?(y=t.jsx(E,{type:"submit",disabled:i.formState.isSubmitting,className:"min-w-40",children:we}),e[63]=i.formState.isSubmitting,e[64]=we,e[65]=y):y=e[65];let v;e[66]!==S||e[67]!==y?(v=t.jsxs(ft,{children:[S,y]}),e[66]=S,e[67]=y,e[68]=v):v=e[68];let w;e[69]!==C||e[70]!==_||e[71]!==v?(w=t.jsxs("form",{onSubmit:C,children:[_,v]}),e[69]=C,e[70]=_,e[71]=v,e[72]=w):w=e[72];let b;e[73]!==i||e[74]!==w?(b=t.jsx(jt,{...i,children:w}),e[73]=i,e[74]=w,e[75]=b):b=e[75];let D;e[76]!==j||e[77]!==b?(D=t.jsxs(gt,{className:"sm:max-w-[525px]",children:[j,b]}),e[76]=j,e[77]=b,e[78]=D):D=e[78];let k;e[79]!==p||e[80]!==Se||e[81]!==D?(k=t.jsx(xt,{open:Se,onOpenChange:p,children:D}),e[79]=p,e[80]=Se,e[81]=D,e[82]=k):k=e[82];const be=c.mode==="deleting";let ae;e[83]===Symbol.for("react.memo_cache_sentinel")?(ae=s=>!s&&m({type:"close"}),e[83]=ae):ae=e[83];let de;e[84]===Symbol.for("react.memo_cache_sentinel")?(de=t.jsx(ot,{children:"Delete Connection?"}),e[84]=de):de=e[84];const De=c.mode==="deleting"&&c.connection.title;let N;e[85]!==De?(N=t.jsxs(st,{children:[de,t.jsxs(it,{children:["This action cannot be undone. This will permanently delete"," ",t.jsx("span",{className:"font-medium text-foreground",children:De}),"."]})]}),e[85]=De,e[86]=N):N=e[86];let me;e[87]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(rt,{children:"Cancel"}),e[87]=me):me=e[87];let M;e[88]!==xe?(M=t.jsxs(lt,{children:[me,t.jsx(ct,{onClick:xe,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[88]=xe,e[89]=M):M=e[89];let I;e[90]!==N||e[91]!==M?(I=t.jsxs(at,{children:[N,M]}),e[90]=N,e[91]=M,e[92]=I):I=e[92];let P;e[93]!==be||e[94]!==I?(P=t.jsx(dt,{open:be,onOpenChange:ae,children:I}),e[93]=be,e[94]=I,e[95]=P):P=e[95];let ue;e[96]===Symbol.for("react.memo_cache_sentinel")?(ue=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"connection_type",label:"Type"},{id:"status",label:"Status"}],e[96]=ue):ue=e[96];let T;e[97]!==_e||e[98]!==o.handleSort||e[99]!==o.setViewMode||e[100]!==o.sortDirection||e[101]!==o.sortKey||e[102]!==o.viewMode?(T=t.jsx(We,{title:"MCP Servers",viewMode:o.viewMode,onViewModeChange:o.setViewMode,sortKey:o.sortKey,sortDirection:o.sortDirection,onSort:o.handleSort,sortOptions:ue,ctaButton:_e}),e[97]=_e,e[98]=o.handleSort,e[99]=o.setViewMode,e[100]=o.sortDirection,e[101]=o.sortKey,e[102]=o.viewMode,e[103]=T):T=e[103];let $;e[104]!==o?($=s=>{s.key==="Escape"&&(o.setSearch(""),s.target.blur())},e[104]=o,e[105]=$):$=e[105];let A;e[106]!==o.search||e[107]!==o.setSearch||e[108]!==$?(A=t.jsx(Ge,{value:o.search,onChange:o.setSearch,placeholder:"Search for an MCP Server...",onKeyDown:$}),e[106]=o.search,e[107]=o.setSearch,e[108]=$,e[109]=A):A=e[109];let z;e[110]!==Ce||e[111]!==F||e[112]!==o.handleSort||e[113]!==o.search||e[114]!==o.sortDirection||e[115]!==o.sortKey||e[116]!==o.viewMode||e[117]!==r||e[118]!==n.slug?(z=o.viewMode==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:F.length===0?t.jsx(ke,{image:t.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:500,height:223,"aria-hidden":"true"}),title:(o.search,"No MCP Servers found"),description:o.search?`No MCP Servers match "${o.search}"`:"Create a connection to get started."}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:F.map(s=>t.jsx(Qe,{connection:s,fallbackIcon:t.jsx(Ke,{}),onClick:()=>r({to:"/$org/mcps/$connectionId",params:{org:n.slug,connectionId:s.id}}),headerActions:t.jsxs(Te,{children:[t.jsx($e,{asChild:!0,children:t.jsx(E,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:It,children:t.jsx(ze,{size:20})})}),t.jsxs(Ae,{align:"end",onClick:Mt,children:[t.jsxs(he,{onClick:a=>{a.stopPropagation(),r({to:"/$org/mcps/$connectionId",params:{org:n.slug,connectionId:s.id}})},children:[t.jsx(Pe,{size:16}),"Inspect"]}),t.jsxs(he,{variant:"destructive",onClick:a=>{a.stopPropagation(),m({type:"delete",connection:s})},children:[t.jsx(Ee,{size:16}),"Delete"]})]})]})},s.id))})}):t.jsx(Je,{columns:Ce,data:F,isLoading:!1,sortKey:o.sortKey,sortDirection:o.sortDirection,onSort:o.handleSort,onRowClick:s=>r({to:"/$org/mcps/$connectionId",params:{org:n.slug,connectionId:s.id}}),emptyState:o.search?t.jsx(ke,{image:t.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:500,height:223,"aria-hidden":"true"}),title:"No MCP Servers found",description:`No MCP Servers match "${o.search}"`}):t.jsx(ke,{image:t.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:500,height:223,"aria-hidden":"true"}),title:"No MCP Servers found",description:"Create a connection to get started."})}),e[110]=Ce,e[111]=F,e[112]=o.handleSort,e[113]=o.search,e[114]=o.sortDirection,e[115]=o.sortKey,e[116]=o.viewMode,e[117]=r,e[118]=n.slug,e[119]=z):z=e[119];let pe;return e[120]!==k||e[121]!==P||e[122]!==T||e[123]!==A||e[124]!==z?(pe=t.jsxs(qe,{children:[k,P,T,A,z]}),e[120]=k,e[121]=P,e[122]=T,e[123]=A,e[124]=z,e[125]=pe):pe=e[125],pe}function Mt(e){return e.stopPropagation()}function It(e){return e.stopPropagation()}function Pt(e){const{field:n}=e;return t.jsxs(B,{children:[t.jsx(H,{children:"Token (optional)"}),t.jsx(O,{children:t.jsx(Ie,{type:"password",placeholder:"Bearer token or API key",...n,value:n.value??""})}),t.jsx(R,{})]})}function Tt(e){const{field:n}=e;return t.jsxs(B,{children:[t.jsx(H,{children:"URL *"}),t.jsx(O,{children:t.jsx(Ie,{placeholder:"https://example.com/mcp",...n})}),t.jsx(R,{})]})}function $t(e){const{field:n}=e;return t.jsxs(B,{children:[t.jsx(H,{children:"Type *"}),t.jsxs(_t,{value:n.value,onValueChange:n.onChange,children:[t.jsx(O,{children:t.jsx(St,{children:t.jsx(yt,{})})}),t.jsxs(vt,{children:[t.jsx(Ne,{value:"HTTP",children:"HTTP"}),t.jsx(Ne,{value:"SSE",children:"SSE"}),t.jsx(Ne,{value:"Websocket",children:"Websocket"})]})]}),t.jsx(R,{})]})}function At(e){const{field:n}=e;return t.jsxs(B,{children:[t.jsx(H,{children:"Description"}),t.jsx(O,{children:t.jsx(wt,{placeholder:"A brief description of this connection",rows:3,...n,value:n.value??""})}),t.jsx(R,{})]})}function zt(e){const{field:n}=e;return t.jsxs(B,{children:[t.jsx(H,{children:"Name *"}),t.jsx(O,{children:t.jsx(Ie,{placeholder:"My Connection",...n})}),t.jsx(R,{})]})}function Et(e){return e.stopPropagation()}function Ft(e){return e.stopPropagation()}function Kt(e){return t.jsx(mt,{variant:e.status==="active"?"success":"outline",children:e.status})}function Bt(e){return t.jsx("span",{className:"text-sm text-muted-foreground block truncate",children:e.connection_url})}function Ht(e){return t.jsx("span",{className:"text-sm font-medium",children:e.connection_type})}function Ot(e){return t.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:e.description||"—"})}function Rt(e){return t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:e.title})}function Vt(e){return t.jsx(et,{icon:e.icon,name:e.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:t.jsx(Ke,{})})}function vn(){const e=Fe.c(1);let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(Xe,{children:t.jsx(Me.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Ct,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Nt,{})})}),e[0]=n):n=e[0],n}export{vn as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{F as te,aj as Ae}from"./index-DDrssUsd.js";function fn(){return fn=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var a=arguments[n];for(var t in a)({}).hasOwnProperty.call(a,t)&&(e[t]=a[t])}return e},fn.apply(null,arguments)}function bt(e,n){if(e==null)return{};var a={};for(var t in e)if({}.hasOwnProperty.call(e,t)){if(n.indexOf(t)!==-1)continue;a[t]=e[t]}return a}function wt(e,n){if(e==null)return{};var a,t,c=bt(e,n);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(e);for(t=0;t<d.length;t++)a=d[t],n.indexOf(a)===-1&&{}.propertyIsEnumerable.call(e,a)&&(c[a]=e[a])}return c}function dn(e,n){(n==null||n>e.length)&&(n=e.length);for(var a=0,t=Array(n);a<n;a++)t[a]=e[a];return t}function xt(e){if(Array.isArray(e))return dn(e)}function St(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kt(e,n){if(e){if(typeof e=="string")return dn(e,n);var a={}.toString.call(e).slice(8,-1);return a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set"?Array.from(e):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?dn(e,n):void 0}}function At(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pn(e){return xt(e)||St(e)||kt(e)||At()}function me(e){"@babel/helpers - typeof";return me=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},me(e)}function Ct(e,n){if(me(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var t=a.call(e,n);if(me(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function Ft(e){var n=Ct(e,"string");return me(n)=="symbol"?n:n+""}function it(e,n,a){return(n=Ft(n))in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}function Sn(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),a.push.apply(a,t)}return a}function pe(e){for(var n=1;n<arguments.length;n++){var a=arguments[n]!=null?arguments[n]:{};n%2?Sn(Object(a),!0).forEach(function(t){it(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Sn(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}function Lt(e){var n=e.length;if(n===0||n===1)return e;if(n===2)return[e[0],e[1],"".concat(e[0],".").concat(e[1]),"".concat(e[1],".").concat(e[0])];if(n===3)return[e[0],e[1],e[2],"".concat(e[0],".").concat(e[1]),"".concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[0]),"".concat(e[1],".").concat(e[2]),"".concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[1],".").concat(e[0])];if(n>=4)return[e[0],e[1],e[2],e[3],"".concat(e[0],".").concat(e[1]),"".concat(e[0],".").concat(e[2]),"".concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[0]),"".concat(e[1],".").concat(e[2]),"".concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[1]),"".concat(e[2],".").concat(e[3]),"".concat(e[3],".").concat(e[0]),"".concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[0]),"".concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[1],".").concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[2],".").concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[3],".").concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[2],".").concat(e[1],".").concat(e[0])]}var Ee={};function Nt(e){if(e.length===0||e.length===1)return e;var n=e.join(".");return Ee[n]||(Ee[n]=Lt(e)),Ee[n]}function Ot(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0,t=e.filter(function(d){return d!=="token"}),c=Nt(t);return c.reduce(function(d,g){return pe(pe({},d),a[g])},n)}function kn(e){return e.join(" ")}function Tt(e,n){var a=0;return function(t){return a+=1,t.map(function(c,d){return lt({node:c,stylesheet:e,useInlineStyles:n,key:"code-segment-".concat(a,"-").concat(d)})})}}function lt(e){var n=e.node,a=e.stylesheet,t=e.style,c=t===void 0?{}:t,d=e.useInlineStyles,g=e.key,o=n.properties,h=n.type,k=n.tagName,A=n.value;if(h==="text")return A;if(k){var m=Tt(a,d),b;if(!d)b=pe(pe({},o),{},{className:kn(o.className)});else{var y=Object.keys(a).reduce(function(F,l){return l.split(".").forEach(function(i){F.includes(i)||F.push(i)}),F},[]),w=o.className&&o.className.includes("token")?["token"]:[],x=o.className&&w.concat(o.className.filter(function(F){return!y.includes(F)}));b=pe(pe({},o),{},{className:kn(x)||void 0,style:Ot(o.className,Object.assign({},o.style,c),a)})}var S=m(n.children);return te.createElement(k,fn({key:g},b),S)}}const Et=(function(e,n){var a=e.listLanguages();return a.indexOf(n)!==-1});var qt=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function An(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),a.push.apply(a,t)}return a}function ae(e){for(var n=1;n<arguments.length;n++){var a=arguments[n]!=null?arguments[n]:{};n%2?An(Object(a),!0).forEach(function(t){it(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):An(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}var jt=/\n/g;function $t(e){return e.match(jt)}function It(e){var n=e.lines,a=e.startingLineNumber,t=e.style;return n.map(function(c,d){var g=d+a;return te.createElement("span",{key:"line-".concat(d),className:"react-syntax-highlighter-line-number",style:typeof t=="function"?t(g):t},"".concat(g,`
|
|
3
|
+
`))})}function Pt(e){var n=e.codeString,a=e.codeStyle,t=e.containerStyle,c=t===void 0?{float:"left",paddingRight:"10px"}:t,d=e.numberStyle,g=d===void 0?{}:d,o=e.startingLineNumber;return te.createElement("code",{style:Object.assign({},a,c)},It({lines:n.replace(/\n$/,"").split(`
|
|
4
|
+
`),style:g,startingLineNumber:o}))}function Rt(e){return"".concat(e.toString().length,".25em")}function ct(e,n){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:n},children:[{type:"text",value:e}]}}function st(e,n,a){var t={display:"inline-block",minWidth:Rt(a),paddingRight:"1em",textAlign:"right",userSelect:"none"},c=typeof e=="function"?e(n):e,d=ae(ae({},t),c);return d}function ke(e){var n=e.children,a=e.lineNumber,t=e.lineNumberStyle,c=e.largestLineNumber,d=e.showInlineLineNumbers,g=e.lineProps,o=g===void 0?{}:g,h=e.className,k=h===void 0?[]:h,A=e.showLineNumbers,m=e.wrapLongLines,b=e.wrapLines,y=b===void 0?!1:b,w=y?ae({},typeof o=="function"?o(a):o):{};if(w.className=w.className?[].concat(pn(w.className.trim().split(/\s+/)),pn(k)):k,a&&d){var x=st(t,a,c);n.unshift(ct(a,x))}return m&A&&(w.style=ae({display:"flex"},w.style)),{type:"element",tagName:"span",properties:w,children:n}}function ut(e){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],t=0;t<e.length;t++){var c=e[t];if(c.type==="text")a.push(ke({children:[c],className:pn(new Set(n))}));else if(c.children){var d=n.concat(c.properties.className);ut(c.children,d).forEach(function(g){return a.push(g)})}}return a}function Dt(e,n,a,t,c,d,g,o,h){var k,A=ut(e.value),m=[],b=-1,y=0;function w(u,r){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return ke({children:u,lineNumber:r,lineNumberStyle:o,largestLineNumber:g,showInlineLineNumbers:c,lineProps:a,className:s,showLineNumbers:t,wrapLongLines:h,wrapLines:n})}function x(u,r){if(t&&r&&c){var s=st(o,r,g);u.unshift(ct(r,s))}return u}function S(u,r){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return n||s.length>0?w(u,r,s):x(u,r)}for(var F=function(){var r=A[y],s=r.children[0].value,v=$t(s);if(v){var f=s.split(`
|
|
5
|
+
`);f.forEach(function(L,C){var q=t&&m.length+d,_={type:"text",value:"".concat(L,`
|
|
6
|
+
`)};if(C===0){var B=A.slice(b+1,y).concat(ke({children:[_],className:r.properties.className})),K=S(B,q);m.push(K)}else if(C===f.length-1){var G=A[y+1]&&A[y+1].children&&A[y+1].children[0],W={type:"text",value:"".concat(L)};if(G){var O=ke({children:[W],className:r.properties.className});A.splice(y+1,0,O)}else{var R=[W],D=S(R,q,r.properties.className);m.push(D)}}else{var z=[_],j=S(z,q,r.properties.className);m.push(j)}}),b=y}y++};y<A.length;)F();if(b!==A.length-1){var l=A.slice(b+1,A.length);if(l&&l.length){var i=t&&m.length+d,p=S(l,i);m.push(p)}}return n?m:(k=[]).concat.apply(k,m)}function Mt(e){var n=e.rows,a=e.stylesheet,t=e.useInlineStyles;return n.map(function(c,d){return lt({node:c,stylesheet:a,useInlineStyles:t,key:"code-segment-".concat(d)})})}function ft(e){return e&&typeof e.highlightAuto<"u"}function _t(e){var n=e.astGenerator,a=e.language,t=e.code,c=e.defaultCodeValue;if(ft(n)){var d=Et(n,a);return a==="text"?{value:c,language:"text"}:d?n.highlight(a,t):n.highlightAuto(t)}try{return a&&a!=="text"?{value:n.highlight(t,a)}:{value:c}}catch{return{value:c}}}function vo(e,n){return function(t){var c,d,g=t.language,o=t.children,h=t.style,k=h===void 0?n:h,A=t.customStyle,m=A===void 0?{}:A,b=t.codeTagProps,y=b===void 0?{className:g?"language-".concat(g):void 0,style:ae(ae({},k['code[class*="language-"]']),k['code[class*="language-'.concat(g,'"]')])}:b,w=t.useInlineStyles,x=w===void 0?!0:w,S=t.showLineNumbers,F=S===void 0?!1:S,l=t.showInlineLineNumbers,i=l===void 0?!0:l,p=t.startingLineNumber,u=p===void 0?1:p,r=t.lineNumberContainerStyle,s=t.lineNumberStyle,v=s===void 0?{}:s,f=t.wrapLines,L=t.wrapLongLines,C=L===void 0?!1:L,q=t.lineProps,_=q===void 0?{}:q,B=t.renderer,K=t.PreTag,G=K===void 0?"pre":K,W=t.CodeTag,O=W===void 0?"code":W,R=t.code,D=R===void 0?(Array.isArray(o)?o[0]:o)||"":R,z=t.astGenerator,j=wt(t,qt);z=z||e;var N=F?te.createElement(Pt,{containerStyle:r,codeStyle:y.style||{},numberStyle:v,startingLineNumber:u,codeString:D}):null,T=k.hljs||k['pre[class*="language-"]']||{backgroundColor:"#fff"},E=ft(z)?"hljs":"prismjs",H=x?Object.assign({},j,{style:Object.assign({},T,m)}):Object.assign({},j,{className:j.className?"".concat(E," ").concat(j.className):E,style:Object.assign({},m)});if(C?y.style=ae({whiteSpace:"pre-wrap"},y.style):y.style=ae({whiteSpace:"pre"},y.style),!z)return te.createElement(G,H,N,te.createElement(O,y,D));(f===void 0&&B||C)&&(f=!0),B=B||Mt;var M=[{type:"text",value:D}],V=_t({astGenerator:z,language:g,code:D,defaultCodeValue:M});V.language===null&&(V.value=M);var re=(c=(d=D.match(/\n/g))===null||d===void 0?void 0:d.length)!==null&&c!==void 0?c:0,oe=u+re,Q=Dt(V,f,_,F,i,u,oe,v,C);return te.createElement(G,H,te.createElement(O,y,!i&&N,B({rows:Q,stylesheet:k,useInlineStyles:x})))}}var qe,Cn;function zt(){if(Cn)return qe;Cn=1,qe=n;var e=Object.prototype.hasOwnProperty;function n(){for(var a={},t=0;t<arguments.length;t++){var c=arguments[t];for(var d in c)e.call(c,d)&&(a[d]=c[d])}return a}return qe}var je,Fn;function dt(){if(Fn)return je;Fn=1,je=n;var e=n.prototype;e.space=null,e.normal={},e.property={};function n(a,t,c){this.property=a,this.normal=t,c&&(this.space=c)}return je}var $e,Ln;function Ht(){if(Ln)return $e;Ln=1;var e=zt(),n=dt();$e=a;function a(t){for(var c=t.length,d=[],g=[],o=-1,h,k;++o<c;)h=t[o],d.push(h.property),g.push(h.normal),k=h.space;return new n(e.apply(null,d),e.apply(null,g),k)}return $e}var Ie,Nn;function gn(){if(Nn)return Ie;Nn=1,Ie=e;function e(n){return n.toLowerCase()}return Ie}var Pe,On;function pt(){if(On)return Pe;On=1,Pe=n;var e=n.prototype;e.space=null,e.attribute=null,e.property=null,e.boolean=!1,e.booleanish=!1,e.overloadedBoolean=!1,e.number=!1,e.commaSeparated=!1,e.spaceSeparated=!1,e.commaOrSpaceSeparated=!1,e.mustUseProperty=!1,e.defined=!1;function n(a,t){this.property=a,this.attribute=t}return Pe}var Y={},Tn;function vn(){if(Tn)return Y;Tn=1;var e=0;Y.boolean=n(),Y.booleanish=n(),Y.overloadedBoolean=n(),Y.number=n(),Y.spaceSeparated=n(),Y.commaSeparated=n(),Y.commaOrSpaceSeparated=n();function n(){return Math.pow(2,++e)}return Y}var Re,En;function gt(){if(En)return Re;En=1;var e=pt(),n=vn();Re=c,c.prototype=new e,c.prototype.defined=!0;var a=["boolean","booleanish","overloadedBoolean","number","commaSeparated","spaceSeparated","commaOrSpaceSeparated"],t=a.length;function c(g,o,h,k){var A=-1,m;for(d(this,"space",k),e.call(this,g,o);++A<t;)m=a[A],d(this,m,(h&n[m])===n[m])}function d(g,o,h){h&&(g[o]=h)}return Re}var De,qn;function ye(){if(qn)return De;qn=1;var e=gn(),n=dt(),a=gt();De=t;function t(c){var d=c.space,g=c.mustUseProperty||[],o=c.attributes||{},h=c.properties,k=c.transform,A={},m={},b,y;for(b in h)y=new a(b,k(o,b),h[b],d),g.indexOf(b)!==-1&&(y.mustUseProperty=!0),A[b]=y,m[e(b)]=b,m[e(y.attribute)]=b;return new n(A,m,d)}return De}var Me,jn;function Ut(){if(jn)return Me;jn=1;var e=ye();Me=e({space:"xlink",transform:n,properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}});function n(a,t){return"xlink:"+t.slice(5).toLowerCase()}return Me}var _e,$n;function Bt(){if($n)return _e;$n=1;var e=ye();_e=e({space:"xml",transform:n,properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function n(a,t){return"xml:"+t.slice(3).toLowerCase()}return _e}var ze,In;function Wt(){if(In)return ze;In=1,ze=e;function e(n,a){return a in n?n[a]:a}return ze}var He,Pn;function vt(){if(Pn)return He;Pn=1;var e=Wt();He=n;function n(a,t){return e(a,t.toLowerCase())}return He}var Ue,Rn;function Gt(){if(Rn)return Ue;Rn=1;var e=ye(),n=vt();return Ue=e({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:n,properties:{xmlns:null,xmlnsXLink:null}}),Ue}var Be,Dn;function Vt(){if(Dn)return Be;Dn=1;var e=vn(),n=ye(),a=e.booleanish,t=e.number,c=e.spaceSeparated;Be=n({transform:d,properties:{ariaActiveDescendant:null,ariaAtomic:a,ariaAutoComplete:null,ariaBusy:a,ariaChecked:a,ariaColCount:t,ariaColIndex:t,ariaColSpan:t,ariaControls:c,ariaCurrent:null,ariaDescribedBy:c,ariaDetails:null,ariaDisabled:a,ariaDropEffect:c,ariaErrorMessage:null,ariaExpanded:a,ariaFlowTo:c,ariaGrabbed:a,ariaHasPopup:null,ariaHidden:a,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:c,ariaLevel:t,ariaLive:null,ariaModal:a,ariaMultiLine:a,ariaMultiSelectable:a,ariaOrientation:null,ariaOwns:c,ariaPlaceholder:null,ariaPosInSet:t,ariaPressed:a,ariaReadOnly:a,ariaRelevant:null,ariaRequired:a,ariaRoleDescription:c,ariaRowCount:t,ariaRowIndex:t,ariaRowSpan:t,ariaSelected:a,ariaSetSize:t,ariaSort:null,ariaValueMax:t,ariaValueMin:t,ariaValueNow:t,ariaValueText:null,role:null}});function d(g,o){return o==="role"?o:"aria-"+o.slice(4).toLowerCase()}return Be}var We,Mn;function Xt(){if(Mn)return We;Mn=1;var e=vn(),n=ye(),a=vt(),t=e.boolean,c=e.overloadedBoolean,d=e.booleanish,g=e.number,o=e.spaceSeparated,h=e.commaSeparated;return We=n({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:a,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:h,acceptCharset:o,accessKey:o,action:null,allow:null,allowFullScreen:t,allowPaymentRequest:t,allowUserMedia:t,alt:null,as:null,async:t,autoCapitalize:null,autoComplete:o,autoFocus:t,autoPlay:t,capture:t,charSet:null,checked:t,cite:null,className:o,cols:g,colSpan:null,content:null,contentEditable:d,controls:t,controlsList:o,coords:g|h,crossOrigin:null,data:null,dateTime:null,decoding:null,default:t,defer:t,dir:null,dirName:null,disabled:t,download:c,draggable:d,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:t,formTarget:null,headers:o,height:g,hidden:t,high:g,href:null,hrefLang:null,htmlFor:o,httpEquiv:o,id:null,imageSizes:null,imageSrcSet:h,inputMode:null,integrity:null,is:null,isMap:t,itemId:null,itemProp:o,itemRef:o,itemScope:t,itemType:o,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:t,low:g,manifest:null,max:null,maxLength:g,media:null,method:null,min:null,minLength:g,multiple:t,muted:t,name:null,nonce:null,noModule:t,noValidate:t,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextMenu:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:t,optimum:g,pattern:null,ping:o,placeholder:null,playsInline:t,poster:null,preload:null,readOnly:t,referrerPolicy:null,rel:o,required:t,reversed:t,rows:g,rowSpan:g,sandbox:o,scope:null,scoped:t,seamless:t,selected:t,shape:null,size:g,sizes:null,slot:null,span:g,spellCheck:d,src:null,srcDoc:null,srcLang:null,srcSet:h,start:g,step:null,style:null,tabIndex:g,target:null,title:null,translate:null,type:null,typeMustMatch:t,useMap:null,value:d,width:g,wrap:null,align:null,aLink:null,archive:o,axis:null,background:null,bgColor:null,border:g,borderColor:null,bottomMargin:g,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:t,declare:t,event:null,face:null,frame:null,frameBorder:null,hSpace:g,leftMargin:g,link:null,longDesc:null,lowSrc:null,marginHeight:g,marginWidth:g,noResize:t,noHref:t,noShade:t,noWrap:t,object:null,profile:null,prompt:null,rev:null,rightMargin:g,rules:null,scheme:null,scrolling:d,standby:null,summary:null,text:null,topMargin:g,valueType:null,version:null,vAlign:null,vLink:null,vSpace:g,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:t,disableRemotePlayback:t,prefix:null,property:null,results:g,security:null,unselectable:null}}),We}var Ge,_n;function Zt(){if(_n)return Ge;_n=1;var e=Ht(),n=Ut(),a=Bt(),t=Gt(),c=Vt(),d=Xt();return Ge=e([a,n,t,c,d]),Ge}var Ve,zn;function Kt(){if(zn)return Ve;zn=1;var e=gn(),n=gt(),a=pt(),t="data";Ve=o;var c=/^data[-\w.:]+$/i,d=/-[a-z]/g,g=/[A-Z]/g;function o(b,y){var w=e(y),x=y,S=a;return w in b.normal?b.property[b.normal[w]]:(w.length>4&&w.slice(0,4)===t&&c.test(y)&&(y.charAt(4)==="-"?x=h(y):y=k(y),S=n),new S(x,y))}function h(b){var y=b.slice(5).replace(d,m);return t+y.charAt(0).toUpperCase()+y.slice(1)}function k(b){var y=b.slice(4);return d.test(y)?b:(y=y.replace(g,A),y.charAt(0)!=="-"&&(y="-"+y),t+y)}function A(b){return"-"+b.toLowerCase()}function m(b){return b.charAt(1).toUpperCase()}return Ve}var Xe,Hn;function Jt(){if(Hn)return Xe;Hn=1,Xe=n;var e=/[#.]/g;function n(a,t){for(var c=a||"",d=t||"div",g={},o=0,h,k,A;o<c.length;)e.lastIndex=o,A=e.exec(c),h=c.slice(o,A?A.index:c.length),h&&(k?k==="#"?g.id=h:g.className?g.className.push(h):g.className=[h]:d=h,o+=h.length),A&&(k=A[0],o++);return{type:"element",tagName:d,properties:g,children:[]}}return Xe}var xe={},Un;function Yt(){if(Un)return xe;Un=1,xe.parse=t,xe.stringify=c;var e="",n=" ",a=/[ \t\n\r\f]+/g;function t(d){var g=String(d||e).trim();return g===e?[]:g.split(a)}function c(d){return d.join(n).trim()}return xe}var Se={},Bn;function Qt(){if(Bn)return Se;Bn=1,Se.parse=t,Se.stringify=c;var e=",",n=" ",a="";function t(d){for(var g=[],o=String(d||a),h=o.indexOf(e),k=0,A=!1,m;!A;)h===-1&&(h=o.length,A=!0),m=o.slice(k,h).trim(),(m||!A)&&g.push(m),k=h+1,h=o.indexOf(e,k);return g}function c(d,g){var o=g||{},h=o.padLeft===!1?a:n,k=o.padRight?n:a;return d[d.length-1]===a&&(d=d.concat(a)),d.join(k+e+h).trim()}return Se}var Ze,Wn;function ea(){if(Wn)return Ze;Wn=1;var e=Kt(),n=gn(),a=Jt(),t=Yt().parse,c=Qt().parse;Ze=g;var d={}.hasOwnProperty;function g(w,x,S){var F=S?y(S):null;return l;function l(p,u){var r=a(p,x),s=Array.prototype.slice.call(arguments,2),v=r.tagName.toLowerCase(),f;if(r.tagName=F&&d.call(F,v)?F[v]:v,u&&o(u,r)&&(s.unshift(u),u=null),u)for(f in u)i(r.properties,f,u[f]);return k(r.children,s),r.tagName==="template"&&(r.content={type:"root",children:r.children},r.children=[]),r}function i(p,u,r){var s,v,f;r==null||r!==r||(s=e(w,u),v=s.property,f=r,typeof f=="string"&&(s.spaceSeparated?f=t(f):s.commaSeparated?f=c(f):s.commaOrSpaceSeparated&&(f=t(c(f).join(" ")))),v==="style"&&typeof r!="string"&&(f=b(f)),v==="className"&&p.className&&(f=p.className.concat(f)),p[v]=A(s,v,f))}}function o(w,x){return typeof w=="string"||"length"in w||h(x.tagName,w)}function h(w,x){var S=x.type;return w==="input"||!S||typeof S!="string"?!1:typeof x.children=="object"&&"length"in x.children?!0:(S=S.toLowerCase(),w==="button"?S!=="menu"&&S!=="submit"&&S!=="reset"&&S!=="button":"value"in x)}function k(w,x){var S,F;if(typeof x=="string"||typeof x=="number"){w.push({type:"text",value:String(x)});return}if(typeof x=="object"&&"length"in x){for(S=-1,F=x.length;++S<F;)k(w,x[S]);return}if(typeof x!="object"||!("type"in x))throw new Error("Expected node, nodes, or string, got `"+x+"`");w.push(x)}function A(w,x,S){var F,l,i;if(typeof S!="object"||!("length"in S))return m(w,x,S);for(l=S.length,F=-1,i=[];++F<l;)i[F]=m(w,x,S[F]);return i}function m(w,x,S){var F=S;return w.number||w.positiveNumber?!isNaN(F)&&F!==""&&(F=Number(F)):(w.boolean||w.overloadedBoolean)&&typeof F=="string"&&(F===""||n(S)===n(x))&&(F=!0),F}function b(w){var x=[],S;for(S in w)x.push([S,w[S]].join(": "));return x.join("; ")}function y(w){for(var x=w.length,S=-1,F={},l;++S<x;)l=w[S],F[l.toLowerCase()]=l;return F}return Ze}var Ke,Gn;function na(){if(Gn)return Ke;Gn=1;var e=Zt(),n=ea(),a=n(e,"div");return a.displayName="html",Ke=a,Ke}var Je,Vn;function ta(){return Vn||(Vn=1,Je=na()),Je}const aa="Æ",ra="&",oa="Á",ia="Â",la="À",ca="Å",sa="Ã",ua="Ä",fa="©",da="Ç",pa="Ð",ga="É",va="Ê",ha="È",ma="Ë",ya=">",ba="Í",wa="Î",xa="Ì",Sa="Ï",ka="<",Aa="Ñ",Ca="Ó",Fa="Ô",La="Ò",Na="Ø",Oa="Õ",Ta="Ö",Ea='"',qa="®",ja="Þ",$a="Ú",Ia="Û",Pa="Ù",Ra="Ü",Da="Ý",Ma="á",_a="â",za="´",Ha="æ",Ua="à",Ba="&",Wa="å",Ga="ã",Va="ä",Xa="¦",Za="ç",Ka="¸",Ja="¢",Ya="©",Qa="¤",er="°",nr="÷",tr="é",ar="ê",rr="è",or="ð",ir="ë",lr="½",cr="¼",sr="¾",ur=">",fr="í",dr="î",pr="¡",gr="ì",vr="¿",hr="ï",mr="«",yr="<",br="¯",wr="µ",xr="·",Sr=" ",kr="¬",Ar="ñ",Cr="ó",Fr="ô",Lr="ò",Nr="ª",Or="º",Tr="ø",Er="õ",qr="ö",jr="¶",$r="±",Ir="£",Pr='"',Rr="»",Dr="®",Mr="§",_r="",zr="¹",Hr="²",Ur="³",Br="ß",Wr="þ",Gr="×",Vr="ú",Xr="û",Zr="ù",Kr="¨",Jr="ü",Yr="ý",Qr="¥",eo="ÿ",no={AElig:aa,AMP:ra,Aacute:oa,Acirc:ia,Agrave:la,Aring:ca,Atilde:sa,Auml:ua,COPY:fa,Ccedil:da,ETH:pa,Eacute:ga,Ecirc:va,Egrave:ha,Euml:ma,GT:ya,Iacute:ba,Icirc:wa,Igrave:xa,Iuml:Sa,LT:ka,Ntilde:Aa,Oacute:Ca,Ocirc:Fa,Ograve:La,Oslash:Na,Otilde:Oa,Ouml:Ta,QUOT:Ea,REG:qa,THORN:ja,Uacute:$a,Ucirc:Ia,Ugrave:Pa,Uuml:Ra,Yacute:Da,aacute:Ma,acirc:_a,acute:za,aelig:Ha,agrave:Ua,amp:Ba,aring:Wa,atilde:Ga,auml:Va,brvbar:Xa,ccedil:Za,cedil:Ka,cent:Ja,copy:Ya,curren:Qa,deg:er,divide:nr,eacute:tr,ecirc:ar,egrave:rr,eth:or,euml:ir,frac12:lr,frac14:cr,frac34:sr,gt:ur,iacute:fr,icirc:dr,iexcl:pr,igrave:gr,iquest:vr,iuml:hr,laquo:mr,lt:yr,macr:br,micro:wr,middot:xr,nbsp:Sr,not:kr,ntilde:Ar,oacute:Cr,ocirc:Fr,ograve:Lr,ordf:Nr,ordm:Or,oslash:Tr,otilde:Er,ouml:qr,para:jr,plusmn:$r,pound:Ir,quot:Pr,raquo:Rr,reg:Dr,sect:Mr,shy:_r,sup1:zr,sup2:Hr,sup3:Ur,szlig:Br,thorn:Wr,times:Gr,uacute:Vr,ucirc:Xr,ugrave:Zr,uml:Kr,uuml:Jr,yacute:Yr,yen:Qr,yuml:eo},to={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};var Ye,Xn;function ht(){if(Xn)return Ye;Xn=1,Ye=e;function e(n){var a=typeof n=="string"?n.charCodeAt(0):n;return a>=48&&a<=57}return Ye}var Qe,Zn;function ao(){if(Zn)return Qe;Zn=1,Qe=e;function e(n){var a=typeof n=="string"?n.charCodeAt(0):n;return a>=97&&a<=102||a>=65&&a<=70||a>=48&&a<=57}return Qe}var en,Kn;function ro(){if(Kn)return en;Kn=1,en=e;function e(n){var a=typeof n=="string"?n.charCodeAt(0):n;return a>=97&&a<=122||a>=65&&a<=90}return en}var nn,Jn;function oo(){if(Jn)return nn;Jn=1;var e=ro(),n=ht();nn=a;function a(t){return e(t)||n(t)}return nn}var tn,Yn;function io(){if(Yn)return tn;Yn=1;var e,n=59;tn=a;function a(t){var c="&"+t+";",d;return e=e||document.createElement("i"),e.innerHTML=c,d=e.textContent,d.charCodeAt(d.length-1)===n&&t!=="semi"||d===c?!1:d}return tn}var an,Qn;function lo(){if(Qn)return an;Qn=1;var e=no,n=to,a=ht(),t=ao(),c=oo(),d=io();an=R;var g={}.hasOwnProperty,o=String.fromCharCode,h=Function.prototype,k={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},A=9,m=10,b=12,y=32,w=38,x=59,S=60,F=61,l=35,i=88,p=120,u=65533,r="named",s="hexadecimal",v="decimal",f={};f[s]=16,f[v]=10;var L={};L[r]=c,L[v]=a,L[s]=t;var C=1,q=2,_=3,B=4,K=5,G=6,W=7,O={};O[C]="Named character references must be terminated by a semicolon",O[q]="Numeric character references must be terminated by a semicolon",O[_]="Named character references cannot be empty",O[B]="Numeric character references cannot be empty",O[K]="Named character references must be known",O[G]="Numeric character references cannot be disallowed",O[W]="Numeric character references cannot be outside the permissible Unicode range";function R(N,T){var E={},H,M;T||(T={});for(M in k)H=T[M],E[M]=H??k[M];return(E.position.indent||E.position.start)&&(E.indent=E.position.indent||[],E.position=E.position.start),D(N,E)}function D(N,T){var E=T.additional,H=T.nonTerminated,M=T.text,V=T.reference,re=T.warning,oe=T.textContext,Q=T.referenceContext,Ce=T.warningContext,ie=T.position,mt=T.indent||[],Fe=N.length,ee=0,hn=-1,le=ie.column||1,mn=ie.line||1,ce="",Le=[],de,Ne,se,U,ne,I,$,X,be,Oe,ue,ge,fe,J,yn,ve,we,Z,P;for(typeof E=="string"&&(E=E.charCodeAt(0)),ve=he(),X=re?yt:h,ee--,Fe++;++ee<Fe;)if(ne===m&&(le=mt[hn]||1),ne=N.charCodeAt(ee),ne===w){if($=N.charCodeAt(ee+1),$===A||$===m||$===b||$===y||$===w||$===S||$!==$||E&&$===E){ce+=o(ne),le++;continue}for(fe=ee+1,ge=fe,P=fe,$===l?(P=++ge,$=N.charCodeAt(P),$===i||$===p?(J=s,P=++ge):J=v):J=r,de="",ue="",U="",yn=L[J],P--;++P<Fe&&($=N.charCodeAt(P),!!yn($));)U+=o($),J===r&&g.call(e,U)&&(de=U,ue=e[U]);se=N.charCodeAt(P)===x,se&&(P++,Ne=J===r?d(U):!1,Ne&&(de=U,ue=Ne)),Z=1+P-fe,!se&&!H||(U?J===r?(se&&!ue?X(K,1):(de!==U&&(P=ge+de.length,Z=1+P-ge,se=!1),se||(be=de?C:_,T.attribute?($=N.charCodeAt(P),$===F?(X(be,Z),ue=null):c($)?ue=null:X(be,Z)):X(be,Z))),I=ue):(se||X(q,Z),I=parseInt(U,f[J]),z(I)?(X(W,Z),I=o(u)):I in n?(X(G,Z),I=n[I]):(Oe="",j(I)&&X(G,Z),I>65535&&(I-=65536,Oe+=o(I>>>10|55296),I=56320|I&1023),I=Oe+o(I))):J!==r&&X(B,Z)),I?(bn(),ve=he(),ee=P-1,le+=P-fe+1,Le.push(I),we=he(),we.offset++,V&&V.call(Q,I,{start:ve,end:we},N.slice(fe-1,P)),ve=we):(U=N.slice(fe-1,P),ce+=U,le+=U.length,ee=P-1)}else ne===10&&(mn++,hn++,le=0),ne===ne?(ce+=o(ne),le++):bn();return Le.join("");function he(){return{line:mn,column:le,offset:ee+(ie.offset||0)}}function yt(wn,xn){var Te=he();Te.column+=xn,Te.offset+=xn,re.call(Ce,O[wn],Te,wn)}function bn(){ce&&(Le.push(ce),M&&M.call(oe,ce,{start:ve,end:he()}),ce="")}}function z(N){return N>=55296&&N<=57343||N>1114111}function j(N){return N>=1&&N<=8||N===11||N>=13&&N<=31||N>=127&&N<=159||N>=64976&&N<=65007||(N&65535)===65535||(N&65535)===65534}return an}var rn={exports:{}},et;function co(){return et||(et=1,(function(e){var n=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};var a=(function(t){var c=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,d=0,g={},o={manual:t.Prism&&t.Prism.manual,disableWorkerMessageHandler:t.Prism&&t.Prism.disableWorkerMessageHandler,util:{encode:function l(i){return i instanceof h?new h(i.type,l(i.content),i.alias):Array.isArray(i)?i.map(l):i.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(l){return Object.prototype.toString.call(l).slice(8,-1)},objId:function(l){return l.__id||Object.defineProperty(l,"__id",{value:++d}),l.__id},clone:function l(i,p){p=p||{};var u,r;switch(o.util.type(i)){case"Object":if(r=o.util.objId(i),p[r])return p[r];u={},p[r]=u;for(var s in i)i.hasOwnProperty(s)&&(u[s]=l(i[s],p));return u;case"Array":return r=o.util.objId(i),p[r]?p[r]:(u=[],p[r]=u,i.forEach(function(v,f){u[f]=l(v,p)}),u);default:return i}},getLanguage:function(l){for(;l;){var i=c.exec(l.className);if(i)return i[1].toLowerCase();l=l.parentElement}return"none"},setLanguage:function(l,i){l.className=l.className.replace(RegExp(c,"gi"),""),l.classList.add("language-"+i)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(u){var l=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(u.stack)||[])[1];if(l){var i=document.getElementsByTagName("script");for(var p in i)if(i[p].src==l)return i[p]}return null}},isActive:function(l,i,p){for(var u="no-"+i;l;){var r=l.classList;if(r.contains(i))return!0;if(r.contains(u))return!1;l=l.parentElement}return!!p}},languages:{plain:g,plaintext:g,text:g,txt:g,extend:function(l,i){var p=o.util.clone(o.languages[l]);for(var u in i)p[u]=i[u];return p},insertBefore:function(l,i,p,u){u=u||o.languages;var r=u[l],s={};for(var v in r)if(r.hasOwnProperty(v)){if(v==i)for(var f in p)p.hasOwnProperty(f)&&(s[f]=p[f]);p.hasOwnProperty(v)||(s[v]=r[v])}var L=u[l];return u[l]=s,o.languages.DFS(o.languages,function(C,q){q===L&&C!=l&&(this[C]=s)}),s},DFS:function l(i,p,u,r){r=r||{};var s=o.util.objId;for(var v in i)if(i.hasOwnProperty(v)){p.call(i,v,i[v],u||v);var f=i[v],L=o.util.type(f);L==="Object"&&!r[s(f)]?(r[s(f)]=!0,l(f,p,null,r)):L==="Array"&&!r[s(f)]&&(r[s(f)]=!0,l(f,p,v,r))}}},plugins:{},highlightAll:function(l,i){o.highlightAllUnder(document,l,i)},highlightAllUnder:function(l,i,p){var u={callback:p,container:l,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",u),u.elements=Array.prototype.slice.apply(u.container.querySelectorAll(u.selector)),o.hooks.run("before-all-elements-highlight",u);for(var r=0,s;s=u.elements[r++];)o.highlightElement(s,i===!0,u.callback)},highlightElement:function(l,i,p){var u=o.util.getLanguage(l),r=o.languages[u];o.util.setLanguage(l,u);var s=l.parentElement;s&&s.nodeName.toLowerCase()==="pre"&&o.util.setLanguage(s,u);var v=l.textContent,f={element:l,language:u,grammar:r,code:v};function L(q){f.highlightedCode=q,o.hooks.run("before-insert",f),f.element.innerHTML=f.highlightedCode,o.hooks.run("after-highlight",f),o.hooks.run("complete",f),p&&p.call(f.element)}if(o.hooks.run("before-sanity-check",f),s=f.element.parentElement,s&&s.nodeName.toLowerCase()==="pre"&&!s.hasAttribute("tabindex")&&s.setAttribute("tabindex","0"),!f.code){o.hooks.run("complete",f),p&&p.call(f.element);return}if(o.hooks.run("before-highlight",f),!f.grammar){L(o.util.encode(f.code));return}if(i&&t.Worker){var C=new Worker(o.filename);C.onmessage=function(q){L(q.data)},C.postMessage(JSON.stringify({language:f.language,code:f.code,immediateClose:!0}))}else L(o.highlight(f.code,f.grammar,f.language))},highlight:function(l,i,p){var u={code:l,grammar:i,language:p};if(o.hooks.run("before-tokenize",u),!u.grammar)throw new Error('The language "'+u.language+'" has no grammar.');return u.tokens=o.tokenize(u.code,u.grammar),o.hooks.run("after-tokenize",u),h.stringify(o.util.encode(u.tokens),u.language)},tokenize:function(l,i){var p=i.rest;if(p){for(var u in p)i[u]=p[u];delete i.rest}var r=new m;return b(r,r.head,l),A(l,r,i,r.head,0),w(r)},hooks:{all:{},add:function(l,i){var p=o.hooks.all;p[l]=p[l]||[],p[l].push(i)},run:function(l,i){var p=o.hooks.all[l];if(!(!p||!p.length))for(var u=0,r;r=p[u++];)r(i)}},Token:h};t.Prism=o;function h(l,i,p,u){this.type=l,this.content=i,this.alias=p,this.length=(u||"").length|0}h.stringify=function l(i,p){if(typeof i=="string")return i;if(Array.isArray(i)){var u="";return i.forEach(function(L){u+=l(L,p)}),u}var r={type:i.type,content:l(i.content,p),tag:"span",classes:["token",i.type],attributes:{},language:p},s=i.alias;s&&(Array.isArray(s)?Array.prototype.push.apply(r.classes,s):r.classes.push(s)),o.hooks.run("wrap",r);var v="";for(var f in r.attributes)v+=" "+f+'="'+(r.attributes[f]||"").replace(/"/g,""")+'"';return"<"+r.tag+' class="'+r.classes.join(" ")+'"'+v+">"+r.content+"</"+r.tag+">"};function k(l,i,p,u){l.lastIndex=i;var r=l.exec(p);if(r&&u&&r[1]){var s=r[1].length;r.index+=s,r[0]=r[0].slice(s)}return r}function A(l,i,p,u,r,s){for(var v in p)if(!(!p.hasOwnProperty(v)||!p[v])){var f=p[v];f=Array.isArray(f)?f:[f];for(var L=0;L<f.length;++L){if(s&&s.cause==v+","+L)return;var C=f[L],q=C.inside,_=!!C.lookbehind,B=!!C.greedy,K=C.alias;if(B&&!C.pattern.global){var G=C.pattern.toString().match(/[imsuy]*$/)[0];C.pattern=RegExp(C.pattern.source,G+"g")}for(var W=C.pattern||C,O=u.next,R=r;O!==i.tail&&!(s&&R>=s.reach);R+=O.value.length,O=O.next){var D=O.value;if(i.length>l.length)return;if(!(D instanceof h)){var z=1,j;if(B){if(j=k(W,R,l,_),!j||j.index>=l.length)break;var H=j.index,N=j.index+j[0].length,T=R;for(T+=O.value.length;H>=T;)O=O.next,T+=O.value.length;if(T-=O.value.length,R=T,O.value instanceof h)continue;for(var E=O;E!==i.tail&&(T<N||typeof E.value=="string");E=E.next)z++,T+=E.value.length;z--,D=l.slice(R,T),j.index-=R}else if(j=k(W,0,D,_),!j)continue;var H=j.index,M=j[0],V=D.slice(0,H),re=D.slice(H+M.length),oe=R+D.length;s&&oe>s.reach&&(s.reach=oe);var Q=O.prev;V&&(Q=b(i,Q,V),R+=V.length),y(i,Q,z);var Ce=new h(v,q?o.tokenize(M,q):M,K,M);if(O=b(i,Q,Ce),re&&b(i,O,re),z>1){var ie={cause:v+","+L,reach:oe};A(l,i,p,O.prev,R,ie),s&&ie.reach>s.reach&&(s.reach=ie.reach)}}}}}}function m(){var l={value:null,prev:null,next:null},i={value:null,prev:l,next:null};l.next=i,this.head=l,this.tail=i,this.length=0}function b(l,i,p){var u=i.next,r={value:p,prev:i,next:u};return i.next=r,u.prev=r,l.length++,r}function y(l,i,p){for(var u=i.next,r=0;r<p&&u!==l.tail;r++)u=u.next;i.next=u,u.prev=i,l.length-=r}function w(l){for(var i=[],p=l.head.next;p!==l.tail;)i.push(p.value),p=p.next;return i}if(!t.document)return t.addEventListener&&(o.disableWorkerMessageHandler||t.addEventListener("message",function(l){var i=JSON.parse(l.data),p=i.language,u=i.code,r=i.immediateClose;t.postMessage(o.highlight(u,o.languages[p],p)),r&&t.close()},!1)),o;var x=o.util.currentScript();x&&(o.filename=x.src,x.hasAttribute("data-manual")&&(o.manual=!0));function S(){o.manual||o.highlightAll()}if(!o.manual){var F=document.readyState;F==="loading"||F==="interactive"&&x&&x.defer?document.addEventListener("DOMContentLoaded",S):window.requestAnimationFrame?window.requestAnimationFrame(S):window.setTimeout(S,16)}return o})(n);e.exports&&(e.exports=a),typeof Ae<"u"&&(Ae.Prism=a)})(rn)),rn.exports}var on,nt;function so(){if(nt)return on;nt=1,on=e,e.displayName="markup",e.aliases=["html","mathml","svg","xml","ssml","atom","rss"];function e(n){n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(a){a.type==="entity"&&(a.attributes.title=a.content.value.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(t,c){var d={};d["language-"+c]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[c]},d.cdata=/^<!\[CDATA\[|\]\]>$/i;var g={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:d}};g["language-"+c]={pattern:/[\s\S]+/,inside:n.languages[c]};var o={};o[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:g},n.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(a,t){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+a+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:n.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml}return on}var ln,tt;function uo(){if(tt)return ln;tt=1,ln=e,e.displayName="css",e.aliases=[];function e(n){(function(a){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;a.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},a.languages.css.atrule.inside.rest=a.languages.css;var c=a.languages.markup;c&&(c.tag.addInlined("style","css"),c.tag.addAttribute("style","css"))})(n)}return ln}var cn,at;function fo(){if(at)return cn;at=1,cn=e,e.displayName="clike",e.aliases=[];function e(n){n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}return cn}var sn,rt;function po(){if(rt)return sn;rt=1,sn=e,e.displayName="javascript",e.aliases=["js"];function e(n){n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript}return sn}var un,ot;function ho(){if(ot)return un;ot=1;var e=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof Ae=="object"?Ae:{},n=u();e.Prism={manual:!0,disableWorkerMessageHandler:!0};var a=ta(),t=lo(),c=co(),d=so(),g=uo(),o=fo(),h=po();n();var k={}.hasOwnProperty;function A(){}A.prototype=c;var m=new A;un=m,m.highlight=w,m.register=b,m.alias=y,m.registered=x,m.listLanguages=S,b(d),b(g),b(o),b(h),m.util.encode=i,m.Token.stringify=F;function b(r){if(typeof r!="function"||!r.displayName)throw new Error("Expected `function` for `grammar`, got `"+r+"`");m.languages[r.displayName]===void 0&&r(m)}function y(r,s){var v=m.languages,f=r,L,C,q,_;s&&(f={},f[r]=s);for(L in f)for(C=f[L],C=typeof C=="string"?[C]:C,q=C.length,_=-1;++_<q;)v[C[_]]=v[L]}function w(r,s){var v=c.highlight,f;if(typeof r!="string")throw new Error("Expected `string` for `value`, got `"+r+"`");if(m.util.type(s)==="Object")f=s,s=null;else{if(typeof s!="string")throw new Error("Expected `string` for `name`, got `"+s+"`");if(k.call(m.languages,s))f=m.languages[s];else throw new Error("Unknown language: `"+s+"` is not registered")}return v.call(this,r,f,s)}function x(r){if(typeof r!="string")throw new Error("Expected `string` for `language`, got `"+r+"`");return k.call(m.languages,r)}function S(){var r=m.languages,s=[],v;for(v in r)k.call(r,v)&&typeof r[v]=="object"&&s.push(v);return s}function F(r,s,v){var f;return typeof r=="string"?{type:"text",value:r}:m.util.type(r)==="Array"?l(r,s):(f={type:r.type,content:m.Token.stringify(r.content,s,v),tag:"span",classes:["token",r.type],attributes:{},language:s,parent:v},r.alias&&(f.classes=f.classes.concat(r.alias)),m.hooks.run("wrap",f),a(f.tag+"."+f.classes.join("."),p(f.attributes),f.content))}function l(r,s){for(var v=[],f=r.length,L=-1,C;++L<f;)C=r[L],C!==""&&C!==null&&C!==void 0&&v.push(C);for(L=-1,f=v.length;++L<f;)C=v[L],v[L]=m.Token.stringify(C,s,v);return v}function i(r){return r}function p(r){var s;for(s in r)r[s]=t(r[s]);return r}function u(){var r="Prism"in e,s=r?e.Prism:void 0;return v;function v(){r?e.Prism=s:delete e.Prism,r=void 0,s=void 0}}return un}export{vo as h,ho as r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{v as D,w as O,c as _,g as N,x as E,y as T,j as r,a as I}from"./index-DDrssUsd.js";import{A as M,a as L,b as R,c as $,d as B,e as V,f as k}from"./alert-dialog-DKN25P9n.js";import{u as q,B as H}from"./button-n-dnBUcs.js";import{F as U,a as G,b as J,c as K,d as P,e as Q,f as W}from"./form-BSFKQpec.js";import{I as X}from"./input-8OLj0EZ_.js";import{S as Y}from"./spinner-CnnM_4YL.js";function A(n){return n.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Z=D({name:O().min(2,"Organization name is required")});function ne(n){const e=_.c(42),{open:o,onOpenChange:l}=n,y=N();let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b={resolver:E(Z),defaultValues:{name:""}},e[0]=b):b=e[0];const t=T(b);let z;e[1]!==y?(z={mutationFn:ee,onSuccess:i=>{const{orgSlug:s}=i;y({to:"/$org",params:{org:s}})}},e[1]=y,e[2]=z):z=e[2];const a=q(z),F=a.error instanceof Error?a.error.message:a.error?"Failed to create organization.":null;let w;e[3]===Symbol.for("react.memo_cache_sentinel")?(w=r.jsxs(R,{children:[r.jsx($,{children:"Create a new organization"}),r.jsx(B,{children:"Set up a new organization to collaborate with others."})]}),e[3]=w):w=e[3];let m;if(e[4]!==a||e[5]!==t){let i;e[7]!==a?(i=s=>a.mutateAsync(s),e[7]=a,e[8]=i):i=e[8],m=t.handleSubmit(i),e[4]=a,e[5]=t,e[6]=m}else m=e[6];let c;e[9]!==t.formState.isSubmitting?(c=i=>{const{field:s}=i;return r.jsxs(J,{children:[r.jsx(K,{children:"Organization Name"}),r.jsx(P,{children:r.jsx(X,{...s,placeholder:"Acme Inc.",disabled:t.formState.isSubmitting})}),r.jsx(Q,{children:"The name of your company or organization"}),s.value&&r.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Organization URL:"," ",r.jsxs("span",{className:"font-mono",children:[typeof window<"u"?globalThis.location.origin:"","/",A(s.value)]})]}),r.jsx(W,{})]})},e[9]=t.formState.isSubmitting,e[10]=c):c=e[10];let g;e[11]!==t.control||e[12]!==c?(g=r.jsx(U,{control:t.control,name:"name",render:c}),e[11]=t.control,e[12]=c,e[13]=g):g=e[13];let f;e[14]!==F?(f=F&&r.jsx("div",{className:"text-destructive text-sm mt-2",children:F}),e[14]=F,e[15]=f):f=e[15];let u;e[16]!==a||e[17]!==t?(u=()=>{a.reset(),t.reset()},e[16]=a,e[17]=t,e[18]=u):u=e[18];let d;e[19]!==t.formState.isSubmitting||e[20]!==u?(d=r.jsx(M,{disabled:t.formState.isSubmitting,onClick:u,children:"Cancel"}),e[19]=t.formState.isSubmitting,e[20]=u,e[21]=d):d=e[21];const v=!t.formState.isValid||t.formState.isSubmitting;let p;e[22]!==t.formState.isSubmitting?(p=t.formState.isSubmitting?r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx(Y,{size:"xs"})," Creating..."]}):"Create Organization",e[22]=t.formState.isSubmitting,e[23]=p):p=e[23];let x;e[24]!==v||e[25]!==p?(x=r.jsx(H,{type:"submit",variant:"default",disabled:v,children:p}),e[24]=v,e[25]=p,e[26]=x):x=e[26];let S;e[27]!==x||e[28]!==d?(S=r.jsxs(V,{children:[d,x]}),e[27]=x,e[28]=d,e[29]=S):S=e[29];let h;e[30]!==S||e[31]!==m||e[32]!==g||e[33]!==f?(h=r.jsxs("form",{className:"space-y-6",onSubmit:m,autoComplete:"off",children:[g,f,S]}),e[30]=S,e[31]=m,e[32]=g,e[33]=f,e[34]=h):h=e[34];let j;e[35]!==t||e[36]!==h?(j=r.jsxs(L,{children:[w,r.jsx(G,{...t,children:h})]}),e[35]=t,e[36]=h,e[37]=j):j=e[37];let C;return e[38]!==l||e[39]!==o||e[40]!==j?(C=r.jsx(k,{open:o,onOpenChange:l,children:j}),e[38]=l,e[39]=o,e[40]=j,e[41]=C):C=e[41],C}async function ee(n){const e=A(n.name);if(!e)throw new Error("Organization slug is invalid");const o=await I.organization.create({name:n.name,slug:e});if(o?.error)throw new Error(o.error.message||"Failed to create organization");const l=o?.data?.slug??e;if(!l)throw new Error("Failed to create organization");return{orgSlug:l}}export{ne as C};
|