import{C as n}from"./codemirror.es-bATKMzSO.js";import"./show-hint.es-Ge_qXiCj.js";import{g as c}from"./GraphiQL-MGaTFsG8.js";import{P as g}from"./Range-oFDIHyor.js";import"./codemirror.es2-qCFONIOJ.js";import"./index-p5QwxXYb.js";n.registerHelper("hint","graphql",(i,a)=>{const{schema:s,externalFragments:p}=a;if(!s)return;const r=i.getCursor(),t=i.getTokenAt(r),l=t.type!==null&&/"|\w/.test(t.string[0])?t.start:t.end,m=new g(r.line,l),e={list:c(s,i.getValue(),m,t,p).map(o=>({text:o.label,type:o.type,description:o.documentation,isDeprecated:o.isDeprecated,deprecationReason:o.deprecationReason})),from:{line:r.line,ch:l},to:{line:r.line,ch:t.end}};return e!=null&&e.list&&e.list.length>0&&(e.from=n.Pos(e.from.line,e.from.ch),e.to=n.Pos(e.to.line,e.to.ch),n.signal(i,"hasCompletion",i,e,t)),e});
