1"use strict";(self.webpackChunkpartecipazioni=self.webpackChunkpartecipazioni||[]).push([[3222],{52761:(function(V,g,d){d.d(g,{A:function(){return m}});function m(h,c){const y=[];let u=h;for(;u!=null&&u.kind;)y.push(u),u=u.prevState;for(let o=y.length-1;o>=0;o--)c(y[o])}}),43222:(function(V,g,d){var m=d(43422),h=d.n(m),c=d(97851),y=d(8085),u=d(52761);function o(i,n,e){const r=j(e,v(n.string));if(!r)return;const t=n.type!==null&&/"|\w/.test(n.string[0])?n.start:n.end;return{list:r,from:{line:i.line,ch:t},to:{line:i.line,ch:n.end}}}function j(i,n){if(!n)return b(i,s=>!s.isDeprecated);const e=i.map(s=>({proximity:k(v(s.text),n),entry:s}));return b(b(e,s=>s.proximity<=2),s=>!s.entry.isDeprecated).sort((s,l)=>(s.entry.isDeprecated?1:0)-(l.entry.isDeprecated?1:0)||s.proximity-l.proximity||s.entry.text.length-l.entry.text.length).map(s=>s.entry)}function b(i,n){const e=i.filter(n);return e.length===0?i:e}function v(i){return i.toLowerCase().replaceAll(/\W/g,"")}function k(i,n){let e=T(n,i);return i.length>n.length&&(e-=i.length-n.length-1,e+=i.indexOf(n)===0?0:.5),e}function T(i,n){let e,r;const t=[],s=i.length,l=n.length;for(e=0;e<=s;e++)t[e]=[e];for(r=1;r<=l;r++)t[0][r]=r;for(e=1;e<=s;e++)for(r=1;r<=l;r++){const f=i[e-1]===n[r-1]?0:1;t[e][r]=Math.min(t[e-1][r]+1,t[e][r-1]+1,t[e-1][r-1]+f),e>1&&r>1&&i[e-1]===n[r-2]&&i[e-2]===n[r-1]&&(t[e][r]=Math.min(t[e][r],t[e-2][r-2]+f))}return t[s][l]}h().registerHelper("hint","graphql-variables",(i,n)=>{const e=i.getCursor(),r=i.getTokenAt(e),t=S(e,r,n);return t!=null&&t.list&&t.list.length>0&&(t.from=h().Pos(t.from.line,t.from.ch),t.to=h().Pos(t.to.line,t.to.ch),h().signal(i,"hasCompletion",i,t,r)),t});function S(i,n,e){const r=n.state.kind==="Invalid"?n.state.prevState:n.state,{kind:t,step:s}=r;if(t==="Document"&&s===0)return o(i,n,[{text:"{"}]);const{variableToType:l}=e;if(!l)return;const f=M(l,n.state);if(t==="Document"||t==="Variable"&&s===0){const p=Object.keys(l);return o(i,n,p.map(a=>({text:`"${a}": `,type:l[a]})))}if((t==="ObjectValue"||t==="ObjectField"&&s===0)&&f.fields){const p=Object.keys(f.fields).map(a=>f.fields[a]);return o(i,n,p.map(a=>({text:`"${a.name}": `,type:a.type,description:a.description})))}if(t==="StringValue"||t==="NumberValue"||t==="BooleanValue"||t==="NullValue"||t==="ListValue"&&s===1||t==="ObjectField"&&s===2||t==="Variable"&&s===2){const p=f.type?(0,c.MR)(f.type):void 0;if(p instanceof c.zP)return o(i,n,[{text:"{"}]);if(p instanceof c.Zb){const a=p.getValues();return o(i,n,a.map(x=>({text:`"${x.name}"`,type:p,description:x.description})))}if(p===y.kk)return o(i,n,[{text:"true",type:y.kk,description:"Not false."},{text:"false",type:y.kk,description:"Not true."}])}}function M(i,n){const e={type:null,fields:null};return(0,u.A)(n,r=>{switch(r.kind){case"Variable":{e.type=i[r.name];break}case"ListValue":{const t=e.type?(0,c.yl)(e.type):void 0;e.type=t instanceof c.KT?t.ofType:null;break}case"ObjectValue":{const t=e.type?(0,c.MR)(e.type):void 0;e.fields=t instanceof c.zP?t.getFields():null;break}case"ObjectField":{const t=r.name&&e.fields?e.fields[r.name]:null;e.type=t==null?void 0:t.type;break}}}),e}})}]); 2 3//# sourceMappingURL=3222-bd2e4e4fd26ba7fac507.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.