@decocms/mesh 2.64.2 → 2.64.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/dist/client/assets/{AlertCircle-CyK0Qw5h.js → AlertCircle-C47UrlAO.js} +1 -1
  2. package/dist/client/assets/{ArrowUp-BzVEz2lB.js → ArrowUp-NpHWyg3u.js} +1 -1
  3. package/dist/client/assets/{Calendar-DtGnvM8B.js → Calendar-B649-aT8.js} +1 -1
  4. package/dist/client/assets/{Check-Dzm8t_lx.js → Check-hF_kXZiK.js} +1 -1
  5. package/dist/client/assets/{CheckCircle-Dq1sA0pv.js → CheckCircle-BIFyDkzk.js} +1 -1
  6. package/dist/client/assets/{ChevronDown-Z3Dyyuvx.js → ChevronDown-CwChLZoe.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-DDdY_PC7.js → ChevronRight-0gQ-Lwyj.js} +1 -1
  8. package/dist/client/assets/{Code01-BWP8EmsE.js → Code01-DSEEeIpb.js} +1 -1
  9. package/dist/client/assets/{Copy01-C6IJYSqu.js → Copy01-BY9LQ_eS.js} +1 -1
  10. package/dist/client/assets/{DotsHorizontal-lop24UEO.js → DotsHorizontal-Bk4oST9u.js} +1 -1
  11. package/dist/client/assets/{DotsVertical-BpzYqYSl.js → DotsVertical-CcQ5Tk1w.js} +1 -1
  12. package/dist/client/assets/{Download01-DkL2eEzP.js → Download01-BY55TLNH.js} +1 -1
  13. package/dist/client/assets/{Edit01-BObRJWWQ.js → Edit01-HUE0OI4J.js} +1 -1
  14. package/dist/client/assets/{File02-D8LncylE.js → File02-DfFeU8B6.js} +1 -1
  15. package/dist/client/assets/{File06-Bwnj0Jvb.js → File06-CV2OmgsQ.js} +1 -1
  16. package/dist/client/assets/{FilterLines-Tzhosng2.js → FilterLines-D6yXcgYG.js} +1 -1
  17. package/dist/client/assets/{Globe02-DudYvjwY.js → Globe02-DqbzCrT0.js} +1 -1
  18. package/dist/client/assets/{Grid01-DB4psHwp.js → Grid01-DshI78vi.js} +1 -1
  19. package/dist/client/assets/{Home02-C9yoONyT.js → Home02-BCiKvL0o.js} +1 -1
  20. package/dist/client/assets/{Image01-BIunU3ME.js → Image01-BR8oz0fK.js} +1 -1
  21. package/dist/client/assets/{Inbox01-Dn_ZLwmj.js → Inbox01-DqHW7WgR.js} +1 -1
  22. package/dist/client/assets/{InfoCircle-p3x1ZyEw.js → InfoCircle-zJUw_W0n.js} +1 -1
  23. package/dist/client/assets/{Key01-Bycaiiyx.js → Key01-Bzha2Tgh.js} +1 -1
  24. package/dist/client/assets/{LinkExternal01-DQ9drSdh.js → LinkExternal01-ybeItDxA.js} +1 -1
  25. package/dist/client/assets/{List-BeVMnZSE.js → List-B7BO0eBJ.js} +1 -1
  26. package/dist/client/assets/{Loading01-DCWQbhnz.js → Loading01-BpkkTLVp.js} +1 -1
  27. package/dist/client/assets/{Lock01-Cnn8kQG1.js → Lock01-D4BGdzZt.js} +1 -1
  28. package/dist/client/assets/{Pin01-WkOPKnTb.js → Pin01-DnWh89mj.js} +1 -1
  29. package/dist/client/assets/{Play-D6BmScpI.js → Play-COkFzcB7.js} +1 -1
  30. package/dist/client/assets/{Plus-CG8dB40n.js → Plus-8ovTaJHc.js} +1 -1
  31. package/dist/client/assets/{SearchMd-BWXZ4bVC.js → SearchMd-SRsVDK9N.js} +1 -1
  32. package/dist/client/assets/{Share07-DSoplUP9.js → Share07-6unHB4nq.js} +1 -1
  33. package/dist/client/assets/{Terminal-CdMAejVo.js → Terminal--fMComVX.js} +1 -1
  34. package/dist/client/assets/{Tool01-BDUyIGto.js → Tool01-BZbzIS2w.js} +1 -1
  35. package/dist/client/assets/{Trash01-C_hJOK44.js → Trash01-BhWwFORM.js} +1 -1
  36. package/dist/client/assets/{Upload01-CnMM-V_T.js → Upload01-B2SsaI_Z.js} +1 -1
  37. package/dist/client/assets/{Users03-DkIVbHWT.js → Users03-8GhqNBdf.js} +1 -1
  38. package/dist/client/assets/{X-8UbCzOSY.js → X-BNK0mLul.js} +1 -1
  39. package/dist/client/assets/{XClose-BDdig6o8.js → XClose-CxBh99Dw.js} +1 -1
  40. package/dist/client/assets/{agent-connections-preview-CC_R-LrZ.js → agent-connections-preview-C9hG7NOc.js} +1 -1
  41. package/dist/client/assets/{agent-detail-yfEWcbsQ.js → agent-detail-2FW7R_Kw.js} +1 -1
  42. package/dist/client/assets/{agents-BLmykWZD.js → agents-DLxYaiBc.js} +1 -1
  43. package/dist/client/assets/{alert-dialog-CHAGlLFb.js → alert-dialog-Cg14vDvh.js} +1 -1
  44. package/dist/client/assets/{auth-catchall-B-Mu7VlE.js → auth-catchall-oZsZy72p.js} +1 -1
  45. package/dist/client/assets/{badge-BMiZ-mom.js → badge-tO1xwt4d.js} +1 -1
  46. package/dist/client/assets/{binder-DC5jbVcK.js → binder-_fA_QfCQ.js} +1 -1
  47. package/dist/client/assets/{breadcrumb-BjHn0dWR.js → breadcrumb-B1KWdwh9.js} +1 -1
  48. package/dist/client/assets/{button-nyR0JH2l.js → button-CWzK0IXA.js} +1 -1
  49. package/dist/client/assets/{card-DVnhjUGd.js → card-uLixd1BQ.js} +1 -1
  50. package/dist/client/assets/{checkbox-TpL0D3NW.js → checkbox-B81riJiI.js} +1 -1
  51. package/dist/client/assets/{circle-alert-D0fEJodr.js → circle-alert-CChO7Clp.js} +1 -1
  52. package/dist/client/assets/{collapsible-DJK4gRv1.js → collapsible-C_w2O0ke.js} +1 -1
  53. package/dist/client/assets/{collection-detail-GbUt_XKS.js → collection-detail-DWdOXH1z.js} +1 -1
  54. package/dist/client/assets/{collection-search-DgJbkAZh.js → collection-search-jBfTOehF.js} +1 -1
  55. package/dist/client/assets/{collection-tab-BTzm3KZ6.js → collection-tab-B_8SPzV6.js} +1 -1
  56. package/dist/client/assets/{collection-table-wrapper-Ad_-F1tG.js → collection-table-wrapper-DtjpsgWF.js} +1 -1
  57. package/dist/client/assets/{collection-tabs-UYd1fkoS.js → collection-tabs-JS9xYoKs.js} +1 -1
  58. package/dist/client/assets/{connect-BCgu89pq.js → connect-qqRP-4pj.js} +1 -1
  59. package/dist/client/assets/{connection-card-ByjFlujM.js → connection-card-CYM4Wn_Y.js} +1 -1
  60. package/dist/client/assets/{connection-detail-CuLe29i_.js → connection-detail-DY6ai_fO.js} +1 -1
  61. package/dist/client/assets/{connections-BKV3JOBI.js → connections-C29FK0Jd.js} +1 -1
  62. package/dist/client/assets/constants-Chp3RuVB.js +1 -0
  63. package/dist/client/assets/constants-DUMQK_Jq.js +1 -0
  64. package/dist/client/assets/{create-organization-dialog-WB_1M15V.js → create-organization-dialog-CNKyQgDY.js} +1 -1
  65. package/dist/client/assets/{dialog-DobMZv-a.js → dialog-BiNw4dY-.js} +1 -1
  66. package/dist/client/assets/{dropdown-menu-BUrC7H_I.js → dropdown-menu-D0wZWcOa.js} +1 -1
  67. package/dist/client/assets/{dynamic-plugin-layout-yJKJv0tx.js → dynamic-plugin-layout-6AKBQQJO.js} +1 -1
  68. package/dist/client/assets/{empty-state-C0f9rz3s.js → empty-state-DrSUCtH7.js} +1 -1
  69. package/dist/client/assets/{empty-state-Z8nGys2S.js → empty-state-yKA0Dnoy.js} +1 -1
  70. package/dist/client/assets/{env-vars-editor-CGiYkoF6.js → env-vars-editor-BXoRftCH.js} +1 -1
  71. package/dist/client/assets/{error-boundary-_n4elsYx.js → error-boundary-DMzArMGc.js} +1 -1
  72. package/dist/client/assets/{extract-connection-data-DS_2GbRy.js → extract-connection-data-Cegvn5cS.js} +1 -1
  73. package/dist/client/assets/{file-browser-BQ5LNDAg.js → file-browser-CJvaY_Ab.js} +2 -2
  74. package/dist/client/assets/{form-8XJyhmpO.js → form-3eNCom8C.js} +1 -1
  75. package/dist/client/assets/{grid-view-D_Aa-emn.js → grid-view-DBknMzh4.js} +1 -1
  76. package/dist/client/assets/{home-uc024wOV.js → home-D-rgYO4-.js} +1 -1
  77. package/dist/client/assets/{index-BQzGssjd.js → index-6SKae0YQ.js} +1 -1
  78. package/dist/client/assets/{index-ZeDSkwHv.js → index-8f9n1Jea.js} +2 -2
  79. package/dist/client/assets/{index-Dl8GoNj7.js → index-BLFsiDnl.js} +1 -1
  80. package/dist/client/assets/{index--OStx8iM.js → index-Bgvel9yL.js} +1 -1
  81. package/dist/client/assets/{index-BAZLm9w0.js → index-DkVMZPZp.js} +2 -2
  82. package/dist/client/assets/{index-Diri8Ct6.js → index-DyvOt7HW.js} +1 -1
  83. package/dist/client/assets/{index-LE1qlbhg.js → index-ssfNqXSw.js} +1 -1
  84. package/dist/client/assets/{infiniteQueryObserver-yv2IwJ75.js → infiniteQueryObserver-BRy8d1pq.js} +1 -1
  85. package/dist/client/assets/{input-DHWQboe4.js → input-BKM3goZw.js} +1 -1
  86. package/dist/client/assets/{layout-DsaX6gcJ.js → layout-B7iU_InR.js} +1 -1
  87. package/dist/client/assets/{localstorage-keys-Ciabbhpd.js → localstorage-keys-DVhuzRr7.js} +1 -1
  88. package/dist/client/assets/{login-BoFTpuW0.js → login-BWXaWv5V.js} +1 -1
  89. package/dist/client/assets/{mcp-oauth-Cik_32Ma.js → mcp-oauth-D7Oz8tNV.js} +1 -1
  90. package/dist/client/assets/{mcp-server-card-C9lXz3j7.js → mcp-server-card-CfIOHPGJ.js} +1 -1
  91. package/dist/client/assets/{mcp-server-detail-CKjLUZ8-.js → mcp-server-detail-C78CCQ6k.js} +2 -2
  92. package/dist/client/assets/{members-B7KaOevg.js → members-duFQ3ptf.js} +1 -1
  93. package/dist/client/assets/{monaco-editor-CyfxpBLo.js → monaco-editor-DcchC01p.js} +1 -1
  94. package/dist/client/assets/{monitoring-71UNkDku.js → monitoring-B7FviaI2.js} +1 -1
  95. package/dist/client/assets/{oauth-callback-B66O8BPw.js → oauth-callback-Cr23Dy5V.js} +1 -1
  96. package/dist/client/assets/{page-CJ03HOIm.js → page-Ad6Sa48d.js} +1 -1
  97. package/dist/client/assets/{page-BTGK2JIy.js → page-D37Vnx0X.js} +1 -1
  98. package/dist/client/assets/{plugin-empty-state-Dn9tQuRR.js → plugin-empty-state-b364WWC7.js} +1 -1
  99. package/dist/client/assets/{plugin-header-CNqlEglT.js → plugin-header-Cf8zeBUs.js} +1 -1
  100. package/dist/client/assets/{plugins-Vjr6K9Js.js → plugins-BH2WU-Ku.js} +1 -1
  101. package/dist/client/assets/{popover-CZsr9YrL.js → popover-C0G-pXcc.js} +1 -1
  102. package/dist/client/assets/{registry-utils-DGqTJkDv.js → registry-utils-DFPURwxl.js} +1 -1
  103. package/dist/client/assets/{resizable-kmnSMXLy.js → resizable-DQrwcKJh.js} +1 -1
  104. package/dist/client/assets/{select-CrjtUXd1.js → select-Df9aMNs1.js} +1 -1
  105. package/dist/client/assets/{settings-BupAfFFs.js → settings-C0Akd5oR.js} +1 -1
  106. package/dist/client/assets/shell-layout-pk6n67Pv.js +12 -0
  107. package/dist/client/assets/{spinner-CQdhmUjg.js → spinner-D8NZVmaU.js} +1 -1
  108. package/dist/client/assets/{store-invite-C-ESgBdT.js → store-invite-B2dM3aW8.js} +1 -1
  109. package/dist/client/assets/{switch-DT-s9pj3.js → switch-Cv7KL0jJ.js} +1 -1
  110. package/dist/client/assets/{table-oiEqEhps.js → table-CWx1lOcJ.js} +1 -1
  111. package/dist/client/assets/{textarea-wjx2NJJH.js → textarea-BQ5-74yh.js} +1 -1
  112. package/dist/client/assets/{tools-list-BIhDDkg5.js → tools-list-BIQssT5E.js} +1 -1
  113. package/dist/client/assets/{typewriter-title-BfWKHlUW.js → typewriter-title-f-tG2rqy.js} +1 -1
  114. package/dist/client/assets/{use-binding-C5bwm3GP.js → use-binding-CDLcDLTQ.js} +1 -1
  115. package/dist/client/assets/{use-connection-k5RUrkjP.js → use-connection-BNgYG_2P.js} +1 -1
  116. package/dist/client/assets/{use-create-virtual-mcp-BfrhVnN1.js → use-create-virtual-mcp-DkV_YHpf.js} +1 -1
  117. package/dist/client/assets/{use-deco-chat-open-BwQGL7z_.js → use-deco-chat-open-LwA291qT.js} +1 -1
  118. package/dist/client/assets/{use-list-state-CCCWL8bD.js → use-list-state-BfUltaaz.js} +1 -1
  119. package/dist/client/assets/{use-mcp-prompts-DeryV1GR.js → use-mcp-prompts-CHXMWYZ1.js} +1 -1
  120. package/dist/client/assets/{use-members-Brv-Zo51.js → use-members-BfS3S-UM.js} +1 -1
  121. package/dist/client/assets/{use-mobile-MoR_lOMO.js → use-mobile-BXQipnb5.js} +1 -1
  122. package/dist/client/assets/{use-organization-settings-DtbIWln6.js → use-organization-settings-DZiQDtex.js} +1 -1
  123. package/dist/client/assets/{use-virtual-mcp-DfnzITXx.js → use-virtual-mcp-CEZ5nKxx.js} +1 -1
  124. package/dist/client/assets/useInfiniteQuery-Do9q2S3P.js +1 -0
  125. package/dist/client/assets/{useMutation-ffySYpQB.js → useMutation-CFQDhqDA.js} +1 -1
  126. package/dist/client/assets/useQuery-BSKCoFrF.js +1 -0
  127. package/dist/client/assets/{view-mode-toggle-DsKf8ZTT.js → view-mode-toggle-Cz9APct2.js} +1 -1
  128. package/dist/client/assets/{workflow-BxPDjOre.js → workflow-CfBvHdI5.js} +1 -1
  129. package/dist/client/index.html +1 -1
  130. package/dist/server/cli.js +227 -198
  131. package/dist/server/migrate.js +210 -181
  132. package/package.json +1 -1
  133. package/dist/client/assets/constants-CJQnv32m.js +0 -1
  134. package/dist/client/assets/constants-DpsR0LZe.js +0 -1
  135. package/dist/client/assets/shell-layout-Ckg9pQSt.js +0 -12
  136. package/dist/client/assets/useInfiniteQuery-5yIodymH.js +0 -1
  137. package/dist/client/assets/useQuery-Da0DsMDg.js +0 -1
