@codingame/monaco-vscode-json-language-features-default-extension 10.1.4 → 11.0.0

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.
@@ -1,2 +1,2 @@
1
- var serverExportVar;(()=>{var e={3608:(e,t,n)=>{"use strict";var r;function o(e){if("contents"in e)r="string"==typeof e.contents?JSON.parse(e.contents):e.contents;else if("fsPath"in e){const t=function(){throw new Error("Unsupported in browser")}(e.fsPath),n=JSON.parse(t);r=c(n)?n.contents.bundle:n}else if(e.uri){let t=e.uri;return"string"==typeof e.uri&&(t=new URL(e.uri)),new Promise(((e,n)=>{(async function(e){if("http:"===e.protocol||"https:"===e.protocol){const t=await fetch(e);return await t.text()}throw new Error("Unsupported protocol")})(t).then((t=>{try{const n=JSON.parse(t);r=c(n)?n.contents.bundle:n,e()}catch(e){n(e)}})).catch((e=>{n(e)}))}))}}function i(...e){const t=e[0];let n,o,s;if("string"==typeof t)n=t,o=t,e.splice(0,1),s=e&&"object"==typeof e[0]?e[0]:e;else{if(t instanceof Array){const n=e.slice(1);if(t.length!==n.length+1)throw new Error("expected a string as the first argument to l10n.t");let r=t[0];for(let e=1;e<t.length;e++)r+=`{${e-1}}`+t[e];return i(r,...n)}o=t.message,n=o,t.comment&&t.comment.length>0&&(n+=`/${Array.isArray(t.comment)?t.comment.join(""):t.comment}`),s=t.args??{}}const c=r?.[n];return c?"string"==typeof c?a(c,s):c.comment?a(c.message,s):a(o,s):a(o,s)}n.r(t),n.d(t,{config:()=>o,t:()=>i});var s=/{([^}]+)}/g;function a(e,t){return 0===Object.keys(t).length?e:e.replace(s,((e,n)=>t[n]??e))}function c(e){return!("object"!=typeof e?.contents?.bundle||"string"!=typeof e?.version)}},4271:(e,t,n)=>{"use strict";function r(e,t=!1){const n=e.length;let r=0,a="",c=0,u=16,l=0,d=0,f=0,h=0,m=0;function p(t,n){let o=0,i=0;for(;o<t||!n;){let t=e.charCodeAt(r);if(t>=48&&t<=57)i=16*i+t-48;else if(t>=65&&t<=70)i=16*i+t-65+10;else{if(!(t>=97&&t<=102))break;i=16*i+t-97+10}r++,o++}return o<t&&(i=-1),i}function g(){if(a="",m=0,c=r,d=l,h=f,r>=n)return c=n,u=17;let t=e.charCodeAt(r);if(o(t)){do{r++,a+=String.fromCharCode(t),t=e.charCodeAt(r)}while(o(t));return u=15}if(i(t))return r++,a+=String.fromCharCode(t),13===t&&10===e.charCodeAt(r)&&(r++,a+="\n"),l++,f=r,u=14;switch(t){case 123:return r++,u=1;case 125:return r++,u=2;case 91:return r++,u=3;case 93:return r++,u=4;case 58:return r++,u=6;case 44:return r++,u=5;case 34:return r++,a=function(){let t="",o=r;for(;;){if(r>=n){t+=e.substring(o,r),m=2;break}const s=e.charCodeAt(r);if(34===s){t+=e.substring(o,r),r++;break}if(92!==s){if(s>=0&&s<=31){if(i(s)){t+=e.substring(o,r),m=2;break}m=6}r++}else{if(t+=e.substring(o,r),r++,r>=n){m=2;break}switch(e.charCodeAt(r++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:const e=p(4,!0);e>=0?t+=String.fromCharCode(e):m=4;break;default:m=5}o=r}}return t}(),u=10;case 47:const o=r-1;if(47===e.charCodeAt(r+1)){for(r+=2;r<n&&!i(e.charCodeAt(r));)r++;return a=e.substring(o,r),u=12}if(42===e.charCodeAt(r+1)){r+=2;const t=n-1;let s=!1;for(;r<t;){const t=e.charCodeAt(r);if(42===t&&47===e.charCodeAt(r+1)){r+=2,s=!0;break}r++,i(t)&&(13===t&&10===e.charCodeAt(r)&&r++,l++,f=r)}return s||(r++,m=1),a=e.substring(o,r),u=13}return a+=String.fromCharCode(t),r++,u=16;case 45:if(a+=String.fromCharCode(t),r++,r===n||!s(e.charCodeAt(r)))return u=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return a+=function(){let t=r;if(48===e.charCodeAt(r))r++;else for(r++;r<e.length&&s(e.charCodeAt(r));)r++;if(r<e.length&&46===e.charCodeAt(r)){if(r++,!(r<e.length&&s(e.charCodeAt(r))))return m=3,e.substring(t,r);for(r++;r<e.length&&s(e.charCodeAt(r));)r++}let n=r;if(r<e.length&&(69===e.charCodeAt(r)||101===e.charCodeAt(r)))if(r++,(r<e.length&&43===e.charCodeAt(r)||45===e.charCodeAt(r))&&r++,r<e.length&&s(e.charCodeAt(r))){for(r++;r<e.length&&s(e.charCodeAt(r));)r++;n=r}else m=3;return e.substring(t,n)}(),u=11;default:for(;r<n&&y(t);)r++,t=e.charCodeAt(r);if(c!==r){switch(a=e.substring(c,r),a){case"true":return u=8;case"false":return u=9;case"null":return u=7}return u=16}return a+=String.fromCharCode(t),r++,u=16}}function y(e){if(o(e)||i(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(e){r=e,a="",c=0,u=16,m=0},getPosition:()=>r,scan:t?function(){let e;do{e=g()}while(e>=12&&e<=15);return e}:g,getToken:()=>u,getTokenValue:()=>a,getTokenOffset:()=>c,getTokenLength:()=>r-c,getTokenStartLine:()=>d,getTokenStartCharacter:()=>c-h,getTokenError:()=>m}}function o(e){return 32===e||9===e}function i(e){return 10===e||13===e}function s(e){return e>=48&&e<=57}var a;n.r(t),n.d(t,{ClientCapabilities:()=>Qe,CodeAction:()=>Ce,CodeActionContext:()=>Se,CodeActionKind:()=>Re,Color:()=>O,ColorInformation:()=>E,ColorPresentation:()=>N,Command:()=>V,CompletionItem:()=>ue,CompletionItemKind:()=>re,CompletionItemTag:()=>ie,CompletionList:()=>le,Diagnostic:()=>$,DiagnosticSeverity:()=>L,DocumentHighlight:()=>ge,DocumentHighlightKind:()=>pe,DocumentLink:()=>_e,DocumentSymbol:()=>Te,DocumentUri:()=>D,ErrorCode:()=>Ge,FoldingRange:()=>M,FoldingRangeKind:()=>q,Hover:()=>fe,InsertTextFormat:()=>oe,Location:()=>P,MarkedString:()=>de,MarkupContent:()=>ne,MarkupKind:()=>te,Position:()=>x,Range:()=>_,SchemaDraft:()=>Ze,SelectionRange:()=>Pe,SymbolInformation:()=>ve,SymbolKind:()=>ye,TextDocument:()=>Xe,TextDocumentEdit:()=>z,TextEdit:()=>W,VersionedTextDocumentIdentifier:()=>Q,WorkspaceEdit:()=>G,getLanguageService:()=>xn}),function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"}(a||(a={}));const c=new Array(20).fill(0).map(((e,t)=>" ".repeat(t))),u=200,l={" ":{"\n":new Array(u).fill(0).map(((e,t)=>"\n"+" ".repeat(t))),"\r":new Array(u).fill(0).map(((e,t)=>"\r"+" ".repeat(t))),"\r\n":new Array(u).fill(0).map(((e,t)=>"\r\n"+" ".repeat(t)))},"\t":{"\n":new Array(u).fill(0).map(((e,t)=>"\n"+"\t".repeat(t))),"\r":new Array(u).fill(0).map(((e,t)=>"\r"+"\t".repeat(t))),"\r\n":new Array(u).fill(0).map(((e,t)=>"\r\n"+"\t".repeat(t)))}},d=["\n","\r","\r\n"];function f(e,t){let n="";for(let r=0;r<t;r++)n+=e;return n}function h(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}var m;!function(e){e.DEFAULT={allowTrailingComma:!1}}(m||(m={}));const p=r;var g,y;!function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"}(g||(g={})),function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"}(y||(y={}));const b=function(e,t=[],n=m.DEFAULT){let o=null,i=[];const s=[];function a(e){Array.isArray(i)?i.push(e):null!==o&&(i[o]=e)}return function(e,t,n=m.DEFAULT){const o=r(e,!1),i=[];let s=0;function a(e){return e?t=>0===s&&e(t,o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter()):()=>!0}function c(e){return e?t=>0===s&&e(t,o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter(),(()=>i.slice())):()=>!0}function u(e){return e?()=>{s>0?s++:!1===e(o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter(),(()=>i.slice()))&&(s=1)}:()=>!0}function l(e){return e?()=>{s>0&&s--,0===s&&e(o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter())}:()=>!0}const d=u(t.onObjectBegin),f=c(t.onObjectProperty),h=l(t.onObjectEnd),p=u(t.onArrayBegin),g=l(t.onArrayEnd),y=c(t.onLiteralValue),b=a(t.onSeparator),v=(T=t.onComment)?()=>0===s&&T(o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter()):()=>!0,k=a(t.onError);var T;const R=n&&n.disallowComments,D=n&&n.allowTrailingComma;function S(){for(;;){const e=o.scan();switch(o.getTokenError()){case 4:C(14);break;case 5:C(15);break;case 3:C(13);break;case 1:R||C(11);break;case 2:C(12);break;case 6:C(16)}switch(e){case 12:case 13:R?C(10):v();break;case 16:C(1);break;case 15:case 14:break;default:return e}}}function C(e,t=[],n=[]){if(k(e),t.length+n.length>0){let e=o.getToken();for(;17!==e;){if(-1!==t.indexOf(e)){S();break}if(-1!==n.indexOf(e))break;e=S()}}}function w(e){const t=o.getTokenValue();return e?y(t):(f(t),i.push(t)),S(),!0}S(),17===o.getToken()?!!n.allowEmptyContent||C(4,[],[]):function e(){switch(o.getToken()){case 3:return function(){p(),S();let t=!0,n=!1;for(;4!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){if(n||C(4,[],[]),b(","),S(),4===o.getToken()&&D)break}else n&&C(6,[],[]);t?(i.push(0),t=!1):i[i.length-1]++,e()||C(4,[],[4,5]),n=!0}return g(),t||i.pop(),4!==o.getToken()?C(8,[4],[]):S(),!0}();case 1:return function(){d(),S();let t=!1;for(;2!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){if(t||C(4,[],[]),b(","),S(),2===o.getToken()&&D)break}else t&&C(6,[],[]);(10!==o.getToken()?(C(3,[],[2,5]),0):(w(!1),6===o.getToken()?(b(":"),S(),e()||C(4,[],[2,5])):C(5,[],[2,5]),i.pop(),1))||C(4,[],[2,5]),t=!0}return h(),2!==o.getToken()?C(7,[2],[]):S(),!0}();case 10:return w(!0);default:return function(){switch(o.getToken()){case 11:const e=o.getTokenValue();let t=Number(e);isNaN(t)&&(C(2),t=0),y(t);break;case 7:y(null);break;case 8:y(!0);break;case 9:y(!1);break;default:return!1}return S(),!0}()}}()?17!==o.getToken()&&C(9,[],[]):C(4,[],[])}(e,{onObjectBegin:()=>{const e={};a(e),s.push(i),i=e,o=null},onObjectProperty:e=>{o=e},onObjectEnd:()=>{i=s.pop()},onArrayBegin:()=>{const e=[];a(e),s.push(i),i=e,o=null},onArrayEnd:()=>{i=s.pop()},onLiteralValue:a,onError:(e,n,r)=>{t.push({error:e,offset:n,length:r})}},n),i[0]},v=function e(t,n,r=!1){if(function(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}(t,n,r)){const o=t.children;if(Array.isArray(o))for(let t=0;t<o.length&&o[t].offset<=n;t++){const i=e(o[t],n,r);if(i)return i}return t}},k=function e(t){if(!t.parent||!t.parent.children)return[];const n=e(t.parent);if("property"===t.parent.type){const e=t.parent.children[0].value;n.push(e)}else if("array"===t.parent.type){const e=t.parent.children.indexOf(t);-1!==e&&n.push(e)}return n},T=function e(t){switch(t.type){case"array":return t.children.map(e);case"object":const n=Object.create(null);for(let r of t.children){const t=r.children[1];t&&(n[r.children[0].value]=e(t))}return n;case"null":case"string":case"number":case"boolean":return t.value;default:return}};var R,D,S,C,w,x,_,P,A,O,E,N,q,M,j,L,I,F,$,V,W,U,H,B,z,K,J,X,G,Z,Q,Y,ee,te,ne,re,oe,ie,se,ae,ce,ue,le,de,fe,he,me,pe,ge,ye,be,ve,ke,Te,Re,De,Se,Ce,we,xe,_e,Pe,Ae,Oe,Ee,Ne,qe,Me,je,Le,Ie,Fe,$e,Ve,We,Ue,He,Be,ze,Ke,Je,Xe,Ge,Ze,Qe;function Ye(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!Ye(e[n],t[n]))return!1}else{const o=[];for(r in e)o.push(r);o.sort();const i=[];for(r in t)i.push(r);if(i.sort(),!Ye(o,i))return!1;for(n=0;n<o.length;n++)if(!Ye(e[o[n]],t[o[n]]))return!1}return!0}function et(e){return"number"==typeof e}function tt(e){return void 0!==e}function nt(e){return"boolean"==typeof e}function rt(e){return"string"==typeof e}function ot(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function it(e,t){const n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:0===n&&e===t}function st(e){let t="";(function(e,t){if(e.length<4)return!1;for(let n=0;n<4;n++)if(e[n]!==t[n])return!1;return!0})(e,"(?i)")&&(e=e.substring(4),t="i");try{return new RegExp(e,t+"u")}catch(n){try{return new RegExp(e,t)}catch(e){return}}}function at(e){let t=0;for(let n=0;n<e.length;n++){t++;const r=e.charCodeAt(n);55296<=r&&r<=56319&&n++}return t}!function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"}(R||(R={})),function(e){e.is=function(e){return"string"==typeof e}}(D||(D={})),function(e){e.is=function(e){return"string"==typeof e}}(S||(S={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(C||(C={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(w||(w={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=w.MAX_VALUE),t===Number.MAX_VALUE&&(t=w.MAX_VALUE),{line:e,character:t}},e.is=function(e){let t=e;return Je.objectLiteral(t)&&Je.uinteger(t.line)&&Je.uinteger(t.character)}}(x||(x={})),function(e){e.create=function(e,t,n,r){if(Je.uinteger(e)&&Je.uinteger(t)&&Je.uinteger(n)&&Je.uinteger(r))return{start:x.create(e,t),end:x.create(n,r)};if(x.is(e)&&x.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)},e.is=function(e){let t=e;return Je.objectLiteral(t)&&x.is(t.start)&&x.is(t.end)}}(_||(_={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){let t=e;return Je.objectLiteral(t)&&_.is(t.range)&&(Je.string(t.uri)||Je.undefined(t.uri))}}(P||(P={})),function(e){e.create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function(e){let t=e;return Je.objectLiteral(t)&&_.is(t.targetRange)&&Je.string(t.targetUri)&&_.is(t.targetSelectionRange)&&(_.is(t.originSelectionRange)||Je.undefined(t.originSelectionRange))}}(A||(A={})),function(e){e.create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function(e){const t=e;return Je.objectLiteral(t)&&Je.numberRange(t.red,0,1)&&Je.numberRange(t.green,0,1)&&Je.numberRange(t.blue,0,1)&&Je.numberRange(t.alpha,0,1)}}(O||(O={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){const t=e;return Je.objectLiteral(t)&&_.is(t.range)&&O.is(t.color)}}(E||(E={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){const t=e;return Je.objectLiteral(t)&&Je.string(t.label)&&(Je.undefined(t.textEdit)||W.is(t))&&(Je.undefined(t.additionalTextEdits)||Je.typedArray(t.additionalTextEdits,W.is))}}(N||(N={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(q||(q={})),function(e){e.create=function(e,t,n,r,o,i){const s={startLine:e,endLine:t};return Je.defined(n)&&(s.startCharacter=n),Je.defined(r)&&(s.endCharacter=r),Je.defined(o)&&(s.kind=o),Je.defined(i)&&(s.collapsedText=i),s},e.is=function(e){const t=e;return Je.objectLiteral(t)&&Je.uinteger(t.startLine)&&Je.uinteger(t.startLine)&&(Je.undefined(t.startCharacter)||Je.uinteger(t.startCharacter))&&(Je.undefined(t.endCharacter)||Je.uinteger(t.endCharacter))&&(Je.undefined(t.kind)||Je.string(t.kind))}}(M||(M={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){let t=e;return Je.defined(t)&&P.is(t.location)&&Je.string(t.message)}}(j||(j={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(L||(L={})),function(e){e.Unnecessary=1,e.Deprecated=2}(I||(I={})),function(e){e.is=function(e){const t=e;return Je.objectLiteral(t)&&Je.string(t.href)}}(F||(F={})),function(e){e.create=function(e,t,n,r,o,i){let s={range:e,message:t};return Je.defined(n)&&(s.severity=n),Je.defined(r)&&(s.code=r),Je.defined(o)&&(s.source=o),Je.defined(i)&&(s.relatedInformation=i),s},e.is=function(e){var t;let n=e;return Je.defined(n)&&_.is(n.range)&&Je.string(n.message)&&(Je.number(n.severity)||Je.undefined(n.severity))&&(Je.integer(n.code)||Je.string(n.code)||Je.undefined(n.code))&&(Je.undefined(n.codeDescription)||Je.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(Je.string(n.source)||Je.undefined(n.source))&&(Je.undefined(n.relatedInformation)||Je.typedArray(n.relatedInformation,j.is))}}($||($={})),function(e){e.create=function(e,t,...n){let r={title:e,command:t};return Je.defined(n)&&n.length>0&&(r.arguments=n),r},e.is=function(e){let t=e;return Je.defined(t)&&Je.string(t.title)&&Je.string(t.command)}}(V||(V={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){const t=e;return Je.objectLiteral(t)&&Je.string(t.newText)&&_.is(t.range)}}(W||(W={})),function(e){e.create=function(e,t,n){const r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){const t=e;return Je.objectLiteral(t)&&Je.string(t.label)&&(Je.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Je.string(t.description)||void 0===t.description)}}(U||(U={})),function(e){e.is=function(e){const t=e;return Je.string(t)}}(H||(H={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){const t=e;return W.is(t)&&(U.is(t.annotationId)||H.is(t.annotationId))}}(B||(B={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){let t=e;return Je.defined(t)&&Y.is(t.textDocument)&&Array.isArray(t.edits)}}(z||(z={})),function(e){e.create=function(e,t,n){let r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"create"===t.kind&&Je.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Je.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Je.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||H.is(t.annotationId))}}(K||(K={})),function(e){e.create=function(e,t,n,r){let o={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(o.options=n),void 0!==r&&(o.annotationId=r),o},e.is=function(e){let t=e;return t&&"rename"===t.kind&&Je.string(t.oldUri)&&Je.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Je.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Je.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||H.is(t.annotationId))}}(J||(J={})),function(e){e.create=function(e,t,n){let r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"delete"===t.kind&&Je.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Je.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Je.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||H.is(t.annotationId))}}(X||(X={})),function(e){e.is=function(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((e=>Je.string(e.kind)?K.is(e)||J.is(e)||X.is(e):z.is(e))))}}(G||(G={})),function(e){e.create=function(e){return{uri:e}},e.is=function(e){let t=e;return Je.defined(t)&&Je.string(t.uri)}}(Z||(Z={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Je.defined(t)&&Je.string(t.uri)&&Je.integer(t.version)}}(Q||(Q={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Je.defined(t)&&Je.string(t.uri)&&(null===t.version||Je.integer(t.version))}}(Y||(Y={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){let t=e;return Je.defined(t)&&Je.string(t.uri)&&Je.string(t.languageId)&&Je.integer(t.version)&&Je.string(t.text)}}(ee||(ee={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){const n=t;return n===e.PlainText||n===e.Markdown}}(te||(te={})),function(e){e.is=function(e){const t=e;return Je.objectLiteral(e)&&te.is(t.kind)&&Je.string(t.value)}}(ne||(ne={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(re||(re={})),function(e){e.PlainText=1,e.Snippet=2}(oe||(oe={})),function(e){e.Deprecated=1}(ie||(ie={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){const t=e;return t&&Je.string(t.newText)&&_.is(t.insert)&&_.is(t.replace)}}(se||(se={})),function(e){e.asIs=1,e.adjustIndentation=2}(ae||(ae={})),function(e){e.is=function(e){const t=e;return t&&(Je.string(t.detail)||void 0===t.detail)&&(Je.string(t.description)||void 0===t.description)}}(ce||(ce={})),function(e){e.create=function(e){return{label:e}}}(ue||(ue={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(le||(le={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){const t=e;return Je.string(t)||Je.objectLiteral(t)&&Je.string(t.language)&&Je.string(t.value)}}(de||(de={})),function(e){e.is=function(e){let t=e;return!!t&&Je.objectLiteral(t)&&(ne.is(t.contents)||de.is(t.contents)||Je.typedArray(t.contents,de.is))&&(void 0===e.range||_.is(e.range))}}(fe||(fe={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(he||(he={})),function(e){e.create=function(e,t,...n){let r={label:e};return Je.defined(t)&&(r.documentation=t),Je.defined(n)?r.parameters=n:r.parameters=[],r}}(me||(me={})),function(e){e.Text=1,e.Read=2,e.Write=3}(pe||(pe={})),function(e){e.create=function(e,t){let n={range:e};return Je.number(t)&&(n.kind=t),n}}(ge||(ge={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(ye||(ye={})),function(e){e.Deprecated=1}(be||(be={})),function(e){e.create=function(e,t,n,r,o){let i={name:e,kind:t,location:{uri:r,range:n}};return o&&(i.containerName=o),i}}(ve||(ve={})),function(e){e.create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}}}(ke||(ke={})),function(e){e.create=function(e,t,n,r,o,i){let s={name:e,detail:t,kind:n,range:r,selectionRange:o};return void 0!==i&&(s.children=i),s},e.is=function(e){let t=e;return t&&Je.string(t.name)&&Je.number(t.kind)&&_.is(t.range)&&_.is(t.selectionRange)&&(void 0===t.detail||Je.string(t.detail))&&(void 0===t.deprecated||Je.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(Te||(Te={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(Re||(Re={})),function(e){e.Invoked=1,e.Automatic=2}(De||(De={})),function(e){e.create=function(e,t,n){let r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},e.is=function(e){let t=e;return Je.defined(t)&&Je.typedArray(t.diagnostics,$.is)&&(void 0===t.only||Je.typedArray(t.only,Je.string))&&(void 0===t.triggerKind||t.triggerKind===De.Invoked||t.triggerKind===De.Automatic)}}(Se||(Se={})),function(e){e.create=function(e,t,n){let r={title:e},o=!0;return"string"==typeof t?(o=!1,r.kind=t):V.is(t)?r.command=t:r.edit=t,o&&void 0!==n&&(r.kind=n),r},e.is=function(e){let t=e;return t&&Je.string(t.title)&&(void 0===t.diagnostics||Je.typedArray(t.diagnostics,$.is))&&(void 0===t.kind||Je.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||V.is(t.command))&&(void 0===t.isPreferred||Je.boolean(t.isPreferred))&&(void 0===t.edit||G.is(t.edit))}}(Ce||(Ce={})),function(e){e.create=function(e,t){let n={range:e};return Je.defined(t)&&(n.data=t),n},e.is=function(e){let t=e;return Je.defined(t)&&_.is(t.range)&&(Je.undefined(t.command)||V.is(t.command))}}(we||(we={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){let t=e;return Je.defined(t)&&Je.uinteger(t.tabSize)&&Je.boolean(t.insertSpaces)}}(xe||(xe={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){let t=e;return Je.defined(t)&&_.is(t.range)&&(Je.undefined(t.target)||Je.string(t.target))}}(_e||(_e={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){let n=t;return Je.objectLiteral(n)&&_.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(Pe||(Pe={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"}(Ae||(Ae={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(Oe||(Oe={})),function(e){e.is=function(e){const t=e;return Je.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(Ee||(Ee={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){const t=e;return null!=t&&_.is(t.range)&&Je.string(t.text)}}(Ne||(Ne={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){const t=e;return null!=t&&_.is(t.range)&&Je.boolean(t.caseSensitiveLookup)&&(Je.string(t.variableName)||void 0===t.variableName)}}(qe||(qe={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){const t=e;return null!=t&&_.is(t.range)&&(Je.string(t.expression)||void 0===t.expression)}}(Me||(Me={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){const t=e;return Je.defined(t)&&_.is(e.stoppedLocation)}}(je||(je={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(Le||(Le={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){const t=e;return Je.objectLiteral(t)&&(void 0===t.tooltip||Je.string(t.tooltip)||ne.is(t.tooltip))&&(void 0===t.location||P.is(t.location))&&(void 0===t.command||V.is(t.command))}}(Ie||(Ie={})),function(e){e.create=function(e,t,n){const r={position:e,label:t};return void 0!==n&&(r.kind=n),r},e.is=function(e){const t=e;return Je.objectLiteral(t)&&x.is(t.position)&&(Je.string(t.label)||Je.typedArray(t.label,Ie.is))&&(void 0===t.kind||Le.is(t.kind))&&void 0===t.textEdits||Je.typedArray(t.textEdits,W.is)&&(void 0===t.tooltip||Je.string(t.tooltip)||ne.is(t.tooltip))&&(void 0===t.paddingLeft||Je.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Je.boolean(t.paddingRight))}}(Fe||(Fe={})),function(e){e.createSnippet=function(e){return{kind:"snippet",value:e}}}($e||($e={})),function(e){e.create=function(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}}(Ve||(Ve={})),function(e){e.create=function(e){return{items:e}}}(We||(We={})),function(e){e.Invoked=0,e.Automatic=1}(Ue||(Ue={})),function(e){e.create=function(e,t){return{range:e,text:t}}}(He||(He={})),function(e){e.create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}}}(Be||(Be={})),function(e){e.is=function(e){const t=e;return Je.objectLiteral(t)&&S.is(t.uri)&&Je.string(t.name)}}(ze||(ze={})),function(e){function t(e,n){if(e.length<=1)return e;const r=e.length/2|0,o=e.slice(0,r),i=e.slice(r);t(o,n),t(i,n);let s=0,a=0,c=0;for(;s<o.length&&a<i.length;){let t=n(o[s],i[a]);e[c++]=t<=0?o[s++]:i[a++]}for(;s<o.length;)e[c++]=o[s++];for(;a<i.length;)e[c++]=i[a++];return e}e.create=function(e,t,n,r){return new ct(e,t,n,r)},e.is=function(e){let t=e;return!!(Je.defined(t)&&Je.string(t.uri)&&(Je.undefined(t.languageId)||Je.string(t.languageId))&&Je.uinteger(t.lineCount)&&Je.func(t.getText)&&Je.func(t.positionAt)&&Je.func(t.offsetAt))},e.applyEdits=function(e,n){let r=e.getText(),o=t(n,((e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),i=r.length;for(let t=o.length-1;t>=0;t--){let n=o[t],s=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end);if(!(a<=i))throw new Error("Overlapping edit");r=r.substring(0,s)+n.newText+r.substring(a,r.length),i=s}return r}}(Ke||(Ke={}));class ct{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,n=!0;for(let r=0;r<t.length;r++){n&&(e.push(r),n=!1);let o=t.charAt(r);n="\r"===o||"\n"===o,"\r"===o&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return x.create(0,e);for(;n<r;){let o=Math.floor((n+r)/2);t[o]>e?r=o:n=o+1}let o=n-1;return x.create(o,e-t[o])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}}!function(e){const t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.numberRange=function(e,n,r){return"[object Number]"===t.call(e)&&n<=e&&e<=r},e.integer=function(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(Je||(Je={}));class ut{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){for(const t of e)if(ut.isIncremental(t)){const e=ht(t.range),n=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,n)+t.text+this._content.substring(r,this._content.length);const o=Math.max(e.start.line,0),i=Math.max(e.end.line,0);let s=this._lineOffsets;const a=dt(t.text,!1,n);if(i-o===a.length)for(let e=0,t=a.length;e<t;e++)s[e+o+1]=a[e];else a.length<1e4?s.splice(o+1,i-o,...a):this._lineOffsets=s=s.slice(0,o+1).concat(a,s.slice(i+1));const c=t.text.length-(r-n);if(0!==c)for(let e=o+1+a.length,t=s.length;e<t;e++)s[e]=s[e]+c}else{if(!ut.isFull(t))throw new Error("Unknown change event received");this._content=t.text,this._lineOffsets=void 0}this._version=t}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=dt(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);const t=this.getLineOffsets();let n=0,r=t.length;if(0===r)return{line:0,character:e};for(;n<r;){const o=Math.floor((n+r)/2);t[o]>e?r=o:n=o+1}const o=n-1;return{line:o,character:(e=this.ensureBeforeEOL(e,t[o]))-t[o]}}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const n=t[e.line];if(e.character<=0)return n;const r=e.line+1<t.length?t[e.line+1]:this._content.length,o=Math.min(n+e.character,r);return this.ensureBeforeEOL(o,n)}ensureBeforeEOL(e,t){for(;e>t&&ft(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}function lt(e,t){if(e.length<=1)return e;const n=e.length/2|0,r=e.slice(0,n),o=e.slice(n);lt(r,t),lt(o,t);let i=0,s=0,a=0;for(;i<r.length&&s<o.length;){const n=t(r[i],o[s]);e[a++]=n<=0?r[i++]:o[s++]}for(;i<r.length;)e[a++]=r[i++];for(;s<o.length;)e[a++]=o[s++];return e}function dt(e,t,n=0){const r=t?[n]:[];for(let t=0;t<e.length;t++){const o=e.charCodeAt(t);ft(o)&&(13===o&&t+1<e.length&&10===e.charCodeAt(t+1)&&t++,r.push(n+t+1))}return r}function ft(e){return 13===e||10===e}function ht(e){const t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function mt(e){const t=ht(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,n,r){return new ut(e,t,n,r)},e.update=function(e,t,n){if(e instanceof ut)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){const n=e.getText(),r=lt(t.map(mt),((e,t)=>{const n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}));let o=0;const i=[];for(const t of r){const r=e.offsetAt(t.range.start);if(r<o)throw new Error("Overlapping edit");r>o&&i.push(n.substring(o,r)),t.newText.length&&i.push(t.newText),o=e.offsetAt(t.range.end)}return i.push(n.substr(o)),i.join("")}}(Xe||(Xe={})),function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.Deprecated=2]="Deprecated",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidCharacter=262]="InvalidCharacter",e[e.PropertyExpected=513]="PropertyExpected",e[e.CommaExpected=514]="CommaExpected",e[e.ColonExpected=515]="ColonExpected",e[e.ValueExpected=516]="ValueExpected",e[e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",e[e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",e[e.TrailingComma=519]="TrailingComma",e[e.DuplicateKey=520]="DuplicateKey",e[e.CommentNotPermitted=521]="CommentNotPermitted",e[e.PropertyKeysMustBeDoublequoted=528]="PropertyKeysMustBeDoublequoted",e[e.SchemaResolveError=768]="SchemaResolveError",e[e.SchemaUnsupportedFeature=769]="SchemaUnsupportedFeature"}(Ge||(Ge={})),function(e){e[e.v3=3]="v3",e[e.v4=4]="v4",e[e.v6=6]="v6",e[e.v7=7]="v7",e[e.v2019_09=19]="v2019_09",e[e.v2020_12=20]="v2020_12"}(Ze||(Ze={})),function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[te.Markdown,te.PlainText],commitCharactersSupport:!0,labelDetailsSupport:!0}}}}}(Qe||(Qe={}));var pt=n(3608);const gt={"color-hex":{errorMessage:pt.t("Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:pt.t("String is not a RFC3339 date-time."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:pt.t("String is not a RFC3339 date."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:pt.t("String is not a RFC3339 time."),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:pt.t("String is not an e-mail address."),pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}))$/},hostname:{errorMessage:pt.t("String is not a hostname."),pattern:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i},ipv4:{errorMessage:pt.t("String is not an IPv4 address."),pattern:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/},ipv6:{errorMessage:pt.t("String is not an IPv6 address."),pattern:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i}};class yt{constructor(e,t,n=0){this.offset=t,this.length=n,this.parent=e}get children(){return[]}toString(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")}}class bt extends yt{constructor(e,t){super(e,t),this.type="null",this.value=null}}class vt extends yt{constructor(e,t,n){super(e,n),this.type="boolean",this.value=t}}class kt extends yt{constructor(e,t){super(e,t),this.type="array",this.items=[]}get children(){return this.items}}class Tt extends yt{constructor(e,t){super(e,t),this.type="number",this.isInteger=!0,this.value=Number.NaN}}class Rt extends yt{constructor(e,t,n){super(e,t,n),this.type="string",this.value=""}}class Dt extends yt{constructor(e,t,n){super(e,t),this.type="property",this.colonOffset=-1,this.keyNode=n}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}}class St extends yt{constructor(e,t){super(e,t),this.type="object",this.properties=[]}get children(){return this.properties}}function Ct(e){return nt(e)?e?{}:{not:{}}:e}var wt;!function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"}(wt||(wt={}));const xt={"http://json-schema.org/draft-03/schema#":Ze.v3,"http://json-schema.org/draft-04/schema#":Ze.v4,"http://json-schema.org/draft-06/schema#":Ze.v6,"http://json-schema.org/draft-07/schema#":Ze.v7,"https://json-schema.org/draft/2019-09/schema":Ze.v2019_09,"https://json-schema.org/draft/2020-12/schema":Ze.v2020_12};class _t{constructor(e){this.schemaDraft=e}}class Pt{constructor(e=-1,t){this.focusOffset=e,this.exclude=t,this.schemas=[]}add(e){this.schemas.push(e)}merge(e){Array.prototype.push.apply(this.schemas,e.schemas)}include(e){return(-1===this.focusOffset||qt(e,this.focusOffset))&&e!==this.exclude}newSub(){return new Pt(-1,this.exclude)}}class At{constructor(){}get schemas(){return[]}add(e){}merge(e){}include(e){return!0}newSub(){return this}}At.instance=new At;class Ot{constructor(){this.problems=[],this.propertiesMatches=0,this.processedProperties=new Set,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}hasProblems(){return!!this.problems.length}merge(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches+=e.propertiesMatches,this.propertiesValueMatches+=e.propertiesValueMatches,this.mergeProcessedProperties(e)}mergeEnumValues(e){if(!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues){this.enumValues=this.enumValues.concat(e.enumValues);for(const e of this.problems)e.code===Ge.EnumValueMismatch&&(e.message=pt.t("Value is not accepted. Valid values: {0}.",this.enumValues.map((e=>JSON.stringify(e))).join(", ")))}}mergePropertyMatch(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&1===e.enumValues.length&&this.primaryValueMatches++}mergeProcessedProperties(e){e.processedProperties.forEach((e=>this.processedProperties.add(e)))}compare(e){const t=this.hasProblems();return t!==e.hasProblems()?t?-1:1:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:this.propertiesMatches-e.propertiesMatches}}function Et(e){return T(e)}function Nt(e){return k(e)}function qt(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}class Mt{constructor(e,t=[],n=[]){this.root=e,this.syntaxErrors=t,this.comments=n}getNodeFromOffset(e,t=!1){if(this.root)return v(this.root,e,t)}visit(e){if(this.root){const t=n=>{let r=e(n);const o=n.children;if(Array.isArray(o))for(let e=0;e<o.length&&r;e++)r=t(o[e]);return r};t(this.root)}}validate(e,t,n=L.Warning,r){if(this.root&&t){const o=new Ot;return Lt(this.root,t,o,At.instance,new _t(r??jt(t))),o.problems.map((t=>{const r=_.create(e.positionAt(t.location.offset),e.positionAt(t.location.offset+t.location.length));return $.create(r,t.message,t.severity??n,t.code)}))}}getMatchingSchemas(e,t=-1,n){if(this.root&&e){const r=new Pt(t,n),o=jt(e),i=new _t(o);return Lt(this.root,e,new Ot,r,i),r.schemas}return[]}}function jt(e,t=Ze.v2020_12){let n=e.$schema;return n?xt[n]??t:t}function Lt(e,t,n,r,o){if(!e||!r.include(e))return;if("property"===e.type)return Lt(e.valueNode,t,n,r,o);const i=e;switch(function(){function e(e){return i.type===e||"integer"===e&&"number"===i.type&&i.isInteger}if(Array.isArray(t.type)?t.type.some(e)||n.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||pt.t("Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&(e(t.type)||n.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||pt.t('Incorrect type. Expected "{0}".',t.type)})),Array.isArray(t.allOf))for(const e of t.allOf){const t=new Ot,s=r.newSub();Lt(i,Ct(e),t,s,o),n.merge(t),r.merge(s)}const s=Ct(t.not);if(s){const e=new Ot,a=r.newSub();Lt(i,s,e,a,o),e.hasProblems()||n.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||pt.t("Matches a schema that is not allowed.")});for(const e of a.schemas)e.inverted=!e.inverted,r.add(e)}const a=(e,t)=>{const s=[];let a;for(const n of e){const e=Ct(n),c=new Ot,u=r.newSub();if(Lt(i,e,c,u,o),c.hasProblems()||s.push(e),a)if(t||c.hasProblems()||a.validationResult.hasProblems()){const t=c.compare(a.validationResult);t>0?a={schema:e,validationResult:c,matchingSchemas:u}:0===t&&(a.matchingSchemas.merge(u),a.validationResult.mergeEnumValues(c))}else a.matchingSchemas.merge(u),a.validationResult.propertiesMatches+=c.propertiesMatches,a.validationResult.propertiesValueMatches+=c.propertiesValueMatches,a.validationResult.mergeProcessedProperties(c);else a={schema:e,validationResult:c,matchingSchemas:u}}return s.length>1&&t&&n.problems.push({location:{offset:i.offset,length:1},message:pt.t("Matches multiple schemas when only one must validate.")}),a&&(n.merge(a.validationResult),r.merge(a.matchingSchemas)),s.length};Array.isArray(t.anyOf)&&a(t.anyOf,!1),Array.isArray(t.oneOf)&&a(t.oneOf,!0);const c=e=>{const t=new Ot,s=r.newSub();Lt(i,Ct(e),t,s,o),n.merge(t),r.merge(s)},u=Ct(t.if);if(u&&((e,t,s)=>{const a=Ct(e),u=new Ot,l=r.newSub();Lt(i,a,u,l,o),r.merge(l),n.mergeProcessedProperties(u),u.hasProblems()?s&&c(s):t&&c(t)})(u,Ct(t.then),Ct(t.else)),Array.isArray(t.enum)){const e=Et(i);let r=!1;for(const n of t.enum)if(Ye(e,n)){r=!0;break}n.enumValues=t.enum,n.enumValueMatch=r,r||n.problems.push({location:{offset:i.offset,length:i.length},code:Ge.EnumValueMismatch,message:t.errorMessage||pt.t("Value is not accepted. Valid values: {0}.",t.enum.map((e=>JSON.stringify(e))).join(", "))})}tt(t.const)&&(Ye(Et(i),t.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:i.offset,length:i.length},code:Ge.EnumValueMismatch,message:t.errorMessage||pt.t("Value must be {0}.",JSON.stringify(t.const))}),n.enumValueMatch=!1),n.enumValues=[t.const]);let l=t.deprecationMessage;if(l||t.deprecated){l=l||pt.t("Value is deprecated");let e="property"===i.parent?.type?i.parent:i;n.problems.push({location:{offset:e.offset,length:e.length},severity:L.Warning,message:l,code:Ge.Deprecated})}}(),i.type){case"object":!function(e){const i=Object.create(null),s=new Set;for(const t of e.properties){const e=t.keyNode.value;i[e]=t.valueNode,s.add(e)}if(Array.isArray(t.required))for(const r of t.required)if(!i[r]){const t=e.parent&&"property"===e.parent.type&&e.parent.keyNode,o=t?{offset:t.offset,length:t.length}:{offset:e.offset,length:1};n.problems.push({location:o,message:pt.t('Missing property "{0}".',r)})}const a=e=>{s.delete(e),n.processedProperties.add(e)};if(t.properties)for(const e of Object.keys(t.properties)){a(e);const s=t.properties[e],c=i[e];if(c)if(nt(s))if(s)n.propertiesMatches++,n.propertiesValueMatches++;else{const r=c.parent;n.problems.push({location:{offset:r.keyNode.offset,length:r.keyNode.length},message:t.errorMessage||pt.t("Property {0} is not allowed.",e)})}else{const e=new Ot;Lt(c,s,e,r,o),n.mergePropertyMatch(e)}}if(t.patternProperties)for(const e of Object.keys(t.patternProperties)){const c=st(e);if(c){const u=[];for(const a of s)if(c.test(a)){u.push(a);const s=i[a];if(s){const i=t.patternProperties[e];if(nt(i))if(i)n.propertiesMatches++,n.propertiesValueMatches++;else{const e=s.parent;n.problems.push({location:{offset:e.keyNode.offset,length:e.keyNode.length},message:t.errorMessage||pt.t("Property {0} is not allowed.",a)})}else{const e=new Ot;Lt(s,i,e,r,o),n.mergePropertyMatch(e)}}}u.forEach(a)}}const c=t.additionalProperties;if(void 0!==c)for(const e of s){a(e);const s=i[e];if(s)if(!1===c){const r=s.parent;n.problems.push({location:{offset:r.keyNode.offset,length:r.keyNode.length},message:t.errorMessage||pt.t("Property {0} is not allowed.",e)})}else if(!0!==c){const e=new Ot;Lt(s,c,e,r,o),n.mergePropertyMatch(e)}}const u=t.unevaluatedProperties;if(void 0!==u){const e=[];for(const a of s)if(!n.processedProperties.has(a)){e.push(a);const s=i[a];if(s)if(!1===u){const e=s.parent;n.problems.push({location:{offset:e.keyNode.offset,length:e.keyNode.length},message:t.errorMessage||pt.t("Property {0} is not allowed.",a)})}else if(!0!==u){const e=new Ot;Lt(s,u,e,r,o),n.mergePropertyMatch(e)}}e.forEach(a)}if(et(t.maxProperties)&&e.properties.length>t.maxProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:pt.t("Object has more properties than limit of {0}.",t.maxProperties)}),et(t.minProperties)&&e.properties.length<t.minProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:pt.t("Object has fewer properties than the required number of {0}",t.minProperties)}),t.dependentRequired)for(const e in t.dependentRequired){const n=i[e],r=t.dependentRequired[e];n&&Array.isArray(r)&&d(e,r)}if(t.dependentSchemas)for(const e in t.dependentSchemas){const n=i[e],r=t.dependentSchemas[e];n&&ot(r)&&d(e,r)}if(t.dependencies)for(const e in t.dependencies)i[e]&&d(e,t.dependencies[e]);const l=Ct(t.propertyNames);if(l)for(const t of e.properties){const e=t.keyNode;e&&Lt(e,l,n,At.instance,o)}function d(t,s){if(Array.isArray(s))for(const r of s)i[r]?n.propertiesValueMatches++:n.problems.push({location:{offset:e.offset,length:e.length},message:pt.t("Object is missing property {0} required by property {1}.",r,t)});else{const t=Ct(s);if(t){const i=new Ot;Lt(e,t,i,r,o),n.mergePropertyMatch(i)}}}}(i);break;case"array":!function(e){let i,s;o.schemaDraft>=Ze.v2020_12?(i=t.prefixItems,s=Array.isArray(t.items)?void 0:t.items):(i=Array.isArray(t.items)?t.items:void 0,s=Array.isArray(t.items)?t.additionalItems:t.items);let a=0;if(void 0!==i){const l=Math.min(i.length,e.items.length);for(;a<l;a++){const d=Ct(i[a]),f=new Ot,h=e.items[a];h&&(Lt(h,d,f,r,o),n.mergePropertyMatch(f)),n.processedProperties.add(String(a))}}if(void 0!==s&&a<e.items.length)if("boolean"==typeof s)for(!1===s&&n.problems.push({location:{offset:e.offset,length:e.length},message:pt.t("Array has too many items according to schema. Expected {0} or fewer.",a)});a<e.items.length;a++)n.processedProperties.add(String(a)),n.propertiesValueMatches++;else for(;a<e.items.length;a++){const m=new Ot;Lt(e.items[a],s,m,r,o),n.mergePropertyMatch(m),n.processedProperties.add(String(a))}const c=Ct(t.contains);if(c){let p=0;for(let g=0;g<e.items.length;g++){const y=e.items[g],b=new Ot;Lt(y,c,b,At.instance,o),b.hasProblems()||(p++,o.schemaDraft>=Ze.v2020_12&&n.processedProperties.add(String(g)))}0!==p||et(t.minContains)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||pt.t("Array does not contain required item.")}),et(t.minContains)&&p<t.minContains&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||pt.t("Array has too few items that match the contains contraint. Expected {0} or more.",t.minContains)}),et(t.maxContains)&&p>t.maxContains&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||pt.t("Array has too many items that match the contains contraint. Expected {0} or less.",t.maxContains)})}const u=t.unevaluatedItems;if(void 0!==u)for(let v=0;v<e.items.length;v++){if(!n.processedProperties.has(String(v)))if(!1===u)n.problems.push({location:{offset:e.offset,length:e.length},message:pt.t("Item does not match any validation rule from the array.")});else{const k=new Ot;Lt(e.items[v],t.unevaluatedItems,k,r,o),n.mergePropertyMatch(k)}n.processedProperties.add(String(v)),n.propertiesValueMatches++}if(et(t.minItems)&&e.items.length<t.minItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:pt.t("Array has too few items. Expected {0} or more.",t.minItems)}),et(t.maxItems)&&e.items.length>t.maxItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:pt.t("Array has too many items. Expected {0} or fewer.",t.maxItems)}),!0===t.uniqueItems){const T=Et(e);function R(){for(let e=0;e<T.length-1;e++){const t=T[e];for(let n=e+1;n<T.length;n++)if(Ye(t,T[n]))return!0}return!1}R()&&n.problems.push({location:{offset:e.offset,length:e.length},message:pt.t("Array has duplicate items.")})}}(i);break;case"string":!function(e){if(et(t.minLength)&&at(e.value)<t.minLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:pt.t("String is shorter than the minimum length of {0}.",t.minLength)}),et(t.maxLength)&&at(e.value)>t.maxLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:pt.t("String is longer than the maximum length of {0}.",t.maxLength)}),rt(t.pattern)){const r=st(t.pattern);r?.test(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||pt.t('String does not match the pattern of "{0}".',t.pattern)})}if(t.format)switch(t.format){case"uri":case"uri-reference":{let r;if(e.value){const n=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(e.value);n?n[2]||"uri"!==t.format||(r=pt.t("URI with a scheme is expected.")):r=pt.t("URI is expected.")}else r=pt.t("URI expected.");r&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||pt.t("String is not a URI: {0}",r)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"hostname":case"ipv4":case"ipv6":const r=gt[t.format];e.value&&r.pattern.exec(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||r.errorMessage})}}(i);break;case"number":!function(e){const r=e.value;function o(e){const t=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(e.toString());return t&&{value:Number(t[1]+(t[2]||"")),multiplier:(t[2]?.length||0)-(parseInt(t[3])||0)}}if(et(t.multipleOf)){let i=-1;if(Number.isInteger(t.multipleOf))i=r%t.multipleOf;else{let e=o(t.multipleOf),n=o(r);if(e&&n){const t=10**Math.abs(n.multiplier-e.multiplier);n.multiplier<e.multiplier?n.value*=t:e.value*=t,i=n.value%e.value}}0!==i&&n.problems.push({location:{offset:e.offset,length:e.length},message:pt.t("Value is not divisible by {0}.",t.multipleOf)})}function i(e,t){return et(t)?t:nt(t)&&t?e:void 0}function s(e,t){if(!nt(t)||!t)return e}const a=i(t.minimum,t.exclusiveMinimum);et(a)&&r<=a&&n.problems.push({location:{offset:e.offset,length:e.length},message:pt.t("Value is below the exclusive minimum of {0}.",a)});const c=i(t.maximum,t.exclusiveMaximum);et(c)&&r>=c&&n.problems.push({location:{offset:e.offset,length:e.length},message:pt.t("Value is above the exclusive maximum of {0}.",c)});const u=s(t.minimum,t.exclusiveMinimum);et(u)&&r<u&&n.problems.push({location:{offset:e.offset,length:e.length},message:pt.t("Value is below the minimum of {0}.",u)});const l=s(t.maximum,t.exclusiveMaximum);et(l)&&r>l&&n.problems.push({location:{offset:e.offset,length:e.length},message:pt.t("Value is above the maximum of {0}.",l)})}(i)}r.add({node:i,schema:t})}function It(e,t,n){if(null!==e&&"object"==typeof e){const r=t+"\t";if(Array.isArray(e)){if(0===e.length)return"[]";let o="[\n";for(let t=0;t<e.length;t++)o+=r+It(e[t],r,n),t<e.length-1&&(o+=","),o+="\n";return o+=t+"]",o}{const o=Object.keys(e);if(0===o.length)return"{}";let i="{\n";for(let t=0;t<o.length;t++){const s=o[t];i+=r+JSON.stringify(s)+": "+It(e[s],r,n),t<o.length-1&&(i+=","),i+="\n"}return i+=t+"}",i}}return n(e)}class Ft{constructor(e,t=[],n=Promise,r={}){this.schemaService=e,this.contributions=t,this.promiseConstructor=n,this.clientCapabilities=r}doResolve(e){for(let t=this.contributions.length-1;t>=0;t--){const n=this.contributions[t].resolveCompletion;if(n){const t=n(e);if(t)return t}}return this.promiseConstructor.resolve(e)}doComplete(e,t,n){const r={items:[],isIncomplete:!1},o=e.getText(),i=e.offsetAt(t);let s=n.getNodeFromOffset(i,!0);if(this.isInComment(e,s?s.offset:0,i))return Promise.resolve(r);if(s&&i===s.offset+s.length&&i>0){const e=o[i-1];("object"===s.type&&"}"===e||"array"===s.type&&"]"===e)&&(s=s.parent)}const a=this.getCurrentWord(e,i);let c;if(!s||"string"!==s.type&&"number"!==s.type&&"boolean"!==s.type&&"null"!==s.type){let n=i-a.length;n>0&&'"'===o[n-1]&&n--,c=_.create(e.positionAt(n),t)}else c=_.create(e.positionAt(s.offset),e.positionAt(s.offset+s.length));const u=new Map,l={add:e=>{let t=e.label;const n=u.get(t);if(n)n.documentation||(n.documentation=e.documentation),n.detail||(n.detail=e.detail),n.labelDetails||(n.labelDetails=e.labelDetails);else{if(t=t.replace(/[\n]/g,"↵"),t.length>60){const e=t.substr(0,57).trim()+"...";u.has(e)||(t=e)}e.textEdit=W.replace(c,e.insertText),e.label=t,u.set(t,e),r.items.push(e)}},setAsIncomplete:()=>{r.isIncomplete=!0},error:e=>{console.error(e)},getNumberOfProposals:()=>r.items.length};return this.schemaService.getSchemaForResource(e.uri,n).then((t=>{const d=[];let f,h=!0,m="";if(s&&"string"===s.type){const e=s.parent;e&&"property"===e.type&&e.keyNode===s&&(h=!e.valueNode,f=e,m=o.substr(s.offset+1,s.length-2),e&&(s=e.parent))}if(s&&"object"===s.type){if(s.offset===i)return r;s.properties.forEach((e=>{f&&f===e||u.set(e.keyNode.value,ue.create("__"))}));let p="";h&&(p=this.evaluateSeparatorAfter(e,e.offsetAt(c.end))),t?this.getPropertyCompletions(t,n,s,h,p,l):this.getSchemaLessPropertyCompletions(n,s,m,l);const g=Nt(s);this.contributions.forEach((t=>{const n=t.collectPropertyCompletions(e.uri,g,a,h,""===p,l);n&&d.push(n)})),!t&&a.length>0&&'"'!==o.charAt(i-a.length-1)&&(l.add({kind:re.Property,label:this.getLabelForValue(a),insertText:this.getInsertTextForProperty(a,void 0,!1,p),insertTextFormat:oe.Snippet,documentation:""}),l.setAsIncomplete())}const p={};return t?this.getValueCompletions(t,n,s,i,e,l,p):this.getSchemaLessValueCompletions(n,s,i,e,l),this.contributions.length>0&&this.getContributedValueCompletions(n,s,i,e,l,d),this.promiseConstructor.all(d).then((()=>{if(0===l.getNumberOfProposals()){let t=i;!s||"string"!==s.type&&"number"!==s.type&&"boolean"!==s.type&&"null"!==s.type||(t=s.offset+s.length);const n=this.evaluateSeparatorAfter(e,t);this.addFillerValueCompletions(p,n,l)}return r}))}))}getPropertyCompletions(e,t,n,r,o,i){t.getMatchingSchemas(e.schema,n.offset).forEach((e=>{if(e.node===n&&!e.inverted){const t=e.schema.properties;t&&Object.keys(t).forEach((e=>{const n=t[e];if("object"==typeof n&&!n.deprecationMessage&&!n.doNotSuggest){const t={kind:re.Property,label:e,insertText:this.getInsertTextForProperty(e,n,r,o),insertTextFormat:oe.Snippet,filterText:this.getFilterTextForValue(e),documentation:this.fromMarkup(n.markdownDescription)||n.description||""};void 0!==n.suggestSortText&&(t.sortText=n.suggestSortText),t.insertText&&it(t.insertText,`$1${o}`)&&(t.command={title:"Suggest",command:"editor.action.triggerSuggest"}),i.add(t)}}));const n=e.schema.propertyNames;if("object"==typeof n&&!n.deprecationMessage&&!n.doNotSuggest){const e=(e,t=void 0)=>{const s={kind:re.Property,label:e,insertText:this.getInsertTextForProperty(e,void 0,r,o),insertTextFormat:oe.Snippet,filterText:this.getFilterTextForValue(e),documentation:t||this.fromMarkup(n.markdownDescription)||n.description||""};void 0!==n.suggestSortText&&(s.sortText=n.suggestSortText),s.insertText&&it(s.insertText,`$1${o}`)&&(s.command={title:"Suggest",command:"editor.action.triggerSuggest"}),i.add(s)};if(n.enum)for(let t=0;t<n.enum.length;t++){let r;n.markdownEnumDescriptions&&t<n.markdownEnumDescriptions.length?r=this.fromMarkup(n.markdownEnumDescriptions[t]):n.enumDescriptions&&t<n.enumDescriptions.length&&(r=n.enumDescriptions[t]),e(n.enum[t],r)}n.const&&e(n.const)}}}))}getSchemaLessPropertyCompletions(e,t,n,r){const o=e=>{e.properties.forEach((e=>{const t=e.keyNode.value;r.add({kind:re.Property,label:t,insertText:this.getInsertTextForValue(t,""),insertTextFormat:oe.Snippet,filterText:this.getFilterTextForValue(t),documentation:""})}))};if(t.parent)if("property"===t.parent.type){const n=t.parent.keyNode.value;e.visit((e=>("property"===e.type&&e!==t.parent&&e.keyNode.value===n&&e.valueNode&&"object"===e.valueNode.type&&o(e.valueNode),!0)))}else"array"===t.parent.type&&t.parent.items.forEach((e=>{"object"===e.type&&e!==t&&o(e)}));else"object"===t.type&&r.add({kind:re.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:oe.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})}getSchemaLessValueCompletions(e,t,n,r,o){let i=n;if(!t||"string"!==t.type&&"number"!==t.type&&"boolean"!==t.type&&"null"!==t.type||(i=t.offset+t.length,t=t.parent),!t)return o.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:oe.Snippet,documentation:""}),void o.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:oe.Snippet,documentation:""});const s=this.evaluateSeparatorAfter(r,i),a=e=>{e.parent&&!qt(e.parent,n,!0)&&o.add({kind:this.getSuggestionKind(e.type),label:this.getLabelTextForMatchingNode(e,r),insertText:this.getInsertTextForMatchingNode(e,r,s),insertTextFormat:oe.Snippet,documentation:""}),"boolean"===e.type&&this.addBooleanValueCompletion(!e.value,s,o)};if("property"===t.type&&n>(t.colonOffset||0)){const r=t.valueNode;if(r&&(n>r.offset+r.length||"object"===r.type||"array"===r.type))return;const i=t.keyNode.value;e.visit((e=>("property"===e.type&&e.keyNode.value===i&&e.valueNode&&a(e.valueNode),!0))),"$schema"===i&&t.parent&&!t.parent.parent&&this.addDollarSchemaCompletions(s,o)}if("array"===t.type)if(t.parent&&"property"===t.parent.type){const n=t.parent.keyNode.value;e.visit((e=>("property"===e.type&&e.keyNode.value===n&&e.valueNode&&"array"===e.valueNode.type&&e.valueNode.items.forEach(a),!0)))}else t.items.forEach(a)}getValueCompletions(e,t,n,r,o,i,s){let a,c,u=r;if(!n||"string"!==n.type&&"number"!==n.type&&"boolean"!==n.type&&"null"!==n.type||(u=n.offset+n.length,c=n,n=n.parent),n){if("property"===n.type&&r>(n.colonOffset||0)){const e=n.valueNode;if(e&&r>e.offset+e.length)return;a=n.keyNode.value,n=n.parent}if(n&&(void 0!==a||"array"===n.type)){const l=this.evaluateSeparatorAfter(o,u),d=t.getMatchingSchemas(e.schema,n.offset,c);for(const e of d)if(e.node===n&&!e.inverted&&e.schema){if("array"===n.type&&e.schema.items){let t=i;if(e.schema.uniqueItems){const e=new Set;n.children.forEach((t=>{"array"!==t.type&&"object"!==t.type&&e.add(this.getLabelForValue(Et(t)))})),t={...i,add(t){e.has(t.label)||i.add(t)}}}if(Array.isArray(e.schema.items)){const i=this.findItemAtOffset(n,o,r);i<e.schema.items.length&&this.addSchemaValueCompletions(e.schema.items[i],l,t,s)}else this.addSchemaValueCompletions(e.schema.items,l,t,s)}if(void 0!==a){let t=!1;if(e.schema.properties){const n=e.schema.properties[a];n&&(t=!0,this.addSchemaValueCompletions(n,l,i,s))}if(e.schema.patternProperties&&!t)for(const n of Object.keys(e.schema.patternProperties)){const r=st(n);if(r?.test(a)){t=!0;const r=e.schema.patternProperties[n];this.addSchemaValueCompletions(r,l,i,s)}}if(e.schema.additionalProperties&&!t){const t=e.schema.additionalProperties;this.addSchemaValueCompletions(t,l,i,s)}}}"$schema"!==a||n.parent||this.addDollarSchemaCompletions(l,i),s.boolean&&(this.addBooleanValueCompletion(!0,l,i),this.addBooleanValueCompletion(!1,l,i)),s.null&&this.addNullValueCompletion(l,i)}}else this.addSchemaValueCompletions(e.schema,"",i,s)}getContributedValueCompletions(e,t,n,r,o,i){if(t){if("string"!==t.type&&"number"!==t.type&&"boolean"!==t.type&&"null"!==t.type||(t=t.parent),t&&"property"===t.type&&n>(t.colonOffset||0)){const e=t.keyNode.value,s=t.valueNode;if((!s||n<=s.offset+s.length)&&t.parent){const n=Nt(t.parent);this.contributions.forEach((t=>{const s=t.collectValueCompletions(r.uri,n,e,o);s&&i.push(s)}))}}}else this.contributions.forEach((e=>{const t=e.collectDefaultCompletions(r.uri,o);t&&i.push(t)}))}addSchemaValueCompletions(e,t,n,r){"object"==typeof e&&(this.addEnumValueCompletions(e,t,n),this.addDefaultValueCompletions(e,t,n),this.collectTypes(e,r),Array.isArray(e.allOf)&&e.allOf.forEach((e=>this.addSchemaValueCompletions(e,t,n,r))),Array.isArray(e.anyOf)&&e.anyOf.forEach((e=>this.addSchemaValueCompletions(e,t,n,r))),Array.isArray(e.oneOf)&&e.oneOf.forEach((e=>this.addSchemaValueCompletions(e,t,n,r))))}addDefaultValueCompletions(e,t,n,r=0){let o=!1;if(tt(e.default)){let i=e.type,s=e.default;for(let e=r;e>0;e--)s=[s],i="array";const a={kind:this.getSuggestionKind(i),label:this.getLabelForValue(s),insertText:this.getInsertTextForValue(s,t),insertTextFormat:oe.Snippet};this.doesSupportsLabelDetails()?a.labelDetails={description:pt.t("Default value")}:a.detail=pt.t("Default value"),n.add(a),o=!0}Array.isArray(e.examples)&&e.examples.forEach((i=>{let s=e.type,a=i;for(let e=r;e>0;e--)a=[a],s="array";n.add({kind:this.getSuggestionKind(s),label:this.getLabelForValue(a),insertText:this.getInsertTextForValue(a,t),insertTextFormat:oe.Snippet}),o=!0})),Array.isArray(e.defaultSnippets)&&e.defaultSnippets.forEach((i=>{let s,a,c=e.type,u=i.body,l=i.label;if(tt(u)){let n=e.type;for(let e=r;e>0;e--)u=[u],n="array";s=this.getInsertTextForSnippetValue(u,t),a=this.getFilterTextForSnippetValue(u),l=l||this.getLabelForSnippetValue(u)}else{if("string"!=typeof i.bodyText)return;{let e="",n="",o="";for(let t=r;t>0;t--)e=e+o+"[\n",n=n+"\n"+o+"]",o+="\t",c="array";s=e+o+i.bodyText.split("\n").join("\n"+o)+n+t,l=l||s,a=s.replace(/[\n]/g,"")}}n.add({kind:this.getSuggestionKind(c),label:l,documentation:this.fromMarkup(i.markdownDescription)||i.description,insertText:s,insertTextFormat:oe.Snippet,filterText:a}),o=!0})),!o&&"object"==typeof e.items&&!Array.isArray(e.items)&&r<5&&this.addDefaultValueCompletions(e.items,t,n,r+1)}addEnumValueCompletions(e,t,n){if(tt(e.const)&&n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,t),insertTextFormat:oe.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(let r=0,o=e.enum.length;r<o;r++){const o=e.enum[r];let i=this.fromMarkup(e.markdownDescription)||e.description;e.markdownEnumDescriptions&&r<e.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?i=this.fromMarkup(e.markdownEnumDescriptions[r]):e.enumDescriptions&&r<e.enumDescriptions.length&&(i=e.enumDescriptions[r]),n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(o),insertText:this.getInsertTextForValue(o,t),insertTextFormat:oe.Snippet,documentation:i})}}collectTypes(e,t){if(Array.isArray(e.enum)||tt(e.const))return;const n=e.type;Array.isArray(n)?n.forEach((e=>t[e]=!0)):n&&(t[n]=!0)}addFillerValueCompletions(e,t,n){e.object&&n.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},t),insertTextFormat:oe.Snippet,detail:pt.t("New object"),documentation:""}),e.array&&n.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],t),insertTextFormat:oe.Snippet,detail:pt.t("New array"),documentation:""})}addBooleanValueCompletion(e,t,n){n.add({kind:this.getSuggestionKind("boolean"),label:e?"true":"false",insertText:this.getInsertTextForValue(e,t),insertTextFormat:oe.Snippet,documentation:""})}addNullValueCompletion(e,t){t.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:oe.Snippet,documentation:""})}addDollarSchemaCompletions(e,t){this.schemaService.getRegisteredSchemaIds((e=>"http"===e||"https"===e)).forEach((n=>{n.startsWith("http://json-schema.org/draft-")&&(n+="#"),t.add({kind:re.Module,label:this.getLabelForValue(n),filterText:this.getFilterTextForValue(n),insertText:this.getInsertTextForValue(n,e),insertTextFormat:oe.Snippet,documentation:""})}))}getLabelForValue(e){return JSON.stringify(e)}getValueFromLabel(e){return JSON.parse(e)}getFilterTextForValue(e){return JSON.stringify(e)}getFilterTextForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getLabelForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getInsertTextForPlainText(e){return e.replace(/[\\\$\}]/g,"\\$&")}getInsertTextForValue(e,t){const n=JSON.stringify(e,null,"\t");return"{}"===n?"{$1}"+t:"[]"===n?"[$1]"+t:this.getInsertTextForPlainText(n+t)}getInsertTextForSnippetValue(e,t){return It(e,"",(e=>"string"==typeof e&&"^"===e[0]?e.substr(1):JSON.stringify(e)))+t}getInsertTextForGuessedValue(e,t){switch(typeof e){case"object":return null===e?"${1:null}"+t:this.getInsertTextForValue(e,t);case"string":let n=JSON.stringify(e);return n=n.substr(1,n.length-2),n=this.getInsertTextForPlainText(n),'"${1:'+n+'}"'+t;case"number":case"boolean":return"${1:"+JSON.stringify(e)+"}"+t}return this.getInsertTextForValue(e,t)}getSuggestionKind(e){if(Array.isArray(e)){const t=e;e=t.length>0?t[0]:void 0}if(!e)return re.Value;switch(e){case"string":default:return re.Value;case"object":return re.Module;case"property":return re.Property}}getLabelTextForMatchingNode(e,t){switch(e.type){case"array":return"[]";case"object":return"{}";default:return t.getText().substr(e.offset,e.length)}}getInsertTextForMatchingNode(e,t,n){switch(e.type){case"array":return this.getInsertTextForValue([],n);case"object":return this.getInsertTextForValue({},n);default:const r=t.getText().substr(e.offset,e.length)+n;return this.getInsertTextForPlainText(r)}}getInsertTextForProperty(e,t,n,r){const o=this.getInsertTextForValue(e,"");if(!n)return o;const i=o+": ";let s,a=0;if(t){if(Array.isArray(t.defaultSnippets)){if(1===t.defaultSnippets.length){const e=t.defaultSnippets[0].body;tt(e)&&(s=this.getInsertTextForSnippetValue(e,""))}a+=t.defaultSnippets.length}if(t.enum&&(s||1!==t.enum.length||(s=this.getInsertTextForGuessedValue(t.enum[0],"")),a+=t.enum.length),tt(t.const)&&(s||(s=this.getInsertTextForGuessedValue(t.const,"")),a++),tt(t.default)&&(s||(s=this.getInsertTextForGuessedValue(t.default,"")),a++),Array.isArray(t.examples)&&t.examples.length&&(s||(s=this.getInsertTextForGuessedValue(t.examples[0],"")),a+=t.examples.length),0===a){let e=Array.isArray(t.type)?t.type[0]:t.type;switch(e||(t.properties?e="object":t.items&&(e="array")),e){case"boolean":s="$1";break;case"string":s='"$1"';break;case"object":s="{$1}";break;case"array":s="[$1]";break;case"number":case"integer":s="${1:0}";break;case"null":s="${1:null}";break;default:return o}}}return(!s||a>1)&&(s="$1"),i+s+r}getCurrentWord(e,t){let n=t-1;const r=e.getText();for(;n>=0&&-1===' \t\n\r\v":{[,]}'.indexOf(r.charAt(n));)n--;return r.substring(n+1,t)}evaluateSeparatorAfter(e,t){const n=p(e.getText(),!0);switch(n.setPosition(t),n.scan()){case 5:case 2:case 4:case 17:return"";default:return","}}findItemAtOffset(e,t,n){const r=p(t.getText(),!0),o=e.items;for(let e=o.length-1;e>=0;e--){const t=o[e];if(n>t.offset+t.length)return r.setPosition(t.offset+t.length),5===r.scan()&&n>=r.getTokenOffset()+r.getTokenLength()?e+1:e;if(n>=t.offset)return e}return 0}isInComment(e,t,n){const r=p(e.getText(),!1);r.setPosition(t);let o=r.scan();for(;17!==o&&r.getTokenOffset()+r.getTokenLength()<n;)o=r.scan();return(12===o||13===o)&&r.getTokenOffset()<=n}fromMarkup(e){if(e&&this.doesSupportMarkdown())return{kind:te.Markdown,value:e}}doesSupportMarkdown(){if(!tt(this.supportsMarkdown)){const e=this.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat;this.supportsMarkdown=Array.isArray(e)&&-1!==e.indexOf(te.Markdown)}return this.supportsMarkdown}doesSupportsCommitCharacters(){return tt(this.supportsCommitCharacters)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.commitCharactersSupport),this.supportsCommitCharacters}doesSupportsLabelDetails(){return tt(this.labelDetailsSupport)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.labelDetailsSupport),this.labelDetailsSupport}}class $t{constructor(e,t=[],n){this.schemaService=e,this.contributions=t,this.promise=n||Promise}doHover(e,t,n){const r=e.offsetAt(t);let o=n.getNodeFromOffset(r);if(!o||("object"===o.type||"array"===o.type)&&r>o.offset+1&&r<o.offset+o.length-1)return this.promise.resolve(null);const i=o;if("string"===o.type){const e=o.parent;if(e&&"property"===e.type&&e.keyNode===o&&(o=e.valueNode,!o))return this.promise.resolve(null)}const s=_.create(e.positionAt(i.offset),e.positionAt(i.offset+i.length)),a=e=>({contents:e,range:s}),c=Nt(o);for(let t=this.contributions.length-1;t>=0;t--){const n=this.contributions[t].getInfoContribution(e.uri,c);if(n)return n.then((e=>a(e)))}return this.schemaService.getSchemaForResource(e.uri,n).then((e=>{if(e&&o){let r,i,s,c;n.getMatchingSchemas(e.schema,o.offset).every((e=>{if(e.node===o&&!e.inverted&&e.schema&&(r=r||e.schema.title,i=i||e.schema.markdownDescription||Vt(e.schema.description),e.schema.enum)){const t=e.schema.enum.indexOf(Et(o));e.schema.markdownEnumDescriptions?s=e.schema.markdownEnumDescriptions[t]:e.schema.enumDescriptions&&(s=Vt(e.schema.enumDescriptions[t])),s&&(c=e.schema.enum[t],"string"!=typeof c&&(c=JSON.stringify(c)))}return!0}));let u="";return r&&(u=Vt(r)),i&&(u.length>0&&(u+="\n\n"),u+=i),s&&(u.length>0&&(u+="\n\n"),u+=`\`${t=c,-1!==t.indexOf("`")?"`` "+t+" ``":t}\`: ${s}`),a([u])}var t;return null}))}}function Vt(e){if(e)return e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,"$1\n\n$3").replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}class Wt{constructor(e,t){this.jsonSchemaService=e,this.promise=t,this.validationEnabled=!0}configure(e){e&&(this.validationEnabled=!1!==e.validate,this.commentSeverity=e.allowComments?void 0:L.Error)}doValidation(e,t,n,r){if(!this.validationEnabled)return this.promise.resolve([]);const o=[],i={},s=e=>{const t=e.range.start.line+" "+e.range.start.character+" "+e.message;i[t]||(i[t]=!0,o.push(e))},a=r=>{let i=n?.trailingCommas?zt(n.trailingCommas):L.Error,a=n?.comments?zt(n.comments):this.commentSeverity,c=n?.schemaValidation?zt(n.schemaValidation):L.Warning,u=n?.schemaRequest?zt(n.schemaRequest):L.Warning;if(r){const o=(n,r)=>{if(t.root&&u){const o=t.root,i="object"===o.type?o.properties[0]:void 0;if(i&&"$schema"===i.keyNode.value){const t=i.valueNode||i,o=_.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length));s($.create(o,n,u,r))}else{const t=_.create(e.positionAt(o.offset),e.positionAt(o.offset+1));s($.create(t,n,u,r))}}};if(r.errors.length)o(r.errors[0],Ge.SchemaResolveError);else if(c){for(const e of r.warnings)o(e,Ge.SchemaUnsupportedFeature);const i=t.validate(e,r.schema,c,n?.schemaDraft);i&&i.forEach(s)}Ht(r.schema)&&(a=void 0),Bt(r.schema)&&(i=void 0)}for(const e of t.syntaxErrors){if(e.code===Ge.TrailingComma){if("number"!=typeof i)continue;e.severity=i}s(e)}if("number"==typeof a){const e=pt.t("Comments are not permitted in JSON.");t.comments.forEach((t=>{s($.create(t,e,a,Ge.CommentNotPermitted))}))}return o};if(r){const e=r.id||"schemaservice://untitled/"+Ut++;return this.jsonSchemaService.registerExternalSchema({uri:e,schema:r}).getResolvedSchema().then((e=>a(e)))}return this.jsonSchemaService.getSchemaForResource(e.uri,t).then((e=>a(e)))}getLanguageStatus(e,t){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(e.uri,t)}}}let Ut=0;function Ht(e){if(e&&"object"==typeof e){if(nt(e.allowComments))return e.allowComments;if(e.allOf)for(const t of e.allOf){const e=Ht(t);if(nt(e))return e}}}function Bt(e){if(e&&"object"==typeof e){if(nt(e.allowTrailingCommas))return e.allowTrailingCommas;const t=e;if(nt(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(const t of e.allOf){const e=Bt(t);if(nt(e))return e}}}function zt(e){switch(e){case"error":return L.Error;case"warning":return L.Warning;case"ignore":return}}function Kt(e){return e<48?0:e<=57?e-48:(e<97&&(e+=32),e>=97&&e<=102?e-97+10:0)}function Jt(e){if("#"===e[0])switch(e.length){case 4:return{red:17*Kt(e.charCodeAt(1))/255,green:17*Kt(e.charCodeAt(2))/255,blue:17*Kt(e.charCodeAt(3))/255,alpha:1};case 5:return{red:17*Kt(e.charCodeAt(1))/255,green:17*Kt(e.charCodeAt(2))/255,blue:17*Kt(e.charCodeAt(3))/255,alpha:17*Kt(e.charCodeAt(4))/255};case 7:return{red:(16*Kt(e.charCodeAt(1))+Kt(e.charCodeAt(2)))/255,green:(16*Kt(e.charCodeAt(3))+Kt(e.charCodeAt(4)))/255,blue:(16*Kt(e.charCodeAt(5))+Kt(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(16*Kt(e.charCodeAt(1))+Kt(e.charCodeAt(2)))/255,green:(16*Kt(e.charCodeAt(3))+Kt(e.charCodeAt(4)))/255,blue:(16*Kt(e.charCodeAt(5))+Kt(e.charCodeAt(6)))/255,alpha:(16*Kt(e.charCodeAt(7))+Kt(e.charCodeAt(8)))/255}}}class Xt{constructor(e){this.schemaService=e}findDocumentSymbols(e,t,n={resultLimit:Number.MAX_VALUE}){const r=t.root;if(!r)return[];let o=n.resultLimit||Number.MAX_VALUE;const i=e.uri;if(("vscode://defaultsettings/keybindings.json"===i||it(i.toLowerCase(),"/user/keybindings.json"))&&"array"===r.type){const t=[];for(const s of r.items)if("object"===s.type)for(const r of s.properties)if("key"===r.keyNode.value&&r.valueNode){const a=P.create(e.uri,Gt(e,s));if(t.push({name:Zt(r.valueNode),kind:ye.Function,location:a}),o--,o<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(i),t}return t}const s=[{node:r,containerName:""}];let a=0,c=!1;const u=[],l=(t,n)=>{"array"===t.type?t.items.forEach((e=>{e&&s.push({node:e,containerName:n})})):"object"===t.type&&t.properties.forEach((t=>{const r=t.valueNode;if(r)if(o>0){o--;const i=P.create(e.uri,Gt(e,t)),a=n?n+"."+t.keyNode.value:t.keyNode.value;u.push({name:this.getKeyLabel(t),kind:this.getSymbolKind(r.type),location:i,containerName:n}),s.push({node:r,containerName:a})}else c=!0}))};for(;a<s.length;){const e=s[a++];l(e.node,e.containerName)}return c&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(i),u}findDocumentSymbols2(e,t,n={resultLimit:Number.MAX_VALUE}){const r=t.root;if(!r)return[];let o=n.resultLimit||Number.MAX_VALUE;const i=e.uri;if(("vscode://defaultsettings/keybindings.json"===i||it(i.toLowerCase(),"/user/keybindings.json"))&&"array"===r.type){const t=[];for(const s of r.items)if("object"===s.type)for(const r of s.properties)if("key"===r.keyNode.value&&r.valueNode){const a=Gt(e,s),c=Gt(e,r.keyNode);if(t.push({name:Zt(r.valueNode),kind:ye.Function,range:a,selectionRange:c}),o--,o<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(i),t}return t}const s=[],a=[{node:r,result:s}];let c=0,u=!1;const l=(t,n)=>{"array"===t.type?t.items.forEach(((t,r)=>{if(t)if(o>0){o--;const i=Gt(e,t),s=i,c={name:String(r),kind:this.getSymbolKind(t.type),range:i,selectionRange:s,children:[]};n.push(c),a.push({result:c.children,node:t})}else u=!0})):"object"===t.type&&t.properties.forEach((t=>{const r=t.valueNode;if(r)if(o>0){o--;const i=Gt(e,t),s=Gt(e,t.keyNode),c=[],u={name:this.getKeyLabel(t),kind:this.getSymbolKind(r.type),range:i,selectionRange:s,children:c,detail:this.getDetail(r)};n.push(u),a.push({result:c,node:r})}else u=!0}))};for(;c<a.length;){const e=a[c++];l(e.node,e.result)}return u&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(i),s}getSymbolKind(e){switch(e){case"object":return ye.Module;case"string":return ye.String;case"number":return ye.Number;case"array":return ye.Array;case"boolean":return ye.Boolean;default:return ye.Variable}}getKeyLabel(e){let t=e.keyNode.value;return t&&(t=t.replace(/[\n]/g,"↵")),t&&t.trim()?t:`"${t}"`}getDetail(e){if(e)return"boolean"===e.type||"number"===e.type||"null"===e.type||"string"===e.type?String(e.value):"array"===e.type?e.children.length?void 0:"[]":"object"===e.type?e.children.length?void 0:"{}":void 0}findDocumentColors(e,t,n){return this.schemaService.getSchemaForResource(e.uri,t).then((r=>{const o=[];if(r){let i=n&&"number"==typeof n.resultLimit?n.resultLimit:Number.MAX_VALUE;const s=t.getMatchingSchemas(r.schema),a={};for(const t of s)if(!t.inverted&&t.schema&&("color"===t.schema.format||"color-hex"===t.schema.format)&&t.node&&"string"===t.node.type){const r=String(t.node.offset);if(!a[r]){const s=Jt(Et(t.node));if(s){const n=Gt(e,t.node);o.push({color:s,range:n})}if(a[r]=!0,i--,i<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(e.uri),o}}}return o}))}getColorPresentations(e,t,n,r){const o=[],i=Math.round(255*n.red),s=Math.round(255*n.green),a=Math.round(255*n.blue);function c(e){const t=e.toString(16);return 2!==t.length?"0"+t:t}let u;return u=1===n.alpha?`#${c(i)}${c(s)}${c(a)}`:`#${c(i)}${c(s)}${c(a)}${c(Math.round(255*n.alpha))}`,o.push({label:u,textEdit:W.replace(r,JSON.stringify(u))}),o}}function Gt(e,t){return _.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}function Zt(e){return Et(e)||pt.t("<empty>")}const Qt={schemaAssociations:[],schemas:{"http://json-schema.org/draft-04/schema#":{$schema:"http://json-schema.org/draft-04/schema#",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"http://json-schema.org/draft-07/schema#":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}},Yt={id:pt.t("A unique identifier for the schema."),$schema:pt.t("The schema to verify this document against."),title:pt.t("A descriptive title of the element."),description:pt.t("A long description of the element. Used in hover menus and suggestions."),default:pt.t("A default value. Used by suggestions."),multipleOf:pt.t("A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:pt.t("The maximum numerical value, inclusive by default."),exclusiveMaximum:pt.t("Makes the maximum property exclusive."),minimum:pt.t("The minimum numerical value, inclusive by default."),exclusiveMinimum:pt.t("Makes the minimum property exclusive."),maxLength:pt.t("The maximum length of a string."),minLength:pt.t("The minimum length of a string."),pattern:pt.t("A regular expression to match the string against. It is not implicitly anchored."),additionalItems:pt.t("For arrays, only when items is set as an array. If it is a schema, then this schema validates items after the ones specified by the items array. If it is false, then additional items will cause validation to fail."),items:pt.t("For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:pt.t("The maximum number of items that can be inside an array. Inclusive."),minItems:pt.t("The minimum number of items that can be inside an array. Inclusive."),uniqueItems:pt.t("If all of the items in the array must be unique. Defaults to false."),maxProperties:pt.t("The maximum number of properties an object can have. Inclusive."),minProperties:pt.t("The minimum number of properties an object can have. Inclusive."),required:pt.t("An array of strings that lists the names of all properties required on this object."),additionalProperties:pt.t("Either a schema or a boolean. If a schema, then used to validate all properties not matched by 'properties' or 'patternProperties'. If false, then any properties not matched by either will cause this schema to fail."),definitions:pt.t("Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:pt.t("A map of property names to schemas for each property."),patternProperties:pt.t("A map of regular expressions on property names to schemas for matching properties."),dependencies:pt.t("A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:pt.t("The set of literal values that are valid."),type:pt.t("Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:pt.t("Describes the format expected for the value."),allOf:pt.t("An array of schemas, all of which must match."),anyOf:pt.t("An array of schemas, where at least one must match."),oneOf:pt.t("An array of schemas, exactly one of which must match."),not:pt.t("A schema which must not match."),$id:pt.t("A unique identifier for the schema."),$ref:pt.t("Reference a definition hosted on any location."),$comment:pt.t("Comments from schema authors to readers or maintainers of the schema."),readOnly:pt.t("Indicates that the value of the instance is managed exclusively by the owning authority."),examples:pt.t("Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:pt.t('An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:pt.t("If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:pt.t("An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:pt.t("Describes the media type of a string property."),contentEncoding:pt.t("Describes the content encoding of a string property."),if:pt.t('The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:pt.t('The "if" subschema is used for validation when the "if" subschema succeeds.'),else:pt.t('The "else" subschema is used for validation when the "if" subschema fails.')};for(const e in Qt.schemas){const t=Qt.schemas[e];for(const e in t.properties){let n=t.properties[e];"boolean"==typeof n&&(n=t.properties[e]={});const r=Yt[e];r&&(n.description=r)}}var en;(()=>{var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",o=0,i=-1,s=0,a=0;a<=e.length;++a){if(a<e.length)n=e.charCodeAt(a);else{if(47===n)break;n=47}if(47===n){if(i===a-1||1===s);else if(i!==a-1&&2===s){if(r.length<2||2!==o||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",o=0):o=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),i=a,s=0;continue}}else if(2===r.length||1===r.length){r="",o=0,i=a,s=0;continue}t&&(r.length>0?r+="/..":r="..",o=2)}else r.length>0?r+="/"+e.slice(i+1,a):r=e.slice(i+1,a),o=a-i-1;i=a,s=0}else 46===n&&-1!==s?++s:s=-1}return r}var r={resolve:function(){for(var e,r="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var s;i>=0?s=arguments[i]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(r=s+"/"+r,o=47===s.charCodeAt(0))}return r=n(r,!o),o?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),o=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&o&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var o=arguments[n];t(o),o.length>0&&(void 0===e?e=o:e+="/"+o)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var o=1;o<e.length&&47===e.charCodeAt(o);++o);for(var i=e.length,s=i-o,a=1;a<n.length&&47===n.charCodeAt(a);++a);for(var c=n.length-a,u=s<c?s:c,l=-1,d=0;d<=u;++d){if(d===u){if(c>u){if(47===n.charCodeAt(a+d))return n.slice(a+d+1);if(0===d)return n.slice(a+d)}else s>u&&(47===e.charCodeAt(o+d)?l=d:0===d&&(l=0));break}var f=e.charCodeAt(o+d);if(f!==n.charCodeAt(a+d))break;47===f&&(l=d)}var h="";for(d=o+l+1;d<=i;++d)d!==i&&47!==e.charCodeAt(d)||(0===h.length?h+="..":h+="/..");return h.length>0?h+n.slice(a+l):(a+=l,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,o=-1,i=!0,s=e.length-1;s>=1;--s)if(47===(n=e.charCodeAt(s))){if(!i){o=s;break}}else i=!1;return-1===o?r?"/":".":r&&1===o?"//":e.slice(0,o)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,o=0,i=-1,s=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var u=e.charCodeAt(r);if(47===u){if(!s){o=r+1;break}}else-1===c&&(s=!1,c=r+1),a>=0&&(u===n.charCodeAt(a)?-1==--a&&(i=r):(a=-1,i=c))}return o===i?i=c:-1===i&&(i=e.length),e.slice(o,i)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!s){o=r+1;break}}else-1===i&&(s=!1,i=r+1);return-1===i?"":e.slice(o,i)},extname:function(e){t(e);for(var n=-1,r=0,o=-1,i=!0,s=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===o&&(i=!1,o=a+1),46===c?-1===n?n=a:1!==s&&(s=1):-1!==n&&(s=-1);else if(!i){r=a+1;break}}return-1===n||-1===o||0===s||1===s&&n===o-1&&n===r+1?"":e.slice(n,o)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,o=e.charCodeAt(0),i=47===o;i?(n.root="/",r=1):r=0;for(var s=-1,a=0,c=-1,u=!0,l=e.length-1,d=0;l>=r;--l)if(47!==(o=e.charCodeAt(l)))-1===c&&(u=!1,c=l+1),46===o?-1===s?s=l:1!==d&&(d=1):-1!==s&&(d=-1);else if(!u){a=l+1;break}return-1===s||-1===c||0===d||1===d&&s===c-1&&s===a+1?-1!==c&&(n.base=n.name=0===a&&i?e.slice(1,c):e.slice(a,c)):(0===a&&i?(n.name=e.slice(1,s),n.base=e.slice(1,c)):(n.name=e.slice(a,s),n.base=e.slice(a,c)),n.ext=e.slice(s,c)),a>0?n.dir=e.slice(0,a-1):i&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{let e;if(n.r(r),n.d(r,{URI:()=>l,Utils:()=>S}),"object"==typeof process)e=!1;else if("object"==typeof navigator){let t=navigator.userAgent;e=t.indexOf("Windows")>=0}const t=/^\w[\w\d+.-]*$/,o=/^\//,i=/^\/\//;function s(e,n){if(!e.scheme&&n)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!t.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!o.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(i.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const a="",c="/",u=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class l{static isUri(e){return e instanceof l||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,r,o,i=!1){"object"==typeof e?(this.scheme=e.scheme||a,this.authority=e.authority||a,this.path=e.path||a,this.query=e.query||a,this.fragment=e.fragment||a):(this.scheme=function(e,t){return e||t?e:"file"}(e,i),this.authority=t||a,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==c&&(t=c+t):t=c}return t}(this.scheme,n||a),this.query=r||a,this.fragment=o||a,s(this,i))}get fsPath(){return g(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:o,fragment:i}=e;return void 0===t?t=this.scheme:null===t&&(t=a),void 0===n?n=this.authority:null===n&&(n=a),void 0===r?r=this.path:null===r&&(r=a),void 0===o?o=this.query:null===o&&(o=a),void 0===i?i=this.fragment:null===i&&(i=a),t===this.scheme&&n===this.authority&&r===this.path&&o===this.query&&i===this.fragment?this:new f(t,n,r,o,i)}static parse(e,t=!1){const n=u.exec(e);return n?new f(n[2]||a,k(n[4]||a),k(n[5]||a),k(n[7]||a),k(n[9]||a),t):new f(a,a,a,a,a)}static file(t){let n=a;if(e&&(t=t.replace(/\\/g,c)),t[0]===c&&t[1]===c){const e=t.indexOf(c,2);-1===e?(n=t.substring(2),t=c):(n=t.substring(2,e),t=t.substring(e)||c)}return new f("file",n,t,a,a)}static from(e){const t=new f(e.scheme,e.authority,e.path,e.query,e.fragment);return s(t,!0),t}toString(e=!1){return y(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof l)return e;{const t=new f(e);return t._formatted=e.external,t._fsPath=e._sep===d?e.fsPath:null,t}}return e}}const d=e?1:void 0;class f extends l{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=g(this,!1)),this._fsPath}toString(e=!1){return e?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=d),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const h={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function m(e,t,n){let r,o=-1;for(let i=0;i<e.length;i++){const s=e.charCodeAt(i);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||t&&47===s||n&&91===s||n&&93===s||n&&58===s)-1!==o&&(r+=encodeURIComponent(e.substring(o,i)),o=-1),void 0!==r&&(r+=e.charAt(i));else{void 0===r&&(r=e.substr(0,i));const t=h[s];void 0!==t?(-1!==o&&(r+=encodeURIComponent(e.substring(o,i)),o=-1),r+=t):-1===o&&(o=i)}}return-1!==o&&(r+=encodeURIComponent(e.substring(o))),void 0!==r?r:e}function p(e){let t;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);35===r||63===r?(void 0===t&&(t=e.substr(0,n)),t+=h[r]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function g(t,n){let r;return r=t.authority&&t.path.length>1&&"file"===t.scheme?`//${t.authority}${t.path}`:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?n?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(r=r.replace(/\//g,"\\")),r}function y(e,t){const n=t?p:m;let r="",{scheme:o,authority:i,path:s,query:a,fragment:u}=e;if(o&&(r+=o,r+=":"),(i||"file"===o)&&(r+=c,r+=c),i){let e=i.indexOf("@");if(-1!==e){const t=i.substr(0,e);i=i.substr(e+1),e=t.lastIndexOf(":"),-1===e?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=":",r+=n(t.substr(e+1),!1,!0)),r+="@"}i=i.toLowerCase(),e=i.lastIndexOf(":"),-1===e?r+=n(i,!1,!0):(r+=n(i.substr(0,e),!1,!0),r+=i.substr(e))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const e=s.charCodeAt(1);e>=65&&e<=90&&(s=`/${String.fromCharCode(e+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const e=s.charCodeAt(0);e>=65&&e<=90&&(s=`${String.fromCharCode(e+32)}:${s.substr(2)}`)}r+=n(s,!0,!1)}return a&&(r+="?",r+=n(a,!1,!1)),u&&(r+="#",r+=t?u:m(u,!1,!1)),r}function b(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+b(e.substr(3)):e}}const v=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function k(e){return e.match(v)?e.replace(v,(e=>b(e))):e}var T=n(470);const R=T.posix||T,D="/";var S;!function(e){e.joinPath=function(e,...t){return e.with({path:R.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==D&&(n=D+n,r=!0);let o=R.resolve(n,...t);return r&&o[0]===D&&!e.authority&&(o=o.substring(1)),e.with({path:o})},e.dirname=function(e){if(0===e.path.length||e.path===D)return e;let t=R.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return R.basename(e.path)},e.extname=function(e){return R.extname(e.path)}}(S||(S={}))})(),en=r})();const{URI:tn,Utils:nn}=en;function rn(e,t){if("string"!=typeof e)throw new TypeError("Expected a string");const n=String(e);let r="";const o=!!t&&!!t.extended,i=!!t&&!!t.globstar;let s=!1;const a=t&&"string"==typeof t.flags?t.flags:"";let c;for(let e=0,t=n.length;e<t;e++)switch(c=n[e],c){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":r+="\\"+c;break;case"?":if(o){r+=".";break}case"[":case"]":if(o){r+=c;break}case"{":if(o){s=!0,r+="(";break}case"}":if(o){s=!1,r+=")";break}case",":if(s){r+="|";break}r+="\\"+c;break;case"*":const t=n[e-1];let a=1;for(;"*"===n[e+1];)a++,e++;const u=n[e+1];i?!(a>1)||"/"!==t&&void 0!==t&&"{"!==t&&","!==t||"/"!==u&&void 0!==u&&","!==u&&"}"!==u?r+="([^/]*)":("/"===u?e++:"/"===t&&r.endsWith("\\/")&&(r=r.substr(0,r.length-2)),r+="((?:[^/]*(?:/|$))*)"):r+=".*";break;default:r+=c}return a&&~a.indexOf("g")||(r="^"+r+"$"),new RegExp(r,a)}class on{constructor(e,t,n){this.folderUri=t,this.uris=n,this.globWrappers=[];try{for(let t of e){const e="!"!==t[0];e||(t=t.substring(1)),t.length>0&&("/"===t[0]&&(t=t.substring(1)),this.globWrappers.push({regexp:rn("**/"+t,{extended:!0,globstar:!0}),include:e}))}t&&((t=fn(t)).endsWith("/")||(t+="/"),this.folderUri=t)}catch(e){this.globWrappers.length=0,this.uris=[]}}matchesPattern(e){if(this.folderUri&&!e.startsWith(this.folderUri))return!1;let t=!1;for(const{regexp:n,include:r}of this.globWrappers)n.test(e)&&(t=r);return t}getURIs(){return this.uris}}class sn{constructor(e,t,n){this.service=e,this.uri=t,this.dependencies=new Set,this.anchors=void 0,n&&(this.unresolvedSchema=this.service.promise.resolve(new an(n)))}getUnresolvedSchema(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.uri)),this.unresolvedSchema}getResolvedSchema(){return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then((e=>this.service.resolveSchemaContent(e,this)))),this.resolvedSchema}clearSchema(){const e=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,e}}class an{constructor(e,t=[]){this.schema=e,this.errors=t}}class cn{constructor(e,t=[],n=[],r){this.schema=e,this.errors=t,this.warnings=n,this.schemaDraft=r}getSection(e){const t=this.getSectionRecursive(e,this.schema);if(t)return Ct(t)}getSectionRecursive(e,t){if(!t||"boolean"==typeof t||0===e.length)return t;const n=e.shift();if(t.properties&&(t.properties[n],1))return this.getSectionRecursive(e,t.properties[n]);if(t.patternProperties)for(const r of Object.keys(t.patternProperties)){const o=st(r);if(o?.test(n))return this.getSectionRecursive(e,t.patternProperties[r])}else{if("object"==typeof t.additionalProperties)return this.getSectionRecursive(e,t.additionalProperties);if(n.match("[0-9]+"))if(Array.isArray(t.items)){const r=parseInt(n,10);if(!isNaN(r)&&t.items[r])return this.getSectionRecursive(e,t.items[r])}else if(t.items)return this.getSectionRecursive(e,t.items)}}}class un{constructor(e,t,n){this.contextService=t,this.requestService=e,this.promiseConstructor=n||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}getRegisteredSchemaIds(e){return Object.keys(this.registeredSchemasIds).filter((t=>{const n=tn.parse(t).scheme;return"schemaservice"!==n&&(!e||e(n))}))}get promise(){return this.promiseConstructor}dispose(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()}onResourceChange(e){this.cachedSchemaForResource=void 0;let t=!1;const n=[e=dn(e)],r=Object.keys(this.schemasById).map((e=>this.schemasById[e]));for(;n.length;){const e=n.pop();for(let o=0;o<r.length;o++){const i=r[o];i&&(i.uri===e||i.dependencies.has(e))&&(i.uri!==e&&n.push(i.uri),i.clearSchema()&&(t=!0),r[o]=void 0)}}return t}setSchemaContributions(e){if(e.schemas){const t=e.schemas;for(const e in t){const n=dn(e);this.contributionSchemas[n]=this.addSchemaHandle(n,t[e])}}if(Array.isArray(e.schemaAssociations)){const t=e.schemaAssociations;for(let e of t){const t=e.uris.map(dn),n=this.addFilePatternAssociation(e.pattern,e.folderUri,t);this.contributionAssociations.push(n)}}}addSchemaHandle(e,t){const n=new sn(this,e,t);return this.schemasById[e]=n,n}getOrAddSchemaHandle(e,t){return this.schemasById[e]||this.addSchemaHandle(e,t)}addFilePatternAssociation(e,t,n){const r=new on(e,t,n);return this.filePatternAssociations.push(r),r}registerExternalSchema(e){const t=dn(e.uri);return this.registeredSchemasIds[t]=!0,this.cachedSchemaForResource=void 0,e.fileMatch&&e.fileMatch.length&&this.addFilePatternAssociation(e.fileMatch,e.folderUri,[t]),e.schema?this.addSchemaHandle(t,e.schema):this.getOrAddSchemaHandle(t)}clearExternalSchemas(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(const e in this.contributionSchemas)this.schemasById[e]=this.contributionSchemas[e],this.registeredSchemasIds[e]=!0;for(const e of this.contributionAssociations)this.filePatternAssociations.push(e)}getResolvedSchema(e){const t=dn(e),n=this.schemasById[t];return n?n.getResolvedSchema():this.promise.resolve(void 0)}loadSchema(e){if(!this.requestService){const t=pt.t("Unable to load schema from '{0}'. No schema request service available",hn(e));return this.promise.resolve(new an({},[t]))}return e.startsWith("http://json-schema.org/")&&(e="https"+e.substring(4)),this.requestService(e).then((t=>{if(!t){const t=pt.t("Unable to load schema from '{0}': No content.",hn(e));return new an({},[t])}const n=[];65279===t.charCodeAt(0)&&(n.push(pt.t("Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.",hn(e))),t=t.trimStart());let r={};const o=[];return r=b(t,o),o.length&&n.push(pt.t("Unable to parse content from '{0}': Parse error at offset {1}.",hn(e),o[0].offset)),new an(r,n)}),(t=>{let n=t.toString();const r=t.toString().split("Error: ");return r.length>1&&(n=r[1]),it(n,".")&&(n=n.substr(0,n.length-1)),new an({},[pt.t("Unable to load schema from '{0}': {1}.",hn(e),n)])}))}resolveSchemaContent(e,t){const n=e.errors.slice(0),r=e.schema;let o=r.$schema?dn(r.$schema):void 0;if("http://json-schema.org/draft-03/schema"===o)return this.promise.resolve(new cn({},[pt.t("Draft-03 schemas are not supported.")],[],o));let i=new Set;const s=this.contextService,a=(e,t,r,o)=>{let i;i=void 0===o||0===o.length?t:"/"===o.charAt(0)?((e,t)=>{t=decodeURIComponent(t);let n=e;return"/"===t[0]&&(t=t.substring(1)),t.split("/").some((e=>(e=e.replace(/~1/g,"/").replace(/~0/g,"~"),n=n[e],!n))),n})(t,o):((e,t,n)=>(t.anchors||(t.anchors=l(e)),t.anchors.get(n)))(t,r,o),i?((e,t)=>{for(const n in t)t.hasOwnProperty(n)&&"id"!==n&&"$id"!==n&&(e[n]=t[n])})(e,i):n.push(pt.t("$ref '{0}' in '{1}' can not be resolved.",o||"",r.uri))},c=(e,t,r,o)=>{s&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(t)&&(t=s.resolveRelativePath(t,o.uri)),t=dn(t);const i=this.getOrAddSchemaHandle(t);return i.getUnresolvedSchema().then((s=>{if(o.dependencies.add(t),s.errors.length){const e=r?t+"#"+r:t;n.push(pt.t("Problems loading reference '{0}': {1}",e,s.errors[0]))}return a(e,s.schema,i,r),u(e,s.schema,i)}))},u=(e,t,n)=>{const r=[];return this.traverseNodes(e,(e=>{const o=new Set;for(;e.$ref;){const i=e.$ref,s=i.split("#",2);if(delete e.$ref,s[0].length>0)return void r.push(c(e,s[0],s[1],n));if(!o.has(i)){const r=s[1];a(e,t,n,r),o.add(i)}}e.$recursiveRef&&i.add("$recursiveRef"),e.$dynamicRef&&i.add("$dynamicRef")})),this.promise.all(r)},l=e=>{const t=new Map;return this.traverseNodes(e,(e=>{const r=e.$id||e.id,o=rt(r)&&"#"===r.charAt(0)?r.substring(1):e.$anchor;o&&(t.has(o)?n.push(pt.t("Duplicate anchor declaration: '{0}'",o)):t.set(o,e)),e.$recursiveAnchor&&i.add("$recursiveAnchor"),e.$dynamicAnchor&&i.add("$dynamicAnchor")})),t};return u(r,r,t).then((e=>{let t=[];return i.size&&t.push(pt.t("The schema uses meta-schema features ({0}) that are not yet supported by the validator.",Array.from(i.keys()).join(", "))),new cn(r,n,t,o)}))}traverseNodes(e,t){if(!e||"object"!=typeof e)return Promise.resolve(null);const n=new Set,r=(...e)=>{for(const t of e)ot(t)&&a.push(t)},o=(...e)=>{for(const t of e)if(ot(t))for(const e in t){const n=t[e];ot(n)&&a.push(n)}},i=(...e)=>{for(const t of e)if(Array.isArray(t))for(const e of t)ot(e)&&a.push(e)},s=e=>{if(Array.isArray(e))for(const t of e)ot(t)&&a.push(t);else ot(e)&&a.push(e)},a=[e];let c=a.pop();for(;c;)n.has(c)||(n.add(c),t(c),r(c.additionalItems,c.additionalProperties,c.not,c.contains,c.propertyNames,c.if,c.then,c.else,c.unevaluatedItems,c.unevaluatedProperties),o(c.definitions,c.$defs,c.properties,c.patternProperties,c.dependencies,c.dependentSchemas),i(c.anyOf,c.allOf,c.oneOf,c.prefixItems),s(c.items)),c=a.pop()}getSchemaFromProperty(e,t){if("object"===t.root?.type)for(const n of t.root.properties)if("$schema"===n.keyNode.value&&"string"===n.valueNode?.type){let t=n.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(t)&&(t=this.contextService.resolveRelativePath(t,e)),t}}getAssociatedSchemas(e){const t=Object.create(null),n=[],r=fn(e);for(const e of this.filePatternAssociations)if(e.matchesPattern(r))for(const r of e.getURIs())t[r]||(n.push(r),t[r]=!0);return n}getSchemaURIsForResource(e,t){let n=t&&this.getSchemaFromProperty(e,t);return n?[n]:this.getAssociatedSchemas(e)}getSchemaForResource(e,t){if(t){let n=this.getSchemaFromProperty(e,t);if(n){const e=dn(n);return this.getOrAddSchemaHandle(e).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===e)return this.cachedSchemaForResource.resolvedSchema;const n=this.getAssociatedSchemas(e),r=n.length>0?this.createCombinedSchema(e,n).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:e,resolvedSchema:r},r}createCombinedSchema(e,t){if(1===t.length)return this.getOrAddSchemaHandle(t[0]);{const n="schemaservice://combinedSchema/"+encodeURIComponent(e),r={allOf:t.map((e=>({$ref:e})))};return this.addSchemaHandle(n,r)}}getMatchingSchemas(e,t,n){if(n){const e=n.id||"schemaservice://untitled/matchingSchemas/"+ln++;return this.addSchemaHandle(e,n).getResolvedSchema().then((e=>t.getMatchingSchemas(e.schema).filter((e=>!e.inverted))))}return this.getSchemaForResource(e.uri,t).then((e=>e?t.getMatchingSchemas(e.schema).filter((e=>!e.inverted)):[]))}}let ln=0;function dn(e){try{return tn.parse(e).toString(!0)}catch(t){return e}}function fn(e){try{return tn.parse(e).with({fragment:null,query:null}).toString(!0)}catch(t){return e}}function hn(e){try{const t=tn.parse(e);if("file"===t.scheme)return t.fsPath}catch(e){}return e}function mn(e,t){const n=[],r=[],o=[];let i=-1;const s=p(e.getText(),!1);let a=s.scan();function c(e){n.push(e),r.push(o.length)}for(;17!==a;){switch(a){case 1:case 3:{const t=e.positionAt(s.getTokenOffset()).line,n={startLine:t,endLine:t,kind:1===a?"object":"array"};o.push(n);break}case 2:case 4:{const t=2===a?"object":"array";if(o.length>0&&o[o.length-1].kind===t){const t=o.pop(),n=e.positionAt(s.getTokenOffset()).line;t&&n>t.startLine+1&&i!==t.startLine&&(t.endLine=n-1,c(t),i=t.startLine)}break}case 13:{const t=e.positionAt(s.getTokenOffset()).line,n=e.positionAt(s.getTokenOffset()+s.getTokenLength()).line;1===s.getTokenError()&&t+1<e.lineCount?s.setPosition(e.offsetAt(x.create(t+1,0))):t<n&&(c({startLine:t,endLine:n,kind:q.Comment}),i=t);break}case 12:{const t=e.getText().substr(s.getTokenOffset(),s.getTokenLength()).match(/^\/\/\s*#(region\b)|(endregion\b)/);if(t){const n=e.positionAt(s.getTokenOffset()).line;if(t[1]){const e={startLine:n,endLine:n,kind:q.Region};o.push(e)}else{let e=o.length-1;for(;e>=0&&o[e].kind!==q.Region;)e--;if(e>=0){const t=o[e];o.length=e,n>t.startLine&&i!==t.startLine&&(t.endLine=n,c(t),i=t.startLine)}}}break}}a=s.scan()}const u=t&&t.rangeLimit;if("number"!=typeof u||n.length<=u)return n;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);const l=[];for(let e of r)e<30&&(l[e]=(l[e]||0)+1);let d=0,f=0;for(let e=0;e<l.length;e++){const t=l[e];if(t){if(t+d>u){f=e;break}d+=t}}const h=[];for(let e=0;e<n.length;e++){const t=r[e];"number"==typeof t&&(t<f||t===f&&d++<u)&&h.push(n[e])}return h}function pn(e,t,n){function r(t,n){return _.create(e.positionAt(t),e.positionAt(n))}const o=p(e.getText(),!0);function i(e,t){return o.setPosition(e),o.scan()===t?o.getTokenOffset()+o.getTokenLength():-1}return t.map((function(t){let o=e.offsetAt(t),s=n.getNodeFromOffset(o,!0);const a=[];for(;s;){switch(s.type){case"string":case"object":case"array":const e=s.offset+1,t=s.offset+s.length-1;e<t&&o>=e&&o<=t&&a.push(r(e,t)),a.push(r(s.offset,s.offset+s.length));break;case"number":case"boolean":case"null":case"property":a.push(r(s.offset,s.offset+s.length))}if("property"===s.type||s.parent&&"array"===s.parent.type){const e=i(s.offset+s.length,5);-1!==e&&a.push(r(s.offset,e))}s=s.parent}let c;for(let e=a.length-1;e>=0;e--)c=Pe.create(a[e],c);return c||(c=Pe.create(_.create(t,t))),c}))}function gn(e,t,n){let o;if(n){const t=e.offsetAt(n.start);o={offset:t,length:e.offsetAt(n.end)-t}}const i={tabSize:t?t.tabSize:4,insertSpaces:!0===t?.insertSpaces,insertFinalNewline:!0===t?.insertFinalNewline,eol:"\n",keepLines:!0===t?.keepLines};return function(e,t,n){return function(e,t,n){let o,i,s,a,u;if(t){for(a=t.offset,u=a+t.length,s=a;s>0&&!h(e,s-1);)s--;let r=u;for(;r<e.length&&!h(e,r);)r++;i=e.substring(s,r),o=function(e,t){let n=0,r=0;const o=t.tabSize||4;for(;n<e.length;){let t=e.charAt(n);if(t===c[1])r++;else{if("\t"!==t)break;r+=o}n++}return Math.floor(r/o)}(i,n)}else i=e,o=0,s=0,a=0,u=e.length;const m=function(e,t){for(let e=0;e<t.length;e++){const n=t.charAt(e);if("\r"===n)return e+1<t.length&&"\n"===t.charAt(e+1)?"\r\n":"\r";if("\n"===n)return"\n"}return e&&e.eol||"\n"}(n,e),p=d.includes(m);let g,y=0,b=0;g=n.insertSpaces?c[n.tabSize||4]??f(c[1],n.tabSize||4):"\t";const v="\t"===g?"\t":" ";let k=r(i,!1),T=!1;function R(){if(y>1)return f(m,y)+f(g,o+b);const e=g.length*(o+b);return!p||e>l[v][m].length?m+f(g,o+b):e<=0?m:l[v][m][e]}function D(){let e=k.scan();for(y=0;15===e||14===e;)14===e&&n.keepLines?y+=1:14===e&&(y=1),e=k.scan();return T=16===e||0!==k.getTokenError(),e}const S=[];function C(n,r,o){T||t&&!(r<u&&o>a)||e.substring(r,o)===n||S.push({offset:r,length:o-r,content:n})}let w=D();if(n.keepLines&&y>0&&C(f(m,y),0,0),17!==w){let e=k.getTokenOffset()+s;C(g.length*o<20&&n.insertSpaces?c[g.length*o]:f(g,o),s,e)}for(;17!==w;){let e=k.getTokenOffset()+k.getTokenLength()+s,t=D(),r="",o=!1;for(;0===y&&(12===t||13===t);){let n=k.getTokenOffset()+s;C(c[1],e,n),e=k.getTokenOffset()+k.getTokenLength()+s,o=12===t,r=o?R():"",t=D()}if(2===t)1!==w&&b--,n.keepLines&&y>0||!n.keepLines&&1!==w?r=R():n.keepLines&&(r=c[1]);else if(4===t)3!==w&&b--,n.keepLines&&y>0||!n.keepLines&&3!==w?r=R():n.keepLines&&(r=c[1]);else{switch(w){case 3:case 1:b++,r=n.keepLines&&y>0||!n.keepLines?R():c[1];break;case 5:r=n.keepLines&&y>0||!n.keepLines?R():c[1];break;case 12:r=R();break;case 13:y>0?r=R():o||(r=c[1]);break;case 6:n.keepLines&&y>0?r=R():o||(r=c[1]);break;case 10:n.keepLines&&y>0?r=R():6!==t||o||(r="");break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&y>0?r=R():12!==t&&13!==t||o?5!==t&&17!==t&&(T=!0):r=c[1];break;case 16:T=!0}y>0&&(12===t||13===t)&&(r=R())}17===t&&(r=n.keepLines&&y>0?R():n.insertFinalNewline?m:""),C(r,e,k.getTokenOffset()+s),w=t}return S}(e,t,n)}(e.getText(),o,i).map((t=>W.replace(_.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length)),t.content)))}var yn;!function(e){e[e.Object=0]="Object",e[e.Array=1]="Array"}(yn||(yn={}));class bn{constructor(e,t){this.propertyName=e??"",this.beginningLineNumber=t,this.childrenProperties=[],this.lastProperty=!1,this.noKeyName=!1}addChildProperty(e){if(e.parent=this,this.childrenProperties.length>0){let t=0;t=e.noKeyName?this.childrenProperties.length:function(e,t,n){const r=t.propertyName.toLowerCase(),o=e[0].propertyName.toLowerCase(),i=e[e.length-1].propertyName.toLowerCase();if(r<o)return 0;if(r>i)return e.length;let s=0,a=e.length-1;for(;s<=a;){let r=a+s>>1,o=n(t,e[r]);if(o>0)s=r+1;else{if(!(o<0))return r;a=r-1}}return-s-1}(this.childrenProperties,e,vn),t<0&&(t=-1*t-1),this.childrenProperties.splice(t,0,e)}else this.childrenProperties.push(e);return e}}function vn(e,t){const n=e.propertyName.toLowerCase(),r=t.propertyName.toLowerCase();return n<r?-1:n>r?1:0}function kn(e,t,n){if(0!==t.childrenProperties.length)if(t.type===yn.Object){let r=1/0;for(const e of t.childrenProperties)e.beginningLineNumber<r&&(r=e.beginningLineNumber);n+=r-t.beginningLineNumber,t.childrenProperties.sort(((e,t)=>{const n=e.propertyName??"",r=t.propertyName??"";return n<r?-1:n>r?1:0})),e.push(new Rn(n,t.childrenProperties))}else t.type===yn.Array&&Tn(e,t,n)}function Tn(e,t,n){for(const r of t.childrenProperties){if(r.type===yn.Object){let o=1/0;for(const e of r.childrenProperties)e.beginningLineNumber<o&&(o=e.beginningLineNumber);const i=o-r.beginningLineNumber;e.push(new Rn(n+r.beginningLineNumber-t.beginningLineNumber+i,r.childrenProperties))}r.type===yn.Array&&Tn(e,r,n+r.beginningLineNumber-t.beginningLineNumber)}}class Rn{constructor(e,t){this.beginningLineNumber=e,this.propertyTreeArray=t}}function Dn(e,t){const n=[];return t.visit((r=>{if("property"===r.type&&"$ref"===r.keyNode.value&&"string"===r.valueNode?.type){const o=r.valueNode.value,i=function(e,t){const n=function(e){return"#"===e?[]:"#"!==e[0]||"/"!==e[1]?null:e.substring(2).split(/\//).map(wn)}(t);return n?Cn(n,e.root):null}(t,o);if(i){const t=e.positionAt(i.offset);n.push({target:`${e.uri}#${t.line+1},${t.character+1}`,range:Sn(e,r.valueNode)})}}return!0})),Promise.resolve(n)}function Sn(e,t){return _.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function Cn(e,t){if(!t)return null;if(0===e.length)return t;const n=e.shift();if(t&&"object"===t.type){const r=t.properties.find((e=>e.keyNode.value===n));return r?Cn(e,r.valueNode):null}if(t&&"array"===t.type&&n.match(/^(0|[1-9][0-9]*)$/)){const r=Number.parseInt(n),o=t.items[r];return o?Cn(e,o):null}return null}function wn(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function xn(e){const t=e.promiseConstructor||Promise,n=new un(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(Qt);const r=new Ft(n,e.contributions,t,e.clientCapabilities),o=new $t(n,e.contributions,t),i=new Xt(n),s=new Wt(n,t);return{configure:e=>{n.clearExternalSchemas(),e.schemas?.forEach(n.registerExternalSchema.bind(n)),s.configure(e)},resetSchema:e=>n.onResourceChange(e),doValidation:s.doValidation.bind(s),getLanguageStatus:s.getLanguageStatus.bind(s),parseJSONDocument:e=>function(e,t){const n=[];let r=-1;const o=e.getText(),i=p(o,!1),s=t&&t.collectComments?[]:void 0;function a(){for(;;){const t=i.scan();switch(l(),t){case 12:case 13:Array.isArray(s)&&s.push(_.create(e.positionAt(i.getTokenOffset()),e.positionAt(i.getTokenOffset()+i.getTokenLength())));break;case 15:case 14:break;default:return t}}}function c(t,o,i,s,a=L.Error){if(0===n.length||i!==r){const c=_.create(e.positionAt(i),e.positionAt(s));n.push($.create(c,t,a,o,e.languageId)),r=i}}function u(e,t,n=void 0,r=[],s=[]){let u=i.getTokenOffset(),l=i.getTokenOffset()+i.getTokenLength();if(u===l&&u>0){for(u--;u>0&&/\s/.test(o.charAt(u));)u--;l=u+1}if(c(e,t,u,l),n&&d(n,!1),r.length+s.length>0){let e=i.getToken();for(;17!==e;){if(-1!==r.indexOf(e)){a();break}if(-1!==s.indexOf(e))break;e=a()}}return n}function l(){switch(i.getTokenError()){case 4:return u(pt.t("Invalid unicode sequence in string."),Ge.InvalidUnicode),!0;case 5:return u(pt.t("Invalid escape character in string."),Ge.InvalidEscapeCharacter),!0;case 3:return u(pt.t("Unexpected end of number."),Ge.UnexpectedEndOfNumber),!0;case 1:return u(pt.t("Unexpected end of comment."),Ge.UnexpectedEndOfComment),!0;case 2:return u(pt.t("Unexpected end of string."),Ge.UnexpectedEndOfString),!0;case 6:return u(pt.t("Invalid characters in string. Control characters must be escaped."),Ge.InvalidCharacter),!0}return!1}function d(e,t){return e.length=i.getTokenOffset()+i.getTokenLength()-e.offset,t&&a(),e}const f=new Rt(void 0,0,0);function h(t,n){const r=new Dt(t,i.getTokenOffset(),f);let o=m(r);if(!o){if(16!==i.getToken())return;{u(pt.t("Property keys must be doublequoted"),Ge.PropertyKeysMustBeDoublequoted);const e=new Rt(r,i.getTokenOffset(),i.getTokenLength());e.value=i.getTokenValue(),o=e,a()}}if(r.keyNode=o,"//"!==o.value){const e=n[o.value];e?(c(pt.t("Duplicate object key"),Ge.DuplicateKey,r.keyNode.offset,r.keyNode.offset+r.keyNode.length,L.Warning),ot(e)&&c(pt.t("Duplicate object key"),Ge.DuplicateKey,e.keyNode.offset,e.keyNode.offset+e.keyNode.length,L.Warning),n[o.value]=!0):n[o.value]=r}if(6===i.getToken())r.colonOffset=i.getTokenOffset(),a();else if(u(pt.t("Colon expected"),Ge.ColonExpected),10===i.getToken()&&e.positionAt(o.offset+o.length).line<e.positionAt(i.getTokenOffset()).line)return r.length=o.length,r;const s=g(r);return s?(r.valueNode=s,r.length=s.offset+s.length-r.offset,r):u(pt.t("Value expected"),Ge.ValueExpected,r,[],[2,5])}function m(e){if(10!==i.getToken())return;const t=new Rt(e,i.getTokenOffset());return t.value=i.getTokenValue(),d(t,!0)}function g(e){return function(e){if(3!==i.getToken())return;const t=new kt(e,i.getTokenOffset());a();let n=!1;for(;4!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){n||u(pt.t("Value expected"),Ge.ValueExpected);const e=i.getTokenOffset();if(a(),4===i.getToken()){n&&c(pt.t("Trailing comma"),Ge.TrailingComma,e,e+1);continue}}else n&&u(pt.t("Expected comma"),Ge.CommaExpected);const e=g(t);e?t.items.push(e):u(pt.t("Value expected"),Ge.ValueExpected,void 0,[],[4,5]),n=!0}return 4!==i.getToken()?u(pt.t("Expected comma or closing bracket"),Ge.CommaOrCloseBacketExpected,t):d(t,!0)}(e)||function(e){if(1!==i.getToken())return;const t=new St(e,i.getTokenOffset()),n=Object.create(null);a();let r=!1;for(;2!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){r||u(pt.t("Property expected"),Ge.PropertyExpected);const e=i.getTokenOffset();if(a(),2===i.getToken()){r&&c(pt.t("Trailing comma"),Ge.TrailingComma,e,e+1);continue}}else r&&u(pt.t("Expected comma"),Ge.CommaExpected);const e=h(t,n);e?t.properties.push(e):u(pt.t("Property expected"),Ge.PropertyExpected,void 0,[],[2,5]),r=!0}return 2!==i.getToken()?u(pt.t("Expected comma or closing brace"),Ge.CommaOrCloseBraceExpected,t):d(t,!0)}(e)||m(e)||function(e){if(11!==i.getToken())return;const t=new Tt(e,i.getTokenOffset());if(0===i.getTokenError()){const e=i.getTokenValue();try{const n=JSON.parse(e);if(!et(n))return u(pt.t("Invalid number format."),Ge.Undefined,t);t.value=n}catch(e){return u(pt.t("Invalid number format."),Ge.Undefined,t)}t.isInteger=-1===e.indexOf(".")}return d(t,!0)}(e)||function(e){switch(i.getToken()){case 7:return d(new bt(e,i.getTokenOffset()),!0);case 8:return d(new vt(e,!0,i.getTokenOffset()),!0);case 9:return d(new vt(e,!1,i.getTokenOffset()),!0);default:return}}(e)}let y;return 17!==a()&&(y=g(y),y?17!==i.getToken()&&u(pt.t("End of file expected."),Ge.Undefined):u(pt.t("Expected a JSON object, array or literal."),Ge.Undefined)),new Mt(y,n,s)}(e,{collectComments:!0}),newJSONDocument:(e,t)=>function(e,t=[]){return new Mt(e,t,[])}(e,t),getMatchingSchemas:n.getMatchingSchemas.bind(n),doResolve:r.doResolve.bind(r),doComplete:r.doComplete.bind(r),findDocumentSymbols:i.findDocumentSymbols.bind(i),findDocumentSymbols2:i.findDocumentSymbols2.bind(i),findDocumentColors:i.findDocumentColors.bind(i),getColorPresentations:i.getColorPresentations.bind(i),doHover:o.doHover.bind(o),getFoldingRanges:mn,getSelectionRanges:pn,findDefinition:()=>Promise.resolve([]),findLinks:Dn,format:(e,t,n)=>gn(e,n,t),sort:(e,t)=>function(e,t){const n={...t,keepLines:!1},r=Xe.applyEdits(e,gn(e,n,void 0)),o=Xe.create("test://test.json","json",0,r),i=function(e,t){if(0===t.childrenProperties.length)return e;const n=Xe.create("test://test.json","json",0,e.getText()),r=[];for(kn(r,t,t.beginningLineNumber);r.length>0;){const t=r.shift(),o=t.propertyTreeArray;let i=t.beginningLineNumber;for(let t=0;t<o.length;t++){const s=o[t],a=_.create(x.create(s.beginningLineNumber,0),x.create(s.endLineNumber+1,0)),c=e.getText(a),u=Xe.create("test://test.json","json",0,c);if(!0===s.lastProperty&&t!==o.length-1){const e=s.lineWhereToAddComma-s.beginningLineNumber,t=s.indexWhereToAddComa,n={range:_.create(x.create(e,t),x.create(e,t)),text:","};Xe.update(u,[n],1)}else if(!1===s.lastProperty&&t===o.length-1){const e=s.commaIndex,t=s.commaLine-s.beginningLineNumber,n={range:_.create(x.create(t,e),x.create(t,e+1)),text:""};Xe.update(u,[n],1)}const l=s.endLineNumber-s.beginningLineNumber+1,d={range:_.create(x.create(i,0),x.create(i+l,0)),text:u.getText()};Xe.update(n,[d],1),kn(r,s,i),i+=l}}return n}(o,function(e){const t=e.getText(),n=p(t,!1);let r,o,i,s=new bn,a=s,c=s,u=s,l=0,d=0,f=-1,h=-1,m=0,g=0,y=[],b=!1,v=!1;for(;17!==(r=n.scan());){if(!0===b&&14!==r&&15!==r&&12!==r&&13!==r&&void 0===c.endLineNumber){let e=n.getTokenStartLine();2===i||4===i?u.endLineNumber=e-1:c.endLineNumber=e-1,m=e,b=!1}if(!0===v&&14!==r&&15!==r&&12!==r&&13!==r&&(m=n.getTokenStartLine(),v=!1),n.getTokenStartLine()!==l){for(let t=l;t<n.getTokenStartLine();t++)d+=e.getText(_.create(x.create(t,0),x.create(t+1,0))).length;l=n.getTokenStartLine()}switch(r){case 10:if(void 0===o||1===o||5===o&&y[y.length-1]===yn.Object){const e=new bn(n.getTokenValue(),m);u=c,c=a.addChildProperty(e)}break;case 3:if(void 0===s.beginningLineNumber&&(s.beginningLineNumber=n.getTokenStartLine()),y[y.length-1]===yn.Object)a=c;else if(y[y.length-1]===yn.Array){const e=new bn(n.getTokenValue(),m);e.noKeyName=!0,u=c,c=a.addChildProperty(e),a=c}y.push(yn.Array),c.type=yn.Array,m=n.getTokenStartLine(),m++;break;case 1:if(void 0===s.beginningLineNumber)s.beginningLineNumber=n.getTokenStartLine();else if(y[y.length-1]===yn.Array){const e=new bn(n.getTokenValue(),m);e.noKeyName=!0,u=c,c=a.addChildProperty(e)}c.type=yn.Object,y.push(yn.Object),a=c,m=n.getTokenStartLine(),m++;break;case 4:g=n.getTokenStartLine(),y.pop(),void 0!==c.endLineNumber||2!==o&&4!==o||(c.endLineNumber=g-1,c.lastProperty=!0,c.lineWhereToAddComma=f,c.indexWhereToAddComa=h,u=c,c=c?c.parent:void 0,a=c),s.endLineNumber=g,m=g+1;break;case 2:g=n.getTokenStartLine(),y.pop(),1!==o&&(void 0===c.endLineNumber&&(c.endLineNumber=g-1,c.lastProperty=!0,c.lineWhereToAddComma=f,c.indexWhereToAddComa=h),u=c,c=c?c.parent:void 0,a=c),s.endLineNumber=n.getTokenStartLine(),m=g+1;break;case 5:g=n.getTokenStartLine(),void 0!==c.endLineNumber||y[y.length-1]!==yn.Object&&(y[y.length-1]!==yn.Array||2!==o&&4!==o)||(c.endLineNumber=g,c.commaIndex=n.getTokenOffset()-d,c.commaLine=g),2!==o&&4!==o||(u=c,c=c?c.parent:void 0,a=c),m=g+1;break;case 13:5!==o||f!==n.getTokenStartLine()||(y[y.length-1]!==yn.Array||2!==i&&4!==i)&&y[y.length-1]!==yn.Object||(y[y.length-1]!==yn.Array||2!==i&&4!==i)&&y[y.length-1]!==yn.Object||(c.endLineNumber=void 0,b=!0),1!==o&&3!==o||f!==n.getTokenStartLine()||(v=!0)}14!==r&&13!==r&&12!==r&&15!==r&&(i=o,o=r,f=n.getTokenStartLine(),h=n.getTokenOffset()+n.getTokenLength()-d)}return s}(o)),s=gn(i,n,void 0),a=Xe.applyEdits(i,s);return[W.replace(_.create(x.create(0,0),e.positionAt(e.getText().length)),a)]}(e,t)}}},6087:(e,t,n)=>{"use strict";e.exports=n(6439)},6439:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.BrowserMessageWriter=t.BrowserMessageReader=void 0,n(4615).default.install();const i=n(3281);o(n(3281),t);class s extends i.AbstractMessageReader{constructor(e){super(),this._onData=new i.Emitter,this._messageListener=e=>{this._onData.fire(e.data)},e.addEventListener("error",(e=>this.fireError(e))),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}}t.BrowserMessageReader=s;class a extends i.AbstractMessageWriter{constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener("error",(e=>this.fireError(e)))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.BrowserMessageWriter=a,t.createMessageConnection=function(e,t,n,r){return void 0===n&&(n=i.NullLogger),i.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,i.createMessageConnection)(e,t,n,r)}},4615:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3281);class o extends r.AbstractMessageBuffer{constructor(e="utf-8"){super(e),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return o.emptyBuffer}fromString(e,t){return(new TextEncoder).encode(e)}toString(e,t){return"ascii"===t?this.asciiDecoder.decode(e):new TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}}o.emptyBuffer=new Uint8Array(0);class i{constructor(e){this.socket=e,this._onData=new r.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then((e=>{this._onData.fire(new Uint8Array(e))}),(()=>{(0,r.RAL)().console.error("Converting blob to array buffer failed.")}))},this.socket.addEventListener("message",this._messageListener)}onClose(e){return this.socket.addEventListener("close",e),r.Disposable.create((()=>this.socket.removeEventListener("close",e)))}onError(e){return this.socket.addEventListener("error",e),r.Disposable.create((()=>this.socket.removeEventListener("error",e)))}onEnd(e){return this.socket.addEventListener("end",e),r.Disposable.create((()=>this.socket.removeEventListener("end",e)))}onData(e){return this._onData.event(e)}}class s{constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener("close",e),r.Disposable.create((()=>this.socket.removeEventListener("close",e)))}onError(e){return this.socket.addEventListener("error",e),r.Disposable.create((()=>this.socket.removeEventListener("error",e)))}onEnd(e){return this.socket.addEventListener("end",e),r.Disposable.create((()=>this.socket.removeEventListener("end",e)))}write(e,t){if("string"==typeof e){if(void 0!==t&&"utf-8"!==t)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}}const a=new TextEncoder,c=Object.freeze({messageBuffer:Object.freeze({create:e=>new o(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{if("utf-8"!==t.charset)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(a.encode(JSON.stringify(e,void 0,0)))}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{if(!(e instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))}})}),stream:Object.freeze({asReadableStream:e=>new i(e),asWritableStream:e=>new s(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){const r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){const n=setTimeout(e,0,...t);return{dispose:()=>clearTimeout(n)}},setInterval(e,t,...n){const r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function u(){return c}!function(e){e.install=function(){r.RAL.install(c)}}(u||(u={})),t.default=u},3281:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.AbstractMessageBuffer=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.LRUCache=t.Touch=t.LinkedMap=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.Message=t.RAL=void 0,t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.TraceValue=t.Trace=void 0;const r=n(6177);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return r.Message}}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return r.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return r.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return r.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return r.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return r.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return r.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return r.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return r.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return r.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return r.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return r.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return r.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return r.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return r.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return r.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return r.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return r.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return r.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return r.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return r.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return r.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return r.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return r.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return r.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return r.ParameterStructures}});const o=n(3352);Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:function(){return o.LinkedMap}}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:function(){return o.LRUCache}}),Object.defineProperty(t,"Touch",{enumerable:!0,get:function(){return o.Touch}});const i=n(4019);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return i.Disposable}});const s=n(2676);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return s.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return s.Emitter}});const a=n(9850);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return a.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return a.CancellationToken}});const c=n(4996);Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return c.SharedArraySenderStrategy}}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return c.SharedArrayReceiverStrategy}});const u=n(9085);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return u.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return u.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return u.ReadableStreamMessageReader}});const l=n(3193);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return l.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return l.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return l.WriteableStreamMessageWriter}});const d=n(9244);Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return d.AbstractMessageBuffer}});const f=n(577);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return f.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return f.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return f.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return f.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return f.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return f.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return f.Trace}}),Object.defineProperty(t,"TraceValue",{enumerable:!0,get:function(){return f.TraceValue}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return f.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return f.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return f.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return f.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return f.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return f.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return f.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return f.CancellationStrategy}}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:function(){return f.MessageStrategy}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return f.TraceValues}});const h=n(9590);t.RAL=h.default},9850:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const r=n(9590),o=n(8585),i=n(2676);var s;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:i.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:i.Event.None}),e.is=function(t){const n=t;return n&&(n===e.None||n===e.Cancelled||o.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(s||(t.CancellationToken=s={}));const a=Object.freeze((function(e,t){const n=(0,r.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}));class c{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?a:(this._emitter||(this._emitter=new i.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.CancellationTokenSource=class{get token(){return this._token||(this._token=new c),this._token}cancel(){this._token?this._token.cancel():this._token=s.Cancelled}dispose(){this._token?this._token instanceof c&&this._token.dispose():this._token=s.None}}},577:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.TraceValue=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0;const r=n(9590),o=n(8585),i=n(6177),s=n(3352),a=n(2676),c=n(9850);var u,l,d,f,h,m,p,g,y,b,v,k,T,R,D,S,C,w,x;!function(e){e.type=new i.NotificationType("$/cancelRequest")}(u||(u={})),function(e){e.is=function(e){return"string"==typeof e||"number"==typeof e}}(l||(t.ProgressToken=l={})),function(e){e.type=new i.NotificationType("$/progress")}(d||(d={})),t.ProgressType=class{constructor(){}},function(e){e.is=function(e){return o.func(e)}}(f||(f={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"}(h||(t.Trace=h={})),function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"}(m||(t.TraceValue=m={})),t.TraceValues=m,function(e){e.fromString=function(t){if(!o.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}}(h||(t.Trace=h={})),function(e){e.Text="text",e.JSON="json"}(p||(t.TraceFormat=p={})),function(e){e.fromString=function(t){return o.string(t)&&"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(p||(t.TraceFormat=p={})),function(e){e.type=new i.NotificationType("$/setTrace")}(g||(t.SetTraceNotification=g={})),function(e){e.type=new i.NotificationType("$/logTrace")}(y||(t.LogTraceNotification=y={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(b||(t.ConnectionErrors=b={}));class _ extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,_.prototype)}}t.ConnectionError=_,function(e){e.is=function(e){const t=e;return t&&o.func(t.cancelUndispatched)}}(v||(t.ConnectionStrategy=v={})),function(e){e.is=function(e){const t=e;return t&&(void 0===t.kind||"id"===t.kind)&&o.func(t.createCancellationTokenSource)&&(void 0===t.dispose||o.func(t.dispose))}}(k||(t.IdCancellationReceiverStrategy=k={})),function(e){e.is=function(e){const t=e;return t&&"request"===t.kind&&o.func(t.createCancellationTokenSource)&&(void 0===t.dispose||o.func(t.dispose))}}(T||(t.RequestCancellationReceiverStrategy=T={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new c.CancellationTokenSource}),e.is=function(e){return k.is(e)||T.is(e)}}(R||(t.CancellationReceiverStrategy=R={})),function(e){e.Message=Object.freeze({sendCancellation:(e,t)=>e.sendNotification(u.type,{id:t}),cleanup(e){}}),e.is=function(e){const t=e;return t&&o.func(t.sendCancellation)&&o.func(t.cleanup)}}(D||(t.CancellationSenderStrategy=D={})),function(e){e.Message=Object.freeze({receiver:R.Message,sender:D.Message}),e.is=function(e){const t=e;return t&&R.is(t.receiver)&&D.is(t.sender)}}(S||(t.CancellationStrategy=S={})),function(e){e.is=function(e){const t=e;return t&&o.func(t.handleMessage)}}(C||(t.MessageStrategy=C={})),function(e){e.is=function(e){const t=e;return t&&(S.is(t.cancellationStrategy)||v.is(t.connectionStrategy)||C.is(t.messageStrategy)||o.number(t.maxParallelism))}}(w||(t.ConnectionOptions=w={})),function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(x||(x={})),t.createMessageConnection=function(e,n,m,v){const T=void 0!==m?m:t.NullLogger;let R=0,D=0,w=0;const P="2.0",A=v?.maxParallelism??-1;let O,E=0;const N=new Map;let q;const M=new Map,j=new Map;let L,I,F=new s.LinkedMap,$=new Map,V=new Set,W=new Map,U=h.Off,H=p.Text,B=x.New;const z=new a.Emitter,K=new a.Emitter,J=new a.Emitter,X=new a.Emitter,G=new a.Emitter,Z=v&&v.cancellationStrategy?v.cancellationStrategy:S.Message;function Q(e){}function Y(){return B===x.Listening}function ee(){return B===x.Closed}function te(){return B===x.Disposed}function ne(){B!==x.New&&B!==x.Listening||(B=x.Closed,K.fire(void 0))}function re(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function oe(){L||0===F.size||-1!==A&&E>=A||(L=(0,r.default)().timer.setImmediate((async()=>{if(L=void 0,0===F.size)return;if(-1!==A&&E>=A)return;const e=F.shift();let t;try{E++;const n=v?.messageStrategy;t=C.is(n)?n.handleMessage(e,ie):ie(e)}catch(e){T.error(`Processing message queue failed: ${e.toString()}`)}finally{t instanceof Promise?t.then((()=>{E--,oe()})).catch((e=>{T.error(`Processing message queue failed: ${e.toString()}`)})):E--,oe()}})))}async function ie(e){return i.Message.isRequest(e)?async function(e){if(te())return Promise.resolve();function t(t,r,o){const s={jsonrpc:P,id:e.id};return t instanceof i.ResponseError?s.error=t.toJson():s.result=void 0===t?null:t,ue(s,r,o),n.write(s)}function r(t,r,o){const i={jsonrpc:P,id:e.id,error:t.toJson()};return ue(i,r,o),n.write(i)}!function(e){if(U!==h.Off&&I)if(H===p.Text){let t;U!==h.Verbose&&U!==h.Compact||!e.params||(t=`Params: ${ce(e.params)}\n\n`),I.log(`Received request '${e.method} - (${e.id})'.`,t)}else de("receive-request",e)}(e);const s=N.get(e.method);let a,c;s&&(a=s.type,c=s.handler);const u=Date.now();if(c||O){const n=e.id??String(Date.now()),s=k.is(Z.receiver)?Z.receiver.createCancellationTokenSource(n):Z.receiver.createCancellationTokenSource(e);null!==e.id&&V.has(e.id)&&s.cancel(),null!==e.id&&W.set(n,s);try{let n;if(c)if(void 0===e.params){if(void 0!==a&&0!==a.numberOfParams)return r(new i.ResponseError(i.ErrorCodes.InvalidParams,`Request ${e.method} defines ${a.numberOfParams} params but received none.`),e.method,u);n=c(s.token)}else if(Array.isArray(e.params)){if(void 0!==a&&a.parameterStructures===i.ParameterStructures.byName)return r(new i.ResponseError(i.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,u);n=c(...e.params,s.token)}else{if(void 0!==a&&a.parameterStructures===i.ParameterStructures.byPosition)return r(new i.ResponseError(i.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,u);n=c(e.params,s.token)}else O&&(n=O(e.method,e.params,s.token));const o=await n;await t(o,e.method,u)}catch(n){n instanceof i.ResponseError?await t(n,e.method,u):n&&o.string(n.message)?await r(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${n.message}`),e.method,u):await r(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}finally{W.delete(n)}}else await r(new i.ResponseError(i.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,u)}(e):i.Message.isNotification(e)?async function(e){if(te())return;let t,n;if(e.method===u.type.method){const t=e.params.id;return V.delete(t),void le(e)}{const r=M.get(e.method);r&&(n=r.handler,t=r.type)}if(n||q)try{if(le(e),n)if(void 0===e.params)void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==i.ParameterStructures.byName&&T.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),await n();else if(Array.isArray(e.params)){const r=e.params;e.method===d.type.method&&2===r.length&&l.is(r[0])?await n({token:r[0],value:r[1]}):(void 0!==t&&(t.parameterStructures===i.ParameterStructures.byName&&T.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&T.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${r.length} arguments`)),await n(...r))}else void 0!==t&&t.parameterStructures===i.ParameterStructures.byPosition&&T.error(`Notification ${e.method} defines parameters by position but received parameters by name`),await n(e.params);else q&&await q(e.method,e.params)}catch(t){t.message?T.error(`Notification handler '${e.method}' failed with message: ${t.message}`):T.error(`Notification handler '${e.method}' failed unexpectedly.`)}else J.fire(e)}(e):i.Message.isResponse(e)?ae(e):function(e){if(!e)return void T.error("Received empty message.");T.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(o.string(t.id)||o.number(t.id)){const e=t.id,n=$.get(e);n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}e.onClose(ne),e.onError((function(e){z.fire([e,void 0,void 0])})),n.onClose(ne),n.onError((function(e){z.fire(e)}));const se=e=>{try{if(i.Message.isNotification(e)&&e.method===u.type.method){const t=e.params.id,r=re(t),o=F.get(r);if(i.Message.isRequest(o)){const i=v?.connectionStrategy,s=i&&i.cancelUndispatched?i.cancelUndispatched(o,Q):void 0;if(s&&(void 0!==s.error||void 0!==s.result))return F.delete(r),W.delete(t),s.id=o.id,ue(s,e.method,Date.now()),void n.write(s).catch((()=>T.error("Sending response for canceled message failed.")))}const s=W.get(t);if(void 0!==s)return s.cancel(),void le(e);V.add(t)}!function(e,t){var n;i.Message.isRequest(t)?e.set(re(t.id),t):i.Message.isResponse(t)?-1===A?e.set(null===(n=t.id)?"res-unknown-"+(++w).toString():"res-"+n.toString(),t):ae(t):e.set("not-"+(++D).toString(),t)}(F,e)}finally{oe()}};function ae(e){if(!te())if(null===e.id)e.error?T.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):T.error("Received response message without id. No further error information provided.");else{const t=e.id,n=$.get(t);if(function(e,t){if(U!==h.Off&&I)if(H===p.Text){let n;if(U!==h.Verbose&&U!==h.Compact||(e.error&&e.error.data?n=`Error data: ${ce(e.error.data)}\n\n`:e.result?n=`Result: ${ce(e.result)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),t){const r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";I.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else I.log(`Received response ${e.id} without active response promise.`,n)}else de("receive-response",e)}(e,n),void 0!==n){$.delete(t);try{if(e.error){const t=e.error;n.reject(new i.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");n.resolve(e.result)}}catch(e){e.message?T.error(`Response handler '${n.method}' failed with message: ${e.message}`):T.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}function ce(e){if(null!=e)switch(U){case h.Verbose:return JSON.stringify(e,null,4);case h.Compact:return JSON.stringify(e);default:return}}function ue(e,t,n){if(U!==h.Off&&I)if(H===p.Text){let r;U!==h.Verbose&&U!==h.Compact||(e.error&&e.error.data?r=`Error data: ${ce(e.error.data)}\n\n`:e.result?r=`Result: ${ce(e.result)}\n\n`:void 0===e.error&&(r="No result returned.\n\n")),I.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,r)}else de("send-response",e)}function le(e){if(U!==h.Off&&I&&e.method!==y.type.method)if(H===p.Text){let t;U!==h.Verbose&&U!==h.Compact||(t=e.params?`Params: ${ce(e.params)}\n\n`:"No parameters provided.\n\n"),I.log(`Received notification '${e.method}'.`,t)}else de("receive-notification",e)}function de(e,t){if(!I||U===h.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};I.log(n)}function fe(){if(ee())throw new _(b.Closed,"Connection is closed.");if(te())throw new _(b.Disposed,"Connection is disposed.")}function he(e){return void 0===e?null:e}function me(e){return null===e?void 0:e}function pe(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function ge(e,t){switch(e){case i.ParameterStructures.auto:return pe(t)?me(t):[he(t)];case i.ParameterStructures.byName:if(!pe(t))throw new Error("Received parameters by name but param is not an object literal.");return me(t);case i.ParameterStructures.byPosition:return[he(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function ye(e,t){let n;const r=e.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=ge(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e<t.length&&e<r;e++)n.push(he(t[e]));if(t.length<r)for(let e=t.length;e<r;e++)n.push(null)}return n}const be={sendNotification:(e,...t)=>{let r,s;if(fe(),o.string(e)){r=e;const n=t[0];let o=0,a=i.ParameterStructures.auto;i.ParameterStructures.is(n)&&(o=1,a=n);const c=t.length,u=c-o;switch(u){case 0:s=void 0;break;case 1:s=ge(a,t[o]);break;default:if(a===i.ParameterStructures.byName)throw new Error(`Received ${u} parameters for 'by Name' notification parameter structure.`);s=t.slice(o,c).map((e=>he(e)))}}else{const n=t;r=e.method,s=ye(e,n)}const a={jsonrpc:P,method:r,params:s};return function(e){if(U!==h.Off&&I)if(H===p.Text){let t;U!==h.Verbose&&U!==h.Compact||(t=e.params?`Params: ${ce(e.params)}\n\n`:"No parameters provided.\n\n"),I.log(`Sending notification '${e.method}'.`,t)}else de("send-notification",e)}(a),n.write(a).catch((e=>{throw T.error("Sending notification failed."),e}))},onNotification:(e,t)=>{let n;return fe(),o.func(e)?q=e:t&&(o.string(e)?(n=e,M.set(e,{type:void 0,handler:t})):(n=e.method,M.set(e.method,{type:e,handler:t}))),{dispose:()=>{void 0!==n?M.delete(n):q=void 0}}},onProgress:(e,t,n)=>{if(j.has(t))throw new Error(`Progress handler for token ${t} already registered`);return j.set(t,n),{dispose:()=>{j.delete(t)}}},sendProgress:(e,t,n)=>be.sendNotification(d.type,{token:t,value:n}),onUnhandledProgress:X.event,sendRequest:(e,...t)=>{function r(e,t){const n=Z.sender.sendCancellation(e,t);void 0===n?T.log(`Received no promise from cancellation strategy when cancelling id ${t}`):n.catch((()=>{T.log(`Sending cancellation messages for id ${t} failed.`)}))}let s,a,u;if(fe(),function(){if(!Y())throw new Error("Call listen() first.")}(),o.string(e)){s=e;const n=t[0],r=t[t.length-1];let o=0,l=i.ParameterStructures.auto;i.ParameterStructures.is(n)&&(o=1,l=n);let d=t.length;c.CancellationToken.is(r)&&(d-=1,u=r);const f=d-o;switch(f){case 0:a=void 0;break;case 1:a=ge(l,t[o]);break;default:if(l===i.ParameterStructures.byName)throw new Error(`Received ${f} parameters for 'by Name' request parameter structure.`);a=t.slice(o,d).map((e=>he(e)))}}else{const n=t;s=e.method,a=ye(e,n);const r=e.numberOfParams;u=c.CancellationToken.is(n[r])?n[r]:void 0}const l=R++;let d,f=!1;void 0!==u&&(u.isCancellationRequested?f=!0:d=u.onCancellationRequested((()=>{r(be,l)})));const m={jsonrpc:P,id:l,method:s,params:a};return function(e){if(U!==h.Off&&I)if(H===p.Text){let t;U!==h.Verbose&&U!==h.Compact||!e.params||(t=`Params: ${ce(e.params)}\n\n`),I.log(`Sending request '${e.method} - (${e.id})'.`,t)}else de("send-request",e)}(m),"function"==typeof Z.sender.enableCancellation&&Z.sender.enableCancellation(m),new Promise((async(e,t)=>{const o={method:s,timerStart:Date.now(),resolve:t=>{e(t),Z.sender.cleanup(l),d?.dispose()},reject:e=>{t(e),Z.sender.cleanup(l),d?.dispose()}};try{$.set(l,o),await n.write(m),f&&r(be,l)}catch(e){throw $.delete(l),o.reject(new i.ResponseError(i.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),T.error("Sending request failed."),e}}))},onRequest:(e,t)=>{fe();let n=null;return f.is(e)?(n=void 0,O=e):o.string(e)?(n=null,void 0!==t&&(n=e,N.set(e,{handler:t,type:void 0}))):void 0!==t&&(n=e.method,N.set(e.method,{type:e,handler:t})),{dispose:()=>{null!==n&&(void 0!==n?N.delete(n):O=void 0)}}},hasPendingResponse:()=>$.size>0,trace:async(e,t,n)=>{let r=!1,i=p.Text;void 0!==n&&(o.boolean(n)?r=n:(r=n.sendNotification||!1,i=n.traceFormat||p.Text)),U=e,H=i,I=U===h.Off?void 0:t,!r||ee()||te()||await be.sendNotification(g.type,{value:h.toString(e)})},onError:z.event,onClose:K.event,onUnhandledNotification:J.event,onDispose:G.event,end:()=>{n.end()},dispose:()=>{if(te())return;B=x.Disposed,G.fire(void 0);const t=new i.ResponseError(i.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const e of $.values())e.reject(t);$=new Map,W=new Map,V=new Set,F=new s.LinkedMap,o.func(n.dispose)&&n.dispose(),o.func(e.dispose)&&e.dispose()},listen:()=>{fe(),function(){if(Y())throw new _(b.AlreadyListening,"Connection is already listening")}(),B=x.Listening,e.listen(se)},inspect:()=>{(0,r.default)().console.log("inspect")}};return be.onNotification(y.type,(e=>{if(U===h.Off||!I)return;const t=U===h.Verbose||U===h.Compact;I.log(e.message,t?e.verbose:void 0)})),be.onNotification(d.type,(async e=>{const t=j.get(e.token);t?await t(e.value):X.fire(e)})),be}},4019:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,function(e){e.create=function(e){return{dispose:e}}}(n||(t.Disposable=n={}))},2676:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const r=n(9590);var o;!function(e){const t={dispose(){}};e.None=function(){return t}}(o||(t.Event=o={}));class i{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let r=0,o=this._callbacks.length;r<o;r++)if(this._callbacks[r]===e){if(this._contexts[r]===t)return this._callbacks.splice(r,1),void this._contexts.splice(r,1);n=!0}if(n)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];const t=[],n=this._callbacks.slice(0),o=this._contexts.slice(0);for(let i=0,s=n.length;i<s;i++)try{t.push(n[i].apply(o[i],e))}catch(e){(0,r.default)().console.error(e)}return t}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}}class s{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,n)=>{this._callbacks||(this._callbacks=new i),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const r={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),r.dispose=s._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(r),r}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=s,s._noop=function(){}},8585:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=r,t.stringArray=function(e){return r(e)&&e.every((e=>n(e)))}},3352:(e,t)=>{"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0,function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last}(r||(t.Touch=r={}));class o{constructor(){this[n]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}before(e){const t=this._map.get(e);return t?t.previous?.value:void 0}after(e){const t=this._map.get(e);return t?t.next?.value:void 0}has(e){return this._map.has(e)}get(e,t=r.None){const n=this._map.get(e);if(n)return t!==r.None&&this.touch(n,t),n.value}set(e,t,n=r.None){let o=this._map.get(e);if(o)o.value=t,n!==r.None&&this.touch(o,n);else{switch(o={key:e,value:t,next:void 0,previous:void 0},n){case r.None:this.addItemLast(o);break;case r.First:this.addItemFirst(o);break;case r.Last:default:this.addItemLast(o)}this._map.set(e,o),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}[(n=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===r.First||t===r.Last)if(t===r.First){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===r.Last){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,n)=>{e.push([n,t])})),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}t.LinkedMap=o,t.LRUCache=class extends o{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=r.AsNew){return super.get(e,t)}peek(e){return super.get(e,r.None)}set(e,t){return super.set(e,t,r.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},9244:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0,t.AbstractMessageBuffer=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"==typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(0===this._chunks.length)return;let t=0,n=0,r=0,o=0;e:for(;n<this._chunks.length;){const e=this._chunks[n];for(r=0;r<e.length;){switch(e[r]){case 13:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case 10:switch(t){case 1:t=2;break;case 3:t=4,r++;break e;default:t=0}break;default:t=0}r++}o+=e.byteLength,n++}if(4!==t)return;const i=this._read(o+r),s=new Map,a=this.toString(i,"ascii").split("\r\n");if(a.length<2)return s;for(let t=0;t<a.length-2;t++){const n=a[t],r=n.indexOf(":");if(-1===r)throw new Error(`Message header must separate key and value using ':'\n${n}`);const o=n.substr(0,r),i=n.substr(r+1).trim();s.set(e?o.toLowerCase():o,i)}return s}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(0===e)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],n=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,n}const t=this.allocNative(e);let n=0;for(;e>0;){const r=this._chunks[0];if(r.byteLength>e){const o=r.slice(0,e);t.set(o,n),n+=e,this._chunks[0]=r.slice(e),this._totalLength-=e,e-=e}else t.set(r,n),n+=r.byteLength,this._chunks.shift(),this._totalLength-=r.byteLength,e-=r.byteLength}return t}}},9085:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const r=n(9590),o=n(8585),i=n(2676),s=n(4323);var a,c;!function(e){e.is=function(e){const t=e;return t&&o.func(t.listen)&&o.func(t.dispose)&&o.func(t.onError)&&o.func(t.onClose)&&o.func(t.onPartialMessage)}}(a||(t.MessageReader=a={}));class u{constructor(){this.errorEmitter=new i.Emitter,this.closeEmitter=new i.Emitter,this.partialMessageEmitter=new i.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${o.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageReader=u,function(e){e.fromOptions=function(e){let t,n;const o=new Map;let i;const s=new Map;if(void 0===e||"string"==typeof e)t=e??"utf-8";else{if(t=e.charset??"utf-8",void 0!==e.contentDecoder&&(n=e.contentDecoder,o.set(n.name,n)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)o.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(i=e.contentTypeDecoder,s.set(i.name,i)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)s.set(t.name,t)}return void 0===i&&(i=(0,r.default)().applicationJson.decoder,s.set(i.name,i)),{charset:t,contentDecoder:n,contentDecoders:o,contentTypeDecoder:i,contentTypeDecoders:s}}}(c||(c={})),t.ReadableStreamMessageReader=class extends u{constructor(e,t){super(),this.readable=e,this.options=c.fromOptions(t),this.buffer=(0,r.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new s.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const t=this.readable.onData((e=>{this.onData(e)}));return this.readable.onError((e=>this.fireError(e))),this.readable.onClose((()=>this.fireClose())),t}onData(e){try{for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders(!0);if(!e)return;const t=e.get("content-length");if(!t)return void this.fireError(new Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(e))}`));const n=parseInt(t);if(isNaN(n))return void this.fireError(new Error(`Content-Length value must be a number. Got ${t}`));this.nextMessageLength=n}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock((async()=>{const t=void 0!==this.options.contentDecoder?await this.options.contentDecoder.decode(e):e,n=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(n)})).catch((e=>{this.fireError(e)}))}}catch(e){this.fireError(e)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,r.default)().timer.setTimeout(((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())}),this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}},3193:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const r=n(9590),o=n(8585),i=n(4323),s=n(2676);var a,c;!function(e){e.is=function(e){const t=e;return t&&o.func(t.dispose)&&o.func(t.onClose)&&o.func(t.onError)&&o.func(t.write)}}(a||(t.MessageWriter=a={}));class u{constructor(){this.errorEmitter=new s.Emitter,this.closeEmitter=new s.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${o.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=u,function(e){e.fromOptions=function(e){return void 0===e||"string"==typeof e?{charset:e??"utf-8",contentTypeEncoder:(0,r.default)().applicationJson.encoder}:{charset:e.charset??"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,r.default)().applicationJson.encoder}}}(c||(c={})),t.WriteableStreamMessageWriter=class extends u{constructor(e,t){super(),this.writable=e,this.options=c.fromOptions(t),this.errorCount=0,this.writeSemaphore=new i.Semaphore(1),this.writable.onError((e=>this.fireError(e))),this.writable.onClose((()=>this.fireClose()))}async write(e){return this.writeSemaphore.lock((async()=>this.options.contentTypeEncoder.encode(e,this.options).then((e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e)).then((t=>{const n=[];return n.push("Content-Length: ",t.byteLength.toString(),"\r\n"),n.push("\r\n"),this.doWrite(e,n,t)}),(e=>{throw this.fireError(e),e}))))}async doWrite(e,t,n){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(n)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}},6177:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;const r=n(8585);var o,i;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3}(o||(t.ErrorCodes=o={}));class s extends Error{constructor(e,t,n){super(t),this.code=r.number(e)?e:o.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,s.prototype)}toJson(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}}t.ResponseError=s;class a{constructor(e){this.kind=e}static is(e){return e===a.auto||e===a.byName||e===a.byPosition}toString(){return this.kind}}t.ParameterStructures=a,a.auto=new a("auto"),a.byPosition=new a("byPosition"),a.byName=new a("byName");class c{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return a.auto}}t.AbstractMessageSignature=c,t.RequestType0=class extends c{constructor(e){super(e,0)}},t.RequestType=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType1=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType2=class extends c{constructor(e){super(e,2)}},t.RequestType3=class extends c{constructor(e){super(e,3)}},t.RequestType4=class extends c{constructor(e){super(e,4)}},t.RequestType5=class extends c{constructor(e){super(e,5)}},t.RequestType6=class extends c{constructor(e){super(e,6)}},t.RequestType7=class extends c{constructor(e){super(e,7)}},t.RequestType8=class extends c{constructor(e){super(e,8)}},t.RequestType9=class extends c{constructor(e){super(e,9)}},t.NotificationType=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType0=class extends c{constructor(e){super(e,0)}},t.NotificationType1=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType2=class extends c{constructor(e){super(e,2)}},t.NotificationType3=class extends c{constructor(e){super(e,3)}},t.NotificationType4=class extends c{constructor(e){super(e,4)}},t.NotificationType5=class extends c{constructor(e){super(e,5)}},t.NotificationType6=class extends c{constructor(e){super(e,6)}},t.NotificationType7=class extends c{constructor(e){super(e,7)}},t.NotificationType8=class extends c{constructor(e){super(e,8)}},t.NotificationType9=class extends c{constructor(e){super(e,9)}},function(e){e.isRequest=function(e){const t=e;return t&&r.string(t.method)&&(r.string(t.id)||r.number(t.id))},e.isNotification=function(e){const t=e;return t&&r.string(t.method)&&void 0===e.id},e.isResponse=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(r.string(t.id)||r.number(t.id)||null===t.id)}}(i||(t.Message=i={}))},9590:(e,t)=>{"use strict";let n;function r(){if(void 0===n)throw new Error("No runtime abstraction layer installed");return n}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");n=e}}(r||(r={})),t.default=r},4323:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const r=n(9590);t.Semaphore=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise(((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()}))}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,r.default)().timer.setImmediate((()=>this.doRunNext()))}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then((t=>{this._active--,e.resolve(t),this.runNext()}),(t=>{this._active--,e.reject(t),this.runNext()})):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}},4996:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=void 0;const r=n(9850);var o;!function(e){e.Continue=0,e.Cancelled=1}(o||(o={})),t.SharedArraySenderStrategy=class{constructor(){this.buffers=new Map}enableCancellation(e){if(null===e.id)return;const t=new SharedArrayBuffer(4);new Int32Array(t,0,1)[0]=o.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){const n=this.buffers.get(t);if(void 0===n)return;const r=new Int32Array(n,0,1);Atomics.store(r,0,o.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};class i{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===o.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}class s{constructor(e){this.token=new i(e)}cancel(){}dispose(){}}t.SharedArrayReceiverStrategy=class{constructor(){this.kind="request"}createCancellationTokenSource(e){const t=e.$cancellationData;return void 0===t?new r.CancellationTokenSource:new s(t)}}},5678:(e,t,n)=>{"use strict";e.exports=n(4512)},4512:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const i=n(6087);o(n(6087),t),o(n(8766),t),t.createProtocolConnection=function(e,t,n,r){return(0,i.createMessageConnection)(e,t,n,r)}},8766:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,o(n(6439),t),o(n(4292),t),o(n(372),t),o(n(1560),t);var i,s=n(1580);Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return s.createProtocolConnection}}),function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800}(i||(t.LSPErrorCodes=i={}))},1580:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const r=n(6439);t.createProtocolConnection=function(e,t,n,o){return r.ConnectionStrategy.is(o)&&(o={connectionStrategy:o}),(0,r.createMessageConnection)(e,t,n,o)}},372:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=t.MessageDirection=void 0;const r=n(6439);var o;!function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"}(o||(t.MessageDirection=o={})),t.RegistrationType=class{constructor(e){this.method=e}};class i extends r.RequestType0{constructor(e){super(e)}}t.ProtocolRequestType0=i;class s extends r.RequestType{constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolRequestType=s;class a extends r.NotificationType0{constructor(e){super(e)}}t.ProtocolNotificationType0=a;class c extends r.NotificationType{constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolNotificationType=c},8765:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const r=n(372);var o,i,s;!function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.CallHierarchyPrepareRequest=o={})),function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.CallHierarchyIncomingCallsRequest=i={})),function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.CallHierarchyOutgoingCallsRequest=s={}))},7672:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const r=n(372);var o,i;!function(e){e.method="textDocument/documentColor",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.DocumentColorRequest=o={})),function(e){e.method="textDocument/colorPresentation",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.ColorPresentationRequest=i={}))},1660:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const r=n(372);var o;!function(e){e.method="workspace/configuration",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(o||(t.ConfigurationRequest=o={}))},6914:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const r=n(372);var o;!function(e){e.method="textDocument/declaration",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.DeclarationRequest=o={}))},6011:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;const r=n(6439),o=n(8598),i=n(372);var s,a,c,u,l;!function(e){e.is=function(e){const t=e;return t&&o.boolean(t.retriggerRequest)}}(s||(t.DiagnosticServerCancellationData=s={})),function(e){e.Full="full",e.Unchanged="unchanged"}(a||(t.DocumentDiagnosticReportKind=a={})),function(e){e.method="textDocument/diagnostic",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.partialResult=new r.ProgressType}(c||(t.DocumentDiagnosticRequest=c={})),function(e){e.method="workspace/diagnostic",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.partialResult=new r.ProgressType}(u||(t.WorkspaceDiagnosticRequest=u={})),function(e){e.method="workspace/diagnostic/refresh",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method)}(l||(t.DiagnosticRefreshRequest=l={}))},9840:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;const r=n(372);var o,i,s,a,c,u,l;!function(e){e.file="file",e.folder="folder"}(o||(t.FileOperationPatternKind=o={})),function(e){e.method="workspace/willCreateFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.WillCreateFilesRequest=i={})),function(e){e.method="workspace/didCreateFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(s||(t.DidCreateFilesNotification=s={})),function(e){e.method="workspace/willRenameFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(a||(t.WillRenameFilesRequest=a={})),function(e){e.method="workspace/didRenameFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(c||(t.DidRenameFilesNotification=c={})),function(e){e.method="workspace/didDeleteFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(u||(t.DidDeleteFilesNotification=u={})),function(e){e.method="workspace/willDeleteFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(l||(t.WillDeleteFilesRequest=l={}))},2874:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=void 0;const r=n(372);var o,i;!function(e){e.method="textDocument/foldingRange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.FoldingRangeRequest=o={})),function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(i||(t.FoldingRangeRefreshRequest=i={}))},9574:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const r=n(372);var o;!function(e){e.method="textDocument/implementation",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.ImplementationRequest=o={}))},7752:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;const r=n(372);var o,i,s;!function(e){e.method="textDocument/inlayHint",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.InlayHintRequest=o={})),function(e){e.method="inlayHint/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.InlayHintResolveRequest=i={})),function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(s||(t.InlayHintRefreshRequest=s={}))},3307:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionRequest=void 0;const r=n(372);var o;!function(e){e.method="textDocument/inlineCompletion",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.InlineCompletionRequest=o={}))},3124:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;const r=n(372);var o,i;!function(e){e.method="textDocument/inlineValue",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.InlineValueRequest=o={})),function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(i||(t.InlineValueRefreshRequest=i={}))},1560:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeActionResolveRequest=t.CodeActionRequest=t.DocumentSymbolRequest=t.DocumentHighlightRequest=t.ReferencesRequest=t.DefinitionRequest=t.SignatureHelpRequest=t.SignatureHelpTriggerKind=t.HoverRequest=t.CompletionResolveRequest=t.CompletionRequest=t.CompletionTriggerKind=t.PublishDiagnosticsNotification=t.WatchKind=t.RelativePattern=t.FileChangeType=t.DidChangeWatchedFilesNotification=t.WillSaveTextDocumentWaitUntilRequest=t.WillSaveTextDocumentNotification=t.TextDocumentSaveReason=t.DidSaveTextDocumentNotification=t.DidCloseTextDocumentNotification=t.DidChangeTextDocumentNotification=t.TextDocumentContentChangeEvent=t.DidOpenTextDocumentNotification=t.TextDocumentSyncKind=t.TelemetryEventNotification=t.LogMessageNotification=t.ShowMessageRequest=t.ShowMessageNotification=t.MessageType=t.DidChangeConfigurationNotification=t.ExitNotification=t.ShutdownRequest=t.InitializedNotification=t.InitializeErrorCodes=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.PositionEncodingKind=t.RegularExpressionEngineKind=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.NotebookCellTextDocumentFilter=t.NotebookDocumentFilter=t.TextDocumentFilter=void 0,t.MonikerKind=t.UniquenessLevel=t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.WillRenameFilesRequest=t.DidRenameFilesNotification=t.WillCreateFilesRequest=t.DidCreateFilesNotification=t.FileOperationPatternKind=t.LinkedEditingRangeRequest=t.ShowDocumentRequest=t.SemanticTokensRegistrationType=t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.TokenFormat=t.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=t.ColorPresentationRequest=t.DocumentColorRequest=t.ConfigurationRequest=t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=t.TypeDefinitionRequest=t.ImplementationRequest=t.ApplyWorkspaceEditRequest=t.ExecuteCommandRequest=t.PrepareRenameRequest=t.RenameRequest=t.PrepareSupportDefaultBehavior=t.DocumentOnTypeFormattingRequest=t.DocumentRangesFormattingRequest=t.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolResolveRequest=t.WorkspaceSymbolRequest=void 0,t.InlineCompletionRequest=t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=t.InlineValueRefreshRequest=t.InlineValueRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchySubtypesRequest=t.TypeHierarchyPrepareRequest=t.MonikerRequest=void 0;const r=n(372),o=n(4292),i=n(8598),s=n(9574);Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return s.ImplementationRequest}});const a=n(8461);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return a.TypeDefinitionRequest}});const c=n(9935);Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return c.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return c.DidChangeWorkspaceFoldersNotification}});const u=n(1660);Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return u.ConfigurationRequest}});const l=n(7672);Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return l.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return l.ColorPresentationRequest}});const d=n(2874);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return d.FoldingRangeRequest}}),Object.defineProperty(t,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return d.FoldingRangeRefreshRequest}});const f=n(6914);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return f.DeclarationRequest}});const h=n(3487);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return h.SelectionRangeRequest}});const m=n(2687);Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return m.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return m.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return m.WorkDoneProgressCancelNotification}});const p=n(8765);Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return p.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return p.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return p.CallHierarchyPrepareRequest}});const g=n(2478);Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return g.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return g.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return g.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return g.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return g.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return g.SemanticTokensRegistrationType}});const y=n(908);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return y.ShowDocumentRequest}});const b=n(5316);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return b.LinkedEditingRangeRequest}});const v=n(9840);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return v.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return v.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return v.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return v.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return v.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return v.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return v.WillDeleteFilesRequest}});const k=n(9047);Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return k.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return k.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return k.MonikerRequest}});const T=n(645);Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return T.TypeHierarchyPrepareRequest}}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return T.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return T.TypeHierarchySupertypesRequest}});const R=n(3124);Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return R.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return R.InlineValueRefreshRequest}});const D=n(7752);Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:function(){return D.InlayHintRequest}}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:function(){return D.InlayHintResolveRequest}}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return D.InlayHintRefreshRequest}});const S=n(6011);Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return S.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return S.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return S.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return S.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return S.DiagnosticRefreshRequest}});const C=n(3557);Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:function(){return C.NotebookCellKind}}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:function(){return C.ExecutionSummary}}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:function(){return C.NotebookCell}}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:function(){return C.NotebookDocument}}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return C.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return C.DidOpenNotebookDocumentNotification}}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:function(){return C.NotebookCellArrayChange}}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return C.DidChangeNotebookDocumentNotification}}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return C.DidSaveNotebookDocumentNotification}}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return C.DidCloseNotebookDocumentNotification}});const w=n(3307);var x,_,P,A,O,E,N,q,M,j,L,I,F,$,V,W,U,H,B,z,K,J,X,G,Z,Q,Y,ee,te,ne,re,oe,ie,se,ae,ce,ue,le,de,fe,he,me,pe,ge,ye,be,ve,ke,Te,Re,De,Se,Ce,we,xe,_e,Pe,Ae,Oe,Ee,Ne,qe,Me,je,Le,Ie;Object.defineProperty(t,"InlineCompletionRequest",{enumerable:!0,get:function(){return w.InlineCompletionRequest}}),function(e){e.is=function(e){const t=e;return i.string(t)||i.string(t.language)||i.string(t.scheme)||i.string(t.pattern)}}(x||(t.TextDocumentFilter=x={})),function(e){e.is=function(e){const t=e;return i.objectLiteral(t)&&(i.string(t.notebookType)||i.string(t.scheme)||i.string(t.pattern))}}(_||(t.NotebookDocumentFilter=_={})),function(e){e.is=function(e){const t=e;return i.objectLiteral(t)&&(i.string(t.notebook)||_.is(t.notebook))&&(void 0===t.language||i.string(t.language))}}(P||(t.NotebookCellTextDocumentFilter=P={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(const t of e)if(!i.string(t)&&!x.is(t)&&!P.is(t))return!1;return!0}}(A||(t.DocumentSelector=A={})),function(e){e.method="client/registerCapability",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(O||(t.RegistrationRequest=O={})),function(e){e.method="client/unregisterCapability",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(E||(t.UnregistrationRequest=E={})),function(e){e.Create="create",e.Rename="rename",e.Delete="delete"}(N||(t.ResourceOperationKind=N={})),function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"}(q||(t.FailureHandlingKind=q={})),function(e){e.ES2020="ES2020"}(M||(t.RegularExpressionEngineKind=M={})),function(e){e.UTF8="utf-8",e.UTF16="utf-16",e.UTF32="utf-32"}(j||(t.PositionEncodingKind=j={})),function(e){e.hasId=function(e){const t=e;return t&&i.string(t.id)&&t.id.length>0}}(L||(t.StaticRegistrationOptions=L={})),function(e){e.is=function(e){const t=e;return t&&(null===t.documentSelector||A.is(t.documentSelector))}}(I||(t.TextDocumentRegistrationOptions=I={})),function(e){e.is=function(e){const t=e;return i.objectLiteral(t)&&(void 0===t.workDoneProgress||i.boolean(t.workDoneProgress))},e.hasWorkDoneProgress=function(e){const t=e;return t&&i.boolean(t.workDoneProgress)}}(F||(t.WorkDoneProgressOptions=F={})),function(e){e.method="initialize",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}($||(t.InitializeRequest=$={})),function(e){e.unknownProtocolVersion=1}(V||(t.InitializeErrorCodes=V={})),function(e){e.method="initialized",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(W||(t.InitializedNotification=W={})),function(e){e.method="shutdown",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType0(e.method)}(U||(t.ShutdownRequest=U={})),function(e){e.method="exit",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType0(e.method)}(H||(t.ExitNotification=H={})),function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(B||(t.DidChangeConfigurationNotification=B={})),function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5}(z||(t.MessageType=z={})),function(e){e.method="window/showMessage",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolNotificationType(e.method)}(K||(t.ShowMessageNotification=K={})),function(e){e.method="window/showMessageRequest",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(J||(t.ShowMessageRequest=J={})),function(e){e.method="window/logMessage",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolNotificationType(e.method)}(X||(t.LogMessageNotification=X={})),function(e){e.method="telemetry/event",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolNotificationType(e.method)}(G||(t.TelemetryEventNotification=G={})),function(e){e.None=0,e.Full=1,e.Incremental=2}(Z||(t.TextDocumentSyncKind=Z={})),function(e){e.method="textDocument/didOpen",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(Q||(t.DidOpenTextDocumentNotification=Q={})),function(e){e.isIncremental=function(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)},e.isFull=function(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}(Y||(t.TextDocumentContentChangeEvent=Y={})),function(e){e.method="textDocument/didChange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(ee||(t.DidChangeTextDocumentNotification=ee={})),function(e){e.method="textDocument/didClose",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(te||(t.DidCloseTextDocumentNotification=te={})),function(e){e.method="textDocument/didSave",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(ne||(t.DidSaveTextDocumentNotification=ne={})),function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3}(re||(t.TextDocumentSaveReason=re={})),function(e){e.method="textDocument/willSave",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(oe||(t.WillSaveTextDocumentNotification=oe={})),function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(ie||(t.WillSaveTextDocumentWaitUntilRequest=ie={})),function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(se||(t.DidChangeWatchedFilesNotification=se={})),function(e){e.Created=1,e.Changed=2,e.Deleted=3}(ae||(t.FileChangeType=ae={})),function(e){e.is=function(e){const t=e;return i.objectLiteral(t)&&(o.URI.is(t.baseUri)||o.WorkspaceFolder.is(t.baseUri))&&i.string(t.pattern)}}(ce||(t.RelativePattern=ce={})),function(e){e.Create=1,e.Change=2,e.Delete=4}(ue||(t.WatchKind=ue={})),function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolNotificationType(e.method)}(le||(t.PublishDiagnosticsNotification=le={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3}(de||(t.CompletionTriggerKind=de={})),function(e){e.method="textDocument/completion",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(fe||(t.CompletionRequest=fe={})),function(e){e.method="completionItem/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(he||(t.CompletionResolveRequest=he={})),function(e){e.method="textDocument/hover",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(me||(t.HoverRequest=me={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3}(pe||(t.SignatureHelpTriggerKind=pe={})),function(e){e.method="textDocument/signatureHelp",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(ge||(t.SignatureHelpRequest=ge={})),function(e){e.method="textDocument/definition",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(ye||(t.DefinitionRequest=ye={})),function(e){e.method="textDocument/references",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(be||(t.ReferencesRequest=be={})),function(e){e.method="textDocument/documentHighlight",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(ve||(t.DocumentHighlightRequest=ve={})),function(e){e.method="textDocument/documentSymbol",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(ke||(t.DocumentSymbolRequest=ke={})),function(e){e.method="textDocument/codeAction",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Te||(t.CodeActionRequest=Te={})),function(e){e.method="codeAction/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Re||(t.CodeActionResolveRequest=Re={})),function(e){e.method="workspace/symbol",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(De||(t.WorkspaceSymbolRequest=De={})),function(e){e.method="workspaceSymbol/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Se||(t.WorkspaceSymbolResolveRequest=Se={})),function(e){e.method="textDocument/codeLens",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Ce||(t.CodeLensRequest=Ce={})),function(e){e.method="codeLens/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(we||(t.CodeLensResolveRequest=we={})),function(e){e.method="workspace/codeLens/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(xe||(t.CodeLensRefreshRequest=xe={})),function(e){e.method="textDocument/documentLink",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(_e||(t.DocumentLinkRequest=_e={})),function(e){e.method="documentLink/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Pe||(t.DocumentLinkResolveRequest=Pe={})),function(e){e.method="textDocument/formatting",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Ae||(t.DocumentFormattingRequest=Ae={})),function(e){e.method="textDocument/rangeFormatting",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Oe||(t.DocumentRangeFormattingRequest=Oe={})),function(e){e.method="textDocument/rangesFormatting",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Ee||(t.DocumentRangesFormattingRequest=Ee={})),function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Ne||(t.DocumentOnTypeFormattingRequest=Ne={})),function(e){e.Identifier=1}(qe||(t.PrepareSupportDefaultBehavior=qe={})),function(e){e.method="textDocument/rename",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Me||(t.RenameRequest=Me={})),function(e){e.method="textDocument/prepareRename",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(je||(t.PrepareRenameRequest=je={})),function(e){e.method="workspace/executeCommand",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Le||(t.ExecuteCommandRequest=Le={})),function(e){e.method="workspace/applyEdit",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType("workspace/applyEdit")}(Ie||(t.ApplyWorkspaceEditRequest=Ie={}))},5316:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const r=n(372);var o;!function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.LinkedEditingRangeRequest=o={}))},9047:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const r=n(372);var o,i,s;!function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"}(o||(t.UniquenessLevel=o={})),function(e){e.$import="import",e.$export="export",e.local="local"}(i||(t.MonikerKind=i={})),function(e){e.method="textDocument/moniker",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.MonikerRequest=s={}))},3557:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=void 0;const r=n(4292),o=n(8598),i=n(372);var s,a,c,u,l,d,f,h,m,p;!function(e){e.Markup=1,e.Code=2,e.is=function(e){return 1===e||2===e}}(s||(t.NotebookCellKind=s={})),function(e){e.create=function(e,t){const n={executionOrder:e};return!0!==t&&!1!==t||(n.success=t),n},e.is=function(e){const t=e;return o.objectLiteral(t)&&r.uinteger.is(t.executionOrder)&&(void 0===t.success||o.boolean(t.success))},e.equals=function(e,t){return e===t||null!=e&&null!=t&&e.executionOrder===t.executionOrder&&e.success===t.success}}(a||(t.ExecutionSummary=a={})),function(e){function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(typeof e!=typeof n)return!1;if("object"!=typeof e)return!1;const r=Array.isArray(e),i=Array.isArray(n);if(r!==i)return!1;if(r&&i){if(e.length!==n.length)return!1;for(let r=0;r<e.length;r++)if(!t(e[r],n[r]))return!1}if(o.objectLiteral(e)&&o.objectLiteral(n)){const r=Object.keys(e),o=Object.keys(n);if(r.length!==o.length)return!1;if(r.sort(),o.sort(),!t(r,o))return!1;for(let o=0;o<r.length;o++){const i=r[o];if(!t(e[i],n[i]))return!1}}return!0}e.create=function(e,t){return{kind:e,document:t}},e.is=function(e){const t=e;return o.objectLiteral(t)&&s.is(t.kind)&&r.DocumentUri.is(t.document)&&(void 0===t.metadata||o.objectLiteral(t.metadata))},e.diff=function(e,n){const r=new Set;return e.document!==n.document&&r.add("document"),e.kind!==n.kind&&r.add("kind"),e.executionSummary!==n.executionSummary&&r.add("executionSummary"),void 0===e.metadata&&void 0===n.metadata||t(e.metadata,n.metadata)||r.add("metadata"),void 0===e.executionSummary&&void 0===n.executionSummary||a.equals(e.executionSummary,n.executionSummary)||r.add("executionSummary"),r}}(c||(t.NotebookCell=c={})),function(e){e.create=function(e,t,n,r){return{uri:e,notebookType:t,version:n,cells:r}},e.is=function(e){const t=e;return o.objectLiteral(t)&&o.string(t.uri)&&r.integer.is(t.version)&&o.typedArray(t.cells,c.is)}}(u||(t.NotebookDocument=u={})),function(e){e.method="notebookDocument/sync",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.RegistrationType(e.method)}(l||(t.NotebookDocumentSyncRegistrationType=l={})),function(e){e.method="notebookDocument/didOpen",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method),e.registrationMethod=l.method}(d||(t.DidOpenNotebookDocumentNotification=d={})),function(e){e.is=function(e){const t=e;return o.objectLiteral(t)&&r.uinteger.is(t.start)&&r.uinteger.is(t.deleteCount)&&(void 0===t.cells||o.typedArray(t.cells,c.is))},e.create=function(e,t,n){const r={start:e,deleteCount:t};return void 0!==n&&(r.cells=n),r}}(f||(t.NotebookCellArrayChange=f={})),function(e){e.method="notebookDocument/didChange",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method),e.registrationMethod=l.method}(h||(t.DidChangeNotebookDocumentNotification=h={})),function(e){e.method="notebookDocument/didSave",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method),e.registrationMethod=l.method}(m||(t.DidSaveNotebookDocumentNotification=m={})),function(e){e.method="notebookDocument/didClose",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method),e.registrationMethod=l.method}(p||(t.DidCloseNotebookDocumentNotification=p={}))},2687:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;const r=n(6439),o=n(372);var i,s,a;!function(e){e.type=new r.ProgressType,e.is=function(t){return t===e.type}}(i||(t.WorkDoneProgress=i={})),function(e){e.method="window/workDoneProgress/create",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType(e.method)}(s||(t.WorkDoneProgressCreateRequest=s={})),function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(a||(t.WorkDoneProgressCancelNotification=a={}))},3487:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const r=n(372);var o;!function(e){e.method="textDocument/selectionRange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.SelectionRangeRequest=o={}))},2478:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=void 0;const r=n(372);var o,i,s,a,c,u;!function(e){e.Relative="relative"}(o||(t.TokenFormat=o={})),function(e){e.method="textDocument/semanticTokens",e.type=new r.RegistrationType(e.method)}(i||(t.SemanticTokensRegistrationType=i={})),function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.registrationMethod=i.method}(s||(t.SemanticTokensRequest=s={})),function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.registrationMethod=i.method}(a||(t.SemanticTokensDeltaRequest=a={})),function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.registrationMethod=i.method}(c||(t.SemanticTokensRangeRequest=c={})),function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(u||(t.SemanticTokensRefreshRequest=u={}))},908:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const r=n(372);var o;!function(e){e.method="window/showDocument",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(o||(t.ShowDocumentRequest=o={}))},8461:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const r=n(372);var o;!function(e){e.method="textDocument/typeDefinition",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.TypeDefinitionRequest=o={}))},645:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;const r=n(372);var o,i,s;!function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.TypeHierarchyPrepareRequest=o={})),function(e){e.method="typeHierarchy/supertypes",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.TypeHierarchySupertypesRequest=i={})),function(e){e.method="typeHierarchy/subtypes",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.TypeHierarchySubtypesRequest=s={}))},9935:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const r=n(372);var o,i;!function(e){e.method="workspace/workspaceFolders",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(o||(t.WorkspaceFoldersRequest=o={})),function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(i||(t.DidChangeWorkspaceFoldersNotification=i={}))},8598:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.objectLiteral=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=r,t.stringArray=function(e){return r(e)&&e.every((e=>n(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.objectLiteral=function(e){return null!==e&&"object"==typeof e}},6627:(e,t,n)=>{"use strict";e.exports=n(8867)},8867:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=void 0;const i=n(2861);o(n(5678),t),o(n(2861),t);let s=!1;const a={initialize:e=>{},get shutdownReceived(){return s},set shutdownReceived(e){s=e},exit:e=>{}};t.createConnection=function(e,t,n,r){let o,s,c,u;return void 0!==e&&"features"===e.__brand&&(o=e,e=t,t=n,n=r),i.ConnectionStrategy.is(e)||i.ConnectionOptions.is(e)?u=e:(s=e,c=t,u=n),(0,i.createConnection)((e=>(0,i.createProtocolConnection)(s,c,e,u)),a,o)}},2861:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.NotebookDocuments=t.TextDocuments=t.SemanticTokensBuilder=void 0;const i=n(2655);Object.defineProperty(t,"SemanticTokensBuilder",{enumerable:!0,get:function(){return i.SemanticTokensBuilder}});const s=n(1276);o(n(4512),t);const a=n(1662);Object.defineProperty(t,"TextDocuments",{enumerable:!0,get:function(){return a.TextDocuments}});const c=n(20);var u;Object.defineProperty(t,"NotebookDocuments",{enumerable:!0,get:function(){return c.NotebookDocuments}}),o(n(7874),t),function(e){e.all={__brand:"features",languages:s.InlineCompletionFeature}}(u||(t.ProposedFeatures=u={}))},3918:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyFeature=void 0;const r=n(4512);t.CallHierarchyFeature=e=>class extends e{get callHierarchy(){return{onPrepare:e=>this.connection.onRequest(r.CallHierarchyPrepareRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0))),onIncomingCalls:e=>{const t=r.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onOutgoingCalls:e=>{const t=r.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},8491:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationFeature=void 0;const r=n(4512),o=n(1248);t.ConfigurationFeature=e=>class extends e{getConfiguration(e){return e?o.string(e)?this._getConfiguration({section:e}):this._getConfiguration(e):this._getConfiguration({})}_getConfiguration(e){const t={items:Array.isArray(e)?e:[e]};return this.connection.sendRequest(r.ConfigurationRequest.type,t).then((t=>Array.isArray(t)?Array.isArray(e)?t:t[0]:Array.isArray(e)?[]:null))}}},493:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticFeature=void 0;const r=n(4512);t.DiagnosticFeature=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(r.DiagnosticRefreshRequest.type),on:e=>this.connection.onRequest(r.DocumentDiagnosticRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r.DocumentDiagnosticRequest.partialResult,t)))),onWorkspace:e=>this.connection.onRequest(r.WorkspaceDiagnosticRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r.WorkspaceDiagnosticRequest.partialResult,t))))}}}},2697:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileOperationsFeature=void 0;const r=n(4512);t.FileOperationsFeature=e=>class extends e{onDidCreateFiles(e){return this.connection.onNotification(r.DidCreateFilesNotification.type,(t=>e(t)))}onDidRenameFiles(e){return this.connection.onNotification(r.DidRenameFilesNotification.type,(t=>e(t)))}onDidDeleteFiles(e){return this.connection.onNotification(r.DidDeleteFilesNotification.type,(t=>e(t)))}onWillCreateFiles(e){return this.connection.onRequest(r.WillCreateFilesRequest.type,((t,n)=>e(t,n)))}onWillRenameFiles(e){return this.connection.onRequest(r.WillRenameFilesRequest.type,((t,n)=>e(t,n)))}onWillDeleteFiles(e){return this.connection.onRequest(r.WillDeleteFilesRequest.type,((t,n)=>e(t,n)))}}},6007:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeFeature=void 0;const r=n(4512);t.FoldingRangeFeature=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest(r.FoldingRangeRefreshRequest.type),on:e=>{const t=r.FoldingRangeRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},4635:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintFeature=void 0;const r=n(4512);t.InlayHintFeature=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(r.InlayHintRefreshRequest.type),on:e=>this.connection.onRequest(r.InlayHintRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t)))),resolve:e=>this.connection.onRequest(r.InlayHintResolveRequest.type,((t,n)=>e(t,n)))}}}},1276:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionFeature=void 0;const r=n(4512);t.InlineCompletionFeature=e=>class extends e{get inlineCompletion(){return{on:e=>this.connection.onRequest(r.InlineCompletionRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t))))}}}},1815:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueFeature=void 0;const r=n(4512);t.InlineValueFeature=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(r.InlineValueRefreshRequest.type),on:e=>this.connection.onRequest(r.InlineValueRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t))))}}}},8517:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeFeature=void 0;const r=n(4512);t.LinkedEditingRangeFeature=e=>class extends e{onLinkedEditingRange(e){return this.connection.onRequest(r.LinkedEditingRangeRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0)))}}},2936:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerFeature=void 0;const r=n(4512);t.MonikerFeature=e=>class extends e{get moniker(){return{on:e=>{const t=r.MonikerRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},20:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookDocuments=t.NotebookSyncFeature=void 0;const r=n(4512),o=n(1662);t.NotebookSyncFeature=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:e=>this.connection.onNotification(r.DidOpenNotebookDocumentNotification.type,(t=>e(t))),onDidChangeNotebookDocument:e=>this.connection.onNotification(r.DidChangeNotebookDocumentNotification.type,(t=>e(t))),onDidSaveNotebookDocument:e=>this.connection.onNotification(r.DidSaveNotebookDocumentNotification.type,(t=>e(t))),onDidCloseNotebookDocument:e=>this.connection.onNotification(r.DidCloseNotebookDocumentNotification.type,(t=>e(t)))}}};class i{onDidOpenTextDocument(e){return this.openHandler=e,r.Disposable.create((()=>{this.openHandler=void 0}))}openTextDocument(e){return this.openHandler&&this.openHandler(e)}onDidChangeTextDocument(e){return this.changeHandler=e,r.Disposable.create((()=>{this.changeHandler=e}))}changeTextDocument(e){return this.changeHandler&&this.changeHandler(e)}onDidCloseTextDocument(e){return this.closeHandler=e,r.Disposable.create((()=>{this.closeHandler=void 0}))}closeTextDocument(e){return this.closeHandler&&this.closeHandler(e)}onWillSaveTextDocument(){return i.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return i.NULL_DISPOSE}onDidSaveTextDocument(){return i.NULL_DISPOSE}}i.NULL_DISPOSE=Object.freeze({dispose:()=>{}}),t.NotebookDocuments=class{constructor(e){e instanceof o.TextDocuments?this._cellTextDocuments=e:this._cellTextDocuments=new o.TextDocuments(e),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new r.Emitter,this._onDidChange=new r.Emitter,this._onDidSave=new r.Emitter,this._onDidClose=new r.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(e){return this._cellTextDocuments.get(e.document)}getNotebookDocument(e){return this.notebookDocuments.get(e)}getNotebookCell(e){const t=this.notebookCellMap.get(e);return t&&t[0]}findNotebookDocumentForCell(e){const t="string"==typeof e?e:e.document,n=this.notebookCellMap.get(t);return n&&n[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(e){const t=new i,n=[];return n.push(this.cellTextDocuments.listen(t)),n.push(e.notebooks.synchronization.onDidOpenNotebookDocument((async e=>{this.notebookDocuments.set(e.notebookDocument.uri,e.notebookDocument);for(const n of e.cellTextDocuments)await t.openTextDocument({textDocument:n});this.updateCellMap(e.notebookDocument),this._onDidOpen.fire(e.notebookDocument)}))),n.push(e.notebooks.synchronization.onDidChangeNotebookDocument((async e=>{const n=this.notebookDocuments.get(e.notebookDocument.uri);if(void 0===n)return;n.version=e.notebookDocument.version;const r=n.metadata;let o=!1;const i=e.change;void 0!==i.metadata&&(o=!0,n.metadata=i.metadata);const s=[],a=[],c=[],u=[];if(void 0!==i.cells){const e=i.cells;if(void 0!==e.structure){const r=e.structure.array;if(n.cells.splice(r.start,r.deleteCount,...void 0!==r.cells?r.cells:[]),void 0!==e.structure.didOpen)for(const n of e.structure.didOpen)await t.openTextDocument({textDocument:n}),s.push(n.uri);if(e.structure.didClose)for(const n of e.structure.didClose)await t.closeTextDocument({textDocument:n}),a.push(n.uri)}if(void 0!==e.data){const t=new Map(e.data.map((e=>[e.document,e])));for(let e=0;e<=n.cells.length;e++){const r=t.get(n.cells[e].document);if(void 0!==r){const o=n.cells.splice(e,1,r);if(c.push({old:o[0],new:r}),t.delete(r.document),0===t.size)break}}}if(void 0!==e.textContent)for(const n of e.textContent)await t.changeTextDocument({textDocument:n.document,contentChanges:n.changes}),u.push(n.document.uri)}this.updateCellMap(n);const l={notebookDocument:n};o&&(l.metadata={old:r,new:n.metadata});const d=[];for(const e of s)d.push(this.getNotebookCell(e));const f=[];for(const e of a)f.push(this.getNotebookCell(e));const h=[];for(const e of u)h.push(this.getNotebookCell(e));(d.length>0||f.length>0||c.length>0||h.length>0)&&(l.cells={added:d,removed:f,changed:{data:c,textContent:h}}),void 0===l.metadata&&void 0===l.cells||this._onDidChange.fire(l)}))),n.push(e.notebooks.synchronization.onDidSaveNotebookDocument((e=>{const t=this.notebookDocuments.get(e.notebookDocument.uri);void 0!==t&&this._onDidSave.fire(t)}))),n.push(e.notebooks.synchronization.onDidCloseNotebookDocument((async e=>{const n=this.notebookDocuments.get(e.notebookDocument.uri);if(void 0!==n){this._onDidClose.fire(n);for(const n of e.cellTextDocuments)await t.closeTextDocument({textDocument:n});this.notebookDocuments.delete(e.notebookDocument.uri);for(const e of n.cells)this.notebookCellMap.delete(e.document)}}))),r.Disposable.create((()=>{n.forEach((e=>e.dispose()))}))}updateCellMap(e){for(const t of e.cells)this.notebookCellMap.set(t.document,[t,e])}}},2938:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attachPartialResult=t.ProgressFeature=t.attachWorkDone=void 0;const r=n(4512),o=n(6116);class i{constructor(e,t){this._connection=e,this._token=t,i.Instances.set(this._token,this)}begin(e,t,n,o){const i={kind:"begin",title:e,message:n,cancellable:o};"number"==typeof t&&(i.percentage=Math.round(t)),this._connection.sendProgress(r.WorkDoneProgress.type,this._token,i)}report(e,t){const n={kind:"report"};"number"==typeof e?(n.percentage=Math.round(e),void 0!==t&&(n.message=t)):n.message=e,this._connection.sendProgress(r.WorkDoneProgress.type,this._token,n)}done(){i.Instances.delete(this._token),this._connection.sendProgress(r.WorkDoneProgress.type,this._token,{kind:"end"})}}i.Instances=new Map;class s extends i{constructor(e,t){super(e,t),this._source=new r.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}}class a{constructor(){}begin(){}report(){}done(){}}class c extends a{constructor(){super(),this._source=new r.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}}var u;t.attachWorkDone=function(e,t){if(void 0===t||void 0===t.workDoneToken)return new a;const n=t.workDoneToken;return delete t.workDoneToken,new i(e,n)},t.ProgressFeature=e=>class extends e{constructor(){super(),this._progressSupported=!1}initialize(e){super.initialize(e),!0===e?.window?.workDoneProgress&&(this._progressSupported=!0,this.connection.onNotification(r.WorkDoneProgressCancelNotification.type,(e=>{const t=i.Instances.get(e.token);(t instanceof s||t instanceof c)&&t.cancel()})))}attachWorkDoneProgress(e){return void 0===e?new a:new i(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){const e=(0,o.generateUuid)();return this.connection.sendRequest(r.WorkDoneProgressCreateRequest.type,{token:e}).then((()=>new s(this.connection,e)))}return Promise.resolve(new c)}},function(e){e.type=new r.ProgressType}(u||(u={}));class l{constructor(e,t){this._connection=e,this._token=t}report(e){this._connection.sendProgress(u.type,this._token,e)}}t.attachPartialResult=function(e,t){if(void 0===t||void 0===t.partialResultToken)return;const n=t.partialResultToken;return delete t.partialResultToken,new l(e,n)}},2655:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensBuilder=t.SemanticTokensDiff=t.SemanticTokensFeature=void 0;const r=n(4512);t.SemanticTokensFeature=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(r.SemanticTokensRefreshRequest.type),on:e=>{const t=r.SemanticTokensRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onDelta:e=>{const t=r.SemanticTokensDeltaRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onRange:e=>{const t=r.SemanticTokensRangeRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}};class o{constructor(e,t){this.originalSequence=e,this.modifiedSequence=t}computeDiff(){const e=this.originalSequence.length,t=this.modifiedSequence.length;let n=0;for(;n<t&&n<e&&this.originalSequence[n]===this.modifiedSequence[n];)n++;if(n<t&&n<e){let r=e-1,o=t-1;for(;r>=n&&o>=n&&this.originalSequence[r]===this.modifiedSequence[o];)r--,o--;(r<n||o<n)&&(r++,o++);const i=r-n+1,s=this.modifiedSequence.slice(n,o+1);return 1===s.length&&s[0]===this.originalSequence[r]?[{start:n,deleteCount:i-1}]:[{start:n,deleteCount:i,data:s}]}return n<t?[{start:n,deleteCount:0,data:this.modifiedSequence.slice(n)}]:n<e?[{start:n,deleteCount:e-n}]:[]}}t.SemanticTokensDiff=o;class i{constructor(){this._prevData=void 0,this.initialize()}initialize(){this._id=Date.now(),this._prevLine=0,this._prevChar=0,this._data=[],this._dataNonDelta=[],this._dataLen=0,this._dataIsSortedAndDeltaEncoded=!0}push(e,t,n,r,o){this._dataIsSortedAndDeltaEncoded&&(e<this._prevLine||e===this._prevLine&&t<this._prevChar)&&(this._dataIsSortedAndDeltaEncoded=!1,this._dataNonDelta=i._deltaDecode(this._data));let s=e,a=t;this._dataIsSortedAndDeltaEncoded&&this._dataLen>0&&(s-=this._prevLine,0===s&&(a-=this._prevChar));const c=this._dataIsSortedAndDeltaEncoded?this._data:this._dataNonDelta;c[this._dataLen++]=s,c[this._dataLen++]=a,c[this._dataLen++]=n,c[this._dataLen++]=r,c[this._dataLen++]=o,this._prevLine=e,this._prevChar=t}get id(){return this._id.toString()}static _deltaDecode(e){const t=e.length/5|0;let n=0,r=0;const o=[];for(let i=0;i<t;i++){const t=5*i;let s=e[t],a=e[t+1];0===s?(s=n,a+=r):s+=n;const c=e[t+2],u=e[t+3],l=e[t+4];o[t+0]=s,o[t+1]=a,o[t+2]=c,o[t+3]=u,o[t+4]=l,n=s,r=a}return o}static _sortAndDeltaEncode(e){const t=[],n=e.length/5|0;for(let e=0;e<n;e++)t[e]=e;t.sort(((t,n)=>{const r=e[5*t],o=e[5*n];return r===o?e[5*t+1]-e[5*n+1]:r-o}));const r=[];let o=0,i=0;for(let s=0;s<n;s++){const n=5*t[s],a=e[n+0],c=e[n+1],u=e[n+2],l=e[n+3],d=e[n+4],f=a-o,h=0===f?c-i:c,m=5*s;r[m+0]=f,r[m+1]=h,r[m+2]=u,r[m+3]=l,r[m+4]=d,o=a,i=c}return r}getFinalDataDelta(){return this._dataIsSortedAndDeltaEncoded?this._data:i._sortAndDeltaEncode(this._dataNonDelta)}previousResult(e){this.id===e&&(this._prevData=this.getFinalDataDelta()),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this.getFinalDataDelta()}}canBuildEdits(){return void 0!==this._prevData}buildEdits(){return void 0!==this._prevData?{resultId:this.id,edits:new o(this._prevData,this.getFinalDataDelta()).computeDiff()}:this.build()}}t.SemanticTokensBuilder=i},7874:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=t.combineFeatures=t.combineNotebooksFeatures=t.combineLanguagesFeatures=t.combineWorkspaceFeatures=t.combineWindowFeatures=t.combineClientFeatures=t.combineTracerFeatures=t.combineTelemetryFeatures=t.combineConsoleFeatures=t._NotebooksImpl=t._LanguagesImpl=t.BulkUnregistration=t.BulkRegistration=t.ErrorMessageTracker=void 0;const r=n(4512),o=n(1248),i=n(6116),s=n(2938),a=n(8491),c=n(2112),u=n(3918),l=n(2655),d=n(8817),f=n(2697),h=n(8517),m=n(5026),p=n(1815),g=n(6007),y=n(4635),b=n(493),v=n(20),k=n(2936);function T(e){if(null!==e)return e}t.ErrorMessageTracker=class{constructor(){this._messages=Object.create(null)}add(e){let t=this._messages[e];t||(t=0),t++,this._messages[e]=t}sendErrors(e){Object.keys(this._messages).forEach((t=>{e.window.showErrorMessage(t)}))}};class R{constructor(){}rawAttach(e){this._rawConnection=e}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(e){}initialize(e){}error(e){this.send(r.MessageType.Error,e)}warn(e){this.send(r.MessageType.Warning,e)}info(e){this.send(r.MessageType.Info,e)}log(e){this.send(r.MessageType.Log,e)}debug(e){this.send(r.MessageType.Debug,e)}send(e,t){this._rawConnection&&this._rawConnection.sendNotification(r.LogMessageNotification.type,{type:e,message:t}).catch((()=>{(0,r.RAL)().console.error("Sending log message failed")}))}}const D=(0,d.ShowDocumentFeature)((0,s.ProgressFeature)(class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}showErrorMessage(e,...t){const n={type:r.MessageType.Error,message:e,actions:t};return this.connection.sendRequest(r.ShowMessageRequest.type,n).then(T)}showWarningMessage(e,...t){const n={type:r.MessageType.Warning,message:e,actions:t};return this.connection.sendRequest(r.ShowMessageRequest.type,n).then(T)}showInformationMessage(e,...t){const n={type:r.MessageType.Info,message:e,actions:t};return this.connection.sendRequest(r.ShowMessageRequest.type,n).then(T)}}));var S,C;!function(e){e.create=function(){return new w}}(S||(t.BulkRegistration=S={}));class w{constructor(){this._registrations=[],this._registered=new Set}add(e,t){const n=o.string(e)?e:e.method;if(this._registered.has(n))throw new Error(`${n} is already added to this registration`);const r=i.generateUuid();this._registrations.push({id:r,method:n,registerOptions:t||{}}),this._registered.add(n)}asRegistrationParams(){return{registrations:this._registrations}}}!function(e){e.create=function(){return new x(void 0,[])}}(C||(t.BulkUnregistration=C={}));class x{constructor(e,t){this._connection=e,this._unregistrations=new Map,t.forEach((e=>{this._unregistrations.set(e.method,e)}))}get isAttached(){return!!this._connection}attach(e){this._connection=e}add(e){this._unregistrations.set(e.method,e)}dispose(){const e=[];for(const t of this._unregistrations.values())e.push(t);const t={unregisterations:e};this._connection.sendRequest(r.UnregistrationRequest.type,t).catch((()=>{this._connection.console.info("Bulk unregistration failed.")}))}disposeSingle(e){const t=o.string(e)?e:e.method,n=this._unregistrations.get(t);if(!n)return!1;const i={unregisterations:[n]};return this._connection.sendRequest(r.UnregistrationRequest.type,i).then((()=>{this._unregistrations.delete(t)}),(e=>{this._connection.console.info(`Un-registering request handler for ${n.id} failed.`)})),!0}}class _{attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}register(e,t,n){return e instanceof w?this.registerMany(e):e instanceof x?this.registerSingle1(e,t,n):this.registerSingle2(e,t)}registerSingle1(e,t,n){const s=o.string(t)?t:t.method,a=i.generateUuid(),c={registrations:[{id:a,method:s,registerOptions:n||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(r.RegistrationRequest.type,c).then((t=>(e.add({id:a,method:s}),e)),(e=>(this.connection.console.info(`Registering request handler for ${s} failed.`),Promise.reject(e))))}registerSingle2(e,t){const n=o.string(e)?e:e.method,s=i.generateUuid(),a={registrations:[{id:s,method:n,registerOptions:t||{}}]};return this.connection.sendRequest(r.RegistrationRequest.type,a).then((e=>r.Disposable.create((()=>{this.unregisterSingle(s,n).catch((()=>{this.connection.console.info(`Un-registering capability with id ${s} failed.`)}))}))),(e=>(this.connection.console.info(`Registering request handler for ${n} failed.`),Promise.reject(e))))}unregisterSingle(e,t){const n={unregisterations:[{id:e,method:t}]};return this.connection.sendRequest(r.UnregistrationRequest.type,n).catch((()=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)}))}registerMany(e){const t=e.asRegistrationParams();return this.connection.sendRequest(r.RegistrationRequest.type,t).then((()=>new x(this._connection,t.registrations.map((e=>({id:e.id,method:e.method}))))),(e=>(this.connection.console.info("Bulk registration failed."),Promise.reject(e))))}}const P=(0,f.FileOperationsFeature)((0,c.WorkspaceFoldersFeature)((0,a.ConfigurationFeature)(class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}applyEdit(e){const t=(n=e)&&n.edit?e:{edit:e};var n;return this.connection.sendRequest(r.ApplyWorkspaceEditRequest.type,t)}})));class A{constructor(){this._trace=r.Trace.Off}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}set trace(e){this._trace=e}log(e,t){this._trace!==r.Trace.Off&&this.connection.sendNotification(r.LogTraceNotification.type,{message:e,verbose:this._trace===r.Trace.Verbose?t:void 0}).catch((()=>{}))}}class O{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}logEvent(e){this.connection.sendNotification(r.TelemetryEventNotification.type,e).catch((()=>{this.connection.console.log("Sending TelemetryEventNotification failed")}))}}class E{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,s.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,t){return(0,s.attachPartialResult)(this.connection,t)}}t._LanguagesImpl=E;const N=(0,g.FoldingRangeFeature)((0,k.MonikerFeature)((0,b.DiagnosticFeature)((0,y.InlayHintFeature)((0,p.InlineValueFeature)((0,m.TypeHierarchyFeature)((0,h.LinkedEditingRangeFeature)((0,l.SemanticTokensFeature)((0,u.CallHierarchyFeature)(E)))))))));class q{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,s.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,t){return(0,s.attachPartialResult)(this.connection,t)}}t._NotebooksImpl=q;const M=(0,v.NotebookSyncFeature)(q);function j(e,t){return function(n){return t(e(n))}}function L(e,t){return function(n){return t(e(n))}}function I(e,t){return function(n){return t(e(n))}}function F(e,t){return function(n){return t(e(n))}}function $(e,t){return function(n){return t(e(n))}}function V(e,t){return function(n){return t(e(n))}}function W(e,t){return function(n){return t(e(n))}}function U(e,t){return function(n){return t(e(n))}}t.combineConsoleFeatures=j,t.combineTelemetryFeatures=L,t.combineTracerFeatures=I,t.combineClientFeatures=F,t.combineWindowFeatures=$,t.combineWorkspaceFeatures=V,t.combineLanguagesFeatures=W,t.combineNotebooksFeatures=U,t.combineFeatures=function(e,t){function n(e,t,n){return e&&t?n(e,t):e||t}return{__brand:"features",console:n(e.console,t.console,j),tracer:n(e.tracer,t.tracer,I),telemetry:n(e.telemetry,t.telemetry,L),client:n(e.client,t.client,F),window:n(e.window,t.window,$),workspace:n(e.workspace,t.workspace,V),languages:n(e.languages,t.languages,W),notebooks:n(e.notebooks,t.notebooks,U)}},t.createConnection=function(e,t,n){const i=n&&n.console?new(n.console(R)):new R,a=e(i);i.rawAttach(a);const c=n&&n.tracer?new(n.tracer(A)):new A,u=n&&n.telemetry?new(n.telemetry(O)):new O,l=n&&n.client?new(n.client(_)):new _,d=n&&n.window?new(n.window(D)):new D,f=n&&n.workspace?new(n.workspace(P)):new P,h=n&&n.languages?new(n.languages(N)):new N,m=n&&n.notebooks?new(n.notebooks(M)):new M,p=[i,c,u,l,d,f,h,m];let g,y,b;const v={listen:()=>a.listen(),sendRequest:(e,...t)=>a.sendRequest(o.string(e)?e:e.method,...t),onRequest:(e,t)=>a.onRequest(e,t),sendNotification:(e,t)=>{const n=o.string(e)?e:e.method;return a.sendNotification(n,t)},onNotification:(e,t)=>a.onNotification(e,t),onProgress:a.onProgress,sendProgress:a.sendProgress,onInitialize:e=>(y=e,{dispose:()=>{y=void 0}}),onInitialized:e=>a.onNotification(r.InitializedNotification.type,e),onShutdown:e=>(g=e,{dispose:()=>{g=void 0}}),onExit:e=>(b=e,{dispose:()=>{b=void 0}}),get console(){return i},get telemetry(){return u},get tracer(){return c},get client(){return l},get window(){return d},get workspace(){return f},get languages(){return h},get notebooks(){return m},onDidChangeConfiguration:e=>a.onNotification(r.DidChangeConfigurationNotification.type,e),onDidChangeWatchedFiles:e=>a.onNotification(r.DidChangeWatchedFilesNotification.type,e),__textDocumentSync:void 0,onDidOpenTextDocument:e=>a.onNotification(r.DidOpenTextDocumentNotification.type,e),onDidChangeTextDocument:e=>a.onNotification(r.DidChangeTextDocumentNotification.type,e),onDidCloseTextDocument:e=>a.onNotification(r.DidCloseTextDocumentNotification.type,e),onWillSaveTextDocument:e=>a.onNotification(r.WillSaveTextDocumentNotification.type,e),onWillSaveTextDocumentWaitUntil:e=>a.onRequest(r.WillSaveTextDocumentWaitUntilRequest.type,e),onDidSaveTextDocument:e=>a.onNotification(r.DidSaveTextDocumentNotification.type,e),sendDiagnostics:e=>a.sendNotification(r.PublishDiagnosticsNotification.type,e),onHover:e=>a.onRequest(r.HoverRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onCompletion:e=>a.onRequest(r.CompletionRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onCompletionResolve:e=>a.onRequest(r.CompletionResolveRequest.type,e),onSignatureHelp:e=>a.onRequest(r.SignatureHelpRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onDeclaration:e=>a.onRequest(r.DeclarationRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onDefinition:e=>a.onRequest(r.DefinitionRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onTypeDefinition:e=>a.onRequest(r.TypeDefinitionRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onImplementation:e=>a.onRequest(r.ImplementationRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onReferences:e=>a.onRequest(r.ReferencesRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onDocumentHighlight:e=>a.onRequest(r.DocumentHighlightRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onDocumentSymbol:e=>a.onRequest(r.DocumentSymbolRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onWorkspaceSymbol:e=>a.onRequest(r.WorkspaceSymbolRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onWorkspaceSymbolResolve:e=>a.onRequest(r.WorkspaceSymbolResolveRequest.type,e),onCodeAction:e=>a.onRequest(r.CodeActionRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onCodeActionResolve:e=>a.onRequest(r.CodeActionResolveRequest.type,((t,n)=>e(t,n))),onCodeLens:e=>a.onRequest(r.CodeLensRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onCodeLensResolve:e=>a.onRequest(r.CodeLensResolveRequest.type,((t,n)=>e(t,n))),onDocumentFormatting:e=>a.onRequest(r.DocumentFormattingRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onDocumentRangeFormatting:e=>a.onRequest(r.DocumentRangeFormattingRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onDocumentOnTypeFormatting:e=>a.onRequest(r.DocumentOnTypeFormattingRequest.type,((t,n)=>e(t,n))),onRenameRequest:e=>a.onRequest(r.RenameRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onPrepareRename:e=>a.onRequest(r.PrepareRenameRequest.type,((t,n)=>e(t,n))),onDocumentLinks:e=>a.onRequest(r.DocumentLinkRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onDocumentLinkResolve:e=>a.onRequest(r.DocumentLinkResolveRequest.type,((t,n)=>e(t,n))),onDocumentColor:e=>a.onRequest(r.DocumentColorRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onColorPresentation:e=>a.onRequest(r.ColorPresentationRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onFoldingRanges:e=>a.onRequest(r.FoldingRangeRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onSelectionRanges:e=>a.onRequest(r.SelectionRangeRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onExecuteCommand:e=>a.onRequest(r.ExecuteCommandRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),dispose:()=>a.dispose()};for(const e of p)e.attach(v);return a.onRequest(r.InitializeRequest.type,(e=>{t.initialize(e),o.string(e.trace)&&(c.trace=r.Trace.fromString(e.trace));for(const t of p)t.initialize(e.capabilities);if(y){const t=y(e,(new r.CancellationTokenSource).token,(0,s.attachWorkDone)(a,e),void 0);return(n=t,n instanceof Promise?n:o.thenable(n)?new Promise(((e,t)=>{n.then((t=>e(t)),(e=>t(e)))})):Promise.resolve(n)).then((e=>{if(e instanceof r.ResponseError)return e;let t=e;t||(t={capabilities:{}});let n=t.capabilities;n||(n={},t.capabilities=n),void 0===n.textDocumentSync||null===n.textDocumentSync?n.textDocumentSync=o.number(v.__textDocumentSync)?v.__textDocumentSync:r.TextDocumentSyncKind.None:o.number(n.textDocumentSync)||o.number(n.textDocumentSync.change)||(n.textDocumentSync.change=o.number(v.__textDocumentSync)?v.__textDocumentSync:r.TextDocumentSyncKind.None);for(const e of p)e.fillServerCapabilities(n);return t}))}{const e={capabilities:{textDocumentSync:r.TextDocumentSyncKind.None}};for(const t of p)t.fillServerCapabilities(e.capabilities);return e}var n})),a.onRequest(r.ShutdownRequest.type,(()=>(t.shutdownReceived=!0,g?g((new r.CancellationTokenSource).token):void 0))),a.onNotification(r.ExitNotification.type,(()=>{try{if(b)return b()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}})),a.onNotification(r.SetTraceNotification.type,(e=>{c.trace=r.Trace.fromString(e.value)})),v}},8817:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentFeature=void 0;const r=n(4512);t.ShowDocumentFeature=e=>class extends e{showDocument(e){return this.connection.sendRequest(r.ShowDocumentRequest.type,e)}}},1662:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextDocuments=void 0;const r=n(4512);t.TextDocuments=class{constructor(e){this._configuration=e,this._syncedDocuments=new Map,this._onDidChangeContent=new r.Emitter,this._onDidOpen=new r.Emitter,this._onDidClose=new r.Emitter,this._onDidSave=new r.Emitter,this._onWillSave=new r.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(e){this._willSaveWaitUntil=e}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(e){return this._syncedDocuments.get(e)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(e){e.__textDocumentSync=r.TextDocumentSyncKind.Incremental;const t=[];return t.push(e.onDidOpenTextDocument((e=>{const t=e.textDocument,n=this._configuration.create(t.uri,t.languageId,t.version,t.text);this._syncedDocuments.set(t.uri,n);const r=Object.freeze({document:n});this._onDidOpen.fire(r),this._onDidChangeContent.fire(r)}))),t.push(e.onDidChangeTextDocument((e=>{const t=e.textDocument,n=e.contentChanges;if(0===n.length)return;const{version:r}=t;if(null==r)throw new Error(`Received document change event for ${t.uri} without valid version identifier`);let o=this._syncedDocuments.get(t.uri);void 0!==o&&(o=this._configuration.update(o,n,r),this._syncedDocuments.set(t.uri,o),this._onDidChangeContent.fire(Object.freeze({document:o})))}))),t.push(e.onDidCloseTextDocument((e=>{const t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&(this._syncedDocuments.delete(e.textDocument.uri),this._onDidClose.fire(Object.freeze({document:t})))}))),t.push(e.onWillSaveTextDocument((e=>{const t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&this._onWillSave.fire(Object.freeze({document:t,reason:e.reason}))}))),t.push(e.onWillSaveTextDocumentWaitUntil(((e,t)=>{const n=this._syncedDocuments.get(e.textDocument.uri);return void 0!==n&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:n,reason:e.reason}),t):[]}))),t.push(e.onDidSaveTextDocument((e=>{const t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&this._onDidSave.fire(Object.freeze({document:t}))}))),r.Disposable.create((()=>{t.forEach((e=>e.dispose()))}))}}},5026:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchyFeature=void 0;const r=n(4512);t.TypeHierarchyFeature=e=>class extends e{get typeHierarchy(){return{onPrepare:e=>this.connection.onRequest(r.TypeHierarchyPrepareRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0))),onSupertypes:e=>{const t=r.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onSubtypes:e=>{const t=r.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},1248:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e){return"function"==typeof e}function o(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.thenable=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=r,t.array=o,t.stringArray=function(e){return o(e)&&e.every((e=>n(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=function(e){return e&&r(e.then)}},6116:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateUuid=t.parse=t.isUUID=t.v4=t.empty=void 0;class n{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class r extends n{static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return r._oneOf(r._chars)}constructor(){super([r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),"-",r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),"-","4",r._randomHex(),r._randomHex(),r._randomHex(),"-",r._oneOf(r._timeHighBits),r._randomHex(),r._randomHex(),r._randomHex(),"-",r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex()].join(""))}}function o(){return new r}r._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],r._timeHighBits=["8","9","a","b"],t.empty=new n("00000000-0000-0000-0000-000000000000"),t.v4=o;const i=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function s(e){return i.test(e)}t.isUUID=s,t.parse=function(e){if(!s(e))throw new Error("invalid uuid");return new n(e)},t.generateUuid=function(){return o().asHex()}},2112:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=void 0;const r=n(4512);t.WorkspaceFoldersFeature=e=>class extends e{constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(e){super.initialize(e);const t=e.workspace;t&&t.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new r.Emitter,this.connection.onNotification(r.DidChangeWorkspaceFoldersNotification.type,(e=>{this._onDidChangeWorkspaceFolders.fire(e.event)})))}fillServerCapabilities(e){super.fillServerCapabilities(e);const t=e.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=!0===t||"string"==typeof t}getWorkspaceFolders(){return this.connection.sendRequest(r.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return this._notificationIsAutoRegistered||this._unregistration||(this._unregistration=this.connection.client.register(r.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}}},8945:function(e){var t;t=()=>(()=>{"use strict";var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",o=0,i=-1,s=0,a=0;a<=e.length;++a){if(a<e.length)n=e.charCodeAt(a);else{if(47===n)break;n=47}if(47===n){if(i===a-1||1===s);else if(i!==a-1&&2===s){if(r.length<2||2!==o||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",o=0):o=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),i=a,s=0;continue}}else if(2===r.length||1===r.length){r="",o=0,i=a,s=0;continue}t&&(r.length>0?r+="/..":r="..",o=2)}else r.length>0?r+="/"+e.slice(i+1,a):r=e.slice(i+1,a),o=a-i-1;i=a,s=0}else 46===n&&-1!==s?++s:s=-1}return r}var r={resolve:function(){for(var e,r="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var s;i>=0?s=arguments[i]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(r=s+"/"+r,o=47===s.charCodeAt(0))}return r=n(r,!o),o?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),o=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&o&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var o=arguments[n];t(o),o.length>0&&(void 0===e?e=o:e+="/"+o)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var o=1;o<e.length&&47===e.charCodeAt(o);++o);for(var i=e.length,s=i-o,a=1;a<n.length&&47===n.charCodeAt(a);++a);for(var c=n.length-a,u=s<c?s:c,l=-1,d=0;d<=u;++d){if(d===u){if(c>u){if(47===n.charCodeAt(a+d))return n.slice(a+d+1);if(0===d)return n.slice(a+d)}else s>u&&(47===e.charCodeAt(o+d)?l=d:0===d&&(l=0));break}var f=e.charCodeAt(o+d);if(f!==n.charCodeAt(a+d))break;47===f&&(l=d)}var h="";for(d=o+l+1;d<=i;++d)d!==i&&47!==e.charCodeAt(d)||(0===h.length?h+="..":h+="/..");return h.length>0?h+n.slice(a+l):(a+=l,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,o=-1,i=!0,s=e.length-1;s>=1;--s)if(47===(n=e.charCodeAt(s))){if(!i){o=s;break}}else i=!1;return-1===o?r?"/":".":r&&1===o?"//":e.slice(0,o)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,o=0,i=-1,s=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var u=e.charCodeAt(r);if(47===u){if(!s){o=r+1;break}}else-1===c&&(s=!1,c=r+1),a>=0&&(u===n.charCodeAt(a)?-1==--a&&(i=r):(a=-1,i=c))}return o===i?i=c:-1===i&&(i=e.length),e.slice(o,i)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!s){o=r+1;break}}else-1===i&&(s=!1,i=r+1);return-1===i?"":e.slice(o,i)},extname:function(e){t(e);for(var n=-1,r=0,o=-1,i=!0,s=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===o&&(i=!1,o=a+1),46===c?-1===n?n=a:1!==s&&(s=1):-1!==n&&(s=-1);else if(!i){r=a+1;break}}return-1===n||-1===o||0===s||1===s&&n===o-1&&n===r+1?"":e.slice(n,o)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,o=e.charCodeAt(0),i=47===o;i?(n.root="/",r=1):r=0;for(var s=-1,a=0,c=-1,u=!0,l=e.length-1,d=0;l>=r;--l)if(47!==(o=e.charCodeAt(l)))-1===c&&(u=!1,c=l+1),46===o?-1===s?s=l:1!==d&&(d=1):-1!==s&&(d=-1);else if(!u){a=l+1;break}return-1===s||-1===c||0===d||1===d&&s===c-1&&s===a+1?-1!==c&&(n.base=n.name=0===a&&i?e.slice(1,c):e.slice(a,c)):(0===a&&i?(n.name=e.slice(1,s),n.base=e.slice(1,c)):(n.name=e.slice(a,s),n.base=e.slice(a,c)),n.ext=e.slice(s,c)),a>0?n.dir=e.slice(0,a-1):i&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r},674:(e,t)=>{if(Object.defineProperty(t,"__esModule",{value:!0}),t.isWindows=void 0,"object"==typeof process)t.isWindows=!1;else if("object"==typeof navigator){let e=navigator.userAgent;t.isWindows=e.indexOf("Windows")>=0}},796:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.uriToFsPath=t.URI=void 0;const r=n(674),o=/^\w[\w\d+.-]*$/,i=/^\//,s=/^\/\//;function a(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!o.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!i.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(s.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const c="",u="/",l=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static isUri(e){return e instanceof d||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,r,o,i=!1){"object"==typeof e?(this.scheme=e.scheme||c,this.authority=e.authority||c,this.path=e.path||c,this.query=e.query||c,this.fragment=e.fragment||c):(this.scheme=function(e,t){return e||t?e:"file"}(e,i),this.authority=t||c,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==u&&(t=u+t):t=u}return t}(this.scheme,n||c),this.query=r||c,this.fragment=o||c,a(this,i))}get fsPath(){return y(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:o,fragment:i}=e;return void 0===t?t=this.scheme:null===t&&(t=c),void 0===n?n=this.authority:null===n&&(n=c),void 0===r?r=this.path:null===r&&(r=c),void 0===o?o=this.query:null===o&&(o=c),void 0===i?i=this.fragment:null===i&&(i=c),t===this.scheme&&n===this.authority&&r===this.path&&o===this.query&&i===this.fragment?this:new h(t,n,r,o,i)}static parse(e,t=!1){const n=l.exec(e);return n?new h(n[2]||c,T(n[4]||c),T(n[5]||c),T(n[7]||c),T(n[9]||c),t):new h(c,c,c,c,c)}static file(e){let t=c;if(r.isWindows&&(e=e.replace(/\\/g,u)),e[0]===u&&e[1]===u){const n=e.indexOf(u,2);-1===n?(t=e.substring(2),e=u):(t=e.substring(2,n),e=e.substring(n)||u)}return new h("file",t,e,c,c)}static from(e){const t=new h(e.scheme,e.authority,e.path,e.query,e.fragment);return a(t,!0),t}toString(e=!1){return b(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof d)return e;{const t=new h(e);return t._formatted=e.external,t._fsPath=e._sep===f?e.fsPath:null,t}}return e}}t.URI=d;const f=r.isWindows?1:void 0;class h extends d{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=y(this,!1)),this._fsPath}toString(e=!1){return e?b(this,!0):(this._formatted||(this._formatted=b(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=f),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const m={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function p(e,t,n){let r,o=-1;for(let i=0;i<e.length;i++){const s=e.charCodeAt(i);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||t&&47===s||n&&91===s||n&&93===s||n&&58===s)-1!==o&&(r+=encodeURIComponent(e.substring(o,i)),o=-1),void 0!==r&&(r+=e.charAt(i));else{void 0===r&&(r=e.substr(0,i));const t=m[s];void 0!==t?(-1!==o&&(r+=encodeURIComponent(e.substring(o,i)),o=-1),r+=t):-1===o&&(o=i)}}return-1!==o&&(r+=encodeURIComponent(e.substring(o))),void 0!==r?r:e}function g(e){let t;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);35===r||63===r?(void 0===t&&(t=e.substr(0,n)),t+=m[r]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function y(e,t){let n;return n=e.authority&&e.path.length>1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,r.isWindows&&(n=n.replace(/\//g,"\\")),n}function b(e,t){const n=t?g:p;let r="",{scheme:o,authority:i,path:s,query:a,fragment:c}=e;if(o&&(r+=o,r+=":"),(i||"file"===o)&&(r+=u,r+=u),i){let e=i.indexOf("@");if(-1!==e){const t=i.substr(0,e);i=i.substr(e+1),e=t.lastIndexOf(":"),-1===e?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=":",r+=n(t.substr(e+1),!1,!0)),r+="@"}i=i.toLowerCase(),e=i.lastIndexOf(":"),-1===e?r+=n(i,!1,!0):(r+=n(i.substr(0,e),!1,!0),r+=i.substr(e))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const e=s.charCodeAt(1);e>=65&&e<=90&&(s=`/${String.fromCharCode(e+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const e=s.charCodeAt(0);e>=65&&e<=90&&(s=`${String.fromCharCode(e+32)}:${s.substr(2)}`)}r+=n(s,!0,!1)}return a&&(r+="?",r+=n(a,!1,!1)),c&&(r+="#",r+=t?c:p(c,!1,!1)),r}function v(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+v(e.substr(3)):e}}t.uriToFsPath=y;const k=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function T(e){return e.match(k)?e.replace(k,(e=>v(e))):e}},679:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Utils=void 0;const s=i(n(470)),a=s.posix||s,c="/";var u;!function(e){e.joinPath=function(e,...t){return e.with({path:a.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==c&&(n=c+n,r=!0);let o=a.resolve(n,...t);return r&&o[0]===c&&!e.authority&&(o=o.substring(1)),e.with({path:o})},e.dirname=function(e){if(0===e.path.length||e.path===c)return e;let t=a.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return a.basename(e.path)},e.extname=function(e){return a.extname(e.path)}}(u||(t.Utils=u={}))}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}var r={};return(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.Utils=e.URI=void 0;const t=n(796);Object.defineProperty(e,"URI",{enumerable:!0,get:function(){return t.URI}});const o=n(679);Object.defineProperty(e,"Utils",{enumerable:!0,get:function(){return o.Utils}})})(),r})(),e.exports=t()},7662:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(6627),o=n(6694),i=new r.BrowserMessageReader(self),s=new r.BrowserMessageWriter(self),a=(0,r.createConnection)(i,s);console.log=a.console.log.bind(a.console),console.error=a.console.error.bind(a.console);const c={timer:{setImmediate(e,...t){const n=setTimeout(e,0,...t);return{dispose:()=>clearTimeout(n)}},setTimeout(e,t,...n){const r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}}}};(0,o.startServer)(a,c)},6694:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startServer=function(e,t){function n(n=["https","http","file"]){const r={};for(const e of n)"file"===e?r[e]=t.file:"http"!==e&&"https"!==e||(r[e]=t.http);return t=>{const n=t.substr(0,t.indexOf(":")),o=r[n];return o?o.getContent(t):e.sendRequest(d.type,t).then((e=>e),(e=>Promise.reject(e.message)))}}let c=(0,s.getLanguageService)({workspaceContext:g,contributions:[],clientCapabilities:s.ClientCapabilities.LATEST});const b=new r.TextDocuments(s.TextDocument);b.listen(e);let v,k=!1,T=!1,R=!1,D=Number.MAX_VALUE,S=Number.MAX_VALUE,C=Number.MAX_VALUE,w=Number.MAX_VALUE,x=Number.MAX_VALUE,_=Number.MAX_VALUE,P=Number.MAX_VALUE;e.onInitialize((o=>{const a=o.initializationOptions||{},u=a?.handledSchemaProtocols;function l(e,t){const n=e.split(".");let r=o.capabilities;for(let e=0;r&&e<n.length;e++){if(!r.hasOwnProperty(n[e]))return t;r=r[n[e]]}return r}c=(0,s.getLanguageService)({schemaRequestService:n(u),workspaceContext:g,contributions:[],clientCapabilities:o.capabilities}),k=l("textDocument.completion.completionItem.snippetSupport",!1),T=l("textDocument.rangeFormatting.dynamicRegistration",!1)&&"boolean"!=typeof a.provideFormatter,D=l("textDocument.foldingRange.rangeLimit",Number.MAX_VALUE),R=l("textDocument.documentSymbol.hierarchicalDocumentSymbolSupport",!1),P=a.customCapabilities?.rangeFormatting?.editLimit||Number.MAX_VALUE;const d=l("textDocument.diagnostic",void 0);return v=void 0===d?(0,i.registerDiagnosticsPushSupport)(b,e,t,j):(0,i.registerDiagnosticsPullSupport)(b,e,t,j),{capabilities:{textDocumentSync:r.TextDocumentSyncKind.Incremental,completionProvider:k?{resolveProvider:!1,triggerCharacters:['"',":"]}:void 0,hoverProvider:!0,documentSymbolProvider:!0,documentRangeFormattingProvider:!0===a.provideFormatter,documentFormattingProvider:!0===a.provideFormatter,colorProvider:{},foldingRangeProvider:!0,selectionRangeProvider:!0,documentLinkProvider:{},diagnosticProvider:{documentSelector:null,interFileDependencies:!1,workspaceDiagnostics:!1},codeActionProvider:!0}}}));let A,O,E=null,N=!0,q=!1;function M(){const e={validate:N,allowComments:!0,schemas:new Array};if(O)if(Array.isArray(O))Array.prototype.push.apply(e.schemas,O);else for(const t in O){const n=O[t];Array.isArray(n)&&n.forEach((n=>{e.schemas.push({uri:n,fileMatch:[t]})}))}A&&A.forEach(((t,n)=>{let r=t.url;!r&&t.schema&&(r=t.schema.id||`vscode://schemas/custom/${n}`),r&&e.schemas.push({uri:r,fileMatch:t.fileMatch,schema:t.schema,folderUri:t.folderUri})})),c.configure(e),v?.requestRefresh()}async function j(e){if(0===e.getText().length)return[];const t=I(e),n="jsonc"===e.languageId?{comments:"ignore",trailingCommas:"warning"}:{comments:"error",trailingCommas:"error"};return await c.doValidation(e,t,n)}e.onDidChangeConfiguration((n=>{const o=n.settings;t.configureHttpRequests?.(o?.http?.proxy,!!o.http?.proxyStrictSSL),A=o.json?.schemas,N=!!o.json?.validate?.enable,q=o.json?.keepLines?.enable||!1,M();const i=e=>Math.trunc(Math.max(e,0));if(S=i(o.json?.resultLimit||Number.MAX_VALUE),C=i(o.json?.jsonFoldingLimit||D),w=i(o.json?.jsoncFoldingLimit||D),x=i(o.json?.jsonColorDecoratorLimit||Number.MAX_VALUE),_=i(o.json?.jsoncColorDecoratorLimit||Number.MAX_VALUE),T){const t=o.json?.format?.enable;if(t){if(!E){const t=[{language:"json"},{language:"jsonc"}];E=[e.client.register(r.DocumentRangeFormattingRequest.type,{documentSelector:t}),e.client.register(r.DocumentFormattingRequest.type,{documentSelector:t})]}}else E&&(E.forEach((e=>e.then((e=>e.dispose())))),E=null)}})),e.onNotification(l.type,(e=>{O=e,M()})),e.onNotification(f.type,(e=>{let t=!1;if(Array.isArray(e))for(const n of e)c.resetSchema(n)&&(t=!0);else t=c.resetSchema(e);t&&v?.requestRefresh()})),e.onRequest(h.type,(async e=>{const t=b.get(e);return t?(M(),await j(t)):[]})),e.onRequest(m.type,(async e=>{const t=b.get(e);if(t){const e=I(t);return c.getLanguageStatus(t,e)}return{schemas:[]}})),e.onRequest(p.type,(async e=>{const t=e.uri,n=e.options,r=b.get(t);return r?c.sort(r,n):[]})),e.onDidChangeWatchedFiles((e=>{let t=!1;e.changes.forEach((e=>{c.resetSchema(e.uri)&&(t=!0)})),t&&v?.requestRefresh()}));const L=(0,a.getLanguageModelCache)(10,60,(e=>c.parseJSONDocument(e)));function I(e){return L.get(e)}function F(e,t,n){n.keepLines=q;const o=b.get(e.uri);if(o){const e=c.format(o,t??y(o),n);if(e.length>P){const t=s.TextDocument.applyEdits(o,e);return[r.TextEdit.replace(y(o),t)]}return e}return[]}b.onDidClose((e=>{L.onDocumentRemoved(e.document)})),e.onShutdown((()=>{L.dispose()})),e.onCompletion(((e,n)=>(0,o.runSafeAsync)(t,(async()=>{const t=b.get(e.textDocument.uri);if(t){const n=I(t);return c.doComplete(t,e.position,n)}return null}),null,`Error while computing completions for ${e.textDocument.uri}`,n))),e.onHover(((e,n)=>(0,o.runSafeAsync)(t,(async()=>{const t=b.get(e.textDocument.uri);if(t){const n=I(t);return c.doHover(t,e.position,n)}return null}),null,`Error while computing hover for ${e.textDocument.uri}`,n))),e.onDocumentSymbol(((e,n)=>(0,o.runSafe)(t,(()=>{const t=b.get(e.textDocument.uri);if(t){const e=I(t);return R?c.findDocumentSymbols2(t,e,{resultLimit:S}):c.findDocumentSymbols(t,e,{resultLimit:S})}return[]}),[],`Error while computing document symbols for ${e.textDocument.uri}`,n))),e.onCodeAction(((e,n)=>(0,o.runSafeAsync)(t,(async()=>{if(b.get(e.textDocument.uri)){const e=r.CodeAction.create("Sort JSON",r.CodeActionKind.Source.concat(".sort",".json"));return e.command={command:"json.sort",title:u.t("Sort JSON")},[e]}return[]}),[],`Error while computing code actions for ${e.textDocument.uri}`,n))),e.onDocumentRangeFormatting(((e,n)=>(0,o.runSafe)(t,(()=>F(e.textDocument,e.range,e.options)),[],`Error while formatting range for ${e.textDocument.uri}`,n))),e.onDocumentFormatting(((e,n)=>(0,o.runSafe)(t,(()=>F(e.textDocument,void 0,e.options)),[],`Error while formatting ${e.textDocument.uri}`,n))),e.onDocumentColor(((e,n)=>(0,o.runSafeAsync)(t,(async()=>{const t=b.get(e.textDocument.uri);if(t){const e=I(t),n="jsonc"===t.languageId?_:x;return c.findDocumentColors(t,e,{resultLimit:n})}return[]}),[],`Error while computing document colors for ${e.textDocument.uri}`,n))),e.onColorPresentation(((e,n)=>(0,o.runSafe)(t,(()=>{const t=b.get(e.textDocument.uri);if(t){const n=I(t);return c.getColorPresentations(t,n,e.color,e.range)}return[]}),[],`Error while computing color presentations for ${e.textDocument.uri}`,n))),e.onFoldingRanges(((e,n)=>(0,o.runSafe)(t,(()=>{const t=b.get(e.textDocument.uri);if(t){const e="jsonc"===t.languageId?w:C;return c.getFoldingRanges(t,{rangeLimit:e})}return null}),null,`Error while computing folding ranges for ${e.textDocument.uri}`,n))),e.onSelectionRanges(((e,n)=>(0,o.runSafe)(t,(()=>{const t=b.get(e.textDocument.uri);if(t){const n=I(t);return c.getSelectionRanges(t,e.positions,n)}return[]}),[],`Error while computing selection ranges for ${e.textDocument.uri}`,n))),e.onDocumentLinks(((e,n)=>(0,o.runSafeAsync)(t,(async()=>{const t=b.get(e.textDocument.uri);if(t){const e=I(t);return c.findLinks(t,e)}return[]}),[],`Error while computing links for ${e.textDocument.uri}`,n))),e.listen()};const r=n(8867),o=n(211),i=n(9178),s=n(4271),a=n(5908),c=n(8945),u=n(3608);var l,d,f,h,m,p;!function(e){e.type=new r.NotificationType("json/schemaAssociations")}(l||(l={})),function(e){e.type=new r.RequestType("vscode/content")}(d||(d={})),function(e){e.type=new r.NotificationType("json/schemaContent")}(f||(f={})),function(e){e.type=new r.RequestType("json/validate")}(h||(h={})),function(e){e.type=new r.RequestType("json/languageStatus")}(m||(m={})),function(e){e.type=new r.RequestType("json/sort")}(p||(p={}));const g={resolveRelativePath:(e,t)=>{const n=t.substring(0,t.lastIndexOf("/")+1);return c.Utils.resolvePath(c.URI.parse(n),e).toString()}};function y(e){return s.Range.create(s.Position.create(0,0),e.positionAt(e.getText().length))}},5908:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLanguageModelCache=function(e,t,n){let r,o={},i=0;return t>0&&(r=setInterval((()=>{const e=Date.now()-1e3*t,n=Object.keys(o);for(const t of n)o[t].cTime<e&&(delete o[t],i--)}),1e3*t)),{get(t){const r=t.version,s=t.languageId,a=o[t.uri];if(a&&a.version===r&&a.languageId===s)return a.cTime=Date.now(),a.languageModel;const c=n(t);if(o[t.uri]={languageModel:c,version:r,languageId:s,cTime:Date.now()},a||i++,i===e){let e=Number.MAX_VALUE,t=null;for(const n in o){const r=o[n];r.cTime<e&&(t=n,e=r.cTime)}t&&(delete o[t],i--)}return c},onDocumentRemoved(e){const t=e.uri;o[t]&&(delete o[t],i--)},dispose(){void 0!==r&&(clearInterval(r),r=void 0,o={},i=0)}}}},211:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatError=o,t.runSafeAsync=function(e,t,n,r,s){return new Promise((a=>{e.timer.setImmediate((()=>{if(!s.isCancellationRequested)return t().then((e=>{s.isCancellationRequested?a(i()):a(e)}),(e=>{console.error(o(r,e)),a(n)}));a(i())}))}))},t.runSafe=function(e,t,n,r,s){return new Promise((a=>{e.timer.setImmediate((()=>{if(s.isCancellationRequested)a(i());else try{const e=t();if(s.isCancellationRequested)return void a(i());a(e)}catch(e){console.error(o(r,e)),a(n)}}))}))};const r=n(8867);function o(e,t){if(t instanceof Error){const n=t;return`${e}: ${n.message}\n${n.stack}`}return"string"==typeof t?`${e}: ${t}`:t?`${e}: ${t.toString()}`:e}function i(){return console.log("cancelled"),new r.ResponseError(r.LSPErrorCodes.RequestCancelled,"Request cancelled")}},9178:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerDiagnosticsPushSupport=function(e,t,n,r){const i={},s=[];function a(e){const t=i[e.uri];t&&(t.dispose(),delete i[e.uri])}function c(e){a(e);const s=i[e.uri]=n.timer.setTimeout((async()=>{if(s===i[e.uri])try{const n=await r(e);s===i[e.uri]&&t.sendDiagnostics({uri:e.uri,diagnostics:n}),delete i[e.uri]}catch(n){t.console.error((0,o.formatError)(`Error while validating ${e.uri}`,n))}}),500)}return e.onDidChangeContent((e=>{c(e.document)}),void 0,s),e.onDidClose((e=>{a(e.document),t.sendDiagnostics({uri:e.document.uri,diagnostics:[]})}),void 0,s),{requestRefresh:()=>{e.all().forEach(c)},dispose:()=>{s.forEach((e=>e.dispose())),s.length=0;const e=Object.keys(i);for(const t of e)i[t].dispose(),delete i[t]}}},t.registerDiagnosticsPullSupport=function(e,t,n,i){function s(e){return{kind:r.DocumentDiagnosticReportKind.Full,items:e}}const a=t.languages.diagnostics.on((async(t,r)=>(0,o.runSafeAsync)(n,(async()=>{const n=e.get(t.textDocument.uri);return s(n?await i(n):[])}),s([]),`Error while computing diagnostics for ${t.textDocument.uri}`,r)));return{requestRefresh:function(){t.languages.diagnostics.refresh()},dispose:()=>{a.dispose()}}};const r=n(8867),o=n(211)},4292:(e,t,n)=>{"use strict";var r,o,i,s,a,c,u,l,d,f,h,m,p,g,y,b,v,k,T,R,D,S,C,w,x,_,P,A,O,E,N,q,M,j,L,I,F,$,V,W,U,H,B,z,K,J,X,G,Z,Q,Y,ee,te,ne,re,oe,ie,se,ae,ce,ue,le,de,fe,he,me,pe,ge,ye,be,ve,ke,Te,Re,De,Se,Ce,we,xe,_e;n.r(t),n.d(t,{AnnotatedTextEdit:()=>C,ChangeAnnotation:()=>D,ChangeAnnotationIdentifier:()=>S,CodeAction:()=>ae,CodeActionContext:()=>se,CodeActionKind:()=>oe,CodeActionTriggerKind:()=>ie,CodeDescription:()=>v,CodeLens:()=>ce,Color:()=>d,ColorInformation:()=>f,ColorPresentation:()=>h,Command:()=>T,CompletionItem:()=>B,CompletionItemKind:()=>F,CompletionItemLabelDetails:()=>H,CompletionItemTag:()=>V,CompletionList:()=>z,CreateFile:()=>x,DeleteFile:()=>P,Diagnostic:()=>k,DiagnosticRelatedInformation:()=>g,DiagnosticSeverity:()=>y,DiagnosticTag:()=>b,DocumentHighlight:()=>Q,DocumentHighlightKind:()=>Z,DocumentLink:()=>le,DocumentSymbol:()=>re,DocumentUri:()=>r,EOL:()=>Ee,FoldingRange:()=>p,FoldingRangeKind:()=>m,FormattingOptions:()=>ue,Hover:()=>J,InlayHint:()=>Te,InlayHintKind:()=>ve,InlayHintLabelPart:()=>ke,InlineCompletionContext:()=>xe,InlineCompletionItem:()=>De,InlineCompletionList:()=>Se,InlineCompletionTriggerKind:()=>Ce,InlineValueContext:()=>be,InlineValueEvaluatableExpression:()=>ye,InlineValueText:()=>pe,InlineValueVariableLookup:()=>ge,InsertReplaceEdit:()=>W,InsertTextFormat:()=>$,InsertTextMode:()=>U,LanguageKind:()=>M,Location:()=>u,LocationLink:()=>l,MarkedString:()=>K,MarkupContent:()=>I,MarkupKind:()=>L,OptionalVersionedTextDocumentIdentifier:()=>q,ParameterInformation:()=>X,Position:()=>a,Range:()=>c,RenameFile:()=>_,SelectedCompletionInfo:()=>we,SelectionRange:()=>de,SemanticTokenModifiers:()=>he,SemanticTokenTypes:()=>fe,SemanticTokens:()=>me,SignatureInformation:()=>G,SnippetTextEdit:()=>O,StringValue:()=>Re,SymbolInformation:()=>te,SymbolKind:()=>Y,SymbolTag:()=>ee,TextDocument:()=>Ne,TextDocumentEdit:()=>w,TextDocumentIdentifier:()=>E,TextDocumentItem:()=>j,TextEdit:()=>R,URI:()=>o,VersionedTextDocumentIdentifier:()=>N,WorkspaceChange:()=>Oe,WorkspaceEdit:()=>A,WorkspaceFolder:()=>_e,WorkspaceSymbol:()=>ne,integer:()=>i,uinteger:()=>s}),function(e){e.is=function(e){return"string"==typeof e}}(r||(r={})),function(e){e.is=function(e){return"string"==typeof e}}(o||(o={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(i||(i={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(s||(s={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=s.MAX_VALUE),t===Number.MAX_VALUE&&(t=s.MAX_VALUE),{line:e,character:t}},e.is=function(e){const t=e;return qe.objectLiteral(t)&&qe.uinteger(t.line)&&qe.uinteger(t.character)}}(a||(a={})),function(e){e.create=function(e,t,n,r){if(qe.uinteger(e)&&qe.uinteger(t)&&qe.uinteger(n)&&qe.uinteger(r))return{start:a.create(e,t),end:a.create(n,r)};if(a.is(e)&&a.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)},e.is=function(e){const t=e;return qe.objectLiteral(t)&&a.is(t.start)&&a.is(t.end)}}(c||(c={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){const t=e;return qe.objectLiteral(t)&&c.is(t.range)&&(qe.string(t.uri)||qe.undefined(t.uri))}}(u||(u={})),function(e){e.create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function(e){const t=e;return qe.objectLiteral(t)&&c.is(t.targetRange)&&qe.string(t.targetUri)&&c.is(t.targetSelectionRange)&&(c.is(t.originSelectionRange)||qe.undefined(t.originSelectionRange))}}(l||(l={})),function(e){e.create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function(e){const t=e;return qe.objectLiteral(t)&&qe.numberRange(t.red,0,1)&&qe.numberRange(t.green,0,1)&&qe.numberRange(t.blue,0,1)&&qe.numberRange(t.alpha,0,1)}}(d||(d={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){const t=e;return qe.objectLiteral(t)&&c.is(t.range)&&d.is(t.color)}}(f||(f={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){const t=e;return qe.objectLiteral(t)&&qe.string(t.label)&&(qe.undefined(t.textEdit)||R.is(t))&&(qe.undefined(t.additionalTextEdits)||qe.typedArray(t.additionalTextEdits,R.is))}}(h||(h={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(m||(m={})),function(e){e.create=function(e,t,n,r,o,i){const s={startLine:e,endLine:t};return qe.defined(n)&&(s.startCharacter=n),qe.defined(r)&&(s.endCharacter=r),qe.defined(o)&&(s.kind=o),qe.defined(i)&&(s.collapsedText=i),s},e.is=function(e){const t=e;return qe.objectLiteral(t)&&qe.uinteger(t.startLine)&&qe.uinteger(t.startLine)&&(qe.undefined(t.startCharacter)||qe.uinteger(t.startCharacter))&&(qe.undefined(t.endCharacter)||qe.uinteger(t.endCharacter))&&(qe.undefined(t.kind)||qe.string(t.kind))}}(p||(p={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){const t=e;return qe.defined(t)&&u.is(t.location)&&qe.string(t.message)}}(g||(g={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(y||(y={})),function(e){e.Unnecessary=1,e.Deprecated=2}(b||(b={})),function(e){e.is=function(e){const t=e;return qe.objectLiteral(t)&&qe.string(t.href)}}(v||(v={})),function(e){e.create=function(e,t,n,r,o,i){const s={range:e,message:t};return qe.defined(n)&&(s.severity=n),qe.defined(r)&&(s.code=r),qe.defined(o)&&(s.source=o),qe.defined(i)&&(s.relatedInformation=i),s},e.is=function(e){var t;const n=e;return qe.defined(n)&&c.is(n.range)&&qe.string(n.message)&&(qe.number(n.severity)||qe.undefined(n.severity))&&(qe.integer(n.code)||qe.string(n.code)||qe.undefined(n.code))&&(qe.undefined(n.codeDescription)||qe.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(qe.string(n.source)||qe.undefined(n.source))&&(qe.undefined(n.relatedInformation)||qe.typedArray(n.relatedInformation,g.is))}}(k||(k={})),function(e){e.create=function(e,t,...n){const r={title:e,command:t};return qe.defined(n)&&n.length>0&&(r.arguments=n),r},e.is=function(e){const t=e;return qe.defined(t)&&qe.string(t.title)&&(void 0===t.tooltip||qe.string(t.tooltip))&&qe.string(t.command)}}(T||(T={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){const t=e;return qe.objectLiteral(t)&&qe.string(t.newText)&&c.is(t.range)}}(R||(R={})),function(e){e.create=function(e,t,n){const r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){const t=e;return qe.objectLiteral(t)&&qe.string(t.label)&&(qe.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(qe.string(t.description)||void 0===t.description)}}(D||(D={})),function(e){e.is=function(e){const t=e;return qe.string(t)}}(S||(S={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){const t=e;return R.is(t)&&(D.is(t.annotationId)||S.is(t.annotationId))}}(C||(C={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){const t=e;return qe.defined(t)&&q.is(t.textDocument)&&Array.isArray(t.edits)}}(w||(w={})),function(e){e.create=function(e,t,n){const r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){const t=e;return t&&"create"===t.kind&&qe.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||qe.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||qe.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(x||(x={})),function(e){e.create=function(e,t,n,r){const o={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(o.options=n),void 0!==r&&(o.annotationId=r),o},e.is=function(e){const t=e;return t&&"rename"===t.kind&&qe.string(t.oldUri)&&qe.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||qe.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||qe.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(_||(_={})),function(e){e.create=function(e,t,n){const r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){const t=e;return t&&"delete"===t.kind&&qe.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||qe.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||qe.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(P||(P={})),function(e){e.is=function(e){const t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((e=>qe.string(e.kind)?x.is(e)||_.is(e)||P.is(e):w.is(e))))}}(A||(A={}));class Pe{constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,n){let r,o;if(void 0===n?r=R.insert(e,t):S.is(n)?(o=n,r=C.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=C.insert(e,t,o)),this.edits.push(r),void 0!==o)return o}replace(e,t,n){let r,o;if(void 0===n?r=R.replace(e,t):S.is(n)?(o=n,r=C.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=C.replace(e,t,o)),this.edits.push(r),void 0!==o)return o}delete(e,t){let n,r;if(void 0===t?n=R.del(e):S.is(t)?(r=t,n=C.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=C.del(e,r)),this.edits.push(n),void 0!==r)return r}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")}}!function(e){e.is=function(e){const t=e;return qe.objectLiteral(t)&&c.is(t.range)&&Re.isSnippet(t.snippet)&&(void 0===t.annotationId||D.is(t.annotationId)||S.is(t.annotationId))}}(O||(O={}));class Ae{constructor(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let n;if(S.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error(`Id ${n} is already in use.`);if(void 0===t)throw new Error(`No annotation provided for id ${n}`);return this._annotations[n]=t,this._size++,n}nextId(){return this._counter++,this._counter.toString()}}class Oe{constructor(e){this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Ae(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((e=>{if(w.is(e)){const t=new Pe(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}}))):e.changes&&Object.keys(e.changes).forEach((t=>{const n=new Pe(e.changes[t]);this._textEditChanges[t]=n}))):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(q.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let n=this._textEditChanges[t.uri];if(!n){const e=[],r={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(r),n=new Pe(e,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}{if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){const n=[];this._workspaceEdit.changes[e]=n,t=new Pe(n),this._textEditChanges[e]=t}return t}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new Ae,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let r,o,i;if(D.is(t)||S.is(t)?r=t:n=t,void 0===r?o=x.create(e,n):(i=S.is(r)?r:this._changeAnnotations.manage(r),o=x.create(e,n,i)),this._workspaceEdit.documentChanges.push(o),void 0!==i)return i}renameFile(e,t,n,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let o,i,s;if(D.is(n)||S.is(n)?o=n:r=n,void 0===o?i=_.create(e,t,r):(s=S.is(o)?o:this._changeAnnotations.manage(o),i=_.create(e,t,r,s)),this._workspaceEdit.documentChanges.push(i),void 0!==s)return s}deleteFile(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let r,o,i;if(D.is(t)||S.is(t)?r=t:n=t,void 0===r?o=P.create(e,n):(i=S.is(r)?r:this._changeAnnotations.manage(r),o=P.create(e,n,i)),this._workspaceEdit.documentChanges.push(o),void 0!==i)return i}}!function(e){e.create=function(e){return{uri:e}},e.is=function(e){const t=e;return qe.defined(t)&&qe.string(t.uri)}}(E||(E={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){const t=e;return qe.defined(t)&&qe.string(t.uri)&&qe.integer(t.version)}}(N||(N={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){const t=e;return qe.defined(t)&&qe.string(t.uri)&&(null===t.version||qe.integer(t.version))}}(q||(q={})),function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"}(M||(M={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){const t=e;return qe.defined(t)&&qe.string(t.uri)&&qe.string(t.languageId)&&qe.integer(t.version)&&qe.string(t.text)}}(j||(j={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){const n=t;return n===e.PlainText||n===e.Markdown}}(L||(L={})),function(e){e.is=function(e){const t=e;return qe.objectLiteral(e)&&L.is(t.kind)&&qe.string(t.value)}}(I||(I={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(F||(F={})),function(e){e.PlainText=1,e.Snippet=2}($||($={})),function(e){e.Deprecated=1}(V||(V={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){const t=e;return t&&qe.string(t.newText)&&c.is(t.insert)&&c.is(t.replace)}}(W||(W={})),function(e){e.asIs=1,e.adjustIndentation=2}(U||(U={})),function(e){e.is=function(e){const t=e;return t&&(qe.string(t.detail)||void 0===t.detail)&&(qe.string(t.description)||void 0===t.description)}}(H||(H={})),function(e){e.create=function(e){return{label:e}}}(B||(B={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(z||(z={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){const t=e;return qe.string(t)||qe.objectLiteral(t)&&qe.string(t.language)&&qe.string(t.value)}}(K||(K={})),function(e){e.is=function(e){const t=e;return!!t&&qe.objectLiteral(t)&&(I.is(t.contents)||K.is(t.contents)||qe.typedArray(t.contents,K.is))&&(void 0===e.range||c.is(e.range))}}(J||(J={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(X||(X={})),function(e){e.create=function(e,t,...n){const r={label:e};return qe.defined(t)&&(r.documentation=t),qe.defined(n)?r.parameters=n:r.parameters=[],r}}(G||(G={})),function(e){e.Text=1,e.Read=2,e.Write=3}(Z||(Z={})),function(e){e.create=function(e,t){const n={range:e};return qe.number(t)&&(n.kind=t),n}}(Q||(Q={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(Y||(Y={})),function(e){e.Deprecated=1}(ee||(ee={})),function(e){e.create=function(e,t,n,r,o){const i={name:e,kind:t,location:{uri:r,range:n}};return o&&(i.containerName=o),i}}(te||(te={})),function(e){e.create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}}}(ne||(ne={})),function(e){e.create=function(e,t,n,r,o,i){const s={name:e,detail:t,kind:n,range:r,selectionRange:o};return void 0!==i&&(s.children=i),s},e.is=function(e){const t=e;return t&&qe.string(t.name)&&qe.number(t.kind)&&c.is(t.range)&&c.is(t.selectionRange)&&(void 0===t.detail||qe.string(t.detail))&&(void 0===t.deprecated||qe.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(re||(re={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"}(oe||(oe={})),function(e){e.Invoked=1,e.Automatic=2}(ie||(ie={})),function(e){e.create=function(e,t,n){const r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},e.is=function(e){const t=e;return qe.defined(t)&&qe.typedArray(t.diagnostics,k.is)&&(void 0===t.only||qe.typedArray(t.only,qe.string))&&(void 0===t.triggerKind||t.triggerKind===ie.Invoked||t.triggerKind===ie.Automatic)}}(se||(se={})),function(e){e.create=function(e,t,n){const r={title:e};let o=!0;return"string"==typeof t?(o=!1,r.kind=t):T.is(t)?r.command=t:r.edit=t,o&&void 0!==n&&(r.kind=n),r},e.is=function(e){const t=e;return t&&qe.string(t.title)&&(void 0===t.diagnostics||qe.typedArray(t.diagnostics,k.is))&&(void 0===t.kind||qe.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||T.is(t.command))&&(void 0===t.isPreferred||qe.boolean(t.isPreferred))&&(void 0===t.edit||A.is(t.edit))}}(ae||(ae={})),function(e){e.create=function(e,t){const n={range:e};return qe.defined(t)&&(n.data=t),n},e.is=function(e){const t=e;return qe.defined(t)&&c.is(t.range)&&(qe.undefined(t.command)||T.is(t.command))}}(ce||(ce={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){const t=e;return qe.defined(t)&&qe.uinteger(t.tabSize)&&qe.boolean(t.insertSpaces)}}(ue||(ue={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){const t=e;return qe.defined(t)&&c.is(t.range)&&(qe.undefined(t.target)||qe.string(t.target))}}(le||(le={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){const n=t;return qe.objectLiteral(n)&&c.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(de||(de={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator",e.label="label"}(fe||(fe={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(he||(he={})),function(e){e.is=function(e){const t=e;return qe.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(me||(me={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&qe.string(t.text)}}(pe||(pe={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&qe.boolean(t.caseSensitiveLookup)&&(qe.string(t.variableName)||void 0===t.variableName)}}(ge||(ge={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&(qe.string(t.expression)||void 0===t.expression)}}(ye||(ye={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){const t=e;return qe.defined(t)&&c.is(e.stoppedLocation)}}(be||(be={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(ve||(ve={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){const t=e;return qe.objectLiteral(t)&&(void 0===t.tooltip||qe.string(t.tooltip)||I.is(t.tooltip))&&(void 0===t.location||u.is(t.location))&&(void 0===t.command||T.is(t.command))}}(ke||(ke={})),function(e){e.create=function(e,t,n){const r={position:e,label:t};return void 0!==n&&(r.kind=n),r},e.is=function(e){const t=e;return qe.objectLiteral(t)&&a.is(t.position)&&(qe.string(t.label)||qe.typedArray(t.label,ke.is))&&(void 0===t.kind||ve.is(t.kind))&&void 0===t.textEdits||qe.typedArray(t.textEdits,R.is)&&(void 0===t.tooltip||qe.string(t.tooltip)||I.is(t.tooltip))&&(void 0===t.paddingLeft||qe.boolean(t.paddingLeft))&&(void 0===t.paddingRight||qe.boolean(t.paddingRight))}}(Te||(Te={})),function(e){e.createSnippet=function(e){return{kind:"snippet",value:e}},e.isSnippet=function(e){const t=e;return qe.objectLiteral(t)&&"snippet"===t.kind&&qe.string(t.value)}}(Re||(Re={})),function(e){e.create=function(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}}(De||(De={})),function(e){e.create=function(e){return{items:e}}}(Se||(Se={})),function(e){e.Invoked=1,e.Automatic=2}(Ce||(Ce={})),function(e){e.create=function(e,t){return{range:e,text:t}}}(we||(we={})),function(e){e.create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}}}(xe||(xe={})),function(e){e.is=function(e){const t=e;return qe.objectLiteral(t)&&o.is(t.uri)&&qe.string(t.name)}}(_e||(_e={}));const Ee=["\n","\r\n","\r"];var Ne,qe;!function(e){function t(e,n){if(e.length<=1)return e;const r=e.length/2|0,o=e.slice(0,r),i=e.slice(r);t(o,n),t(i,n);let s=0,a=0,c=0;for(;s<o.length&&a<i.length;){const t=n(o[s],i[a]);e[c++]=t<=0?o[s++]:i[a++]}for(;s<o.length;)e[c++]=o[s++];for(;a<i.length;)e[c++]=i[a++];return e}e.create=function(e,t,n,r){return new Me(e,t,n,r)},e.is=function(e){const t=e;return!!(qe.defined(t)&&qe.string(t.uri)&&(qe.undefined(t.languageId)||qe.string(t.languageId))&&qe.uinteger(t.lineCount)&&qe.func(t.getText)&&qe.func(t.positionAt)&&qe.func(t.offsetAt))},e.applyEdits=function(e,n){let r=e.getText();const o=t(n,((e,t)=>{const n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}));let i=r.length;for(let t=o.length-1;t>=0;t--){const n=o[t],s=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end);if(!(a<=i))throw new Error("Overlapping edit");r=r.substring(0,s)+n.newText+r.substring(a,r.length),i=s}return r}}(Ne||(Ne={}));class Me{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){const e=[],t=this._content;let n=!0;for(let r=0;r<t.length;r++){n&&(e.push(r),n=!1);const o=t.charAt(r);n="\r"===o||"\n"===o,"\r"===o&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);const t=this.getLineOffsets();let n=0,r=t.length;if(0===r)return a.create(0,e);for(;n<r;){const o=Math.floor((n+r)/2);t[o]>e?r=o:n=o+1}const o=n-1;return a.create(o,e-t[o])}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}}!function(e){const t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.numberRange=function(e,n,r){return"[object Number]"===t.call(e)&&n<=e&&e<=r},e.integer=function(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(qe||(qe={}))}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";var e=r;Object.defineProperty(e,"__esModule",{value:!0});const t=n(3608);let o=!1;const i=[],s=async e=>{if(o)i.push(e);else{const r=[];o=!0;const a=e.data.i10lLocation;if(a)try{await t.config({uri:a}),r.push(`l10n: Configured to ${a.toString()}.`)}catch(e){r.push(`l10n: Problems loading ${a.toString()} : ${e}.`)}else r.push("l10n: No bundle configured.");await Promise.resolve().then((()=>n(7662))),self.onmessage!==s&&(i.forEach((e=>self.onmessage?.(e))),i.length=0),r.forEach(console.log)}};self.onmessage=s})(),serverExportVar=r})();
1
+ var serverExportVar;(()=>{var e={3608:(e,t,n)=>{"use strict";var r;function o(e){if("contents"in e)r="string"==typeof e.contents?JSON.parse(e.contents):e.contents;else if("fsPath"in e){const t=function(e){throw new Error("Unsupported in browser")}(e.fsPath),n=JSON.parse(t);r=c(n)?n.contents.bundle:n}else if(e.uri){let t=e.uri;return"string"==typeof e.uri&&(t=new URL(e.uri)),new Promise(((e,n)=>{(async function(e){if("http:"===e.protocol||"https:"===e.protocol){const t=await fetch(e);return await t.text()}throw new Error("Unsupported protocol")})(t).then((t=>{try{const n=JSON.parse(t);r=c(n)?n.contents.bundle:n,e()}catch(e){n(e)}})).catch((e=>{n(e)}))}))}}function i(...e){const t=e[0];let n,o,s;if("string"==typeof t)n=t,o=t,e.splice(0,1),s=e&&"object"==typeof e[0]?e[0]:e;else{if(t instanceof Array){const n=e.slice(1);if(t.length!==n.length+1)throw new Error("expected a string as the first argument to l10n.t");let r=t[0];for(let e=1;e<t.length;e++)r+=`{${e-1}}`+t[e];return i(r,...n)}o=t.message,n=o,t.comment&&t.comment.length>0&&(n+=`/${Array.isArray(t.comment)?t.comment.join(""):t.comment}`),s=t.args??{}}const c=r?.[n];return c?"string"==typeof c?a(c,s):c.comment?a(c.message,s):a(o,s):a(o,s)}n.r(t),n.d(t,{config:()=>o,t:()=>i});var s=/{([^}]+)}/g;function a(e,t){return 0===Object.keys(t).length?e:e.replace(s,((e,n)=>t[n]??e))}function c(e){return!("object"!=typeof e?.contents?.bundle||"string"!=typeof e?.version)}},4271:(e,t,n)=>{"use strict";function r(e,t=!1){const n=e.length;let r=0,a="",c=0,u=16,l=0,d=0,f=0,h=0,p=0;function m(t,n){let o=0,i=0;for(;o<t||!n;){let t=e.charCodeAt(r);if(t>=48&&t<=57)i=16*i+t-48;else if(t>=65&&t<=70)i=16*i+t-65+10;else{if(!(t>=97&&t<=102))break;i=16*i+t-97+10}r++,o++}return o<t&&(i=-1),i}function g(){if(a="",p=0,c=r,d=l,h=f,r>=n)return c=n,u=17;let t=e.charCodeAt(r);if(o(t)){do{r++,a+=String.fromCharCode(t),t=e.charCodeAt(r)}while(o(t));return u=15}if(i(t))return r++,a+=String.fromCharCode(t),13===t&&10===e.charCodeAt(r)&&(r++,a+="\n"),l++,f=r,u=14;switch(t){case 123:return r++,u=1;case 125:return r++,u=2;case 91:return r++,u=3;case 93:return r++,u=4;case 58:return r++,u=6;case 44:return r++,u=5;case 34:return r++,a=function(){let t="",o=r;for(;;){if(r>=n){t+=e.substring(o,r),p=2;break}const s=e.charCodeAt(r);if(34===s){t+=e.substring(o,r),r++;break}if(92!==s){if(s>=0&&s<=31){if(i(s)){t+=e.substring(o,r),p=2;break}p=6}r++}else{if(t+=e.substring(o,r),r++,r>=n){p=2;break}switch(e.charCodeAt(r++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:const e=m(4,!0);e>=0?t+=String.fromCharCode(e):p=4;break;default:p=5}o=r}}return t}(),u=10;case 47:const o=r-1;if(47===e.charCodeAt(r+1)){for(r+=2;r<n&&!i(e.charCodeAt(r));)r++;return a=e.substring(o,r),u=12}if(42===e.charCodeAt(r+1)){r+=2;const t=n-1;let s=!1;for(;r<t;){const t=e.charCodeAt(r);if(42===t&&47===e.charCodeAt(r+1)){r+=2,s=!0;break}r++,i(t)&&(13===t&&10===e.charCodeAt(r)&&r++,l++,f=r)}return s||(r++,p=1),a=e.substring(o,r),u=13}return a+=String.fromCharCode(t),r++,u=16;case 45:if(a+=String.fromCharCode(t),r++,r===n||!s(e.charCodeAt(r)))return u=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return a+=function(){let t=r;if(48===e.charCodeAt(r))r++;else for(r++;r<e.length&&s(e.charCodeAt(r));)r++;if(r<e.length&&46===e.charCodeAt(r)){if(r++,!(r<e.length&&s(e.charCodeAt(r))))return p=3,e.substring(t,r);for(r++;r<e.length&&s(e.charCodeAt(r));)r++}let n=r;if(r<e.length&&(69===e.charCodeAt(r)||101===e.charCodeAt(r)))if(r++,(r<e.length&&43===e.charCodeAt(r)||45===e.charCodeAt(r))&&r++,r<e.length&&s(e.charCodeAt(r))){for(r++;r<e.length&&s(e.charCodeAt(r));)r++;n=r}else p=3;return e.substring(t,n)}(),u=11;default:for(;r<n&&y(t);)r++,t=e.charCodeAt(r);if(c!==r){switch(a=e.substring(c,r),a){case"true":return u=8;case"false":return u=9;case"null":return u=7}return u=16}return a+=String.fromCharCode(t),r++,u=16}}function y(e){if(o(e)||i(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(e){r=e,a="",c=0,u=16,p=0},getPosition:()=>r,scan:t?function(){let e;do{e=g()}while(e>=12&&e<=15);return e}:g,getToken:()=>u,getTokenValue:()=>a,getTokenOffset:()=>c,getTokenLength:()=>r-c,getTokenStartLine:()=>d,getTokenStartCharacter:()=>c-h,getTokenError:()=>p}}function o(e){return 32===e||9===e}function i(e){return 10===e||13===e}function s(e){return e>=48&&e<=57}var a;n.r(t),n.d(t,{ClientCapabilities:()=>Qe,CodeAction:()=>Se,CodeActionContext:()=>Re,CodeActionKind:()=>Te,Color:()=>A,ColorInformation:()=>E,ColorPresentation:()=>M,Command:()=>V,CompletionItem:()=>ue,CompletionItemKind:()=>re,CompletionItemTag:()=>ie,CompletionList:()=>le,Diagnostic:()=>$,DiagnosticSeverity:()=>L,DocumentHighlight:()=>ge,DocumentHighlightKind:()=>me,DocumentLink:()=>xe,DocumentSymbol:()=>De,DocumentUri:()=>k,ErrorCode:()=>Ge,FoldingRange:()=>q,FoldingRangeKind:()=>N,Hover:()=>fe,InsertTextFormat:()=>oe,Location:()=>P,MarkedString:()=>de,MarkupContent:()=>ne,MarkupKind:()=>te,Position:()=>w,Range:()=>x,SchemaDraft:()=>Ze,SelectionRange:()=>Pe,SymbolInformation:()=>ve,SymbolKind:()=>ye,TextDocument:()=>Xe,TextDocumentEdit:()=>z,TextEdit:()=>W,VersionedTextDocumentIdentifier:()=>Q,WorkspaceEdit:()=>G,getLanguageService:()=>En}),function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"}(a||(a={}));const c=new Array(20).fill(0).map(((e,t)=>" ".repeat(t))),u=200,l={" ":{"\n":new Array(u).fill(0).map(((e,t)=>"\n"+" ".repeat(t))),"\r":new Array(u).fill(0).map(((e,t)=>"\r"+" ".repeat(t))),"\r\n":new Array(u).fill(0).map(((e,t)=>"\r\n"+" ".repeat(t)))},"\t":{"\n":new Array(u).fill(0).map(((e,t)=>"\n"+"\t".repeat(t))),"\r":new Array(u).fill(0).map(((e,t)=>"\r"+"\t".repeat(t))),"\r\n":new Array(u).fill(0).map(((e,t)=>"\r\n"+"\t".repeat(t)))}},d=["\n","\r","\r\n"];function f(e,t){let n="";for(let r=0;r<t;r++)n+=e;return n}function h(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}var p;!function(e){e.DEFAULT={allowTrailingComma:!1}}(p||(p={}));const m=r;var g,y;!function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"}(g||(g={})),function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"}(y||(y={}));const b=function(e,t=[],n=p.DEFAULT){let o=null,i=[];const s=[];function a(e){Array.isArray(i)?i.push(e):null!==o&&(i[o]=e)}return function(e,t,n=p.DEFAULT){const o=r(e,!1),i=[];let s=0;function a(e){return e?t=>0===s&&e(t,o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter()):()=>!0}function c(e){return e?t=>0===s&&e(t,o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter(),(()=>i.slice())):()=>!0}function u(e){return e?()=>{s>0?s++:!1===e(o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter(),(()=>i.slice()))&&(s=1)}:()=>!0}function l(e){return e?()=>{s>0&&s--,0===s&&e(o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter())}:()=>!0}const d=u(t.onObjectBegin),f=c(t.onObjectProperty),h=l(t.onObjectEnd),m=u(t.onArrayBegin),g=l(t.onArrayEnd),y=c(t.onLiteralValue),b=a(t.onSeparator),v=(D=t.onComment)?()=>0===s&&D(o.getTokenOffset(),o.getTokenLength(),o.getTokenStartLine(),o.getTokenStartCharacter()):()=>!0,_=a(t.onError);var D;const T=n&&n.disallowComments,k=n&&n.allowTrailingComma;function R(){for(;;){const e=o.scan();switch(o.getTokenError()){case 4:S(14);break;case 5:S(15);break;case 3:S(13);break;case 1:T||S(11);break;case 2:S(12);break;case 6:S(16)}switch(e){case 12:case 13:T?S(10):v();break;case 16:S(1);break;case 15:case 14:break;default:return e}}}function S(e,t=[],n=[]){if(_(e),t.length+n.length>0){let e=o.getToken();for(;17!==e;){if(-1!==t.indexOf(e)){R();break}if(-1!==n.indexOf(e))break;e=R()}}}function C(e){const t=o.getTokenValue();return e?y(t):(f(t),i.push(t)),R(),!0}R(),17===o.getToken()?!!n.allowEmptyContent||S(4,[],[]):function e(){switch(o.getToken()){case 3:return function(){m(),R();let t=!0,n=!1;for(;4!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){if(n||S(4,[],[]),b(","),R(),4===o.getToken()&&k)break}else n&&S(6,[],[]);t?(i.push(0),t=!1):i[i.length-1]++,e()||S(4,[],[4,5]),n=!0}return g(),t||i.pop(),4!==o.getToken()?S(8,[4],[]):R(),!0}();case 1:return function(){d(),R();let t=!1;for(;2!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){if(t||S(4,[],[]),b(","),R(),2===o.getToken()&&k)break}else t&&S(6,[],[]);(10!==o.getToken()?(S(3,[],[2,5]),0):(C(!1),6===o.getToken()?(b(":"),R(),e()||S(4,[],[2,5])):S(5,[],[2,5]),i.pop(),1))||S(4,[],[2,5]),t=!0}return h(),2!==o.getToken()?S(7,[2],[]):R(),!0}();case 10:return C(!0);default:return function(){switch(o.getToken()){case 11:const e=o.getTokenValue();let t=Number(e);isNaN(t)&&(S(2),t=0),y(t);break;case 7:y(null);break;case 8:y(!0);break;case 9:y(!1);break;default:return!1}return R(),!0}()}}()?17!==o.getToken()&&S(9,[],[]):S(4,[],[])}(e,{onObjectBegin:()=>{const e={};a(e),s.push(i),i=e,o=null},onObjectProperty:e=>{o=e},onObjectEnd:()=>{i=s.pop()},onArrayBegin:()=>{const e=[];a(e),s.push(i),i=e,o=null},onArrayEnd:()=>{i=s.pop()},onLiteralValue:a,onError:(e,n,r)=>{t.push({error:e,offset:n,length:r})}},n),i[0]},v=function e(t,n,r=!1){if(function(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}(t,n,r)){const o=t.children;if(Array.isArray(o))for(let t=0;t<o.length&&o[t].offset<=n;t++){const i=e(o[t],n,r);if(i)return i}return t}},_=function e(t){if(!t.parent||!t.parent.children)return[];const n=e(t.parent);if("property"===t.parent.type){const e=t.parent.children[0].value;n.push(e)}else if("array"===t.parent.type){const e=t.parent.children.indexOf(t);-1!==e&&n.push(e)}return n},D=function e(t){switch(t.type){case"array":return t.children.map(e);case"object":const n=Object.create(null);for(let r of t.children){const t=r.children[1];t&&(n[r.children[0].value]=e(t))}return n;case"null":case"string":case"number":case"boolean":return t.value;default:return}};var T,k,R,S,C,w,x,P,O,A,E,M,N,q,j,L,I,F,$,V,W,U,H,B,z,K,J,X,G,Z,Q,Y,ee,te,ne,re,oe,ie,se,ae,ce,ue,le,de,fe,he,pe,me,ge,ye,be,ve,_e,De,Te,ke,Re,Se,Ce,we,xe,Pe,Oe,Ae,Ee,Me,Ne,qe,je,Le,Ie,Fe,$e,Ve,We,Ue,He,Be,ze,Ke,Je,Xe,Ge,Ze,Qe;function Ye(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!Ye(e[n],t[n]))return!1}else{const o=[];for(r in e)o.push(r);o.sort();const i=[];for(r in t)i.push(r);if(i.sort(),!Ye(o,i))return!1;for(n=0;n<o.length;n++)if(!Ye(e[o[n]],t[o[n]]))return!1}return!0}function et(e){return"number"==typeof e}function tt(e){return void 0!==e}function nt(e){return"boolean"==typeof e}function rt(e){return"string"==typeof e}function ot(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function it(e,t){const n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:0===n&&e===t}function st(e){let t="";(function(e,t){if(e.length<4)return!1;for(let n=0;n<4;n++)if(e[n]!==t[n])return!1;return!0})(e,"(?i)")&&(e=e.substring(4),t="i");try{return new RegExp(e,t+"u")}catch(n){try{return new RegExp(e,t)}catch(e){return}}}function at(e){let t=0;for(let n=0;n<e.length;n++){t++;const r=e.charCodeAt(n);55296<=r&&r<=56319&&n++}return t}!function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"}(T||(T={})),function(e){e.is=function(e){return"string"==typeof e}}(k||(k={})),function(e){e.is=function(e){return"string"==typeof e}}(R||(R={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(S||(S={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(C||(C={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=C.MAX_VALUE),t===Number.MAX_VALUE&&(t=C.MAX_VALUE),{line:e,character:t}},e.is=function(e){let t=e;return Je.objectLiteral(t)&&Je.uinteger(t.line)&&Je.uinteger(t.character)}}(w||(w={})),function(e){e.create=function(e,t,n,r){if(Je.uinteger(e)&&Je.uinteger(t)&&Je.uinteger(n)&&Je.uinteger(r))return{start:w.create(e,t),end:w.create(n,r)};if(w.is(e)&&w.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)},e.is=function(e){let t=e;return Je.objectLiteral(t)&&w.is(t.start)&&w.is(t.end)}}(x||(x={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){let t=e;return Je.objectLiteral(t)&&x.is(t.range)&&(Je.string(t.uri)||Je.undefined(t.uri))}}(P||(P={})),function(e){e.create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function(e){let t=e;return Je.objectLiteral(t)&&x.is(t.targetRange)&&Je.string(t.targetUri)&&x.is(t.targetSelectionRange)&&(x.is(t.originSelectionRange)||Je.undefined(t.originSelectionRange))}}(O||(O={})),function(e){e.create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function(e){const t=e;return Je.objectLiteral(t)&&Je.numberRange(t.red,0,1)&&Je.numberRange(t.green,0,1)&&Je.numberRange(t.blue,0,1)&&Je.numberRange(t.alpha,0,1)}}(A||(A={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){const t=e;return Je.objectLiteral(t)&&x.is(t.range)&&A.is(t.color)}}(E||(E={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){const t=e;return Je.objectLiteral(t)&&Je.string(t.label)&&(Je.undefined(t.textEdit)||W.is(t))&&(Je.undefined(t.additionalTextEdits)||Je.typedArray(t.additionalTextEdits,W.is))}}(M||(M={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(N||(N={})),function(e){e.create=function(e,t,n,r,o,i){const s={startLine:e,endLine:t};return Je.defined(n)&&(s.startCharacter=n),Je.defined(r)&&(s.endCharacter=r),Je.defined(o)&&(s.kind=o),Je.defined(i)&&(s.collapsedText=i),s},e.is=function(e){const t=e;return Je.objectLiteral(t)&&Je.uinteger(t.startLine)&&Je.uinteger(t.startLine)&&(Je.undefined(t.startCharacter)||Je.uinteger(t.startCharacter))&&(Je.undefined(t.endCharacter)||Je.uinteger(t.endCharacter))&&(Je.undefined(t.kind)||Je.string(t.kind))}}(q||(q={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){let t=e;return Je.defined(t)&&P.is(t.location)&&Je.string(t.message)}}(j||(j={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(L||(L={})),function(e){e.Unnecessary=1,e.Deprecated=2}(I||(I={})),function(e){e.is=function(e){const t=e;return Je.objectLiteral(t)&&Je.string(t.href)}}(F||(F={})),function(e){e.create=function(e,t,n,r,o,i){let s={range:e,message:t};return Je.defined(n)&&(s.severity=n),Je.defined(r)&&(s.code=r),Je.defined(o)&&(s.source=o),Je.defined(i)&&(s.relatedInformation=i),s},e.is=function(e){var t;let n=e;return Je.defined(n)&&x.is(n.range)&&Je.string(n.message)&&(Je.number(n.severity)||Je.undefined(n.severity))&&(Je.integer(n.code)||Je.string(n.code)||Je.undefined(n.code))&&(Je.undefined(n.codeDescription)||Je.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(Je.string(n.source)||Je.undefined(n.source))&&(Je.undefined(n.relatedInformation)||Je.typedArray(n.relatedInformation,j.is))}}($||($={})),function(e){e.create=function(e,t,...n){let r={title:e,command:t};return Je.defined(n)&&n.length>0&&(r.arguments=n),r},e.is=function(e){let t=e;return Je.defined(t)&&Je.string(t.title)&&Je.string(t.command)}}(V||(V={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){const t=e;return Je.objectLiteral(t)&&Je.string(t.newText)&&x.is(t.range)}}(W||(W={})),function(e){e.create=function(e,t,n){const r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){const t=e;return Je.objectLiteral(t)&&Je.string(t.label)&&(Je.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Je.string(t.description)||void 0===t.description)}}(U||(U={})),function(e){e.is=function(e){const t=e;return Je.string(t)}}(H||(H={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){const t=e;return W.is(t)&&(U.is(t.annotationId)||H.is(t.annotationId))}}(B||(B={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){let t=e;return Je.defined(t)&&Y.is(t.textDocument)&&Array.isArray(t.edits)}}(z||(z={})),function(e){e.create=function(e,t,n){let r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"create"===t.kind&&Je.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Je.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Je.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||H.is(t.annotationId))}}(K||(K={})),function(e){e.create=function(e,t,n,r){let o={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(o.options=n),void 0!==r&&(o.annotationId=r),o},e.is=function(e){let t=e;return t&&"rename"===t.kind&&Je.string(t.oldUri)&&Je.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Je.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Je.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||H.is(t.annotationId))}}(J||(J={})),function(e){e.create=function(e,t,n){let r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"delete"===t.kind&&Je.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Je.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Je.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||H.is(t.annotationId))}}(X||(X={})),function(e){e.is=function(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((e=>Je.string(e.kind)?K.is(e)||J.is(e)||X.is(e):z.is(e))))}}(G||(G={})),function(e){e.create=function(e){return{uri:e}},e.is=function(e){let t=e;return Je.defined(t)&&Je.string(t.uri)}}(Z||(Z={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Je.defined(t)&&Je.string(t.uri)&&Je.integer(t.version)}}(Q||(Q={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Je.defined(t)&&Je.string(t.uri)&&(null===t.version||Je.integer(t.version))}}(Y||(Y={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){let t=e;return Je.defined(t)&&Je.string(t.uri)&&Je.string(t.languageId)&&Je.integer(t.version)&&Je.string(t.text)}}(ee||(ee={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){const n=t;return n===e.PlainText||n===e.Markdown}}(te||(te={})),function(e){e.is=function(e){const t=e;return Je.objectLiteral(e)&&te.is(t.kind)&&Je.string(t.value)}}(ne||(ne={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(re||(re={})),function(e){e.PlainText=1,e.Snippet=2}(oe||(oe={})),function(e){e.Deprecated=1}(ie||(ie={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){const t=e;return t&&Je.string(t.newText)&&x.is(t.insert)&&x.is(t.replace)}}(se||(se={})),function(e){e.asIs=1,e.adjustIndentation=2}(ae||(ae={})),function(e){e.is=function(e){const t=e;return t&&(Je.string(t.detail)||void 0===t.detail)&&(Je.string(t.description)||void 0===t.description)}}(ce||(ce={})),function(e){e.create=function(e){return{label:e}}}(ue||(ue={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(le||(le={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){const t=e;return Je.string(t)||Je.objectLiteral(t)&&Je.string(t.language)&&Je.string(t.value)}}(de||(de={})),function(e){e.is=function(e){let t=e;return!!t&&Je.objectLiteral(t)&&(ne.is(t.contents)||de.is(t.contents)||Je.typedArray(t.contents,de.is))&&(void 0===e.range||x.is(e.range))}}(fe||(fe={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(he||(he={})),function(e){e.create=function(e,t,...n){let r={label:e};return Je.defined(t)&&(r.documentation=t),Je.defined(n)?r.parameters=n:r.parameters=[],r}}(pe||(pe={})),function(e){e.Text=1,e.Read=2,e.Write=3}(me||(me={})),function(e){e.create=function(e,t){let n={range:e};return Je.number(t)&&(n.kind=t),n}}(ge||(ge={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(ye||(ye={})),function(e){e.Deprecated=1}(be||(be={})),function(e){e.create=function(e,t,n,r,o){let i={name:e,kind:t,location:{uri:r,range:n}};return o&&(i.containerName=o),i}}(ve||(ve={})),function(e){e.create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}}}(_e||(_e={})),function(e){e.create=function(e,t,n,r,o,i){let s={name:e,detail:t,kind:n,range:r,selectionRange:o};return void 0!==i&&(s.children=i),s},e.is=function(e){let t=e;return t&&Je.string(t.name)&&Je.number(t.kind)&&x.is(t.range)&&x.is(t.selectionRange)&&(void 0===t.detail||Je.string(t.detail))&&(void 0===t.deprecated||Je.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(De||(De={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(Te||(Te={})),function(e){e.Invoked=1,e.Automatic=2}(ke||(ke={})),function(e){e.create=function(e,t,n){let r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},e.is=function(e){let t=e;return Je.defined(t)&&Je.typedArray(t.diagnostics,$.is)&&(void 0===t.only||Je.typedArray(t.only,Je.string))&&(void 0===t.triggerKind||t.triggerKind===ke.Invoked||t.triggerKind===ke.Automatic)}}(Re||(Re={})),function(e){e.create=function(e,t,n){let r={title:e},o=!0;return"string"==typeof t?(o=!1,r.kind=t):V.is(t)?r.command=t:r.edit=t,o&&void 0!==n&&(r.kind=n),r},e.is=function(e){let t=e;return t&&Je.string(t.title)&&(void 0===t.diagnostics||Je.typedArray(t.diagnostics,$.is))&&(void 0===t.kind||Je.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||V.is(t.command))&&(void 0===t.isPreferred||Je.boolean(t.isPreferred))&&(void 0===t.edit||G.is(t.edit))}}(Se||(Se={})),function(e){e.create=function(e,t){let n={range:e};return Je.defined(t)&&(n.data=t),n},e.is=function(e){let t=e;return Je.defined(t)&&x.is(t.range)&&(Je.undefined(t.command)||V.is(t.command))}}(Ce||(Ce={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){let t=e;return Je.defined(t)&&Je.uinteger(t.tabSize)&&Je.boolean(t.insertSpaces)}}(we||(we={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){let t=e;return Je.defined(t)&&x.is(t.range)&&(Je.undefined(t.target)||Je.string(t.target))}}(xe||(xe={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){let n=t;return Je.objectLiteral(n)&&x.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(Pe||(Pe={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"}(Oe||(Oe={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(Ae||(Ae={})),function(e){e.is=function(e){const t=e;return Je.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(Ee||(Ee={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){const t=e;return null!=t&&x.is(t.range)&&Je.string(t.text)}}(Me||(Me={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){const t=e;return null!=t&&x.is(t.range)&&Je.boolean(t.caseSensitiveLookup)&&(Je.string(t.variableName)||void 0===t.variableName)}}(Ne||(Ne={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){const t=e;return null!=t&&x.is(t.range)&&(Je.string(t.expression)||void 0===t.expression)}}(qe||(qe={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){const t=e;return Je.defined(t)&&x.is(e.stoppedLocation)}}(je||(je={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(Le||(Le={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){const t=e;return Je.objectLiteral(t)&&(void 0===t.tooltip||Je.string(t.tooltip)||ne.is(t.tooltip))&&(void 0===t.location||P.is(t.location))&&(void 0===t.command||V.is(t.command))}}(Ie||(Ie={})),function(e){e.create=function(e,t,n){const r={position:e,label:t};return void 0!==n&&(r.kind=n),r},e.is=function(e){const t=e;return Je.objectLiteral(t)&&w.is(t.position)&&(Je.string(t.label)||Je.typedArray(t.label,Ie.is))&&(void 0===t.kind||Le.is(t.kind))&&void 0===t.textEdits||Je.typedArray(t.textEdits,W.is)&&(void 0===t.tooltip||Je.string(t.tooltip)||ne.is(t.tooltip))&&(void 0===t.paddingLeft||Je.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Je.boolean(t.paddingRight))}}(Fe||(Fe={})),function(e){e.createSnippet=function(e){return{kind:"snippet",value:e}}}($e||($e={})),function(e){e.create=function(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}}(Ve||(Ve={})),function(e){e.create=function(e){return{items:e}}}(We||(We={})),function(e){e.Invoked=0,e.Automatic=1}(Ue||(Ue={})),function(e){e.create=function(e,t){return{range:e,text:t}}}(He||(He={})),function(e){e.create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}}}(Be||(Be={})),function(e){e.is=function(e){const t=e;return Je.objectLiteral(t)&&R.is(t.uri)&&Je.string(t.name)}}(ze||(ze={})),function(e){function t(e,n){if(e.length<=1)return e;const r=e.length/2|0,o=e.slice(0,r),i=e.slice(r);t(o,n),t(i,n);let s=0,a=0,c=0;for(;s<o.length&&a<i.length;){let t=n(o[s],i[a]);e[c++]=t<=0?o[s++]:i[a++]}for(;s<o.length;)e[c++]=o[s++];for(;a<i.length;)e[c++]=i[a++];return e}e.create=function(e,t,n,r){return new ct(e,t,n,r)},e.is=function(e){let t=e;return!!(Je.defined(t)&&Je.string(t.uri)&&(Je.undefined(t.languageId)||Je.string(t.languageId))&&Je.uinteger(t.lineCount)&&Je.func(t.getText)&&Je.func(t.positionAt)&&Je.func(t.offsetAt))},e.applyEdits=function(e,n){let r=e.getText(),o=t(n,((e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),i=r.length;for(let t=o.length-1;t>=0;t--){let n=o[t],s=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end);if(!(a<=i))throw new Error("Overlapping edit");r=r.substring(0,s)+n.newText+r.substring(a,r.length),i=s}return r}}(Ke||(Ke={}));class ct{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,n=!0;for(let r=0;r<t.length;r++){n&&(e.push(r),n=!1);let o=t.charAt(r);n="\r"===o||"\n"===o,"\r"===o&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return w.create(0,e);for(;n<r;){let o=Math.floor((n+r)/2);t[o]>e?r=o:n=o+1}let o=n-1;return w.create(o,e-t[o])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}}!function(e){const t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.numberRange=function(e,n,r){return"[object Number]"===t.call(e)&&n<=e&&e<=r},e.integer=function(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(Je||(Je={}));class ut{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){for(const t of e)if(ut.isIncremental(t)){const e=ht(t.range),n=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,n)+t.text+this._content.substring(r,this._content.length);const o=Math.max(e.start.line,0),i=Math.max(e.end.line,0);let s=this._lineOffsets;const a=dt(t.text,!1,n);if(i-o===a.length)for(let e=0,t=a.length;e<t;e++)s[e+o+1]=a[e];else a.length<1e4?s.splice(o+1,i-o,...a):this._lineOffsets=s=s.slice(0,o+1).concat(a,s.slice(i+1));const c=t.text.length-(r-n);if(0!==c)for(let e=o+1+a.length,t=s.length;e<t;e++)s[e]=s[e]+c}else{if(!ut.isFull(t))throw new Error("Unknown change event received");this._content=t.text,this._lineOffsets=void 0}this._version=t}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=dt(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);const t=this.getLineOffsets();let n=0,r=t.length;if(0===r)return{line:0,character:e};for(;n<r;){const o=Math.floor((n+r)/2);t[o]>e?r=o:n=o+1}const o=n-1;return{line:o,character:(e=this.ensureBeforeEOL(e,t[o]))-t[o]}}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const n=t[e.line];if(e.character<=0)return n;const r=e.line+1<t.length?t[e.line+1]:this._content.length,o=Math.min(n+e.character,r);return this.ensureBeforeEOL(o,n)}ensureBeforeEOL(e,t){for(;e>t&&ft(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}function lt(e,t){if(e.length<=1)return e;const n=e.length/2|0,r=e.slice(0,n),o=e.slice(n);lt(r,t),lt(o,t);let i=0,s=0,a=0;for(;i<r.length&&s<o.length;){const n=t(r[i],o[s]);e[a++]=n<=0?r[i++]:o[s++]}for(;i<r.length;)e[a++]=r[i++];for(;s<o.length;)e[a++]=o[s++];return e}function dt(e,t,n=0){const r=t?[n]:[];for(let t=0;t<e.length;t++){const o=e.charCodeAt(t);ft(o)&&(13===o&&t+1<e.length&&10===e.charCodeAt(t+1)&&t++,r.push(n+t+1))}return r}function ft(e){return 13===e||10===e}function ht(e){const t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function pt(e){const t=ht(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,n,r){return new ut(e,t,n,r)},e.update=function(e,t,n){if(e instanceof ut)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){const n=e.getText(),r=lt(t.map(pt),((e,t)=>{const n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}));let o=0;const i=[];for(const t of r){const r=e.offsetAt(t.range.start);if(r<o)throw new Error("Overlapping edit");r>o&&i.push(n.substring(o,r)),t.newText.length&&i.push(t.newText),o=e.offsetAt(t.range.end)}return i.push(n.substr(o)),i.join("")}}(Xe||(Xe={})),function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.Deprecated=2]="Deprecated",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidCharacter=262]="InvalidCharacter",e[e.PropertyExpected=513]="PropertyExpected",e[e.CommaExpected=514]="CommaExpected",e[e.ColonExpected=515]="ColonExpected",e[e.ValueExpected=516]="ValueExpected",e[e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",e[e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",e[e.TrailingComma=519]="TrailingComma",e[e.DuplicateKey=520]="DuplicateKey",e[e.CommentNotPermitted=521]="CommentNotPermitted",e[e.PropertyKeysMustBeDoublequoted=528]="PropertyKeysMustBeDoublequoted",e[e.SchemaResolveError=768]="SchemaResolveError",e[e.SchemaUnsupportedFeature=769]="SchemaUnsupportedFeature"}(Ge||(Ge={})),function(e){e[e.v3=3]="v3",e[e.v4=4]="v4",e[e.v6=6]="v6",e[e.v7=7]="v7",e[e.v2019_09=19]="v2019_09",e[e.v2020_12=20]="v2020_12"}(Ze||(Ze={})),function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[te.Markdown,te.PlainText],commitCharactersSupport:!0,labelDetailsSupport:!0}}}}}(Qe||(Qe={}));var mt=n(3608);const gt={"color-hex":{errorMessage:mt.t("Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:mt.t("String is not a RFC3339 date-time."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:mt.t("String is not a RFC3339 date."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:mt.t("String is not a RFC3339 time."),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:mt.t("String is not an e-mail address."),pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}))$/},hostname:{errorMessage:mt.t("String is not a hostname."),pattern:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i},ipv4:{errorMessage:mt.t("String is not an IPv4 address."),pattern:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/},ipv6:{errorMessage:mt.t("String is not an IPv6 address."),pattern:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i}};class yt{constructor(e,t,n=0){this.offset=t,this.length=n,this.parent=e}get children(){return[]}toString(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")}}class bt extends yt{constructor(e,t){super(e,t),this.type="null",this.value=null}}class vt extends yt{constructor(e,t,n){super(e,n),this.type="boolean",this.value=t}}class _t extends yt{constructor(e,t){super(e,t),this.type="array",this.items=[]}get children(){return this.items}}class Dt extends yt{constructor(e,t){super(e,t),this.type="number",this.isInteger=!0,this.value=Number.NaN}}class Tt extends yt{constructor(e,t,n){super(e,t,n),this.type="string",this.value=""}}class kt extends yt{constructor(e,t,n){super(e,t),this.type="property",this.colonOffset=-1,this.keyNode=n}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}}class Rt extends yt{constructor(e,t){super(e,t),this.type="object",this.properties=[]}get children(){return this.properties}}function St(e){return nt(e)?e?{}:{not:{}}:e}var Ct;!function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"}(Ct||(Ct={}));const wt={"http://json-schema.org/draft-03/schema#":Ze.v3,"http://json-schema.org/draft-04/schema#":Ze.v4,"http://json-schema.org/draft-06/schema#":Ze.v6,"http://json-schema.org/draft-07/schema#":Ze.v7,"https://json-schema.org/draft/2019-09/schema":Ze.v2019_09,"https://json-schema.org/draft/2020-12/schema":Ze.v2020_12};class xt{constructor(e){this.schemaDraft=e}}class Pt{constructor(e=-1,t){this.focusOffset=e,this.exclude=t,this.schemas=[]}add(e){this.schemas.push(e)}merge(e){Array.prototype.push.apply(this.schemas,e.schemas)}include(e){return(-1===this.focusOffset||Nt(e,this.focusOffset))&&e!==this.exclude}newSub(){return new Pt(-1,this.exclude)}}class Ot{constructor(){}get schemas(){return[]}add(e){}merge(e){}include(e){return!0}newSub(){return this}}Ot.instance=new Ot;class At{constructor(){this.problems=[],this.propertiesMatches=0,this.processedProperties=new Set,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}hasProblems(){return!!this.problems.length}merge(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches+=e.propertiesMatches,this.propertiesValueMatches+=e.propertiesValueMatches,this.mergeProcessedProperties(e)}mergeEnumValues(e){if(!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues){this.enumValues=this.enumValues.concat(e.enumValues);for(const e of this.problems)e.code===Ge.EnumValueMismatch&&(e.message=mt.t("Value is not accepted. Valid values: {0}.",this.enumValues.map((e=>JSON.stringify(e))).join(", ")))}}mergePropertyMatch(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&1===e.enumValues.length&&this.primaryValueMatches++}mergeProcessedProperties(e){e.processedProperties.forEach((e=>this.processedProperties.add(e)))}compare(e){const t=this.hasProblems();return t!==e.hasProblems()?t?-1:1:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:this.propertiesMatches-e.propertiesMatches}}function Et(e){return D(e)}function Mt(e){return _(e)}function Nt(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}class qt{constructor(e,t=[],n=[]){this.root=e,this.syntaxErrors=t,this.comments=n}getNodeFromOffset(e,t=!1){if(this.root)return v(this.root,e,t)}visit(e){if(this.root){const t=n=>{let r=e(n);const o=n.children;if(Array.isArray(o))for(let e=0;e<o.length&&r;e++)r=t(o[e]);return r};t(this.root)}}validate(e,t,n=L.Warning,r){if(this.root&&t){const o=new At;return Lt(this.root,t,o,Ot.instance,new xt(r??jt(t))),o.problems.map((t=>{const r=x.create(e.positionAt(t.location.offset),e.positionAt(t.location.offset+t.location.length));return $.create(r,t.message,t.severity??n,t.code)}))}}getMatchingSchemas(e,t=-1,n){if(this.root&&e){const r=new Pt(t,n),o=jt(e),i=new xt(o);return Lt(this.root,e,new At,r,i),r.schemas}return[]}}function jt(e,t=Ze.v2020_12){let n=e.$schema;return n?wt[n]??t:t}function Lt(e,t,n,r,o){if(!e||!r.include(e))return;if("property"===e.type)return Lt(e.valueNode,t,n,r,o);const i=e;switch(function(){function e(e){return i.type===e||"integer"===e&&"number"===i.type&&i.isInteger}if(Array.isArray(t.type)?t.type.some(e)||n.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||mt.t("Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&(e(t.type)||n.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||mt.t('Incorrect type. Expected "{0}".',t.type)})),Array.isArray(t.allOf))for(const e of t.allOf){const t=new At,s=r.newSub();Lt(i,St(e),t,s,o),n.merge(t),r.merge(s)}const s=St(t.not);if(s){const e=new At,a=r.newSub();Lt(i,s,e,a,o),e.hasProblems()||n.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||mt.t("Matches a schema that is not allowed.")});for(const e of a.schemas)e.inverted=!e.inverted,r.add(e)}const a=(e,t)=>{const s=[];let a;for(const n of e){const e=St(n),c=new At,u=r.newSub();if(Lt(i,e,c,u,o),c.hasProblems()||s.push(e),a)if(t||c.hasProblems()||a.validationResult.hasProblems()){const t=c.compare(a.validationResult);t>0?a={schema:e,validationResult:c,matchingSchemas:u}:0===t&&(a.matchingSchemas.merge(u),a.validationResult.mergeEnumValues(c))}else a.matchingSchemas.merge(u),a.validationResult.propertiesMatches+=c.propertiesMatches,a.validationResult.propertiesValueMatches+=c.propertiesValueMatches,a.validationResult.mergeProcessedProperties(c);else a={schema:e,validationResult:c,matchingSchemas:u}}return s.length>1&&t&&n.problems.push({location:{offset:i.offset,length:1},message:mt.t("Matches multiple schemas when only one must validate.")}),a&&(n.merge(a.validationResult),r.merge(a.matchingSchemas)),s.length};Array.isArray(t.anyOf)&&a(t.anyOf,!1),Array.isArray(t.oneOf)&&a(t.oneOf,!0);const c=e=>{const t=new At,s=r.newSub();Lt(i,St(e),t,s,o),n.merge(t),r.merge(s)},u=St(t.if);if(u&&((e,t,s)=>{const a=St(e),u=new At,l=r.newSub();Lt(i,a,u,l,o),r.merge(l),n.mergeProcessedProperties(u),u.hasProblems()?s&&c(s):t&&c(t)})(u,St(t.then),St(t.else)),Array.isArray(t.enum)){const e=Et(i);let r=!1;for(const n of t.enum)if(Ye(e,n)){r=!0;break}n.enumValues=t.enum,n.enumValueMatch=r,r||n.problems.push({location:{offset:i.offset,length:i.length},code:Ge.EnumValueMismatch,message:t.errorMessage||mt.t("Value is not accepted. Valid values: {0}.",t.enum.map((e=>JSON.stringify(e))).join(", "))})}tt(t.const)&&(Ye(Et(i),t.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:i.offset,length:i.length},code:Ge.EnumValueMismatch,message:t.errorMessage||mt.t("Value must be {0}.",JSON.stringify(t.const))}),n.enumValueMatch=!1),n.enumValues=[t.const]);let l=t.deprecationMessage;if(l||t.deprecated){l=l||mt.t("Value is deprecated");let e="property"===i.parent?.type?i.parent:i;n.problems.push({location:{offset:e.offset,length:e.length},severity:L.Warning,message:l,code:Ge.Deprecated})}}(),i.type){case"object":!function(e){const i=Object.create(null),s=new Set;for(const t of e.properties){const e=t.keyNode.value;i[e]=t.valueNode,s.add(e)}if(Array.isArray(t.required))for(const r of t.required)if(!i[r]){const t=e.parent&&"property"===e.parent.type&&e.parent.keyNode,o=t?{offset:t.offset,length:t.length}:{offset:e.offset,length:1};n.problems.push({location:o,message:mt.t('Missing property "{0}".',r)})}const a=e=>{s.delete(e),n.processedProperties.add(e)};if(t.properties)for(const e of Object.keys(t.properties)){a(e);const s=t.properties[e],c=i[e];if(c)if(nt(s))if(s)n.propertiesMatches++,n.propertiesValueMatches++;else{const r=c.parent;n.problems.push({location:{offset:r.keyNode.offset,length:r.keyNode.length},message:t.errorMessage||mt.t("Property {0} is not allowed.",e)})}else{const e=new At;Lt(c,s,e,r,o),n.mergePropertyMatch(e)}}if(t.patternProperties)for(const e of Object.keys(t.patternProperties)){const c=st(e);if(c){const u=[];for(const a of s)if(c.test(a)){u.push(a);const s=i[a];if(s){const i=t.patternProperties[e];if(nt(i))if(i)n.propertiesMatches++,n.propertiesValueMatches++;else{const e=s.parent;n.problems.push({location:{offset:e.keyNode.offset,length:e.keyNode.length},message:t.errorMessage||mt.t("Property {0} is not allowed.",a)})}else{const e=new At;Lt(s,i,e,r,o),n.mergePropertyMatch(e)}}}u.forEach(a)}}const c=t.additionalProperties;if(void 0!==c)for(const e of s){a(e);const s=i[e];if(s)if(!1===c){const r=s.parent;n.problems.push({location:{offset:r.keyNode.offset,length:r.keyNode.length},message:t.errorMessage||mt.t("Property {0} is not allowed.",e)})}else if(!0!==c){const e=new At;Lt(s,c,e,r,o),n.mergePropertyMatch(e)}}const u=t.unevaluatedProperties;if(void 0!==u){const e=[];for(const a of s)if(!n.processedProperties.has(a)){e.push(a);const s=i[a];if(s)if(!1===u){const e=s.parent;n.problems.push({location:{offset:e.keyNode.offset,length:e.keyNode.length},message:t.errorMessage||mt.t("Property {0} is not allowed.",a)})}else if(!0!==u){const e=new At;Lt(s,u,e,r,o),n.mergePropertyMatch(e)}}e.forEach(a)}if(et(t.maxProperties)&&e.properties.length>t.maxProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:mt.t("Object has more properties than limit of {0}.",t.maxProperties)}),et(t.minProperties)&&e.properties.length<t.minProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:mt.t("Object has fewer properties than the required number of {0}",t.minProperties)}),t.dependentRequired)for(const e in t.dependentRequired){const n=i[e],r=t.dependentRequired[e];n&&Array.isArray(r)&&d(e,r)}if(t.dependentSchemas)for(const e in t.dependentSchemas){const n=i[e],r=t.dependentSchemas[e];n&&ot(r)&&d(e,r)}if(t.dependencies)for(const e in t.dependencies)i[e]&&d(e,t.dependencies[e]);const l=St(t.propertyNames);if(l)for(const t of e.properties){const e=t.keyNode;e&&Lt(e,l,n,Ot.instance,o)}function d(t,s){if(Array.isArray(s))for(const r of s)i[r]?n.propertiesValueMatches++:n.problems.push({location:{offset:e.offset,length:e.length},message:mt.t("Object is missing property {0} required by property {1}.",r,t)});else{const t=St(s);if(t){const i=new At;Lt(e,t,i,r,o),n.mergePropertyMatch(i)}}}}(i);break;case"array":!function(e){let i,s;o.schemaDraft>=Ze.v2020_12?(i=t.prefixItems,s=Array.isArray(t.items)?void 0:t.items):(i=Array.isArray(t.items)?t.items:void 0,s=Array.isArray(t.items)?t.additionalItems:t.items);let a=0;if(void 0!==i){const l=Math.min(i.length,e.items.length);for(;a<l;a++){const d=St(i[a]),f=new At,h=e.items[a];h&&(Lt(h,d,f,r,o),n.mergePropertyMatch(f)),n.processedProperties.add(String(a))}}if(void 0!==s&&a<e.items.length)if("boolean"==typeof s)for(!1===s&&n.problems.push({location:{offset:e.offset,length:e.length},message:mt.t("Array has too many items according to schema. Expected {0} or fewer.",a)});a<e.items.length;a++)n.processedProperties.add(String(a)),n.propertiesValueMatches++;else for(;a<e.items.length;a++){const p=new At;Lt(e.items[a],s,p,r,o),n.mergePropertyMatch(p),n.processedProperties.add(String(a))}const c=St(t.contains);if(c){let m=0;for(let g=0;g<e.items.length;g++){const y=e.items[g],b=new At;Lt(y,c,b,Ot.instance,o),b.hasProblems()||(m++,o.schemaDraft>=Ze.v2020_12&&n.processedProperties.add(String(g)))}0!==m||et(t.minContains)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||mt.t("Array does not contain required item.")}),et(t.minContains)&&m<t.minContains&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||mt.t("Array has too few items that match the contains contraint. Expected {0} or more.",t.minContains)}),et(t.maxContains)&&m>t.maxContains&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||mt.t("Array has too many items that match the contains contraint. Expected {0} or less.",t.maxContains)})}const u=t.unevaluatedItems;if(void 0!==u)for(let v=0;v<e.items.length;v++){if(!n.processedProperties.has(String(v)))if(!1===u)n.problems.push({location:{offset:e.offset,length:e.length},message:mt.t("Item does not match any validation rule from the array.")});else{const _=new At;Lt(e.items[v],t.unevaluatedItems,_,r,o),n.mergePropertyMatch(_)}n.processedProperties.add(String(v)),n.propertiesValueMatches++}if(et(t.minItems)&&e.items.length<t.minItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:mt.t("Array has too few items. Expected {0} or more.",t.minItems)}),et(t.maxItems)&&e.items.length>t.maxItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:mt.t("Array has too many items. Expected {0} or fewer.",t.maxItems)}),!0===t.uniqueItems){const D=Et(e);function T(){for(let e=0;e<D.length-1;e++){const t=D[e];for(let n=e+1;n<D.length;n++)if(Ye(t,D[n]))return!0}return!1}T()&&n.problems.push({location:{offset:e.offset,length:e.length},message:mt.t("Array has duplicate items.")})}}(i);break;case"string":!function(e){if(et(t.minLength)&&at(e.value)<t.minLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:mt.t("String is shorter than the minimum length of {0}.",t.minLength)}),et(t.maxLength)&&at(e.value)>t.maxLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:mt.t("String is longer than the maximum length of {0}.",t.maxLength)}),rt(t.pattern)){const r=st(t.pattern);r?.test(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||mt.t('String does not match the pattern of "{0}".',t.pattern)})}if(t.format)switch(t.format){case"uri":case"uri-reference":{let r;if(e.value){const n=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(e.value);n?n[2]||"uri"!==t.format||(r=mt.t("URI with a scheme is expected.")):r=mt.t("URI is expected.")}else r=mt.t("URI expected.");r&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||mt.t("String is not a URI: {0}",r)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"hostname":case"ipv4":case"ipv6":const r=gt[t.format];e.value&&r.pattern.exec(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||r.errorMessage})}}(i);break;case"number":!function(e){const r=e.value;function o(e){const t=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(e.toString());return t&&{value:Number(t[1]+(t[2]||"")),multiplier:(t[2]?.length||0)-(parseInt(t[3])||0)}}if(et(t.multipleOf)){let i=-1;if(Number.isInteger(t.multipleOf))i=r%t.multipleOf;else{let e=o(t.multipleOf),n=o(r);if(e&&n){const t=10**Math.abs(n.multiplier-e.multiplier);n.multiplier<e.multiplier?n.value*=t:e.value*=t,i=n.value%e.value}}0!==i&&n.problems.push({location:{offset:e.offset,length:e.length},message:mt.t("Value is not divisible by {0}.",t.multipleOf)})}function i(e,t){return et(t)?t:nt(t)&&t?e:void 0}function s(e,t){if(!nt(t)||!t)return e}const a=i(t.minimum,t.exclusiveMinimum);et(a)&&r<=a&&n.problems.push({location:{offset:e.offset,length:e.length},message:mt.t("Value is below the exclusive minimum of {0}.",a)});const c=i(t.maximum,t.exclusiveMaximum);et(c)&&r>=c&&n.problems.push({location:{offset:e.offset,length:e.length},message:mt.t("Value is above the exclusive maximum of {0}.",c)});const u=s(t.minimum,t.exclusiveMinimum);et(u)&&r<u&&n.problems.push({location:{offset:e.offset,length:e.length},message:mt.t("Value is below the minimum of {0}.",u)});const l=s(t.maximum,t.exclusiveMaximum);et(l)&&r>l&&n.problems.push({location:{offset:e.offset,length:e.length},message:mt.t("Value is above the maximum of {0}.",l)})}(i)}r.add({node:i,schema:t})}function It(e,t,n){if(null!==e&&"object"==typeof e){const r=t+"\t";if(Array.isArray(e)){if(0===e.length)return"[]";let o="[\n";for(let t=0;t<e.length;t++)o+=r+It(e[t],r,n),t<e.length-1&&(o+=","),o+="\n";return o+=t+"]",o}{const o=Object.keys(e);if(0===o.length)return"{}";let i="{\n";for(let t=0;t<o.length;t++){const s=o[t];i+=r+JSON.stringify(s)+": "+It(e[s],r,n),t<o.length-1&&(i+=","),i+="\n"}return i+=t+"}",i}}return n(e)}class Ft{constructor(e,t=[],n=Promise,r={}){this.schemaService=e,this.contributions=t,this.promiseConstructor=n,this.clientCapabilities=r}doResolve(e){for(let t=this.contributions.length-1;t>=0;t--){const n=this.contributions[t].resolveCompletion;if(n){const t=n(e);if(t)return t}}return this.promiseConstructor.resolve(e)}doComplete(e,t,n){const r={items:[],isIncomplete:!1},o=e.getText(),i=e.offsetAt(t);let s=n.getNodeFromOffset(i,!0);if(this.isInComment(e,s?s.offset:0,i))return Promise.resolve(r);if(s&&i===s.offset+s.length&&i>0){const e=o[i-1];("object"===s.type&&"}"===e||"array"===s.type&&"]"===e)&&(s=s.parent)}const a=this.getCurrentWord(e,i);let c;if(!s||"string"!==s.type&&"number"!==s.type&&"boolean"!==s.type&&"null"!==s.type){let n=i-a.length;n>0&&'"'===o[n-1]&&n--,c=x.create(e.positionAt(n),t)}else c=x.create(e.positionAt(s.offset),e.positionAt(s.offset+s.length));const u=new Map,l={add:e=>{let t=e.label;const n=u.get(t);if(n)n.documentation||(n.documentation=e.documentation),n.detail||(n.detail=e.detail),n.labelDetails||(n.labelDetails=e.labelDetails);else{if(t=t.replace(/[\n]/g,"↵"),t.length>60){const e=t.substr(0,57).trim()+"...";u.has(e)||(t=e)}e.textEdit=W.replace(c,e.insertText),e.label=t,u.set(t,e),r.items.push(e)}},setAsIncomplete:()=>{r.isIncomplete=!0},error:e=>{console.error(e)},getNumberOfProposals:()=>r.items.length};return this.schemaService.getSchemaForResource(e.uri,n).then((t=>{const d=[];let f,h=!0,p="";if(s&&"string"===s.type){const e=s.parent;e&&"property"===e.type&&e.keyNode===s&&(h=!e.valueNode,f=e,p=o.substr(s.offset+1,s.length-2),e&&(s=e.parent))}if(s&&"object"===s.type){if(s.offset===i)return r;s.properties.forEach((e=>{f&&f===e||u.set(e.keyNode.value,ue.create("__"))}));let m="";h&&(m=this.evaluateSeparatorAfter(e,e.offsetAt(c.end))),t?this.getPropertyCompletions(t,n,s,h,m,l):this.getSchemaLessPropertyCompletions(n,s,p,l);const g=Mt(s);this.contributions.forEach((t=>{const n=t.collectPropertyCompletions(e.uri,g,a,h,""===m,l);n&&d.push(n)})),!t&&a.length>0&&'"'!==o.charAt(i-a.length-1)&&(l.add({kind:re.Property,label:this.getLabelForValue(a),insertText:this.getInsertTextForProperty(a,void 0,!1,m),insertTextFormat:oe.Snippet,documentation:""}),l.setAsIncomplete())}const m={};return t?this.getValueCompletions(t,n,s,i,e,l,m):this.getSchemaLessValueCompletions(n,s,i,e,l),this.contributions.length>0&&this.getContributedValueCompletions(n,s,i,e,l,d),this.promiseConstructor.all(d).then((()=>{if(0===l.getNumberOfProposals()){let t=i;!s||"string"!==s.type&&"number"!==s.type&&"boolean"!==s.type&&"null"!==s.type||(t=s.offset+s.length);const n=this.evaluateSeparatorAfter(e,t);this.addFillerValueCompletions(m,n,l)}return r}))}))}getPropertyCompletions(e,t,n,r,o,i){t.getMatchingSchemas(e.schema,n.offset).forEach((e=>{if(e.node===n&&!e.inverted){const t=e.schema.properties;t&&Object.keys(t).forEach((e=>{const n=t[e];if("object"==typeof n&&!n.deprecationMessage&&!n.doNotSuggest){const t={kind:re.Property,label:e,insertText:this.getInsertTextForProperty(e,n,r,o),insertTextFormat:oe.Snippet,filterText:this.getFilterTextForValue(e),documentation:this.fromMarkup(n.markdownDescription)||n.description||""};void 0!==n.suggestSortText&&(t.sortText=n.suggestSortText),t.insertText&&it(t.insertText,`$1${o}`)&&(t.command={title:"Suggest",command:"editor.action.triggerSuggest"}),i.add(t)}}));const n=e.schema.propertyNames;if("object"==typeof n&&!n.deprecationMessage&&!n.doNotSuggest){const e=(e,t=void 0)=>{const s={kind:re.Property,label:e,insertText:this.getInsertTextForProperty(e,void 0,r,o),insertTextFormat:oe.Snippet,filterText:this.getFilterTextForValue(e),documentation:t||this.fromMarkup(n.markdownDescription)||n.description||""};void 0!==n.suggestSortText&&(s.sortText=n.suggestSortText),s.insertText&&it(s.insertText,`$1${o}`)&&(s.command={title:"Suggest",command:"editor.action.triggerSuggest"}),i.add(s)};if(n.enum)for(let t=0;t<n.enum.length;t++){let r;n.markdownEnumDescriptions&&t<n.markdownEnumDescriptions.length?r=this.fromMarkup(n.markdownEnumDescriptions[t]):n.enumDescriptions&&t<n.enumDescriptions.length&&(r=n.enumDescriptions[t]),e(n.enum[t],r)}n.const&&e(n.const)}}}))}getSchemaLessPropertyCompletions(e,t,n,r){const o=e=>{e.properties.forEach((e=>{const t=e.keyNode.value;r.add({kind:re.Property,label:t,insertText:this.getInsertTextForValue(t,""),insertTextFormat:oe.Snippet,filterText:this.getFilterTextForValue(t),documentation:""})}))};if(t.parent)if("property"===t.parent.type){const n=t.parent.keyNode.value;e.visit((e=>("property"===e.type&&e!==t.parent&&e.keyNode.value===n&&e.valueNode&&"object"===e.valueNode.type&&o(e.valueNode),!0)))}else"array"===t.parent.type&&t.parent.items.forEach((e=>{"object"===e.type&&e!==t&&o(e)}));else"object"===t.type&&r.add({kind:re.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:oe.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})}getSchemaLessValueCompletions(e,t,n,r,o){let i=n;if(!t||"string"!==t.type&&"number"!==t.type&&"boolean"!==t.type&&"null"!==t.type||(i=t.offset+t.length,t=t.parent),!t)return o.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:oe.Snippet,documentation:""}),void o.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:oe.Snippet,documentation:""});const s=this.evaluateSeparatorAfter(r,i),a=e=>{e.parent&&!Nt(e.parent,n,!0)&&o.add({kind:this.getSuggestionKind(e.type),label:this.getLabelTextForMatchingNode(e,r),insertText:this.getInsertTextForMatchingNode(e,r,s),insertTextFormat:oe.Snippet,documentation:""}),"boolean"===e.type&&this.addBooleanValueCompletion(!e.value,s,o)};if("property"===t.type&&n>(t.colonOffset||0)){const r=t.valueNode;if(r&&(n>r.offset+r.length||"object"===r.type||"array"===r.type))return;const i=t.keyNode.value;e.visit((e=>("property"===e.type&&e.keyNode.value===i&&e.valueNode&&a(e.valueNode),!0))),"$schema"===i&&t.parent&&!t.parent.parent&&this.addDollarSchemaCompletions(s,o)}if("array"===t.type)if(t.parent&&"property"===t.parent.type){const n=t.parent.keyNode.value;e.visit((e=>("property"===e.type&&e.keyNode.value===n&&e.valueNode&&"array"===e.valueNode.type&&e.valueNode.items.forEach(a),!0)))}else t.items.forEach(a)}getValueCompletions(e,t,n,r,o,i,s){let a,c,u=r;if(!n||"string"!==n.type&&"number"!==n.type&&"boolean"!==n.type&&"null"!==n.type||(u=n.offset+n.length,c=n,n=n.parent),n){if("property"===n.type&&r>(n.colonOffset||0)){const e=n.valueNode;if(e&&r>e.offset+e.length)return;a=n.keyNode.value,n=n.parent}if(n&&(void 0!==a||"array"===n.type)){const l=this.evaluateSeparatorAfter(o,u),d=t.getMatchingSchemas(e.schema,n.offset,c);for(const e of d)if(e.node===n&&!e.inverted&&e.schema){if("array"===n.type&&e.schema.items){let t=i;if(e.schema.uniqueItems){const e=new Set;n.children.forEach((t=>{"array"!==t.type&&"object"!==t.type&&e.add(this.getLabelForValue(Et(t)))})),t={...i,add(t){e.has(t.label)||i.add(t)}}}if(Array.isArray(e.schema.items)){const i=this.findItemAtOffset(n,o,r);i<e.schema.items.length&&this.addSchemaValueCompletions(e.schema.items[i],l,t,s)}else this.addSchemaValueCompletions(e.schema.items,l,t,s)}if(void 0!==a){let t=!1;if(e.schema.properties){const n=e.schema.properties[a];n&&(t=!0,this.addSchemaValueCompletions(n,l,i,s))}if(e.schema.patternProperties&&!t)for(const n of Object.keys(e.schema.patternProperties)){const r=st(n);if(r?.test(a)){t=!0;const r=e.schema.patternProperties[n];this.addSchemaValueCompletions(r,l,i,s)}}if(e.schema.additionalProperties&&!t){const t=e.schema.additionalProperties;this.addSchemaValueCompletions(t,l,i,s)}}}"$schema"!==a||n.parent||this.addDollarSchemaCompletions(l,i),s.boolean&&(this.addBooleanValueCompletion(!0,l,i),this.addBooleanValueCompletion(!1,l,i)),s.null&&this.addNullValueCompletion(l,i)}}else this.addSchemaValueCompletions(e.schema,"",i,s)}getContributedValueCompletions(e,t,n,r,o,i){if(t){if("string"!==t.type&&"number"!==t.type&&"boolean"!==t.type&&"null"!==t.type||(t=t.parent),t&&"property"===t.type&&n>(t.colonOffset||0)){const e=t.keyNode.value,s=t.valueNode;if((!s||n<=s.offset+s.length)&&t.parent){const n=Mt(t.parent);this.contributions.forEach((t=>{const s=t.collectValueCompletions(r.uri,n,e,o);s&&i.push(s)}))}}}else this.contributions.forEach((e=>{const t=e.collectDefaultCompletions(r.uri,o);t&&i.push(t)}))}addSchemaValueCompletions(e,t,n,r){"object"==typeof e&&(this.addEnumValueCompletions(e,t,n),this.addDefaultValueCompletions(e,t,n),this.collectTypes(e,r),Array.isArray(e.allOf)&&e.allOf.forEach((e=>this.addSchemaValueCompletions(e,t,n,r))),Array.isArray(e.anyOf)&&e.anyOf.forEach((e=>this.addSchemaValueCompletions(e,t,n,r))),Array.isArray(e.oneOf)&&e.oneOf.forEach((e=>this.addSchemaValueCompletions(e,t,n,r))))}addDefaultValueCompletions(e,t,n,r=0){let o=!1;if(tt(e.default)){let i=e.type,s=e.default;for(let e=r;e>0;e--)s=[s],i="array";const a={kind:this.getSuggestionKind(i),label:this.getLabelForValue(s),insertText:this.getInsertTextForValue(s,t),insertTextFormat:oe.Snippet};this.doesSupportsLabelDetails()?a.labelDetails={description:mt.t("Default value")}:a.detail=mt.t("Default value"),n.add(a),o=!0}Array.isArray(e.examples)&&e.examples.forEach((i=>{let s=e.type,a=i;for(let e=r;e>0;e--)a=[a],s="array";n.add({kind:this.getSuggestionKind(s),label:this.getLabelForValue(a),insertText:this.getInsertTextForValue(a,t),insertTextFormat:oe.Snippet}),o=!0})),Array.isArray(e.defaultSnippets)&&e.defaultSnippets.forEach((i=>{let s,a,c=e.type,u=i.body,l=i.label;if(tt(u)){let n=e.type;for(let e=r;e>0;e--)u=[u],n="array";s=this.getInsertTextForSnippetValue(u,t),a=this.getFilterTextForSnippetValue(u),l=l||this.getLabelForSnippetValue(u)}else{if("string"!=typeof i.bodyText)return;{let e="",n="",o="";for(let t=r;t>0;t--)e=e+o+"[\n",n=n+"\n"+o+"]",o+="\t",c="array";s=e+o+i.bodyText.split("\n").join("\n"+o)+n+t,l=l||s,a=s.replace(/[\n]/g,"")}}n.add({kind:this.getSuggestionKind(c),label:l,documentation:this.fromMarkup(i.markdownDescription)||i.description,insertText:s,insertTextFormat:oe.Snippet,filterText:a}),o=!0})),!o&&"object"==typeof e.items&&!Array.isArray(e.items)&&r<5&&this.addDefaultValueCompletions(e.items,t,n,r+1)}addEnumValueCompletions(e,t,n){if(tt(e.const)&&n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,t),insertTextFormat:oe.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(let r=0,o=e.enum.length;r<o;r++){const o=e.enum[r];let i=this.fromMarkup(e.markdownDescription)||e.description;e.markdownEnumDescriptions&&r<e.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?i=this.fromMarkup(e.markdownEnumDescriptions[r]):e.enumDescriptions&&r<e.enumDescriptions.length&&(i=e.enumDescriptions[r]),n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(o),insertText:this.getInsertTextForValue(o,t),insertTextFormat:oe.Snippet,documentation:i})}}collectTypes(e,t){if(Array.isArray(e.enum)||tt(e.const))return;const n=e.type;Array.isArray(n)?n.forEach((e=>t[e]=!0)):n&&(t[n]=!0)}addFillerValueCompletions(e,t,n){e.object&&n.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},t),insertTextFormat:oe.Snippet,detail:mt.t("New object"),documentation:""}),e.array&&n.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],t),insertTextFormat:oe.Snippet,detail:mt.t("New array"),documentation:""})}addBooleanValueCompletion(e,t,n){n.add({kind:this.getSuggestionKind("boolean"),label:e?"true":"false",insertText:this.getInsertTextForValue(e,t),insertTextFormat:oe.Snippet,documentation:""})}addNullValueCompletion(e,t){t.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:oe.Snippet,documentation:""})}addDollarSchemaCompletions(e,t){this.schemaService.getRegisteredSchemaIds((e=>"http"===e||"https"===e)).forEach((n=>{n.startsWith("http://json-schema.org/draft-")&&(n+="#"),t.add({kind:re.Module,label:this.getLabelForValue(n),filterText:this.getFilterTextForValue(n),insertText:this.getInsertTextForValue(n,e),insertTextFormat:oe.Snippet,documentation:""})}))}getLabelForValue(e){return JSON.stringify(e)}getValueFromLabel(e){return JSON.parse(e)}getFilterTextForValue(e){return JSON.stringify(e)}getFilterTextForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getLabelForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getInsertTextForPlainText(e){return e.replace(/[\\\$\}]/g,"\\$&")}getInsertTextForValue(e,t){const n=JSON.stringify(e,null,"\t");return"{}"===n?"{$1}"+t:"[]"===n?"[$1]"+t:this.getInsertTextForPlainText(n+t)}getInsertTextForSnippetValue(e,t){return It(e,"",(e=>"string"==typeof e&&"^"===e[0]?e.substr(1):JSON.stringify(e)))+t}getInsertTextForGuessedValue(e,t){switch(typeof e){case"object":return null===e?"${1:null}"+t:this.getInsertTextForValue(e,t);case"string":let n=JSON.stringify(e);return n=n.substr(1,n.length-2),n=this.getInsertTextForPlainText(n),'"${1:'+n+'}"'+t;case"number":case"boolean":return"${1:"+JSON.stringify(e)+"}"+t}return this.getInsertTextForValue(e,t)}getSuggestionKind(e){if(Array.isArray(e)){const t=e;e=t.length>0?t[0]:void 0}if(!e)return re.Value;switch(e){case"string":default:return re.Value;case"object":return re.Module;case"property":return re.Property}}getLabelTextForMatchingNode(e,t){switch(e.type){case"array":return"[]";case"object":return"{}";default:return t.getText().substr(e.offset,e.length)}}getInsertTextForMatchingNode(e,t,n){switch(e.type){case"array":return this.getInsertTextForValue([],n);case"object":return this.getInsertTextForValue({},n);default:const r=t.getText().substr(e.offset,e.length)+n;return this.getInsertTextForPlainText(r)}}getInsertTextForProperty(e,t,n,r){const o=this.getInsertTextForValue(e,"");if(!n)return o;const i=o+": ";let s,a=0;if(t){if(Array.isArray(t.defaultSnippets)){if(1===t.defaultSnippets.length){const e=t.defaultSnippets[0].body;tt(e)&&(s=this.getInsertTextForSnippetValue(e,""))}a+=t.defaultSnippets.length}if(t.enum&&(s||1!==t.enum.length||(s=this.getInsertTextForGuessedValue(t.enum[0],"")),a+=t.enum.length),tt(t.const)&&(s||(s=this.getInsertTextForGuessedValue(t.const,"")),a++),tt(t.default)&&(s||(s=this.getInsertTextForGuessedValue(t.default,"")),a++),Array.isArray(t.examples)&&t.examples.length&&(s||(s=this.getInsertTextForGuessedValue(t.examples[0],"")),a+=t.examples.length),0===a){let e=Array.isArray(t.type)?t.type[0]:t.type;switch(e||(t.properties?e="object":t.items&&(e="array")),e){case"boolean":s="$1";break;case"string":s='"$1"';break;case"object":s="{$1}";break;case"array":s="[$1]";break;case"number":case"integer":s="${1:0}";break;case"null":s="${1:null}";break;default:return o}}}return(!s||a>1)&&(s="$1"),i+s+r}getCurrentWord(e,t){let n=t-1;const r=e.getText();for(;n>=0&&-1===' \t\n\r\v":{[,]}'.indexOf(r.charAt(n));)n--;return r.substring(n+1,t)}evaluateSeparatorAfter(e,t){const n=m(e.getText(),!0);switch(n.setPosition(t),n.scan()){case 5:case 2:case 4:case 17:return"";default:return","}}findItemAtOffset(e,t,n){const r=m(t.getText(),!0),o=e.items;for(let e=o.length-1;e>=0;e--){const t=o[e];if(n>t.offset+t.length)return r.setPosition(t.offset+t.length),5===r.scan()&&n>=r.getTokenOffset()+r.getTokenLength()?e+1:e;if(n>=t.offset)return e}return 0}isInComment(e,t,n){const r=m(e.getText(),!1);r.setPosition(t);let o=r.scan();for(;17!==o&&r.getTokenOffset()+r.getTokenLength()<n;)o=r.scan();return(12===o||13===o)&&r.getTokenOffset()<=n}fromMarkup(e){if(e&&this.doesSupportMarkdown())return{kind:te.Markdown,value:e}}doesSupportMarkdown(){if(!tt(this.supportsMarkdown)){const e=this.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat;this.supportsMarkdown=Array.isArray(e)&&-1!==e.indexOf(te.Markdown)}return this.supportsMarkdown}doesSupportsCommitCharacters(){return tt(this.supportsCommitCharacters)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.commitCharactersSupport),this.supportsCommitCharacters}doesSupportsLabelDetails(){return tt(this.labelDetailsSupport)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.labelDetailsSupport),this.labelDetailsSupport}}class $t{constructor(e,t=[],n){this.schemaService=e,this.contributions=t,this.promise=n||Promise}doHover(e,t,n){const r=e.offsetAt(t);let o=n.getNodeFromOffset(r);if(!o||("object"===o.type||"array"===o.type)&&r>o.offset+1&&r<o.offset+o.length-1)return this.promise.resolve(null);const i=o;if("string"===o.type){const e=o.parent;if(e&&"property"===e.type&&e.keyNode===o&&(o=e.valueNode,!o))return this.promise.resolve(null)}const s=x.create(e.positionAt(i.offset),e.positionAt(i.offset+i.length)),a=e=>({contents:e,range:s}),c=Mt(o);for(let t=this.contributions.length-1;t>=0;t--){const n=this.contributions[t].getInfoContribution(e.uri,c);if(n)return n.then((e=>a(e)))}return this.schemaService.getSchemaForResource(e.uri,n).then((e=>{if(e&&o){let r,i,s,c;n.getMatchingSchemas(e.schema,o.offset).every((e=>{if(e.node===o&&!e.inverted&&e.schema&&(r=r||e.schema.title,i=i||e.schema.markdownDescription||Vt(e.schema.description),e.schema.enum)){const t=e.schema.enum.indexOf(Et(o));e.schema.markdownEnumDescriptions?s=e.schema.markdownEnumDescriptions[t]:e.schema.enumDescriptions&&(s=Vt(e.schema.enumDescriptions[t])),s&&(c=e.schema.enum[t],"string"!=typeof c&&(c=JSON.stringify(c)))}return!0}));let u="";return r&&(u=Vt(r)),i&&(u.length>0&&(u+="\n\n"),u+=i),s&&(u.length>0&&(u+="\n\n"),u+=`\`${t=c,-1!==t.indexOf("`")?"`` "+t+" ``":t}\`: ${s}`),a([u])}var t;return null}))}}function Vt(e){if(e)return e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,"$1\n\n$3").replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}class Wt{constructor(e,t){this.jsonSchemaService=e,this.promise=t,this.validationEnabled=!0}configure(e){e&&(this.validationEnabled=!1!==e.validate,this.commentSeverity=e.allowComments?void 0:L.Error)}doValidation(e,t,n,r){if(!this.validationEnabled)return this.promise.resolve([]);const o=[],i={},s=e=>{const t=e.range.start.line+" "+e.range.start.character+" "+e.message;i[t]||(i[t]=!0,o.push(e))},a=r=>{let i=n?.trailingCommas?zt(n.trailingCommas):L.Error,a=n?.comments?zt(n.comments):this.commentSeverity,c=n?.schemaValidation?zt(n.schemaValidation):L.Warning,u=n?.schemaRequest?zt(n.schemaRequest):L.Warning;if(r){const o=(n,r)=>{if(t.root&&u){const o=t.root,i="object"===o.type?o.properties[0]:void 0;if(i&&"$schema"===i.keyNode.value){const t=i.valueNode||i,o=x.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length));s($.create(o,n,u,r))}else{const t=x.create(e.positionAt(o.offset),e.positionAt(o.offset+1));s($.create(t,n,u,r))}}};if(r.errors.length)o(r.errors[0],Ge.SchemaResolveError);else if(c){for(const e of r.warnings)o(e,Ge.SchemaUnsupportedFeature);const i=t.validate(e,r.schema,c,n?.schemaDraft);i&&i.forEach(s)}Ht(r.schema)&&(a=void 0),Bt(r.schema)&&(i=void 0)}for(const e of t.syntaxErrors){if(e.code===Ge.TrailingComma){if("number"!=typeof i)continue;e.severity=i}s(e)}if("number"==typeof a){const e=mt.t("Comments are not permitted in JSON.");t.comments.forEach((t=>{s($.create(t,e,a,Ge.CommentNotPermitted))}))}return o};if(r){const e=r.id||"schemaservice://untitled/"+Ut++;return this.jsonSchemaService.registerExternalSchema({uri:e,schema:r}).getResolvedSchema().then((e=>a(e)))}return this.jsonSchemaService.getSchemaForResource(e.uri,t).then((e=>a(e)))}getLanguageStatus(e,t){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(e.uri,t)}}}let Ut=0;function Ht(e){if(e&&"object"==typeof e){if(nt(e.allowComments))return e.allowComments;if(e.allOf)for(const t of e.allOf){const e=Ht(t);if(nt(e))return e}}}function Bt(e){if(e&&"object"==typeof e){if(nt(e.allowTrailingCommas))return e.allowTrailingCommas;const t=e;if(nt(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(const t of e.allOf){const e=Bt(t);if(nt(e))return e}}}function zt(e){switch(e){case"error":return L.Error;case"warning":return L.Warning;case"ignore":return}}const Kt=48,Jt=57,Xt=65,Gt=97,Zt=102;function Qt(e){return e<Kt?0:e<=Jt?e-Kt:(e<Gt&&(e+=Gt-Xt),e>=Gt&&e<=Zt?e-Gt+10:0)}function Yt(e){if("#"===e[0])switch(e.length){case 4:return{red:17*Qt(e.charCodeAt(1))/255,green:17*Qt(e.charCodeAt(2))/255,blue:17*Qt(e.charCodeAt(3))/255,alpha:1};case 5:return{red:17*Qt(e.charCodeAt(1))/255,green:17*Qt(e.charCodeAt(2))/255,blue:17*Qt(e.charCodeAt(3))/255,alpha:17*Qt(e.charCodeAt(4))/255};case 7:return{red:(16*Qt(e.charCodeAt(1))+Qt(e.charCodeAt(2)))/255,green:(16*Qt(e.charCodeAt(3))+Qt(e.charCodeAt(4)))/255,blue:(16*Qt(e.charCodeAt(5))+Qt(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(16*Qt(e.charCodeAt(1))+Qt(e.charCodeAt(2)))/255,green:(16*Qt(e.charCodeAt(3))+Qt(e.charCodeAt(4)))/255,blue:(16*Qt(e.charCodeAt(5))+Qt(e.charCodeAt(6)))/255,alpha:(16*Qt(e.charCodeAt(7))+Qt(e.charCodeAt(8)))/255}}}class en{constructor(e){this.schemaService=e}findDocumentSymbols(e,t,n={resultLimit:Number.MAX_VALUE}){const r=t.root;if(!r)return[];let o=n.resultLimit||Number.MAX_VALUE;const i=e.uri;if(("vscode://defaultsettings/keybindings.json"===i||it(i.toLowerCase(),"/user/keybindings.json"))&&"array"===r.type){const t=[];for(const s of r.items)if("object"===s.type)for(const r of s.properties)if("key"===r.keyNode.value&&r.valueNode){const a=P.create(e.uri,tn(e,s));if(t.push({name:nn(r.valueNode),kind:ye.Function,location:a}),o--,o<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(i),t}return t}const s=[{node:r,containerName:""}];let a=0,c=!1;const u=[],l=(t,n)=>{"array"===t.type?t.items.forEach((e=>{e&&s.push({node:e,containerName:n})})):"object"===t.type&&t.properties.forEach((t=>{const r=t.valueNode;if(r)if(o>0){o--;const i=P.create(e.uri,tn(e,t)),a=n?n+"."+t.keyNode.value:t.keyNode.value;u.push({name:this.getKeyLabel(t),kind:this.getSymbolKind(r.type),location:i,containerName:n}),s.push({node:r,containerName:a})}else c=!0}))};for(;a<s.length;){const e=s[a++];l(e.node,e.containerName)}return c&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(i),u}findDocumentSymbols2(e,t,n={resultLimit:Number.MAX_VALUE}){const r=t.root;if(!r)return[];let o=n.resultLimit||Number.MAX_VALUE;const i=e.uri;if(("vscode://defaultsettings/keybindings.json"===i||it(i.toLowerCase(),"/user/keybindings.json"))&&"array"===r.type){const t=[];for(const s of r.items)if("object"===s.type)for(const r of s.properties)if("key"===r.keyNode.value&&r.valueNode){const a=tn(e,s),c=tn(e,r.keyNode);if(t.push({name:nn(r.valueNode),kind:ye.Function,range:a,selectionRange:c}),o--,o<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(i),t}return t}const s=[],a=[{node:r,result:s}];let c=0,u=!1;const l=(t,n)=>{"array"===t.type?t.items.forEach(((t,r)=>{if(t)if(o>0){o--;const i=tn(e,t),s=i,c={name:String(r),kind:this.getSymbolKind(t.type),range:i,selectionRange:s,children:[]};n.push(c),a.push({result:c.children,node:t})}else u=!0})):"object"===t.type&&t.properties.forEach((t=>{const r=t.valueNode;if(r)if(o>0){o--;const i=tn(e,t),s=tn(e,t.keyNode),c=[],u={name:this.getKeyLabel(t),kind:this.getSymbolKind(r.type),range:i,selectionRange:s,children:c,detail:this.getDetail(r)};n.push(u),a.push({result:c,node:r})}else u=!0}))};for(;c<a.length;){const e=a[c++];l(e.node,e.result)}return u&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(i),s}getSymbolKind(e){switch(e){case"object":return ye.Module;case"string":return ye.String;case"number":return ye.Number;case"array":return ye.Array;case"boolean":return ye.Boolean;default:return ye.Variable}}getKeyLabel(e){let t=e.keyNode.value;return t&&(t=t.replace(/[\n]/g,"↵")),t&&t.trim()?t:`"${t}"`}getDetail(e){if(e)return"boolean"===e.type||"number"===e.type||"null"===e.type||"string"===e.type?String(e.value):"array"===e.type?e.children.length?void 0:"[]":"object"===e.type?e.children.length?void 0:"{}":void 0}findDocumentColors(e,t,n){return this.schemaService.getSchemaForResource(e.uri,t).then((r=>{const o=[];if(r){let i=n&&"number"==typeof n.resultLimit?n.resultLimit:Number.MAX_VALUE;const s=t.getMatchingSchemas(r.schema),a={};for(const t of s)if(!t.inverted&&t.schema&&("color"===t.schema.format||"color-hex"===t.schema.format)&&t.node&&"string"===t.node.type){const r=String(t.node.offset);if(!a[r]){const s=Yt(Et(t.node));if(s){const n=tn(e,t.node);o.push({color:s,range:n})}if(a[r]=!0,i--,i<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(e.uri),o}}}return o}))}getColorPresentations(e,t,n,r){const o=[],i=Math.round(255*n.red),s=Math.round(255*n.green),a=Math.round(255*n.blue);function c(e){const t=e.toString(16);return 2!==t.length?"0"+t:t}let u;return u=1===n.alpha?`#${c(i)}${c(s)}${c(a)}`:`#${c(i)}${c(s)}${c(a)}${c(Math.round(255*n.alpha))}`,o.push({label:u,textEdit:W.replace(r,JSON.stringify(u))}),o}}function tn(e,t){return x.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}function nn(e){return Et(e)||mt.t("<empty>")}const rn={schemaAssociations:[],schemas:{"http://json-schema.org/draft-04/schema#":{$schema:"http://json-schema.org/draft-04/schema#",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"http://json-schema.org/draft-07/schema#":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}},on={id:mt.t("A unique identifier for the schema."),$schema:mt.t("The schema to verify this document against."),title:mt.t("A descriptive title of the element."),description:mt.t("A long description of the element. Used in hover menus and suggestions."),default:mt.t("A default value. Used by suggestions."),multipleOf:mt.t("A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:mt.t("The maximum numerical value, inclusive by default."),exclusiveMaximum:mt.t("Makes the maximum property exclusive."),minimum:mt.t("The minimum numerical value, inclusive by default."),exclusiveMinimum:mt.t("Makes the minimum property exclusive."),maxLength:mt.t("The maximum length of a string."),minLength:mt.t("The minimum length of a string."),pattern:mt.t("A regular expression to match the string against. It is not implicitly anchored."),additionalItems:mt.t("For arrays, only when items is set as an array. If it is a schema, then this schema validates items after the ones specified by the items array. If it is false, then additional items will cause validation to fail."),items:mt.t("For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:mt.t("The maximum number of items that can be inside an array. Inclusive."),minItems:mt.t("The minimum number of items that can be inside an array. Inclusive."),uniqueItems:mt.t("If all of the items in the array must be unique. Defaults to false."),maxProperties:mt.t("The maximum number of properties an object can have. Inclusive."),minProperties:mt.t("The minimum number of properties an object can have. Inclusive."),required:mt.t("An array of strings that lists the names of all properties required on this object."),additionalProperties:mt.t("Either a schema or a boolean. If a schema, then used to validate all properties not matched by 'properties' or 'patternProperties'. If false, then any properties not matched by either will cause this schema to fail."),definitions:mt.t("Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:mt.t("A map of property names to schemas for each property."),patternProperties:mt.t("A map of regular expressions on property names to schemas for matching properties."),dependencies:mt.t("A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:mt.t("The set of literal values that are valid."),type:mt.t("Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:mt.t("Describes the format expected for the value."),allOf:mt.t("An array of schemas, all of which must match."),anyOf:mt.t("An array of schemas, where at least one must match."),oneOf:mt.t("An array of schemas, exactly one of which must match."),not:mt.t("A schema which must not match."),$id:mt.t("A unique identifier for the schema."),$ref:mt.t("Reference a definition hosted on any location."),$comment:mt.t("Comments from schema authors to readers or maintainers of the schema."),readOnly:mt.t("Indicates that the value of the instance is managed exclusively by the owning authority."),examples:mt.t("Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:mt.t('An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:mt.t("If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:mt.t("An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:mt.t("Describes the media type of a string property."),contentEncoding:mt.t("Describes the content encoding of a string property."),if:mt.t('The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:mt.t('The "if" subschema is used for validation when the "if" subschema succeeds.'),else:mt.t('The "else" subschema is used for validation when the "if" subschema fails.')};for(const e in rn.schemas){const t=rn.schemas[e];for(const e in t.properties){let n=t.properties[e];"boolean"==typeof n&&(n=t.properties[e]={});const r=on[e];r&&(n.description=r)}}var sn;(()=>{var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",o=0,i=-1,s=0,a=0;a<=e.length;++a){if(a<e.length)n=e.charCodeAt(a);else{if(47===n)break;n=47}if(47===n){if(i===a-1||1===s);else if(i!==a-1&&2===s){if(r.length<2||2!==o||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",o=0):o=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),i=a,s=0;continue}}else if(2===r.length||1===r.length){r="",o=0,i=a,s=0;continue}t&&(r.length>0?r+="/..":r="..",o=2)}else r.length>0?r+="/"+e.slice(i+1,a):r=e.slice(i+1,a),o=a-i-1;i=a,s=0}else 46===n&&-1!==s?++s:s=-1}return r}var r={resolve:function(){for(var e,r="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var s;i>=0?s=arguments[i]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(r=s+"/"+r,o=47===s.charCodeAt(0))}return r=n(r,!o),o?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),o=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&o&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var o=arguments[n];t(o),o.length>0&&(void 0===e?e=o:e+="/"+o)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var o=1;o<e.length&&47===e.charCodeAt(o);++o);for(var i=e.length,s=i-o,a=1;a<n.length&&47===n.charCodeAt(a);++a);for(var c=n.length-a,u=s<c?s:c,l=-1,d=0;d<=u;++d){if(d===u){if(c>u){if(47===n.charCodeAt(a+d))return n.slice(a+d+1);if(0===d)return n.slice(a+d)}else s>u&&(47===e.charCodeAt(o+d)?l=d:0===d&&(l=0));break}var f=e.charCodeAt(o+d);if(f!==n.charCodeAt(a+d))break;47===f&&(l=d)}var h="";for(d=o+l+1;d<=i;++d)d!==i&&47!==e.charCodeAt(d)||(0===h.length?h+="..":h+="/..");return h.length>0?h+n.slice(a+l):(a+=l,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,o=-1,i=!0,s=e.length-1;s>=1;--s)if(47===(n=e.charCodeAt(s))){if(!i){o=s;break}}else i=!1;return-1===o?r?"/":".":r&&1===o?"//":e.slice(0,o)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,o=0,i=-1,s=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var u=e.charCodeAt(r);if(47===u){if(!s){o=r+1;break}}else-1===c&&(s=!1,c=r+1),a>=0&&(u===n.charCodeAt(a)?-1==--a&&(i=r):(a=-1,i=c))}return o===i?i=c:-1===i&&(i=e.length),e.slice(o,i)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!s){o=r+1;break}}else-1===i&&(s=!1,i=r+1);return-1===i?"":e.slice(o,i)},extname:function(e){t(e);for(var n=-1,r=0,o=-1,i=!0,s=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===o&&(i=!1,o=a+1),46===c?-1===n?n=a:1!==s&&(s=1):-1!==n&&(s=-1);else if(!i){r=a+1;break}}return-1===n||-1===o||0===s||1===s&&n===o-1&&n===r+1?"":e.slice(n,o)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,o=e.charCodeAt(0),i=47===o;i?(n.root="/",r=1):r=0;for(var s=-1,a=0,c=-1,u=!0,l=e.length-1,d=0;l>=r;--l)if(47!==(o=e.charCodeAt(l)))-1===c&&(u=!1,c=l+1),46===o?-1===s?s=l:1!==d&&(d=1):-1!==s&&(d=-1);else if(!u){a=l+1;break}return-1===s||-1===c||0===d||1===d&&s===c-1&&s===a+1?-1!==c&&(n.base=n.name=0===a&&i?e.slice(1,c):e.slice(a,c)):(0===a&&i?(n.name=e.slice(1,s),n.base=e.slice(1,c)):(n.name=e.slice(a,s),n.base=e.slice(a,c)),n.ext=e.slice(s,c)),a>0?n.dir=e.slice(0,a-1):i&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{let e;if(n.r(r),n.d(r,{URI:()=>l,Utils:()=>R}),"object"==typeof process)e=!1;else if("object"==typeof navigator){let t=navigator.userAgent;e=t.indexOf("Windows")>=0}const t=/^\w[\w\d+.-]*$/,o=/^\//,i=/^\/\//;function s(e,n){if(!e.scheme&&n)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!t.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!o.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(i.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const a="",c="/",u=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class l{static isUri(e){return e instanceof l||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,r,o,i=!1){"object"==typeof e?(this.scheme=e.scheme||a,this.authority=e.authority||a,this.path=e.path||a,this.query=e.query||a,this.fragment=e.fragment||a):(this.scheme=function(e,t){return e||t?e:"file"}(e,i),this.authority=t||a,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==c&&(t=c+t):t=c}return t}(this.scheme,n||a),this.query=r||a,this.fragment=o||a,s(this,i))}get fsPath(){return g(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:o,fragment:i}=e;return void 0===t?t=this.scheme:null===t&&(t=a),void 0===n?n=this.authority:null===n&&(n=a),void 0===r?r=this.path:null===r&&(r=a),void 0===o?o=this.query:null===o&&(o=a),void 0===i?i=this.fragment:null===i&&(i=a),t===this.scheme&&n===this.authority&&r===this.path&&o===this.query&&i===this.fragment?this:new f(t,n,r,o,i)}static parse(e,t=!1){const n=u.exec(e);return n?new f(n[2]||a,_(n[4]||a),_(n[5]||a),_(n[7]||a),_(n[9]||a),t):new f(a,a,a,a,a)}static file(t){let n=a;if(e&&(t=t.replace(/\\/g,c)),t[0]===c&&t[1]===c){const e=t.indexOf(c,2);-1===e?(n=t.substring(2),t=c):(n=t.substring(2,e),t=t.substring(e)||c)}return new f("file",n,t,a,a)}static from(e){const t=new f(e.scheme,e.authority,e.path,e.query,e.fragment);return s(t,!0),t}toString(e=!1){return y(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof l)return e;{const t=new f(e);return t._formatted=e.external,t._fsPath=e._sep===d?e.fsPath:null,t}}return e}}const d=e?1:void 0;class f extends l{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=g(this,!1)),this._fsPath}toString(e=!1){return e?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=d),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const h={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function p(e,t,n){let r,o=-1;for(let i=0;i<e.length;i++){const s=e.charCodeAt(i);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||t&&47===s||n&&91===s||n&&93===s||n&&58===s)-1!==o&&(r+=encodeURIComponent(e.substring(o,i)),o=-1),void 0!==r&&(r+=e.charAt(i));else{void 0===r&&(r=e.substr(0,i));const t=h[s];void 0!==t?(-1!==o&&(r+=encodeURIComponent(e.substring(o,i)),o=-1),r+=t):-1===o&&(o=i)}}return-1!==o&&(r+=encodeURIComponent(e.substring(o))),void 0!==r?r:e}function m(e){let t;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);35===r||63===r?(void 0===t&&(t=e.substr(0,n)),t+=h[r]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function g(t,n){let r;return r=t.authority&&t.path.length>1&&"file"===t.scheme?`//${t.authority}${t.path}`:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?n?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(r=r.replace(/\//g,"\\")),r}function y(e,t){const n=t?m:p;let r="",{scheme:o,authority:i,path:s,query:a,fragment:u}=e;if(o&&(r+=o,r+=":"),(i||"file"===o)&&(r+=c,r+=c),i){let e=i.indexOf("@");if(-1!==e){const t=i.substr(0,e);i=i.substr(e+1),e=t.lastIndexOf(":"),-1===e?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=":",r+=n(t.substr(e+1),!1,!0)),r+="@"}i=i.toLowerCase(),e=i.lastIndexOf(":"),-1===e?r+=n(i,!1,!0):(r+=n(i.substr(0,e),!1,!0),r+=i.substr(e))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const e=s.charCodeAt(1);e>=65&&e<=90&&(s=`/${String.fromCharCode(e+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const e=s.charCodeAt(0);e>=65&&e<=90&&(s=`${String.fromCharCode(e+32)}:${s.substr(2)}`)}r+=n(s,!0,!1)}return a&&(r+="?",r+=n(a,!1,!1)),u&&(r+="#",r+=t?u:p(u,!1,!1)),r}function b(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+b(e.substr(3)):e}}const v=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function _(e){return e.match(v)?e.replace(v,(e=>b(e))):e}var D=n(470);const T=D.posix||D,k="/";var R;!function(e){e.joinPath=function(e,...t){return e.with({path:T.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==k&&(n=k+n,r=!0);let o=T.resolve(n,...t);return r&&o[0]===k&&!e.authority&&(o=o.substring(1)),e.with({path:o})},e.dirname=function(e){if(0===e.path.length||e.path===k)return e;let t=T.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return T.basename(e.path)},e.extname=function(e){return T.extname(e.path)}}(R||(R={}))})(),sn=r})();const{URI:an,Utils:cn}=sn;function un(e,t){if("string"!=typeof e)throw new TypeError("Expected a string");const n=String(e);let r="";const o=!!t&&!!t.extended,i=!!t&&!!t.globstar;let s=!1;const a=t&&"string"==typeof t.flags?t.flags:"";let c;for(let e=0,t=n.length;e<t;e++)switch(c=n[e],c){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":r+="\\"+c;break;case"?":if(o){r+=".";break}case"[":case"]":if(o){r+=c;break}case"{":if(o){s=!0,r+="(";break}case"}":if(o){s=!1,r+=")";break}case",":if(s){r+="|";break}r+="\\"+c;break;case"*":const t=n[e-1];let a=1;for(;"*"===n[e+1];)a++,e++;const u=n[e+1];i?!(a>1)||"/"!==t&&void 0!==t&&"{"!==t&&","!==t||"/"!==u&&void 0!==u&&","!==u&&"}"!==u?r+="([^/]*)":("/"===u?e++:"/"===t&&r.endsWith("\\/")&&(r=r.substr(0,r.length-2)),r+="((?:[^/]*(?:/|$))*)"):r+=".*";break;default:r+=c}return a&&~a.indexOf("g")||(r="^"+r+"$"),new RegExp(r,a)}class ln{constructor(e,t,n){this.folderUri=t,this.uris=n,this.globWrappers=[];try{for(let t of e){const e="!"!==t[0];e||(t=t.substring(1)),t.length>0&&("/"===t[0]&&(t=t.substring(1)),this.globWrappers.push({regexp:un("**/"+t,{extended:!0,globstar:!0}),include:e}))}t&&((t=yn(t)).endsWith("/")||(t+="/"),this.folderUri=t)}catch(e){this.globWrappers.length=0,this.uris=[]}}matchesPattern(e){if(this.folderUri&&!e.startsWith(this.folderUri))return!1;let t=!1;for(const{regexp:n,include:r}of this.globWrappers)n.test(e)&&(t=r);return t}getURIs(){return this.uris}}class dn{constructor(e,t,n){this.service=e,this.uri=t,this.dependencies=new Set,this.anchors=void 0,n&&(this.unresolvedSchema=this.service.promise.resolve(new fn(n)))}getUnresolvedSchema(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.uri)),this.unresolvedSchema}getResolvedSchema(){return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then((e=>this.service.resolveSchemaContent(e,this)))),this.resolvedSchema}clearSchema(){const e=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,e}}class fn{constructor(e,t=[]){this.schema=e,this.errors=t}}class hn{constructor(e,t=[],n=[],r){this.schema=e,this.errors=t,this.warnings=n,this.schemaDraft=r}getSection(e){const t=this.getSectionRecursive(e,this.schema);if(t)return St(t)}getSectionRecursive(e,t){if(!t||"boolean"==typeof t||0===e.length)return t;const n=e.shift();if(t.properties&&(t.properties[n],1))return this.getSectionRecursive(e,t.properties[n]);if(t.patternProperties)for(const r of Object.keys(t.patternProperties)){const o=st(r);if(o?.test(n))return this.getSectionRecursive(e,t.patternProperties[r])}else{if("object"==typeof t.additionalProperties)return this.getSectionRecursive(e,t.additionalProperties);if(n.match("[0-9]+"))if(Array.isArray(t.items)){const r=parseInt(n,10);if(!isNaN(r)&&t.items[r])return this.getSectionRecursive(e,t.items[r])}else if(t.items)return this.getSectionRecursive(e,t.items)}}}class pn{constructor(e,t,n){this.contextService=t,this.requestService=e,this.promiseConstructor=n||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}getRegisteredSchemaIds(e){return Object.keys(this.registeredSchemasIds).filter((t=>{const n=an.parse(t).scheme;return"schemaservice"!==n&&(!e||e(n))}))}get promise(){return this.promiseConstructor}dispose(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()}onResourceChange(e){this.cachedSchemaForResource=void 0;let t=!1;const n=[e=gn(e)],r=Object.keys(this.schemasById).map((e=>this.schemasById[e]));for(;n.length;){const e=n.pop();for(let o=0;o<r.length;o++){const i=r[o];i&&(i.uri===e||i.dependencies.has(e))&&(i.uri!==e&&n.push(i.uri),i.clearSchema()&&(t=!0),r[o]=void 0)}}return t}setSchemaContributions(e){if(e.schemas){const t=e.schemas;for(const e in t){const n=gn(e);this.contributionSchemas[n]=this.addSchemaHandle(n,t[e])}}if(Array.isArray(e.schemaAssociations)){const t=e.schemaAssociations;for(let e of t){const t=e.uris.map(gn),n=this.addFilePatternAssociation(e.pattern,e.folderUri,t);this.contributionAssociations.push(n)}}}addSchemaHandle(e,t){const n=new dn(this,e,t);return this.schemasById[e]=n,n}getOrAddSchemaHandle(e,t){return this.schemasById[e]||this.addSchemaHandle(e,t)}addFilePatternAssociation(e,t,n){const r=new ln(e,t,n);return this.filePatternAssociations.push(r),r}registerExternalSchema(e){const t=gn(e.uri);return this.registeredSchemasIds[t]=!0,this.cachedSchemaForResource=void 0,e.fileMatch&&e.fileMatch.length&&this.addFilePatternAssociation(e.fileMatch,e.folderUri,[t]),e.schema?this.addSchemaHandle(t,e.schema):this.getOrAddSchemaHandle(t)}clearExternalSchemas(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(const e in this.contributionSchemas)this.schemasById[e]=this.contributionSchemas[e],this.registeredSchemasIds[e]=!0;for(const e of this.contributionAssociations)this.filePatternAssociations.push(e)}getResolvedSchema(e){const t=gn(e),n=this.schemasById[t];return n?n.getResolvedSchema():this.promise.resolve(void 0)}loadSchema(e){if(!this.requestService){const t=mt.t("Unable to load schema from '{0}'. No schema request service available",bn(e));return this.promise.resolve(new fn({},[t]))}return e.startsWith("http://json-schema.org/")&&(e="https"+e.substring(4)),this.requestService(e).then((t=>{if(!t){const t=mt.t("Unable to load schema from '{0}': No content.",bn(e));return new fn({},[t])}const n=[];65279===t.charCodeAt(0)&&(n.push(mt.t("Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.",bn(e))),t=t.trimStart());let r={};const o=[];return r=b(t,o),o.length&&n.push(mt.t("Unable to parse content from '{0}': Parse error at offset {1}.",bn(e),o[0].offset)),new fn(r,n)}),(t=>{let n=t.toString();const r=t.toString().split("Error: ");return r.length>1&&(n=r[1]),it(n,".")&&(n=n.substr(0,n.length-1)),new fn({},[mt.t("Unable to load schema from '{0}': {1}.",bn(e),n)])}))}resolveSchemaContent(e,t){const n=e.errors.slice(0),r=e.schema;let o=r.$schema?gn(r.$schema):void 0;if("http://json-schema.org/draft-03/schema"===o)return this.promise.resolve(new hn({},[mt.t("Draft-03 schemas are not supported.")],[],o));let i=new Set;const s=this.contextService,a=(e,t,r,o)=>{let i;i=void 0===o||0===o.length?t:"/"===o.charAt(0)?((e,t)=>{t=decodeURIComponent(t);let n=e;return"/"===t[0]&&(t=t.substring(1)),t.split("/").some((e=>(e=e.replace(/~1/g,"/").replace(/~0/g,"~"),n=n[e],!n))),n})(t,o):((e,t,n)=>(t.anchors||(t.anchors=l(e)),t.anchors.get(n)))(t,r,o),i?((e,t)=>{for(const n in t)t.hasOwnProperty(n)&&"id"!==n&&"$id"!==n&&(e[n]=t[n])})(e,i):n.push(mt.t("$ref '{0}' in '{1}' can not be resolved.",o||"",r.uri))},c=(e,t,r,o)=>{s&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(t)&&(t=s.resolveRelativePath(t,o.uri)),t=gn(t);const i=this.getOrAddSchemaHandle(t);return i.getUnresolvedSchema().then((s=>{if(o.dependencies.add(t),s.errors.length){const e=r?t+"#"+r:t;n.push(mt.t("Problems loading reference '{0}': {1}",e,s.errors[0]))}return a(e,s.schema,i,r),u(e,s.schema,i)}))},u=(e,t,n)=>{const r=[];return this.traverseNodes(e,(e=>{const o=new Set;for(;e.$ref;){const i=e.$ref,s=i.split("#",2);if(delete e.$ref,s[0].length>0)return void r.push(c(e,s[0],s[1],n));if(!o.has(i)){const r=s[1];a(e,t,n,r),o.add(i)}}e.$recursiveRef&&i.add("$recursiveRef"),e.$dynamicRef&&i.add("$dynamicRef")})),this.promise.all(r)},l=e=>{const t=new Map;return this.traverseNodes(e,(e=>{const r=e.$id||e.id,o=rt(r)&&"#"===r.charAt(0)?r.substring(1):e.$anchor;o&&(t.has(o)?n.push(mt.t("Duplicate anchor declaration: '{0}'",o)):t.set(o,e)),e.$recursiveAnchor&&i.add("$recursiveAnchor"),e.$dynamicAnchor&&i.add("$dynamicAnchor")})),t};return u(r,r,t).then((e=>{let t=[];return i.size&&t.push(mt.t("The schema uses meta-schema features ({0}) that are not yet supported by the validator.",Array.from(i.keys()).join(", "))),new hn(r,n,t,o)}))}traverseNodes(e,t){if(!e||"object"!=typeof e)return Promise.resolve(null);const n=new Set,r=(...e)=>{for(const t of e)ot(t)&&a.push(t)},o=(...e)=>{for(const t of e)if(ot(t))for(const e in t){const n=t[e];ot(n)&&a.push(n)}},i=(...e)=>{for(const t of e)if(Array.isArray(t))for(const e of t)ot(e)&&a.push(e)},s=e=>{if(Array.isArray(e))for(const t of e)ot(t)&&a.push(t);else ot(e)&&a.push(e)},a=[e];let c=a.pop();for(;c;)n.has(c)||(n.add(c),t(c),r(c.additionalItems,c.additionalProperties,c.not,c.contains,c.propertyNames,c.if,c.then,c.else,c.unevaluatedItems,c.unevaluatedProperties),o(c.definitions,c.$defs,c.properties,c.patternProperties,c.dependencies,c.dependentSchemas),i(c.anyOf,c.allOf,c.oneOf,c.prefixItems),s(c.items)),c=a.pop()}getSchemaFromProperty(e,t){if("object"===t.root?.type)for(const n of t.root.properties)if("$schema"===n.keyNode.value&&"string"===n.valueNode?.type){let t=n.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(t)&&(t=this.contextService.resolveRelativePath(t,e)),t}}getAssociatedSchemas(e){const t=Object.create(null),n=[],r=yn(e);for(const e of this.filePatternAssociations)if(e.matchesPattern(r))for(const r of e.getURIs())t[r]||(n.push(r),t[r]=!0);return n}getSchemaURIsForResource(e,t){let n=t&&this.getSchemaFromProperty(e,t);return n?[n]:this.getAssociatedSchemas(e)}getSchemaForResource(e,t){if(t){let n=this.getSchemaFromProperty(e,t);if(n){const e=gn(n);return this.getOrAddSchemaHandle(e).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===e)return this.cachedSchemaForResource.resolvedSchema;const n=this.getAssociatedSchemas(e),r=n.length>0?this.createCombinedSchema(e,n).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:e,resolvedSchema:r},r}createCombinedSchema(e,t){if(1===t.length)return this.getOrAddSchemaHandle(t[0]);{const n="schemaservice://combinedSchema/"+encodeURIComponent(e),r={allOf:t.map((e=>({$ref:e})))};return this.addSchemaHandle(n,r)}}getMatchingSchemas(e,t,n){if(n){const e=n.id||"schemaservice://untitled/matchingSchemas/"+mn++;return this.addSchemaHandle(e,n).getResolvedSchema().then((e=>t.getMatchingSchemas(e.schema).filter((e=>!e.inverted))))}return this.getSchemaForResource(e.uri,t).then((e=>e?t.getMatchingSchemas(e.schema).filter((e=>!e.inverted)):[]))}}let mn=0;function gn(e){try{return an.parse(e).toString(!0)}catch(t){return e}}function yn(e){try{return an.parse(e).with({fragment:null,query:null}).toString(!0)}catch(t){return e}}function bn(e){try{const t=an.parse(e);if("file"===t.scheme)return t.fsPath}catch(e){}return e}function vn(e,t){const n=[],r=[],o=[];let i=-1;const s=m(e.getText(),!1);let a=s.scan();function c(e){n.push(e),r.push(o.length)}for(;17!==a;){switch(a){case 1:case 3:{const t=e.positionAt(s.getTokenOffset()).line,n={startLine:t,endLine:t,kind:1===a?"object":"array"};o.push(n);break}case 2:case 4:{const t=2===a?"object":"array";if(o.length>0&&o[o.length-1].kind===t){const t=o.pop(),n=e.positionAt(s.getTokenOffset()).line;t&&n>t.startLine+1&&i!==t.startLine&&(t.endLine=n-1,c(t),i=t.startLine)}break}case 13:{const t=e.positionAt(s.getTokenOffset()).line,n=e.positionAt(s.getTokenOffset()+s.getTokenLength()).line;1===s.getTokenError()&&t+1<e.lineCount?s.setPosition(e.offsetAt(w.create(t+1,0))):t<n&&(c({startLine:t,endLine:n,kind:N.Comment}),i=t);break}case 12:{const t=e.getText().substr(s.getTokenOffset(),s.getTokenLength()).match(/^\/\/\s*#(region\b)|(endregion\b)/);if(t){const n=e.positionAt(s.getTokenOffset()).line;if(t[1]){const e={startLine:n,endLine:n,kind:N.Region};o.push(e)}else{let e=o.length-1;for(;e>=0&&o[e].kind!==N.Region;)e--;if(e>=0){const t=o[e];o.length=e,n>t.startLine&&i!==t.startLine&&(t.endLine=n,c(t),i=t.startLine)}}}break}}a=s.scan()}const u=t&&t.rangeLimit;if("number"!=typeof u||n.length<=u)return n;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);const l=[];for(let e of r)e<30&&(l[e]=(l[e]||0)+1);let d=0,f=0;for(let e=0;e<l.length;e++){const t=l[e];if(t){if(t+d>u){f=e;break}d+=t}}const h=[];for(let e=0;e<n.length;e++){const t=r[e];"number"==typeof t&&(t<f||t===f&&d++<u)&&h.push(n[e])}return h}function _n(e,t,n){function r(t,n){return x.create(e.positionAt(t),e.positionAt(n))}const o=m(e.getText(),!0);function i(e,t){return o.setPosition(e),o.scan()===t?o.getTokenOffset()+o.getTokenLength():-1}return t.map((function(t){let o=e.offsetAt(t),s=n.getNodeFromOffset(o,!0);const a=[];for(;s;){switch(s.type){case"string":case"object":case"array":const e=s.offset+1,t=s.offset+s.length-1;e<t&&o>=e&&o<=t&&a.push(r(e,t)),a.push(r(s.offset,s.offset+s.length));break;case"number":case"boolean":case"null":case"property":a.push(r(s.offset,s.offset+s.length))}if("property"===s.type||s.parent&&"array"===s.parent.type){const e=i(s.offset+s.length,5);-1!==e&&a.push(r(s.offset,e))}s=s.parent}let c;for(let e=a.length-1;e>=0;e--)c=Pe.create(a[e],c);return c||(c=Pe.create(x.create(t,t))),c}))}function Dn(e,t,n){let o;if(n){const t=e.offsetAt(n.start);o={offset:t,length:e.offsetAt(n.end)-t}}const i={tabSize:t?t.tabSize:4,insertSpaces:!0===t?.insertSpaces,insertFinalNewline:!0===t?.insertFinalNewline,eol:"\n",keepLines:!0===t?.keepLines};return function(e,t,n){return function(e,t,n){let o,i,s,a,u;if(t){for(a=t.offset,u=a+t.length,s=a;s>0&&!h(e,s-1);)s--;let r=u;for(;r<e.length&&!h(e,r);)r++;i=e.substring(s,r),o=function(e,t){let n=0,r=0;const o=t.tabSize||4;for(;n<e.length;){let t=e.charAt(n);if(t===c[1])r++;else{if("\t"!==t)break;r+=o}n++}return Math.floor(r/o)}(i,n)}else i=e,o=0,s=0,a=0,u=e.length;const p=function(e,t){for(let e=0;e<t.length;e++){const n=t.charAt(e);if("\r"===n)return e+1<t.length&&"\n"===t.charAt(e+1)?"\r\n":"\r";if("\n"===n)return"\n"}return e&&e.eol||"\n"}(n,e),m=d.includes(p);let g,y=0,b=0;g=n.insertSpaces?c[n.tabSize||4]??f(c[1],n.tabSize||4):"\t";const v="\t"===g?"\t":" ";let _=r(i,!1),D=!1;function T(){if(y>1)return f(p,y)+f(g,o+b);const e=g.length*(o+b);return!m||e>l[v][p].length?p+f(g,o+b):e<=0?p:l[v][p][e]}function k(){let e=_.scan();for(y=0;15===e||14===e;)14===e&&n.keepLines?y+=1:14===e&&(y=1),e=_.scan();return D=16===e||0!==_.getTokenError(),e}const R=[];function S(n,r,o){D||t&&!(r<u&&o>a)||e.substring(r,o)===n||R.push({offset:r,length:o-r,content:n})}let C=k();if(n.keepLines&&y>0&&S(f(p,y),0,0),17!==C){let e=_.getTokenOffset()+s;S(g.length*o<20&&n.insertSpaces?c[g.length*o]:f(g,o),s,e)}for(;17!==C;){let e=_.getTokenOffset()+_.getTokenLength()+s,t=k(),r="",o=!1;for(;0===y&&(12===t||13===t);){let n=_.getTokenOffset()+s;S(c[1],e,n),e=_.getTokenOffset()+_.getTokenLength()+s,o=12===t,r=o?T():"",t=k()}if(2===t)1!==C&&b--,n.keepLines&&y>0||!n.keepLines&&1!==C?r=T():n.keepLines&&(r=c[1]);else if(4===t)3!==C&&b--,n.keepLines&&y>0||!n.keepLines&&3!==C?r=T():n.keepLines&&(r=c[1]);else{switch(C){case 3:case 1:b++,r=n.keepLines&&y>0||!n.keepLines?T():c[1];break;case 5:r=n.keepLines&&y>0||!n.keepLines?T():c[1];break;case 12:r=T();break;case 13:y>0?r=T():o||(r=c[1]);break;case 6:n.keepLines&&y>0?r=T():o||(r=c[1]);break;case 10:n.keepLines&&y>0?r=T():6!==t||o||(r="");break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&y>0?r=T():12!==t&&13!==t||o?5!==t&&17!==t&&(D=!0):r=c[1];break;case 16:D=!0}y>0&&(12===t||13===t)&&(r=T())}17===t&&(r=n.keepLines&&y>0?T():n.insertFinalNewline?p:""),S(r,e,_.getTokenOffset()+s),C=t}return R}(e,t,n)}(e.getText(),o,i).map((t=>W.replace(x.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length)),t.content)))}var Tn;!function(e){e[e.Object=0]="Object",e[e.Array=1]="Array"}(Tn||(Tn={}));class kn{constructor(e,t){this.propertyName=e??"",this.beginningLineNumber=t,this.childrenProperties=[],this.lastProperty=!1,this.noKeyName=!1}addChildProperty(e){if(e.parent=this,this.childrenProperties.length>0){let t=0;t=e.noKeyName?this.childrenProperties.length:function(e,t,n){const r=t.propertyName.toLowerCase(),o=e[0].propertyName.toLowerCase(),i=e[e.length-1].propertyName.toLowerCase();if(r<o)return 0;if(r>i)return e.length;let s=0,a=e.length-1;for(;s<=a;){let r=a+s>>1,o=n(t,e[r]);if(o>0)s=r+1;else{if(!(o<0))return r;a=r-1}}return-s-1}(this.childrenProperties,e,Rn),t<0&&(t=-1*t-1),this.childrenProperties.splice(t,0,e)}else this.childrenProperties.push(e);return e}}function Rn(e,t){const n=e.propertyName.toLowerCase(),r=t.propertyName.toLowerCase();return n<r?-1:n>r?1:0}function Sn(e,t,n){if(0!==t.childrenProperties.length)if(t.type===Tn.Object){let r=1/0;for(const e of t.childrenProperties)e.beginningLineNumber<r&&(r=e.beginningLineNumber);n+=r-t.beginningLineNumber,t.childrenProperties.sort(((e,t)=>{const n=e.propertyName??"",r=t.propertyName??"";return n<r?-1:n>r?1:0})),e.push(new wn(n,t.childrenProperties))}else t.type===Tn.Array&&Cn(e,t,n)}function Cn(e,t,n){for(const r of t.childrenProperties){if(r.type===Tn.Object){let o=1/0;for(const e of r.childrenProperties)e.beginningLineNumber<o&&(o=e.beginningLineNumber);const i=o-r.beginningLineNumber;e.push(new wn(n+r.beginningLineNumber-t.beginningLineNumber+i,r.childrenProperties))}r.type===Tn.Array&&Cn(e,r,n+r.beginningLineNumber-t.beginningLineNumber)}}class wn{constructor(e,t){this.beginningLineNumber=e,this.propertyTreeArray=t}}function xn(e,t){const n=[];return t.visit((r=>{if("property"===r.type&&"$ref"===r.keyNode.value&&"string"===r.valueNode?.type){const o=r.valueNode.value,i=function(e,t){const n=function(e){return"#"===e?[]:"#"!==e[0]||"/"!==e[1]?null:e.substring(2).split(/\//).map(An)}(t);return n?On(n,e.root):null}(t,o);if(i){const t=e.positionAt(i.offset);n.push({target:`${e.uri}#${t.line+1},${t.character+1}`,range:Pn(e,r.valueNode)})}}return!0})),Promise.resolve(n)}function Pn(e,t){return x.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function On(e,t){if(!t)return null;if(0===e.length)return t;const n=e.shift();if(t&&"object"===t.type){const r=t.properties.find((e=>e.keyNode.value===n));return r?On(e,r.valueNode):null}if(t&&"array"===t.type&&n.match(/^(0|[1-9][0-9]*)$/)){const r=Number.parseInt(n),o=t.items[r];return o?On(e,o):null}return null}function An(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function En(e){const t=e.promiseConstructor||Promise,n=new pn(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(rn);const r=new Ft(n,e.contributions,t,e.clientCapabilities),o=new $t(n,e.contributions,t),i=new en(n),s=new Wt(n,t);return{configure:e=>{n.clearExternalSchemas(),e.schemas?.forEach(n.registerExternalSchema.bind(n)),s.configure(e)},resetSchema:e=>n.onResourceChange(e),doValidation:s.doValidation.bind(s),getLanguageStatus:s.getLanguageStatus.bind(s),parseJSONDocument:e=>function(e,t){const n=[];let r=-1;const o=e.getText(),i=m(o,!1),s=t&&t.collectComments?[]:void 0;function a(){for(;;){const t=i.scan();switch(l(),t){case 12:case 13:Array.isArray(s)&&s.push(x.create(e.positionAt(i.getTokenOffset()),e.positionAt(i.getTokenOffset()+i.getTokenLength())));break;case 15:case 14:break;default:return t}}}function c(t,o,i,s,a=L.Error){if(0===n.length||i!==r){const c=x.create(e.positionAt(i),e.positionAt(s));n.push($.create(c,t,a,o,e.languageId)),r=i}}function u(e,t,n=void 0,r=[],s=[]){let u=i.getTokenOffset(),l=i.getTokenOffset()+i.getTokenLength();if(u===l&&u>0){for(u--;u>0&&/\s/.test(o.charAt(u));)u--;l=u+1}if(c(e,t,u,l),n&&d(n,!1),r.length+s.length>0){let e=i.getToken();for(;17!==e;){if(-1!==r.indexOf(e)){a();break}if(-1!==s.indexOf(e))break;e=a()}}return n}function l(){switch(i.getTokenError()){case 4:return u(mt.t("Invalid unicode sequence in string."),Ge.InvalidUnicode),!0;case 5:return u(mt.t("Invalid escape character in string."),Ge.InvalidEscapeCharacter),!0;case 3:return u(mt.t("Unexpected end of number."),Ge.UnexpectedEndOfNumber),!0;case 1:return u(mt.t("Unexpected end of comment."),Ge.UnexpectedEndOfComment),!0;case 2:return u(mt.t("Unexpected end of string."),Ge.UnexpectedEndOfString),!0;case 6:return u(mt.t("Invalid characters in string. Control characters must be escaped."),Ge.InvalidCharacter),!0}return!1}function d(e,t){return e.length=i.getTokenOffset()+i.getTokenLength()-e.offset,t&&a(),e}const f=new Tt(void 0,0,0);function h(t,n){const r=new kt(t,i.getTokenOffset(),f);let o=p(r);if(!o){if(16!==i.getToken())return;{u(mt.t("Property keys must be doublequoted"),Ge.PropertyKeysMustBeDoublequoted);const e=new Tt(r,i.getTokenOffset(),i.getTokenLength());e.value=i.getTokenValue(),o=e,a()}}if(r.keyNode=o,"//"!==o.value){const e=n[o.value];e?(c(mt.t("Duplicate object key"),Ge.DuplicateKey,r.keyNode.offset,r.keyNode.offset+r.keyNode.length,L.Warning),ot(e)&&c(mt.t("Duplicate object key"),Ge.DuplicateKey,e.keyNode.offset,e.keyNode.offset+e.keyNode.length,L.Warning),n[o.value]=!0):n[o.value]=r}if(6===i.getToken())r.colonOffset=i.getTokenOffset(),a();else if(u(mt.t("Colon expected"),Ge.ColonExpected),10===i.getToken()&&e.positionAt(o.offset+o.length).line<e.positionAt(i.getTokenOffset()).line)return r.length=o.length,r;const s=g(r);return s?(r.valueNode=s,r.length=s.offset+s.length-r.offset,r):u(mt.t("Value expected"),Ge.ValueExpected,r,[],[2,5])}function p(e){if(10!==i.getToken())return;const t=new Tt(e,i.getTokenOffset());return t.value=i.getTokenValue(),d(t,!0)}function g(e){return function(e){if(3!==i.getToken())return;const t=new _t(e,i.getTokenOffset());a();let n=!1;for(;4!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){n||u(mt.t("Value expected"),Ge.ValueExpected);const e=i.getTokenOffset();if(a(),4===i.getToken()){n&&c(mt.t("Trailing comma"),Ge.TrailingComma,e,e+1);continue}}else n&&u(mt.t("Expected comma"),Ge.CommaExpected);const e=g(t);e?t.items.push(e):u(mt.t("Value expected"),Ge.ValueExpected,void 0,[],[4,5]),n=!0}return 4!==i.getToken()?u(mt.t("Expected comma or closing bracket"),Ge.CommaOrCloseBacketExpected,t):d(t,!0)}(e)||function(e){if(1!==i.getToken())return;const t=new Rt(e,i.getTokenOffset()),n=Object.create(null);a();let r=!1;for(;2!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){r||u(mt.t("Property expected"),Ge.PropertyExpected);const e=i.getTokenOffset();if(a(),2===i.getToken()){r&&c(mt.t("Trailing comma"),Ge.TrailingComma,e,e+1);continue}}else r&&u(mt.t("Expected comma"),Ge.CommaExpected);const e=h(t,n);e?t.properties.push(e):u(mt.t("Property expected"),Ge.PropertyExpected,void 0,[],[2,5]),r=!0}return 2!==i.getToken()?u(mt.t("Expected comma or closing brace"),Ge.CommaOrCloseBraceExpected,t):d(t,!0)}(e)||p(e)||function(e){if(11!==i.getToken())return;const t=new Dt(e,i.getTokenOffset());if(0===i.getTokenError()){const e=i.getTokenValue();try{const n=JSON.parse(e);if(!et(n))return u(mt.t("Invalid number format."),Ge.Undefined,t);t.value=n}catch(e){return u(mt.t("Invalid number format."),Ge.Undefined,t)}t.isInteger=-1===e.indexOf(".")}return d(t,!0)}(e)||function(e){switch(i.getToken()){case 7:return d(new bt(e,i.getTokenOffset()),!0);case 8:return d(new vt(e,!0,i.getTokenOffset()),!0);case 9:return d(new vt(e,!1,i.getTokenOffset()),!0);default:return}}(e)}let y;return 17!==a()&&(y=g(y),y?17!==i.getToken()&&u(mt.t("End of file expected."),Ge.Undefined):u(mt.t("Expected a JSON object, array or literal."),Ge.Undefined)),new qt(y,n,s)}(e,{collectComments:!0}),newJSONDocument:(e,t)=>function(e,t=[]){return new qt(e,t,[])}(e,t),getMatchingSchemas:n.getMatchingSchemas.bind(n),doResolve:r.doResolve.bind(r),doComplete:r.doComplete.bind(r),findDocumentSymbols:i.findDocumentSymbols.bind(i),findDocumentSymbols2:i.findDocumentSymbols2.bind(i),findDocumentColors:i.findDocumentColors.bind(i),getColorPresentations:i.getColorPresentations.bind(i),doHover:o.doHover.bind(o),getFoldingRanges:vn,getSelectionRanges:_n,findDefinition:()=>Promise.resolve([]),findLinks:xn,format:(e,t,n)=>Dn(e,n,t),sort:(e,t)=>function(e,t){const n={...t,keepLines:!1},r=Xe.applyEdits(e,Dn(e,n,void 0)),o=Xe.create("test://test.json","json",0,r),i=function(e,t){if(0===t.childrenProperties.length)return e;const n=Xe.create("test://test.json","json",0,e.getText()),r=[];for(Sn(r,t,t.beginningLineNumber);r.length>0;){const t=r.shift(),o=t.propertyTreeArray;let i=t.beginningLineNumber;for(let t=0;t<o.length;t++){const s=o[t],a=x.create(w.create(s.beginningLineNumber,0),w.create(s.endLineNumber+1,0)),c=e.getText(a),u=Xe.create("test://test.json","json",0,c);if(!0===s.lastProperty&&t!==o.length-1){const e=s.lineWhereToAddComma-s.beginningLineNumber,t=s.indexWhereToAddComa,n={range:x.create(w.create(e,t),w.create(e,t)),text:","};Xe.update(u,[n],1)}else if(!1===s.lastProperty&&t===o.length-1){const e=s.commaIndex,t=s.commaLine-s.beginningLineNumber,n={range:x.create(w.create(t,e),w.create(t,e+1)),text:""};Xe.update(u,[n],1)}const l=s.endLineNumber-s.beginningLineNumber+1,d={range:x.create(w.create(i,0),w.create(i+l,0)),text:u.getText()};Xe.update(n,[d],1),Sn(r,s,i),i+=l}}return n}(o,function(e){const t=e.getText(),n=m(t,!1);let r,o,i,s=new kn,a=s,c=s,u=s,l=0,d=0,f=-1,h=-1,p=0,g=0,y=[],b=!1,v=!1;for(;17!==(r=n.scan());){if(!0===b&&14!==r&&15!==r&&12!==r&&13!==r&&void 0===c.endLineNumber){let e=n.getTokenStartLine();2===i||4===i?u.endLineNumber=e-1:c.endLineNumber=e-1,p=e,b=!1}if(!0===v&&14!==r&&15!==r&&12!==r&&13!==r&&(p=n.getTokenStartLine(),v=!1),n.getTokenStartLine()!==l){for(let t=l;t<n.getTokenStartLine();t++)d+=e.getText(x.create(w.create(t,0),w.create(t+1,0))).length;l=n.getTokenStartLine()}switch(r){case 10:if(void 0===o||1===o||5===o&&y[y.length-1]===Tn.Object){const e=new kn(n.getTokenValue(),p);u=c,c=a.addChildProperty(e)}break;case 3:if(void 0===s.beginningLineNumber&&(s.beginningLineNumber=n.getTokenStartLine()),y[y.length-1]===Tn.Object)a=c;else if(y[y.length-1]===Tn.Array){const e=new kn(n.getTokenValue(),p);e.noKeyName=!0,u=c,c=a.addChildProperty(e),a=c}y.push(Tn.Array),c.type=Tn.Array,p=n.getTokenStartLine(),p++;break;case 1:if(void 0===s.beginningLineNumber)s.beginningLineNumber=n.getTokenStartLine();else if(y[y.length-1]===Tn.Array){const e=new kn(n.getTokenValue(),p);e.noKeyName=!0,u=c,c=a.addChildProperty(e)}c.type=Tn.Object,y.push(Tn.Object),a=c,p=n.getTokenStartLine(),p++;break;case 4:g=n.getTokenStartLine(),y.pop(),void 0!==c.endLineNumber||2!==o&&4!==o||(c.endLineNumber=g-1,c.lastProperty=!0,c.lineWhereToAddComma=f,c.indexWhereToAddComa=h,u=c,c=c?c.parent:void 0,a=c),s.endLineNumber=g,p=g+1;break;case 2:g=n.getTokenStartLine(),y.pop(),1!==o&&(void 0===c.endLineNumber&&(c.endLineNumber=g-1,c.lastProperty=!0,c.lineWhereToAddComma=f,c.indexWhereToAddComa=h),u=c,c=c?c.parent:void 0,a=c),s.endLineNumber=n.getTokenStartLine(),p=g+1;break;case 5:g=n.getTokenStartLine(),void 0!==c.endLineNumber||y[y.length-1]!==Tn.Object&&(y[y.length-1]!==Tn.Array||2!==o&&4!==o)||(c.endLineNumber=g,c.commaIndex=n.getTokenOffset()-d,c.commaLine=g),2!==o&&4!==o||(u=c,c=c?c.parent:void 0,a=c),p=g+1;break;case 13:5!==o||f!==n.getTokenStartLine()||(y[y.length-1]!==Tn.Array||2!==i&&4!==i)&&y[y.length-1]!==Tn.Object||(y[y.length-1]!==Tn.Array||2!==i&&4!==i)&&y[y.length-1]!==Tn.Object||(c.endLineNumber=void 0,b=!0),1!==o&&3!==o||f!==n.getTokenStartLine()||(v=!0)}14!==r&&13!==r&&12!==r&&15!==r&&(i=o,o=r,f=n.getTokenStartLine(),h=n.getTokenOffset()+n.getTokenLength()-d)}return s}(o)),s=Dn(i,n,void 0),a=Xe.applyEdits(i,s);return[W.replace(x.create(w.create(0,0),e.positionAt(e.getText().length)),a)]}(e,t)}}},6439:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.BrowserMessageWriter=t.BrowserMessageReader=void 0,i(n(4615)).default.install();const s=n(3281);o(n(3281),t);class a extends s.AbstractMessageReader{_onData;_messageListener;constructor(e){super(),this._onData=new s.Emitter,this._messageListener=e=>{this._onData.fire(e.data)},e.addEventListener("error",(e=>this.fireError(e))),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}}t.BrowserMessageReader=a;class c extends s.AbstractMessageWriter{port;errorCount;constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener("error",(e=>this.fireError(e)))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.BrowserMessageWriter=c,t.createMessageConnection=function(e,t,n,r){return void 0===n&&(n=s.NullLogger),s.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,s.createMessageConnection)(e,t,n,r)}},4615:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3281);class o extends r.AbstractMessageBuffer{static emptyBuffer=new Uint8Array(0);asciiDecoder;constructor(e="utf-8"){super(e),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return o.emptyBuffer}fromString(e,t){return(new TextEncoder).encode(e)}toString(e,t){return"ascii"===t?this.asciiDecoder.decode(e):new TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}}class i{socket;_onData;_messageListener;constructor(e){this.socket=e,this._onData=new r.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then((e=>{this._onData.fire(new Uint8Array(e))}),(()=>{(0,r.RAL)().console.error("Converting blob to array buffer failed.")}))},this.socket.addEventListener("message",this._messageListener)}onClose(e){return this.socket.addEventListener("close",e),r.Disposable.create((()=>this.socket.removeEventListener("close",e)))}onError(e){return this.socket.addEventListener("error",e),r.Disposable.create((()=>this.socket.removeEventListener("error",e)))}onEnd(e){return this.socket.addEventListener("end",e),r.Disposable.create((()=>this.socket.removeEventListener("end",e)))}onData(e){return this._onData.event(e)}}class s{socket;constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener("close",e),r.Disposable.create((()=>this.socket.removeEventListener("close",e)))}onError(e){return this.socket.addEventListener("error",e),r.Disposable.create((()=>this.socket.removeEventListener("error",e)))}onEnd(e){return this.socket.addEventListener("end",e),r.Disposable.create((()=>this.socket.removeEventListener("end",e)))}write(e,t){if("string"==typeof e){if(void 0!==t&&"utf-8"!==t)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}}const a=new TextEncoder,c=Object.freeze({messageBuffer:Object.freeze({create:e=>new o(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{if("utf-8"!==t.charset)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(a.encode(JSON.stringify(e,void 0,0)))}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{if(!(e instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))}})}),stream:Object.freeze({asReadableStream:e=>new i(e),asWritableStream:e=>new s(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){const r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){const n=setTimeout(e,0,...t);return{dispose:()=>clearTimeout(n)}},setInterval(e,t,...n){const r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function u(){return c}!function(e){e.install=function(){r.RAL.install(c)}}(u||(u={})),t.default=u},3281:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.AbstractMessageBuffer=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.LRUCache=t.Touch=t.LinkedMap=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.Message=t.RAL=void 0,t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.TraceValue=t.Trace=void 0;const o=n(6177);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return o.Message}}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return o.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return o.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return o.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return o.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return o.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return o.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return o.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return o.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return o.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return o.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return o.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return o.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return o.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return o.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return o.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return o.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return o.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return o.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return o.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return o.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return o.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return o.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return o.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return o.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return o.ParameterStructures}});const i=n(3352);Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:function(){return i.LinkedMap}}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:function(){return i.LRUCache}}),Object.defineProperty(t,"Touch",{enumerable:!0,get:function(){return i.Touch}});const s=n(4019);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return s.Disposable}});const a=n(2676);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return a.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return a.Emitter}});const c=n(9850);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return c.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return c.CancellationToken}});const u=n(4996);Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return u.SharedArraySenderStrategy}}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return u.SharedArrayReceiverStrategy}});const l=n(9085);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return l.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return l.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return l.ReadableStreamMessageReader}});const d=n(3193);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return d.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return d.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return d.WriteableStreamMessageWriter}});const f=n(9244);Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return f.AbstractMessageBuffer}});const h=n(577);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return h.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return h.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return h.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return h.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return h.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return h.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return h.Trace}}),Object.defineProperty(t,"TraceValue",{enumerable:!0,get:function(){return h.TraceValue}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return h.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return h.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return h.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return h.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return h.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return h.CancellationReceiverStrategy}}),Object.defineProperty(t,"IdCancellationReceiverStrategy",{enumerable:!0,get:function(){return h.IdCancellationReceiverStrategy}}),Object.defineProperty(t,"RequestCancellationReceiverStrategy",{enumerable:!0,get:function(){return h.RequestCancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return h.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return h.CancellationStrategy}}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:function(){return h.MessageStrategy}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return h.TraceValues}});const p=r(n(9590));t.RAL=p.default},9850:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const a=s(n(9590)),c=i(n(8585)),u=n(2676);var l;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:u.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:u.Event.None}),e.is=function(t){const n=t;return n&&(n===e.None||n===e.Cancelled||c.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(l||(t.CancellationToken=l={}));const d=Object.freeze((function(e,t){const n=(0,a.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}));class f{_isCancelled=!1;_emitter;cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?d:(this._emitter||(this._emitter=new u.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.CancellationTokenSource=class{_token;get token(){return this._token||(this._token=new f),this._token}cancel(){this._token?this._token.cancel():this._token=l.Cancelled}dispose(){this._token?this._token instanceof f&&this._token.dispose():this._token=l.None}}},577:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.TraceValue=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0;const a=s(n(9590)),c=i(n(8585)),u=n(6177),l=n(3352),d=n(2676),f=n(9850);var h,p,m,g,y,b,v,_,D,T,k,R,S,C,w,x,P,O,A;!function(e){e.type=new u.NotificationType("$/cancelRequest")}(h||(h={})),function(e){e.is=function(e){return"string"==typeof e||"number"==typeof e}}(p||(t.ProgressToken=p={})),function(e){e.type=new u.NotificationType("$/progress")}(m||(m={})),t.ProgressType=class{__;_pr;constructor(){}},function(e){e.is=function(e){return c.func(e)}}(g||(g={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"}(y||(t.Trace=y={})),function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"}(b||(t.TraceValue=b={})),t.TraceValues=b,function(e){e.fromString=function(t){if(!c.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}}(y||(t.Trace=y={})),function(e){e.Text="text",e.JSON="json"}(v||(t.TraceFormat=v={})),function(e){e.fromString=function(t){return c.string(t)&&"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(v||(t.TraceFormat=v={})),function(e){e.type=new u.NotificationType("$/setTrace")}(_||(t.SetTraceNotification=_={})),function(e){e.type=new u.NotificationType("$/logTrace")}(D||(t.LogTraceNotification=D={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(T||(t.ConnectionErrors=T={}));class E extends Error{code;constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,E.prototype)}}t.ConnectionError=E,function(e){e.is=function(e){const t=e;return t&&c.func(t.cancelUndispatched)}}(k||(t.ConnectionStrategy=k={})),function(e){e.is=function(e){const t=e;return t&&(void 0===t.kind||"id"===t.kind)&&c.func(t.createCancellationTokenSource)&&(void 0===t.dispose||c.func(t.dispose))}}(R||(t.IdCancellationReceiverStrategy=R={})),function(e){e.is=function(e){const t=e;return t&&"request"===t.kind&&c.func(t.createCancellationTokenSource)&&(void 0===t.dispose||c.func(t.dispose))}}(S||(t.RequestCancellationReceiverStrategy=S={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new f.CancellationTokenSource}),e.is=function(e){return R.is(e)||S.is(e)}}(C||(t.CancellationReceiverStrategy=C={})),function(e){e.Message=Object.freeze({sendCancellation:(e,t)=>e.sendNotification(h.type,{id:t}),cleanup(e){}}),e.is=function(e){const t=e;return t&&c.func(t.sendCancellation)&&c.func(t.cleanup)}}(w||(t.CancellationSenderStrategy=w={})),function(e){e.Message=Object.freeze({receiver:C.Message,sender:w.Message}),e.is=function(e){const t=e;return t&&C.is(t.receiver)&&w.is(t.sender)}}(x||(t.CancellationStrategy=x={})),function(e){e.is=function(e){const t=e;return t&&c.func(t.handleMessage)}}(P||(t.MessageStrategy=P={})),function(e){e.is=function(e){const t=e;return t&&(x.is(t.cancellationStrategy)||k.is(t.connectionStrategy)||P.is(t.messageStrategy)||c.number(t.maxParallelism))}}(O||(t.ConnectionOptions=O={})),function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(A||(A={})),t.createMessageConnection=function(e,n,r,o){const i=void 0!==r?r:t.NullLogger;let s=0,b=0,k=0;const S="2.0",C=o?.maxParallelism??-1;let w,O=0;const M=new Map;let N;const q=new Map,j=new Map;let L,I,F=new l.LinkedMap,$=new Map,V=new Set,W=new Map,U=y.Off,H=v.Text,B=A.New;const z=new d.Emitter,K=new d.Emitter,J=new d.Emitter,X=new d.Emitter,G=new d.Emitter,Z=o&&o.cancellationStrategy?o.cancellationStrategy:x.Message;function Q(e){}function Y(){return B===A.Listening}function ee(){return B===A.Closed}function te(){return B===A.Disposed}function ne(){B!==A.New&&B!==A.Listening||(B=A.Closed,K.fire(void 0))}function re(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function oe(){L||0===F.size||-1!==C&&O>=C||(L=(0,a.default)().timer.setImmediate((async()=>{if(L=void 0,0===F.size)return;if(-1!==C&&O>=C)return;const e=F.shift();let t;try{O++;const n=o?.messageStrategy;t=P.is(n)?n.handleMessage(e,ie):ie(e)}catch(e){i.error(`Processing message queue failed: ${e.toString()}`)}finally{t instanceof Promise?t.then((()=>{O--,oe()})).catch((e=>{i.error(`Processing message queue failed: ${e.toString()}`)})):O--,oe()}})))}async function ie(e){return u.Message.isRequest(e)?async function(e){if(te())return Promise.resolve();function t(t,r,o){const i={jsonrpc:S,id:e.id};return t instanceof u.ResponseError?i.error=t.toJson():i.result=void 0===t?null:t,ue(i,r,o),n.write(i)}function r(t,r,o){const i={jsonrpc:S,id:e.id,error:t.toJson()};return ue(i,r,o),n.write(i)}!function(e){if(U!==y.Off&&I)if(H===v.Text){let t;U!==y.Verbose&&U!==y.Compact||!e.params||(t=`Params: ${ce(e.params)}\n\n`),I.log(`Received request '${e.method} - (${e.id})'.`,t)}else de("receive-request",e)}(e);const o=M.get(e.method);let i,s;o&&(i=o.type,s=o.handler);const a=Date.now();if(s||w){const n=e.id??String(Date.now()),o=R.is(Z.receiver)?Z.receiver.createCancellationTokenSource(n):Z.receiver.createCancellationTokenSource(e);null!==e.id&&V.has(e.id)&&o.cancel(),null!==e.id&&W.set(n,o);try{let n;if(s)if(void 0===e.params){if(void 0!==i&&0!==i.numberOfParams)return r(new u.ResponseError(u.ErrorCodes.InvalidParams,`Request ${e.method} defines ${i.numberOfParams} params but received none.`),e.method,a);n=s(o.token)}else if(Array.isArray(e.params)){if(void 0!==i&&i.parameterStructures===u.ParameterStructures.byName)return r(new u.ResponseError(u.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,a);n=s(...e.params,o.token)}else{if(void 0!==i&&i.parameterStructures===u.ParameterStructures.byPosition)return r(new u.ResponseError(u.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,a);n=s(e.params,o.token)}else w&&(n=w(e.method,e.params,o.token));const c=await n;await t(c,e.method,a)}catch(n){n instanceof u.ResponseError?await t(n,e.method,a):n&&c.string(n.message)?await r(new u.ResponseError(u.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${n.message}`),e.method,a):await r(new u.ResponseError(u.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,a)}finally{W.delete(n)}}else await r(new u.ResponseError(u.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,a)}(e):u.Message.isNotification(e)?async function(e){if(te())return;let t,n;if(e.method===h.type.method){const t=e.params.id;return V.delete(t),void le(e)}{const r=q.get(e.method);r&&(n=r.handler,t=r.type)}if(n||N)try{if(le(e),n)if(void 0===e.params)void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==u.ParameterStructures.byName&&i.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),await n();else if(Array.isArray(e.params)){const r=e.params;e.method===m.type.method&&2===r.length&&p.is(r[0])?await n({token:r[0],value:r[1]}):(void 0!==t&&(t.parameterStructures===u.ParameterStructures.byName&&i.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&i.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${r.length} arguments`)),await n(...r))}else void 0!==t&&t.parameterStructures===u.ParameterStructures.byPosition&&i.error(`Notification ${e.method} defines parameters by position but received parameters by name`),await n(e.params);else N&&await N(e.method,e.params)}catch(t){t.message?i.error(`Notification handler '${e.method}' failed with message: ${t.message}`):i.error(`Notification handler '${e.method}' failed unexpectedly.`)}else J.fire(e)}(e):u.Message.isResponse(e)?ae(e):function(e){if(!e)return void i.error("Received empty message.");i.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(c.string(t.id)||c.number(t.id)){const e=t.id,n=$.get(e);n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}e.onClose(ne),e.onError((function(e){z.fire([e,void 0,void 0])})),n.onClose(ne),n.onError((function(e){z.fire(e)}));const se=e=>{try{if(u.Message.isNotification(e)&&e.method===h.type.method){const t=e.params.id,r=re(t),s=F.get(r);if(u.Message.isRequest(s)){const a=o?.connectionStrategy,c=a&&a.cancelUndispatched?a.cancelUndispatched(s,Q):void 0;if(c&&(void 0!==c.error||void 0!==c.result))return F.delete(r),W.delete(t),c.id=s.id,ue(c,e.method,Date.now()),void n.write(c).catch((()=>i.error("Sending response for canceled message failed.")))}const a=W.get(t);if(void 0!==a)return a.cancel(),void le(e);V.add(t)}!function(e,t){var n;u.Message.isRequest(t)?e.set(re(t.id),t):u.Message.isResponse(t)?-1===C?e.set(null===(n=t.id)?"res-unknown-"+(++k).toString():"res-"+n.toString(),t):ae(t):e.set("not-"+(++b).toString(),t)}(F,e)}finally{oe()}};function ae(e){if(!te())if(null===e.id)e.error?i.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):i.error("Received response message without id. No further error information provided.");else{const t=e.id,n=$.get(t);if(function(e,t){if(U!==y.Off&&I)if(H===v.Text){let n;if(U!==y.Verbose&&U!==y.Compact||(e.error&&e.error.data?n=`Error data: ${ce(e.error.data)}\n\n`:e.result?n=`Result: ${ce(e.result)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),t){const r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";I.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else I.log(`Received response ${e.id} without active response promise.`,n)}else de("receive-response",e)}(e,n),void 0!==n){$.delete(t);try{if(e.error){const t=e.error;n.reject(new u.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");n.resolve(e.result)}}catch(e){e.message?i.error(`Response handler '${n.method}' failed with message: ${e.message}`):i.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}function ce(e){if(null!=e)switch(U){case y.Verbose:return JSON.stringify(e,null,4);case y.Compact:return JSON.stringify(e);default:return}}function ue(e,t,n){if(U!==y.Off&&I)if(H===v.Text){let r;U!==y.Verbose&&U!==y.Compact||(e.error&&e.error.data?r=`Error data: ${ce(e.error.data)}\n\n`:e.result?r=`Result: ${ce(e.result)}\n\n`:void 0===e.error&&(r="No result returned.\n\n")),I.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,r)}else de("send-response",e)}function le(e){if(U!==y.Off&&I&&e.method!==D.type.method)if(H===v.Text){let t;U!==y.Verbose&&U!==y.Compact||(t=e.params?`Params: ${ce(e.params)}\n\n`:"No parameters provided.\n\n"),I.log(`Received notification '${e.method}'.`,t)}else de("receive-notification",e)}function de(e,t){if(!I||U===y.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};I.log(n)}function fe(){if(ee())throw new E(T.Closed,"Connection is closed.");if(te())throw new E(T.Disposed,"Connection is disposed.")}function he(e){return void 0===e?null:e}function pe(e){return null===e?void 0:e}function me(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function ge(e,t){switch(e){case u.ParameterStructures.auto:return me(t)?pe(t):[he(t)];case u.ParameterStructures.byName:if(!me(t))throw new Error("Received parameters by name but param is not an object literal.");return pe(t);case u.ParameterStructures.byPosition:return[he(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function ye(e,t){let n;const r=e.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=ge(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e<t.length&&e<r;e++)n.push(he(t[e]));if(t.length<r)for(let e=t.length;e<r;e++)n.push(null)}return n}const be={sendNotification:(e,...t)=>{let r,o;if(fe(),c.string(e)){r=e;const n=t[0];let i=0,s=u.ParameterStructures.auto;u.ParameterStructures.is(n)&&(i=1,s=n);const a=t.length,c=a-i;switch(c){case 0:o=void 0;break;case 1:o=ge(s,t[i]);break;default:if(s===u.ParameterStructures.byName)throw new Error(`Received ${c} parameters for 'by Name' notification parameter structure.`);o=t.slice(i,a).map((e=>he(e)))}}else{const n=t;r=e.method,o=ye(e,n)}const s={jsonrpc:S,method:r,params:o};return function(e){if(U!==y.Off&&I)if(H===v.Text){let t;U!==y.Verbose&&U!==y.Compact||(t=e.params?`Params: ${ce(e.params)}\n\n`:"No parameters provided.\n\n"),I.log(`Sending notification '${e.method}'.`,t)}else de("send-notification",e)}(s),n.write(s).catch((e=>{throw i.error("Sending notification failed."),e}))},onNotification:(e,t)=>{let n;return fe(),c.func(e)?N=e:t&&(c.string(e)?(n=e,q.set(e,{type:void 0,handler:t})):(n=e.method,q.set(e.method,{type:e,handler:t}))),{dispose:()=>{void 0!==n?q.delete(n):N=void 0}}},onProgress:(e,t,n)=>{if(j.has(t))throw new Error(`Progress handler for token ${t} already registered`);return j.set(t,n),{dispose:()=>{j.delete(t)}}},sendProgress:(e,t,n)=>be.sendNotification(m.type,{token:t,value:n}),onUnhandledProgress:X.event,sendRequest:(e,...t)=>{function r(e,t){const n=Z.sender.sendCancellation(e,t);void 0===n?i.log(`Received no promise from cancellation strategy when cancelling id ${t}`):n.catch((()=>{i.log(`Sending cancellation messages for id ${t} failed.`)}))}let o,a,l;if(fe(),function(){if(!Y())throw new Error("Call listen() first.")}(),c.string(e)){o=e;const n=t[0],r=t[t.length-1];let i=0,s=u.ParameterStructures.auto;u.ParameterStructures.is(n)&&(i=1,s=n);let c=t.length;f.CancellationToken.is(r)&&(c-=1,l=r);const d=c-i;switch(d){case 0:a=void 0;break;case 1:a=ge(s,t[i]);break;default:if(s===u.ParameterStructures.byName)throw new Error(`Received ${d} parameters for 'by Name' request parameter structure.`);a=t.slice(i,c).map((e=>he(e)))}}else{const n=t;o=e.method,a=ye(e,n);const r=e.numberOfParams;l=f.CancellationToken.is(n[r])?n[r]:void 0}const d=s++;let h,p=!1;void 0!==l&&(l.isCancellationRequested?p=!0:h=l.onCancellationRequested((()=>{r(be,d)})));const m={jsonrpc:S,id:d,method:o,params:a};return function(e){if(U!==y.Off&&I)if(H===v.Text){let t;U!==y.Verbose&&U!==y.Compact||!e.params||(t=`Params: ${ce(e.params)}\n\n`),I.log(`Sending request '${e.method} - (${e.id})'.`,t)}else de("send-request",e)}(m),"function"==typeof Z.sender.enableCancellation&&Z.sender.enableCancellation(m),new Promise((async(e,t)=>{const s={method:o,timerStart:Date.now(),resolve:t=>{e(t),Z.sender.cleanup(d),h?.dispose()},reject:e=>{t(e),Z.sender.cleanup(d),h?.dispose()}};try{$.set(d,s),await n.write(m),p&&r(be,d)}catch(e){throw $.delete(d),s.reject(new u.ResponseError(u.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),i.error("Sending request failed."),e}}))},onRequest:(e,t)=>{fe();let n=null;return g.is(e)?(n=void 0,w=e):c.string(e)?(n=null,void 0!==t&&(n=e,M.set(e,{handler:t,type:void 0}))):void 0!==t&&(n=e.method,M.set(e.method,{type:e,handler:t})),{dispose:()=>{null!==n&&(void 0!==n?M.delete(n):w=void 0)}}},hasPendingResponse:()=>$.size>0,trace:async(e,t,n)=>{let r=!1,o=v.Text;void 0!==n&&(c.boolean(n)?r=n:(r=n.sendNotification||!1,o=n.traceFormat||v.Text)),U=e,H=o,I=U===y.Off?void 0:t,!r||ee()||te()||await be.sendNotification(_.type,{value:y.toString(e)})},onError:z.event,onClose:K.event,onUnhandledNotification:J.event,onDispose:G.event,end:()=>{n.end()},dispose:()=>{if(te())return;B=A.Disposed,G.fire(void 0);const t=new u.ResponseError(u.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const e of $.values())e.reject(t);$=new Map,W=new Map,V=new Set,F=new l.LinkedMap,c.func(n.dispose)&&n.dispose(),c.func(e.dispose)&&e.dispose()},listen:()=>{fe(),function(){if(Y())throw new E(T.AlreadyListening,"Connection is already listening")}(),B=A.Listening,e.listen(se)},inspect:()=>{(0,a.default)().console.log("inspect")}};return be.onNotification(D.type,(e=>{if(U===y.Off||!I)return;const t=U===y.Verbose||U===y.Compact;I.log(e.message,t?e.verbose:void 0)})),be.onNotification(m.type,(async e=>{const t=j.get(e.token);t?await t(e.value):X.fire(e)})),be}},4019:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,function(e){e.create=function(e){return{dispose:e}}}(n||(t.Disposable=n={}))},2676:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const o=r(n(9590));var i;!function(e){const t={dispose(){}};e.None=function(){return t}}(i||(t.Event=i={}));class s{_callbacks;_contexts;add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let r=0,o=this._callbacks.length;r<o;r++)if(this._callbacks[r]===e){if(this._contexts[r]===t)return this._callbacks.splice(r,1),void this._contexts.splice(r,1);n=!0}if(n)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];const t=[],n=this._callbacks.slice(0),r=this._contexts.slice(0);for(let i=0,s=n.length;i<s;i++)try{t.push(n[i].apply(r[i],e))}catch(e){(0,o.default)().console.error(e)}return t}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}}class a{_options;static _noop=function(){};_event;_callbacks;constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,n)=>{this._callbacks||(this._callbacks=new s),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const r={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),r.dispose=a._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(r),r}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=a},8585:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=r,t.stringArray=function(e){return r(e)&&e.every((e=>n(e)))}},3352:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0,function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last}(n||(t.Touch=n={}));class r{[Symbol.toStringTag]="LinkedMap";_map;_head;_tail;_size;_state;constructor(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}before(e){const t=this._map.get(e);return t?t.previous?.value:void 0}after(e){const t=this._map.get(e);return t?t.next?.value:void 0}has(e){return this._map.has(e)}get(e,t=n.None){const r=this._map.get(e);if(r)return t!==n.None&&this.touch(r,t),r.value}set(e,t,r=n.None){let o=this._map.get(e);if(o)o.value=t,r!==n.None&&this.touch(o,r);else{switch(o={key:e,value:t,next:void 0,previous:void 0},r){case n.None:this.addItemLast(o);break;case n.First:this.addItemFirst(o);break;case n.Last:default:this.addItemLast(o)}this._map.set(e,o),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}[Symbol.iterator](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===n.First||t===n.Last)if(t===n.First){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===n.Last){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,n)=>{e.push([n,t])})),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}t.LinkedMap=r,t.LRUCache=class extends r{_limit;_ratio;constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=n.AsNew){return super.get(e,t)}peek(e){return super.get(e,n.None)}set(e,t){return super.set(e,t,n.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},9244:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0,t.AbstractMessageBuffer=class{_encoding;_chunks;_totalLength;constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"==typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(0===this._chunks.length)return;let t=0,n=0,r=0,o=0;e:for(;n<this._chunks.length;){const e=this._chunks[n];for(r=0;r<e.length;){switch(e[r]){case 13:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case 10:switch(t){case 1:t=2;break;case 3:t=4,r++;break e;default:t=0}break;default:t=0}r++}o+=e.byteLength,n++}if(4!==t)return;const i=this._read(o+r),s=new Map,a=this.toString(i,"ascii").split("\r\n");if(a.length<2)return s;for(let t=0;t<a.length-2;t++){const n=a[t],r=n.indexOf(":");if(-1===r)throw new Error(`Message header must separate key and value using ':'\n${n}`);const o=n.substr(0,r),i=n.substr(r+1).trim();s.set(e?o.toLowerCase():o,i)}return s}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(0===e)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],n=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,n}const t=this.allocNative(e);let n=0;for(;e>0;){const r=this._chunks[0];if(r.byteLength>e){const o=r.slice(0,e);t.set(o,n),n+=e,this._chunks[0]=r.slice(e),this._totalLength-=e,e-=e}else t.set(r,n),n+=r.byteLength,this._chunks.shift(),this._totalLength-=r.byteLength,e-=r.byteLength}return t}}},9085:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const a=s(n(9590)),c=i(n(8585)),u=n(2676),l=n(4323);var d,f;!function(e){e.is=function(e){const t=e;return t&&c.func(t.listen)&&c.func(t.dispose)&&c.func(t.onError)&&c.func(t.onClose)&&c.func(t.onPartialMessage)}}(d||(t.MessageReader=d={}));class h{errorEmitter;closeEmitter;partialMessageEmitter;constructor(){this.errorEmitter=new u.Emitter,this.closeEmitter=new u.Emitter,this.partialMessageEmitter=new u.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${c.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageReader=h,function(e){e.fromOptions=function(e){let t,n;const r=new Map;let o;const i=new Map;if(void 0===e||"string"==typeof e)t=e??"utf-8";else{if(t=e.charset??"utf-8",void 0!==e.contentDecoder&&(n=e.contentDecoder,r.set(n.name,n)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)r.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(o=e.contentTypeDecoder,i.set(o.name,o)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)i.set(t.name,t)}return void 0===o&&(o=(0,a.default)().applicationJson.decoder,i.set(o.name,o)),{charset:t,contentDecoder:n,contentDecoders:r,contentTypeDecoder:o,contentTypeDecoders:i}}}(f||(f={})),t.ReadableStreamMessageReader=class extends h{readable;options;callback;nextMessageLength;messageToken;buffer;partialMessageTimer;_partialMessageTimeout;readSemaphore;constructor(e,t){super(),this.readable=e,this.options=f.fromOptions(t),this.buffer=(0,a.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new l.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const t=this.readable.onData((e=>{this.onData(e)}));return this.readable.onError((e=>this.fireError(e))),this.readable.onClose((()=>this.fireClose())),t}onData(e){try{for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders(!0);if(!e)return;const t=e.get("content-length");if(!t)return void this.fireError(new Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(e))}`));const n=parseInt(t);if(isNaN(n))return void this.fireError(new Error(`Content-Length value must be a number. Got ${t}`));this.nextMessageLength=n}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock((async()=>{const t=void 0!==this.options.contentDecoder?await this.options.contentDecoder.decode(e):e,n=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(n)})).catch((e=>{this.fireError(e)}))}}catch(e){this.fireError(e)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,a.default)().timer.setTimeout(((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())}),this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}},3193:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const a=s(n(9590)),c=i(n(8585)),u=n(4323),l=n(2676);var d,f;!function(e){e.is=function(e){const t=e;return t&&c.func(t.dispose)&&c.func(t.onClose)&&c.func(t.onError)&&c.func(t.write)}}(d||(t.MessageWriter=d={}));class h{errorEmitter;closeEmitter;constructor(){this.errorEmitter=new l.Emitter,this.closeEmitter=new l.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${c.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=h,function(e){e.fromOptions=function(e){return void 0===e||"string"==typeof e?{charset:e??"utf-8",contentTypeEncoder:(0,a.default)().applicationJson.encoder}:{charset:e.charset??"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,a.default)().applicationJson.encoder}}}(f||(f={})),t.WriteableStreamMessageWriter=class extends h{writable;options;errorCount;writeSemaphore;constructor(e,t){super(),this.writable=e,this.options=f.fromOptions(t),this.errorCount=0,this.writeSemaphore=new u.Semaphore(1),this.writable.onError((e=>this.fireError(e))),this.writable.onClose((()=>this.fireClose()))}async write(e){return this.writeSemaphore.lock((async()=>this.options.contentTypeEncoder.encode(e,this.options).then((e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e)).then((t=>{const n=[];return n.push("Content-Length: ",t.byteLength.toString(),"\r\n"),n.push("\r\n"),this.doWrite(e,n,t)}),(e=>{throw this.fireError(e),e}))))}async doWrite(e,t,n){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(n)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}},6177:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Message=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;const s=i(n(8585));var a,c;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3}(a||(t.ErrorCodes=a={}));class u extends Error{code;data;constructor(e,t,n){super(t),this.code=s.number(e)?e:a.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,u.prototype)}toJson(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}}t.ResponseError=u;class l{kind;static auto=new l("auto");static byPosition=new l("byPosition");static byName=new l("byName");constructor(e){this.kind=e}static is(e){return e===l.auto||e===l.byName||e===l.byPosition}toString(){return this.kind}}t.ParameterStructures=l;class d{method;numberOfParams;constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return l.auto}}t.AbstractMessageSignature=d,t.RequestType0=class extends d{_;constructor(e){super(e,0)}},t.RequestType=class extends d{_parameterStructures;_;constructor(e,t=l.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType1=class extends d{_parameterStructures;_;constructor(e,t=l.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType2=class extends d{_;constructor(e){super(e,2)}},t.RequestType3=class extends d{_;constructor(e){super(e,3)}},t.RequestType4=class extends d{_;constructor(e){super(e,4)}},t.RequestType5=class extends d{_;constructor(e){super(e,5)}},t.RequestType6=class extends d{_;constructor(e){super(e,6)}},t.RequestType7=class extends d{_;constructor(e){super(e,7)}},t.RequestType8=class extends d{_;constructor(e){super(e,8)}},t.RequestType9=class extends d{_;constructor(e){super(e,9)}},t.NotificationType=class extends d{_parameterStructures;_;constructor(e,t=l.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType0=class extends d{_;constructor(e){super(e,0)}},t.NotificationType1=class extends d{_parameterStructures;_;constructor(e,t=l.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType2=class extends d{_;constructor(e){super(e,2)}},t.NotificationType3=class extends d{_;constructor(e){super(e,3)}},t.NotificationType4=class extends d{_;constructor(e){super(e,4)}},t.NotificationType5=class extends d{_;constructor(e){super(e,5)}},t.NotificationType6=class extends d{_;constructor(e){super(e,6)}},t.NotificationType7=class extends d{_;constructor(e){super(e,7)}},t.NotificationType8=class extends d{_;constructor(e){super(e,8)}},t.NotificationType9=class extends d{_;constructor(e){super(e,9)}},function(e){e.isRequest=function(e){const t=e;return t&&s.string(t.method)&&(s.string(t.id)||s.number(t.id))},e.isNotification=function(e){const t=e;return t&&s.string(t.method)&&void 0===e.id},e.isResponse=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(s.string(t.id)||s.number(t.id)||null===t.id)}}(c||(t.Message=c={}))},9590:(e,t)=>{"use strict";let n;function r(){if(void 0===n)throw new Error("No runtime abstraction layer installed");return n}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");n=e}}(r||(r={})),t.default=r},4323:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const o=r(n(9590));t.Semaphore=class{_capacity;_active;_waiting;constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise(((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()}))}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,o.default)().timer.setImmediate((()=>this.doRunNext()))}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then((t=>{this._active--,e.resolve(t),this.runNext()}),(t=>{this._active--,e.reject(t),this.runNext()})):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}},4996:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=void 0;const r=n(9850);var o;!function(e){e.Continue=0,e.Cancelled=1}(o||(o={})),t.SharedArraySenderStrategy=class{buffers;constructor(){this.buffers=new Map}enableCancellation(e){if(null===e.id)return;const t=new SharedArrayBuffer(4);new Int32Array(t,0,1)[0]=o.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){const n=this.buffers.get(t);if(void 0===n)return;const r=new Int32Array(n,0,1);Atomics.store(r,0,o.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};class i{data;constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===o.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}class s{token;constructor(e){this.token=new i(e)}cancel(){}dispose(){}}t.SharedArrayReceiverStrategy=class{kind="request";createCancellationTokenSource(e){const t=e.$cancellationData;return void 0===t?new r.CancellationTokenSource:new s(t)}}},4512:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const i=n(6439);o(n(6439),t),o(n(8766),t),t.createProtocolConnection=function(e,t,n,r){return(0,i.createMessageConnection)(e,t,n,r)}},8766:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,o(n(3281),t),o(n(4292),t),o(n(372),t),o(n(1560),t);var i,s=n(1580);Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return s.createProtocolConnection}}),function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800}(i||(t.LSPErrorCodes=i={}))},1580:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const r=n(3281);t.createProtocolConnection=function(e,t,n,o){return r.ConnectionStrategy.is(o)&&(o={connectionStrategy:o}),(0,r.createMessageConnection)(e,t,n,o)}},372:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=t.MessageDirection=void 0;const r=n(3281);var o;!function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"}(o||(t.MessageDirection=o={})),t.RegistrationType=class{____;method;constructor(e){this.method=e}};class i extends r.RequestType0{__;___;____;_pr;constructor(e){super(e)}}t.ProtocolRequestType0=i;class s extends r.RequestType{__;___;____;_pr;constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolRequestType=s;class a extends r.NotificationType0{___;____;constructor(e){super(e)}}t.ProtocolNotificationType0=a;class c extends r.NotificationType{___;____;constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolNotificationType=c},8765:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const r=n(372);var o,i,s;!function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.CallHierarchyPrepareRequest=o={})),function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.CallHierarchyIncomingCallsRequest=i={})),function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.CallHierarchyOutgoingCallsRequest=s={}))},7672:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const r=n(372);var o,i;!function(e){e.method="textDocument/documentColor",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.DocumentColorRequest=o={})),function(e){e.method="textDocument/colorPresentation",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.ColorPresentationRequest=i={}))},1660:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const r=n(372);var o;!function(e){e.method="workspace/configuration",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(o||(t.ConfigurationRequest=o={}))},6914:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const r=n(372);var o;!function(e){e.method="textDocument/declaration",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.DeclarationRequest=o={}))},6011:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;const s=n(3281),a=i(n(8598)),c=n(372);var u,l,d,f,h;!function(e){e.is=function(e){const t=e;return t&&a.boolean(t.retriggerRequest)}}(u||(t.DiagnosticServerCancellationData=u={})),function(e){e.Full="full",e.Unchanged="unchanged"}(l||(t.DocumentDiagnosticReportKind=l={})),function(e){e.method="textDocument/diagnostic",e.messageDirection=c.MessageDirection.clientToServer,e.type=new c.ProtocolRequestType(e.method),e.partialResult=new s.ProgressType}(d||(t.DocumentDiagnosticRequest=d={})),function(e){e.method="workspace/diagnostic",e.messageDirection=c.MessageDirection.clientToServer,e.type=new c.ProtocolRequestType(e.method),e.partialResult=new s.ProgressType}(f||(t.WorkspaceDiagnosticRequest=f={})),function(e){e.method="workspace/diagnostic/refresh",e.messageDirection=c.MessageDirection.serverToClient,e.type=new c.ProtocolRequestType0(e.method)}(h||(t.DiagnosticRefreshRequest=h={}))},9840:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;const r=n(372);var o,i,s,a,c,u,l;!function(e){e.file="file",e.folder="folder"}(o||(t.FileOperationPatternKind=o={})),function(e){e.method="workspace/willCreateFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.WillCreateFilesRequest=i={})),function(e){e.method="workspace/didCreateFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(s||(t.DidCreateFilesNotification=s={})),function(e){e.method="workspace/willRenameFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(a||(t.WillRenameFilesRequest=a={})),function(e){e.method="workspace/didRenameFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(c||(t.DidRenameFilesNotification=c={})),function(e){e.method="workspace/didDeleteFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(u||(t.DidDeleteFilesNotification=u={})),function(e){e.method="workspace/willDeleteFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(l||(t.WillDeleteFilesRequest=l={}))},2874:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=void 0;const r=n(372);var o,i;!function(e){e.method="textDocument/foldingRange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.FoldingRangeRequest=o={})),function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(i||(t.FoldingRangeRefreshRequest=i={}))},9574:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const r=n(372);var o;!function(e){e.method="textDocument/implementation",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.ImplementationRequest=o={}))},7752:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;const r=n(372);var o,i,s;!function(e){e.method="textDocument/inlayHint",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.InlayHintRequest=o={})),function(e){e.method="inlayHint/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.InlayHintResolveRequest=i={})),function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(s||(t.InlayHintRefreshRequest=s={}))},3307:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionRequest=void 0;const r=n(372);var o;!function(e){e.method="textDocument/inlineCompletion",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.InlineCompletionRequest=o={}))},3124:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;const r=n(372);var o,i;!function(e){e.method="textDocument/inlineValue",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.InlineValueRequest=o={})),function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(i||(t.InlineValueRefreshRequest=i={}))},1560:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CodeActionRequest=t.DocumentSymbolRequest=t.DocumentHighlightRequest=t.ReferencesRequest=t.DefinitionRequest=t.SignatureHelpRequest=t.SignatureHelpTriggerKind=t.HoverRequest=t.CompletionResolveRequest=t.CompletionRequest=t.CompletionTriggerKind=t.PublishDiagnosticsNotification=t.WatchKind=t.GlobPattern=t.RelativePattern=t.FileChangeType=t.DidChangeWatchedFilesNotification=t.WillSaveTextDocumentWaitUntilRequest=t.WillSaveTextDocumentNotification=t.TextDocumentSaveReason=t.DidSaveTextDocumentNotification=t.DidCloseTextDocumentNotification=t.DidChangeTextDocumentNotification=t.TextDocumentContentChangeEvent=t.DidOpenTextDocumentNotification=t.TextDocumentSyncKind=t.TelemetryEventNotification=t.LogMessageNotification=t.ShowMessageRequest=t.ShowMessageNotification=t.MessageType=t.DidChangeConfigurationNotification=t.ExitNotification=t.ShutdownRequest=t.InitializedNotification=t.InitializeErrorCodes=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.PositionEncodingKind=t.RegularExpressionEngineKind=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.NotebookCellTextDocumentFilter=t.NotebookDocumentFilter=t.TextDocumentFilter=void 0,t.UniquenessLevel=t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.WillRenameFilesRequest=t.DidRenameFilesNotification=t.WillCreateFilesRequest=t.DidCreateFilesNotification=t.FileOperationPatternKind=t.LinkedEditingRangeRequest=t.ShowDocumentRequest=t.SemanticTokensRegistrationType=t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.TokenFormat=t.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=t.ColorPresentationRequest=t.DocumentColorRequest=t.ConfigurationRequest=t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=t.TypeDefinitionRequest=t.ImplementationRequest=t.ApplyWorkspaceEditRequest=t.ExecuteCommandRequest=t.PrepareRenameRequest=t.RenameRequest=t.PrepareSupportDefaultBehavior=t.DocumentOnTypeFormattingRequest=t.DocumentRangesFormattingRequest=t.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolResolveRequest=t.WorkspaceSymbolRequest=t.CodeActionResolveRequest=void 0,t.TextDocumentContentRefreshRequest=t.TextDocumentContentRequest=t.InlineCompletionRequest=t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=t.InlineValueRefreshRequest=t.InlineValueRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchySubtypesRequest=t.TypeHierarchyPrepareRequest=t.MonikerRequest=t.MonikerKind=void 0;const s=n(372),a=n(4292),c=i(n(8598)),u=n(9574);Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return u.ImplementationRequest}});const l=n(8461);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return l.TypeDefinitionRequest}});const d=n(9935);Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return d.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return d.DidChangeWorkspaceFoldersNotification}});const f=n(1660);Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return f.ConfigurationRequest}});const h=n(7672);Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return h.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return h.ColorPresentationRequest}});const p=n(2874);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return p.FoldingRangeRequest}}),Object.defineProperty(t,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return p.FoldingRangeRefreshRequest}});const m=n(6914);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return m.DeclarationRequest}});const g=n(3487);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return g.SelectionRangeRequest}});const y=n(2687);Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return y.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return y.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return y.WorkDoneProgressCancelNotification}});const b=n(8765);Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return b.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return b.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return b.CallHierarchyPrepareRequest}});const v=n(2478);Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return v.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return v.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return v.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return v.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return v.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return v.SemanticTokensRegistrationType}});const _=n(908);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return _.ShowDocumentRequest}});const D=n(5316);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return D.LinkedEditingRangeRequest}});const T=n(9840);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return T.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return T.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return T.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return T.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return T.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return T.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return T.WillDeleteFilesRequest}});const k=n(9047);Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return k.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return k.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return k.MonikerRequest}});const R=n(645);Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return R.TypeHierarchyPrepareRequest}}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return R.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return R.TypeHierarchySupertypesRequest}});const S=n(3124);Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return S.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return S.InlineValueRefreshRequest}});const C=n(7752);Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:function(){return C.InlayHintRequest}}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:function(){return C.InlayHintResolveRequest}}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return C.InlayHintRefreshRequest}});const w=n(6011);Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return w.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return w.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return w.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return w.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return w.DiagnosticRefreshRequest}});const x=n(3557);Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:function(){return x.NotebookCellKind}}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:function(){return x.ExecutionSummary}}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:function(){return x.NotebookCell}}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:function(){return x.NotebookDocument}}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return x.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return x.DidOpenNotebookDocumentNotification}}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:function(){return x.NotebookCellArrayChange}}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return x.DidChangeNotebookDocumentNotification}}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return x.DidSaveNotebookDocumentNotification}}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return x.DidCloseNotebookDocumentNotification}});const P=n(3307);Object.defineProperty(t,"InlineCompletionRequest",{enumerable:!0,get:function(){return P.InlineCompletionRequest}});const O=n(4289);var A,E,M,N,q,j,L,I,F,$,V,W,U,H,B,z,K,J,X,G,Z,Q,Y,ee,te,ne,re,oe,ie,se,ae,ce,ue,le,de,fe,he,pe,me,ge,ye,be,ve,_e,De,Te,ke,Re,Se,Ce,we,xe,Pe,Oe,Ae,Ee,Me,Ne,qe,je,Le,Ie,Fe,$e,Ve,We,Ue;Object.defineProperty(t,"TextDocumentContentRequest",{enumerable:!0,get:function(){return O.TextDocumentContentRequest}}),Object.defineProperty(t,"TextDocumentContentRefreshRequest",{enumerable:!0,get:function(){return O.TextDocumentContentRefreshRequest}}),function(e){e.is=function(e){const t=e;return c.string(t)||c.string(t.language)||c.string(t.scheme)||he.is(t.pattern)}}(A||(t.TextDocumentFilter=A={})),function(e){e.is=function(e){const t=e;return c.objectLiteral(t)&&(c.string(t.notebookType)||c.string(t.scheme)||c.string(t.pattern))}}(E||(t.NotebookDocumentFilter=E={})),function(e){e.is=function(e){const t=e;return c.objectLiteral(t)&&(c.string(t.notebook)||E.is(t.notebook))&&(void 0===t.language||c.string(t.language))}}(M||(t.NotebookCellTextDocumentFilter=M={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(const t of e)if(!c.string(t)&&!A.is(t)&&!M.is(t))return!1;return!0}}(N||(t.DocumentSelector=N={})),function(e){e.method="client/registerCapability",e.messageDirection=s.MessageDirection.serverToClient,e.type=new s.ProtocolRequestType(e.method)}(q||(t.RegistrationRequest=q={})),function(e){e.method="client/unregisterCapability",e.messageDirection=s.MessageDirection.serverToClient,e.type=new s.ProtocolRequestType(e.method)}(j||(t.UnregistrationRequest=j={})),function(e){e.Create="create",e.Rename="rename",e.Delete="delete"}(L||(t.ResourceOperationKind=L={})),function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"}(I||(t.FailureHandlingKind=I={})),function(e){e.ES2020="ES2020"}(F||(t.RegularExpressionEngineKind=F={})),function(e){e.UTF8="utf-8",e.UTF16="utf-16",e.UTF32="utf-32"}($||(t.PositionEncodingKind=$={})),function(e){e.hasId=function(e){const t=e;return t&&c.string(t.id)&&t.id.length>0}}(V||(t.StaticRegistrationOptions=V={})),function(e){e.is=function(e){const t=e;return t&&(null===t.documentSelector||N.is(t.documentSelector))}}(W||(t.TextDocumentRegistrationOptions=W={})),function(e){e.is=function(e){const t=e;return c.objectLiteral(t)&&(void 0===t.workDoneProgress||c.boolean(t.workDoneProgress))},e.hasWorkDoneProgress=function(e){const t=e;return t&&c.boolean(t.workDoneProgress)}}(U||(t.WorkDoneProgressOptions=U={})),function(e){e.method="initialize",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method)}(H||(t.InitializeRequest=H={})),function(e){e.unknownProtocolVersion=1}(B||(t.InitializeErrorCodes=B={})),function(e){e.method="initialized",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolNotificationType(e.method)}(z||(t.InitializedNotification=z={})),function(e){e.method="shutdown",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType0(e.method)}(K||(t.ShutdownRequest=K={})),function(e){e.method="exit",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolNotificationType0(e.method)}(J||(t.ExitNotification=J={})),function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolNotificationType(e.method)}(X||(t.DidChangeConfigurationNotification=X={})),function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5}(G||(t.MessageType=G={})),function(e){e.method="window/showMessage",e.messageDirection=s.MessageDirection.serverToClient,e.type=new s.ProtocolNotificationType(e.method)}(Z||(t.ShowMessageNotification=Z={})),function(e){e.method="window/showMessageRequest",e.messageDirection=s.MessageDirection.serverToClient,e.type=new s.ProtocolRequestType(e.method)}(Q||(t.ShowMessageRequest=Q={})),function(e){e.method="window/logMessage",e.messageDirection=s.MessageDirection.serverToClient,e.type=new s.ProtocolNotificationType(e.method)}(Y||(t.LogMessageNotification=Y={})),function(e){e.method="telemetry/event",e.messageDirection=s.MessageDirection.serverToClient,e.type=new s.ProtocolNotificationType(e.method)}(ee||(t.TelemetryEventNotification=ee={})),function(e){e.None=0,e.Full=1,e.Incremental=2}(te||(t.TextDocumentSyncKind=te={})),function(e){e.method="textDocument/didOpen",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolNotificationType(e.method)}(ne||(t.DidOpenTextDocumentNotification=ne={})),function(e){e.isIncremental=function(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)},e.isFull=function(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}(re||(t.TextDocumentContentChangeEvent=re={})),function(e){e.method="textDocument/didChange",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolNotificationType(e.method)}(oe||(t.DidChangeTextDocumentNotification=oe={})),function(e){e.method="textDocument/didClose",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolNotificationType(e.method)}(ie||(t.DidCloseTextDocumentNotification=ie={})),function(e){e.method="textDocument/didSave",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolNotificationType(e.method)}(se||(t.DidSaveTextDocumentNotification=se={})),function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3}(ae||(t.TextDocumentSaveReason=ae={})),function(e){e.method="textDocument/willSave",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolNotificationType(e.method)}(ce||(t.WillSaveTextDocumentNotification=ce={})),function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method)}(ue||(t.WillSaveTextDocumentWaitUntilRequest=ue={})),function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolNotificationType(e.method)}(le||(t.DidChangeWatchedFilesNotification=le={})),function(e){e.Created=1,e.Changed=2,e.Deleted=3}(de||(t.FileChangeType=de={})),function(e){e.is=function(e){const t=e;return c.objectLiteral(t)&&(a.URI.is(t.baseUri)||a.WorkspaceFolder.is(t.baseUri))&&c.string(t.pattern)}}(fe||(t.RelativePattern=fe={})),function(e){e.is=function(e){const t=e;return c.string(t)||fe.is(t)}}(he||(t.GlobPattern=he={})),function(e){e.Create=1,e.Change=2,e.Delete=4}(pe||(t.WatchKind=pe={})),function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=s.MessageDirection.serverToClient,e.type=new s.ProtocolNotificationType(e.method)}(me||(t.PublishDiagnosticsNotification=me={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3}(ge||(t.CompletionTriggerKind=ge={})),function(e){e.method="textDocument/completion",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method)}(ye||(t.CompletionRequest=ye={})),function(e){e.method="completionItem/resolve",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method)}(be||(t.CompletionResolveRequest=be={})),function(e){e.method="textDocument/hover",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method)}(ve||(t.HoverRequest=ve={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3}(_e||(t.SignatureHelpTriggerKind=_e={})),function(e){e.method="textDocument/signatureHelp",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method)}(De||(t.SignatureHelpRequest=De={})),function(e){e.method="textDocument/definition",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method)}(Te||(t.DefinitionRequest=Te={})),function(e){e.method="textDocument/references",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method)}(ke||(t.ReferencesRequest=ke={})),function(e){e.method="textDocument/documentHighlight",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method)}(Re||(t.DocumentHighlightRequest=Re={})),function(e){e.method="textDocument/documentSymbol",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method)}(Se||(t.DocumentSymbolRequest=Se={})),function(e){e.method="textDocument/codeAction",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method)}(Ce||(t.CodeActionRequest=Ce={})),function(e){e.method="codeAction/resolve",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method)}(we||(t.CodeActionResolveRequest=we={})),function(e){e.method="workspace/symbol",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method)}(xe||(t.WorkspaceSymbolRequest=xe={})),function(e){e.method="workspaceSymbol/resolve",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method)}(Pe||(t.WorkspaceSymbolResolveRequest=Pe={})),function(e){e.method="textDocument/codeLens",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method)}(Oe||(t.CodeLensRequest=Oe={})),function(e){e.method="codeLens/resolve",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method)}(Ae||(t.CodeLensResolveRequest=Ae={})),function(e){e.method="workspace/codeLens/refresh",e.messageDirection=s.MessageDirection.serverToClient,e.type=new s.ProtocolRequestType0(e.method)}(Ee||(t.CodeLensRefreshRequest=Ee={})),function(e){e.method="textDocument/documentLink",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method)}(Me||(t.DocumentLinkRequest=Me={})),function(e){e.method="documentLink/resolve",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method)}(Ne||(t.DocumentLinkResolveRequest=Ne={})),function(e){e.method="textDocument/formatting",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method)}(qe||(t.DocumentFormattingRequest=qe={})),function(e){e.method="textDocument/rangeFormatting",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method)}(je||(t.DocumentRangeFormattingRequest=je={})),function(e){e.method="textDocument/rangesFormatting",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method)}(Le||(t.DocumentRangesFormattingRequest=Le={})),function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method)}(Ie||(t.DocumentOnTypeFormattingRequest=Ie={})),function(e){e.Identifier=1}(Fe||(t.PrepareSupportDefaultBehavior=Fe={})),function(e){e.method="textDocument/rename",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method)}($e||(t.RenameRequest=$e={})),function(e){e.method="textDocument/prepareRename",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method)}(Ve||(t.PrepareRenameRequest=Ve={})),function(e){e.method="workspace/executeCommand",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method)}(We||(t.ExecuteCommandRequest=We={})),function(e){e.method="workspace/applyEdit",e.messageDirection=s.MessageDirection.serverToClient,e.type=new s.ProtocolRequestType("workspace/applyEdit")}(Ue||(t.ApplyWorkspaceEditRequest=Ue={}))},5316:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const r=n(372);var o;!function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.LinkedEditingRangeRequest=o={}))},9047:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const r=n(372);var o,i,s;!function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"}(o||(t.UniquenessLevel=o={})),function(e){e.$import="import",e.$export="export",e.local="local"}(i||(t.MonikerKind=i={})),function(e){e.method="textDocument/moniker",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.MonikerRequest=s={}))},3557:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=void 0;const s=n(4292),a=i(n(8598)),c=n(372);var u,l,d,f,h,p,m,g,y,b;!function(e){e.Markup=1,e.Code=2,e.is=function(e){return 1===e||2===e}}(u||(t.NotebookCellKind=u={})),function(e){e.create=function(e,t){const n={executionOrder:e};return!0!==t&&!1!==t||(n.success=t),n},e.is=function(e){const t=e;return a.objectLiteral(t)&&s.uinteger.is(t.executionOrder)&&(void 0===t.success||a.boolean(t.success))},e.equals=function(e,t){return e===t||null!=e&&null!=t&&e.executionOrder===t.executionOrder&&e.success===t.success}}(l||(t.ExecutionSummary=l={})),function(e){function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(typeof e!=typeof n)return!1;if("object"!=typeof e)return!1;const r=Array.isArray(e),o=Array.isArray(n);if(r!==o)return!1;if(r&&o){if(e.length!==n.length)return!1;for(let r=0;r<e.length;r++)if(!t(e[r],n[r]))return!1}if(a.objectLiteral(e)&&a.objectLiteral(n)){const r=Object.keys(e),o=Object.keys(n);if(r.length!==o.length)return!1;if(r.sort(),o.sort(),!t(r,o))return!1;for(let o=0;o<r.length;o++){const i=r[o];if(!t(e[i],n[i]))return!1}}return!0}e.create=function(e,t){return{kind:e,document:t}},e.is=function(e){const t=e;return a.objectLiteral(t)&&u.is(t.kind)&&s.DocumentUri.is(t.document)&&(void 0===t.metadata||a.objectLiteral(t.metadata))},e.diff=function(e,n){const r=new Set;return e.document!==n.document&&r.add("document"),e.kind!==n.kind&&r.add("kind"),e.executionSummary!==n.executionSummary&&r.add("executionSummary"),void 0===e.metadata&&void 0===n.metadata||t(e.metadata,n.metadata)||r.add("metadata"),void 0===e.executionSummary&&void 0===n.executionSummary||l.equals(e.executionSummary,n.executionSummary)||r.add("executionSummary"),r}}(d||(t.NotebookCell=d={})),function(e){e.create=function(e,t,n,r){return{uri:e,notebookType:t,version:n,cells:r}},e.is=function(e){const t=e;return a.objectLiteral(t)&&a.string(t.uri)&&s.integer.is(t.version)&&a.typedArray(t.cells,d.is)}}(f||(t.NotebookDocument=f={})),function(e){e.method="notebookDocument/sync",e.messageDirection=c.MessageDirection.clientToServer,e.type=new c.RegistrationType(e.method)}(h||(t.NotebookDocumentSyncRegistrationType=h={})),function(e){e.method="notebookDocument/didOpen",e.messageDirection=c.MessageDirection.clientToServer,e.type=new c.ProtocolNotificationType(e.method),e.registrationMethod=h.method}(p||(t.DidOpenNotebookDocumentNotification=p={})),function(e){e.is=function(e){const t=e;return a.objectLiteral(t)&&s.uinteger.is(t.start)&&s.uinteger.is(t.deleteCount)&&(void 0===t.cells||a.typedArray(t.cells,d.is))},e.create=function(e,t,n){const r={start:e,deleteCount:t};return void 0!==n&&(r.cells=n),r}}(m||(t.NotebookCellArrayChange=m={})),function(e){e.method="notebookDocument/didChange",e.messageDirection=c.MessageDirection.clientToServer,e.type=new c.ProtocolNotificationType(e.method),e.registrationMethod=h.method}(g||(t.DidChangeNotebookDocumentNotification=g={})),function(e){e.method="notebookDocument/didSave",e.messageDirection=c.MessageDirection.clientToServer,e.type=new c.ProtocolNotificationType(e.method),e.registrationMethod=h.method}(y||(t.DidSaveNotebookDocumentNotification=y={})),function(e){e.method="notebookDocument/didClose",e.messageDirection=c.MessageDirection.clientToServer,e.type=new c.ProtocolNotificationType(e.method),e.registrationMethod=h.method}(b||(t.DidCloseNotebookDocumentNotification=b={}))},2687:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;const r=n(3281),o=n(372);var i,s,a;!function(e){e.type=new r.ProgressType,e.is=function(t){return t===e.type}}(i||(t.WorkDoneProgress=i={})),function(e){e.method="window/workDoneProgress/create",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType(e.method)}(s||(t.WorkDoneProgressCreateRequest=s={})),function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(a||(t.WorkDoneProgressCancelNotification=a={}))},3487:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const r=n(372);var o;!function(e){e.method="textDocument/selectionRange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.SelectionRangeRequest=o={}))},2478:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=void 0;const r=n(372);var o,i,s,a,c,u;!function(e){e.Relative="relative"}(o||(t.TokenFormat=o={})),function(e){e.method="textDocument/semanticTokens",e.type=new r.RegistrationType(e.method)}(i||(t.SemanticTokensRegistrationType=i={})),function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.registrationMethod=i.method}(s||(t.SemanticTokensRequest=s={})),function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.registrationMethod=i.method}(a||(t.SemanticTokensDeltaRequest=a={})),function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.registrationMethod=i.method}(c||(t.SemanticTokensRangeRequest=c={})),function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(u||(t.SemanticTokensRefreshRequest=u={}))},908:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const r=n(372);var o;!function(e){e.method="window/showDocument",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(o||(t.ShowDocumentRequest=o={}))},4289:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextDocumentContentRefreshRequest=t.TextDocumentContentRequest=void 0;const r=n(372);var o,i;!function(e){e.method="workspace/textDocumentContent",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.TextDocumentContentRequest=o={})),function(e){e.method="workspace/textDocumentContent/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(i||(t.TextDocumentContentRefreshRequest=i={}))},8461:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const r=n(372);var o;!function(e){e.method="textDocument/typeDefinition",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.TypeDefinitionRequest=o={}))},645:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;const r=n(372);var o,i,s;!function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.TypeHierarchyPrepareRequest=o={})),function(e){e.method="typeHierarchy/supertypes",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.TypeHierarchySupertypesRequest=i={})),function(e){e.method="typeHierarchy/subtypes",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.TypeHierarchySubtypesRequest=s={}))},9935:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const r=n(372);var o,i;!function(e){e.method="workspace/workspaceFolders",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(o||(t.WorkspaceFoldersRequest=o={})),function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(i||(t.DidChangeWorkspaceFoldersNotification=i={}))},8598:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.objectLiteral=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=r,t.stringArray=function(e){return r(e)&&e.every((e=>n(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.objectLiteral=function(e){return null!==e&&"object"==typeof e}},8867:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=void 0;const i=n(2861);o(n(4512),t),o(n(2861),t);let s=!1;const a={initialize:e=>{},get shutdownReceived(){return s},set shutdownReceived(e){s=e},exit:e=>{}};t.createConnection=function(e,t,n,r){let o,s,c,u;return void 0!==e&&"features"===e.__brand&&(o=e,e=t,t=n,n=r),i.ConnectionStrategy.is(e)||i.ConnectionOptions.is(e)?u=e:(s=e,c=t,u=n),(0,i.createConnection)((e=>(0,i.createProtocolConnection)(s,c,e,u)),a,o)}},2861:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.NotebookDocuments=t.TextDocuments=t.SemanticTokensBuilder=void 0;const a=n(2655);Object.defineProperty(t,"SemanticTokensBuilder",{enumerable:!0,get:function(){return a.SemanticTokensBuilder}});const c=i(n(1276)),u=i(n(9202));s(n(8766),t);const l=n(1662);Object.defineProperty(t,"TextDocuments",{enumerable:!0,get:function(){return l.TextDocuments}});const d=n(20);var f;Object.defineProperty(t,"NotebookDocuments",{enumerable:!0,get:function(){return d.NotebookDocuments}}),s(n(7874),t),function(e){e.all={__brand:"features",workspace:u.TextDocumentContentFeature,languages:c.InlineCompletionFeature}}(f||(t.ProposedFeatures=f={}))},3918:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyFeature=void 0;const r=n(8766);t.CallHierarchyFeature=e=>class extends e{get callHierarchy(){return{onPrepare:e=>this.connection.onRequest(r.CallHierarchyPrepareRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0))),onIncomingCalls:e=>{const t=r.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onOutgoingCalls:e=>{const t=r.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},8491:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationFeature=void 0;const s=n(8766),a=i(n(1248));t.ConfigurationFeature=e=>class extends e{getConfiguration(e){return e?a.string(e)?this._getConfiguration({section:e}):this._getConfiguration(e):this._getConfiguration({})}_getConfiguration(e){const t={items:Array.isArray(e)?e:[e]};return this.connection.sendRequest(s.ConfigurationRequest.type,t).then((t=>Array.isArray(t)?Array.isArray(e)?t:t[0]:Array.isArray(e)?[]:null))}}},493:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticFeature=void 0;const r=n(8766);t.DiagnosticFeature=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(r.DiagnosticRefreshRequest.type),on:e=>this.connection.onRequest(r.DocumentDiagnosticRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r.DocumentDiagnosticRequest.partialResult,t)))),onWorkspace:e=>this.connection.onRequest(r.WorkspaceDiagnosticRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(r.WorkspaceDiagnosticRequest.partialResult,t))))}}}},2697:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileOperationsFeature=void 0;const r=n(8766);t.FileOperationsFeature=e=>class extends e{onDidCreateFiles(e){return this.connection.onNotification(r.DidCreateFilesNotification.type,(t=>e(t)))}onDidRenameFiles(e){return this.connection.onNotification(r.DidRenameFilesNotification.type,(t=>e(t)))}onDidDeleteFiles(e){return this.connection.onNotification(r.DidDeleteFilesNotification.type,(t=>e(t)))}onWillCreateFiles(e){return this.connection.onRequest(r.WillCreateFilesRequest.type,((t,n)=>e(t,n)))}onWillRenameFiles(e){return this.connection.onRequest(r.WillRenameFilesRequest.type,((t,n)=>e(t,n)))}onWillDeleteFiles(e){return this.connection.onRequest(r.WillDeleteFilesRequest.type,((t,n)=>e(t,n)))}}},6007:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeFeature=void 0;const r=n(8766);t.FoldingRangeFeature=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest(r.FoldingRangeRefreshRequest.type),on:e=>{const t=r.FoldingRangeRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},4635:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintFeature=void 0;const r=n(8766);t.InlayHintFeature=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(r.InlayHintRefreshRequest.type),on:e=>this.connection.onRequest(r.InlayHintRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t)))),resolve:e=>this.connection.onRequest(r.InlayHintResolveRequest.type,((t,n)=>e(t,n)))}}}},1276:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionFeature=void 0;const r=n(8766);t.InlineCompletionFeature=e=>class extends e{get inlineCompletion(){return{on:e=>this.connection.onRequest(r.InlineCompletionRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t))))}}}},1815:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueFeature=void 0;const r=n(8766);t.InlineValueFeature=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(r.InlineValueRefreshRequest.type),on:e=>this.connection.onRequest(r.InlineValueRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t))))}}}},8517:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeFeature=void 0;const r=n(8766);t.LinkedEditingRangeFeature=e=>class extends e{onLinkedEditingRange(e){return this.connection.onRequest(r.LinkedEditingRangeRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0)))}}},2936:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerFeature=void 0;const r=n(8766);t.MonikerFeature=e=>class extends e{get moniker(){return{on:e=>{const t=r.MonikerRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},20:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookDocuments=t.NotebookSyncFeature=void 0;const r=n(8766),o=n(1662);t.NotebookSyncFeature=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:e=>this.connection.onNotification(r.DidOpenNotebookDocumentNotification.type,(t=>e(t))),onDidChangeNotebookDocument:e=>this.connection.onNotification(r.DidChangeNotebookDocumentNotification.type,(t=>e(t))),onDidSaveNotebookDocument:e=>this.connection.onNotification(r.DidSaveNotebookDocumentNotification.type,(t=>e(t))),onDidCloseNotebookDocument:e=>this.connection.onNotification(r.DidCloseNotebookDocumentNotification.type,(t=>e(t)))}}};class i{static NULL_DISPOSE=Object.freeze({dispose:()=>{}});openHandler;changeHandler;closeHandler;onDidOpenTextDocument(e){return this.openHandler=e,r.Disposable.create((()=>{this.openHandler=void 0}))}openTextDocument(e){return this.openHandler&&this.openHandler(e)}onDidChangeTextDocument(e){return this.changeHandler=e,r.Disposable.create((()=>{this.changeHandler=e}))}changeTextDocument(e){return this.changeHandler&&this.changeHandler(e)}onDidCloseTextDocument(e){return this.closeHandler=e,r.Disposable.create((()=>{this.closeHandler=void 0}))}closeTextDocument(e){return this.closeHandler&&this.closeHandler(e)}onWillSaveTextDocument(){return i.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return i.NULL_DISPOSE}onDidSaveTextDocument(){return i.NULL_DISPOSE}}t.NotebookDocuments=class{notebookDocuments;notebookCellMap;_onDidOpen;_onDidSave;_onDidChange;_onDidClose;_cellTextDocuments;constructor(e){e instanceof o.TextDocuments?this._cellTextDocuments=e:this._cellTextDocuments=new o.TextDocuments(e),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new r.Emitter,this._onDidChange=new r.Emitter,this._onDidSave=new r.Emitter,this._onDidClose=new r.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(e){return this._cellTextDocuments.get(e.document)}getNotebookDocument(e){return this.notebookDocuments.get(e)}getNotebookCell(e){const t=this.notebookCellMap.get(e);return t&&t[0]}findNotebookDocumentForCell(e){const t="string"==typeof e?e:e.document,n=this.notebookCellMap.get(t);return n&&n[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(e){const t=new i,n=[];return n.push(this.cellTextDocuments.listen(t)),n.push(e.notebooks.synchronization.onDidOpenNotebookDocument((async e=>{this.notebookDocuments.set(e.notebookDocument.uri,e.notebookDocument);for(const n of e.cellTextDocuments)await t.openTextDocument({textDocument:n});this.updateCellMap(e.notebookDocument),this._onDidOpen.fire(e.notebookDocument)}))),n.push(e.notebooks.synchronization.onDidChangeNotebookDocument((async e=>{const n=this.notebookDocuments.get(e.notebookDocument.uri);if(void 0===n)return;n.version=e.notebookDocument.version;const r=n.metadata;let o=!1;const i=e.change;void 0!==i.metadata&&(o=!0,n.metadata=i.metadata);const s=[],a=[],c=[],u=[];if(void 0!==i.cells){const e=i.cells;if(void 0!==e.structure){const r=e.structure.array;if(n.cells.splice(r.start,r.deleteCount,...void 0!==r.cells?r.cells:[]),void 0!==e.structure.didOpen)for(const n of e.structure.didOpen)await t.openTextDocument({textDocument:n}),s.push(n.uri);if(e.structure.didClose)for(const n of e.structure.didClose)await t.closeTextDocument({textDocument:n}),a.push(n.uri)}if(void 0!==e.data){const t=new Map(e.data.map((e=>[e.document,e])));for(let e=0;e<=n.cells.length;e++){const r=t.get(n.cells[e].document);if(void 0!==r){const o=n.cells.splice(e,1,r);if(c.push({old:o[0],new:r}),t.delete(r.document),0===t.size)break}}}if(void 0!==e.textContent)for(const n of e.textContent)await t.changeTextDocument({textDocument:n.document,contentChanges:n.changes}),u.push(n.document.uri)}this.updateCellMap(n);const l={notebookDocument:n};o&&(l.metadata={old:r,new:n.metadata});const d=[];for(const e of s)d.push(this.getNotebookCell(e));const f=[];for(const e of a)f.push(this.getNotebookCell(e));const h=[];for(const e of u)h.push(this.getNotebookCell(e));(d.length>0||f.length>0||c.length>0||h.length>0)&&(l.cells={added:d,removed:f,changed:{data:c,textContent:h}}),void 0===l.metadata&&void 0===l.cells||this._onDidChange.fire(l)}))),n.push(e.notebooks.synchronization.onDidSaveNotebookDocument((e=>{const t=this.notebookDocuments.get(e.notebookDocument.uri);void 0!==t&&this._onDidSave.fire(t)}))),n.push(e.notebooks.synchronization.onDidCloseNotebookDocument((async e=>{const n=this.notebookDocuments.get(e.notebookDocument.uri);if(void 0!==n){this._onDidClose.fire(n);for(const n of e.cellTextDocuments)await t.closeTextDocument({textDocument:n});this.notebookDocuments.delete(e.notebookDocument.uri);for(const e of n.cells)this.notebookCellMap.delete(e.document)}}))),r.Disposable.create((()=>{n.forEach((e=>e.dispose()))}))}updateCellMap(e){for(const t of e.cells)this.notebookCellMap.set(t.document,[t,e])}}},2938:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attachPartialResult=t.ProgressFeature=t.attachWorkDone=void 0;const r=n(8766),o=n(6116);class i{_connection;_token;static Instances=new Map;constructor(e,t){this._connection=e,this._token=t,i.Instances.set(this._token,this)}begin(e,t,n,o){const i={kind:"begin",title:e,message:n,cancellable:o};"number"==typeof t&&(i.percentage=Math.round(t)),this._connection.sendProgress(r.WorkDoneProgress.type,this._token,i)}report(e,t){const n={kind:"report"};"number"==typeof e?(n.percentage=Math.round(e),void 0!==t&&(n.message=t)):n.message=e,this._connection.sendProgress(r.WorkDoneProgress.type,this._token,n)}done(){i.Instances.delete(this._token),this._connection.sendProgress(r.WorkDoneProgress.type,this._token,{kind:"end"})}}class s extends i{_source;constructor(e,t){super(e,t),this._source=new r.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}}class a{constructor(){}begin(){}report(){}done(){}}class c extends a{_source;constructor(){super(),this._source=new r.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}}var u;t.attachWorkDone=function(e,t){if(void 0===t||void 0===t.workDoneToken)return new a;const n=t.workDoneToken;return delete t.workDoneToken,new i(e,n)},t.ProgressFeature=e=>class extends e{_progressSupported;constructor(){super(),this._progressSupported=!1}initialize(e){super.initialize(e),!0===e?.window?.workDoneProgress&&(this._progressSupported=!0,this.connection.onNotification(r.WorkDoneProgressCancelNotification.type,(e=>{const t=i.Instances.get(e.token);(t instanceof s||t instanceof c)&&t.cancel()})))}attachWorkDoneProgress(e){return void 0===e?new a:new i(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){const e=(0,o.generateUuid)();return this.connection.sendRequest(r.WorkDoneProgressCreateRequest.type,{token:e}).then((()=>new s(this.connection,e)))}return Promise.resolve(new c)}},function(e){e.type=new r.ProgressType}(u||(u={}));class l{_connection;_token;constructor(e,t){this._connection=e,this._token=t}report(e){this._connection.sendProgress(u.type,this._token,e)}}t.attachPartialResult=function(e,t){if(void 0===t||void 0===t.partialResultToken)return;const n=t.partialResultToken;return delete t.partialResultToken,new l(e,n)}},2655:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensBuilder=t.SemanticTokensDiff=t.SemanticTokensFeature=void 0;const r=n(8766);t.SemanticTokensFeature=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(r.SemanticTokensRefreshRequest.type),on:e=>{const t=r.SemanticTokensRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onDelta:e=>{const t=r.SemanticTokensDeltaRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onRange:e=>{const t=r.SemanticTokensRangeRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}};class o{originalSequence;modifiedSequence;constructor(e,t){this.originalSequence=e,this.modifiedSequence=t}computeDiff(){const e=this.originalSequence.length,t=this.modifiedSequence.length;let n=0;for(;n<t&&n<e&&this.originalSequence[n]===this.modifiedSequence[n];)n++;if(n<t&&n<e){let r=e-1,o=t-1;for(;r>=n&&o>=n&&this.originalSequence[r]===this.modifiedSequence[o];)r--,o--;(r<n||o<n)&&(r++,o++);const i=r-n+1,s=this.modifiedSequence.slice(n,o+1);return 1===s.length&&s[0]===this.originalSequence[r]?[{start:n,deleteCount:i-1}]:[{start:n,deleteCount:i,data:s}]}return n<t?[{start:n,deleteCount:0,data:this.modifiedSequence.slice(n)}]:n<e?[{start:n,deleteCount:e-n}]:[]}}t.SemanticTokensDiff=o;class i{_id;_prevLine;_prevChar;_dataIsSortedAndDeltaEncoded;_data;_dataNonDelta;_dataLen;_prevData;constructor(){this._prevData=void 0,this.initialize()}initialize(){this._id=Date.now(),this._prevLine=0,this._prevChar=0,this._data=[],this._dataNonDelta=[],this._dataLen=0,this._dataIsSortedAndDeltaEncoded=!0}push(e,t,n,r,o){this._dataIsSortedAndDeltaEncoded&&(e<this._prevLine||e===this._prevLine&&t<this._prevChar)&&(this._dataIsSortedAndDeltaEncoded=!1,this._dataNonDelta=i._deltaDecode(this._data));let s=e,a=t;this._dataIsSortedAndDeltaEncoded&&this._dataLen>0&&(s-=this._prevLine,0===s&&(a-=this._prevChar));const c=this._dataIsSortedAndDeltaEncoded?this._data:this._dataNonDelta;c[this._dataLen++]=s,c[this._dataLen++]=a,c[this._dataLen++]=n,c[this._dataLen++]=r,c[this._dataLen++]=o,this._prevLine=e,this._prevChar=t}get id(){return this._id.toString()}static _deltaDecode(e){const t=e.length/5|0;let n=0,r=0;const o=[];for(let i=0;i<t;i++){const t=5*i;let s=e[t],a=e[t+1];0===s?(s=n,a+=r):s+=n;const c=e[t+2],u=e[t+3],l=e[t+4];o[t+0]=s,o[t+1]=a,o[t+2]=c,o[t+3]=u,o[t+4]=l,n=s,r=a}return o}static _sortAndDeltaEncode(e){const t=[],n=e.length/5|0;for(let e=0;e<n;e++)t[e]=e;t.sort(((t,n)=>{const r=e[5*t],o=e[5*n];return r===o?e[5*t+1]-e[5*n+1]:r-o}));const r=[];let o=0,i=0;for(let s=0;s<n;s++){const n=5*t[s],a=e[n+0],c=e[n+1],u=e[n+2],l=e[n+3],d=e[n+4],f=a-o,h=0===f?c-i:c,p=5*s;r[p+0]=f,r[p+1]=h,r[p+2]=u,r[p+3]=l,r[p+4]=d,o=a,i=c}return r}getFinalDataDelta(){return this._dataIsSortedAndDeltaEncoded?this._data:i._sortAndDeltaEncode(this._dataNonDelta)}previousResult(e){this.id===e&&(this._prevData=this.getFinalDataDelta()),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this.getFinalDataDelta()}}canBuildEdits(){return void 0!==this._prevData}buildEdits(){return void 0!==this._prevData?{resultId:this.id,edits:new o(this._prevData,this.getFinalDataDelta()).computeDiff()}:this.build()}}t.SemanticTokensBuilder=i},7874:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=t.combineFeatures=t.combineNotebooksFeatures=t.combineLanguagesFeatures=t.combineWorkspaceFeatures=t.combineWindowFeatures=t.combineClientFeatures=t.combineTracerFeatures=t.combineTelemetryFeatures=t.combineConsoleFeatures=t._NotebooksImpl=t._LanguagesImpl=t.BulkUnregistration=t.BulkRegistration=t.ErrorMessageTracker=void 0;const s=n(8766),a=i(n(1248)),c=i(n(6116)),u=n(2938),l=n(8491),d=n(2112),f=n(3918),h=n(2655),p=n(8817),m=n(2697),g=n(8517),y=n(5026),b=n(1815),v=n(6007),_=n(4635),D=n(493),T=n(20),k=n(2936);function R(e){if(null!==e)return e}t.ErrorMessageTracker=class{_messages;constructor(){this._messages=Object.create(null)}add(e){let t=this._messages[e];t||(t=0),t++,this._messages[e]=t}sendErrors(e){Object.keys(this._messages).forEach((t=>{e.window.showErrorMessage(t)}))}};class S{_rawConnection;_connection;constructor(){}rawAttach(e){this._rawConnection=e}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(e){}initialize(e){}error(e){this.send(s.MessageType.Error,e)}warn(e){this.send(s.MessageType.Warning,e)}info(e){this.send(s.MessageType.Info,e)}log(e){this.send(s.MessageType.Log,e)}debug(e){this.send(s.MessageType.Debug,e)}send(e,t){this._rawConnection&&this._rawConnection.sendNotification(s.LogMessageNotification.type,{type:e,message:t}).catch((()=>{(0,s.RAL)().console.error("Sending log message failed")}))}}const C=(0,p.ShowDocumentFeature)((0,u.ProgressFeature)(class{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}showErrorMessage(e,...t){const n={type:s.MessageType.Error,message:e,actions:t};return this.connection.sendRequest(s.ShowMessageRequest.type,n).then(R)}showWarningMessage(e,...t){const n={type:s.MessageType.Warning,message:e,actions:t};return this.connection.sendRequest(s.ShowMessageRequest.type,n).then(R)}showInformationMessage(e,...t){const n={type:s.MessageType.Info,message:e,actions:t};return this.connection.sendRequest(s.ShowMessageRequest.type,n).then(R)}}));var w,x;!function(e){e.create=function(){return new P}}(w||(t.BulkRegistration=w={}));class P{_registrations=[];_registered=new Set;add(e,t){const n=a.string(e)?e:e.method;if(this._registered.has(n))throw new Error(`${n} is already added to this registration`);const r=c.generateUuid();this._registrations.push({id:r,method:n,registerOptions:t||{}}),this._registered.add(n)}asRegistrationParams(){return{registrations:this._registrations}}}!function(e){e.create=function(){return new O(void 0,[])}}(x||(t.BulkUnregistration=x={}));class O{_connection;_unregistrations=new Map;constructor(e,t){this._connection=e,t.forEach((e=>{this._unregistrations.set(e.method,e)}))}get isAttached(){return!!this._connection}attach(e){this._connection=e}add(e){this._unregistrations.set(e.method,e)}dispose(){const e=[];for(const t of this._unregistrations.values())e.push(t);const t={unregisterations:e};this._connection.sendRequest(s.UnregistrationRequest.type,t).catch((()=>{this._connection.console.info("Bulk unregistration failed.")}))}disposeSingle(e){const t=a.string(e)?e:e.method,n=this._unregistrations.get(t);if(!n)return!1;const r={unregisterations:[n]};return this._connection.sendRequest(s.UnregistrationRequest.type,r).then((()=>{this._unregistrations.delete(t)}),(e=>{this._connection.console.info(`Un-registering request handler for ${n.id} failed.`)})),!0}}class A{_connection;attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}register(e,t,n){return e instanceof P?this.registerMany(e):e instanceof O?this.registerSingle1(e,t,n):this.registerSingle2(e,t)}registerSingle1(e,t,n){const r=a.string(t)?t:t.method,o=c.generateUuid(),i={registrations:[{id:o,method:r,registerOptions:n||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(s.RegistrationRequest.type,i).then((t=>(e.add({id:o,method:r}),e)),(e=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(e))))}registerSingle2(e,t){const n=a.string(e)?e:e.method,r=c.generateUuid(),o={registrations:[{id:r,method:n,registerOptions:t||{}}]};return this.connection.sendRequest(s.RegistrationRequest.type,o).then((e=>s.Disposable.create((()=>{this.unregisterSingle(r,n).catch((()=>{this.connection.console.info(`Un-registering capability with id ${r} failed.`)}))}))),(e=>(this.connection.console.info(`Registering request handler for ${n} failed.`),Promise.reject(e))))}unregisterSingle(e,t){const n={unregisterations:[{id:e,method:t}]};return this.connection.sendRequest(s.UnregistrationRequest.type,n).catch((()=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)}))}registerMany(e){const t=e.asRegistrationParams();return this.connection.sendRequest(s.RegistrationRequest.type,t).then((()=>new O(this._connection,t.registrations.map((e=>({id:e.id,method:e.method}))))),(e=>(this.connection.console.info("Bulk registration failed."),Promise.reject(e))))}}const E=(0,m.FileOperationsFeature)((0,d.WorkspaceFoldersFeature)((0,l.ConfigurationFeature)(class{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}applyEdit(e){const t=(n=e)&&n.edit?e:{edit:e};var n;return this.connection.sendRequest(s.ApplyWorkspaceEditRequest.type,t)}})));class M{_trace;_connection;constructor(){this._trace=s.Trace.Off}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}set trace(e){this._trace=e}log(e,t){this._trace!==s.Trace.Off&&this.connection.sendNotification(s.LogTraceNotification.type,{message:e,verbose:this._trace===s.Trace.Verbose?t:void 0}).catch((()=>{}))}}class N{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}logEvent(e){this.connection.sendNotification(s.TelemetryEventNotification.type,e).catch((()=>{this.connection.console.log("Sending TelemetryEventNotification failed")}))}}class q{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,u.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,t){return(0,u.attachPartialResult)(this.connection,t)}}t._LanguagesImpl=q;const j=(0,v.FoldingRangeFeature)((0,k.MonikerFeature)((0,D.DiagnosticFeature)((0,_.InlayHintFeature)((0,b.InlineValueFeature)((0,y.TypeHierarchyFeature)((0,g.LinkedEditingRangeFeature)((0,h.SemanticTokensFeature)((0,f.CallHierarchyFeature)(q)))))))));class L{_connection;constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,u.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,t){return(0,u.attachPartialResult)(this.connection,t)}}t._NotebooksImpl=L;const I=(0,T.NotebookSyncFeature)(L);function F(e,t){return function(n){return t(e(n))}}function $(e,t){return function(n){return t(e(n))}}function V(e,t){return function(n){return t(e(n))}}function W(e,t){return function(n){return t(e(n))}}function U(e,t){return function(n){return t(e(n))}}function H(e,t){return function(n){return t(e(n))}}function B(e,t){return function(n){return t(e(n))}}function z(e,t){return function(n){return t(e(n))}}t.combineConsoleFeatures=F,t.combineTelemetryFeatures=$,t.combineTracerFeatures=V,t.combineClientFeatures=W,t.combineWindowFeatures=U,t.combineWorkspaceFeatures=H,t.combineLanguagesFeatures=B,t.combineNotebooksFeatures=z,t.combineFeatures=function(e,t){function n(e,t,n){return e&&t?n(e,t):e||t}return{__brand:"features",console:n(e.console,t.console,F),tracer:n(e.tracer,t.tracer,V),telemetry:n(e.telemetry,t.telemetry,$),client:n(e.client,t.client,W),window:n(e.window,t.window,U),workspace:n(e.workspace,t.workspace,H),languages:n(e.languages,t.languages,B),notebooks:n(e.notebooks,t.notebooks,z)}},t.createConnection=function(e,t,n){const r=n&&n.console?new(n.console(S)):new S,o=e(r);r.rawAttach(o);const i=n&&n.tracer?new(n.tracer(M)):new M,c=n&&n.telemetry?new(n.telemetry(N)):new N,l=n&&n.client?new(n.client(A)):new A,d=n&&n.window?new(n.window(C)):new C,f=n&&n.workspace?new(n.workspace(E)):new E,h=n&&n.languages?new(n.languages(j)):new j,p=n&&n.notebooks?new(n.notebooks(I)):new I,m=[r,i,c,l,d,f,h,p];let g,y,b;const v={listen:()=>o.listen(),sendRequest:(e,...t)=>o.sendRequest(a.string(e)?e:e.method,...t),onRequest:(e,t)=>o.onRequest(e,t),sendNotification:(e,t)=>{const n=a.string(e)?e:e.method;return o.sendNotification(n,t)},onNotification:(e,t)=>o.onNotification(e,t),onProgress:o.onProgress,sendProgress:o.sendProgress,onInitialize:e=>(y=e,{dispose:()=>{y=void 0}}),onInitialized:e=>o.onNotification(s.InitializedNotification.type,e),onShutdown:e=>(g=e,{dispose:()=>{g=void 0}}),onExit:e=>(b=e,{dispose:()=>{b=void 0}}),get console(){return r},get telemetry(){return c},get tracer(){return i},get client(){return l},get window(){return d},get workspace(){return f},get languages(){return h},get notebooks(){return p},onDidChangeConfiguration:e=>o.onNotification(s.DidChangeConfigurationNotification.type,e),onDidChangeWatchedFiles:e=>o.onNotification(s.DidChangeWatchedFilesNotification.type,e),__textDocumentSync:void 0,onDidOpenTextDocument:e=>o.onNotification(s.DidOpenTextDocumentNotification.type,e),onDidChangeTextDocument:e=>o.onNotification(s.DidChangeTextDocumentNotification.type,e),onDidCloseTextDocument:e=>o.onNotification(s.DidCloseTextDocumentNotification.type,e),onWillSaveTextDocument:e=>o.onNotification(s.WillSaveTextDocumentNotification.type,e),onWillSaveTextDocumentWaitUntil:e=>o.onRequest(s.WillSaveTextDocumentWaitUntilRequest.type,e),onDidSaveTextDocument:e=>o.onNotification(s.DidSaveTextDocumentNotification.type,e),sendDiagnostics:e=>o.sendNotification(s.PublishDiagnosticsNotification.type,e),onHover:e=>o.onRequest(s.HoverRequest.type,((t,n)=>e(t,n,(0,u.attachWorkDone)(o,t),void 0))),onCompletion:e=>o.onRequest(s.CompletionRequest.type,((t,n)=>e(t,n,(0,u.attachWorkDone)(o,t),(0,u.attachPartialResult)(o,t)))),onCompletionResolve:e=>o.onRequest(s.CompletionResolveRequest.type,e),onSignatureHelp:e=>o.onRequest(s.SignatureHelpRequest.type,((t,n)=>e(t,n,(0,u.attachWorkDone)(o,t),void 0))),onDeclaration:e=>o.onRequest(s.DeclarationRequest.type,((t,n)=>e(t,n,(0,u.attachWorkDone)(o,t),(0,u.attachPartialResult)(o,t)))),onDefinition:e=>o.onRequest(s.DefinitionRequest.type,((t,n)=>e(t,n,(0,u.attachWorkDone)(o,t),(0,u.attachPartialResult)(o,t)))),onTypeDefinition:e=>o.onRequest(s.TypeDefinitionRequest.type,((t,n)=>e(t,n,(0,u.attachWorkDone)(o,t),(0,u.attachPartialResult)(o,t)))),onImplementation:e=>o.onRequest(s.ImplementationRequest.type,((t,n)=>e(t,n,(0,u.attachWorkDone)(o,t),(0,u.attachPartialResult)(o,t)))),onReferences:e=>o.onRequest(s.ReferencesRequest.type,((t,n)=>e(t,n,(0,u.attachWorkDone)(o,t),(0,u.attachPartialResult)(o,t)))),onDocumentHighlight:e=>o.onRequest(s.DocumentHighlightRequest.type,((t,n)=>e(t,n,(0,u.attachWorkDone)(o,t),(0,u.attachPartialResult)(o,t)))),onDocumentSymbol:e=>o.onRequest(s.DocumentSymbolRequest.type,((t,n)=>e(t,n,(0,u.attachWorkDone)(o,t),(0,u.attachPartialResult)(o,t)))),onWorkspaceSymbol:e=>o.onRequest(s.WorkspaceSymbolRequest.type,((t,n)=>e(t,n,(0,u.attachWorkDone)(o,t),(0,u.attachPartialResult)(o,t)))),onWorkspaceSymbolResolve:e=>o.onRequest(s.WorkspaceSymbolResolveRequest.type,e),onCodeAction:e=>o.onRequest(s.CodeActionRequest.type,((t,n)=>e(t,n,(0,u.attachWorkDone)(o,t),(0,u.attachPartialResult)(o,t)))),onCodeActionResolve:e=>o.onRequest(s.CodeActionResolveRequest.type,((t,n)=>e(t,n))),onCodeLens:e=>o.onRequest(s.CodeLensRequest.type,((t,n)=>e(t,n,(0,u.attachWorkDone)(o,t),(0,u.attachPartialResult)(o,t)))),onCodeLensResolve:e=>o.onRequest(s.CodeLensResolveRequest.type,((t,n)=>e(t,n))),onDocumentFormatting:e=>o.onRequest(s.DocumentFormattingRequest.type,((t,n)=>e(t,n,(0,u.attachWorkDone)(o,t),void 0))),onDocumentRangeFormatting:e=>o.onRequest(s.DocumentRangeFormattingRequest.type,((t,n)=>e(t,n,(0,u.attachWorkDone)(o,t),void 0))),onDocumentOnTypeFormatting:e=>o.onRequest(s.DocumentOnTypeFormattingRequest.type,((t,n)=>e(t,n))),onRenameRequest:e=>o.onRequest(s.RenameRequest.type,((t,n)=>e(t,n,(0,u.attachWorkDone)(o,t),void 0))),onPrepareRename:e=>o.onRequest(s.PrepareRenameRequest.type,((t,n)=>e(t,n))),onDocumentLinks:e=>o.onRequest(s.DocumentLinkRequest.type,((t,n)=>e(t,n,(0,u.attachWorkDone)(o,t),(0,u.attachPartialResult)(o,t)))),onDocumentLinkResolve:e=>o.onRequest(s.DocumentLinkResolveRequest.type,((t,n)=>e(t,n))),onDocumentColor:e=>o.onRequest(s.DocumentColorRequest.type,((t,n)=>e(t,n,(0,u.attachWorkDone)(o,t),(0,u.attachPartialResult)(o,t)))),onColorPresentation:e=>o.onRequest(s.ColorPresentationRequest.type,((t,n)=>e(t,n,(0,u.attachWorkDone)(o,t),(0,u.attachPartialResult)(o,t)))),onFoldingRanges:e=>o.onRequest(s.FoldingRangeRequest.type,((t,n)=>e(t,n,(0,u.attachWorkDone)(o,t),(0,u.attachPartialResult)(o,t)))),onSelectionRanges:e=>o.onRequest(s.SelectionRangeRequest.type,((t,n)=>e(t,n,(0,u.attachWorkDone)(o,t),(0,u.attachPartialResult)(o,t)))),onExecuteCommand:e=>o.onRequest(s.ExecuteCommandRequest.type,((t,n)=>e(t,n,(0,u.attachWorkDone)(o,t),void 0))),dispose:()=>o.dispose()};for(const e of m)e.attach(v);return o.onRequest(s.InitializeRequest.type,(e=>{t.initialize(e),a.string(e.trace)&&(i.trace=s.Trace.fromString(e.trace));for(const t of m)t.initialize(e.capabilities);if(y){const t=y(e,(new s.CancellationTokenSource).token,(0,u.attachWorkDone)(o,e),void 0);return(n=t,n instanceof Promise?n:a.thenable(n)?new Promise(((e,t)=>{n.then((t=>e(t)),(e=>t(e)))})):Promise.resolve(n)).then((e=>{if(e instanceof s.ResponseError)return e;let t=e;t||(t={capabilities:{}});let n=t.capabilities;n||(n={},t.capabilities=n),void 0===n.textDocumentSync||null===n.textDocumentSync?n.textDocumentSync=a.number(v.__textDocumentSync)?v.__textDocumentSync:s.TextDocumentSyncKind.None:a.number(n.textDocumentSync)||a.number(n.textDocumentSync.change)||(n.textDocumentSync.change=a.number(v.__textDocumentSync)?v.__textDocumentSync:s.TextDocumentSyncKind.None);for(const e of m)e.fillServerCapabilities(n);return t}))}{const e={capabilities:{textDocumentSync:s.TextDocumentSyncKind.None}};for(const t of m)t.fillServerCapabilities(e.capabilities);return e}var n})),o.onRequest(s.ShutdownRequest.type,(()=>(t.shutdownReceived=!0,g?g((new s.CancellationTokenSource).token):void 0))),o.onNotification(s.ExitNotification.type,(()=>{try{if(b)return b()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}})),o.onNotification(s.SetTraceNotification.type,(e=>{i.trace=s.Trace.fromString(e.value)})),v}},8817:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentFeature=void 0;const r=n(8766);t.ShowDocumentFeature=e=>class extends e{showDocument(e){return this.connection.sendRequest(r.ShowDocumentRequest.type,e)}}},9202:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextDocumentContentFeature=void 0;const r=n(8766);t.TextDocumentContentFeature=e=>class extends e{get textDocumentContent(){return{refresh:e=>this.connection.sendRequest(r.TextDocumentContentRefreshRequest.type,{uri:e}),on:e=>this.connection.onRequest(r.TextDocumentContentRequest.type,((t,n)=>e(t,n)))}}}},1662:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextDocuments=void 0;const r=n(8766);t.TextDocuments=class{_configuration;_syncedDocuments;_onDidChangeContent;_onDidOpen;_onDidClose;_onDidSave;_onWillSave;_willSaveWaitUntil;constructor(e){this._configuration=e,this._syncedDocuments=new Map,this._onDidChangeContent=new r.Emitter,this._onDidOpen=new r.Emitter,this._onDidClose=new r.Emitter,this._onDidSave=new r.Emitter,this._onWillSave=new r.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(e){this._willSaveWaitUntil=e}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(e){return this._syncedDocuments.get(e)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(e){e.__textDocumentSync=r.TextDocumentSyncKind.Incremental;const t=[];return t.push(e.onDidOpenTextDocument((e=>{const t=e.textDocument,n=this._configuration.create(t.uri,t.languageId,t.version,t.text);this._syncedDocuments.set(t.uri,n);const r=Object.freeze({document:n});this._onDidOpen.fire(r),this._onDidChangeContent.fire(r)}))),t.push(e.onDidChangeTextDocument((e=>{const t=e.textDocument,n=e.contentChanges;if(0===n.length)return;const{version:r}=t;if(null==r)throw new Error(`Received document change event for ${t.uri} without valid version identifier`);let o=this._syncedDocuments.get(t.uri);void 0!==o&&(o=this._configuration.update(o,n,r),this._syncedDocuments.set(t.uri,o),this._onDidChangeContent.fire(Object.freeze({document:o})))}))),t.push(e.onDidCloseTextDocument((e=>{const t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&(this._syncedDocuments.delete(e.textDocument.uri),this._onDidClose.fire(Object.freeze({document:t})))}))),t.push(e.onWillSaveTextDocument((e=>{const t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&this._onWillSave.fire(Object.freeze({document:t,reason:e.reason}))}))),t.push(e.onWillSaveTextDocumentWaitUntil(((e,t)=>{const n=this._syncedDocuments.get(e.textDocument.uri);return void 0!==n&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:n,reason:e.reason}),t):[]}))),t.push(e.onDidSaveTextDocument((e=>{const t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&this._onDidSave.fire(Object.freeze({document:t}))}))),r.Disposable.create((()=>{t.forEach((e=>e.dispose()))}))}}},5026:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchyFeature=void 0;const r=n(8766);t.TypeHierarchyFeature=e=>class extends e{get typeHierarchy(){return{onPrepare:e=>this.connection.onRequest(r.TypeHierarchyPrepareRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0))),onSupertypes:e=>{const t=r.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onSubtypes:e=>{const t=r.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(t,((n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},1248:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e){return"function"==typeof e}function o(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.thenable=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=r,t.array=o,t.stringArray=function(e){return o(e)&&e.every((e=>n(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=function(e){return e&&r(e.then)}},6116:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateUuid=t.parse=t.isUUID=t.v4=t.empty=void 0;class n{_value;constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class r extends n{static _chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];static _timeHighBits=["8","9","a","b"];static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return r._oneOf(r._chars)}constructor(){super([r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),"-",r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),"-","4",r._randomHex(),r._randomHex(),r._randomHex(),"-",r._oneOf(r._timeHighBits),r._randomHex(),r._randomHex(),r._randomHex(),"-",r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex()].join(""))}}function o(){return new r}t.empty=new n("00000000-0000-0000-0000-000000000000"),t.v4=o;const i=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function s(e){return i.test(e)}t.isUUID=s,t.parse=function(e){if(!s(e))throw new Error("invalid uuid");return new n(e)},t.generateUuid=function(){return o().asHex()}},2112:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=void 0;const r=n(8766);t.WorkspaceFoldersFeature=e=>class extends e{_onDidChangeWorkspaceFolders;_unregistration;_notificationIsAutoRegistered;constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(e){super.initialize(e);const t=e.workspace;t&&t.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new r.Emitter,this.connection.onNotification(r.DidChangeWorkspaceFoldersNotification.type,(e=>{this._onDidChangeWorkspaceFolders.fire(e.event)})))}fillServerCapabilities(e){super.fillServerCapabilities(e);const t=e.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=!0===t||"string"==typeof t}getWorkspaceFolders(){return this.connection.sendRequest(r.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return this._notificationIsAutoRegistered||this._unregistration||(this._unregistration=this.connection.client.register(r.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}}},8945:function(e){var t;t=()=>(()=>{"use strict";var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",o=0,i=-1,s=0,a=0;a<=e.length;++a){if(a<e.length)n=e.charCodeAt(a);else{if(47===n)break;n=47}if(47===n){if(i===a-1||1===s);else if(i!==a-1&&2===s){if(r.length<2||2!==o||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",o=0):o=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),i=a,s=0;continue}}else if(2===r.length||1===r.length){r="",o=0,i=a,s=0;continue}t&&(r.length>0?r+="/..":r="..",o=2)}else r.length>0?r+="/"+e.slice(i+1,a):r=e.slice(i+1,a),o=a-i-1;i=a,s=0}else 46===n&&-1!==s?++s:s=-1}return r}var r={resolve:function(){for(var e,r="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var s;i>=0?s=arguments[i]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(r=s+"/"+r,o=47===s.charCodeAt(0))}return r=n(r,!o),o?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),o=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&o&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var o=arguments[n];t(o),o.length>0&&(void 0===e?e=o:e+="/"+o)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var o=1;o<e.length&&47===e.charCodeAt(o);++o);for(var i=e.length,s=i-o,a=1;a<n.length&&47===n.charCodeAt(a);++a);for(var c=n.length-a,u=s<c?s:c,l=-1,d=0;d<=u;++d){if(d===u){if(c>u){if(47===n.charCodeAt(a+d))return n.slice(a+d+1);if(0===d)return n.slice(a+d)}else s>u&&(47===e.charCodeAt(o+d)?l=d:0===d&&(l=0));break}var f=e.charCodeAt(o+d);if(f!==n.charCodeAt(a+d))break;47===f&&(l=d)}var h="";for(d=o+l+1;d<=i;++d)d!==i&&47!==e.charCodeAt(d)||(0===h.length?h+="..":h+="/..");return h.length>0?h+n.slice(a+l):(a+=l,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,o=-1,i=!0,s=e.length-1;s>=1;--s)if(47===(n=e.charCodeAt(s))){if(!i){o=s;break}}else i=!1;return-1===o?r?"/":".":r&&1===o?"//":e.slice(0,o)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,o=0,i=-1,s=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var u=e.charCodeAt(r);if(47===u){if(!s){o=r+1;break}}else-1===c&&(s=!1,c=r+1),a>=0&&(u===n.charCodeAt(a)?-1==--a&&(i=r):(a=-1,i=c))}return o===i?i=c:-1===i&&(i=e.length),e.slice(o,i)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!s){o=r+1;break}}else-1===i&&(s=!1,i=r+1);return-1===i?"":e.slice(o,i)},extname:function(e){t(e);for(var n=-1,r=0,o=-1,i=!0,s=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===o&&(i=!1,o=a+1),46===c?-1===n?n=a:1!==s&&(s=1):-1!==n&&(s=-1);else if(!i){r=a+1;break}}return-1===n||-1===o||0===s||1===s&&n===o-1&&n===r+1?"":e.slice(n,o)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,o=e.charCodeAt(0),i=47===o;i?(n.root="/",r=1):r=0;for(var s=-1,a=0,c=-1,u=!0,l=e.length-1,d=0;l>=r;--l)if(47!==(o=e.charCodeAt(l)))-1===c&&(u=!1,c=l+1),46===o?-1===s?s=l:1!==d&&(d=1):-1!==s&&(d=-1);else if(!u){a=l+1;break}return-1===s||-1===c||0===d||1===d&&s===c-1&&s===a+1?-1!==c&&(n.base=n.name=0===a&&i?e.slice(1,c):e.slice(a,c)):(0===a&&i?(n.name=e.slice(1,s),n.base=e.slice(1,c)):(n.name=e.slice(a,s),n.base=e.slice(a,c)),n.ext=e.slice(s,c)),a>0?n.dir=e.slice(0,a-1):i&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r},674:(e,t)=>{if(Object.defineProperty(t,"__esModule",{value:!0}),t.isWindows=void 0,"object"==typeof process)t.isWindows=!1;else if("object"==typeof navigator){let e=navigator.userAgent;t.isWindows=e.indexOf("Windows")>=0}},796:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.uriToFsPath=t.URI=void 0;const r=n(674),o=/^\w[\w\d+.-]*$/,i=/^\//,s=/^\/\//;function a(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!o.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!i.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(s.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const c="",u="/",l=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static isUri(e){return e instanceof d||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,r,o,i=!1){"object"==typeof e?(this.scheme=e.scheme||c,this.authority=e.authority||c,this.path=e.path||c,this.query=e.query||c,this.fragment=e.fragment||c):(this.scheme=function(e,t){return e||t?e:"file"}(e,i),this.authority=t||c,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==u&&(t=u+t):t=u}return t}(this.scheme,n||c),this.query=r||c,this.fragment=o||c,a(this,i))}get fsPath(){return y(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:o,fragment:i}=e;return void 0===t?t=this.scheme:null===t&&(t=c),void 0===n?n=this.authority:null===n&&(n=c),void 0===r?r=this.path:null===r&&(r=c),void 0===o?o=this.query:null===o&&(o=c),void 0===i?i=this.fragment:null===i&&(i=c),t===this.scheme&&n===this.authority&&r===this.path&&o===this.query&&i===this.fragment?this:new h(t,n,r,o,i)}static parse(e,t=!1){const n=l.exec(e);return n?new h(n[2]||c,D(n[4]||c),D(n[5]||c),D(n[7]||c),D(n[9]||c),t):new h(c,c,c,c,c)}static file(e){let t=c;if(r.isWindows&&(e=e.replace(/\\/g,u)),e[0]===u&&e[1]===u){const n=e.indexOf(u,2);-1===n?(t=e.substring(2),e=u):(t=e.substring(2,n),e=e.substring(n)||u)}return new h("file",t,e,c,c)}static from(e){const t=new h(e.scheme,e.authority,e.path,e.query,e.fragment);return a(t,!0),t}toString(e=!1){return b(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof d)return e;{const t=new h(e);return t._formatted=e.external,t._fsPath=e._sep===f?e.fsPath:null,t}}return e}}t.URI=d;const f=r.isWindows?1:void 0;class h extends d{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=y(this,!1)),this._fsPath}toString(e=!1){return e?b(this,!0):(this._formatted||(this._formatted=b(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=f),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const p={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function m(e,t,n){let r,o=-1;for(let i=0;i<e.length;i++){const s=e.charCodeAt(i);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||t&&47===s||n&&91===s||n&&93===s||n&&58===s)-1!==o&&(r+=encodeURIComponent(e.substring(o,i)),o=-1),void 0!==r&&(r+=e.charAt(i));else{void 0===r&&(r=e.substr(0,i));const t=p[s];void 0!==t?(-1!==o&&(r+=encodeURIComponent(e.substring(o,i)),o=-1),r+=t):-1===o&&(o=i)}}return-1!==o&&(r+=encodeURIComponent(e.substring(o))),void 0!==r?r:e}function g(e){let t;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);35===r||63===r?(void 0===t&&(t=e.substr(0,n)),t+=p[r]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function y(e,t){let n;return n=e.authority&&e.path.length>1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,r.isWindows&&(n=n.replace(/\//g,"\\")),n}function b(e,t){const n=t?g:m;let r="",{scheme:o,authority:i,path:s,query:a,fragment:c}=e;if(o&&(r+=o,r+=":"),(i||"file"===o)&&(r+=u,r+=u),i){let e=i.indexOf("@");if(-1!==e){const t=i.substr(0,e);i=i.substr(e+1),e=t.lastIndexOf(":"),-1===e?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=":",r+=n(t.substr(e+1),!1,!0)),r+="@"}i=i.toLowerCase(),e=i.lastIndexOf(":"),-1===e?r+=n(i,!1,!0):(r+=n(i.substr(0,e),!1,!0),r+=i.substr(e))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const e=s.charCodeAt(1);e>=65&&e<=90&&(s=`/${String.fromCharCode(e+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const e=s.charCodeAt(0);e>=65&&e<=90&&(s=`${String.fromCharCode(e+32)}:${s.substr(2)}`)}r+=n(s,!0,!1)}return a&&(r+="?",r+=n(a,!1,!1)),c&&(r+="#",r+=t?c:m(c,!1,!1)),r}function v(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+v(e.substr(3)):e}}t.uriToFsPath=y;const _=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function D(e){return e.match(_)?e.replace(_,(e=>v(e))):e}},679:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Utils=void 0;const s=i(n(470)),a=s.posix||s,c="/";var u;!function(e){e.joinPath=function(e,...t){return e.with({path:a.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==c&&(n=c+n,r=!0);let o=a.resolve(n,...t);return r&&o[0]===c&&!e.authority&&(o=o.substring(1)),e.with({path:o})},e.dirname=function(e){if(0===e.path.length||e.path===c)return e;let t=a.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return a.basename(e.path)},e.extname=function(e){return a.extname(e.path)}}(u||(t.Utils=u={}))}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}var r={};return(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.Utils=e.URI=void 0;const t=n(796);Object.defineProperty(e,"URI",{enumerable:!0,get:function(){return t.URI}});const o=n(679);Object.defineProperty(e,"Utils",{enumerable:!0,get:function(){return o.Utils}})})(),r})(),e.exports=t()},7662:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(8867),o=n(6694),i=new r.BrowserMessageReader(self),s=new r.BrowserMessageWriter(self),a=(0,r.createConnection)(i,s);console.log=a.console.log.bind(a.console),console.error=a.console.error.bind(a.console);const c={timer:{setImmediate(e,...t){const n=setTimeout(e,0,...t);return{dispose:()=>clearTimeout(n)}},setTimeout(e,t,...n){const r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}}}};(0,o.startServer)(a,c)},4228:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=i(n(3608));let a=!1;const c=[],u=async e=>{if(a)c.push(e);else{const t=[];a=!0;const r=e.data.i10lLocation;if(r)try{await s.config({uri:r}),t.push(`l10n: Configured to ${r.toString()}.`)}catch(e){t.push(`l10n: Problems loading ${r.toString()} : ${e}.`)}else t.push("l10n: No bundle configured.");await Promise.resolve().then(n.bind(n,7662)),self.onmessage!==u&&(c.forEach((e=>self.onmessage?.(e))),c.length=0),t.forEach(console.log)}};self.onmessage=u},6694:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.startServer=function(e,t){function n(n=["https","http","file"]){const r={};for(const e of n)"file"===e?r[e]=t.file:"http"!==e&&"https"!==e||(r[e]=t.http);return t=>{const n=t.substr(0,t.indexOf(":")),o=r[n];return o?o.getContent(t):e.sendRequest(p.type,t).then((e=>e),(e=>Promise.reject(e.message)))}}let r=(0,u.getLanguageService)({workspaceContext:v,contributions:[],clientCapabilities:u.ClientCapabilities.LATEST});const o=new s.TextDocuments(u.TextDocument);o.listen(e);let i,d=!1,D=!1,T=!1,k=Number.MAX_VALUE,R=Number.MAX_VALUE,S=Number.MAX_VALUE,C=Number.MAX_VALUE,w=Number.MAX_VALUE,x=Number.MAX_VALUE,P=Number.MAX_VALUE;e.onInitialize((a=>{const l=a.initializationOptions||{},f=l?.handledSchemaProtocols;function h(e,t){const n=e.split(".");let r=a.capabilities;for(let e=0;r&&e<n.length;e++){if(!r.hasOwnProperty(n[e]))return t;r=r[n[e]]}return r}r=(0,u.getLanguageService)({schemaRequestService:n(f),workspaceContext:v,contributions:[],clientCapabilities:a.capabilities}),d=h("textDocument.completion.completionItem.snippetSupport",!1),D=h("textDocument.rangeFormatting.dynamicRegistration",!1)&&"boolean"!=typeof l.provideFormatter,k=h("textDocument.foldingRange.rangeLimit",Number.MAX_VALUE),T=h("textDocument.documentSymbol.hierarchicalDocumentSymbolSupport",!1),P=l.customCapabilities?.rangeFormatting?.editLimit||Number.MAX_VALUE;const p=h("textDocument.diagnostic",void 0);return i=void 0===p?(0,c.registerDiagnosticsPushSupport)(o,e,t,j):(0,c.registerDiagnosticsPullSupport)(o,e,t,j),{capabilities:{textDocumentSync:s.TextDocumentSyncKind.Incremental,completionProvider:d?{resolveProvider:!1,triggerCharacters:['"',":"]}:void 0,hoverProvider:!0,documentSymbolProvider:!0,documentRangeFormattingProvider:!0===l.provideFormatter,documentFormattingProvider:!0===l.provideFormatter,colorProvider:{},foldingRangeProvider:!0,selectionRangeProvider:!0,documentLinkProvider:{},diagnosticProvider:{documentSelector:null,interFileDependencies:!1,workspaceDiagnostics:!1},codeActionProvider:!0}}}));let O,A,E=null,M=!0,N=!1;function q(){const e={validate:M,allowComments:!0,schemas:new Array};if(A)if(Array.isArray(A))Array.prototype.push.apply(e.schemas,A);else for(const t in A){const n=A[t];Array.isArray(n)&&n.forEach((n=>{e.schemas.push({uri:n,fileMatch:[t]})}))}O&&O.forEach(((t,n)=>{let r=t.url;!r&&t.schema&&(r=t.schema.id||`vscode://schemas/custom/${n}`),r&&e.schemas.push({uri:r,fileMatch:t.fileMatch,schema:t.schema,folderUri:t.folderUri})})),r.configure(e),i?.requestRefresh()}async function j(e){if(0===e.getText().length)return[];const t=I(e),n="jsonc"===e.languageId?{comments:"ignore",trailingCommas:"warning"}:{comments:"error",trailingCommas:"error"};return await r.doValidation(e,t,n)}e.onDidChangeConfiguration((n=>{const r=n.settings;t.configureHttpRequests?.(r?.http?.proxy,!!r.http?.proxyStrictSSL),O=r.json?.schemas,M=!!r.json?.validate?.enable,N=r.json?.keepLines?.enable||!1,q();const o=e=>Math.trunc(Math.max(e,0));if(R=o(r.json?.resultLimit||Number.MAX_VALUE),S=o(r.json?.jsonFoldingLimit||k),C=o(r.json?.jsoncFoldingLimit||k),w=o(r.json?.jsonColorDecoratorLimit||Number.MAX_VALUE),x=o(r.json?.jsoncColorDecoratorLimit||Number.MAX_VALUE),D){const t=r.json?.format?.enable;if(t){if(!E){const t=[{language:"json"},{language:"jsonc"}];E=[e.client.register(s.DocumentRangeFormattingRequest.type,{documentSelector:t}),e.client.register(s.DocumentFormattingRequest.type,{documentSelector:t})]}}else E&&(E.forEach((e=>e.then((e=>e.dispose())))),E=null)}})),e.onNotification(h.type,(e=>{A=e,q()})),e.onNotification(m.type,(e=>{let t=!1;if(Array.isArray(e))for(const n of e)r.resetSchema(n)&&(t=!0);else t=r.resetSchema(e);t&&i?.requestRefresh()})),e.onRequest(g.type,(async e=>{const t=o.get(e);return t?(q(),await j(t)):[]})),e.onRequest(y.type,(async e=>{const t=o.get(e);if(t){const e=I(t);return r.getLanguageStatus(t,e)}return{schemas:[]}})),e.onRequest(b.type,(async e=>{const t=e.uri,n=e.options,i=o.get(t);return i?r.sort(i,n):[]})),e.onDidChangeWatchedFiles((e=>{let t=!1;e.changes.forEach((e=>{r.resetSchema(e.uri)&&(t=!0)})),t&&i?.requestRefresh()}));const L=(0,l.getLanguageModelCache)(10,60,(e=>r.parseJSONDocument(e)));function I(e){return L.get(e)}function F(e,t,n){n.keepLines=N;const i=o.get(e.uri);if(i){const e=r.format(i,t??_(i),n);if(e.length>P){const t=u.TextDocument.applyEdits(i,e);return[s.TextEdit.replace(_(i),t)]}return e}return[]}o.onDidClose((e=>{L.onDocumentRemoved(e.document)})),e.onShutdown((()=>{L.dispose()})),e.onCompletion(((e,n)=>(0,a.runSafeAsync)(t,(async()=>{const t=o.get(e.textDocument.uri);if(t){const n=I(t);return r.doComplete(t,e.position,n)}return null}),null,`Error while computing completions for ${e.textDocument.uri}`,n))),e.onHover(((e,n)=>(0,a.runSafeAsync)(t,(async()=>{const t=o.get(e.textDocument.uri);if(t){const n=I(t);return r.doHover(t,e.position,n)}return null}),null,`Error while computing hover for ${e.textDocument.uri}`,n))),e.onDocumentSymbol(((e,n)=>(0,a.runSafe)(t,(()=>{const t=o.get(e.textDocument.uri);if(t){const e=I(t);return T?r.findDocumentSymbols2(t,e,{resultLimit:R}):r.findDocumentSymbols(t,e,{resultLimit:R})}return[]}),[],`Error while computing document symbols for ${e.textDocument.uri}`,n))),e.onCodeAction(((e,n)=>(0,a.runSafeAsync)(t,(async()=>{if(o.get(e.textDocument.uri)){const e=s.CodeAction.create("Sort JSON",s.CodeActionKind.Source.concat(".sort",".json"));return e.command={command:"json.sort",title:f.t("Sort JSON")},[e]}return[]}),[],`Error while computing code actions for ${e.textDocument.uri}`,n))),e.onDocumentRangeFormatting(((e,n)=>(0,a.runSafe)(t,(()=>F(e.textDocument,e.range,e.options)),[],`Error while formatting range for ${e.textDocument.uri}`,n))),e.onDocumentFormatting(((e,n)=>(0,a.runSafe)(t,(()=>F(e.textDocument,void 0,e.options)),[],`Error while formatting ${e.textDocument.uri}`,n))),e.onDocumentColor(((e,n)=>(0,a.runSafeAsync)(t,(async()=>{const t=o.get(e.textDocument.uri);if(t){const e=I(t),n="jsonc"===t.languageId?x:w;return r.findDocumentColors(t,e,{resultLimit:n})}return[]}),[],`Error while computing document colors for ${e.textDocument.uri}`,n))),e.onColorPresentation(((e,n)=>(0,a.runSafe)(t,(()=>{const t=o.get(e.textDocument.uri);if(t){const n=I(t);return r.getColorPresentations(t,n,e.color,e.range)}return[]}),[],`Error while computing color presentations for ${e.textDocument.uri}`,n))),e.onFoldingRanges(((e,n)=>(0,a.runSafe)(t,(()=>{const t=o.get(e.textDocument.uri);if(t){const e="jsonc"===t.languageId?C:S;return r.getFoldingRanges(t,{rangeLimit:e})}return null}),null,`Error while computing folding ranges for ${e.textDocument.uri}`,n))),e.onSelectionRanges(((e,n)=>(0,a.runSafe)(t,(()=>{const t=o.get(e.textDocument.uri);if(t){const n=I(t);return r.getSelectionRanges(t,e.positions,n)}return[]}),[],`Error while computing selection ranges for ${e.textDocument.uri}`,n))),e.onDocumentLinks(((e,n)=>(0,a.runSafeAsync)(t,(async()=>{const t=o.get(e.textDocument.uri);if(t){const e=I(t);return r.findLinks(t,e)}return[]}),[],`Error while computing links for ${e.textDocument.uri}`,n))),e.listen()};const s=n(2861),a=n(211),c=n(9178),u=n(4271),l=n(5908),d=n(8945),f=i(n(3608));var h,p,m,g,y,b;!function(e){e.type=new s.NotificationType("json/schemaAssociations")}(h||(h={})),function(e){e.type=new s.RequestType("vscode/content")}(p||(p={})),function(e){e.type=new s.NotificationType("json/schemaContent")}(m||(m={})),function(e){e.type=new s.RequestType("json/validate")}(g||(g={})),function(e){e.type=new s.RequestType("json/languageStatus")}(y||(y={})),function(e){e.type=new s.RequestType("json/sort")}(b||(b={}));const v={resolveRelativePath:(e,t)=>{const n=t.substring(0,t.lastIndexOf("/")+1);return d.Utils.resolvePath(d.URI.parse(n),e).toString()}};function _(e){return u.Range.create(u.Position.create(0,0),e.positionAt(e.getText().length))}},5908:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLanguageModelCache=function(e,t,n){let r,o={},i=0;return t>0&&(r=setInterval((()=>{const e=Date.now()-1e3*t,n=Object.keys(o);for(const t of n)o[t].cTime<e&&(delete o[t],i--)}),1e3*t)),{get(t){const r=t.version,s=t.languageId,a=o[t.uri];if(a&&a.version===r&&a.languageId===s)return a.cTime=Date.now(),a.languageModel;const c=n(t);if(o[t.uri]={languageModel:c,version:r,languageId:s,cTime:Date.now()},a||i++,i===e){let e=Number.MAX_VALUE,t=null;for(const n in o){const r=o[n];r.cTime<e&&(t=n,e=r.cTime)}t&&(delete o[t],i--)}return c},onDocumentRemoved(e){const t=e.uri;o[t]&&(delete o[t],i--)},dispose(){void 0!==r&&(clearInterval(r),r=void 0,o={},i=0)}}}},211:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatError=o,t.runSafeAsync=function(e,t,n,r,s){return new Promise((a=>{e.timer.setImmediate((()=>{if(!s.isCancellationRequested)return t().then((e=>{s.isCancellationRequested?a(i()):a(e)}),(e=>{console.error(o(r,e)),a(n)}));a(i())}))}))},t.runSafe=function(e,t,n,r,s){return new Promise((a=>{e.timer.setImmediate((()=>{if(s.isCancellationRequested)a(i());else try{const e=t();if(s.isCancellationRequested)return void a(i());a(e)}catch(e){console.error(o(r,e)),a(n)}}))}))};const r=n(2861);function o(e,t){if(t instanceof Error){const n=t;return`${e}: ${n.message}\n${n.stack}`}return"string"==typeof t?`${e}: ${t}`:t?`${e}: ${t.toString()}`:e}function i(){return console.log("cancelled"),new r.ResponseError(r.LSPErrorCodes.RequestCancelled,"Request cancelled")}},9178:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerDiagnosticsPushSupport=function(e,t,n,r){const i={},s=[];function a(e){const t=i[e.uri];t&&(t.dispose(),delete i[e.uri])}function c(e){a(e);const s=i[e.uri]=n.timer.setTimeout((async()=>{if(s===i[e.uri])try{const n=await r(e);s===i[e.uri]&&t.sendDiagnostics({uri:e.uri,diagnostics:n}),delete i[e.uri]}catch(n){t.console.error((0,o.formatError)(`Error while validating ${e.uri}`,n))}}),500)}return e.onDidChangeContent((e=>{c(e.document)}),void 0,s),e.onDidClose((e=>{a(e.document),t.sendDiagnostics({uri:e.document.uri,diagnostics:[]})}),void 0,s),{requestRefresh:()=>{e.all().forEach(c)},dispose:()=>{s.forEach((e=>e.dispose())),s.length=0;const e=Object.keys(i);for(const t of e)i[t].dispose(),delete i[t]}}},t.registerDiagnosticsPullSupport=function(e,t,n,i){function s(e){return{kind:r.DocumentDiagnosticReportKind.Full,items:e}}const a=t.languages.diagnostics.on((async(t,r)=>(0,o.runSafeAsync)(n,(async()=>{const n=e.get(t.textDocument.uri);return s(n?await i(n):[])}),s([]),`Error while computing diagnostics for ${t.textDocument.uri}`,r)));return{requestRefresh:function(){t.languages.diagnostics.refresh()},dispose:()=>{a.dispose()}}};const r=n(2861),o=n(211)},4292:(e,t,n)=>{"use strict";var r,o,i,s,a,c,u,l,d,f,h,p,m,g,y,b,v,_,D,T,k,R,S,C,w,x,P,O,A,E,M,N,q,j,L,I,F,$,V,W,U,H,B,z,K,J,X,G,Z,Q,Y,ee,te,ne,re,oe,ie,se,ae,ce,ue,le,de,fe,he,pe,me,ge,ye,be,ve,_e,De,Te,ke,Re,Se,Ce,we,xe;n.r(t),n.d(t,{AnnotatedTextEdit:()=>S,ChangeAnnotation:()=>k,ChangeAnnotationIdentifier:()=>R,CodeAction:()=>ae,CodeActionContext:()=>se,CodeActionKind:()=>oe,CodeActionTriggerKind:()=>ie,CodeDescription:()=>v,CodeLens:()=>ce,Color:()=>d,ColorInformation:()=>f,ColorPresentation:()=>h,Command:()=>D,CompletionItem:()=>B,CompletionItemKind:()=>F,CompletionItemLabelDetails:()=>H,CompletionItemTag:()=>V,CompletionList:()=>z,CreateFile:()=>w,DeleteFile:()=>P,Diagnostic:()=>_,DiagnosticRelatedInformation:()=>g,DiagnosticSeverity:()=>y,DiagnosticTag:()=>b,DocumentHighlight:()=>Q,DocumentHighlightKind:()=>Z,DocumentLink:()=>le,DocumentSymbol:()=>re,DocumentUri:()=>r,EOL:()=>Ee,FoldingRange:()=>m,FoldingRangeKind:()=>p,FormattingOptions:()=>ue,Hover:()=>J,InlayHint:()=>De,InlayHintKind:()=>ve,InlayHintLabelPart:()=>_e,InlineCompletionContext:()=>we,InlineCompletionItem:()=>ke,InlineCompletionList:()=>Re,InlineCompletionTriggerKind:()=>Se,InlineValueContext:()=>be,InlineValueEvaluatableExpression:()=>ye,InlineValueText:()=>me,InlineValueVariableLookup:()=>ge,InsertReplaceEdit:()=>W,InsertTextFormat:()=>$,InsertTextMode:()=>U,LanguageKind:()=>q,Location:()=>u,LocationLink:()=>l,MarkedString:()=>K,MarkupContent:()=>I,MarkupKind:()=>L,OptionalVersionedTextDocumentIdentifier:()=>N,ParameterInformation:()=>X,Position:()=>a,Range:()=>c,RenameFile:()=>x,SelectedCompletionInfo:()=>Ce,SelectionRange:()=>de,SemanticTokenModifiers:()=>he,SemanticTokenTypes:()=>fe,SemanticTokens:()=>pe,SignatureInformation:()=>G,SnippetTextEdit:()=>A,StringValue:()=>Te,SymbolInformation:()=>te,SymbolKind:()=>Y,SymbolTag:()=>ee,TextDocument:()=>Me,TextDocumentEdit:()=>C,TextDocumentIdentifier:()=>E,TextDocumentItem:()=>j,TextEdit:()=>T,URI:()=>o,VersionedTextDocumentIdentifier:()=>M,WorkspaceChange:()=>Ae,WorkspaceEdit:()=>O,WorkspaceFolder:()=>xe,WorkspaceSymbol:()=>ne,integer:()=>i,uinteger:()=>s}),function(e){e.is=function(e){return"string"==typeof e}}(r||(r={})),function(e){e.is=function(e){return"string"==typeof e}}(o||(o={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(i||(i={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(s||(s={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=s.MAX_VALUE),t===Number.MAX_VALUE&&(t=s.MAX_VALUE),{line:e,character:t}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&Ne.uinteger(t.line)&&Ne.uinteger(t.character)}}(a||(a={})),function(e){e.create=function(e,t,n,r){if(Ne.uinteger(e)&&Ne.uinteger(t)&&Ne.uinteger(n)&&Ne.uinteger(r))return{start:a.create(e,t),end:a.create(n,r)};if(a.is(e)&&a.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&a.is(t.start)&&a.is(t.end)}}(c||(c={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&c.is(t.range)&&(Ne.string(t.uri)||Ne.undefined(t.uri))}}(u||(u={})),function(e){e.create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&c.is(t.targetRange)&&Ne.string(t.targetUri)&&c.is(t.targetSelectionRange)&&(c.is(t.originSelectionRange)||Ne.undefined(t.originSelectionRange))}}(l||(l={})),function(e){e.create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&Ne.numberRange(t.red,0,1)&&Ne.numberRange(t.green,0,1)&&Ne.numberRange(t.blue,0,1)&&Ne.numberRange(t.alpha,0,1)}}(d||(d={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&c.is(t.range)&&d.is(t.color)}}(f||(f={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&Ne.string(t.label)&&(Ne.undefined(t.textEdit)||T.is(t))&&(Ne.undefined(t.additionalTextEdits)||Ne.typedArray(t.additionalTextEdits,T.is))}}(h||(h={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(p||(p={})),function(e){e.create=function(e,t,n,r,o,i){const s={startLine:e,endLine:t};return Ne.defined(n)&&(s.startCharacter=n),Ne.defined(r)&&(s.endCharacter=r),Ne.defined(o)&&(s.kind=o),Ne.defined(i)&&(s.collapsedText=i),s},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&Ne.uinteger(t.startLine)&&Ne.uinteger(t.startLine)&&(Ne.undefined(t.startCharacter)||Ne.uinteger(t.startCharacter))&&(Ne.undefined(t.endCharacter)||Ne.uinteger(t.endCharacter))&&(Ne.undefined(t.kind)||Ne.string(t.kind))}}(m||(m={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){const t=e;return Ne.defined(t)&&u.is(t.location)&&Ne.string(t.message)}}(g||(g={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(y||(y={})),function(e){e.Unnecessary=1,e.Deprecated=2}(b||(b={})),function(e){e.is=function(e){const t=e;return Ne.objectLiteral(t)&&Ne.string(t.href)}}(v||(v={})),function(e){e.create=function(e,t,n,r,o,i){const s={range:e,message:t};return Ne.defined(n)&&(s.severity=n),Ne.defined(r)&&(s.code=r),Ne.defined(o)&&(s.source=o),Ne.defined(i)&&(s.relatedInformation=i),s},e.is=function(e){var t;const n=e;return Ne.defined(n)&&c.is(n.range)&&Ne.string(n.message)&&(Ne.number(n.severity)||Ne.undefined(n.severity))&&(Ne.integer(n.code)||Ne.string(n.code)||Ne.undefined(n.code))&&(Ne.undefined(n.codeDescription)||Ne.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(Ne.string(n.source)||Ne.undefined(n.source))&&(Ne.undefined(n.relatedInformation)||Ne.typedArray(n.relatedInformation,g.is))}}(_||(_={})),function(e){e.create=function(e,t,...n){const r={title:e,command:t};return Ne.defined(n)&&n.length>0&&(r.arguments=n),r},e.is=function(e){const t=e;return Ne.defined(t)&&Ne.string(t.title)&&(void 0===t.tooltip||Ne.string(t.tooltip))&&Ne.string(t.command)}}(D||(D={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&Ne.string(t.newText)&&c.is(t.range)}}(T||(T={})),function(e){e.create=function(e,t,n){const r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&Ne.string(t.label)&&(Ne.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Ne.string(t.description)||void 0===t.description)}}(k||(k={})),function(e){e.is=function(e){const t=e;return Ne.string(t)}}(R||(R={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){const t=e;return T.is(t)&&(k.is(t.annotationId)||R.is(t.annotationId))}}(S||(S={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){const t=e;return Ne.defined(t)&&N.is(t.textDocument)&&Array.isArray(t.edits)}}(C||(C={})),function(e){e.create=function(e,t,n){const r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){const t=e;return t&&"create"===t.kind&&Ne.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Ne.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ne.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||R.is(t.annotationId))}}(w||(w={})),function(e){e.create=function(e,t,n,r){const o={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(o.options=n),void 0!==r&&(o.annotationId=r),o},e.is=function(e){const t=e;return t&&"rename"===t.kind&&Ne.string(t.oldUri)&&Ne.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Ne.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ne.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||R.is(t.annotationId))}}(x||(x={})),function(e){e.create=function(e,t,n){const r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){const t=e;return t&&"delete"===t.kind&&Ne.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Ne.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Ne.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||R.is(t.annotationId))}}(P||(P={})),function(e){e.is=function(e){const t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((e=>Ne.string(e.kind)?w.is(e)||x.is(e)||P.is(e):C.is(e))))}}(O||(O={}));class Pe{constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,n){let r,o;if(void 0===n?r=T.insert(e,t):R.is(n)?(o=n,r=S.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=S.insert(e,t,o)),this.edits.push(r),void 0!==o)return o}replace(e,t,n){let r,o;if(void 0===n?r=T.replace(e,t):R.is(n)?(o=n,r=S.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=S.replace(e,t,o)),this.edits.push(r),void 0!==o)return o}delete(e,t){let n,r;if(void 0===t?n=T.del(e):R.is(t)?(r=t,n=S.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=S.del(e,r)),this.edits.push(n),void 0!==r)return r}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")}}!function(e){e.is=function(e){const t=e;return Ne.objectLiteral(t)&&c.is(t.range)&&Te.isSnippet(t.snippet)&&(void 0===t.annotationId||k.is(t.annotationId)||R.is(t.annotationId))}}(A||(A={}));class Oe{constructor(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let n;if(R.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error(`Id ${n} is already in use.`);if(void 0===t)throw new Error(`No annotation provided for id ${n}`);return this._annotations[n]=t,this._size++,n}nextId(){return this._counter++,this._counter.toString()}}class Ae{constructor(e){this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Oe(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((e=>{if(C.is(e)){const t=new Pe(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}}))):e.changes&&Object.keys(e.changes).forEach((t=>{const n=new Pe(e.changes[t]);this._textEditChanges[t]=n}))):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(N.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let n=this._textEditChanges[t.uri];if(!n){const e=[],r={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(r),n=new Pe(e,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}{if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){const n=[];this._workspaceEdit.changes[e]=n,t=new Pe(n),this._textEditChanges[e]=t}return t}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new Oe,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let r,o,i;if(k.is(t)||R.is(t)?r=t:n=t,void 0===r?o=w.create(e,n):(i=R.is(r)?r:this._changeAnnotations.manage(r),o=w.create(e,n,i)),this._workspaceEdit.documentChanges.push(o),void 0!==i)return i}renameFile(e,t,n,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let o,i,s;if(k.is(n)||R.is(n)?o=n:r=n,void 0===o?i=x.create(e,t,r):(s=R.is(o)?o:this._changeAnnotations.manage(o),i=x.create(e,t,r,s)),this._workspaceEdit.documentChanges.push(i),void 0!==s)return s}deleteFile(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let r,o,i;if(k.is(t)||R.is(t)?r=t:n=t,void 0===r?o=P.create(e,n):(i=R.is(r)?r:this._changeAnnotations.manage(r),o=P.create(e,n,i)),this._workspaceEdit.documentChanges.push(o),void 0!==i)return i}}!function(e){e.create=function(e){return{uri:e}},e.is=function(e){const t=e;return Ne.defined(t)&&Ne.string(t.uri)}}(E||(E={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){const t=e;return Ne.defined(t)&&Ne.string(t.uri)&&Ne.integer(t.version)}}(M||(M={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){const t=e;return Ne.defined(t)&&Ne.string(t.uri)&&(null===t.version||Ne.integer(t.version))}}(N||(N={})),function(e){e.ABAP="abap",e.WindowsBat="bat",e.BibTeX="bibtex",e.Clojure="clojure",e.Coffeescript="coffeescript",e.C="c",e.CPP="cpp",e.CSharp="csharp",e.CSS="css",e.D="d",e.Delphi="pascal",e.Diff="diff",e.Dart="dart",e.Dockerfile="dockerfile",e.Elixir="elixir",e.Erlang="erlang",e.FSharp="fsharp",e.GitCommit="git-commit",e.GitRebase="rebase",e.Go="go",e.Groovy="groovy",e.Handlebars="handlebars",e.Haskell="haskell",e.HTML="html",e.Ini="ini",e.Java="java",e.JavaScript="javascript",e.JavaScriptReact="javascriptreact",e.JSON="json",e.LaTeX="latex",e.Less="less",e.Lua="lua",e.Makefile="makefile",e.Markdown="markdown",e.ObjectiveC="objective-c",e.ObjectiveCPP="objective-cpp",e.Pascal="pascal",e.Perl="perl",e.Perl6="perl6",e.PHP="php",e.Powershell="powershell",e.Pug="jade",e.Python="python",e.R="r",e.Razor="razor",e.Ruby="ruby",e.Rust="rust",e.SCSS="scss",e.SASS="sass",e.Scala="scala",e.ShaderLab="shaderlab",e.ShellScript="shellscript",e.SQL="sql",e.Swift="swift",e.TypeScript="typescript",e.TypeScriptReact="typescriptreact",e.TeX="tex",e.VisualBasic="vb",e.XML="xml",e.XSL="xsl",e.YAML="yaml"}(q||(q={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){const t=e;return Ne.defined(t)&&Ne.string(t.uri)&&Ne.string(t.languageId)&&Ne.integer(t.version)&&Ne.string(t.text)}}(j||(j={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){const n=t;return n===e.PlainText||n===e.Markdown}}(L||(L={})),function(e){e.is=function(e){const t=e;return Ne.objectLiteral(e)&&L.is(t.kind)&&Ne.string(t.value)}}(I||(I={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(F||(F={})),function(e){e.PlainText=1,e.Snippet=2}($||($={})),function(e){e.Deprecated=1}(V||(V={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){const t=e;return t&&Ne.string(t.newText)&&c.is(t.insert)&&c.is(t.replace)}}(W||(W={})),function(e){e.asIs=1,e.adjustIndentation=2}(U||(U={})),function(e){e.is=function(e){const t=e;return t&&(Ne.string(t.detail)||void 0===t.detail)&&(Ne.string(t.description)||void 0===t.description)}}(H||(H={})),function(e){e.create=function(e){return{label:e}}}(B||(B={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(z||(z={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){const t=e;return Ne.string(t)||Ne.objectLiteral(t)&&Ne.string(t.language)&&Ne.string(t.value)}}(K||(K={})),function(e){e.is=function(e){const t=e;return!!t&&Ne.objectLiteral(t)&&(I.is(t.contents)||K.is(t.contents)||Ne.typedArray(t.contents,K.is))&&(void 0===e.range||c.is(e.range))}}(J||(J={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(X||(X={})),function(e){e.create=function(e,t,...n){const r={label:e};return Ne.defined(t)&&(r.documentation=t),Ne.defined(n)?r.parameters=n:r.parameters=[],r}}(G||(G={})),function(e){e.Text=1,e.Read=2,e.Write=3}(Z||(Z={})),function(e){e.create=function(e,t){const n={range:e};return Ne.number(t)&&(n.kind=t),n}}(Q||(Q={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(Y||(Y={})),function(e){e.Deprecated=1}(ee||(ee={})),function(e){e.create=function(e,t,n,r,o){const i={name:e,kind:t,location:{uri:r,range:n}};return o&&(i.containerName=o),i}}(te||(te={})),function(e){e.create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}}}(ne||(ne={})),function(e){e.create=function(e,t,n,r,o,i){const s={name:e,detail:t,kind:n,range:r,selectionRange:o};return void 0!==i&&(s.children=i),s},e.is=function(e){const t=e;return t&&Ne.string(t.name)&&Ne.number(t.kind)&&c.is(t.range)&&c.is(t.selectionRange)&&(void 0===t.detail||Ne.string(t.detail))&&(void 0===t.deprecated||Ne.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(re||(re={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorMove="refactor.move",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll",e.Notebook="notebook"}(oe||(oe={})),function(e){e.Invoked=1,e.Automatic=2}(ie||(ie={})),function(e){e.create=function(e,t,n){const r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},e.is=function(e){const t=e;return Ne.defined(t)&&Ne.typedArray(t.diagnostics,_.is)&&(void 0===t.only||Ne.typedArray(t.only,Ne.string))&&(void 0===t.triggerKind||t.triggerKind===ie.Invoked||t.triggerKind===ie.Automatic)}}(se||(se={})),function(e){e.create=function(e,t,n){const r={title:e};let o=!0;return"string"==typeof t?(o=!1,r.kind=t):D.is(t)?r.command=t:r.edit=t,o&&void 0!==n&&(r.kind=n),r},e.is=function(e){const t=e;return t&&Ne.string(t.title)&&(void 0===t.diagnostics||Ne.typedArray(t.diagnostics,_.is))&&(void 0===t.kind||Ne.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||D.is(t.command))&&(void 0===t.isPreferred||Ne.boolean(t.isPreferred))&&(void 0===t.edit||O.is(t.edit))}}(ae||(ae={})),function(e){e.create=function(e,t){const n={range:e};return Ne.defined(t)&&(n.data=t),n},e.is=function(e){const t=e;return Ne.defined(t)&&c.is(t.range)&&(Ne.undefined(t.command)||D.is(t.command))}}(ce||(ce={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){const t=e;return Ne.defined(t)&&Ne.uinteger(t.tabSize)&&Ne.boolean(t.insertSpaces)}}(ue||(ue={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){const t=e;return Ne.defined(t)&&c.is(t.range)&&(Ne.undefined(t.target)||Ne.string(t.target))}}(le||(le={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){const n=t;return Ne.objectLiteral(n)&&c.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(de||(de={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator",e.label="label"}(fe||(fe={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(he||(he={})),function(e){e.is=function(e){const t=e;return Ne.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(pe||(pe={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&Ne.string(t.text)}}(me||(me={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&Ne.boolean(t.caseSensitiveLookup)&&(Ne.string(t.variableName)||void 0===t.variableName)}}(ge||(ge={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&(Ne.string(t.expression)||void 0===t.expression)}}(ye||(ye={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){const t=e;return Ne.defined(t)&&c.is(e.stoppedLocation)}}(be||(be={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(ve||(ve={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&(void 0===t.tooltip||Ne.string(t.tooltip)||I.is(t.tooltip))&&(void 0===t.location||u.is(t.location))&&(void 0===t.command||D.is(t.command))}}(_e||(_e={})),function(e){e.create=function(e,t,n){const r={position:e,label:t};return void 0!==n&&(r.kind=n),r},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&a.is(t.position)&&(Ne.string(t.label)||Ne.typedArray(t.label,_e.is))&&(void 0===t.kind||ve.is(t.kind))&&void 0===t.textEdits||Ne.typedArray(t.textEdits,T.is)&&(void 0===t.tooltip||Ne.string(t.tooltip)||I.is(t.tooltip))&&(void 0===t.paddingLeft||Ne.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Ne.boolean(t.paddingRight))}}(De||(De={})),function(e){e.createSnippet=function(e){return{kind:"snippet",value:e}},e.isSnippet=function(e){const t=e;return Ne.objectLiteral(t)&&"snippet"===t.kind&&Ne.string(t.value)}}(Te||(Te={})),function(e){e.create=function(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}}(ke||(ke={})),function(e){e.create=function(e){return{items:e}}}(Re||(Re={})),function(e){e.Invoked=1,e.Automatic=2}(Se||(Se={})),function(e){e.create=function(e,t){return{range:e,text:t}}}(Ce||(Ce={})),function(e){e.create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}}}(we||(we={})),function(e){e.is=function(e){const t=e;return Ne.objectLiteral(t)&&o.is(t.uri)&&Ne.string(t.name)}}(xe||(xe={}));const Ee=["\n","\r\n","\r"];var Me,Ne;!function(e){function t(e,n){if(e.length<=1)return e;const r=e.length/2|0,o=e.slice(0,r),i=e.slice(r);t(o,n),t(i,n);let s=0,a=0,c=0;for(;s<o.length&&a<i.length;){const t=n(o[s],i[a]);e[c++]=t<=0?o[s++]:i[a++]}for(;s<o.length;)e[c++]=o[s++];for(;a<i.length;)e[c++]=i[a++];return e}e.create=function(e,t,n,r){return new qe(e,t,n,r)},e.is=function(e){const t=e;return!!(Ne.defined(t)&&Ne.string(t.uri)&&(Ne.undefined(t.languageId)||Ne.string(t.languageId))&&Ne.uinteger(t.lineCount)&&Ne.func(t.getText)&&Ne.func(t.positionAt)&&Ne.func(t.offsetAt))},e.applyEdits=function(e,n){let r=e.getText();const o=t(n,((e,t)=>{const n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}));let i=r.length;for(let t=o.length-1;t>=0;t--){const n=o[t],s=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end);if(!(a<=i))throw new Error("Overlapping edit");r=r.substring(0,s)+n.newText+r.substring(a,r.length),i=s}return r}}(Me||(Me={}));class qe{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){const e=[],t=this._content;let n=!0;for(let r=0;r<t.length;r++){n&&(e.push(r),n=!1);const o=t.charAt(r);n="\r"===o||"\n"===o,"\r"===o&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);const t=this.getLineOffsets();let n=0,r=t.length;if(0===r)return a.create(0,e);for(;n<r;){const o=Math.floor((n+r)/2);t[o]>e?r=o:n=o+1}const o=n-1;return a.create(o,e-t[o])}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}}!function(e){const t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.numberRange=function(e,n,r){return"[object Number]"===t.call(e)&&n<=e&&e<=r},e.integer=function(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(Ne||(Ne={}))}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r=n(4228);serverExportVar=r})();
2
2
  //# sourceMappingURL=https://main.vscode-cdn.net/sourcemaps/undefined/extensions/json-language-features/server/dist/browser/jsonServerMain.js.map