import{c as u,l as m}from"./index-_B-Zy6Ft.js";import{u as c}from"./useQuery-CC8ASXOP.js";import{K as n}from"./constants-C8myDR0I.js";async function f(r){return r.getServerCapabilities()?.resources?await r.listResources():{resources:[]}}async function q(r,e){return await r.readResource({uri:e})}function g(r){const e=u.c(12);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let i;e[3]!==t?(i=n.mcpResourcesList(t),e[3]=t,e[4]=i):i=e[4];let a;e[5]!==t?(a=()=>f(t),e[5]=t,e[6]=a):a=e[6];const o=s.staleTime??3e4;let l;return e[7]!==s||e[8]!==i||e[9]!==a||e[10]!==o?(l={...s,queryKey:i,queryFn:a,staleTime:o,retry:!1},e[7]=s,e[8]=i,e[9]=a,e[10]=o,e[11]=l):l=e[11],c(l)}async function p(r){return r.getServerCapabilities()?.prompts?await r.listPrompts():{prompts:[]}}async function R(r,e,t){if(!r.getServerCapabilities()?.prompts)throw new Error("Prompts capability not supported");return await r.getPrompt({name:e,arguments:t??{}})}function w(r){const e=u.c(12);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let i;e[3]!==t?(i=n.mcpPromptsList(t),e[3]=t,e[4]=i):i=e[4];let a;e[5]!==t?(a=()=>p(t),e[5]=t,e[6]=a):a=e[6];const o=s.staleTime??3e4;let l;return e[7]!==s||e[8]!==i||e[9]!==a||e[10]!==o?(l={...s,queryKey:i,queryFn:a,staleTime:o,retry:!1},e[7]=s,e[8]=i,e[9]=a,e[10]=o,e[11]=l):l=e[11],m(l)}function C(r){const e=u.c(12);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let i;e[3]!==t?(i=n.mcpPromptsList(t),e[3]=t,e[4]=i):i=e[4];let a;e[5]!==t?(a=()=>p(t),e[5]=t,e[6]=a):a=e[6];const o=s.staleTime??3e4;let l;return e[7]!==s||e[8]!==i||e[9]!==a||e[10]!==o?(l={...s,queryKey:i,queryFn:a,staleTime:o,retry:!1},e[7]=s,e[8]=i,e[9]=a,e[10]=o,e[11]=l):l=e[11],c(l)}export{f as a,C as b,g as c,R as g,p as l,q as r,w as u};