@@ -1 +1 @@
1
- import{c as re,j as t,r as Q,u as ne,w as ie}from"./index-BAZLm9w0.js";import{C as ae,a as le}from"./collection-table-wrapper-Ad_-F1tG.js";import{C as ce}from"./collection-search-DgJbkAZh.js";import{P as j}from"./index-LE1qlbhg.js";import{B as de,a as me,b as pe,e as ge}from"./breadcrumb-BjHn0dWR.js";import{C as ue}from"./connection-card-ByjFlujM.js";import{E as G,I as fe}from"./empty-state-Z8nGys2S.js";import{E as he}from"./error-boundary-_n4elsYx.js";import{u as xe,s as X,U as je}from"./use-list-state-CCCWL8bD.js";import{u as Ce}from"./use-create-virtual-mcp-BfrhVnN1.js";import{i as be}from"./constants-CJQnv32m.js";import{b as we,a as ye}from"./use-virtual-mcp-DfnzITXx.js";import{c as De,b as Ne,d as Se,A as _e,e as ke,g as ve,a as Ae,f as $e}from"./alert-dialog-CHAGlLFb.js";import{B as J}from"./button-nyR0JH2l.js";import{D as Y,a as Z,b as ee,c as O}from"./dropdown-menu-BUrC7H_I.js";import{i as te}from"./DotsVertical-BpzYqYSl.js";import{i as Me}from"./Loading01-DCWQbhnz.js";import{s as se}from"./Trash01-C_hJOK44.js";import{t as C}from"./Users03-DkIVbHWT.js";import{A as oe}from"./agent-connections-preview-CC_R-LrZ.js";import{d as Ie}from"./differenceInSeconds-NQ4PDo0z.js";import"./ArrowUp-BzVEz2lB.js";import"./Check-Dzm8t_lx.js";import"./Grid01-DB4psHwp.js";import"./List-BeVMnZSE.js";import"./view-mode-toggle-DsKf8ZTT.js";import"./table-oiEqEhps.js";import"./SearchMd-BWXZ4bVC.js";import"./input-DHWQboe4.js";import"./ChevronRight-DDdY_PC7.js";import"./card-DVnhjUGd.js";import"./useQuery-Da0DsMDg.js";import"./use-mobile-MoR_lOMO.js";import"./use-connection-k5RUrkjP.js";import"./useMutation-ffySYpQB.js";function Pe(e){const o=Ie(new Date,e);return o<60?"<1m":o<3600?`${Math.floor(o/60)}m ago`:o<86400?`${Math.floor(o/3600)}h ago`:o<604800?`${Math.floor(o/86400)}d ago`:o<2592e3?`${Math.floor(o/604800)}w ago`:o<31536e3?`${Math.floor(o/2592e3)}mo ago`:`${Math.floor(o/31536e3)}y ago`}function ze(e,o){switch(o.type){case"delete":return{mode:"deleting",virtualMcp:o.virtualMcp};case"close":return{mode:"idle"}}}function Be(){const e=re.c(65),{org:o}=ne(),i=ie();let b;e[0]!==o.slug?(b={namespace:o.slug,resource:"agents"},e[0]=o.slug,e[1]=b):b=e[1];const s=xe(b),x=we(s);let w;e[2]===Symbol.for("react.memo_cache_sentinel")?(w={navigateOnCreate:!0},e[2]=w):w=e[2];const{createVirtualMCP:R,isCreating:y}=Ce(w),T=ye();let D;e[3]===Symbol.for("react.memo_cache_sentinel")?(D={mode:"idle"},e[3]=D):D=e[3];const[n,N]=Q.useReducer(ze,D);let S;e[4]!==T||e[5]!==n.mode||e[6]!==n.virtualMcp?(S=async()=>{if(n.mode!=="deleting")return;const r=n.virtualMcp.id;if(N({type:"close"}),!(!r||be(r)))try{await T.delete.mutateAsync(r)}catch{}},e[4]=T,e[5]=n.mode,e[6]=n.virtualMcp,e[7]=S):S=e[7];const U=S;let _,k,v,A,$;e[8]===Symbol.for("react.memo_cache_sentinel")?(_={id:"title",header:"Name",render:Fe,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},k={id:"description",header:"Description",render:Le,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},v={id:"connections",header:"Connections",render:Ue,cellClassName:"w-28 shrink-0"},A={id:"updated_by",header:"Updated by",render:Te,cellClassName:"w-32 shrink-0",sortable:!0},$={id:"updated_at",header:"Updated",render:Re,cellClassName:"max-w-24 w-24 shrink-0",sortable:!0},e[8]=_,e[9]=k,e[10]=v,e[11]=A,e[12]=$):(_=e[8],k=e[9],v=e[10],A=e[11],$=e[12]);let M;e[13]!==i||e[14]!==o.slug?(M=[_,k,v,A,$,{id:"actions",header:"",render:r=>t.jsxs(Y,{children:[t.jsx(Z,{asChild:!0,children:t.jsx(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Oe,children:t.jsx(te,{size:20})})}),t.jsxs(ee,{align:"end",onClick:Ee,children:[t.jsxs(O,{onClick:a=>{a.stopPropagation(),i({to:"/$org/agents/$agentId",params:{org:o.slug,agentId:r.id}})},children:[t.jsx(X,{size:16}),"Open"]}),t.jsxs(O,{variant:"destructive",onClick:a=>{a.stopPropagation(),N({type:"delete",virtualMcp:r})},children:[t.jsx(se,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"}],e[13]=i,e[14]=o.slug,e[15]=M):M=e[15];const H=M,L=y?"Creating...":"Create Agent";let I;e[16]!==R||e[17]!==y||e[18]!==L?(I=t.jsx(J,{onClick:R,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:y,children:L}),e[16]=R,e[17]=y,e[18]=L,e[19]=I):I=e[19];const F=I,W=n.mode==="deleting";let P;e[20]===Symbol.for("react.memo_cache_sentinel")?(P=r=>!r&&N({type:"close"}),e[20]=P):P=e[20];let z;e[21]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx(De,{children:"Delete Agent?"}),e[21]=z):z=e[21];const q=n.mode==="deleting"&&n.virtualMcp.title;let l;e[22]!==q?(l=t.jsxs(Ne,{children:[z,t.jsxs(Se,{children:["This action cannot be undone. This will permanently delete"," ",t.jsx("span",{className:"font-medium text-foreground",children:q}),"."]})]}),e[22]=q,e[23]=l):l=e[23];let B;e[24]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx(_e,{children:"Cancel"}),e[24]=B):B=e[24];let c;e[25]!==U?(c=t.jsxs(ke,{children:[B,t.jsx(ve,{onClick:U,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[25]=U,e[26]=c):c=e[26];let d;e[27]!==l||e[28]!==c?(d=t.jsxs(Ae,{children:[l,c]}),e[27]=l,e[28]=c,e[29]=d):d=e[29];let m;e[30]!==W||e[31]!==d?(m=t.jsx($e,{open:W,onOpenChange:P,children:d}),e[30]=W,e[31]=d,e[32]=m):m=e[32];let K;e[33]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx(j.Header.Left,{children:t.jsx(de,{children:t.jsx(me,{children:t.jsx(pe,{children:t.jsx(ge,{children:"Agents"})})})})}),e[33]=K):K=e[33];let V;e[34]===Symbol.for("react.memo_cache_sentinel")?(V=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"updated_by",label:"Updated by"},{id:"updated_at",label:"Updated"}],e[34]=V):V=e[34];let p;e[35]!==s.handleSort||e[36]!==s.setViewMode||e[37]!==s.sortDirection||e[38]!==s.sortKey||e[39]!==s.viewMode?(p=t.jsx(ae,{viewMode:s.viewMode,onViewModeChange:s.setViewMode,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,sortOptions:V}),e[35]=s.handleSort,e[36]=s.setViewMode,e[37]=s.sortDirection,e[38]=s.sortKey,e[39]=s.viewMode,e[40]=p):p=e[40];let g;e[41]!==F||e[42]!==p?(g=t.jsxs(j.Header,{children:[K,t.jsxs(j.Header.Right,{children:[p,F]})]}),e[41]=F,e[42]=p,e[43]=g):g=e[43];let u;e[44]!==s?(u=r=>{r.key==="Escape"&&(s.setSearch(""),r.target.blur())},e[44]=s,e[45]=u):u=e[45];let f;e[46]!==s.search||e[47]!==s.setSearch||e[48]!==u?(f=t.jsx(ce,{value:s.search,onChange:s.setSearch,placeholder:"Search for an agent...",onKeyDown:u}),e[46]=s.search,e[47]=s.setSearch,e[48]=u,e[49]=f):f=e[49];let h;e[50]!==H||e[51]!==s.handleSort||e[52]!==s.search||e[53]!==s.sortDirection||e[54]!==s.sortKey||e[55]!==s.viewMode||e[56]!==i||e[57]!==o.slug||e[58]!==x?(h=t.jsx(j.Content,{children:s.viewMode==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:x.length===0?t.jsx(G,{image:t.jsx(C,{size:36,className:"text-muted-foreground"}),title:s.search?"No agents found":"No agents yet",description:s.search?`No agents match "${s.search}"`:"Create an agent to aggregate tools from multiple Connections."}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:x.map(r=>t.jsx(ue,{connection:{id:r.id??"",title:r.title,description:r.description,icon:r.icon,status:r.status},fallbackIcon:t.jsx(C,{}),onClick:()=>i({to:"/$org/agents/$agentId",params:{org:o.slug,agentId:r.id}}),footer:t.jsx("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:t.jsxs("span",{children:[r.connections.length," connection",r.connections.length!==1?"s":""]})}),headerActions:t.jsxs(Y,{children:[t.jsx(Z,{asChild:!0,children:t.jsx(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Ve,children:t.jsx(te,{size:20})})}),t.jsxs(ee,{align:"end",onClick:Ke,children:[t.jsxs(O,{onClick:a=>{a.stopPropagation(),i({to:"/$org/agents/$agentId",params:{org:o.slug,agentId:r.id}})},children:[t.jsx(X,{size:16}),"Open"]}),t.jsxs(O,{variant:"destructive",onClick:a=>{a.stopPropagation(),N({type:"delete",virtualMcp:r})},children:[t.jsx(se,{size:16}),"Delete"]})]})]})},r.id??"default"))})}):t.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:t.jsx(le,{columns:H,data:x,isLoading:!1,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,onRowClick:r=>i({to:"/$org/agents/$agentId",params:{org:o.slug,agentId:r.id}}),emptyState:s.search?t.jsx(G,{image:t.jsx(C,{size:36,className:"text-muted-foreground"}),title:"No agents found",description:`No agents match "${s.search}"`}):t.jsx(G,{image:t.jsx(C,{size:36,className:"text-muted-foreground"}),title:"No agents yet",description:"Create an agent to aggregate tools from multiple Connections."})})})}),e[50]=H,e[51]=s.handleSort,e[52]=s.search,e[53]=s.sortDirection,e[54]=s.sortKey,e[55]=s.viewMode,e[56]=i,e[57]=o.slug,e[58]=x,e[59]=h):h=e[59];let E;return e[60]!==m||e[61]!==g||e[62]!==f||e[63]!==h?(E=t.jsxs(j,{children:[m,g,f,h]}),e[60]=m,e[61]=g,e[62]=f,e[63]=h,e[64]=E):E=e[64],E}function Ke(e){return e.stopPropagation()}function Ve(e){return e.stopPropagation()}function Ee(e){return e.stopPropagation()}function Oe(e){return e.stopPropagation()}function Re(e){return t.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:e.updated_at?Pe(new Date(e.updated_at)):"—"})}function Te(e){return t.jsx(je,{id:e.updated_by??e.created_by,size:"3xs"})}function Ue(e){return t.jsx(Q.Suspense,{fallback:t.jsx(oe.Fallback,{}),children:t.jsx(oe,{connectionIds:e.connections.map(He),maxVisibleIcons:2})})}function He(e){return e.connection_id}function Le(e){return t.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:e.description||"—"})}function Fe(e){return t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx(fe,{icon:e.icon,name:e.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:t.jsx(C,{size:16})}),t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:e.title})]})}function kt(){const e=re.c(1);let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(he,{children:t.jsx(Q.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Me,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Be,{})})}),e[0]=o):o=e[0],o}export{kt as default};
1
+ import{c as re,j as t,r as Q,u as ne,w as ie}from"./index-DkVMZPZp.js";import{C as ae,a as le}from"./collection-table-wrapper-DtjpsgWF.js";import{C as ce}from"./collection-search-jBfTOehF.js";import{P as j}from"./index-ssfNqXSw.js";import{B as de,a as me,b as pe,e as ge}from"./breadcrumb-B1KWdwh9.js";import{C as ue}from"./connection-card-CYM4Wn_Y.js";import{E as G,I as fe}from"./empty-state-yKA0Dnoy.js";import{E as he}from"./error-boundary-DMzArMGc.js";import{u as xe,s as X,U as je}from"./use-list-state-BfUltaaz.js";import{u as Ce}from"./use-create-virtual-mcp-DkV_YHpf.js";import{i as be}from"./constants-Chp3RuVB.js";import{b as we,a as ye}from"./use-virtual-mcp-CEZ5nKxx.js";import{c as De,b as Ne,d as Se,A as _e,e as ke,g as ve,a as Ae,f as $e}from"./alert-dialog-Cg14vDvh.js";import{B as J}from"./button-CWzK0IXA.js";import{D as Y,a as Z,b as ee,c as O}from"./dropdown-menu-D0wZWcOa.js";import{i as te}from"./DotsVertical-CcQ5Tk1w.js";import{i as Me}from"./Loading01-BpkkTLVp.js";import{s as se}from"./Trash01-BhWwFORM.js";import{t as C}from"./Users03-8GhqNBdf.js";import{A as oe}from"./agent-connections-preview-C9hG7NOc.js";import{d as Ie}from"./differenceInSeconds-NQ4PDo0z.js";import"./ArrowUp-NpHWyg3u.js";import"./Check-hF_kXZiK.js";import"./Grid01-DshI78vi.js";import"./List-B7BO0eBJ.js";import"./view-mode-toggle-Cz9APct2.js";import"./table-CWx1lOcJ.js";import"./SearchMd-SRsVDK9N.js";import"./input-BKM3goZw.js";import"./ChevronRight-0gQ-Lwyj.js";import"./card-uLixd1BQ.js";import"./useQuery-BSKCoFrF.js";import"./use-mobile-BXQipnb5.js";import"./use-connection-BNgYG_2P.js";import"./useMutation-CFQDhqDA.js";function Pe(e){const o=Ie(new Date,e);return o<60?"<1m":o<3600?`${Math.floor(o/60)}m ago`:o<86400?`${Math.floor(o/3600)}h ago`:o<604800?`${Math.floor(o/86400)}d ago`:o<2592e3?`${Math.floor(o/604800)}w ago`:o<31536e3?`${Math.floor(o/2592e3)}mo ago`:`${Math.floor(o/31536e3)}y ago`}function ze(e,o){switch(o.type){case"delete":return{mode:"deleting",virtualMcp:o.virtualMcp};case"close":return{mode:"idle"}}}function Be(){const e=re.c(65),{org:o}=ne(),i=ie();let b;e[0]!==o.slug?(b={namespace:o.slug,resource:"agents"},e[0]=o.slug,e[1]=b):b=e[1];const s=xe(b),x=we(s);let w;e[2]===Symbol.for("react.memo_cache_sentinel")?(w={navigateOnCreate:!0},e[2]=w):w=e[2];const{createVirtualMCP:R,isCreating:y}=Ce(w),T=ye();let D;e[3]===Symbol.for("react.memo_cache_sentinel")?(D={mode:"idle"},e[3]=D):D=e[3];const[n,N]=Q.useReducer(ze,D);let S;e[4]!==T||e[5]!==n.mode||e[6]!==n.virtualMcp?(S=async()=>{if(n.mode!=="deleting")return;const r=n.virtualMcp.id;if(N({type:"close"}),!(!r||be(r)))try{await T.delete.mutateAsync(r)}catch{}},e[4]=T,e[5]=n.mode,e[6]=n.virtualMcp,e[7]=S):S=e[7];const U=S;let _,k,v,A,$;e[8]===Symbol.for("react.memo_cache_sentinel")?(_={id:"title",header:"Name",render:Fe,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},k={id:"description",header:"Description",render:Le,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},v={id:"connections",header:"Connections",render:Ue,cellClassName:"w-28 shrink-0"},A={id:"updated_by",header:"Updated by",render:Te,cellClassName:"w-32 shrink-0",sortable:!0},$={id:"updated_at",header:"Updated",render:Re,cellClassName:"max-w-24 w-24 shrink-0",sortable:!0},e[8]=_,e[9]=k,e[10]=v,e[11]=A,e[12]=$):(_=e[8],k=e[9],v=e[10],A=e[11],$=e[12]);let M;e[13]!==i||e[14]!==o.slug?(M=[_,k,v,A,$,{id:"actions",header:"",render:r=>t.jsxs(Y,{children:[t.jsx(Z,{asChild:!0,children:t.jsx(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Oe,children:t.jsx(te,{size:20})})}),t.jsxs(ee,{align:"end",onClick:Ee,children:[t.jsxs(O,{onClick:a=>{a.stopPropagation(),i({to:"/$org/agents/$agentId",params:{org:o.slug,agentId:r.id}})},children:[t.jsx(X,{size:16}),"Open"]}),t.jsxs(O,{variant:"destructive",onClick:a=>{a.stopPropagation(),N({type:"delete",virtualMcp:r})},children:[t.jsx(se,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"}],e[13]=i,e[14]=o.slug,e[15]=M):M=e[15];const H=M,L=y?"Creating...":"Create Agent";let I;e[16]!==R||e[17]!==y||e[18]!==L?(I=t.jsx(J,{onClick:R,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:y,children:L}),e[16]=R,e[17]=y,e[18]=L,e[19]=I):I=e[19];const F=I,W=n.mode==="deleting";let P;e[20]===Symbol.for("react.memo_cache_sentinel")?(P=r=>!r&&N({type:"close"}),e[20]=P):P=e[20];let z;e[21]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx(De,{children:"Delete Agent?"}),e[21]=z):z=e[21];const q=n.mode==="deleting"&&n.virtualMcp.title;let l;e[22]!==q?(l=t.jsxs(Ne,{children:[z,t.jsxs(Se,{children:["This action cannot be undone. This will permanently delete"," ",t.jsx("span",{className:"font-medium text-foreground",children:q}),"."]})]}),e[22]=q,e[23]=l):l=e[23];let B;e[24]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx(_e,{children:"Cancel"}),e[24]=B):B=e[24];let c;e[25]!==U?(c=t.jsxs(ke,{children:[B,t.jsx(ve,{onClick:U,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[25]=U,e[26]=c):c=e[26];let d;e[27]!==l||e[28]!==c?(d=t.jsxs(Ae,{children:[l,c]}),e[27]=l,e[28]=c,e[29]=d):d=e[29];let m;e[30]!==W||e[31]!==d?(m=t.jsx($e,{open:W,onOpenChange:P,children:d}),e[30]=W,e[31]=d,e[32]=m):m=e[32];let K;e[33]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx(j.Header.Left,{children:t.jsx(de,{children:t.jsx(me,{children:t.jsx(pe,{children:t.jsx(ge,{children:"Agents"})})})})}),e[33]=K):K=e[33];let V;e[34]===Symbol.for("react.memo_cache_sentinel")?(V=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"updated_by",label:"Updated by"},{id:"updated_at",label:"Updated"}],e[34]=V):V=e[34];let p;e[35]!==s.handleSort||e[36]!==s.setViewMode||e[37]!==s.sortDirection||e[38]!==s.sortKey||e[39]!==s.viewMode?(p=t.jsx(ae,{viewMode:s.viewMode,onViewModeChange:s.setViewMode,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,sortOptions:V}),e[35]=s.handleSort,e[36]=s.setViewMode,e[37]=s.sortDirection,e[38]=s.sortKey,e[39]=s.viewMode,e[40]=p):p=e[40];let g;e[41]!==F||e[42]!==p?(g=t.jsxs(j.Header,{children:[K,t.jsxs(j.Header.Right,{children:[p,F]})]}),e[41]=F,e[42]=p,e[43]=g):g=e[43];let u;e[44]!==s?(u=r=>{r.key==="Escape"&&(s.setSearch(""),r.target.blur())},e[44]=s,e[45]=u):u=e[45];let f;e[46]!==s.search||e[47]!==s.setSearch||e[48]!==u?(f=t.jsx(ce,{value:s.search,onChange:s.setSearch,placeholder:"Search for an agent...",onKeyDown:u}),e[46]=s.search,e[47]=s.setSearch,e[48]=u,e[49]=f):f=e[49];let h;e[50]!==H||e[51]!==s.handleSort||e[52]!==s.search||e[53]!==s.sortDirection||e[54]!==s.sortKey||e[55]!==s.viewMode||e[56]!==i||e[57]!==o.slug||e[58]!==x?(h=t.jsx(j.Content,{children:s.viewMode==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:x.length===0?t.jsx(G,{image:t.jsx(C,{size:36,className:"text-muted-foreground"}),title:s.search?"No agents found":"No agents yet",description:s.search?`No agents match "${s.search}"`:"Create an agent to aggregate tools from multiple Connections."}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:x.map(r=>t.jsx(ue,{connection:{id:r.id??"",title:r.title,description:r.description,icon:r.icon,status:r.status},fallbackIcon:t.jsx(C,{}),onClick:()=>i({to:"/$org/agents/$agentId",params:{org:o.slug,agentId:r.id}}),footer:t.jsx("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:t.jsxs("span",{children:[r.connections.length," connection",r.connections.length!==1?"s":""]})}),headerActions:t.jsxs(Y,{children:[t.jsx(Z,{asChild:!0,children:t.jsx(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Ve,children:t.jsx(te,{size:20})})}),t.jsxs(ee,{align:"end",onClick:Ke,children:[t.jsxs(O,{onClick:a=>{a.stopPropagation(),i({to:"/$org/agents/$agentId",params:{org:o.slug,agentId:r.id}})},children:[t.jsx(X,{size:16}),"Open"]}),t.jsxs(O,{variant:"destructive",onClick:a=>{a.stopPropagation(),N({type:"delete",virtualMcp:r})},children:[t.jsx(se,{size:16}),"Delete"]})]})]})},r.id??"default"))})}):t.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:t.jsx(le,{columns:H,data:x,isLoading:!1,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,onRowClick:r=>i({to:"/$org/agents/$agentId",params:{org:o.slug,agentId:r.id}}),emptyState:s.search?t.jsx(G,{image:t.jsx(C,{size:36,className:"text-muted-foreground"}),title:"No agents found",description:`No agents match "${s.search}"`}):t.jsx(G,{image:t.jsx(C,{size:36,className:"text-muted-foreground"}),title:"No agents yet",description:"Create an agent to aggregate tools from multiple Connections."})})})}),e[50]=H,e[51]=s.handleSort,e[52]=s.search,e[53]=s.sortDirection,e[54]=s.sortKey,e[55]=s.viewMode,e[56]=i,e[57]=o.slug,e[58]=x,e[59]=h):h=e[59];let E;return e[60]!==m||e[61]!==g||e[62]!==f||e[63]!==h?(E=t.jsxs(j,{children:[m,g,f,h]}),e[60]=m,e[61]=g,e[62]=f,e[63]=h,e[64]=E):E=e[64],E}function Ke(e){return e.stopPropagation()}function Ve(e){return e.stopPropagation()}function Ee(e){return e.stopPropagation()}function Oe(e){return e.stopPropagation()}function Re(e){return t.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:e.updated_at?Pe(new Date(e.updated_at)):"—"})}function Te(e){return t.jsx(je,{id:e.updated_by??e.created_by,size:"3xs"})}function Ue(e){return t.jsx(Q.Suspense,{fallback:t.jsx(oe.Fallback,{}),children:t.jsx(oe,{connectionIds:e.connections.map(He),maxVisibleIcons:2})})}function He(e){return e.connection_id}function Le(e){return t.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:e.description||"—"})}function Fe(e){return t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx(fe,{icon:e.icon,name:e.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:t.jsx(C,{size:16})}),t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:e.title})]})}function kt(){const e=re.c(1);let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(he,{children:t.jsx(Q.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Me,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Be,{})})}),e[0]=o):o=e[0],o}export{kt as default};
@@ -1,4 +1,4 @@
1
- import{r as p,c as d,j as l,v as T,aX as ee,aY as te,aZ as ae,al as P,a_ as oe,x as se,an as re,E as q,R as le,T as ie,D as ne,y as ce,a$ as F,b0 as de,aq as ge,B as fe,z as pe}from"./index-BAZLm9w0.js";import{c,b as I}from"./button-nyR0JH2l.js";const M=({size:s=24,color:e="currentColor",...t})=>p.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},p.createElement("path",{d:"M20 21c0-1.396 0-2.093-.172-2.661a4 4 0 0 0-2.667-2.667c-.568-.172-1.265-.172-2.661-.172h-5c-1.396 0-2.093 0-2.661.172a4 4 0 0 0-2.667 2.667C4 18.907 4 19.604 4 21M16.5 7.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Z"}));M.displayName="User01";function ue(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=c("relative flex size-8 shrink-0 overflow-hidden rounded-full",t),e[3]=t,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=l.jsx(ae,{"data-slot":"avatar",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function me(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=c("aspect-square size-full",t),e[3]=t,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=l.jsx(ee,{"data-slot":"avatar-image",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function he(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=c("bg-muted flex size-full items-center justify-center rounded-full",t),e[3]=t,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=l.jsx(te,{"data-slot":"avatar-fallback",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}const O=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],xe="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function be(s){let e=0;for(let a=0;a<s.length;a++)e=s.charCodeAt(a)+((e<<5)-e);const t=Math.abs(e)%O.length;return O[t]}const L=T("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-xs font-semibold","2xs":"w-4 h-4 text-xs font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),ve=T("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),we=s=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[s]||e.base};function Ae(s){const e=d.c(35);let t,a,o,r,n,f,g,i;e[0]!==s?({url:i,fallback:a,shape:r,size:n,objectFit:f,className:t,muted:g,...o}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=o,e[4]=r,e[5]=n,e[6]=f,e[7]=g,e[8]=i):(t=e[1],a=e[2],o=e[3],r=e[4],n=e[5],f=e[6],g=e[7],i=e[8]);const b=r===void 0?"square":r,h=n===void 0?"base":n,v=f===void 0?"cover":f,j=g===void 0?!1:g,[x,w]=p.useState(!1);let $;e:{if(typeof a=="string"){let u;e[9]!==a?(u=a.trim().slice(0,2).toUpperCase(),e[9]=a,e[10]=u):u=e[10],$=u;break e}$=a}const z=$;let _;e:{if(j){_=xe;break e}if(typeof a=="string"){let u;e[11]!==a?(u=be(a),e[11]=a,e[12]=u):u=e[12],_=u;break e}_=O[0]}const C=_;let E;e[13]!==i?(E=i?.startsWith("icon://"),e[13]=i,e[14]=E):E=e[14];const A=E;let k;e[15]!==A||e[16]!==i?(k=A?i?.replace("icon://",""):void 0,e[15]=A,e[16]=i,e[17]=k):k=e[17];const S=k;let D;e[18]!==t||e[19]!==b||e[20]!==h?(D=c(L({shape:b,size:h}),t),e[18]=t,e[19]=b,e[20]=h,e[21]=D):D=e[21];let N;e[22]!==C||e[23]!==z||e[24]!==S||e[25]!==x||e[26]!==A||e[27]!==v||e[28]!==h||e[29]!==i?(N=A&&S?l.jsx("div",{className:c("flex items-center justify-center w-full h-full",C),children:l.jsx(M,{size:we(h)})}):l.jsxs(l.Fragment,{children:[i&&!x&&l.jsx(me,{src:i,loading:"lazy",alt:"Avatar",className:c(ve({objectFit:v})),onError:()=>w(!0)}),(!i||x)&&l.jsx(he,{className:c(C,"rounded-none"),children:z})]}),e[22]=C,e[23]=z,e[24]=S,e[25]=x,e[26]=A,e[27]=v,e[28]=h,e[29]=i,e[30]=N):N=e[30];let R;return e[31]!==o||e[32]!==N||e[33]!==D?(R=l.jsx(ue,{className:D,...o,children:N}),e[31]=o,e[32]=N,e[33]=D,e[34]=R):R=e[34],R}function De(s){const e=d.c(18);let t,a,o,r,n,f,g,i;e[0]!==s?({shape:r,size:n,url:i,fallback:a,objectFit:f,className:t,muted:g,...o}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=o,e[4]=r,e[5]=n,e[6]=f,e[7]=g,e[8]=i):(t=e[1],a=e[2],o=e[3],r=e[4],n=e[5],f=e[6],g=e[7],i=e[8]);const b=r===void 0?"square":r,h=n===void 0?"base":n,v=f===void 0?"cover":f,j=g===void 0?!1:g,x=h??"base";let w;return e[9]!==t||e[10]!==a||e[11]!==j||e[12]!==v||e[13]!==o||e[14]!==b||e[15]!==x||e[16]!==i?(w=l.jsx(Ae,{shape:b,url:i,fallback:a,size:x,objectFit:v,className:t,muted:j,...o}),e[9]=t,e[10]=a,e[11]=j,e[12]=v,e[13]=o,e[14]=b,e[15]=x,e[16]=i,e[17]=w):w=e[17],w}De.Skeleton=function({shape:e="square",size:t="base",className:a}){return l.jsx("div",{className:c(L({shape:e,size:t}),"bg-muted animate-pulse",a)})};var V="AlertDialog",[Ne]=ge(V,[F]),m=F(),U=s=>{const{__scopeAlertDialog:e,...t}=s,a=m(e);return l.jsx(le,{...a,...t,modal:!0})};U.displayName=V;var ye="AlertDialogTrigger",je=p.forwardRef((s,e)=>{const{__scopeAlertDialog:t,...a}=s,o=m(t);return l.jsx(fe,{...o,...a,ref:e})});je.displayName=ye;var _e="AlertDialogPortal",W=s=>{const{__scopeAlertDialog:e,...t}=s,a=m(e);return l.jsx(ce,{...a,...t})};W.displayName=_e;var Ce="AlertDialogOverlay",B=p.forwardRef((s,e)=>{const{__scopeAlertDialog:t,...a}=s,o=m(t);return l.jsx(pe,{...o,...a,ref:e})});B.displayName=Ce;var y="AlertDialogContent",[Ee,ke]=Ne(y),Re=de("AlertDialogContent"),G=p.forwardRef((s,e)=>{const{__scopeAlertDialog:t,children:a,...o}=s,r=m(t),n=p.useRef(null),f=P(e,n),g=p.useRef(null);return l.jsx(oe,{contentName:y,titleName:Y,docsSlug:"alert-dialog",children:l.jsx(Ee,{scope:t,cancelRef:g,children:l.jsxs(se,{role:"alertdialog",...r,...o,ref:f,onOpenAutoFocus:re(o.onOpenAutoFocus,i=>{i.preventDefault(),g.current?.focus({preventScroll:!0})}),onPointerDownOutside:i=>i.preventDefault(),onInteractOutside:i=>i.preventDefault(),children:[l.jsx(Re,{children:a}),l.jsx(ze,{contentRef:n})]})})})});G.displayName=y;var Y="AlertDialogTitle",H=p.forwardRef((s,e)=>{const{__scopeAlertDialog:t,...a}=s,o=m(t);return l.jsx(ie,{...o,...a,ref:e})});H.displayName=Y;var Z="AlertDialogDescription",X=p.forwardRef((s,e)=>{const{__scopeAlertDialog:t,...a}=s,o=m(t);return l.jsx(ne,{...o,...a,ref:e})});X.displayName=Z;var $e="AlertDialogAction",J=p.forwardRef((s,e)=>{const{__scopeAlertDialog:t,...a}=s,o=m(t);return l.jsx(q,{...o,...a,ref:e})});J.displayName=$e;var K="AlertDialogCancel",Q=p.forwardRef((s,e)=>{const{__scopeAlertDialog:t,...a}=s,{cancelRef:o}=ke(K,t),r=m(t),n=P(e,o);return l.jsx(q,{...r,...a,ref:n})});Q.displayName=K;var ze=({contentRef:s})=>{const e=`\`${y}\` requires a description for the component to be accessible for screen reader users.
1
+ import{r as p,c as d,j as l,v as T,aX as ee,aY as te,aZ as ae,al as P,a_ as oe,x as se,an as re,E as q,R as le,T as ie,D as ne,y as ce,a$ as F,b0 as de,aq as ge,B as fe,z as pe}from"./index-DkVMZPZp.js";import{c,b as I}from"./button-CWzK0IXA.js";const M=({size:s=24,color:e="currentColor",...t})=>p.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},p.createElement("path",{d:"M20 21c0-1.396 0-2.093-.172-2.661a4 4 0 0 0-2.667-2.667c-.568-.172-1.265-.172-2.661-.172h-5c-1.396 0-2.093 0-2.661.172a4 4 0 0 0-2.667 2.667C4 18.907 4 19.604 4 21M16.5 7.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Z"}));M.displayName="User01";function ue(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=c("relative flex size-8 shrink-0 overflow-hidden rounded-full",t),e[3]=t,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=l.jsx(ae,{"data-slot":"avatar",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function me(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=c("aspect-square size-full",t),e[3]=t,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=l.jsx(ee,{"data-slot":"avatar-image",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function he(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=c("bg-muted flex size-full items-center justify-center rounded-full",t),e[3]=t,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=l.jsx(te,{"data-slot":"avatar-fallback",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}const O=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],xe="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function be(s){let e=0;for(let a=0;a<s.length;a++)e=s.charCodeAt(a)+((e<<5)-e);const t=Math.abs(e)%O.length;return O[t]}const L=T("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-xs font-semibold","2xs":"w-4 h-4 text-xs font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),ve=T("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),we=s=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[s]||e.base};function Ae(s){const e=d.c(35);let t,a,o,r,n,f,g,i;e[0]!==s?({url:i,fallback:a,shape:r,size:n,objectFit:f,className:t,muted:g,...o}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=o,e[4]=r,e[5]=n,e[6]=f,e[7]=g,e[8]=i):(t=e[1],a=e[2],o=e[3],r=e[4],n=e[5],f=e[6],g=e[7],i=e[8]);const b=r===void 0?"square":r,h=n===void 0?"base":n,v=f===void 0?"cover":f,j=g===void 0?!1:g,[x,w]=p.useState(!1);let $;e:{if(typeof a=="string"){let u;e[9]!==a?(u=a.trim().slice(0,2).toUpperCase(),e[9]=a,e[10]=u):u=e[10],$=u;break e}$=a}const z=$;let _;e:{if(j){_=xe;break e}if(typeof a=="string"){let u;e[11]!==a?(u=be(a),e[11]=a,e[12]=u):u=e[12],_=u;break e}_=O[0]}const C=_;let E;e[13]!==i?(E=i?.startsWith("icon://"),e[13]=i,e[14]=E):E=e[14];const A=E;let k;e[15]!==A||e[16]!==i?(k=A?i?.replace("icon://",""):void 0,e[15]=A,e[16]=i,e[17]=k):k=e[17];const S=k;let D;e[18]!==t||e[19]!==b||e[20]!==h?(D=c(L({shape:b,size:h}),t),e[18]=t,e[19]=b,e[20]=h,e[21]=D):D=e[21];let N;e[22]!==C||e[23]!==z||e[24]!==S||e[25]!==x||e[26]!==A||e[27]!==v||e[28]!==h||e[29]!==i?(N=A&&S?l.jsx("div",{className:c("flex items-center justify-center w-full h-full",C),children:l.jsx(M,{size:we(h)})}):l.jsxs(l.Fragment,{children:[i&&!x&&l.jsx(me,{src:i,loading:"lazy",alt:"Avatar",className:c(ve({objectFit:v})),onError:()=>w(!0)}),(!i||x)&&l.jsx(he,{className:c(C,"rounded-none"),children:z})]}),e[22]=C,e[23]=z,e[24]=S,e[25]=x,e[26]=A,e[27]=v,e[28]=h,e[29]=i,e[30]=N):N=e[30];let R;return e[31]!==o||e[32]!==N||e[33]!==D?(R=l.jsx(ue,{className:D,...o,children:N}),e[31]=o,e[32]=N,e[33]=D,e[34]=R):R=e[34],R}function De(s){const e=d.c(18);let t,a,o,r,n,f,g,i;e[0]!==s?({shape:r,size:n,url:i,fallback:a,objectFit:f,className:t,muted:g,...o}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=o,e[4]=r,e[5]=n,e[6]=f,e[7]=g,e[8]=i):(t=e[1],a=e[2],o=e[3],r=e[4],n=e[5],f=e[6],g=e[7],i=e[8]);const b=r===void 0?"square":r,h=n===void 0?"base":n,v=f===void 0?"cover":f,j=g===void 0?!1:g,x=h??"base";let w;return e[9]!==t||e[10]!==a||e[11]!==j||e[12]!==v||e[13]!==o||e[14]!==b||e[15]!==x||e[16]!==i?(w=l.jsx(Ae,{shape:b,url:i,fallback:a,size:x,objectFit:v,className:t,muted:j,...o}),e[9]=t,e[10]=a,e[11]=j,e[12]=v,e[13]=o,e[14]=b,e[15]=x,e[16]=i,e[17]=w):w=e[17],w}De.Skeleton=function({shape:e="square",size:t="base",className:a}){return l.jsx("div",{className:c(L({shape:e,size:t}),"bg-muted animate-pulse",a)})};var V="AlertDialog",[Ne]=ge(V,[F]),m=F(),U=s=>{const{__scopeAlertDialog:e,...t}=s,a=m(e);return l.jsx(le,{...a,...t,modal:!0})};U.displayName=V;var ye="AlertDialogTrigger",je=p.forwardRef((s,e)=>{const{__scopeAlertDialog:t,...a}=s,o=m(t);return l.jsx(fe,{...o,...a,ref:e})});je.displayName=ye;var _e="AlertDialogPortal",W=s=>{const{__scopeAlertDialog:e,...t}=s,a=m(e);return l.jsx(ce,{...a,...t})};W.displayName=_e;var Ce="AlertDialogOverlay",B=p.forwardRef((s,e)=>{const{__scopeAlertDialog:t,...a}=s,o=m(t);return l.jsx(pe,{...o,...a,ref:e})});B.displayName=Ce;var y="AlertDialogContent",[Ee,ke]=Ne(y),Re=de("AlertDialogContent"),G=p.forwardRef((s,e)=>{const{__scopeAlertDialog:t,children:a,...o}=s,r=m(t),n=p.useRef(null),f=P(e,n),g=p.useRef(null);return l.jsx(oe,{contentName:y,titleName:Y,docsSlug:"alert-dialog",children:l.jsx(Ee,{scope:t,cancelRef:g,children:l.jsxs(se,{role:"alertdialog",...r,...o,ref:f,onOpenAutoFocus:re(o.onOpenAutoFocus,i=>{i.preventDefault(),g.current?.focus({preventScroll:!0})}),onPointerDownOutside:i=>i.preventDefault(),onInteractOutside:i=>i.preventDefault(),children:[l.jsx(Re,{children:a}),l.jsx(ze,{contentRef:n})]})})})});G.displayName=y;var Y="AlertDialogTitle",H=p.forwardRef((s,e)=>{const{__scopeAlertDialog:t,...a}=s,o=m(t);return l.jsx(ie,{...o,...a,ref:e})});H.displayName=Y;var Z="AlertDialogDescription",X=p.forwardRef((s,e)=>{const{__scopeAlertDialog:t,...a}=s,o=m(t);return l.jsx(ne,{...o,...a,ref:e})});X.displayName=Z;var $e="AlertDialogAction",J=p.forwardRef((s,e)=>{const{__scopeAlertDialog:t,...a}=s,o=m(t);return l.jsx(q,{...o,...a,ref:e})});J.displayName=$e;var K="AlertDialogCancel",Q=p.forwardRef((s,e)=>{const{__scopeAlertDialog:t,...a}=s,{cancelRef:o}=ke(K,t),r=m(t),n=P(e,o);return l.jsx(q,{...r,...a,ref:n})});Q.displayName=K;var ze=({contentRef:s})=>{const e=`\`${y}\` requires a description for the component to be accessible for screen reader users.
2
2
 
3
3
  You can add a description to the \`${y}\` by passing a \`${Z}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
4
4
 
@@ -1 +1 @@
1
- import{c as r,a as m,j as n,A as o}from"./index-BAZLm9w0.js";function i(){const e=r.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={from:"/auth/$pathname"},e[0]=t):t=e[0];const{pathname:s}=m(t);let a;return e[1]!==s?(a=n.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:n.jsx(o,{pathname:s})}),e[1]=s,e[2]=a):a=e[2],a}export{i as default};
1
+ import{c as r,a as m,j as n,A as o}from"./index-DkVMZPZp.js";function i(){const e=r.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={from:"/auth/$pathname"},e[0]=t):t=e[0];const{pathname:s}=m(t);let a;return e[1]!==s?(a=n.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:n.jsx(o,{pathname:s})}),e[1]=s,e[2]=a):a=e[2],a}export{i as default};
@@ -1 +1 @@
1
- import{c as d,j as u,G as l,v}from"./index-BAZLm9w0.js";import{c as g}from"./button-nyR0JH2l.js";const f=v("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function m(o){const e=d.c(12);let r,s,a,t;e[0]!==o?({className:r,variant:t,asChild:a,...s}=o,e[0]=o,e[1]=r,e[2]=s,e[3]=a,e[4]=t):(r=e[1],s=e[2],a=e[3],t=e[4]);const c=(a===void 0?!1:a)?l:"span";let i;e[5]!==r||e[6]!==t?(i=g(f({variant:t}),r),e[5]=r,e[6]=t,e[7]=i):i=e[7];let n;return e[8]!==c||e[9]!==s||e[10]!==i?(n=u.jsx(c,{"data-slot":"badge",className:i,...s}),e[8]=c,e[9]=s,e[10]=i,e[11]=n):n=e[11],n}export{m as B};
1
+ import{c as d,j as u,G as l,v}from"./index-DkVMZPZp.js";import{c as g}from"./button-CWzK0IXA.js";const f=v("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function m(o){const e=d.c(12);let r,s,a,t;e[0]!==o?({className:r,variant:t,asChild:a,...s}=o,e[0]=o,e[1]=r,e[2]=s,e[3]=a,e[4]=t):(r=e[1],s=e[2],a=e[3],t=e[4]);const c=(a===void 0?!1:a)?l:"span";let i;e[5]!==r||e[6]!==t?(i=g(f({variant:t}),r),e[5]=r,e[6]=t,e[7]=i):i=e[7];let n;return e[8]!==c||e[9]!==s||e[10]!==i?(n=u.jsx(c,{"data-slot":"badge",className:i,...s}),e[8]=c,e[9]=s,e[10]=i,e[11]=n):n=e[11],n}export{m as B};
@@ -1 +1 @@
1
- import"./index-BAZLm9w0.js";function a(o){return{isImplementedBy:c=>{for(const e of o){const r=typeof e.name=="string"?new RegExp(`^${e.name}$`):e.name,t=c.find(i=>r.test(i.name));if(!(!t&&e.opt)&&!t)return!1}return!0}}}function s(o,c){const e=o.tools;if(!e||e.length===0)return!1;const r=e.map(n=>({name:n.name,inputSchema:n.inputSchema})),t=c.map(n=>({name:n.name,inputSchema:n.inputSchema,opt:n.opt}));return a(t).isImplementedBy(r)}export{a,s as c};
1
+ import"./index-DkVMZPZp.js";function a(o){return{isImplementedBy:c=>{for(const e of o){const r=typeof e.name=="string"?new RegExp(`^${e.name}$`):e.name,t=c.find(i=>r.test(i.name));if(!(!t&&e.opt)&&!t)return!1}return!0}}}function s(o,c){const e=o.tools;if(!e||e.length===0)return!1;const r=e.map(n=>({name:n.name,inputSchema:n.inputSchema})),t=c.map(n=>({name:n.name,inputSchema:n.inputSchema,opt:n.opt}));return a(t).isImplementedBy(r)}export{a,s as c};
@@ -1 +1 @@
1
- import{c,j as n,G as f}from"./index-BAZLm9w0.js";import{i as u}from"./ChevronRight-DDdY_PC7.js";import{c as m}from"./button-nyR0JH2l.js";function x(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("min-w-0 overflow-hidden",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function N(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("ol",{"data-slot":"breadcrumb-list",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function g(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("inline-flex items-center gap-1.5 min-w-0",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("li",{"data-slot":"breadcrumb-item",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function j(r){const e=c.c(10);let a,t,s;e[0]!==r?({asChild:a,className:t,...s}=r,e[0]=r,e[1]=a,e[2]=t,e[3]=s):(a=e[1],t=e[2],s=e[3]);const l=a?f:"a";let i;e[4]!==t?(i=m("hover:text-foreground transition-colors truncate",t),e[4]=t,e[5]=i):i=e[5];let o;return e[6]!==l||e[7]!==s||e[8]!==i?(o=n.jsx(l,{"data-slot":"breadcrumb-link",className:i,...s}),e[6]=l,e[7]=s,e[8]=i,e[9]=o):o=e[9],o}function h(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("text-foreground font-normal truncate",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function B(r){const e=c.c(12);let a,t,s;e[0]!==r?({children:a,className:t,...s}=r,e[0]=r,e[1]=a,e[2]=t,e[3]=s):(a=e[1],t=e[2],s=e[3]);let l;e[4]!==t?(l=m("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",t),e[4]=t,e[5]=l):l=e[5];let i;e[6]!==a?(i=a??n.jsx(u,{}),e[6]=a,e[7]=i):i=e[7];let o;return e[8]!==s||e[9]!==l||e[10]!==i?(o=n.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:l,...s,children:i}),e[8]=s,e[9]=l,e[10]=i,e[11]=o):o=e[11],o}export{x as B,N as a,g as b,j as c,B as d,h as e};
1
+ import{c,j as n,G as f}from"./index-DkVMZPZp.js";import{i as u}from"./ChevronRight-0gQ-Lwyj.js";import{c as m}from"./button-CWzK0IXA.js";function x(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("min-w-0 overflow-hidden",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function N(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("ol",{"data-slot":"breadcrumb-list",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function g(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("inline-flex items-center gap-1.5 min-w-0",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("li",{"data-slot":"breadcrumb-item",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function j(r){const e=c.c(10);let a,t,s;e[0]!==r?({asChild:a,className:t,...s}=r,e[0]=r,e[1]=a,e[2]=t,e[3]=s):(a=e[1],t=e[2],s=e[3]);const l=a?f:"a";let i;e[4]!==t?(i=m("hover:text-foreground transition-colors truncate",t),e[4]=t,e[5]=i):i=e[5];let o;return e[6]!==l||e[7]!==s||e[8]!==i?(o=n.jsx(l,{"data-slot":"breadcrumb-link",className:i,...s}),e[6]=l,e[7]=s,e[8]=i,e[9]=o):o=e[9],o}function h(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("text-foreground font-normal truncate",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function B(r){const e=c.c(12);let a,t,s;e[0]!==r?({children:a,className:t,...s}=r,e[0]=r,e[1]=a,e[2]=t,e[3]=s):(a=e[1],t=e[2],s=e[3]);let l;e[4]!==t?(l=m("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",t),e[4]=t,e[5]=l):l=e[5];let i;e[6]!==a?(i=a??n.jsx(u,{}),e[6]=a,e[7]=i):i=e[7];let o;return e[8]!==s||e[9]!==l||e[10]!==i?(o=n.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:l,...s,children:i}),e[8]=s,e[9]=l,e[10]=i,e[11]=o):o=e[11],o}export{x as B,N as a,g as b,j as c,B as d,h as e};
@@ -1 +1 @@
1
- import{aI as g,aJ as u,c as l,j as v,G as b,v as p}from"./index-BAZLm9w0.js";function x(...a){return g(u(a))}const f=p("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border text-foreground bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-foreground/80 hover:text-foreground",brand:"bg-brand-green-light text-brand-green-dark hover:bg-brand-green-light/90"},size:{default:"h-10 px-4 py-2 has-[>svg]:px-3",sm:"h-7 gap-1.5 px-3 has-[>svg]:px-2.5",xs:"h-6 gap-1 px-2 text-xs has-[>svg]:px-1.5",lg:"h-10 px-6 has-[>svg]:px-4",icon:"size-10"}},defaultVariants:{variant:"default",size:"default"}});function k(a){const e=l.c(14);let t,r,s,o,i;e[0]!==a?({className:t,variant:i,size:s,asChild:o,...r}=a,e[0]=a,e[1]=t,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(t=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const c=(o===void 0?!1:o)?b:"button";let n;e[6]!==t||e[7]!==s||e[8]!==i?(n=x(f({variant:i,size:s,className:t})),e[6]=t,e[7]=s,e[8]=i,e[9]=n):n=e[9];let d;return e[10]!==c||e[11]!==r||e[12]!==n?(d=v.jsx(c,{"data-slot":"button",className:n,...r}),e[10]=c,e[11]=r,e[12]=n,e[13]=d):d=e[13],d}export{k as B,f as b,x as c};
1
+ import{aI as g,aJ as u,c as l,j as v,G as b,v as p}from"./index-DkVMZPZp.js";function x(...a){return g(u(a))}const f=p("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border text-foreground bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-foreground/80 hover:text-foreground",brand:"bg-brand-green-light text-brand-green-dark hover:bg-brand-green-light/90"},size:{default:"h-10 px-4 py-2 has-[>svg]:px-3",sm:"h-7 gap-1.5 px-3 has-[>svg]:px-2.5",xs:"h-6 gap-1 px-2 text-xs has-[>svg]:px-1.5",lg:"h-10 px-6 has-[>svg]:px-4",icon:"size-10"}},defaultVariants:{variant:"default",size:"default"}});function k(a){const e=l.c(14);let t,r,s,o,i;e[0]!==a?({className:t,variant:i,size:s,asChild:o,...r}=a,e[0]=a,e[1]=t,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(t=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const c=(o===void 0?!1:o)?b:"button";let n;e[6]!==t||e[7]!==s||e[8]!==i?(n=x(f({variant:i,size:s,className:t})),e[6]=t,e[7]=s,e[8]=i,e[9]=n):n=e[9];let d;return e[10]!==c||e[11]!==r||e[12]!==n?(d=v.jsx(c,{"data-slot":"button",className:n,...r}),e[10]=c,e[11]=r,e[12]=n,e[13]=d):d=e[13],d}export{k as B,f as b,x as c};
@@ -1 +1 @@
1
- import{c,j as l}from"./index-BAZLm9w0.js";import{c as n}from"./button-nyR0JH2l.js";function f(o){const e=c.c(8);let r,t;e[0]!==o?({className:r,...t}=o,e[0]=o,e[1]=r,e[2]=t):(r=e[1],t=e[2]);let s;e[3]!==r?(s=n("bg-card text-card-foreground hover:bg-accent/50 flex flex-col gap-6 rounded-xl border border-border/75",r),e[3]=r,e[4]=s):s=e[4];let a;return e[5]!==t||e[6]!==s?(a=l.jsx("div",{"data-slot":"card",className:s,...t}),e[5]=t,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=c.c(4);let r;e[0]!==o?({...r}=o,e[0]=o,e[1]=r):r=e[1];let t;return e[2]!==r?(t=l.jsx("div",{"data-slot":"card-content",...r}),e[2]=r,e[3]=t):t=e[3],t}export{f as C,p as a};
1
+ import{c,j as l}from"./index-DkVMZPZp.js";import{c as n}from"./button-CWzK0IXA.js";function f(o){const e=c.c(8);let r,t;e[0]!==o?({className:r,...t}=o,e[0]=o,e[1]=r,e[2]=t):(r=e[1],t=e[2]);let s;e[3]!==r?(s=n("bg-card text-card-foreground hover:bg-accent/50 flex flex-col gap-6 rounded-xl border border-border/75",r),e[3]=r,e[4]=s):s=e[4];let a;return e[5]!==t||e[6]!==s?(a=l.jsx("div",{"data-slot":"card",className:s,...t}),e[5]=t,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=c.c(4);let r;e[0]!==o?({...r}=o,e[0]=o,e[1]=r):r=e[1];let t;return e[2]!==r?(t=l.jsx("div",{"data-slot":"card-content",...r}),e[2]=r,e[3]=t):t=e[3],t}export{f as C,p as a};
@@ -1 +1 @@
1
- import{c as d,j as c,a2 as n,a3 as l}from"./index-BAZLm9w0.js";import{i as m}from"./Check-Dzm8t_lx.js";import{c as b}from"./button-nyR0JH2l.js";function f(o){const e=d.c(9);let r,a;e[0]!==o?({className:r,...a}=o,e[0]=o,e[1]=r,e[2]=a):(r=e[1],a=e[2]);let i;e[3]!==r?(i=b("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",r),e[3]=r,e[4]=i):i=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(l,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(m,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==a||e[7]!==i?(s=c.jsx(n,{"data-slot":"checkbox",className:i,...a,children:t}),e[6]=a,e[7]=i,e[8]=s):s=e[8],s}export{f as C};
1
+ import{c as d,j as c,a2 as n,a3 as l}from"./index-DkVMZPZp.js";import{i as m}from"./Check-hF_kXZiK.js";import{c as b}from"./button-CWzK0IXA.js";function f(o){const e=d.c(9);let r,a;e[0]!==o?({className:r,...a}=o,e[0]=o,e[1]=r,e[2]=a):(r=e[1],a=e[2]);let i;e[3]!==r?(i=b("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",r),e[3]=r,e[4]=i):i=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(l,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(m,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==a||e[7]!==i?(s=c.jsx(n,{"data-slot":"checkbox",className:i,...a,children:t}),e[6]=a,e[7]=i,e[8]=s):s=e[8],s}export{f as C};
@@ -1 +1 @@
1
- import{r as c}from"./index-BAZLm9w0.js";const h=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),y=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,o)=>o?o.toUpperCase():r.toLowerCase()),i=t=>{const e=y(t);return e.charAt(0).toUpperCase()+e.slice(1)},l=(...t)=>t.filter((e,r,o)=>!!e&&e.trim()!==""&&o.indexOf(e)===r).join(" ").trim(),f=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var k={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const w=c.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:s="",children:a,iconNode:p,...n},d)=>c.createElement("svg",{ref:d,...k,width:e,height:e,stroke:t,strokeWidth:o?Number(r)*24/Number(e):r,className:l("lucide",s),...!a&&!f(n)&&{"aria-hidden":"true"},...n},[...p.map(([m,C])=>c.createElement(m,C)),...Array.isArray(a)?a:[a]]));const u=(t,e)=>{const r=c.forwardRef(({className:o,...s},a)=>c.createElement(w,{ref:a,iconNode:e,className:l(`lucide-${h(i(t))}`,`lucide-${t}`,o),...s}));return r.displayName=i(t),r};const g=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],b=u("check",g);const x=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],L=u("circle-alert",x);export{L as C,b as a,u as c};
1
+ import{r as c}from"./index-DkVMZPZp.js";const h=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),y=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,o)=>o?o.toUpperCase():r.toLowerCase()),i=t=>{const e=y(t);return e.charAt(0).toUpperCase()+e.slice(1)},l=(...t)=>t.filter((e,r,o)=>!!e&&e.trim()!==""&&o.indexOf(e)===r).join(" ").trim(),f=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var k={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const w=c.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:s="",children:a,iconNode:p,...n},d)=>c.createElement("svg",{ref:d,...k,width:e,height:e,stroke:t,strokeWidth:o?Number(r)*24/Number(e):r,className:l("lucide",s),...!a&&!f(n)&&{"aria-hidden":"true"},...n},[...p.map(([m,C])=>c.createElement(m,C)),...Array.isArray(a)?a:[a]]));const u=(t,e)=>{const r=c.forwardRef(({className:o,...s},a)=>c.createElement(w,{ref:a,iconNode:e,className:l(`lucide-${h(i(t))}`,`lucide-${t}`,o),...s}));return r.displayName=i(t),r};const g=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],b=u("check",g);const x=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],L=u("circle-alert",x);export{L as C,b as a,u as c};
@@ -1,4 +1,4 @@
1
- import{r as S,bu as Ta,bv as Aa,H as Ma,bc as V,s as f,bw as Oe,bx as kt,bg as Ra,bh as ja,bb as Oa,bd as U,b7 as Ee,ad as Ne,o as R,be as E,bf as se,by as ka,bz as j,ae as Pa,bo as Da,c as D,u as Ce,a as Pt,K as Dt,F as $a,t as Be,j as d,g as La,am as Za,ak as Ke,at as Fa,an as Ua,aq as za,av as Ba,al as Va,aU as qa}from"./index-BAZLm9w0.js";import{u as Pe,a as et,d as Wa}from"./constants-CJQnv32m.js";import{b as Ja}from"./use-virtual-mcp-DfnzITXx.js";import{e as Ha,b as $t}from"./use-connection-k5RUrkjP.js";import{a as Ya}from"./use-binding-C5bwm3GP.js";import{u as Ga}from"./Code01-BWP8EmsE.js";import{u as Me,L as Ve}from"./localstorage-keys-Ciabbhpd.js";import{c as tt,B as Qa}from"./button-nyR0JH2l.js";import{I as Xa}from"./input-DHWQboe4.js";import{P as Ka,a as es,b as ts}from"./popover-CZsr9YrL.js";import{S as as,a as ss,b as rs,c as os,d as ns}from"./select-CrjtUXd1.js";import{t as dt}from"./ChevronDown-Z3Dyyuvx.js";import{i as is}from"./File06-Bwnj0Jvb.js";import{c as ls}from"./Grid01-DB4psHwp.js";import{a as cs}from"./Image01-BIunU3ME.js";import{i as Lt}from"./SearchMd-BWXZ4bVC.js";var Ie;(function(t){t.assertEqual=r=>{};function e(r){}t.assertIs=e;function a(r){throw new Error}t.assertNever=a,t.arrayToEnum=r=>{const o={};for(const i of r)o[i]=i;return o},t.getValidEnumValues=r=>{const o=t.objectKeys(r).filter(n=>typeof r[r[n]]!="number"),i={};for(const n of o)i[n]=r[n];return t.objectValues(i)},t.objectValues=r=>t.objectKeys(r).map(function(o){return r[o]}),t.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const o=[];for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&o.push(i);return o},t.find=(r,o)=>{for(const i of r)if(o(i))return i},t.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function s(r,o=" | "){return r.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}t.joinValues=s,t.jsonStringifyReplacer=(r,o)=>typeof o=="bigint"?o.toString():o})(Ie||(Ie={}));var pt;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(pt||(pt={}));Ie.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);Ie.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ke extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(o){return o.message},s={_errors:[]},r=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(r);else if(i.code==="invalid_return_type")r(i.returnTypeError);else if(i.code==="invalid_arguments")r(i.argumentsError);else if(i.path.length===0)s._errors.push(a(i));else{let n=s,c=0;for(;c<i.path.length;){const l=i.path[c];c===i.path.length-1?(n[l]=n[l]||{_errors:[]},n[l]._errors.push(a(i))):n[l]=n[l]||{_errors:[]},n=n[l],c++}}};return r(this),s}static assert(e){if(!(e instanceof ke))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ie.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),s=[];for(const r of this.issues)if(r.path.length>0){const o=r.path[0];a[o]=a[o]||[],a[o].push(e(r))}else s.push(e(r));return{formErrors:s,fieldErrors:a}}get formErrors(){return this.flatten()}}ke.create=t=>new ke(t);var mt;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(mt||(mt={}));var w;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(w||(w={}));const us=({size:t=24,color:e="currentColor",...a})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},S.createElement("path",{d:"M4 7h11m0 0-4 4m4-4-4-4M4 17h16m0 0-4 4m4-4-4-4"}));us.displayName="ArrowsRight";const Zt=({size:t=24,color:e="currentColor",...a})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},S.createElement("path",{d:"m7 15 5 5 5-5M7 9l5-5 5 5"}));Zt.displayName="ChevronSelectorVertical";const Ft=({size:t=24,color:e="currentColor",...a})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},S.createElement("path",{d:"M6 16a4 4 0 0 0 4 4h4a4 4 0 0 0 0-8h-4a4 4 0 0 1 0-8h4a4 4 0 0 1 4 4m-6-6v20"}));Ft.displayName="CurrencyDollar";const ds=({size:t=24,color:e="currentColor",...a})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},S.createElement("path",{d:"M10 17.659V20a2 2 0 1 0 4 0v-2.341M12 2v1m-9 9H2m3.5-6.5-.6-.6m13.6.6.6-.6M22 12h-1m-3 0a6 6 0 1 1-12 0 6 6 0 0 1 12 0Z"}));ds.displayName="Lightbulb02";const Ut=({size:t=24,color:e="currentColor",...a})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},S.createElement("path",{d:"m18 8 4 4m0 0-4 4m4-4H9m6-7.796A8.383 8.383 0 0 0 10.667 3C5.88 3 2 7.03 2 12s3.88 9 8.667 9A8.384 8.384 0 0 0 15 19.796"}));Ut.displayName="LogOut04";const zt=({size:t=24,color:e="currentColor",...a})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},S.createElement("path",{d:"m6.5 13 .784 1.569c.266.53.399.796.576 1.026a3 3 0 0 0 .545.545c.23.177.495.31 1.026.575L11 17.5l-1.569.785c-.53.265-.796.398-1.026.575a3 3 0 0 0-.545.545c-.177.23-.31.495-.576 1.026L6.5 22l-.784-1.569c-.266-.53-.399-.796-.576-1.026a3 3 0 0 0-.545-.545c-.23-.177-.495-.31-1.026-.575L2 17.5l1.569-.785c.53-.265.796-.398 1.026-.575a3 3 0 0 0 .545-.545c.177-.23.31-.495.576-1.026L6.5 13ZM15 2l1.179 3.064c.282.734.423 1.1.642 1.409a3 3 0 0 0 .706.706c.309.22.675.36 1.409.642L22 9l-3.064 1.179c-.734.282-1.1.423-1.409.642a3 3 0 0 0-.706.706c-.22.309-.36.675-.642 1.409L15 16l-1.179-3.064c-.282-.734-.423-1.1-.642-1.409a3 3 0 0 0-.706-.706c-.309-.22-.675-.36-1.409-.642L8 9l3.064-1.179c.734-.282 1.1-.423 1.409-.642a3 3 0 0 0 .706-.706c.22-.309.36-.675.642-1.409L15 2Z"}));zt.displayName="Stars01";var Bt="vercel.ai.error",ps=Symbol.for(Bt),ft,ht,X=class Vt extends(ht=Error,ft=ps,ht){constructor({name:e,message:a,cause:s}){super(a),this[ft]=!0,this.name=e,this.cause=s}static isInstance(e){return Vt.hasMarker(e,Bt)}static hasMarker(e,a){const s=Symbol.for(a);return e!=null&&typeof e=="object"&&s in e&&typeof e[s]=="boolean"&&e[s]===!0}};function qt(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var Wt="AI_InvalidArgumentError",Jt=`vercel.ai.error.${Wt}`,ms=Symbol.for(Jt),gt,vt,fs=class extends(vt=X,gt=ms,vt){constructor({message:t,cause:e,argument:a}){super({name:Wt,message:t,cause:e}),this[gt]=!0,this.argument=a}static isInstance(t){return X.hasMarker(t,Jt)}},Ht="AI_JSONParseError",Yt=`vercel.ai.error.${Ht}`,hs=Symbol.for(Yt),yt,xt,bt=class extends(xt=X,yt=hs,xt){constructor({text:t,cause:e}){super({name:Ht,message:`JSON parsing failed: Text: ${t}.
1
+ import{r as S,bu as Ta,bv as Aa,H as Ma,bc as V,s as f,bw as Oe,bx as kt,bg as Ra,bh as ja,bb as Oa,bd as U,b7 as Ee,ad as Ne,o as R,be as E,bf as se,by as ka,bz as j,ae as Pa,bo as Da,c as D,u as Ce,a as Pt,K as Dt,F as $a,t as Be,j as d,g as La,am as Za,ak as Ke,at as Fa,an as Ua,aq as za,av as Ba,al as Va,aU as qa}from"./index-DkVMZPZp.js";import{u as Pe,a as et,d as Wa}from"./constants-Chp3RuVB.js";import{b as Ja}from"./use-virtual-mcp-CEZ5nKxx.js";import{e as Ha,b as $t}from"./use-connection-BNgYG_2P.js";import{a as Ya}from"./use-binding-CDLcDLTQ.js";import{u as Ga}from"./Code01-DSEEeIpb.js";import{u as Me,L as Ve}from"./localstorage-keys-DVhuzRr7.js";import{c as tt,B as Qa}from"./button-CWzK0IXA.js";import{I as Xa}from"./input-BKM3goZw.js";import{P as Ka,a as es,b as ts}from"./popover-C0G-pXcc.js";import{S as as,a as ss,b as rs,c as os,d as ns}from"./select-Df9aMNs1.js";import{t as dt}from"./ChevronDown-CwChLZoe.js";import{i as is}from"./File06-CV2OmgsQ.js";import{c as ls}from"./Grid01-DshI78vi.js";import{a as cs}from"./Image01-BR8oz0fK.js";import{i as Lt}from"./SearchMd-SRsVDK9N.js";var Ie;(function(t){t.assertEqual=r=>{};function e(r){}t.assertIs=e;function a(r){throw new Error}t.assertNever=a,t.arrayToEnum=r=>{const o={};for(const i of r)o[i]=i;return o},t.getValidEnumValues=r=>{const o=t.objectKeys(r).filter(n=>typeof r[r[n]]!="number"),i={};for(const n of o)i[n]=r[n];return t.objectValues(i)},t.objectValues=r=>t.objectKeys(r).map(function(o){return r[o]}),t.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const o=[];for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&o.push(i);return o},t.find=(r,o)=>{for(const i of r)if(o(i))return i},t.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function s(r,o=" | "){return r.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}t.joinValues=s,t.jsonStringifyReplacer=(r,o)=>typeof o=="bigint"?o.toString():o})(Ie||(Ie={}));var pt;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(pt||(pt={}));Ie.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);Ie.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ke extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(o){return o.message},s={_errors:[]},r=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(r);else if(i.code==="invalid_return_type")r(i.returnTypeError);else if(i.code==="invalid_arguments")r(i.argumentsError);else if(i.path.length===0)s._errors.push(a(i));else{let n=s,c=0;for(;c<i.path.length;){const l=i.path[c];c===i.path.length-1?(n[l]=n[l]||{_errors:[]},n[l]._errors.push(a(i))):n[l]=n[l]||{_errors:[]},n=n[l],c++}}};return r(this),s}static assert(e){if(!(e instanceof ke))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ie.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),s=[];for(const r of this.issues)if(r.path.length>0){const o=r.path[0];a[o]=a[o]||[],a[o].push(e(r))}else s.push(e(r));return{formErrors:s,fieldErrors:a}}get formErrors(){return this.flatten()}}ke.create=t=>new ke(t);var mt;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(mt||(mt={}));var w;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(w||(w={}));const us=({size:t=24,color:e="currentColor",...a})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},S.createElement("path",{d:"M4 7h11m0 0-4 4m4-4-4-4M4 17h16m0 0-4 4m4-4-4-4"}));us.displayName="ArrowsRight";const Zt=({size:t=24,color:e="currentColor",...a})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},S.createElement("path",{d:"m7 15 5 5 5-5M7 9l5-5 5 5"}));Zt.displayName="ChevronSelectorVertical";const Ft=({size:t=24,color:e="currentColor",...a})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},S.createElement("path",{d:"M6 16a4 4 0 0 0 4 4h4a4 4 0 0 0 0-8h-4a4 4 0 0 1 0-8h4a4 4 0 0 1 4 4m-6-6v20"}));Ft.displayName="CurrencyDollar";const ds=({size:t=24,color:e="currentColor",...a})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},S.createElement("path",{d:"M10 17.659V20a2 2 0 1 0 4 0v-2.341M12 2v1m-9 9H2m3.5-6.5-.6-.6m13.6.6.6-.6M22 12h-1m-3 0a6 6 0 1 1-12 0 6 6 0 0 1 12 0Z"}));ds.displayName="Lightbulb02";const Ut=({size:t=24,color:e="currentColor",...a})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},S.createElement("path",{d:"m18 8 4 4m0 0-4 4m4-4H9m6-7.796A8.383 8.383 0 0 0 10.667 3C5.88 3 2 7.03 2 12s3.88 9 8.667 9A8.384 8.384 0 0 0 15 19.796"}));Ut.displayName="LogOut04";const zt=({size:t=24,color:e="currentColor",...a})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},S.createElement("path",{d:"m6.5 13 .784 1.569c.266.53.399.796.576 1.026a3 3 0 0 0 .545.545c.23.177.495.31 1.026.575L11 17.5l-1.569.785c-.53.265-.796.398-1.026.575a3 3 0 0 0-.545.545c-.177.23-.31.495-.576 1.026L6.5 22l-.784-1.569c-.266-.53-.399-.796-.576-1.026a3 3 0 0 0-.545-.545c-.23-.177-.495-.31-1.026-.575L2 17.5l1.569-.785c.53-.265.796-.398 1.026-.575a3 3 0 0 0 .545-.545c.177-.23.31-.495.576-1.026L6.5 13ZM15 2l1.179 3.064c.282.734.423 1.1.642 1.409a3 3 0 0 0 .706.706c.309.22.675.36 1.409.642L22 9l-3.064 1.179c-.734.282-1.1.423-1.409.642a3 3 0 0 0-.706.706c-.22.309-.36.675-.642 1.409L15 16l-1.179-3.064c-.282-.734-.423-1.1-.642-1.409a3 3 0 0 0-.706-.706c-.309-.22-.675-.36-1.409-.642L8 9l3.064-1.179c.734-.282 1.1-.423 1.409-.642a3 3 0 0 0 .706-.706c.22-.309.36-.675.642-1.409L15 2Z"}));zt.displayName="Stars01";var Bt="vercel.ai.error",ps=Symbol.for(Bt),ft,ht,X=class Vt extends(ht=Error,ft=ps,ht){constructor({name:e,message:a,cause:s}){super(a),this[ft]=!0,this.name=e,this.cause=s}static isInstance(e){return Vt.hasMarker(e,Bt)}static hasMarker(e,a){const s=Symbol.for(a);return e!=null&&typeof e=="object"&&s in e&&typeof e[s]=="boolean"&&e[s]===!0}};function qt(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var Wt="AI_InvalidArgumentError",Jt=`vercel.ai.error.${Wt}`,ms=Symbol.for(Jt),gt,vt,fs=class extends(vt=X,gt=ms,vt){constructor({message:t,cause:e,argument:a}){super({name:Wt,message:t,cause:e}),this[gt]=!0,this.argument=a}static isInstance(t){return X.hasMarker(t,Jt)}},Ht="AI_JSONParseError",Yt=`vercel.ai.error.${Ht}`,hs=Symbol.for(Yt),yt,xt,bt=class extends(xt=X,yt=hs,xt){constructor({text:t,cause:e}){super({name:Ht,message:`JSON parsing failed: Text: ${t}.
2
2
  Error message: ${qt(e)}`,cause:e}),this[yt]=!0,this.text=t}static isInstance(t){return X.hasMarker(t,Yt)}},Gt="AI_TypeValidationError",Qt=`vercel.ai.error.${Gt}`,gs=Symbol.for(Qt),_t,Et,ve=class qe extends(Et=X,_t=gs,Et){constructor({value:e,cause:a,context:s}){let r="Type validation failed";if(s?.field&&(r+=` for ${s.field}`),s?.entityName||s?.entityId){r+=" (";const o=[];s.entityName&&o.push(s.entityName),s.entityId&&o.push(`id: "${s.entityId}"`),r+=o.join(", "),r+=")"}super({name:Gt,message:`${r}: Value: ${JSON.stringify(e)}.
3
3
  Error message: ${qt(a)}`,cause:a}),this[_t]=!0,this.value=e,this.context=s}static isInstance(e){return X.hasMarker(e,Qt)}static wrap({value:e,cause:a,context:s}){var r,o,i;return qe.isInstance(a)&&a.value===e&&((r=a.context)==null?void 0:r.field)===s?.field&&((o=a.context)==null?void 0:o.entityName)===s?.entityName&&((i=a.context)==null?void 0:i.entityId)===s?.entityId?a:new qe({value:e,cause:a,context:s})}},Te=({prefix:t,size:e=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:s="-"}={})=>{const r=()=>{const o=a.length,i=new Array(e);for(let n=0;n<e;n++)i[n]=a[Math.random()*o|0];return i.join("")};if(t==null)return r;if(a.includes(s))throw new fs({argument:"separator",message:`The separator "${s}" must not be part of the alphabet "${a}".`});return()=>`${t}${s}${r()}`},vs=Te();function It(t=globalThis){var e,a,s;return t.window?"runtime/browser":(e=t.navigator)!=null&&e.userAgent?`runtime/${t.navigator.userAgent.toLowerCase()}`:(s=(a=t.process)==null?void 0:a.versions)!=null&&s.node?`runtime/node.js/${t.process.version.substring(0)}`:t.EdgeRuntime?"runtime/vercel-edge":"runtime/unknown"}function de(t){if(t==null)return{};const e={};if(t instanceof Headers)t.forEach((a,s)=>{e[s.toLowerCase()]=a});else{Array.isArray(t)||(t=Object.entries(t));for(const[a,s]of t)s!=null&&(e[a.toLowerCase()]=s)}return e}function wt(t,...e){const a=new Headers(de(t)),s=a.get("user-agent")||"";return a.set("user-agent",[s,...e].filter(Boolean).join(" ")),Object.fromEntries(a.entries())}var ys=/"__proto__"\s*:/,xs=/"constructor"\s*:/;function St(t){const e=JSON.parse(t);return e===null||typeof e!="object"||ys.test(t)===!1&&xs.test(t)===!1?e:bs(e)}function bs(t){let e=[t];for(;e.length;){const a=e;e=[];for(const s of a){if(Object.prototype.hasOwnProperty.call(s,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(s,"constructor")&&Object.prototype.hasOwnProperty.call(s.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const r in s){const o=s[r];o&&typeof o=="object"&&e.push(o)}}}return t}function _s(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return St(t)}try{return St(t)}finally{Error.stackTraceLimit=e}}function at(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;const{properties:a}=t;if(a!=null)for(const s of Object.keys(a))a[s]=ue(a[s])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(ue):ue(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(ue)),t.allOf!=null&&(t.allOf=t.allOf.map(ue)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(ue));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=ue(e[a]);return t}function ue(t){return typeof t=="boolean"?t:at(t)}var Es=Symbol("Let zodToJsonSchema decide on which parser to use"),Nt={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},Is=t=>typeof t=="string"?{...Nt,name:t}:{...Nt,...t};function q(){return{}}function ws(t,e){var a,s,r;const o={type:"array"};return(a=t.type)!=null&&a._def&&((r=(s=t.type)==null?void 0:s._def)==null?void 0:r.typeName)!==w.ZodAny&&(o.items=M(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(o.minItems=t.minLength.value),t.maxLength&&(o.maxItems=t.maxLength.value),t.exactLength&&(o.minItems=t.exactLength.value,o.maxItems=t.exactLength.value),o}function Ss(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"min":a.inclusive?e.minimum=a.value:e.exclusiveMinimum=a.value;break;case"max":a.inclusive?e.maximum=a.value:e.exclusiveMaximum=a.value;break;case"multipleOf":e.multipleOf=a.value;break}return e}function Ns(){return{type:"boolean"}}function Xt(t,e){return M(t.type._def,e)}var Cs=(t,e)=>M(t.innerType._def,e);function Kt(t,e,a){const s=a??e.dateStrategy;if(Array.isArray(s))return{anyOf:s.map((r,o)=>Kt(t,e,r))};switch(s){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Ts(t)}}var Ts=t=>{const e={type:"integer",format:"unix-time"};for(const a of t.checks)switch(a.kind){case"min":e.minimum=a.value;break;case"max":e.maximum=a.value;break}return e};function As(t,e){return{...M(t.innerType._def,e),default:t.defaultValue()}}function Ms(t,e){return e.effectStrategy==="input"?M(t.schema._def,e):q()}function Rs(t){return{type:"string",enum:Array.from(t.values)}}var js=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function Os(t,e){const a=[M(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),M(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(r=>!!r),s=[];return a.forEach(r=>{if(js(r))s.push(...r.allOf);else{let o=r;if("additionalProperties"in r&&r.additionalProperties===!1){const{additionalProperties:i,...n}=r;o=n}s.push(o)}}),s.length?{allOf:s}:void 0}function ks(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var Fe=void 0,H={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(Fe===void 0&&(Fe=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Fe),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function ea(t,e){const a={type:"string"};if(t.checks)for(const s of t.checks)switch(s.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,s.value):s.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,s.value):s.value;break;case"email":switch(e.emailStrategy){case"format:email":Y(a,"email",s.message,e);break;case"format:idn-email":Y(a,"idn-email",s.message,e);break;case"pattern:zod":F(a,H.email,s.message,e);break}break;case"url":Y(a,"uri",s.message,e);break;case"uuid":Y(a,"uuid",s.message,e);break;case"regex":F(a,s.regex,s.message,e);break;case"cuid":F(a,H.cuid,s.message,e);break;case"cuid2":F(a,H.cuid2,s.message,e);break;case"startsWith":F(a,RegExp(`^${Ue(s.value,e)}`),s.message,e);break;case"endsWith":F(a,RegExp(`${Ue(s.value,e)}$`),s.message,e);break;case"datetime":Y(a,"date-time",s.message,e);break;case"date":Y(a,"date",s.message,e);break;case"time":Y(a,"time",s.message,e);break;case"duration":Y(a,"duration",s.message,e);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,s.value):s.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,s.value):s.value;break;case"includes":{F(a,RegExp(Ue(s.value,e)),s.message,e);break}case"ip":{s.version!=="v6"&&Y(a,"ipv4",s.message,e),s.version!=="v4"&&Y(a,"ipv6",s.message,e);break}case"base64url":F(a,H.base64url,s.message,e);break;case"jwt":F(a,H.jwt,s.message,e);break;case"cidr":{s.version!=="v6"&&F(a,H.ipv4Cidr,s.message,e),s.version!=="v4"&&F(a,H.ipv6Cidr,s.message,e);break}case"emoji":F(a,H.emoji(),s.message,e);break;case"ulid":{F(a,H.ulid,s.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{Y(a,"binary",s.message,e);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{F(a,H.base64,s.message,e);break}}break}case"nanoid":F(a,H.nanoid,s.message,e)}return a}function Ue(t,e){return e.patternStrategy==="escape"?Ds(t):t}var Ps=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function Ds(t){let e="";for(let a=0;a<t.length;a++)Ps.has(t[a])||(e+="\\"),e+=t[a];return e}function Y(t,e,a,s){var r;t.format||(r=t.anyOf)!=null&&r.some(o=>o.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...a&&s.errorMessages&&{errorMessage:{format:a}}})):t.format=e}function F(t,e,a,s){var r;t.pattern||(r=t.allOf)!=null&&r.some(o=>o.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:Ct(e,s),...a&&s.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=Ct(e,s)}function Ct(t,e){var a;if(!e.applyRegexFlags||!t.flags)return t.source;const s={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},r=s.i?t.source.toLowerCase():t.source;let o="",i=!1,n=!1,c=!1;for(let l=0;l<r.length;l++){if(i){o+=r[l],i=!1;continue}if(s.i){if(n){if(r[l].match(/[a-z]/)){c?(o+=r[l],o+=`${r[l-2]}-${r[l]}`.toUpperCase(),c=!1):r[l+1]==="-"&&((a=r[l+2])!=null&&a.match(/[a-z]/))?(o+=r[l],c=!0):o+=`${r[l]}${r[l].toUpperCase()}`;continue}}else if(r[l].match(/[a-z]/)){o+=`[${r[l]}${r[l].toUpperCase()}]`;continue}}if(s.m){if(r[l]==="^"){o+=`(^|(?<=[\r
4
4
  ]))`;continue}else if(r[l]==="$"){o+=`($|(?=[\r
@@ -1,4 +1,4 @@
1
- import{bE as G,r as k,o as Fs,s as pt,c as C,j as o,bs as _t,u as X,k as Hs,v as Vs,a as re,f as Bs,l as qe,t as yn,bt as W,bF as Us,au as qs,ak as Tt,an as te,av as Sn,aw as Ks,am as $t,as as Js,ax as wn,al as Nn,aD as Gs,aE as Xs,aq as Cn,aF as Zs,bG as Et,bH as Qs,at as Ys,aV as eo,aT as to,bI as no,bJ as kn}from"./index-BAZLm9w0.js";import{E as In,I as Qe,c as Ot,b as Rt,T as At,a as Mt,n as so}from"./empty-state-Z8nGys2S.js";import{E as _n}from"./error-boundary-_n4elsYx.js";import{a as Pt,u as Lt,c as Ye,j as Dt,e as oo,h as zt,g as Wt}from"./use-connection-k5RUrkjP.js";import{u as Z,i as ro}from"./constants-CJQnv32m.js";import{S as Tn,P as Ft}from"./index-Dl8GoNj7.js";import{F as xt,a as io,b as Ht,d as Vt}from"./form-8XJyhmpO.js";import{I as Bt}from"./input-DHWQboe4.js";import{T as St}from"./textarea-wjx2NJJH.js";import{b as $n,V as Ut,a as ce}from"./layout-DsaX6gcJ.js";import{c as O,B as U}from"./button-nyR0JH2l.js";import{S as En,a as On,b as Rn,c as An,d as wt}from"./select-CrjtUXd1.js";import{i as lo}from"./AlertCircle-CyK0Qw5h.js";import{s as co,M as $e}from"./monaco-editor-CyfxpBLo.js";import{i as ao}from"./Code01-BWP8EmsE.js";import{a as uo}from"./Copy01-C6IJYSqu.js";import{i as Me}from"./Loading01-DCWQbhnz.js";import{i as qt}from"./Play-D6BmScpI.js";import{s as Kt}from"./XClose-BDdig6o8.js";import{B as Mn,a as Pn,b as Te,c as Ke,d as Je,e as Ln}from"./breadcrumb-BjHn0dWR.js";import{u as fo,O as mo,M as po,F as xo,v as ho}from"./index-BQzGssjd.js";import{E as Jt}from"./empty-state-C0f9rz3s.js";import{D as go,a as bo}from"./use-binding-C5bwm3GP.js";import{b as Dn}from"./use-virtual-mcp-DfnzITXx.js";import{b as jo,a as an,R as vo}from"./resizable-kmnSMXLy.js";import{S as et}from"./spinner-CQdhmUjg.js";import{V as yo}from"./view-mode-toggle-DsKf8ZTT.js";import{N as So,S as wo,a as No,c as Co,m as Ve,P as ko,i as Io,R as _o,b as To,d as $o,e as dn,E as Eo,f as Oo}from"./index-ZeDSkwHv.js";import{b as Ro,c as Ao,d as Mo,e as Po,a as Lo,D as Do}from"./dialog-DobMZv-a.js";import"./index-Diri8Ct6.js";import{s as zn}from"./Plus-CG8dB40n.js";import{n as zo}from"./Calendar-DtGnvM8B.js";import{i as Gt}from"./Check-Dzm8t_lx.js";import{i as Wo}from"./DotsHorizontal-lop24UEO.js";import{a as Fo}from"./Tool01-BDUyIGto.js";import{D as Ho,a as Vo,b as Bo,c as un}from"./dropdown-menu-BUrC7H_I.js";import{T as Uo,R as qo,d as Ko,e as Wn}from"./collapsible-DJK4gRv1.js";import{i as Jo}from"./ChevronRight-DDdY_PC7.js";import{B as _e}from"./badge-BMiZ-mom.js";import{i as Fn}from"./X-8UbCzOSY.js";import"./useMutation-ffySYpQB.js";import"./useQuery-Da0DsMDg.js";import"./Pin01-WkOPKnTb.js";import"./use-organization-settings-DtbIWln6.js";import"./index-LE1qlbhg.js";import"./ChevronDown-Z3Dyyuvx.js";import"./infiniteQueryObserver-yv2IwJ75.js";import"./mcp-oauth-Cik_32Ma.js";import"./File06-Bwnj0Jvb.js";import"./Key01-Bycaiiyx.js";import"./constants-DpsR0LZe.js";import"./registry-utils-DGqTJkDv.js";import"./extract-connection-data-DS_2GbRy.js";import"./github-icon-Dp3wHhYE.js";import"./generate-id-Dyweu44Y.js";import"./circle-alert-D0fEJodr.js";import"./binder-DC5jbVcK.js";import"./popover-CZsr9YrL.js";import"./use-mcp-prompts-DeryV1GR.js";import"./ArrowUp-BzVEz2lB.js";import"./Edit01-BObRJWWQ.js";import"./Users03-DkIVbHWT.js";import"./Terminal-CdMAejVo.js";import"./localstorage-keys-Ciabbhpd.js";import"./SearchMd-BWXZ4bVC.js";import"./Trash01-C_hJOK44.js";import"./use-create-virtual-mcp-BfrhVnN1.js";import"./Grid01-DB4psHwp.js";import"./Image01-BIunU3ME.js";const Hn=G("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const Vn=G("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const Xt=G("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Zt=G("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const Go=G("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const Xo=G("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const Zo=G("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const Bn=G("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const Un=G("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const qn=G("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const Kn=G("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const Jn=G("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]),Qt=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M12 8v4m0 4h.01M2 8.523v6.954c0 .245 0 .367.028.482a1 1 0 0 0 .12.29c.061.1.148.187.32.36l4.923 4.922c.173.173.26.26.36.322.09.054.188.095.29.12.115.027.237.027.482.027h6.954c.245 0 .367 0 .482-.028a.998.998 0 0 0 .29-.12c.1-.061.187-.148.36-.32l4.922-4.923c.173-.173.26-.26.322-.36a.998.998 0 0 0 .12-.29c.027-.115.027-.237.027-.482V8.523c0-.245 0-.367-.028-.482a.998.998 0 0 0-.12-.29c-.061-.1-.148-.187-.32-.36L16.608 2.47c-.173-.173-.26-.26-.36-.322a1 1 0 0 0-.29-.12C15.844 2 15.722 2 15.477 2H8.523c-.245 0-.367 0-.482.028a1 1 0 0 0-.29.12c-.1.061-.187.148-.36.32L2.47 7.392c-.173.173-.26.26-.322.36a1 1 0 0 0-.12.29C2 8.156 2 8.278 2 8.523Z"}));Qt.displayName="AlertOctagon";const Gn=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.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"}));Gn.displayName="Box";const Xn=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m22.7 11.5-2 2-2-2m2.245 1.5A9 9 0 1 0 19 17.657M12 7v5l3 2"}));Xn.displayName="ClockFastForward";const Zn=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m17 17 5-5-5-5M7 7l-5 5 5 5m7-14-4 18"}));Zn.displayName="Code02";const Be=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M6.8 3h-.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21h.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C10 19.48 10 18.92 10 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C8.48 3 7.92 3 6.8 3Zm11 0h-.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C14 4.52 14 5.08 14 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C15.52 21 16.08 21 17.2 21h.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3Z"}));Be.displayName="Columns01";const Qn=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M4 4v1.4c0 3.36 0 5.04.654 6.324a6 6 0 0 0 2.622 2.622C8.56 15 10.24 15 13.6 15H20m0 0-5-5m5 5-5 5"}));Qn.displayName="CornerDownRight";const Yn=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.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"}));Yn.displayName="Database01";const es=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M3 3v10.2c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 18 6.12 18 7.8 18H15m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0ZM3 8h12m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0Z"}));es.displayName="GitBranch01";const ts=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m13 22-3-3m0 0 3-3m-3 3h5a7 7 0 0 0 3-13.326M6 18.326A7 7 0 0 1 9 5h5m0 0-3-3m3 3-3 3"}));ts.displayName="Repeat03";Fs({title:pt().min(1),description:pt().nullable(),body:pt()});function ht(t){for(const e of t.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Qo(){const t=window.location.pathname.split("/").filter(Boolean),e=t.findIndex(s=>s==="mcps"),n=e>=0?t[e+1]:void 0;return n?decodeURIComponent(n):void 0}function Yo(t){const e=C.c(13),{form:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=s):s=e[0];let i;e[1]!==n.control?(i=o.jsxs("div",{className:"flex flex-col gap-4",children:[s,o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsx(xt,{control:n.control,name:"title",render:nr}),o.jsx(xt,{control:n.control,name:"description",render:tr})]})]}),e[1]=n.control,e[2]=i):i=e[2];let r,l;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),l=o.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=r,e[4]=l):(r=e[3],l=e[4]);let c;e[5]!==n.control?(c=o.jsxs("div",{className:"flex flex-col gap-2",children:[r,l,o.jsx(xt,{control:n.control,name:"body",render:er})]}),e[5]=n.control,e[6]=c):c=e[6];let a;e[7]!==i||e[8]!==c?(a=o.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[i,c]}),e[7]=i,e[8]=c,e[9]=a):a=e[9];let u;return e[10]!==n||e[11]!==a?(u=o.jsx(io,{...n,children:a}),e[10]=n,e[11]=a,e[12]=u):u=e[12],u}function er(t){const{field:e}=t;return o.jsx(Ht,{children:o.jsx(Vt,{children:o.jsx(St,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] 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 tr(t){const{field:e}=t;return o.jsxs(Ht,{children:[o.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),o.jsx(Vt,{children:o.jsx(Bt,{...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 nr(t){const{field:e}=t;return o.jsxs(Ht,{children:[o.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),o.jsx(Vt,{children:o.jsx(Bt,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function sr(t){const e=C.c(41),{providerId:n,promptId:s}=t,r=_t().location.href,{org:l}=X(),c=n||null;let a;e[0]!==l.id||e[1]!==c?(a={connectionId:c,orgId:l.id},e[0]=l.id,e[1]=c,e[2]=a):a=e[2];const u=Z(a),d=Pt(n,"PROMPT",s,u),f=Lt(n,"PROMPT",u),m=f.update.isPending;let x;e[3]!==d?(x=d?{title:d.title,description:d.description??null,body:ht(d)}:void 0,e[3]=d,e[4]=x):x=e[4];let p;e[5]!==x?(p={values:x},e[5]=x,e[6]=p):p=e[6];const h=Hs(p);let g;e[7]!==h||e[8]!==d?(g=()=>{d&&h.reset({title:d.title,description:d.description??null,body:ht(d)})},e[7]=h,e[8]=d,e[9]=g):g=e[9];const b=g;let j;e[10]!==f.update||e[11]!==h||e[12]!==s?(j=h.handleSubmit(async M=>{const L=await f.update.mutateAsync({id:s,data:{title:M.title,description:M.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:M.body}}]}});h.reset({title:L.title,description:L.description??null,body:ht(L)})}),e[10]=f.update,e[11]=h,e[12]=s,e[13]=j):j=e[13];const y=j;if(!d){let M;return e[14]===Symbol.for("react.memo_cache_sentinel")?(M=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(In,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[14]=M):M=e[14],M}let S;e[15]!==d.title?(S=o.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:d.title}),e[15]=d.title,e[16]=S):S=e[16];let v;e[17]!==d.description?(v=d.description?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),o.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:d.description})]}):null,e[17]=d.description,e[18]=v):v=e[18];let w;e[19]!==S||e[20]!==v?(w=o.jsx($n,{children:o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[S,v]})}),e[19]=S,e[20]=v,e[21]=w):w=e[21];let N;e[22]!==y?(N=()=>{y()},e[22]=y,e[23]=N):N=e[23];let _;e[24]!==h.formState.isDirty||e[25]!==m||e[26]!==b||e[27]!==N?(_=o.jsx(Tn,{onSave:N,onUndo:b,isDirty:h.formState.isDirty,isSaving:m}),e[24]=h.formState.isDirty,e[25]=m,e[26]=b,e[27]=N,e[28]=_):_=e[28];let I;e[29]!==d.title||e[30]!==r?(I=o.jsx(Ft,{title:d.title,url:r,icon:"description"}),e[29]=d.title,e[30]=r,e[31]=I):I=e[31];let E;e[32]!==_||e[33]!==I?(E=o.jsxs(Ut,{children:[_,I]}),e[32]=_,e[33]=I,e[34]=E):E=e[34];let R;e[35]!==h?(R=o.jsx("div",{className:"h-full",children:o.jsx(Yo,{form:h})}),e[35]=h,e[36]=R):R=e[36];let P;return e[37]!==E||e[38]!==R||e[39]!==w?(P=o.jsxs(ce,{children:[w,E,R]}),e[37]=E,e[38]=R,e[39]=w,e[40]=P):P=e[40],P}function or(t){const e=C.c(4),{itemId:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=Qo(),e[0]=s):s=e[0];const i=s;if(!i){let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(In,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=l):l=e[1],l}let r;return e[2]!==n?(r=o.jsx(_n,{children:o.jsx(k.Suspense,{fallback:null,children:o.jsx(sr,{providerId:i,promptId:n})})}),e[2]=n,e[3]=r):r=e[3],r}const rr=Vs("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 ir(t){const e=C.c(10);let n,s,i;e[0]!==t?({className:n,variant:i,...s}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=i):(n=e[1],s=e[2],i=e[3]);let r;e[4]!==n||e[5]!==i?(r=O(rr({variant:i}),n),e[4]=n,e[5]=i,e[6]=r):r=e[6];let l;return e[7]!==s||e[8]!==r?(l=o.jsx("div",{"data-slot":"alert",role:"alert",className:r,...s}),e[7]=s,e[8]=r,e[9]=l):l=e[9],l}function lr(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let i;e[3]!==n?(i=O("line-clamp-1 min-h-4 font-medium tracking-tight",n),e[3]=n,e[4]=i):i=e[4];let r;return e[5]!==s||e[6]!==i?(r=o.jsx("div",{"data-slot":"alert-title",className:i,...s}),e[5]=s,e[6]=i,e[7]=r):r=e[7],r}function cr(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let i;e[3]!==n?(i=O("text-muted-foreground leading-relaxed",n),e[3]=n,e[4]=i):i=e[4];let r;return e[5]!==s||e[6]!==i?(r=o.jsx("div",{"data-slot":"alert-description",className:i,...s}),e[5]=s,e[6]=i,e[7]=r):r=e[7],r}const fn=t=>t.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function ar(t){const e=C.c(9),{toolName:n,connectionId:s,onBack:i}=t;let r;e[0]!==s?(r={connectionId:s},e[0]=s,e[1]=r):r=e[1];const l=fo(r);if(!l.isAuthenticated){let u;return e[2]!==l.supportsOAuth||e[3]!==i?(u=o.jsx("div",{className:"flex h-full items-center justify-center",children:l.supportsOAuth?o.jsx(mo,{onAuthenticate:()=>i(),buttonText:"Go back to authenticate"}):o.jsx(po,{hasReadme:!1})}),e[2]=l.supportsOAuth,e[3]=i,e[4]=u):u=e[4],u}const c=`${s}:${n}`;let a;return e[5]!==s||e[6]!==c||e[7]!==n?(a=o.jsx(dr,{toolName:n,connectionId:s},c),e[5]=s,e[6]=c,e[7]=n,e[8]=a):a=e[8],a}function dr({toolName:t,connectionId:e}){const s=_t().location.href,{replayId:i}=Bs({strict:!1}),r=(()=>{if(!i)return null;const T=`replay-${i}`,$=sessionStorage.getItem(T);if(!$)return null;sessionStorage.removeItem(T);try{return JSON.parse($)}catch{return null}})(),l=(()=>{if(!r)return null;const T={};for(const[$,A]of Object.entries(r))A!==null&&typeof A=="object"?T[$]=JSON.stringify(A,null,2):T[$]=A;return T})(),[c,a]=k.useState(l??{}),[u,d]=k.useState(r?JSON.stringify(r,null,2):"{}"),[f,m]=k.useState(null),[x,p]=k.useState(null),[h,g]=k.useState(!1),[b,j]=k.useState(null),{org:y}=X(),S=Ye(e),v=Z({connectionId:e,orgId:y.id}),w=Dt({client:v}),N=w.data?.tools?.find(T=>T.name===t),_=N?.inputSchema?.properties,I=_?Object.keys(_):[],E=I.length>0,R={};if(E&&N?.inputSchema?.properties)for(const T of I)R[T]=N.inputSchema.required?.includes(T)?"":void 0;const P=T=>Object.prototype.hasOwnProperty.call(c,T),M=async()=>{g(!0),p(null),m(null),j(null);const T=performance.now();try{if(!v)throw new Error("MCP client is not available");const $=E?{...R,...c}:(()=>{const V=u.trim();if(!V)return{};const J=JSON.parse(V);if(J&&typeof J=="object")return J;throw new Error("Raw JSON input must be an object.")})();E&&N?.inputSchema?.properties&&Object.entries(N.inputSchema.properties).forEach(([V,J])=>{if((J.type==="object"||J.type==="array")&&typeof $[V]=="string")try{$[V]=JSON.parse($[V])}catch{}});const A=await v.callTool({name:t,arguments:$}),B=A.structuredContent??A,oe=performance.now(),Q=Math.round(oe-T);m(B);const se=JSON.stringify(B),K=new TextEncoder().encode(se).length;j({duration:`${Q}ms`,bytes:`${K} bytes`,tokens:`~${Math.ceil(K/4)} tokens`,cost:"$0.0000"})}catch($){const A=$ instanceof Error?$.message:String($);p(A||"Unknown error occurred");const B=performance.now();j({duration:`${Math.round(B-T)}ms`})}finally{g(!1)}},L=(T,$)=>{a(A=>({...A,[T]:$}))},D=()=>{m(null),p(null),j(null)},F=N?.name??fn(t),ee=o.jsx(Mn,{children:o.jsxs(Pn,{children:[o.jsx(Te,{children:o.jsx(Ke,{asChild:!0,children:o.jsx(qe,{to:"/$org/mcps",params:{org:y.slug},children:"Connections"})})}),o.jsx(Je,{}),S&&o.jsxs(o.Fragment,{children:[o.jsx(Te,{children:o.jsx(Ke,{asChild:!0,children:o.jsx(qe,{to:"/$org/mcps/$connectionId",params:{org:y.slug,connectionId:e},search:{tab:"tools"},children:S.title})})}),o.jsx(Je,{})]}),o.jsx(Te,{children:o.jsx(Ln,{children:F})})]})});return o.jsxs(ce,{breadcrumb:ee,children:[o.jsx(Ut,{children:o.jsx(Ft,{title:N?.name??fn(t),url:s,icon:"build"})}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 h-full",children:[o.jsx("div",{className:"flex flex-col border-r border-border overflow-hidden",children:o.jsxs("div",{className:"flex-1 overflow-auto",children:[o.jsx("div",{className:"flex flex-col gap-4 p-6 border-b border-border min-h-28",children:o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(Qe,{icon:S?.icon||null,name:S?.title||t,size:"sm",className:"shadow-sm shrink-0"}),o.jsx("h1",{className:"text-lg font-medium text-foreground leading-none",children:t}),o.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit",children:[w.isSuccess?o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):w.isLoading?o.jsx(Me,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),o.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:w.isSuccess?"ready":w.isLoading?"connecting":"error"})]})]}),o.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:N?.description||"No description available"})]})}),o.jsxs("div",{className:"flex flex-col p-6 gap-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),N?.inputSchema?.required&&N.inputSchema.required.length>0&&o.jsxs("span",{className:"text-xs text-muted-foreground",children:[o.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),o.jsx("div",{className:"space-y-4",children:E&&N?.inputSchema?.properties?Object.entries(N.inputSchema.properties).map(([T,$])=>o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[T,N.inputSchema?.required?.includes(T)&&o.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),o.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:$.type})]}),$.description&&o.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:$.description}),$.type==="object"||$.type==="array"?o.jsx(St,{className:"font-mono text-xs",value:P(T)?c[T]??"":R[T]??"",onChange:A=>L(T,A.target.value),placeholder:`Enter ${T} as JSON...`,rows:3}):$.type==="boolean"?o.jsxs(En,{value:P(T)?String(c[T]??""):"",onValueChange:A=>L(T,A==="true"),children:[o.jsx(On,{children:o.jsx(Rn,{placeholder:"Select true or false..."})}),o.jsxs(An,{children:[o.jsx(wt,{value:"true",children:"true"}),o.jsx(wt,{value:"false",children:"false"})]})]}):o.jsx(Bt,{value:P(T)?c[T]??"":R[T]??"",onChange:A=>L(T,A.target.value),placeholder:`Enter ${T}...`})]},T)):N?.inputSchema&&!E?o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),o.jsx(St,{className:"font-mono text-xs min-h-[120px]",value:u,onChange:T=>d(T.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):o.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:o.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})})]})]})}),o.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[o.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:[o.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),b&&o.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(co,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(Gn,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(Yn,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&o.jsx("div",{className:"flex items-center gap-1.5",children:o.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]})]}),o.jsx("div",{className:"flex items-center justify-end lg:justify-between px-4 h-14 border-b border-border bg-background",children:o.jsxs("div",{className:"flex items-center gap-2 w-full lg:w-auto",children:[o.jsx(U,{size:"sm",variant:"default",className:"h-8 gap-2 flex-1 lg:flex-none",onClick:M,disabled:h,children:h?o.jsxs(o.Fragment,{children:[o.jsx(Me,{size:14,className:"animate-spin"}),"Executing..."]}):o.jsxs(o.Fragment,{children:[o.jsx(qt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})}),o.jsx(Ot,{children:o.jsxs(Rt,{children:[o.jsx(At,{asChild:!0,children:o.jsx(U,{size:"icon",variant:"outline",className:"h-8 w-8 shrink-0",onClick:D,disabled:!f&&!x,children:o.jsx(Kt,{size:14})})}),o.jsx(Mt,{children:o.jsx("p",{children:"Clear results"})})]})})]})}),x&&o.jsx("div",{className:"px-6 py-4 bg-background",children:o.jsx(ir,{variant:"destructive",children:o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(lo,{className:"h-4 w-4"}),o.jsx(lr,{className:"mb-0",children:"Execution Failed"})]}),o.jsx(cr,{className:"text-xs text-destructive",children:x})]})})}),o.jsx("div",{className:"relative flex-1 overflow-auto bg-muted/50",children:f?o.jsxs(o.Fragment,{children:[o.jsx($e,{code:JSON.stringify(f,null,2),language:"json",height:"100%",readOnly:!0}),o.jsx(U,{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(f,null,2)),yn.success("Copied to clipboard")},children:o.jsx(uo,{className:"h-3.5 w-3.5"})})]}):o.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[o.jsx(ao,{className:"h-12 w-12 mb-3 opacity-40"}),o.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]})]})]})}function ur(t){const e=C.c(7),{itemId:n,onBack:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},e[0]=i):i=e[0];const l=re(i).connectionId;if(!Ye(l)||!l){let d;return e[1]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[o.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[1]=d):d=e[1],d}let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(Me,{size:32,className:"animate-spin text-muted-foreground"})}),e[2]=a):a=e[2];let u;return e[3]!==l||e[4]!==s||e[5]!==n?(u=o.jsx(k.Suspense,{fallback:a,children:o.jsx(ar,{toolName:n,connectionId:l,onBack:s})}),e[3]=l,e[4]=s,e[5]=n,e[6]=u):u=e[6],u}const mn=t=>{let e;const n=new Set,s=(u,d)=>{const f=typeof u=="function"?u(e):u;if(!Object.is(f,e)){const m=e;e=d??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(x=>x(e,m))}},i=()=>e,c={setState:s,getState:i,getInitialState:()=>a,subscribe:u=>(n.add(u),()=>n.delete(u))},a=e=t(s,i,c);return c},Yt=(t=>t?mn(t):mn),fr=t=>t;function Nt(t,e=fr){const n=W.useSyncExternalStore(t.subscribe,W.useCallback(()=>e(t.getState()),[t,e]),W.useCallback(()=>e(t.getInitialState()),[t,e]));return W.useDebugValue(n),n}const mr=t=>{const e=Yt(t),n=s=>Nt(e,s);return Object.assign(n,e),n},pr=(t=>mr);function ns(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var r;const l=a=>a===null?null:JSON.parse(a,void 0),c=(r=n.getItem(i))!=null?r:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,r)=>n.setItem(i,JSON.stringify(r,void 0)),removeItem:i=>n.removeItem(i)}}const Ct=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return Ct(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return Ct(s)(n)}}}},xr=(t,e)=>(n,s,i)=>{let r={storage:ns(()=>window.localStorage),partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},l=!1,c=0;const a=new Set,u=new Set;let d=r.storage;if(!d)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),n(...g)},s,i);const f=()=>{const g=r.partialize({...s()});return d.setItem(r.name,{state:g,version:r.version})},m=i.setState;i.setState=(g,b)=>(m(g,b),f());const x=t((...g)=>(n(...g),f()),s,i);i.getInitialState=()=>x;let p;const h=()=>{var g,b;if(!d)return;const j=++c;l=!1,a.forEach(S=>{var v;return S((v=s())!=null?v:x)});const y=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:x))||void 0;return Ct(d.getItem.bind(d))(r.name).then(S=>{if(S)if(typeof S.version=="number"&&S.version!==r.version){if(r.migrate){const v=r.migrate(S.state,S.version);return v instanceof Promise?v.then(w=>[!0,w]):[!0,v]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,S.state];return[!1,void 0]}).then(S=>{var v;if(j!==c)return;const[w,N]=S;if(p=r.merge(N,(v=s())!=null?v:x),n(p,!0),w)return f()}).then(()=>{j===c&&(y?.(p,void 0),p=s(),l=!0,u.forEach(S=>S(p)))}).catch(S=>{j===c&&y?.(void 0,S)})};return i.persist={setOptions:g=>{r={...r,...g},g.storage&&(d=g.storage)},clearStorage:()=>{d?.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(u.add(g),()=>{u.delete(g)})},r.skipHydration||h(),p||x},ss=xr,{useSyncExternalStoreWithSelector:hr}=Us,gr=t=>t;function br(t,e=gr,n){const s=hr(t.subscribe,t.getState,t.getInitialState,e,n);return W.useDebugValue(s),s}const pn=t=>Symbol.iterator in t,xn=t=>"entries"in t,hn=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),s=e instanceof Map?e:new Map(e.entries());if(n.size!==s.size)return!1;for(const[i,r]of n)if(!s.has(i)||!Object.is(r,s.get(i)))return!1;return!0},jr=(t,e)=>{const n=t[Symbol.iterator](),s=e[Symbol.iterator]();let i=n.next(),r=s.next();for(;!i.done&&!r.done;){if(!Object.is(i.value,r.value))return!1;i=n.next(),r=s.next()}return!!i.done&&!!r.done};function vr(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:pn(t)&&pn(e)?xn(t)&&xn(e)?hn(t,e):jr(t,e):hn({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function yr(t,e="Output"){if(!t)return`interface ${e} {}`;function n(r){if(!r||typeof r!="object")return"unknown";const l=r.type;if(Array.isArray(l))return l.map(c=>s(c)).join(" | ");switch(l){case"string":return r.enum?r.enum.map(c=>`"${c}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const c=r.items;return c?`${n(c)}[]`:"unknown[]"}case"object":return i(r);default:return r.anyOf?r.anyOf.map(n).join(" | "):r.oneOf?r.oneOf.map(n).join(" | "):r.allOf?r.allOf.map(n).join(" & "):"unknown"}}function s(r){switch(r){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function i(r){const l=r.properties;if(!l)return"Record<string, unknown>";const c=new Set(r.required||[]);return`{
1
+ import{bE as G,r as k,o as Fs,s as pt,c as C,j as o,bs as _t,u as X,k as Hs,v as Vs,a as re,f as Bs,l as qe,t as yn,bt as W,bF as Us,au as qs,ak as Tt,an as te,av as Sn,aw as Ks,am as $t,as as Js,ax as wn,al as Nn,aD as Gs,aE as Xs,aq as Cn,aF as Zs,bG as Et,bH as Qs,at as Ys,aV as eo,aT as to,bI as no,bJ as kn}from"./index-DkVMZPZp.js";import{E as In,I as Qe,c as Ot,b as Rt,T as At,a as Mt,n as so}from"./empty-state-yKA0Dnoy.js";import{E as _n}from"./error-boundary-DMzArMGc.js";import{a as Pt,u as Lt,c as Ye,j as Dt,e as oo,h as zt,g as Wt}from"./use-connection-BNgYG_2P.js";import{u as Z,i as ro}from"./constants-Chp3RuVB.js";import{S as Tn,P as Ft}from"./index-BLFsiDnl.js";import{F as xt,a as io,b as Ht,d as Vt}from"./form-3eNCom8C.js";import{I as Bt}from"./input-BKM3goZw.js";import{T as St}from"./textarea-BQ5-74yh.js";import{b as $n,V as Ut,a as ce}from"./layout-B7iU_InR.js";import{c as O,B as U}from"./button-CWzK0IXA.js";import{S as En,a as On,b as Rn,c as An,d as wt}from"./select-Df9aMNs1.js";import{i as lo}from"./AlertCircle-C47UrlAO.js";import{s as co,M as $e}from"./monaco-editor-DcchC01p.js";import{i as ao}from"./Code01-DSEEeIpb.js";import{a as uo}from"./Copy01-BY9LQ_eS.js";import{i as Me}from"./Loading01-BpkkTLVp.js";import{i as qt}from"./Play-COkFzcB7.js";import{s as Kt}from"./XClose-CxBh99Dw.js";import{B as Mn,a as Pn,b as Te,c as Ke,d as Je,e as Ln}from"./breadcrumb-B1KWdwh9.js";import{u as fo,O as mo,M as po,F as xo,v as ho}from"./index-6SKae0YQ.js";import{E as Jt}from"./empty-state-DrSUCtH7.js";import{D as go,a as bo}from"./use-binding-CDLcDLTQ.js";import{b as Dn}from"./use-virtual-mcp-CEZ5nKxx.js";import{b as jo,a as an,R as vo}from"./resizable-DQrwcKJh.js";import{S as et}from"./spinner-D8NZVmaU.js";import{V as yo}from"./view-mode-toggle-Cz9APct2.js";import{N as So,S as wo,a as No,c as Co,m as Ve,P as ko,i as Io,R as _o,b as To,d as $o,e as dn,E as Eo,f as Oo}from"./index-8f9n1Jea.js";import{b as Ro,c as Ao,d as Mo,e as Po,a as Lo,D as Do}from"./dialog-BiNw4dY-.js";import"./index-DyvOt7HW.js";import{s as zn}from"./Plus-8ovTaJHc.js";import{n as zo}from"./Calendar-B649-aT8.js";import{i as Gt}from"./Check-hF_kXZiK.js";import{i as Wo}from"./DotsHorizontal-Bk4oST9u.js";import{a as Fo}from"./Tool01-BZbzIS2w.js";import{D as Ho,a as Vo,b as Bo,c as un}from"./dropdown-menu-D0wZWcOa.js";import{T as Uo,R as qo,d as Ko,e as Wn}from"./collapsible-C_w2O0ke.js";import{i as Jo}from"./ChevronRight-0gQ-Lwyj.js";import{B as _e}from"./badge-tO1xwt4d.js";import{i as Fn}from"./X-BNK0mLul.js";import"./useMutation-CFQDhqDA.js";import"./useQuery-BSKCoFrF.js";import"./Pin01-DnWh89mj.js";import"./use-organization-settings-DZiQDtex.js";import"./index-ssfNqXSw.js";import"./ChevronDown-CwChLZoe.js";import"./infiniteQueryObserver-BRy8d1pq.js";import"./mcp-oauth-D7Oz8tNV.js";import"./File06-CV2OmgsQ.js";import"./Key01-Bzha2Tgh.js";import"./constants-DUMQK_Jq.js";import"./registry-utils-DFPURwxl.js";import"./extract-connection-data-Cegvn5cS.js";import"./github-icon-Dp3wHhYE.js";import"./generate-id-Dyweu44Y.js";import"./circle-alert-CChO7Clp.js";import"./binder-_fA_QfCQ.js";import"./popover-C0G-pXcc.js";import"./use-mcp-prompts-CHXMWYZ1.js";import"./ArrowUp-NpHWyg3u.js";import"./Edit01-HUE0OI4J.js";import"./Users03-8GhqNBdf.js";import"./Terminal--fMComVX.js";import"./localstorage-keys-DVhuzRr7.js";import"./SearchMd-SRsVDK9N.js";import"./Trash01-BhWwFORM.js";import"./use-create-virtual-mcp-DkV_YHpf.js";import"./Grid01-DshI78vi.js";import"./Image01-BR8oz0fK.js";const Hn=G("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const Vn=G("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const Xt=G("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Zt=G("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const Go=G("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const Xo=G("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const Zo=G("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const Bn=G("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const Un=G("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const qn=G("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const Kn=G("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const Jn=G("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]),Qt=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M12 8v4m0 4h.01M2 8.523v6.954c0 .245 0 .367.028.482a1 1 0 0 0 .12.29c.061.1.148.187.32.36l4.923 4.922c.173.173.26.26.36.322.09.054.188.095.29.12.115.027.237.027.482.027h6.954c.245 0 .367 0 .482-.028a.998.998 0 0 0 .29-.12c.1-.061.187-.148.36-.32l4.922-4.923c.173-.173.26-.26.322-.36a.998.998 0 0 0 .12-.29c.027-.115.027-.237.027-.482V8.523c0-.245 0-.367-.028-.482a.998.998 0 0 0-.12-.29c-.061-.1-.148-.187-.32-.36L16.608 2.47c-.173-.173-.26-.26-.36-.322a1 1 0 0 0-.29-.12C15.844 2 15.722 2 15.477 2H8.523c-.245 0-.367 0-.482.028a1 1 0 0 0-.29.12c-.1.061-.187.148-.36.32L2.47 7.392c-.173.173-.26.26-.322.36a1 1 0 0 0-.12.29C2 8.156 2 8.278 2 8.523Z"}));Qt.displayName="AlertOctagon";const Gn=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.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"}));Gn.displayName="Box";const Xn=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m22.7 11.5-2 2-2-2m2.245 1.5A9 9 0 1 0 19 17.657M12 7v5l3 2"}));Xn.displayName="ClockFastForward";const Zn=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m17 17 5-5-5-5M7 7l-5 5 5 5m7-14-4 18"}));Zn.displayName="Code02";const Be=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M6.8 3h-.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21h.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C10 19.48 10 18.92 10 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C8.48 3 7.92 3 6.8 3Zm11 0h-.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C14 4.52 14 5.08 14 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C15.52 21 16.08 21 17.2 21h.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3Z"}));Be.displayName="Columns01";const Qn=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M4 4v1.4c0 3.36 0 5.04.654 6.324a6 6 0 0 0 2.622 2.622C8.56 15 10.24 15 13.6 15H20m0 0-5-5m5 5-5 5"}));Qn.displayName="CornerDownRight";const Yn=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.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"}));Yn.displayName="Database01";const es=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M3 3v10.2c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 18 6.12 18 7.8 18H15m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0ZM3 8h12m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0Z"}));es.displayName="GitBranch01";const ts=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m13 22-3-3m0 0 3-3m-3 3h5a7 7 0 0 0 3-13.326M6 18.326A7 7 0 0 1 9 5h5m0 0-3-3m3 3-3 3"}));ts.displayName="Repeat03";Fs({title:pt().min(1),description:pt().nullable(),body:pt()});function ht(t){for(const e of t.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Qo(){const t=window.location.pathname.split("/").filter(Boolean),e=t.findIndex(s=>s==="mcps"),n=e>=0?t[e+1]:void 0;return n?decodeURIComponent(n):void 0}function Yo(t){const e=C.c(13),{form:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=s):s=e[0];let i;e[1]!==n.control?(i=o.jsxs("div",{className:"flex flex-col gap-4",children:[s,o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsx(xt,{control:n.control,name:"title",render:nr}),o.jsx(xt,{control:n.control,name:"description",render:tr})]})]}),e[1]=n.control,e[2]=i):i=e[2];let r,l;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),l=o.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=r,e[4]=l):(r=e[3],l=e[4]);let c;e[5]!==n.control?(c=o.jsxs("div",{className:"flex flex-col gap-2",children:[r,l,o.jsx(xt,{control:n.control,name:"body",render:er})]}),e[5]=n.control,e[6]=c):c=e[6];let a;e[7]!==i||e[8]!==c?(a=o.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[i,c]}),e[7]=i,e[8]=c,e[9]=a):a=e[9];let u;return e[10]!==n||e[11]!==a?(u=o.jsx(io,{...n,children:a}),e[10]=n,e[11]=a,e[12]=u):u=e[12],u}function er(t){const{field:e}=t;return o.jsx(Ht,{children:o.jsx(Vt,{children:o.jsx(St,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] 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 tr(t){const{field:e}=t;return o.jsxs(Ht,{children:[o.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),o.jsx(Vt,{children:o.jsx(Bt,{...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 nr(t){const{field:e}=t;return o.jsxs(Ht,{children:[o.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),o.jsx(Vt,{children:o.jsx(Bt,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function sr(t){const e=C.c(41),{providerId:n,promptId:s}=t,r=_t().location.href,{org:l}=X(),c=n||null;let a;e[0]!==l.id||e[1]!==c?(a={connectionId:c,orgId:l.id},e[0]=l.id,e[1]=c,e[2]=a):a=e[2];const u=Z(a),d=Pt(n,"PROMPT",s,u),f=Lt(n,"PROMPT",u),m=f.update.isPending;let x;e[3]!==d?(x=d?{title:d.title,description:d.description??null,body:ht(d)}:void 0,e[3]=d,e[4]=x):x=e[4];let p;e[5]!==x?(p={values:x},e[5]=x,e[6]=p):p=e[6];const h=Hs(p);let g;e[7]!==h||e[8]!==d?(g=()=>{d&&h.reset({title:d.title,description:d.description??null,body:ht(d)})},e[7]=h,e[8]=d,e[9]=g):g=e[9];const b=g;let j;e[10]!==f.update||e[11]!==h||e[12]!==s?(j=h.handleSubmit(async M=>{const L=await f.update.mutateAsync({id:s,data:{title:M.title,description:M.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:M.body}}]}});h.reset({title:L.title,description:L.description??null,body:ht(L)})}),e[10]=f.update,e[11]=h,e[12]=s,e[13]=j):j=e[13];const y=j;if(!d){let M;return e[14]===Symbol.for("react.memo_cache_sentinel")?(M=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(In,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[14]=M):M=e[14],M}let S;e[15]!==d.title?(S=o.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:d.title}),e[15]=d.title,e[16]=S):S=e[16];let v;e[17]!==d.description?(v=d.description?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),o.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:d.description})]}):null,e[17]=d.description,e[18]=v):v=e[18];let w;e[19]!==S||e[20]!==v?(w=o.jsx($n,{children:o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[S,v]})}),e[19]=S,e[20]=v,e[21]=w):w=e[21];let N;e[22]!==y?(N=()=>{y()},e[22]=y,e[23]=N):N=e[23];let _;e[24]!==h.formState.isDirty||e[25]!==m||e[26]!==b||e[27]!==N?(_=o.jsx(Tn,{onSave:N,onUndo:b,isDirty:h.formState.isDirty,isSaving:m}),e[24]=h.formState.isDirty,e[25]=m,e[26]=b,e[27]=N,e[28]=_):_=e[28];let I;e[29]!==d.title||e[30]!==r?(I=o.jsx(Ft,{title:d.title,url:r,icon:"description"}),e[29]=d.title,e[30]=r,e[31]=I):I=e[31];let E;e[32]!==_||e[33]!==I?(E=o.jsxs(Ut,{children:[_,I]}),e[32]=_,e[33]=I,e[34]=E):E=e[34];let R;e[35]!==h?(R=o.jsx("div",{className:"h-full",children:o.jsx(Yo,{form:h})}),e[35]=h,e[36]=R):R=e[36];let P;return e[37]!==E||e[38]!==R||e[39]!==w?(P=o.jsxs(ce,{children:[w,E,R]}),e[37]=E,e[38]=R,e[39]=w,e[40]=P):P=e[40],P}function or(t){const e=C.c(4),{itemId:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=Qo(),e[0]=s):s=e[0];const i=s;if(!i){let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(In,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=l):l=e[1],l}let r;return e[2]!==n?(r=o.jsx(_n,{children:o.jsx(k.Suspense,{fallback:null,children:o.jsx(sr,{providerId:i,promptId:n})})}),e[2]=n,e[3]=r):r=e[3],r}const rr=Vs("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 ir(t){const e=C.c(10);let n,s,i;e[0]!==t?({className:n,variant:i,...s}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=i):(n=e[1],s=e[2],i=e[3]);let r;e[4]!==n||e[5]!==i?(r=O(rr({variant:i}),n),e[4]=n,e[5]=i,e[6]=r):r=e[6];let l;return e[7]!==s||e[8]!==r?(l=o.jsx("div",{"data-slot":"alert",role:"alert",className:r,...s}),e[7]=s,e[8]=r,e[9]=l):l=e[9],l}function lr(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let i;e[3]!==n?(i=O("line-clamp-1 min-h-4 font-medium tracking-tight",n),e[3]=n,e[4]=i):i=e[4];let r;return e[5]!==s||e[6]!==i?(r=o.jsx("div",{"data-slot":"alert-title",className:i,...s}),e[5]=s,e[6]=i,e[7]=r):r=e[7],r}function cr(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let i;e[3]!==n?(i=O("text-muted-foreground leading-relaxed",n),e[3]=n,e[4]=i):i=e[4];let r;return e[5]!==s||e[6]!==i?(r=o.jsx("div",{"data-slot":"alert-description",className:i,...s}),e[5]=s,e[6]=i,e[7]=r):r=e[7],r}const fn=t=>t.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function ar(t){const e=C.c(9),{toolName:n,connectionId:s,onBack:i}=t;let r;e[0]!==s?(r={connectionId:s},e[0]=s,e[1]=r):r=e[1];const l=fo(r);if(!l.isAuthenticated){let u;return e[2]!==l.supportsOAuth||e[3]!==i?(u=o.jsx("div",{className:"flex h-full items-center justify-center",children:l.supportsOAuth?o.jsx(mo,{onAuthenticate:()=>i(),buttonText:"Go back to authenticate"}):o.jsx(po,{hasReadme:!1})}),e[2]=l.supportsOAuth,e[3]=i,e[4]=u):u=e[4],u}const c=`${s}:${n}`;let a;return e[5]!==s||e[6]!==c||e[7]!==n?(a=o.jsx(dr,{toolName:n,connectionId:s},c),e[5]=s,e[6]=c,e[7]=n,e[8]=a):a=e[8],a}function dr({toolName:t,connectionId:e}){const s=_t().location.href,{replayId:i}=Bs({strict:!1}),r=(()=>{if(!i)return null;const T=`replay-${i}`,$=sessionStorage.getItem(T);if(!$)return null;sessionStorage.removeItem(T);try{return JSON.parse($)}catch{return null}})(),l=(()=>{if(!r)return null;const T={};for(const[$,A]of Object.entries(r))A!==null&&typeof A=="object"?T[$]=JSON.stringify(A,null,2):T[$]=A;return T})(),[c,a]=k.useState(l??{}),[u,d]=k.useState(r?JSON.stringify(r,null,2):"{}"),[f,m]=k.useState(null),[x,p]=k.useState(null),[h,g]=k.useState(!1),[b,j]=k.useState(null),{org:y}=X(),S=Ye(e),v=Z({connectionId:e,orgId:y.id}),w=Dt({client:v}),N=w.data?.tools?.find(T=>T.name===t),_=N?.inputSchema?.properties,I=_?Object.keys(_):[],E=I.length>0,R={};if(E&&N?.inputSchema?.properties)for(const T of I)R[T]=N.inputSchema.required?.includes(T)?"":void 0;const P=T=>Object.prototype.hasOwnProperty.call(c,T),M=async()=>{g(!0),p(null),m(null),j(null);const T=performance.now();try{if(!v)throw new Error("MCP client is not available");const $=E?{...R,...c}:(()=>{const V=u.trim();if(!V)return{};const J=JSON.parse(V);if(J&&typeof J=="object")return J;throw new Error("Raw JSON input must be an object.")})();E&&N?.inputSchema?.properties&&Object.entries(N.inputSchema.properties).forEach(([V,J])=>{if((J.type==="object"||J.type==="array")&&typeof $[V]=="string")try{$[V]=JSON.parse($[V])}catch{}});const A=await v.callTool({name:t,arguments:$}),B=A.structuredContent??A,oe=performance.now(),Q=Math.round(oe-T);m(B);const se=JSON.stringify(B),K=new TextEncoder().encode(se).length;j({duration:`${Q}ms`,bytes:`${K} bytes`,tokens:`~${Math.ceil(K/4)} tokens`,cost:"$0.0000"})}catch($){const A=$ instanceof Error?$.message:String($);p(A||"Unknown error occurred");const B=performance.now();j({duration:`${Math.round(B-T)}ms`})}finally{g(!1)}},L=(T,$)=>{a(A=>({...A,[T]:$}))},D=()=>{m(null),p(null),j(null)},F=N?.name??fn(t),ee=o.jsx(Mn,{children:o.jsxs(Pn,{children:[o.jsx(Te,{children:o.jsx(Ke,{asChild:!0,children:o.jsx(qe,{to:"/$org/mcps",params:{org:y.slug},children:"Connections"})})}),o.jsx(Je,{}),S&&o.jsxs(o.Fragment,{children:[o.jsx(Te,{children:o.jsx(Ke,{asChild:!0,children:o.jsx(qe,{to:"/$org/mcps/$connectionId",params:{org:y.slug,connectionId:e},search:{tab:"tools"},children:S.title})})}),o.jsx(Je,{})]}),o.jsx(Te,{children:o.jsx(Ln,{children:F})})]})});return o.jsxs(ce,{breadcrumb:ee,children:[o.jsx(Ut,{children:o.jsx(Ft,{title:N?.name??fn(t),url:s,icon:"build"})}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 h-full",children:[o.jsx("div",{className:"flex flex-col border-r border-border overflow-hidden",children:o.jsxs("div",{className:"flex-1 overflow-auto",children:[o.jsx("div",{className:"flex flex-col gap-4 p-6 border-b border-border min-h-28",children:o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(Qe,{icon:S?.icon||null,name:S?.title||t,size:"sm",className:"shadow-sm shrink-0"}),o.jsx("h1",{className:"text-lg font-medium text-foreground leading-none",children:t}),o.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit",children:[w.isSuccess?o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):w.isLoading?o.jsx(Me,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),o.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:w.isSuccess?"ready":w.isLoading?"connecting":"error"})]})]}),o.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:N?.description||"No description available"})]})}),o.jsxs("div",{className:"flex flex-col p-6 gap-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),N?.inputSchema?.required&&N.inputSchema.required.length>0&&o.jsxs("span",{className:"text-xs text-muted-foreground",children:[o.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),o.jsx("div",{className:"space-y-4",children:E&&N?.inputSchema?.properties?Object.entries(N.inputSchema.properties).map(([T,$])=>o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[T,N.inputSchema?.required?.includes(T)&&o.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),o.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:$.type})]}),$.description&&o.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:$.description}),$.type==="object"||$.type==="array"?o.jsx(St,{className:"font-mono text-xs",value:P(T)?c[T]??"":R[T]??"",onChange:A=>L(T,A.target.value),placeholder:`Enter ${T} as JSON...`,rows:3}):$.type==="boolean"?o.jsxs(En,{value:P(T)?String(c[T]??""):"",onValueChange:A=>L(T,A==="true"),children:[o.jsx(On,{children:o.jsx(Rn,{placeholder:"Select true or false..."})}),o.jsxs(An,{children:[o.jsx(wt,{value:"true",children:"true"}),o.jsx(wt,{value:"false",children:"false"})]})]}):o.jsx(Bt,{value:P(T)?c[T]??"":R[T]??"",onChange:A=>L(T,A.target.value),placeholder:`Enter ${T}...`})]},T)):N?.inputSchema&&!E?o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),o.jsx(St,{className:"font-mono text-xs min-h-[120px]",value:u,onChange:T=>d(T.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):o.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:o.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})})]})]})}),o.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[o.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:[o.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),b&&o.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(co,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(Gn,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(Yn,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&o.jsx("div",{className:"flex items-center gap-1.5",children:o.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]})]}),o.jsx("div",{className:"flex items-center justify-end lg:justify-between px-4 h-14 border-b border-border bg-background",children:o.jsxs("div",{className:"flex items-center gap-2 w-full lg:w-auto",children:[o.jsx(U,{size:"sm",variant:"default",className:"h-8 gap-2 flex-1 lg:flex-none",onClick:M,disabled:h,children:h?o.jsxs(o.Fragment,{children:[o.jsx(Me,{size:14,className:"animate-spin"}),"Executing..."]}):o.jsxs(o.Fragment,{children:[o.jsx(qt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})}),o.jsx(Ot,{children:o.jsxs(Rt,{children:[o.jsx(At,{asChild:!0,children:o.jsx(U,{size:"icon",variant:"outline",className:"h-8 w-8 shrink-0",onClick:D,disabled:!f&&!x,children:o.jsx(Kt,{size:14})})}),o.jsx(Mt,{children:o.jsx("p",{children:"Clear results"})})]})})]})}),x&&o.jsx("div",{className:"px-6 py-4 bg-background",children:o.jsx(ir,{variant:"destructive",children:o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(lo,{className:"h-4 w-4"}),o.jsx(lr,{className:"mb-0",children:"Execution Failed"})]}),o.jsx(cr,{className:"text-xs text-destructive",children:x})]})})}),o.jsx("div",{className:"relative flex-1 overflow-auto bg-muted/50",children:f?o.jsxs(o.Fragment,{children:[o.jsx($e,{code:JSON.stringify(f,null,2),language:"json",height:"100%",readOnly:!0}),o.jsx(U,{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(f,null,2)),yn.success("Copied to clipboard")},children:o.jsx(uo,{className:"h-3.5 w-3.5"})})]}):o.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[o.jsx(ao,{className:"h-12 w-12 mb-3 opacity-40"}),o.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]})]})]})}function ur(t){const e=C.c(7),{itemId:n,onBack:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},e[0]=i):i=e[0];const l=re(i).connectionId;if(!Ye(l)||!l){let d;return e[1]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[o.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[1]=d):d=e[1],d}let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(Me,{size:32,className:"animate-spin text-muted-foreground"})}),e[2]=a):a=e[2];let u;return e[3]!==l||e[4]!==s||e[5]!==n?(u=o.jsx(k.Suspense,{fallback:a,children:o.jsx(ar,{toolName:n,connectionId:l,onBack:s})}),e[3]=l,e[4]=s,e[5]=n,e[6]=u):u=e[6],u}const mn=t=>{let e;const n=new Set,s=(u,d)=>{const f=typeof u=="function"?u(e):u;if(!Object.is(f,e)){const m=e;e=d??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(x=>x(e,m))}},i=()=>e,c={setState:s,getState:i,getInitialState:()=>a,subscribe:u=>(n.add(u),()=>n.delete(u))},a=e=t(s,i,c);return c},Yt=(t=>t?mn(t):mn),fr=t=>t;function Nt(t,e=fr){const n=W.useSyncExternalStore(t.subscribe,W.useCallback(()=>e(t.getState()),[t,e]),W.useCallback(()=>e(t.getInitialState()),[t,e]));return W.useDebugValue(n),n}const mr=t=>{const e=Yt(t),n=s=>Nt(e,s);return Object.assign(n,e),n},pr=(t=>mr);function ns(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var r;const l=a=>a===null?null:JSON.parse(a,void 0),c=(r=n.getItem(i))!=null?r:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,r)=>n.setItem(i,JSON.stringify(r,void 0)),removeItem:i=>n.removeItem(i)}}const Ct=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return Ct(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return Ct(s)(n)}}}},xr=(t,e)=>(n,s,i)=>{let r={storage:ns(()=>window.localStorage),partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},l=!1,c=0;const a=new Set,u=new Set;let d=r.storage;if(!d)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),n(...g)},s,i);const f=()=>{const g=r.partialize({...s()});return d.setItem(r.name,{state:g,version:r.version})},m=i.setState;i.setState=(g,b)=>(m(g,b),f());const x=t((...g)=>(n(...g),f()),s,i);i.getInitialState=()=>x;let p;const h=()=>{var g,b;if(!d)return;const j=++c;l=!1,a.forEach(S=>{var v;return S((v=s())!=null?v:x)});const y=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:x))||void 0;return Ct(d.getItem.bind(d))(r.name).then(S=>{if(S)if(typeof S.version=="number"&&S.version!==r.version){if(r.migrate){const v=r.migrate(S.state,S.version);return v instanceof Promise?v.then(w=>[!0,w]):[!0,v]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,S.state];return[!1,void 0]}).then(S=>{var v;if(j!==c)return;const[w,N]=S;if(p=r.merge(N,(v=s())!=null?v:x),n(p,!0),w)return f()}).then(()=>{j===c&&(y?.(p,void 0),p=s(),l=!0,u.forEach(S=>S(p)))}).catch(S=>{j===c&&y?.(void 0,S)})};return i.persist={setOptions:g=>{r={...r,...g},g.storage&&(d=g.storage)},clearStorage:()=>{d?.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(u.add(g),()=>{u.delete(g)})},r.skipHydration||h(),p||x},ss=xr,{useSyncExternalStoreWithSelector:hr}=Us,gr=t=>t;function br(t,e=gr,n){const s=hr(t.subscribe,t.getState,t.getInitialState,e,n);return W.useDebugValue(s),s}const pn=t=>Symbol.iterator in t,xn=t=>"entries"in t,hn=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),s=e instanceof Map?e:new Map(e.entries());if(n.size!==s.size)return!1;for(const[i,r]of n)if(!s.has(i)||!Object.is(r,s.get(i)))return!1;return!0},jr=(t,e)=>{const n=t[Symbol.iterator](),s=e[Symbol.iterator]();let i=n.next(),r=s.next();for(;!i.done&&!r.done;){if(!Object.is(i.value,r.value))return!1;i=n.next(),r=s.next()}return!!i.done&&!!r.done};function vr(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:pn(t)&&pn(e)?xn(t)&&xn(e)?hn(t,e):jr(t,e):hn({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function yr(t,e="Output"){if(!t)return`interface ${e} {}`;function n(r){if(!r||typeof r!="object")return"unknown";const l=r.type;if(Array.isArray(l))return l.map(c=>s(c)).join(" | ");switch(l){case"string":return r.enum?r.enum.map(c=>`"${c}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const c=r.items;return c?`${n(c)}[]`:"unknown[]"}case"object":return i(r);default:return r.anyOf?r.anyOf.map(n).join(" | "):r.oneOf?r.oneOf.map(n).join(" | "):r.allOf?r.allOf.map(n).join(" & "):"unknown"}}function s(r){switch(r){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function i(r){const l=r.properties;if(!l)return"Record<string, unknown>";const c=new Set(r.required||[]);return`{
2
2
  ${Object.entries(l).map(([u,d])=>{const f=c.has(u)?"":"?";return`${d.description?` /** ${d.description} */
3
3
  `:""} ${u}${f}: ${n(d)};`}).join(`
4
4
  `)}
@@ -1 +1 @@
1
- import{c as v,j as i}from"./index-BAZLm9w0.js";import{i as w}from"./Loading01-DCWQbhnz.js";import{i as C}from"./SearchMd-BWXZ4bVC.js";import{I as k}from"./input-DHWQboe4.js";import{c as b}from"./button-nyR0JH2l.js";function R(j){const e=v.c(21),{value:m,onChange:d,placeholder:g,onKeyDown:f,className:p,isSearching:u,disabled:n}=j,x=g===void 0?"Search...":g;let t;e[0]!==p?(t=b("shrink-0 w-full border-b border-border h-12",p),e[0]=p,e[1]=t):t=e[1];const h=n?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let r;e[4]!==u?(r=u?i.jsx(w,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):i.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=u,e[5]=r):r=e[5];let o;e[6]!==d?(o=N=>d(N.target.value),e[6]=d,e[7]=o):o=e[7];let l;e[8]!==n||e[9]!==f||e[10]!==x||e[11]!==o||e[12]!==m?(l=i.jsx(k,{value:m,onChange:o,onKeyDown:f,placeholder:x,disabled:n,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[8]=n,e[9]=f,e[10]=x,e[11]=o,e[12]=m,e[13]=l):l=e[13];let a;e[14]!==s||e[15]!==r||e[16]!==l?(a=i.jsxs("label",{className:s,children:[r,l]}),e[14]=s,e[15]=r,e[16]=l,e[17]=a):a=e[17];let c;return e[18]!==t||e[19]!==a?(c=i.jsx("div",{className:t,children:a}),e[18]=t,e[19]=a,e[20]=c):c=e[20],c}export{R as C};
1
+ import{c as v,j as i}from"./index-DkVMZPZp.js";import{i as w}from"./Loading01-BpkkTLVp.js";import{i as C}from"./SearchMd-SRsVDK9N.js";import{I as k}from"./input-BKM3goZw.js";import{c as b}from"./button-CWzK0IXA.js";function R(j){const e=v.c(21),{value:m,onChange:d,placeholder:g,onKeyDown:f,className:p,isSearching:u,disabled:n}=j,x=g===void 0?"Search...":g;let t;e[0]!==p?(t=b("shrink-0 w-full border-b border-border h-12",p),e[0]=p,e[1]=t):t=e[1];const h=n?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let r;e[4]!==u?(r=u?i.jsx(w,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):i.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=u,e[5]=r):r=e[5];let o;e[6]!==d?(o=N=>d(N.target.value),e[6]=d,e[7]=o):o=e[7];let l;e[8]!==n||e[9]!==f||e[10]!==x||e[11]!==o||e[12]!==m?(l=i.jsx(k,{value:m,onChange:o,onKeyDown:f,placeholder:x,disabled:n,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[8]=n,e[9]=f,e[10]=x,e[11]=o,e[12]=m,e[13]=l):l=e[13];let a;e[14]!==s||e[15]!==r||e[16]!==l?(a=i.jsxs("label",{className:s,children:[r,l]}),e[14]=s,e[15]=r,e[16]=l,e[17]=a):a=e[17];let c;return e[18]!==t||e[19]!==a?(c=i.jsx("div",{className:t,children:a}),e[18]=t,e[19]=a,e[20]=c):c=e[20],c}export{R as C};
@@ -1 +1 @@
1
- import{c as Ae,j as t,w as Xe,g as Ye,u as Ze,r as et,t as tt}from"./index-BAZLm9w0.js";import{g as $e}from"./generate-id-Dyweu44Y.js";import{a as st,C as Me}from"./collection-table-wrapper-Ad_-F1tG.js";import{C as ot}from"./collection-search-DgJbkAZh.js";import{C as it}from"./card-DVnhjUGd.js";import{I as Fe,E as nt}from"./empty-state-Z8nGys2S.js";import{D as ke,a as Ke,b as Ue,c as k}from"./dropdown-menu-BUrC7H_I.js";import{B as Ie}from"./button-nyR0JH2l.js";import{a as Le}from"./Copy01-C6IJYSqu.js";import{i as Be}from"./DotsVertical-BpzYqYSl.js";import{i as Ve}from"./Edit01-BObRJWWQ.js";import{s as Re,U as rt,u as lt}from"./use-list-state-CCCWL8bD.js";import{s as We}from"./Trash01-C_hJOK44.js";import{E as Oe}from"./empty-state-C0f9rz3s.js";import{n as ze}from"./Inbox01-Dn_ZLwmj.js";import{B as at}from"./constants-DpsR0LZe.js";import{A as ct,g as dt,c as pt,b as mt,d as ut,e as ft,a as ht,f as xt}from"./alert-dialog-CHAGlLFb.js";import{u as gt,b as jt}from"./use-connection-k5RUrkjP.js";import{u as Ct}from"./constants-CJQnv32m.js";import{s as vt}from"./Plus-CG8dB40n.js";import{V as bt}from"./layout-DsaX6gcJ.js";function yt(n,e){const s=n.properties||{};for(const i in s){const l=s[i];if(l&&l.type==="string"&&(l.format==="url"||l.format==="uri")&&e&&typeof e=="object"&&i in e&&e[i])return e[i]}const r=["image","img","avatar","icon","logo","thumbnail","cover"];for(const i of r)if(e&&typeof e=="object"&&i in e&&typeof e[i]=="string")return e[i]}function Nt(n){const e=Ae.c(25),{item:s,schema:r,actions:i}=n;let l;e[0]!==s||e[1]!==r?(l=yt(r,s),e[0]=s,e[1]=r,e[2]=l):l=e[2];const u=l,p=s&&typeof s=="object"&&"description"in s&&typeof s.description=="string"?s.description:void 0;let j;e[3]!==i?(j=i&&Object.keys(i).length>0,e[3]=i,e[4]=j):j=e[4];const o=j;let m;e[5]!==u||e[6]!==s.title?(m=t.jsx(Fe,{icon:u,name:s.title,size:"md",className:"shrink-0 shadow-sm"}),e[5]=u,e[6]=s.title,e[7]=m):m=e[7];let f;e[8]!==s.title?(f=t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:s.title}),e[8]=s.title,e[9]=f):f=e[9];const d=p||"No description";let c;e[10]!==d?(c=t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:d}),e[10]=d,e[11]=c):c=e[11];let C;e[12]!==f||e[13]!==c?(C=t.jsxs("div",{className:"flex flex-col gap-0 flex-1",children:[f,c]}),e[12]=f,e[13]=c,e[14]=C):C=e[14];let y;e[15]!==m||e[16]!==C?(y=t.jsxs("div",{className:"flex flex-col gap-4 p-6 flex-1",children:[m,C]}),e[15]=m,e[16]=C,e[17]=y):y=e[17];let a;e[18]!==i||e[19]!==o||e[20]!==s?(a=o&&t.jsx("div",{className:"absolute top-6 right-6 opacity-0 group-hover:opacity-100 transition-opacity",onClick:_t,onMouseDown:Dt,children:t.jsxs(ke,{children:[t.jsx(Ke,{asChild:!0,children:t.jsx(Ie,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:St,children:t.jsx(Be,{size:20})})}),t.jsxs(Ue,{align:"end",onClick:wt,children:[i.open&&t.jsxs(k,{onClick:h=>{h.stopPropagation(),i.open?.(s)},children:[t.jsx(Re,{size:16}),"Open"]}),i.edit&&t.jsxs(k,{onClick:h=>{h.stopPropagation(),i.edit?.(s)},children:[t.jsx(Ve,{size:16}),"Edit"]}),i.duplicate&&t.jsxs(k,{onClick:h=>{h.stopPropagation(),i.duplicate?.(s)},children:[t.jsx(Le,{size:16}),"Duplicate"]}),i.delete&&t.jsxs(k,{variant:"destructive",onClick:h=>{h.stopPropagation(),i.delete?.(s)},children:[t.jsx(We,{size:16}),"Delete"]})]})]})}),e[18]=i,e[19]=o,e[20]=s,e[21]=a):a=e[21];let S;return e[22]!==y||e[23]!==a?(S=t.jsxs(it,{className:"cursor-pointer transition-colors h-full flex flex-col group relative",children:[y,a]}),e[22]=y,e[23]=a,e[24]=S):S=e[24],S}function wt(n){return n.stopPropagation()}function St(n){return n.stopPropagation()}function Dt(n){return n.stopPropagation()}function _t(n){return n.stopPropagation()}const At=["icon","avatar","logo"],Ee=["created_at","created_by","id"];function It(n){return Object.keys(n).find(e=>At.includes(e.toLowerCase()))}function Ge(n,e){return Object.keys(n.properties||{}).filter(s=>["id","created_at","updated_at","created_by","updated_by"].includes(s)?!1:e?e.includes(s):!0).map(s=>({id:s,label:s.charAt(0).toUpperCase()+s.slice(1).replace(/_/g," ")}))}function Pt(n){const e=Ae.c(32),{data:s,schema:r,viewMode:i,onViewModeChange:l,search:u,sortKey:p,sortDirection:j,onSort:o,actions:m,onItemClick:f,headerActions:d,emptyState:c,readOnly:C,columns:y,hideToolbar:a,sortableFields:S}=n,h=l===void 0?Et:l,x=j===void 0?"asc":j,P=o===void 0?zt:o;let v;e[0]!==m?(v=m===void 0?{}:m,e[0]=m,e[1]=v):v=e[1];const D=v,_=f===void 0?Ot:f,z=d===void 0?null:d,b=c===void 0?null:c,T=C===void 0?!1:C,N=y===void 0?void 0:y,F=a===void 0?!1:a,w=S===void 0?void 0:S;let E;e[2]!==N||e[3]!==r||e[4]!==w?(E=N?N.filter($t).filter(M=>!w||w.includes(M.id)).map(Tt):Ge(r,w),e[2]=N,e[3]=r,e[4]=w,e[5]=E):E=e[5];const $=E;let A;e[6]!==z||e[7]!==F||e[8]!==P||e[9]!==h||e[10]!==x||e[11]!==p||e[12]!==$||e[13]!==i?(A=!F&&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:z}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(Me,{viewMode:i,onViewModeChange:h,sortKey:p,sortDirection:x,onSort:P,sortOptions:$})})]})}),e[6]=z,e[7]=F,e[8]=P,e[9]=h,e[10]=x,e[11]=p,e[12]=$,e[13]=i,e[14]=A):A=e[14];let O;e[15]!==D||e[16]!==N||e[17]!==s||e[18]!==b||e[19]!==_||e[20]!==P||e[21]!==T||e[22]!==r||e[23]!==u||e[24]!==x||e[25]!==p||e[26]!==w||e[27]!==i?(O=i==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:s.length===0?t.jsx("div",{className:"flex items-center justify-center h-full",children:b||t.jsx(Oe,{icon:t.jsx(ze,{size:36,className:"text-muted-foreground"}),title:"No items found",description:u?"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:s.map(M=>t.jsx("div",{onClick:()=>_?.(M),className:"cursor-pointer h-full",children:t.jsx(Nt,{item:M,schema:r,readOnly:T,actions:D})},M.id))})}):t.jsx(st,{columns:kt(N,r,w,D),data:s,sortKey:p,sortDirection:x,onSort:P,onRowClick:_,emptyState:b||t.jsx(Oe,{icon:t.jsx(ze,{size:36,className:"text-muted-foreground"}),title:"No items found",description:u?"Try adjusting your search":"No items to display"})}),e[15]=D,e[16]=N,e[17]=s,e[18]=b,e[19]=_,e[20]=P,e[21]=T,e[22]=r,e[23]=u,e[24]=x,e[25]=p,e[26]=w,e[27]=i,e[28]=O):O=e[28];let I;return e[29]!==A||e[30]!==O?(I=t.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[A,O]}),e[29]=A,e[30]=O,e[31]=I):I=e[31],I}function Tt(n){return{id:n.id,label:typeof n.header=="string"?n.header:n.id}}function $t(n){return n.sortable!==!1}function Ot(){}function zt(){}function Et(){}function Mt(n){return{id:"actions",header:"",render:e=>t.jsxs(ke,{children:[t.jsx(Ke,{asChild:!0,children:t.jsx(Ie,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:s=>s.stopPropagation(),children:t.jsx(Be,{size:20})})}),t.jsxs(Ue,{align:"end",onClick:s=>s.stopPropagation(),children:[n.open&&t.jsxs(k,{onClick:s=>{s.stopPropagation(),n.open?.(e)},children:[t.jsx(Re,{size:16}),"Open"]}),n.edit&&t.jsxs(k,{onClick:s=>{s.stopPropagation(),n.edit?.(e)},children:[t.jsx(Ve,{size:16}),"Edit"]}),n.duplicate&&t.jsxs(k,{onClick:s=>{s.stopPropagation(),n.duplicate?.(e)},children:[t.jsx(Le,{size:16}),"Duplicate"]}),n.delete&&t.jsxs(k,{variant:"destructive",onClick:s=>{s.stopPropagation(),n.delete?.(e)},children:[t.jsx(We,{size:16}),"Delete"]})]})]}),cellClassName:"w-[60px]",sortable:!1}}function He(n){const e=n.type;return Array.isArray(e)?e.every(s=>He({type:s})):e==="string"||e==="number"||e==="integer"||e==="boolean"||e==="null"}function Ft(n,e){const s=n.properties||{},r=Object.keys(s).filter(o=>{const m=s[o];return m&&He(m)}),i=It(s),l=[],u=new Set;i&&r.includes(i)&&(l.push(i),u.add(i));const p=["title","description","updated_at","updated_by"];for(const o of p)r.includes(o)&&!u.has(o)&&(l.push(o),u.add(o));const j=r.filter(o=>!u.has(o)&&!Ee.includes(o)).sort((o,m)=>o.localeCompare(m));for(const o of j)l.push(o),u.add(o);for(const o of Ee)r.includes(o)&&!u.has(o)&&(l.push(o),u.add(o));return l.map(o=>{const m=s[o],f=e?e.includes(o):!["id"].includes(o);return o===i?{id:o,header:"",render:d=>{const c=d[o];return t.jsx(Fe,{icon:c,name:d.title,size:"sm",className:"shrink-0 shadow-sm"})},sortable:!1,cellClassName:"w-16 shrink-0",wrap:!0}:o==="description"?{id:o,header:"Description",render:d=>{const c=d[o];return c==null?"—":t.jsx("span",{className:"block truncate max-w-[50ch]",children:String(c)})},sortable:f,cellClassName:"max-w-[50ch]"}:o==="created_by"||o==="updated_by"?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:d=>{const c=d[o];return c?t.jsx(rt,{id:String(c),size:"xs"}):"—"},sortable:f,cellClassName:"max-w-[250px]"}:m?.format==="date-time"||o.endsWith("_at")?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:d=>{const c=d[o];return c?t.jsx("span",{className:"block truncate max-w-full",children:new Date(c).toLocaleDateString()}):"—"},sortable:f,cellClassName:"max-w-[200px]"}:{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:d=>{const c=d[o];return c==null?"—":t.jsx("span",{className:"block truncate max-w-full",children:String(c)})},sortable:f,cellClassName:"max-w-[200px]"}})}function kt(n,e,s,r){const i=n||Ft(e,s);return i.some(p=>p.id==="actions")?i:Object.keys(r).length>0?[...i,Mt(r)]:i}function ls(n){const e=Ae.c(113),{connectionId:s,org:r,activeCollection:i}=n,l=i.name,u=i.schema??at,p=i.hasCreateTool,j=i.hasUpdateTool,o=i.hasDeleteTool,m=Xe(),{data:f}=Ye.useSession(),d=f?.user?.id||"unknown",{org:c}=Ze();let C;e[0]!==s||e[1]!==c.id?(C={connectionId:s,orgId:c.id},e[0]=s,e[1]=c.id,e[2]=C):C=e[2];const y=Ct(C),a=gt(s,l,y),S=`${s}-${l}`;let h;e[3]!==r||e[4]!==S?(h={namespace:r,resource:S,defaultSortKey:"updated_at"},e[3]=r,e[4]=S,e[5]=h):h=e[5];const{search:x,searchTerm:P,setSearch:v,viewMode:D,setViewMode:_,sortKey:z,sortDirection:b,handleSort:T}=lt(h);let N;e[6]!==P||e[7]!==b||e[8]!==z?(N={searchTerm:P,sortKey:z,sortDirection:b},e[6]=P,e[7]=b,e[8]=z,e[9]=N):N=e[9];const F=jt(s,l,y,N),w=!p&&!j&&!o;let E;e[10]!==l||e[11]!==s||e[12]!==m||e[13]!==r?(E=g=>{m({to:"/$org/mcps/$connectionId/$collectionName/$itemId",params:{org:r,connectionId:s,collectionName:l,itemId:g.id}})},e[10]=l,e[11]=s,e[12]=m,e[13]=r,e[14]=E):E=e[14];const $=E;let A;e[15]!==a.create||e[16]!==d?(A=async g=>{const me=new Date().toISOString();await a.create.mutateAsync({...g,id:$e("conn"),title:`${g.title} (Copy)`,created_at:me,updated_at:me,created_by:d,updated_by:d})},e[15]=a.create,e[16]=d,e[17]=A):A=e[17];const O=A,[I,M]=et.useState(null);let oe;e[18]===Symbol.for("react.memo_cache_sentinel")?(oe=g=>{M(g)},e[18]=oe):oe=e[18];const Je=oe;let K;e[19]!==$||e[20]!==j?(K=j&&{edit:$},e[19]=$,e[20]=j,e[21]=K):K=e[21];let U;e[22]!==O||e[23]!==p?(U=p&&{duplicate:O},e[22]=O,e[23]=p,e[24]=U):U=e[24];let L;e[25]!==o?(L=o&&{delete:Je},e[25]=o,e[26]=L):L=e[26];let ie;e[27]!==L||e[28]!==K||e[29]!==U?(ie={...K,...U,...L},e[27]=L,e[28]=K,e[29]=U,e[30]=ie):ie=e[30];const ue=ie;let ne;e[31]!==a.delete||e[32]!==I?(ne=async()=>{I&&(await a.delete.mutateAsync(I.id),M(null))},e[31]=a.delete,e[32]=I,e[33]=ne):ne=e[33];const fe=ne;let re;e[34]!==a.create||e[35]!==l||e[36]!==s||e[37]!==p||e[38]!==m||e[39]!==r||e[40]!==d?(re=async()=>{if(!p){tt.error("Create operation is not available for this collection");return}const g=new Date().toISOString(),me={id:$e("conn"),title:"New Item",description:"A brief description of the item",created_at:g,updated_at:g,created_by:d,updated_by:d};try{const _e=await a.create.mutateAsync(me);m({to:"/$org/mcps/$connectionId/$collectionName/$itemId",params:{org:r,connectionId:s,collectionName:l,itemId:_e.id}})}catch(_e){console.error("Failed to create item:",_e)}},e[34]=a.create,e[35]=l,e[36]=s,e[37]=p,e[38]=m,e[39]=r,e[40]=d,e[41]=re):re=e[41];const he=re;let le;e[42]!==u?(le=Ge(u),e[42]=u,e[43]=le):le=e[43];const xe=le,Pe=(F?.length??0)>0,qe=p&&Pe,Qe=p&&!Pe&&!x;let ae;e[44]!==a.create||e[45]!==he||e[46]!==p?(ae=p?t.jsxs(Ie,{onClick:he,size:"sm",disabled:a.create.isPending,className:"h-7",children:[t.jsx(vt,{className:"mr-2 h-4 w-4"}),a.create.isPending?"Creating...":"Create"]}):null,e[44]=a.create,e[45]=he,e[46]=p,e[47]=ae):ae=e[47];const Te=ae,ge=z;let B;e[48]!==T||e[49]!==_||e[50]!==b||e[51]!==xe||e[52]!==ge||e[53]!==D?(B=t.jsx(Me,{viewMode:D,onViewModeChange:_,sortKey:ge,sortDirection:b,onSort:T,sortOptions:xe}),e[48]=T,e[49]=_,e[50]=b,e[51]=xe,e[52]=ge,e[53]=D,e[54]=B):B=e[54];const je=qe&&Te;let V;e[55]!==B||e[56]!==je?(V=t.jsxs(bt,{children:[B,je]}),e[55]=B,e[56]=je,e[57]=V):V=e[57];const Ce=`Search ${l}...`;let R;e[58]!==v?(R=g=>{g.key==="Escape"&&(v(""),g.target.blur())},e[58]=v,e[59]=R):R=e[59];let W;e[60]!==x||e[61]!==v||e[62]!==Ce||e[63]!==R?(W=t.jsx(ot,{value:x,onChange:v,placeholder:Ce,onKeyDown:R}),e[60]=x,e[61]=v,e[62]=Ce,e[63]=R,e[64]=W):W=e[64];let G;e[65]!==F?(G=F??[],e[65]=F,e[66]=G):G=e[66];const ve=z;let H;e[67]!==$?(H=g=>$(g),e[67]=$,e[68]=H):H=e[68];const be="No items found",ye=x?"Try adjusting your search terms":"This collection doesn't have any items yet.",Ne=Qe?Te:void 0;let J;e[69]!==be||e[70]!==ye||e[71]!==Ne?(J=t.jsx(nt,{image:null,title:be,description:ye,actions:Ne}),e[69]=be,e[70]=ye,e[71]=Ne,e[72]=J):J=e[72];let q;e[73]!==T||e[74]!==w||e[75]!==ue||e[76]!==u||e[77]!==x||e[78]!==v||e[79]!==_||e[80]!==b||e[81]!==G||e[82]!==ve||e[83]!==H||e[84]!==J||e[85]!==D?(q=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(Pt,{hideToolbar:!0,data:G,schema:u,viewMode:D,onViewModeChange:_,search:x,onSearchChange:v,sortKey:ve,sortDirection:b,onSort:T,actions:ue,onItemClick:H,readOnly:w,emptyState:J})}),e[73]=T,e[74]=w,e[75]=ue,e[76]=u,e[77]=x,e[78]=v,e[79]=_,e[80]=b,e[81]=G,e[82]=ve,e[83]=H,e[84]=J,e[85]=D,e[86]=q):q=e[86];let Q;e[87]!==W||e[88]!==q?(Q=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[W,q]}),e[87]=W,e[88]=q,e[89]=Q):Q=e[89];const we=!!I;let ce;e[90]===Symbol.for("react.memo_cache_sentinel")?(ce=g=>{g||M(null)},e[90]=ce):ce=e[90];let de;e[91]===Symbol.for("react.memo_cache_sentinel")?(de=t.jsx(pt,{children:"Delete item?"}),e[91]=de):de=e[91];const Se=I?.title;let X;e[92]!==Se?(X=t.jsxs(mt,{children:[de,t.jsxs(ut,{children:['Are you sure you want to delete "',Se,'"? This action cannot be undone.']})]}),e[92]=Se,e[93]=X):X=e[93];let Y;e[94]!==a.delete.isPending?(Y=t.jsx(ct,{disabled:a.delete.isPending,children:"Cancel"}),e[94]=a.delete.isPending,e[95]=Y):Y=e[95];const De=a.delete.isPending?"Deleting...":"Delete";let Z;e[96]!==a.delete.isPending||e[97]!==fe||e[98]!==De?(Z=t.jsx(dt,{onClick:fe,disabled:a.delete.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:De}),e[96]=a.delete.isPending,e[97]=fe,e[98]=De,e[99]=Z):Z=e[99];let ee;e[100]!==Y||e[101]!==Z?(ee=t.jsxs(ft,{children:[Y,Z]}),e[100]=Y,e[101]=Z,e[102]=ee):ee=e[102];let te;e[103]!==X||e[104]!==ee?(te=t.jsxs(ht,{children:[X,ee]}),e[103]=X,e[104]=ee,e[105]=te):te=e[105];let se;e[106]!==we||e[107]!==te?(se=t.jsx(xt,{open:we,onOpenChange:ce,children:te}),e[106]=we,e[107]=te,e[108]=se):se=e[108];let pe;return e[109]!==V||e[110]!==Q||e[111]!==se?(pe=t.jsxs(t.Fragment,{children:[V,Q,se]}),e[109]=V,e[110]=Q,e[111]=se,e[112]=pe):pe=e[112],pe}export{ls as C};
1
+ import{c as Ae,j as t,w as Xe,g as Ye,u as Ze,r as et,t as tt}from"./index-DkVMZPZp.js";import{g as $e}from"./generate-id-Dyweu44Y.js";import{a as st,C as Me}from"./collection-table-wrapper-DtjpsgWF.js";import{C as ot}from"./collection-search-jBfTOehF.js";import{C as it}from"./card-uLixd1BQ.js";import{I as Fe,E as nt}from"./empty-state-yKA0Dnoy.js";import{D as ke,a as Ke,b as Ue,c as k}from"./dropdown-menu-D0wZWcOa.js";import{B as Ie}from"./button-CWzK0IXA.js";import{a as Le}from"./Copy01-BY9LQ_eS.js";import{i as Be}from"./DotsVertical-CcQ5Tk1w.js";import{i as Ve}from"./Edit01-HUE0OI4J.js";import{s as Re,U as rt,u as lt}from"./use-list-state-BfUltaaz.js";import{s as We}from"./Trash01-BhWwFORM.js";import{E as Oe}from"./empty-state-DrSUCtH7.js";import{n as ze}from"./Inbox01-DqHW7WgR.js";import{B as at}from"./constants-DUMQK_Jq.js";import{A as ct,g as dt,c as pt,b as mt,d as ut,e as ft,a as ht,f as xt}from"./alert-dialog-Cg14vDvh.js";import{u as gt,b as jt}from"./use-connection-BNgYG_2P.js";import{u as Ct}from"./constants-Chp3RuVB.js";import{s as vt}from"./Plus-8ovTaJHc.js";import{V as bt}from"./layout-B7iU_InR.js";function yt(n,e){const s=n.properties||{};for(const i in s){const l=s[i];if(l&&l.type==="string"&&(l.format==="url"||l.format==="uri")&&e&&typeof e=="object"&&i in e&&e[i])return e[i]}const r=["image","img","avatar","icon","logo","thumbnail","cover"];for(const i of r)if(e&&typeof e=="object"&&i in e&&typeof e[i]=="string")return e[i]}function Nt(n){const e=Ae.c(25),{item:s,schema:r,actions:i}=n;let l;e[0]!==s||e[1]!==r?(l=yt(r,s),e[0]=s,e[1]=r,e[2]=l):l=e[2];const u=l,p=s&&typeof s=="object"&&"description"in s&&typeof s.description=="string"?s.description:void 0;let j;e[3]!==i?(j=i&&Object.keys(i).length>0,e[3]=i,e[4]=j):j=e[4];const o=j;let m;e[5]!==u||e[6]!==s.title?(m=t.jsx(Fe,{icon:u,name:s.title,size:"md",className:"shrink-0 shadow-sm"}),e[5]=u,e[6]=s.title,e[7]=m):m=e[7];let f;e[8]!==s.title?(f=t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:s.title}),e[8]=s.title,e[9]=f):f=e[9];const d=p||"No description";let c;e[10]!==d?(c=t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:d}),e[10]=d,e[11]=c):c=e[11];let C;e[12]!==f||e[13]!==c?(C=t.jsxs("div",{className:"flex flex-col gap-0 flex-1",children:[f,c]}),e[12]=f,e[13]=c,e[14]=C):C=e[14];let y;e[15]!==m||e[16]!==C?(y=t.jsxs("div",{className:"flex flex-col gap-4 p-6 flex-1",children:[m,C]}),e[15]=m,e[16]=C,e[17]=y):y=e[17];let a;e[18]!==i||e[19]!==o||e[20]!==s?(a=o&&t.jsx("div",{className:"absolute top-6 right-6 opacity-0 group-hover:opacity-100 transition-opacity",onClick:_t,onMouseDown:Dt,children:t.jsxs(ke,{children:[t.jsx(Ke,{asChild:!0,children:t.jsx(Ie,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:St,children:t.jsx(Be,{size:20})})}),t.jsxs(Ue,{align:"end",onClick:wt,children:[i.open&&t.jsxs(k,{onClick:h=>{h.stopPropagation(),i.open?.(s)},children:[t.jsx(Re,{size:16}),"Open"]}),i.edit&&t.jsxs(k,{onClick:h=>{h.stopPropagation(),i.edit?.(s)},children:[t.jsx(Ve,{size:16}),"Edit"]}),i.duplicate&&t.jsxs(k,{onClick:h=>{h.stopPropagation(),i.duplicate?.(s)},children:[t.jsx(Le,{size:16}),"Duplicate"]}),i.delete&&t.jsxs(k,{variant:"destructive",onClick:h=>{h.stopPropagation(),i.delete?.(s)},children:[t.jsx(We,{size:16}),"Delete"]})]})]})}),e[18]=i,e[19]=o,e[20]=s,e[21]=a):a=e[21];let S;return e[22]!==y||e[23]!==a?(S=t.jsxs(it,{className:"cursor-pointer transition-colors h-full flex flex-col group relative",children:[y,a]}),e[22]=y,e[23]=a,e[24]=S):S=e[24],S}function wt(n){return n.stopPropagation()}function St(n){return n.stopPropagation()}function Dt(n){return n.stopPropagation()}function _t(n){return n.stopPropagation()}const At=["icon","avatar","logo"],Ee=["created_at","created_by","id"];function It(n){return Object.keys(n).find(e=>At.includes(e.toLowerCase()))}function Ge(n,e){return Object.keys(n.properties||{}).filter(s=>["id","created_at","updated_at","created_by","updated_by"].includes(s)?!1:e?e.includes(s):!0).map(s=>({id:s,label:s.charAt(0).toUpperCase()+s.slice(1).replace(/_/g," ")}))}function Pt(n){const e=Ae.c(32),{data:s,schema:r,viewMode:i,onViewModeChange:l,search:u,sortKey:p,sortDirection:j,onSort:o,actions:m,onItemClick:f,headerActions:d,emptyState:c,readOnly:C,columns:y,hideToolbar:a,sortableFields:S}=n,h=l===void 0?Et:l,x=j===void 0?"asc":j,P=o===void 0?zt:o;let v;e[0]!==m?(v=m===void 0?{}:m,e[0]=m,e[1]=v):v=e[1];const D=v,_=f===void 0?Ot:f,z=d===void 0?null:d,b=c===void 0?null:c,T=C===void 0?!1:C,N=y===void 0?void 0:y,F=a===void 0?!1:a,w=S===void 0?void 0:S;let E;e[2]!==N||e[3]!==r||e[4]!==w?(E=N?N.filter($t).filter(M=>!w||w.includes(M.id)).map(Tt):Ge(r,w),e[2]=N,e[3]=r,e[4]=w,e[5]=E):E=e[5];const $=E;let A;e[6]!==z||e[7]!==F||e[8]!==P||e[9]!==h||e[10]!==x||e[11]!==p||e[12]!==$||e[13]!==i?(A=!F&&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:z}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(Me,{viewMode:i,onViewModeChange:h,sortKey:p,sortDirection:x,onSort:P,sortOptions:$})})]})}),e[6]=z,e[7]=F,e[8]=P,e[9]=h,e[10]=x,e[11]=p,e[12]=$,e[13]=i,e[14]=A):A=e[14];let O;e[15]!==D||e[16]!==N||e[17]!==s||e[18]!==b||e[19]!==_||e[20]!==P||e[21]!==T||e[22]!==r||e[23]!==u||e[24]!==x||e[25]!==p||e[26]!==w||e[27]!==i?(O=i==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:s.length===0?t.jsx("div",{className:"flex items-center justify-center h-full",children:b||t.jsx(Oe,{icon:t.jsx(ze,{size:36,className:"text-muted-foreground"}),title:"No items found",description:u?"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:s.map(M=>t.jsx("div",{onClick:()=>_?.(M),className:"cursor-pointer h-full",children:t.jsx(Nt,{item:M,schema:r,readOnly:T,actions:D})},M.id))})}):t.jsx(st,{columns:kt(N,r,w,D),data:s,sortKey:p,sortDirection:x,onSort:P,onRowClick:_,emptyState:b||t.jsx(Oe,{icon:t.jsx(ze,{size:36,className:"text-muted-foreground"}),title:"No items found",description:u?"Try adjusting your search":"No items to display"})}),e[15]=D,e[16]=N,e[17]=s,e[18]=b,e[19]=_,e[20]=P,e[21]=T,e[22]=r,e[23]=u,e[24]=x,e[25]=p,e[26]=w,e[27]=i,e[28]=O):O=e[28];let I;return e[29]!==A||e[30]!==O?(I=t.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[A,O]}),e[29]=A,e[30]=O,e[31]=I):I=e[31],I}function Tt(n){return{id:n.id,label:typeof n.header=="string"?n.header:n.id}}function $t(n){return n.sortable!==!1}function Ot(){}function zt(){}function Et(){}function Mt(n){return{id:"actions",header:"",render:e=>t.jsxs(ke,{children:[t.jsx(Ke,{asChild:!0,children:t.jsx(Ie,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:s=>s.stopPropagation(),children:t.jsx(Be,{size:20})})}),t.jsxs(Ue,{align:"end",onClick:s=>s.stopPropagation(),children:[n.open&&t.jsxs(k,{onClick:s=>{s.stopPropagation(),n.open?.(e)},children:[t.jsx(Re,{size:16}),"Open"]}),n.edit&&t.jsxs(k,{onClick:s=>{s.stopPropagation(),n.edit?.(e)},children:[t.jsx(Ve,{size:16}),"Edit"]}),n.duplicate&&t.jsxs(k,{onClick:s=>{s.stopPropagation(),n.duplicate?.(e)},children:[t.jsx(Le,{size:16}),"Duplicate"]}),n.delete&&t.jsxs(k,{variant:"destructive",onClick:s=>{s.stopPropagation(),n.delete?.(e)},children:[t.jsx(We,{size:16}),"Delete"]})]})]}),cellClassName:"w-[60px]",sortable:!1}}function He(n){const e=n.type;return Array.isArray(e)?e.every(s=>He({type:s})):e==="string"||e==="number"||e==="integer"||e==="boolean"||e==="null"}function Ft(n,e){const s=n.properties||{},r=Object.keys(s).filter(o=>{const m=s[o];return m&&He(m)}),i=It(s),l=[],u=new Set;i&&r.includes(i)&&(l.push(i),u.add(i));const p=["title","description","updated_at","updated_by"];for(const o of p)r.includes(o)&&!u.has(o)&&(l.push(o),u.add(o));const j=r.filter(o=>!u.has(o)&&!Ee.includes(o)).sort((o,m)=>o.localeCompare(m));for(const o of j)l.push(o),u.add(o);for(const o of Ee)r.includes(o)&&!u.has(o)&&(l.push(o),u.add(o));return l.map(o=>{const m=s[o],f=e?e.includes(o):!["id"].includes(o);return o===i?{id:o,header:"",render:d=>{const c=d[o];return t.jsx(Fe,{icon:c,name:d.title,size:"sm",className:"shrink-0 shadow-sm"})},sortable:!1,cellClassName:"w-16 shrink-0",wrap:!0}:o==="description"?{id:o,header:"Description",render:d=>{const c=d[o];return c==null?"—":t.jsx("span",{className:"block truncate max-w-[50ch]",children:String(c)})},sortable:f,cellClassName:"max-w-[50ch]"}:o==="created_by"||o==="updated_by"?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:d=>{const c=d[o];return c?t.jsx(rt,{id:String(c),size:"xs"}):"—"},sortable:f,cellClassName:"max-w-[250px]"}:m?.format==="date-time"||o.endsWith("_at")?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:d=>{const c=d[o];return c?t.jsx("span",{className:"block truncate max-w-full",children:new Date(c).toLocaleDateString()}):"—"},sortable:f,cellClassName:"max-w-[200px]"}:{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:d=>{const c=d[o];return c==null?"—":t.jsx("span",{className:"block truncate max-w-full",children:String(c)})},sortable:f,cellClassName:"max-w-[200px]"}})}function kt(n,e,s,r){const i=n||Ft(e,s);return i.some(p=>p.id==="actions")?i:Object.keys(r).length>0?[...i,Mt(r)]:i}function ls(n){const e=Ae.c(113),{connectionId:s,org:r,activeCollection:i}=n,l=i.name,u=i.schema??at,p=i.hasCreateTool,j=i.hasUpdateTool,o=i.hasDeleteTool,m=Xe(),{data:f}=Ye.useSession(),d=f?.user?.id||"unknown",{org:c}=Ze();let C;e[0]!==s||e[1]!==c.id?(C={connectionId:s,orgId:c.id},e[0]=s,e[1]=c.id,e[2]=C):C=e[2];const y=Ct(C),a=gt(s,l,y),S=`${s}-${l}`;let h;e[3]!==r||e[4]!==S?(h={namespace:r,resource:S,defaultSortKey:"updated_at"},e[3]=r,e[4]=S,e[5]=h):h=e[5];const{search:x,searchTerm:P,setSearch:v,viewMode:D,setViewMode:_,sortKey:z,sortDirection:b,handleSort:T}=lt(h);let N;e[6]!==P||e[7]!==b||e[8]!==z?(N={searchTerm:P,sortKey:z,sortDirection:b},e[6]=P,e[7]=b,e[8]=z,e[9]=N):N=e[9];const F=jt(s,l,y,N),w=!p&&!j&&!o;let E;e[10]!==l||e[11]!==s||e[12]!==m||e[13]!==r?(E=g=>{m({to:"/$org/mcps/$connectionId/$collectionName/$itemId",params:{org:r,connectionId:s,collectionName:l,itemId:g.id}})},e[10]=l,e[11]=s,e[12]=m,e[13]=r,e[14]=E):E=e[14];const $=E;let A;e[15]!==a.create||e[16]!==d?(A=async g=>{const me=new Date().toISOString();await a.create.mutateAsync({...g,id:$e("conn"),title:`${g.title} (Copy)`,created_at:me,updated_at:me,created_by:d,updated_by:d})},e[15]=a.create,e[16]=d,e[17]=A):A=e[17];const O=A,[I,M]=et.useState(null);let oe;e[18]===Symbol.for("react.memo_cache_sentinel")?(oe=g=>{M(g)},e[18]=oe):oe=e[18];const Je=oe;let K;e[19]!==$||e[20]!==j?(K=j&&{edit:$},e[19]=$,e[20]=j,e[21]=K):K=e[21];let U;e[22]!==O||e[23]!==p?(U=p&&{duplicate:O},e[22]=O,e[23]=p,e[24]=U):U=e[24];let L;e[25]!==o?(L=o&&{delete:Je},e[25]=o,e[26]=L):L=e[26];let ie;e[27]!==L||e[28]!==K||e[29]!==U?(ie={...K,...U,...L},e[27]=L,e[28]=K,e[29]=U,e[30]=ie):ie=e[30];const ue=ie;let ne;e[31]!==a.delete||e[32]!==I?(ne=async()=>{I&&(await a.delete.mutateAsync(I.id),M(null))},e[31]=a.delete,e[32]=I,e[33]=ne):ne=e[33];const fe=ne;let re;e[34]!==a.create||e[35]!==l||e[36]!==s||e[37]!==p||e[38]!==m||e[39]!==r||e[40]!==d?(re=async()=>{if(!p){tt.error("Create operation is not available for this collection");return}const g=new Date().toISOString(),me={id:$e("conn"),title:"New Item",description:"A brief description of the item",created_at:g,updated_at:g,created_by:d,updated_by:d};try{const _e=await a.create.mutateAsync(me);m({to:"/$org/mcps/$connectionId/$collectionName/$itemId",params:{org:r,connectionId:s,collectionName:l,itemId:_e.id}})}catch(_e){console.error("Failed to create item:",_e)}},e[34]=a.create,e[35]=l,e[36]=s,e[37]=p,e[38]=m,e[39]=r,e[40]=d,e[41]=re):re=e[41];const he=re;let le;e[42]!==u?(le=Ge(u),e[42]=u,e[43]=le):le=e[43];const xe=le,Pe=(F?.length??0)>0,qe=p&&Pe,Qe=p&&!Pe&&!x;let ae;e[44]!==a.create||e[45]!==he||e[46]!==p?(ae=p?t.jsxs(Ie,{onClick:he,size:"sm",disabled:a.create.isPending,className:"h-7",children:[t.jsx(vt,{className:"mr-2 h-4 w-4"}),a.create.isPending?"Creating...":"Create"]}):null,e[44]=a.create,e[45]=he,e[46]=p,e[47]=ae):ae=e[47];const Te=ae,ge=z;let B;e[48]!==T||e[49]!==_||e[50]!==b||e[51]!==xe||e[52]!==ge||e[53]!==D?(B=t.jsx(Me,{viewMode:D,onViewModeChange:_,sortKey:ge,sortDirection:b,onSort:T,sortOptions:xe}),e[48]=T,e[49]=_,e[50]=b,e[51]=xe,e[52]=ge,e[53]=D,e[54]=B):B=e[54];const je=qe&&Te;let V;e[55]!==B||e[56]!==je?(V=t.jsxs(bt,{children:[B,je]}),e[55]=B,e[56]=je,e[57]=V):V=e[57];const Ce=`Search ${l}...`;let R;e[58]!==v?(R=g=>{g.key==="Escape"&&(v(""),g.target.blur())},e[58]=v,e[59]=R):R=e[59];let W;e[60]!==x||e[61]!==v||e[62]!==Ce||e[63]!==R?(W=t.jsx(ot,{value:x,onChange:v,placeholder:Ce,onKeyDown:R}),e[60]=x,e[61]=v,e[62]=Ce,e[63]=R,e[64]=W):W=e[64];let G;e[65]!==F?(G=F??[],e[65]=F,e[66]=G):G=e[66];const ve=z;let H;e[67]!==$?(H=g=>$(g),e[67]=$,e[68]=H):H=e[68];const be="No items found",ye=x?"Try adjusting your search terms":"This collection doesn't have any items yet.",Ne=Qe?Te:void 0;let J;e[69]!==be||e[70]!==ye||e[71]!==Ne?(J=t.jsx(nt,{image:null,title:be,description:ye,actions:Ne}),e[69]=be,e[70]=ye,e[71]=Ne,e[72]=J):J=e[72];let q;e[73]!==T||e[74]!==w||e[75]!==ue||e[76]!==u||e[77]!==x||e[78]!==v||e[79]!==_||e[80]!==b||e[81]!==G||e[82]!==ve||e[83]!==H||e[84]!==J||e[85]!==D?(q=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(Pt,{hideToolbar:!0,data:G,schema:u,viewMode:D,onViewModeChange:_,search:x,onSearchChange:v,sortKey:ve,sortDirection:b,onSort:T,actions:ue,onItemClick:H,readOnly:w,emptyState:J})}),e[73]=T,e[74]=w,e[75]=ue,e[76]=u,e[77]=x,e[78]=v,e[79]=_,e[80]=b,e[81]=G,e[82]=ve,e[83]=H,e[84]=J,e[85]=D,e[86]=q):q=e[86];let Q;e[87]!==W||e[88]!==q?(Q=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[W,q]}),e[87]=W,e[88]=q,e[89]=Q):Q=e[89];const we=!!I;let ce;e[90]===Symbol.for("react.memo_cache_sentinel")?(ce=g=>{g||M(null)},e[90]=ce):ce=e[90];let de;e[91]===Symbol.for("react.memo_cache_sentinel")?(de=t.jsx(pt,{children:"Delete item?"}),e[91]=de):de=e[91];const Se=I?.title;let X;e[92]!==Se?(X=t.jsxs(mt,{children:[de,t.jsxs(ut,{children:['Are you sure you want to delete "',Se,'"? This action cannot be undone.']})]}),e[92]=Se,e[93]=X):X=e[93];let Y;e[94]!==a.delete.isPending?(Y=t.jsx(ct,{disabled:a.delete.isPending,children:"Cancel"}),e[94]=a.delete.isPending,e[95]=Y):Y=e[95];const De=a.delete.isPending?"Deleting...":"Delete";let Z;e[96]!==a.delete.isPending||e[97]!==fe||e[98]!==De?(Z=t.jsx(dt,{onClick:fe,disabled:a.delete.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:De}),e[96]=a.delete.isPending,e[97]=fe,e[98]=De,e[99]=Z):Z=e[99];let ee;e[100]!==Y||e[101]!==Z?(ee=t.jsxs(ft,{children:[Y,Z]}),e[100]=Y,e[101]=Z,e[102]=ee):ee=e[102];let te;e[103]!==X||e[104]!==ee?(te=t.jsxs(ht,{children:[X,ee]}),e[103]=X,e[104]=ee,e[105]=te):te=e[105];let se;e[106]!==we||e[107]!==te?(se=t.jsx(xt,{open:we,onOpenChange:ce,children:te}),e[106]=we,e[107]=te,e[108]=se):se=e[108];let pe;return e[109]!==V||e[110]!==Q||e[111]!==se?(pe=t.jsxs(t.Fragment,{children:[V,Q,se]}),e[109]=V,e[110]=Q,e[111]=se,e[112]=pe):pe=e[112],pe}export{ls as C};