@codingame/monaco-vscode-json-language-features-default-extension 1.85.1 → 1.85.3

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.
@@ -0,0 +1,2 @@
1
+ var serverExportVar;(()=>{var e={7791:(e,t,n)=>{"use strict";var o;function r(e){if("contents"in e)o="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);o=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)=>{e(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((e=>{try{const t=JSON.parse(e);o=c(t)?t.contents.bundle:t}catch(e){n(e)}})).catch((e=>{n(e)})))}))}}function i(...e){const t=e[0];let n,r,s;if("string"==typeof t)n=t,r=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 o=t[0];for(let e=1;e<t.length;e++)o+=`{${e-1}}`+t[e];return i(o,...n)}r=t.message,n=r,t.comment&&t.comment.length>0&&(n+=`/${Array.isArray(t.comment)?t.comment.join(""):t.comment}`),s=t.args??{}}const c=o?.[n];return c?"string"==typeof c?a(c,s):c.comment?a(c.message,s):a(r,s):a(r,s)}n.r(t),n.d(t,{config:()=>r,t:()=>i});var s=/{([^}]+)}/g;function a(e,t){return e.replace(s,((e,n)=>t[n]??e))}function c(e){return!("object"!=typeof e?.contents?.bundle||"string"!=typeof e?.version)}},301:(e,t,n)=>{"use strict";function o(e,t=!1){const n=e.length;let o=0,a="",c=0,u=16,l=0,d=0,h=0,f=0,m=0;function p(t,n){let r=0,i=0;for(;r<t||!n;){let t=e.charCodeAt(o);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}o++,r++}return r<t&&(i=-1),i}function g(){if(a="",m=0,c=o,d=l,f=h,o>=n)return c=n,u=17;let t=e.charCodeAt(o);if(r(t)){do{o++,a+=String.fromCharCode(t),t=e.charCodeAt(o)}while(r(t));return u=15}if(i(t))return o++,a+=String.fromCharCode(t),13===t&&10===e.charCodeAt(o)&&(o++,a+="\n"),l++,h=o,u=14;switch(t){case 123:return o++,u=1;case 125:return o++,u=2;case 91:return o++,u=3;case 93:return o++,u=4;case 58:return o++,u=6;case 44:return o++,u=5;case 34:return o++,a=function(){let t="",r=o;for(;;){if(o>=n){t+=e.substring(r,o),m=2;break}const s=e.charCodeAt(o);if(34===s){t+=e.substring(r,o),o++;break}if(92!==s){if(s>=0&&s<=31){if(i(s)){t+=e.substring(r,o),m=2;break}m=6}o++}else{if(t+=e.substring(r,o),o++,o>=n){m=2;break}switch(e.charCodeAt(o++)){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}r=o}}return t}(),u=10;case 47:const r=o-1;if(47===e.charCodeAt(o+1)){for(o+=2;o<n&&!i(e.charCodeAt(o));)o++;return a=e.substring(r,o),u=12}if(42===e.charCodeAt(o+1)){o+=2;const t=n-1;let s=!1;for(;o<t;){const t=e.charCodeAt(o);if(42===t&&47===e.charCodeAt(o+1)){o+=2,s=!0;break}o++,i(t)&&(13===t&&10===e.charCodeAt(o)&&o++,l++,h=o)}return s||(o++,m=1),a=e.substring(r,o),u=13}return a+=String.fromCharCode(t),o++,u=16;case 45:if(a+=String.fromCharCode(t),o++,o===n||!s(e.charCodeAt(o)))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=o;if(48===e.charCodeAt(o))o++;else for(o++;o<e.length&&s(e.charCodeAt(o));)o++;if(o<e.length&&46===e.charCodeAt(o)){if(o++,!(o<e.length&&s(e.charCodeAt(o))))return m=3,e.substring(t,o);for(o++;o<e.length&&s(e.charCodeAt(o));)o++}let n=o;if(o<e.length&&(69===e.charCodeAt(o)||101===e.charCodeAt(o)))if(o++,(o<e.length&&43===e.charCodeAt(o)||45===e.charCodeAt(o))&&o++,o<e.length&&s(e.charCodeAt(o))){for(o++;o<e.length&&s(e.charCodeAt(o));)o++;n=o}else m=3;return e.substring(t,n)}(),u=11;default:for(;o<n&&y(t);)o++,t=e.charCodeAt(o);if(c!==o){switch(a=e.substring(c,o),a){case"true":return u=8;case"false":return u=9;case"null":return u=7}return u=16}return a+=String.fromCharCode(t),o++,u=16}}function y(e){if(r(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){o=e,a="",c=0,u=16,m=0},getPosition:()=>o,scan:t?function(){let e;do{e=g()}while(e>=12&&e<=15);return e}:g,getToken:()=>u,getTokenValue:()=>a,getTokenOffset:()=>c,getTokenLength:()=>o-c,getTokenStartLine:()=>d,getTokenStartCharacter:()=>c-f,getTokenError:()=>m}}function r(e){return 32===e||9===e}function i(e){return 10===e||13===e}function s(e){return e>=48&&e<=57}var a,c;function u(e,t){let n="";for(let o=0;o<t;o++)n+=e;return n}function l(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}n.r(t),n.d(t,{ClientCapabilities:()=>q,CodeAction:()=>N.CodeAction,CodeActionContext:()=>N.CodeActionContext,CodeActionKind:()=>N.CodeActionKind,Color:()=>N.Color,ColorInformation:()=>N.ColorInformation,ColorPresentation:()=>N.ColorPresentation,Command:()=>N.Command,CompletionItem:()=>N.CompletionItem,CompletionItemKind:()=>N.CompletionItemKind,CompletionItemTag:()=>N.CompletionItemTag,CompletionList:()=>N.CompletionList,Diagnostic:()=>N.Diagnostic,DiagnosticSeverity:()=>N.DiagnosticSeverity,DocumentHighlight:()=>N.DocumentHighlight,DocumentHighlightKind:()=>N.DocumentHighlightKind,DocumentLink:()=>N.DocumentLink,DocumentSymbol:()=>N.DocumentSymbol,DocumentUri:()=>N.DocumentUri,ErrorCode:()=>_,FoldingRange:()=>N.FoldingRange,FoldingRangeKind:()=>N.FoldingRangeKind,Hover:()=>N.Hover,InsertTextFormat:()=>N.InsertTextFormat,Location:()=>N.Location,MarkedString:()=>N.MarkedString,MarkupContent:()=>N.MarkupContent,MarkupKind:()=>N.MarkupKind,Position:()=>N.Position,Range:()=>N.Range,SchemaDraft:()=>O,SelectionRange:()=>N.SelectionRange,SymbolInformation:()=>N.SymbolInformation,SymbolKind:()=>N.SymbolKind,TextDocument:()=>P,TextDocumentEdit:()=>N.TextDocumentEdit,TextEdit:()=>N.TextEdit,VersionedTextDocumentIdentifier:()=>N.VersionedTextDocumentIdentifier,WorkspaceEdit:()=>N.WorkspaceEdit,getLanguageService:()=>Xe}),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={})),function(e){e.DEFAULT={allowTrailingComma:!1}}(c||(c={}));const d=o;var h,f;!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"}(h||(h={})),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"}(f||(f={}));const m=function(e,t=[],n=c.DEFAULT){let r=null,i=[];const s=[];function a(e){Array.isArray(i)?i.push(e):null!==r&&(i[r]=e)}return function(e,t,n=c.DEFAULT){const r=o(e,!1),i=[];function s(e){return e?()=>e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function a(e){return e?()=>e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),(()=>i.slice())):()=>!0}function u(e){return e?t=>e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function l(e){return e?t=>e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),(()=>i.slice())):()=>!0}const d=a(t.onObjectBegin),h=l(t.onObjectProperty),f=s(t.onObjectEnd),m=a(t.onArrayBegin),p=s(t.onArrayEnd),g=l(t.onLiteralValue),y=u(t.onSeparator),b=s(t.onComment),v=u(t.onError),T=n&&n.disallowComments,R=n&&n.allowTrailingComma;function k(){for(;;){const e=r.scan();switch(r.getTokenError()){case 4:D(14);break;case 5:D(15);break;case 3:D(13);break;case 1:T||D(11);break;case 2:D(12);break;case 6:D(16)}switch(e){case 12:case 13:T?D(10):b();break;case 16:D(1);break;case 15:case 14:break;default:return e}}}function D(e,t=[],n=[]){if(v(e),t.length+n.length>0){let e=r.getToken();for(;17!==e;){if(-1!==t.indexOf(e)){k();break}if(-1!==n.indexOf(e))break;e=k()}}}function C(e){const t=r.getTokenValue();return e?g(t):(h(t),i.push(t)),k(),!0}k(),17===r.getToken()?!!n.allowEmptyContent||D(4,[],[]):function e(){switch(r.getToken()){case 3:return function(){m(),k();let t=!0,n=!1;for(;4!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(n||D(4,[],[]),y(","),k(),4===r.getToken()&&R)break}else n&&D(6,[],[]);t?(i.push(0),t=!1):i[i.length-1]++,e()||D(4,[],[4,5]),n=!0}return p(),t||i.pop(),4!==r.getToken()?D(8,[4],[]):k(),!0}();case 1:return function(){d(),k();let t=!1;for(;2!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(t||D(4,[],[]),y(","),k(),2===r.getToken()&&R)break}else t&&D(6,[],[]);(10!==r.getToken()?(D(3,[],[2,5]),0):(C(!1),6===r.getToken()?(y(":"),k(),e()||D(4,[],[2,5])):D(5,[],[2,5]),i.pop(),1))||D(4,[],[2,5]),t=!0}return f(),2!==r.getToken()?D(7,[2],[]):k(),!0}();case 10:return C(!0);default:return function(){switch(r.getToken()){case 11:const e=r.getTokenValue();let t=Number(e);isNaN(t)&&(D(2),t=0),g(t);break;case 7:g(null);break;case 8:g(!0);break;case 9:g(!1);break;default:return!1}return k(),!0}()}}()?17!==r.getToken()&&D(9,[],[]):D(4,[],[])}(e,{onObjectBegin:()=>{const e={};a(e),s.push(i),i=e,r=null},onObjectProperty:e=>{r=e},onObjectEnd:()=>{i=s.pop()},onArrayBegin:()=>{const e=[];a(e),s.push(i),i=e,r=null},onArrayEnd:()=>{i=s.pop()},onLiteralValue:a,onError:(e,n,o)=>{t.push({error:e,offset:n,length:o})}},n),i[0]},p=function e(t,n,o=!1){if(function(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}(t,n,o)){const r=t.children;if(Array.isArray(r))for(let t=0;t<r.length&&r[t].offset<=n;t++){const i=e(r[t],n,o);if(i)return i}return t}},g=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},y=function e(t){switch(t.type){case"array":return t.children.map(e);case"object":const n=Object.create(null);for(let o of t.children){const t=o.children[1];t&&(n[o.children[0].value]=e(t))}return n;case"null":case"string":case"number":case"boolean":return t.value;default:return}};var b;function v(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,o;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!v(e[n],t[n]))return!1}else{const r=[];for(o in e)r.push(o);r.sort();const i=[];for(o in t)i.push(o);if(i.sort(),!v(r,i))return!1;for(n=0;n<r.length;n++)if(!v(e[r[n]],t[r[n]]))return!1}return!0}function T(e){return"number"==typeof e}function R(e){return void 0!==e}function k(e){return"boolean"==typeof e}function D(e){return"string"==typeof e}function C(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function S(e,t){const n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:0===n&&e===t}function w(e){let t="";(function(e,t){if(e.length<t.length)return!1;for(let n=0;n<t.length;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 x(e){let t=0;for(let n=0;n<e.length;n++){t++;const o=e.charCodeAt(n);55296<=o&&o<=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"}(b||(b={}));var P,_,O,q,N=n(2118);class E{constructor(e,t,n,o){this._uri=e,this._languageId=t,this._version=n,this._content=o,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(let t of e)if(E.isIncremental(t)){const e=j(t.range),n=this.offsetAt(e.start),o=this.offsetAt(e.end);this._content=this._content.substring(0,n)+t.text+this._content.substring(o,this._content.length);const r=Math.max(e.start.line,0),i=Math.max(e.end.line,0);let s=this._lineOffsets;const a=M(t.text,!1,n);if(i-r===a.length)for(let e=0,t=a.length;e<t;e++)s[e+r+1]=a[e];else a.length<1e4?s.splice(r+1,i-r,...a):this._lineOffsets=s=s.slice(0,r+1).concat(a,s.slice(i+1));const c=t.text.length-(o-n);if(0!==c)for(let e=r+1+a.length,t=s.length;e<t;e++)s[e]=s[e]+c}else{if(!E.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=M(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,o=t.length;if(0===o)return{line:0,character:e};for(;n<o;){let r=Math.floor((n+o)/2);t[r]>e?o=r:n=r+1}let r=n-1;return{line:r,character:e-t[r]}}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],o=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,o),n)}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}function A(e,t){if(e.length<=1)return e;const n=e.length/2|0,o=e.slice(0,n),r=e.slice(n);A(o,t),A(r,t);let i=0,s=0,a=0;for(;i<o.length&&s<r.length;){let n=t(o[i],r[s]);e[a++]=n<=0?o[i++]:r[s++]}for(;i<o.length;)e[a++]=o[i++];for(;s<r.length;)e[a++]=r[s++];return e}function M(e,t,n=0){const o=t?[n]:[];for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);13!==r&&10!==r||(13===r&&t+1<e.length&&10===e.charCodeAt(t+1)&&t++,o.push(n+t+1))}return o}function j(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 I(e){const t=j(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,n,o){return new E(e,t,n,o)},e.update=function(e,t,n){if(e instanceof E)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){let n=e.getText(),o=A(t.map(I),((e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),r=0;const i=[];for(const t of o){let o=e.offsetAt(t.range.start);if(o<r)throw new Error("Overlapping edit");o>r&&i.push(n.substring(r,o)),t.newText.length&&i.push(t.newText),r=e.offsetAt(t.range.end)}return i.push(n.substr(r)),i.join("")}}(P||(P={})),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"}(_||(_={})),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"}(O||(O={})),function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[N.MarkupKind.Markdown,N.MarkupKind.PlainText],commitCharactersSupport:!0,labelDetailsSupport:!0}}}}}(q||(q={}));var L=n(7791);const F={"color-hex":{errorMessage:L.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:L.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:L.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:L.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:L.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:L.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:L.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:L.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 ${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 W extends ${constructor(e,t){super(e,t),this.type="null",this.value=null}}class V extends ${constructor(e,t,n){super(e,n),this.type="boolean",this.value=t}}class U extends ${constructor(e,t){super(e,t),this.type="array",this.items=[]}get children(){return this.items}}class H extends ${constructor(e,t){super(e,t),this.type="number",this.isInteger=!0,this.value=Number.NaN}}class K extends ${constructor(e,t,n){super(e,t,n),this.type="string",this.value=""}}class B extends ${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 z extends ${constructor(e,t){super(e,t),this.type="object",this.properties=[]}get children(){return this.properties}}function J(e){return k(e)?e?{}:{not:{}}:e}var X;!function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"}(X||(X={}));const G={"http://json-schema.org/draft-03/schema#":O.v3,"http://json-schema.org/draft-04/schema#":O.v4,"http://json-schema.org/draft-06/schema#":O.v6,"http://json-schema.org/draft-07/schema#":O.v7,"https://json-schema.org/draft/2019-09/schema":O.v2019_09,"https://json-schema.org/draft/2020-12/schema":O.v2020_12};class Z{constructor(e){this.schemaDraft=e}}class Q{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||oe(e,this.focusOffset))&&e!==this.exclude}newSub(){return new Q(-1,this.exclude)}}class Y{constructor(){}get schemas(){return[]}add(e){}merge(e){}include(e){return!0}newSub(){return this}}Y.instance=new Y;class ee{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===_.EnumValueMismatch&&(e.message=L.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 te(e){return y(e)}function ne(e){return g(e)}function oe(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}class re{constructor(e,t=[],n=[]){this.root=e,this.syntaxErrors=t,this.comments=n}getNodeFromOffset(e,t=!1){if(this.root)return p(this.root,e,t)}visit(e){if(this.root){const t=n=>{let o=e(n);const r=n.children;if(Array.isArray(r))for(let e=0;e<r.length&&o;e++)o=t(r[e]);return o};t(this.root)}}validate(e,t,n=N.DiagnosticSeverity.Warning,o){if(this.root&&t){const r=new ee;return se(this.root,t,r,Y.instance,new Z(o??ie(t))),r.problems.map((t=>{const o=N.Range.create(e.positionAt(t.location.offset),e.positionAt(t.location.offset+t.location.length));return N.Diagnostic.create(o,t.message,t.severity??n,t.code)}))}}getMatchingSchemas(e,t=-1,n){if(this.root&&e){const o=new Q(t,n),r=ie(e),i=new Z(r);return se(this.root,e,new ee,o,i),o.schemas}return[]}}function ie(e,t=O.v2020_12){let n=e.$schema;return n?G[n]??t:t}function se(e,t,n,o,r){if(!e||!o.include(e))return;if("property"===e.type)return se(e.valueNode,t,n,o,r);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||L.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||L.t('Incorrect type. Expected "{0}".',t.type)})),Array.isArray(t.allOf))for(const e of t.allOf){const t=new ee,s=o.newSub();se(i,J(e),t,s,r),n.merge(t),o.merge(s)}const s=J(t.not);if(s){const e=new ee,a=o.newSub();se(i,s,e,a,r),e.hasProblems()||n.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||L.t("Matches a schema that is not allowed.")});for(const e of a.schemas)e.inverted=!e.inverted,o.add(e)}const a=(e,t)=>{const s=[];let a;for(const n of e){const e=J(n),c=new ee,u=o.newSub();if(se(i,e,c,u,r),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:L.t("Matches multiple schemas when only one must validate.")}),a&&(n.merge(a.validationResult),o.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 ee,s=o.newSub();se(i,J(e),t,s,r),n.merge(t),o.merge(s)},u=J(t.if);if(u&&((e,t,s)=>{const a=J(e),u=new ee,l=o.newSub();se(i,a,u,l,r),o.merge(l),n.mergeProcessedProperties(u),u.hasProblems()?s&&c(s):t&&c(t)})(u,J(t.then),J(t.else)),Array.isArray(t.enum)){const e=te(i);let o=!1;for(const n of t.enum)if(v(e,n)){o=!0;break}n.enumValues=t.enum,n.enumValueMatch=o,o||n.problems.push({location:{offset:i.offset,length:i.length},code:_.EnumValueMismatch,message:t.errorMessage||L.t("Value is not accepted. Valid values: {0}.",t.enum.map((e=>JSON.stringify(e))).join(", "))})}R(t.const)&&(v(te(i),t.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:i.offset,length:i.length},code:_.EnumValueMismatch,message:t.errorMessage||L.t("Value must be {0}.",JSON.stringify(t.const))}),n.enumValueMatch=!1),n.enumValues=[t.const]);let l=t.deprecationMessage;(l||t.deprecated)&&i.parent&&(l=l||L.t("Value is deprecated"),n.problems.push({location:{offset:i.parent.offset,length:i.parent.length},severity:N.DiagnosticSeverity.Warning,message:l,code:_.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 o of t.required)if(!i[o]){const t=e.parent&&"property"===e.parent.type&&e.parent.keyNode,r=t?{offset:t.offset,length:t.length}:{offset:e.offset,length:1};n.problems.push({location:r,message:L.t('Missing property "{0}".',o)})}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(k(s))if(s)n.propertiesMatches++,n.propertiesValueMatches++;else{const o=c.parent;n.problems.push({location:{offset:o.keyNode.offset,length:o.keyNode.length},message:t.errorMessage||L.t("Property {0} is not allowed.",e)})}else{const e=new ee;se(c,s,e,o,r),n.mergePropertyMatch(e)}}if(t.patternProperties)for(const e of Object.keys(t.patternProperties)){const c=w(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(k(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||L.t("Property {0} is not allowed.",a)})}else{const e=new ee;se(s,i,e,o,r),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 o=s.parent;n.problems.push({location:{offset:o.keyNode.offset,length:o.keyNode.length},message:t.errorMessage||L.t("Property {0} is not allowed.",e)})}else if(!0!==c){const e=new ee;se(s,c,e,o,r),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||L.t("Property {0} is not allowed.",a)})}else if(!0!==u){const e=new ee;se(s,u,e,o,r),n.mergePropertyMatch(e)}}e.forEach(a)}if(T(t.maxProperties)&&e.properties.length>t.maxProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:L.t("Object has more properties than limit of {0}.",t.maxProperties)}),T(t.minProperties)&&e.properties.length<t.minProperties&&n.problems.push({location:{offset:e.offset,length:e.length},message:L.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],o=t.dependentRequired[e];n&&Array.isArray(o)&&d(e,o)}if(t.dependentSchemas)for(const e in t.dependentSchemas){const n=i[e],o=t.dependentSchemas[e];n&&C(o)&&d(e,o)}if(t.dependencies)for(const e in t.dependencies)i[e]&&d(e,t.dependencies[e]);const l=J(t.propertyNames);if(l)for(const t of e.properties){const e=t.keyNode;e&&se(e,l,n,Y.instance,r)}function d(t,s){if(Array.isArray(s))for(const o of s)i[o]?n.propertiesValueMatches++:n.problems.push({location:{offset:e.offset,length:e.length},message:L.t("Object is missing property {0} required by property {1}.",o,t)});else{const t=J(s);if(t){const i=new ee;se(e,t,i,o,r),n.mergePropertyMatch(i)}}}}(i);break;case"array":!function(e){let i,s;r.schemaDraft>=O.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 t=Math.min(i.length,e.items.length);for(;a<t;a++){const t=J(i[a]),s=new ee,c=e.items[a];c&&(se(c,t,s,o,r),n.mergePropertyMatch(s)),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:L.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 t=new ee;se(e.items[a],s,t,o,r),n.mergePropertyMatch(t),n.processedProperties.add(String(a))}const c=J(t.contains);if(c){let o=0;for(let t=0;t<e.items.length;t++){const i=e.items[t],s=new ee;se(i,c,s,Y.instance,r),s.hasProblems()||(o++,r.schemaDraft>=O.v2020_12&&n.processedProperties.add(String(t)))}0!==o||T(t.minContains)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.errorMessage||L.t("Array does not contain required item.")}),T(t.minContains)&&o<t.minContains&&n.problems.push({location:{offset:e.offset,length:e.length},message:L.t("Array has too few items that match the contains contraint. Expected {0} or more.",t.minContains)}),T(t.maxContains)&&o>t.maxContains&&n.problems.push({location:{offset:e.offset,length:e.length},message:L.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 i=0;i<e.items.length;i++){if(!n.processedProperties.has(String(i)))if(!1===u)n.problems.push({location:{offset:e.offset,length:e.length},message:L.t("Item does not match any validation rule from the array.")});else{const s=new ee;se(e.items[i],t.unevaluatedItems,s,o,r),n.mergePropertyMatch(s)}n.processedProperties.add(String(i)),n.propertiesValueMatches++}if(T(t.minItems)&&e.items.length<t.minItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:L.t("Array has too few items. Expected {0} or more.",t.minItems)}),T(t.maxItems)&&e.items.length>t.maxItems&&n.problems.push({location:{offset:e.offset,length:e.length},message:L.t("Array has too many items. Expected {0} or fewer.",t.maxItems)}),!0===t.uniqueItems){const t=te(e);t.some(((e,n)=>n!==t.lastIndexOf(e)))&&n.problems.push({location:{offset:e.offset,length:e.length},message:L.t("Array has duplicate items.")})}}(i);break;case"string":!function(e){if(T(t.minLength)&&x(e.value)<t.minLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:L.t("String is shorter than the minimum length of {0}.",t.minLength)}),T(t.maxLength)&&x(e.value)>t.maxLength&&n.problems.push({location:{offset:e.offset,length:e.length},message:L.t("String is longer than the maximum length of {0}.",t.maxLength)}),D(t.pattern)&&(w(t.pattern)?.test(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||L.t('String does not match the pattern of "{0}".',t.pattern)})),t.format)switch(t.format){case"uri":case"uri-reference":{let o;if(e.value){const n=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(e.value);n?n[2]||"uri"!==t.format||(o=L.t("URI with a scheme is expected.")):o=L.t("URI is expected.")}else o=L.t("URI expected.");o&&n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||L.t("String is not a URI: {0}",o)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"hostname":case"ipv4":case"ipv6":const o=F[t.format];e.value&&o.pattern.exec(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},message:t.patternErrorMessage||t.errorMessage||o.errorMessage})}}(i);break;case"number":!function(e){const o=e.value;function r(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(T(t.multipleOf)){let i=-1;if(Number.isInteger(t.multipleOf))i=o%t.multipleOf;else{let e=r(t.multipleOf),n=r(o);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:L.t("Value is not divisible by {0}.",t.multipleOf)})}function i(e,t){return T(t)?t:k(t)&&t?e:void 0}function s(e,t){if(!k(t)||!t)return e}const a=i(t.minimum,t.exclusiveMinimum);T(a)&&o<=a&&n.problems.push({location:{offset:e.offset,length:e.length},message:L.t("Value is below the exclusive minimum of {0}.",a)});const c=i(t.maximum,t.exclusiveMaximum);T(c)&&o>=c&&n.problems.push({location:{offset:e.offset,length:e.length},message:L.t("Value is above the exclusive maximum of {0}.",c)});const u=s(t.minimum,t.exclusiveMinimum);T(u)&&o<u&&n.problems.push({location:{offset:e.offset,length:e.length},message:L.t("Value is below the minimum of {0}.",u)});const l=s(t.maximum,t.exclusiveMaximum);T(l)&&o>l&&n.problems.push({location:{offset:e.offset,length:e.length},message:L.t("Value is above the maximum of {0}.",l)})}(i)}o.add({node:i,schema:t})}function ae(e,t,n){if(null!==e&&"object"==typeof e){const o=t+"\t";if(Array.isArray(e)){if(0===e.length)return"[]";let r="[\n";for(let t=0;t<e.length;t++)r+=o+ae(e[t],o,n),t<e.length-1&&(r+=","),r+="\n";return r+=t+"]",r}{const r=Object.keys(e);if(0===r.length)return"{}";let i="{\n";for(let t=0;t<r.length;t++){const s=r[t];i+=o+JSON.stringify(s)+": "+ae(e[s],o,n),t<r.length-1&&(i+=","),i+="\n"}return i+=t+"}",i}}return n(e)}class ce{constructor(e,t=[],n=Promise,o={}){this.schemaService=e,this.contributions=t,this.promiseConstructor=n,this.clientCapabilities=o}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 o={items:[],isIncomplete:!1},r=e.getText(),i=e.offsetAt(t);let s=n.getNodeFromOffset(i,!0);if(this.isInComment(e,s?s.offset:0,i))return Promise.resolve(o);if(s&&i===s.offset+s.length&&i>0){const e=r[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&&'"'===r[n-1]&&n--,c=N.Range.create(e.positionAt(n),t)}else c=N.Range.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=N.TextEdit.replace(c,e.insertText),e.label=t,u.set(t,e),o.items.push(e)}},setAsIncomplete:()=>{o.isIncomplete=!0},error:e=>{console.error(e)},getNumberOfProposals:()=>o.items.length};return this.schemaService.getSchemaForResource(e.uri,n).then((t=>{const d=[];let h,f=!0,m="";if(s&&"string"===s.type){const e=s.parent;e&&"property"===e.type&&e.keyNode===s&&(f=!e.valueNode,h=e,m=r.substr(s.offset+1,s.length-2),e&&(s=e.parent))}if(s&&"object"===s.type){if(s.offset===i)return o;s.properties.forEach((e=>{h&&h===e||u.set(e.keyNode.value,N.CompletionItem.create("__"))}));let p="";f&&(p=this.evaluateSeparatorAfter(e,e.offsetAt(c.end))),t?this.getPropertyCompletions(t,n,s,f,p,l):this.getSchemaLessPropertyCompletions(n,s,m,l);const g=ne(s);this.contributions.forEach((t=>{const n=t.collectPropertyCompletions(e.uri,g,a,f,""===p,l);n&&d.push(n)})),!t&&a.length>0&&'"'!==r.charAt(i-a.length-1)&&(l.add({kind:N.CompletionItemKind.Property,label:this.getLabelForValue(a),insertText:this.getInsertTextForProperty(a,void 0,!1,p),insertTextFormat:N.InsertTextFormat.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 o}))}))}getPropertyCompletions(e,t,n,o,r,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:N.CompletionItemKind.Property,label:e,insertText:this.getInsertTextForProperty(e,n,o,r),insertTextFormat:N.InsertTextFormat.Snippet,filterText:this.getFilterTextForValue(e),documentation:this.fromMarkup(n.markdownDescription)||n.description||""};void 0!==n.suggestSortText&&(t.sortText=n.suggestSortText),t.insertText&&S(t.insertText,`$1${r}`)&&(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)=>{const s={kind:N.CompletionItemKind.Property,label:e,insertText:this.getInsertTextForProperty(e,void 0,o,r),insertTextFormat:N.InsertTextFormat.Snippet,filterText:this.getFilterTextForValue(e),documentation:t||this.fromMarkup(n.markdownDescription)||n.description||""};void 0!==n.suggestSortText&&(s.sortText=n.suggestSortText),s.insertText&&S(s.insertText,`$1${r}`)&&(s.command={title:"Suggest",command:"editor.action.triggerSuggest"}),i.add(s)};if(n.enum)for(let t=0;t<n.enum.length;t++){let o;n.markdownEnumDescriptions&&t<n.markdownEnumDescriptions.length?o=this.fromMarkup(n.markdownEnumDescriptions[t]):n.enumDescriptions&&t<n.enumDescriptions.length&&(o=n.enumDescriptions[t]),e(n.enum[t],o)}n.const&&e(n.const)}}}))}getSchemaLessPropertyCompletions(e,t,n,o){const r=e=>{e.properties.forEach((e=>{const t=e.keyNode.value;o.add({kind:N.CompletionItemKind.Property,label:t,insertText:this.getInsertTextForValue(t,""),insertTextFormat:N.InsertTextFormat.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&&r(e.valueNode),!0)))}else"array"===t.parent.type&&t.parent.items.forEach((e=>{"object"===e.type&&e!==t&&r(e)}));else"object"===t.type&&o.add({kind:N.CompletionItemKind.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:N.InsertTextFormat.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})}getSchemaLessValueCompletions(e,t,n,o,r){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 r.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:N.InsertTextFormat.Snippet,documentation:""}),void r.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:N.InsertTextFormat.Snippet,documentation:""});const s=this.evaluateSeparatorAfter(o,i),a=e=>{e.parent&&!oe(e.parent,n,!0)&&r.add({kind:this.getSuggestionKind(e.type),label:this.getLabelTextForMatchingNode(e,o),insertText:this.getInsertTextForMatchingNode(e,o,s),insertTextFormat:N.InsertTextFormat.Snippet,documentation:""}),"boolean"===e.type&&this.addBooleanValueCompletion(!e.value,s,r)};if("property"===t.type&&n>(t.colonOffset||0)){const o=t.valueNode;if(o&&(n>o.offset+o.length||"object"===o.type||"array"===o.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,r)}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,o,r,i,s){let a,c,u=o;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&&o>(n.colonOffset||0)){const e=n.valueNode;if(e&&o>e.offset+e.length)return;a=n.keyNode.value,n=n.parent}if(n&&(void 0!==a||"array"===n.type)){const l=this.evaluateSeparatorAfter(r,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(te(t)))})),t={...i,add(t){e.has(t.label)||i.add(t)}}}if(Array.isArray(e.schema.items)){const i=this.findItemAtOffset(n,r,o);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))if(w(n)?.test(a)){t=!0;const o=e.schema.patternProperties[n];this.addSchemaValueCompletions(o,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,o,r,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=ne(t.parent);this.contributions.forEach((t=>{const s=t.collectValueCompletions(o.uri,n,e,r);s&&i.push(s)}))}}}else this.contributions.forEach((e=>{const t=e.collectDefaultCompletions(o.uri,r);t&&i.push(t)}))}addSchemaValueCompletions(e,t,n,o){"object"==typeof e&&(this.addEnumValueCompletions(e,t,n),this.addDefaultValueCompletions(e,t,n),this.collectTypes(e,o),Array.isArray(e.allOf)&&e.allOf.forEach((e=>this.addSchemaValueCompletions(e,t,n,o))),Array.isArray(e.anyOf)&&e.anyOf.forEach((e=>this.addSchemaValueCompletions(e,t,n,o))),Array.isArray(e.oneOf)&&e.oneOf.forEach((e=>this.addSchemaValueCompletions(e,t,n,o))))}addDefaultValueCompletions(e,t,n,o=0){let r=!1;if(R(e.default)){let i=e.type,s=e.default;for(let e=o;e>0;e--)s=[s],i="array";const a={kind:this.getSuggestionKind(i),label:this.getLabelForValue(s),insertText:this.getInsertTextForValue(s,t),insertTextFormat:N.InsertTextFormat.Snippet};this.doesSupportsLabelDetails()?a.labelDetails={description:L.t("Default value")}:a.detail=L.t("Default value"),n.add(a),r=!0}Array.isArray(e.examples)&&e.examples.forEach((i=>{let s=e.type,a=i;for(let e=o;e>0;e--)a=[a],s="array";n.add({kind:this.getSuggestionKind(s),label:this.getLabelForValue(a),insertText:this.getInsertTextForValue(a,t),insertTextFormat:N.InsertTextFormat.Snippet}),r=!0})),Array.isArray(e.defaultSnippets)&&e.defaultSnippets.forEach((i=>{let s,a,c=e.type,u=i.body,l=i.label;if(R(u)){let n=e.type;for(let e=o;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="",r="";for(let t=o;t>0;t--)e=e+r+"[\n",n=n+"\n"+r+"]",r+="\t",c="array";s=e+r+i.bodyText.split("\n").join("\n"+r)+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:N.InsertTextFormat.Snippet,filterText:a}),r=!0})),!r&&"object"==typeof e.items&&!Array.isArray(e.items)&&o<5&&this.addDefaultValueCompletions(e.items,t,n,o+1)}addEnumValueCompletions(e,t,n){if(R(e.const)&&n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,t),insertTextFormat:N.InsertTextFormat.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(let o=0,r=e.enum.length;o<r;o++){const r=e.enum[o];let i=this.fromMarkup(e.markdownDescription)||e.description;e.markdownEnumDescriptions&&o<e.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?i=this.fromMarkup(e.markdownEnumDescriptions[o]):e.enumDescriptions&&o<e.enumDescriptions.length&&(i=e.enumDescriptions[o]),n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(r),insertText:this.getInsertTextForValue(r,t),insertTextFormat:N.InsertTextFormat.Snippet,documentation:i})}}collectTypes(e,t){if(Array.isArray(e.enum)||R(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:N.InsertTextFormat.Snippet,detail:L.t("New object"),documentation:""}),e.array&&n.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],t),insertTextFormat:N.InsertTextFormat.Snippet,detail:L.t("New array"),documentation:""})}addBooleanValueCompletion(e,t,n){n.add({kind:this.getSuggestionKind("boolean"),label:e?"true":"false",insertText:this.getInsertTextForValue(e,t),insertTextFormat:N.InsertTextFormat.Snippet,documentation:""})}addNullValueCompletion(e,t){t.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:N.InsertTextFormat.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:N.CompletionItemKind.Module,label:this.getLabelForValue(n),filterText:this.getFilterTextForValue(n),insertText:this.getInsertTextForValue(n,e),insertTextFormat:N.InsertTextFormat.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 ae(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 N.CompletionItemKind.Value;switch(e){case"string":return N.CompletionItemKind.Value;case"object":return N.CompletionItemKind.Module;case"property":return N.CompletionItemKind.Property;default:return N.CompletionItemKind.Value}}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 o=t.getText().substr(e.offset,e.length)+n;return this.getInsertTextForPlainText(o)}}getInsertTextForProperty(e,t,n,o){const r=this.getInsertTextForValue(e,"");if(!n)return r;const i=r+": ";let s,a=0;if(t){if(Array.isArray(t.defaultSnippets)){if(1===t.defaultSnippets.length){const e=t.defaultSnippets[0].body;R(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),R(t.const)&&(s||(s=this.getInsertTextForGuessedValue(t.const,"")),a++),R(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 r}}}return(!s||a>1)&&(s="$1"),i+s+o}getCurrentWord(e,t){let n=t-1;const o=e.getText();for(;n>=0&&-1===' \t\n\r\v":{[,]}'.indexOf(o.charAt(n));)n--;return o.substring(n+1,t)}evaluateSeparatorAfter(e,t){const n=d(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 o=d(t.getText(),!0),r=e.items;for(let e=r.length-1;e>=0;e--){const t=r[e];if(n>t.offset+t.length)return o.setPosition(t.offset+t.length),5===o.scan()&&n>=o.getTokenOffset()+o.getTokenLength()?e+1:e;if(n>=t.offset)return e}return 0}isInComment(e,t,n){const o=d(e.getText(),!1);o.setPosition(t);let r=o.scan();for(;17!==r&&o.getTokenOffset()+o.getTokenLength()<n;)r=o.scan();return(12===r||13===r)&&o.getTokenOffset()<=n}fromMarkup(e){if(e&&this.doesSupportMarkdown())return{kind:N.MarkupKind.Markdown,value:e}}doesSupportMarkdown(){if(!R(this.supportsMarkdown)){const e=this.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat;this.supportsMarkdown=Array.isArray(e)&&-1!==e.indexOf(N.MarkupKind.Markdown)}return this.supportsMarkdown}doesSupportsCommitCharacters(){return R(this.supportsCommitCharacters)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.commitCharactersSupport),this.supportsCommitCharacters}doesSupportsLabelDetails(){return R(this.labelDetailsSupport)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.labelDetailsSupport),this.labelDetailsSupport}}class ue{constructor(e,t=[],n){this.schemaService=e,this.contributions=t,this.promise=n||Promise}doHover(e,t,n){const o=e.offsetAt(t);let r=n.getNodeFromOffset(o);if(!r||("object"===r.type||"array"===r.type)&&o>r.offset+1&&o<r.offset+r.length-1)return this.promise.resolve(null);const i=r;if("string"===r.type){const e=r.parent;if(e&&"property"===e.type&&e.keyNode===r&&(r=e.valueNode,!r))return this.promise.resolve(null)}const s=N.Range.create(e.positionAt(i.offset),e.positionAt(i.offset+i.length)),a=e=>({contents:e,range:s}),c=ne(r);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&&r){let o,i,s,c;n.getMatchingSchemas(e.schema,r.offset).every((e=>{if(e.node===r&&!e.inverted&&e.schema&&(o=o||e.schema.title,i=i||e.schema.markdownDescription||le(e.schema.description),e.schema.enum)){const t=e.schema.enum.indexOf(te(r));e.schema.markdownEnumDescriptions?s=e.schema.markdownEnumDescriptions[t]:e.schema.enumDescriptions&&(s=le(e.schema.enumDescriptions[t])),s&&(c=e.schema.enum[t],"string"!=typeof c&&(c=JSON.stringify(c)))}return!0}));let u="";return o&&(u=le(o)),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 le(e){if(e)return e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,"$1\n\n$3").replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}class de{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:N.DiagnosticSeverity.Error)}doValidation(e,t,n,o){if(!this.validationEnabled)return this.promise.resolve([]);const r=[],i={},s=e=>{const t=e.range.start.line+" "+e.range.start.character+" "+e.message;i[t]||(i[t]=!0,r.push(e))},a=o=>{let i=n?.trailingCommas?pe(n.trailingCommas):N.DiagnosticSeverity.Error,a=n?.comments?pe(n.comments):this.commentSeverity,c=n?.schemaValidation?pe(n.schemaValidation):N.DiagnosticSeverity.Warning,u=n?.schemaRequest?pe(n.schemaRequest):N.DiagnosticSeverity.Warning;if(o){const r=(n,o)=>{if(t.root&&u){const r=t.root,i="object"===r.type?r.properties[0]:void 0;if(i&&"$schema"===i.keyNode.value){const t=i.valueNode||i,r=N.Range.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length));s(N.Diagnostic.create(r,n,u,o))}else{const t=N.Range.create(e.positionAt(r.offset),e.positionAt(r.offset+1));s(N.Diagnostic.create(t,n,u,o))}}};if(o.errors.length)r(o.errors[0],_.SchemaResolveError);else if(c){for(const e of o.warnings)r(e,_.SchemaUnsupportedFeature);const i=t.validate(e,o.schema,c,n?.schemaDraft);i&&i.forEach(s)}fe(o.schema)&&(a=void 0),me(o.schema)&&(i=void 0)}for(const e of t.syntaxErrors){if(e.code===_.TrailingComma){if("number"!=typeof i)continue;e.severity=i}s(e)}if("number"==typeof a){const e=L.t("Comments are not permitted in JSON.");t.comments.forEach((t=>{s(N.Diagnostic.create(t,e,a,_.CommentNotPermitted))}))}return r};if(o){const e=o.id||"schemaservice://untitled/"+he++;return this.jsonSchemaService.registerExternalSchema({uri:e,schema:o}).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 he=0;function fe(e){if(e&&"object"==typeof e){if(k(e.allowComments))return e.allowComments;if(e.allOf)for(const t of e.allOf){const e=fe(t);if(k(e))return e}}}function me(e){if(e&&"object"==typeof e){if(k(e.allowTrailingCommas))return e.allowTrailingCommas;const t=e;if(k(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(const t of e.allOf){const e=me(t);if(k(e))return e}}}function pe(e){switch(e){case"error":return N.DiagnosticSeverity.Error;case"warning":return N.DiagnosticSeverity.Warning;case"ignore":return}}function ge(e){return e<48?0:e<=57?e-48:(e<97&&(e+=32),e>=97&&e<=102?e-97+10:0)}function ye(e){if("#"===e[0])switch(e.length){case 4:return{red:17*ge(e.charCodeAt(1))/255,green:17*ge(e.charCodeAt(2))/255,blue:17*ge(e.charCodeAt(3))/255,alpha:1};case 5:return{red:17*ge(e.charCodeAt(1))/255,green:17*ge(e.charCodeAt(2))/255,blue:17*ge(e.charCodeAt(3))/255,alpha:17*ge(e.charCodeAt(4))/255};case 7:return{red:(16*ge(e.charCodeAt(1))+ge(e.charCodeAt(2)))/255,green:(16*ge(e.charCodeAt(3))+ge(e.charCodeAt(4)))/255,blue:(16*ge(e.charCodeAt(5))+ge(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(16*ge(e.charCodeAt(1))+ge(e.charCodeAt(2)))/255,green:(16*ge(e.charCodeAt(3))+ge(e.charCodeAt(4)))/255,blue:(16*ge(e.charCodeAt(5))+ge(e.charCodeAt(6)))/255,alpha:(16*ge(e.charCodeAt(7))+ge(e.charCodeAt(8)))/255}}}class be{constructor(e){this.schemaService=e}findDocumentSymbols(e,t,n={resultLimit:Number.MAX_VALUE}){const o=t.root;if(!o)return[];let r=n.resultLimit||Number.MAX_VALUE;const i=e.uri;if(("vscode://defaultsettings/keybindings.json"===i||S(i.toLowerCase(),"/user/keybindings.json"))&&"array"===o.type){const t=[];for(const s of o.items)if("object"===s.type)for(const o of s.properties)if("key"===o.keyNode.value&&o.valueNode){const a=N.Location.create(e.uri,ve(e,s));if(t.push({name:Te(o.valueNode),kind:N.SymbolKind.Function,location:a}),r--,r<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(i),t}return t}const s=[{node:o,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 o=t.valueNode;if(o)if(r>0){r--;const i=N.Location.create(e.uri,ve(e,t)),a=n?n+"."+t.keyNode.value:t.keyNode.value;u.push({name:this.getKeyLabel(t),kind:this.getSymbolKind(o.type),location:i,containerName:n}),s.push({node:o,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 o=t.root;if(!o)return[];let r=n.resultLimit||Number.MAX_VALUE;const i=e.uri;if(("vscode://defaultsettings/keybindings.json"===i||S(i.toLowerCase(),"/user/keybindings.json"))&&"array"===o.type){const t=[];for(const s of o.items)if("object"===s.type)for(const o of s.properties)if("key"===o.keyNode.value&&o.valueNode){const a=ve(e,s),c=ve(e,o.keyNode);if(t.push({name:Te(o.valueNode),kind:N.SymbolKind.Function,range:a,selectionRange:c}),r--,r<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(i),t}return t}const s=[],a=[{node:o,result:s}];let c=0,u=!1;const l=(t,n)=>{"array"===t.type?t.items.forEach(((t,o)=>{if(t)if(r>0){r--;const i=ve(e,t),s=i,c={name:String(o),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 o=t.valueNode;if(o)if(r>0){r--;const i=ve(e,t),s=ve(e,t.keyNode),c=[],u={name:this.getKeyLabel(t),kind:this.getSymbolKind(o.type),range:i,selectionRange:s,children:c,detail:this.getDetail(o)};n.push(u),a.push({result:c,node:o})}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 N.SymbolKind.Module;case"string":return N.SymbolKind.String;case"number":return N.SymbolKind.Number;case"array":return N.SymbolKind.Array;case"boolean":return N.SymbolKind.Boolean;default:return N.SymbolKind.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((o=>{const r=[];if(o){let i=n&&"number"==typeof n.resultLimit?n.resultLimit:Number.MAX_VALUE;const s=t.getMatchingSchemas(o.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 o=String(t.node.offset);if(!a[o]){const s=ye(te(t.node));if(s){const n=ve(e,t.node);r.push({color:s,range:n})}if(a[o]=!0,i--,i<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(e.uri),r}}}return r}))}getColorPresentations(e,t,n,o){const r=[],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))}`,r.push({label:u,textEdit:N.TextEdit.replace(o,JSON.stringify(u))}),r}}function ve(e,t){return N.Range.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}function Te(e){return te(e)||L.t("<empty>")}const Re={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}}},ke={id:L.t("A unique identifier for the schema."),$schema:L.t("The schema to verify this document against."),title:L.t("A descriptive title of the element."),description:L.t("A long description of the element. Used in hover menus and suggestions."),default:L.t("A default value. Used by suggestions."),multipleOf:L.t("A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:L.t("The maximum numerical value, inclusive by default."),exclusiveMaximum:L.t("Makes the maximum property exclusive."),minimum:L.t("The minimum numerical value, inclusive by default."),exclusiveMinimum:L.t("Makes the minimum property exclusive."),maxLength:L.t("The maximum length of a string."),minLength:L.t("The minimum length of a string."),pattern:L.t("A regular expression to match the string against. It is not implicitly anchored."),additionalItems:L.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:L.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:L.t("The maximum number of items that can be inside an array. Inclusive."),minItems:L.t("The minimum number of items that can be inside an array. Inclusive."),uniqueItems:L.t("If all of the items in the array must be unique. Defaults to false."),maxProperties:L.t("The maximum number of properties an object can have. Inclusive."),minProperties:L.t("The minimum number of properties an object can have. Inclusive."),required:L.t("An array of strings that lists the names of all properties required on this object."),additionalProperties:L.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:L.t("Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:L.t("A map of property names to schemas for each property."),patternProperties:L.t("A map of regular expressions on property names to schemas for matching properties."),dependencies:L.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:L.t("The set of literal values that are valid."),type:L.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:L.t("Describes the format expected for the value."),allOf:L.t("An array of schemas, all of which must match."),anyOf:L.t("An array of schemas, where at least one must match."),oneOf:L.t("An array of schemas, exactly one of which must match."),not:L.t("A schema which must not match."),$id:L.t("A unique identifier for the schema."),$ref:L.t("Reference a definition hosted on any location."),$comment:L.t("Comments from schema authors to readers or maintainers of the schema."),readOnly:L.t("Indicates that the value of the instance is managed exclusively by the owning authority."),examples:L.t("Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:L.t('An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:L.t("If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:L.t("An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:L.t("Describes the media type of a string property."),contentEncoding:L.t("Describes the content encoding of a string property."),if:L.t('The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:L.t('The "if" subschema is used for validation when the "if" subschema succeeds.'),else:L.t('The "else" subschema is used for validation when the "if" subschema fails.')};for(const e in Re.schemas){const t=Re.schemas[e];for(const e in t.properties){let n=t.properties[e];"boolean"==typeof n&&(n=t.properties[e]={});const o=ke[e];o&&(n.description=o)}}var De;(()=>{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,o="",r=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(o.length<2||2!==r||46!==o.charCodeAt(o.length-1)||46!==o.charCodeAt(o.length-2))if(o.length>2){var c=o.lastIndexOf("/");if(c!==o.length-1){-1===c?(o="",r=0):r=(o=o.slice(0,c)).length-1-o.lastIndexOf("/"),i=a,s=0;continue}}else if(2===o.length||1===o.length){o="",r=0,i=a,s=0;continue}t&&(o.length>0?o+="/..":o="..",r=2)}else o.length>0?o+="/"+e.slice(i+1,a):o=e.slice(i+1,a),r=a-i-1;i=a,s=0}else 46===n&&-1!==s?++s:s=-1}return o}var o={resolve:function(){for(var e,o="",r=!1,i=arguments.length-1;i>=-1&&!r;i--){var s;i>=0?s=arguments[i]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(o=s+"/"+o,r=47===s.charCodeAt(0))}return o=n(o,!r),r?o.length>0?"/"+o:"/":o.length>0?o:"."},normalize:function(e){if(t(e),0===e.length)return".";var o=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!o)).length||o||(e="."),e.length>0&&r&&(e+="/"),o?"/"+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 r=arguments[n];t(r),r.length>0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":o.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=o.resolve(e))===(n=o.resolve(n)))return"";for(var r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var i=e.length,s=i-r,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(r+d)?l=d:0===d&&(l=0));break}var h=e.charCodeAt(r+d);if(h!==n.charCodeAt(a+d))break;47===h&&(l=d)}var f="";for(d=r+l+1;d<=i;++d)d!==i&&47!==e.charCodeAt(d)||(0===f.length?f+="..":f+="/..");return f.length>0?f+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),o=47===n,r=-1,i=!0,s=e.length-1;s>=1;--s)if(47===(n=e.charCodeAt(s))){if(!i){r=s;break}}else i=!1;return-1===r?o?"/":".":o&&1===r?"//":e.slice(0,r)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var o,r=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(o=e.length-1;o>=0;--o){var u=e.charCodeAt(o);if(47===u){if(!s){r=o+1;break}}else-1===c&&(s=!1,c=o+1),a>=0&&(u===n.charCodeAt(a)?-1==--a&&(i=o):(a=-1,i=c))}return r===i?i=c:-1===i&&(i=e.length),e.slice(r,i)}for(o=e.length-1;o>=0;--o)if(47===e.charCodeAt(o)){if(!s){r=o+1;break}}else-1===i&&(s=!1,i=o+1);return-1===i?"":e.slice(r,i)},extname:function(e){t(e);for(var n=-1,o=0,r=-1,i=!0,s=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===r&&(i=!1,r=a+1),46===c?-1===n?n=a:1!==s&&(s=1):-1!==n&&(s=-1);else if(!i){o=a+1;break}}return-1===n||-1===r||0===s||1===s&&n===r-1&&n===o+1?"":e.slice(n,r)},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,o=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+o:n+"/"+o:o}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var o,r=e.charCodeAt(0),i=47===r;i?(n.root="/",o=1):o=0;for(var s=-1,a=0,c=-1,u=!0,l=e.length-1,d=0;l>=o;--l)if(47!==(r=e.charCodeAt(l)))-1===c&&(u=!1,c=l+1),46===r?-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};o.posix=o,e.exports=o}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},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 o={};(()=>{let e;if(n.r(o),n.d(o,{URI:()=>l,Utils:()=>C}),"object"==typeof process)e=!1;else if("object"==typeof navigator){let t=navigator.userAgent;e=t.indexOf("Windows")>=0}const t=/^\w[\w\d+.-]*$/,r=/^\//,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(!r.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,o,r,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=o||a,this.fragment=r||a,s(this,i))}get fsPath(){return g(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:o,query:r,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===o?o=this.path:null===o&&(o=a),void 0===r?r=this.query:null===r&&(r=a),void 0===i?i=this.fragment:null===i&&(i=a),t===this.scheme&&n===this.authority&&o===this.path&&r===this.query&&i===this.fragment?this:new h(t,n,o,r,i)}static parse(e,t=!1){const n=u.exec(e);return n?new h(n[2]||a,T(n[4]||a),T(n[5]||a),T(n[7]||a),T(n[9]||a),t):new h(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 h("file",n,t,a,a)}static from(e){const t=new h(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 h(e);return t._formatted=e.external,t._fsPath=e._sep===d?e.fsPath:null,t}}return e}}const d=e?1:void 0;class h 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 f={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 o,r=-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!==r&&(o+=encodeURIComponent(e.substring(r,i)),r=-1),void 0!==o&&(o+=e.charAt(i));else{void 0===o&&(o=e.substr(0,i));const t=f[s];void 0!==t?(-1!==r&&(o+=encodeURIComponent(e.substring(r,i)),r=-1),o+=t):-1===r&&(r=i)}}return-1!==r&&(o+=encodeURIComponent(e.substring(r))),void 0!==o?o:e}function p(e){let t;for(let n=0;n<e.length;n++){const o=e.charCodeAt(n);35===o||63===o?(void 0===t&&(t=e.substr(0,n)),t+=f[o]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function g(t,n){let o;return o=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&&(o=o.replace(/\//g,"\\")),o}function y(e,t){const n=t?p:m;let o="",{scheme:r,authority:i,path:s,query:a,fragment:u}=e;if(r&&(o+=r,o+=":"),(i||"file"===r)&&(o+=c,o+=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?o+=n(t,!1,!1):(o+=n(t.substr(0,e),!1,!1),o+=":",o+=n(t.substr(e+1),!1,!0)),o+="@"}i=i.toLowerCase(),e=i.lastIndexOf(":"),-1===e?o+=n(i,!1,!0):(o+=n(i.substr(0,e),!1,!0),o+=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)}`)}o+=n(s,!0,!1)}return a&&(o+="?",o+=n(a,!1,!1)),u&&(o+="#",o+=t?u:m(u,!1,!1)),o}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 T(e){return e.match(v)?e.replace(v,(e=>b(e))):e}var R=n(470);const k=R.posix||R,D="/";var C;!function(e){e.joinPath=function(e,...t){return e.with({path:k.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,o=!1;n[0]!==D&&(n=D+n,o=!0);let r=k.resolve(n,...t);return o&&r[0]===D&&!e.authority&&(r=r.substring(1)),e.with({path:r})},e.dirname=function(e){if(0===e.path.length||e.path===D)return e;let t=k.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return k.basename(e.path)},e.extname=function(e){return k.extname(e.path)}}(C||(C={}))})(),De=o})();const{URI:Ce,Utils:Se}=De;function we(e,t){if("string"!=typeof e)throw new TypeError("Expected a string");const n=String(e);let o="";const r=!!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"|":o+="\\"+c;break;case"?":if(r){o+=".";break}case"[":case"]":if(r){o+=c;break}case"{":if(r){s=!0,o+="(";break}case"}":if(r){s=!1,o+=")";break}case",":if(s){o+="|";break}o+="\\"+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?o+="([^/]*)":("/"===u?e++:"/"===t&&o.endsWith("\\/")&&(o=o.substr(0,o.length-2)),o+="((?:[^/]*(?:/|$))*)"):o+=".*";break;default:o+=c}return a&&~a.indexOf("g")||(o="^"+o+"$"),new RegExp(o,a)}class xe{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:we("**/"+t,{extended:!0,globstar:!0}),include:e}))}t&&((t=Ae(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:o}of this.globWrappers)n.test(e)&&(t=o);return t}getURIs(){return this.uris}}class Pe{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 _e(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 _e{constructor(e,t=[]){this.schema=e,this.errors=t}}class Oe{constructor(e,t=[],n=[],o){this.schema=e,this.errors=t,this.warnings=n,this.schemaDraft=o}getSection(e){const t=this.getSectionRecursive(e,this.schema);if(t)return J(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 o of Object.keys(t.patternProperties))if(w(o)?.test(n))return this.getSectionRecursive(e,t.patternProperties[o])}else{if("object"==typeof t.additionalProperties)return this.getSectionRecursive(e,t.additionalProperties);if(n.match("[0-9]+"))if(Array.isArray(t.items)){const o=parseInt(n,10);if(!isNaN(o)&&t.items[o])return this.getSectionRecursive(e,t.items[o])}else if(t.items)return this.getSectionRecursive(e,t.items)}}}class qe{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=Ce.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=Ee(e)],o=Object.keys(this.schemasById).map((e=>this.schemasById[e]));for(;n.length;){const e=n.pop();for(let r=0;r<o.length;r++){const i=o[r];i&&(i.uri===e||i.dependencies.has(e))&&(i.uri!==e&&n.push(i.uri),i.clearSchema()&&(t=!0),o[r]=void 0)}}return t}setSchemaContributions(e){if(e.schemas){const t=e.schemas;for(const e in t){const n=Ee(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(Ee),n=this.addFilePatternAssociation(e.pattern,e.folderUri,t);this.contributionAssociations.push(n)}}}addSchemaHandle(e,t){const n=new Pe(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 o=new xe(e,t,n);return this.filePatternAssociations.push(o),o}registerExternalSchema(e){const t=Ee(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=Ee(e),n=this.schemasById[t];return n?n.getResolvedSchema():this.promise.resolve(void 0)}loadSchema(e){if(!this.requestService){const t=L.t("Unable to load schema from '{0}'. No schema request service available",Me(e));return this.promise.resolve(new _e({},[t]))}return this.requestService(e).then((t=>{if(!t){const t=L.t("Unable to load schema from '{0}': No content.",Me(e));return new _e({},[t])}const n=[];65279===t.charCodeAt(0)&&(n.push(L.t("Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.",Me(e))),t=t.trimStart());let o={};const r=[];return o=m(t,r),r.length&&n.push(L.t("Unable to parse content from '{0}': Parse error at offset {1}.",Me(e),r[0].offset)),new _e(o,n)}),(t=>{let n=t.toString();const o=t.toString().split("Error: ");return o.length>1&&(n=o[1]),S(n,".")&&(n=n.substr(0,n.length-1)),new _e({},[L.t("Unable to load schema from '{0}': {1}.",Me(e),n)])}))}resolveSchemaContent(e,t){const n=e.errors.slice(0),o=e.schema;let r=o.$schema?Ee(o.$schema):void 0;if("http://json-schema.org/draft-03/schema"===r)return this.promise.resolve(new Oe({},[L.t("Draft-03 schemas are not supported.")],[],r));let i=new Set;const s=this.contextService,a=(e,t,o,r)=>{let i;i=void 0===r||0===r.length?t:"/"===r.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,r):((e,t,n)=>(t.anchors||(t.anchors=l(e)),t.anchors.get(n)))(t,o,r),i?((e,t)=>{for(const n in t)t.hasOwnProperty(n)&&"id"!==n&&"$id"!==n&&(e[n]=t[n])})(e,i):n.push(L.t("$ref '{0}' in '{1}' can not be resolved.",r||"",o.uri))},c=(e,t,o,r)=>{s&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(t)&&(t=s.resolveRelativePath(t,r.uri)),t=Ee(t);const i=this.getOrAddSchemaHandle(t);return i.getUnresolvedSchema().then((s=>{if(r.dependencies.add(t),s.errors.length){const e=o?t+"#"+o:t;n.push(L.t("Problems loading reference '{0}': {1}",e,s.errors[0]))}return a(e,s.schema,i,o),u(e,s.schema,i)}))},u=(e,t,n)=>{const o=[];return this.traverseNodes(e,(e=>{const r=new Set;for(;e.$ref;){const i=e.$ref,s=i.split("#",2);if(delete e.$ref,s[0].length>0)return void o.push(c(e,s[0],s[1],n));if(!r.has(i)){const o=s[1];a(e,t,n,o),r.add(i)}}e.$recursiveRef&&i.add("$recursiveRef"),e.$dynamicRef&&i.add("$dynamicRef")})),this.promise.all(o)},l=e=>{const t=new Map;return this.traverseNodes(e,(e=>{const o=e.$id||e.id,r=D(o)&&"#"===o.charAt(0)?o.substring(1):e.$anchor;r&&(t.has(r)?n.push(L.t("Duplicate anchor declaration: '{0}'",r)):t.set(r,e)),e.$recursiveAnchor&&i.add("$recursiveAnchor"),e.$dynamicAnchor&&i.add("$dynamicAnchor")})),t};return u(o,o,t).then((e=>{let t=[];return i.size&&t.push(L.t("The schema uses meta-schema features ({0}) that are not yet supported by the validator.",Array.from(i.keys()).join(", "))),new Oe(o,n,t,r)}))}traverseNodes(e,t){if(!e||"object"!=typeof e)return Promise.resolve(null);const n=new Set,o=(...e)=>{for(const t of e)C(t)&&a.push(t)},r=(...e)=>{for(const t of e)if(C(t))for(const e in t){const n=t[e];C(n)&&a.push(n)}},i=(...e)=>{for(const t of e)if(Array.isArray(t))for(const e of t)C(e)&&a.push(e)},s=e=>{if(Array.isArray(e))for(const t of e)C(t)&&a.push(t);else C(e)&&a.push(e)},a=[e];let c=a.pop();for(;c;)n.has(c)||(n.add(c),t(c),o(c.additionalItems,c.additionalProperties,c.not,c.contains,c.propertyNames,c.if,c.then,c.else,c.unevaluatedItems,c.unevaluatedProperties),r(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=[],o=Ae(e);for(const e of this.filePatternAssociations)if(e.matchesPattern(o))for(const o of e.getURIs())t[o]||(n.push(o),t[o]=!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=Ee(n);return this.getOrAddSchemaHandle(e).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===e)return this.cachedSchemaForResource.resolvedSchema;const n=this.getAssociatedSchemas(e),o=n.length>0?this.createCombinedSchema(e,n).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:e,resolvedSchema:o},o}createCombinedSchema(e,t){if(1===t.length)return this.getOrAddSchemaHandle(t[0]);{const n="schemaservice://combinedSchema/"+encodeURIComponent(e),o={allOf:t.map((e=>({$ref:e})))};return this.addSchemaHandle(n,o)}}getMatchingSchemas(e,t,n){if(n){const e=n.id||"schemaservice://untitled/matchingSchemas/"+Ne++;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 Ne=0;function Ee(e){try{return Ce.parse(e).toString(!0)}catch(t){return e}}function Ae(e){try{return Ce.parse(e).with({fragment:null,query:null}).toString(!0)}catch(t){return e}}function Me(e){try{const t=Ce.parse(e);if("file"===t.scheme)return t.fsPath}catch(e){}return e}function je(e,t){const n=[],o=[],r=[];let i=-1;const s=d(e.getText(),!1);let a=s.scan();function c(e){n.push(e),o.push(r.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"};r.push(n);break}case 2:case 4:{const t=2===a?"object":"array";if(r.length>0&&r[r.length-1].kind===t){const t=r.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(N.Position.create(t+1,0))):t<n&&(c({startLine:t,endLine:n,kind:N.FoldingRangeKind.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.FoldingRangeKind.Region};r.push(e)}else{let e=r.length-1;for(;e>=0&&r[e].kind!==N.FoldingRangeKind.Region;)e--;if(e>=0){const t=r[e];r.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 o)e<30&&(l[e]=(l[e]||0)+1);let h=0,f=0;for(let e=0;e<l.length;e++){const t=l[e];if(t){if(t+h>u){f=e;break}h+=t}}const m=[];for(let e=0;e<n.length;e++){const t=o[e];"number"==typeof t&&(t<f||t===f&&h++<u)&&m.push(n[e])}return m}function Ie(e,t,n){function o(t,n){return N.Range.create(e.positionAt(t),e.positionAt(n))}const r=d(e.getText(),!0);function i(e,t){return r.setPosition(e),r.scan()===t?r.getTokenOffset()+r.getTokenLength():-1}return t.map((function(t){let r=e.offsetAt(t),s=n.getNodeFromOffset(r,!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&&r>=e&&r<=t&&a.push(o(e,t)),a.push(o(s.offset,s.offset+s.length));break;case"number":case"boolean":case"null":case"property":a.push(o(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(o(s.offset,e))}s=s.parent}let c;for(let e=a.length-1;e>=0;e--)c=N.SelectionRange.create(a[e],c);return c||(c=N.SelectionRange.create(N.Range.create(t,t))),c}))}function Le(e,t,n){let r;if(n){const t=e.offsetAt(n.start);r={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 r,i,s,a,c;if(t){for(a=t.offset,c=a+t.length,s=a;s>0&&!l(e,s-1);)s--;let o=c;for(;o<e.length&&!l(e,o);)o++;i=e.substring(s,o),r=function(e,t){let n=0,o=0;const r=t.tabSize||4;for(;n<e.length;){let t=e.charAt(n);if(" "===t)o++;else{if("\t"!==t)break;o+=r}n++}return Math.floor(o/r)}(i,n)}else i=e,r=0,s=0,a=0,c=e.length;const d=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);let h,f=0,m=0;h=n.insertSpaces?u(" ",n.tabSize||4):"\t";let p=o(i,!1),g=!1;function y(){return f>1?u(d,f)+u(h,r+m):d+u(h,r+m)}function b(){let e=p.scan();for(f=0;15===e||14===e;)14===e&&n.keepLines?f+=1:14===e&&(f=1),e=p.scan();return g=16===e||0!==p.getTokenError(),e}const v=[];function T(n,o,r){g||t&&!(o<c&&r>a)||e.substring(o,r)===n||v.push({offset:o,length:r-o,content:n})}let R=b();if(n.keepLines&&f>0&&T(u(d,f),0,0),17!==R){let e=p.getTokenOffset()+s;T(u(h,r),s,e)}for(;17!==R;){let e=p.getTokenOffset()+p.getTokenLength()+s,t=b(),o="",r=!1;for(;0===f&&(12===t||13===t);)T(" ",e,p.getTokenOffset()+s),e=p.getTokenOffset()+p.getTokenLength()+s,r=12===t,o=r?y():"",t=b();if(2===t)1!==R&&m--,n.keepLines&&f>0||!n.keepLines&&1!==R?o=y():n.keepLines&&(o=" ");else if(4===t)3!==R&&m--,n.keepLines&&f>0||!n.keepLines&&3!==R?o=y():n.keepLines&&(o=" ");else{switch(R){case 3:case 1:m++,o=n.keepLines&&f>0||!n.keepLines?y():" ";break;case 5:o=n.keepLines&&f>0||!n.keepLines?y():" ";break;case 12:o=y();break;case 13:f>0?o=y():r||(o=" ");break;case 6:n.keepLines&&f>0?o=y():r||(o=" ");break;case 10:n.keepLines&&f>0?o=y():6!==t||r||(o="");break;case 7:case 8:case 9:case 11:case 2:case 4:n.keepLines&&f>0?o=y():12!==t&&13!==t||r?5!==t&&17!==t&&(g=!0):o=" ";break;case 16:g=!0}f>0&&(12===t||13===t)&&(o=y())}17===t&&(o=n.keepLines&&f>0?y():n.insertFinalNewline?d:""),T(o,e,p.getTokenOffset()+s),R=t}return v}(e,t,n)}(e.getText(),r,i).map((t=>N.TextEdit.replace(N.Range.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length)),t.content)))}var Fe;!function(e){e[e.Object=0]="Object",e[e.Array=1]="Array"}(Fe||(Fe={}));class $e{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 o=t.propertyName.toLowerCase(),r=e[0].propertyName.toLowerCase(),i=e[e.length-1].propertyName.toLowerCase();if(o<r)return 0;if(o>i)return e.length;let s=0,a=e.length-1;for(;s<=a;){let o=a+s>>1,r=n(t,e[o]);if(r>0)s=o+1;else{if(!(r<0))return o;a=o-1}}return-s-1}(this.childrenProperties,e,We),t<0&&(t=-1*t-1),this.childrenProperties.splice(t,0,e)}else this.childrenProperties.push(e);return e}}function We(e,t){const n=e.propertyName.toLowerCase(),o=t.propertyName.toLowerCase();return n<o?-1:n>o?1:0}function Ve(e,t,n){if(0!==t.childrenProperties.length)if(t.type===Fe.Object){let o=1/0;for(const e of t.childrenProperties)e.beginningLineNumber<o&&(o=e.beginningLineNumber);n+=o-t.beginningLineNumber,e.push(new He(n,t.childrenProperties))}else t.type===Fe.Array&&Ue(e,t,n)}function Ue(e,t,n){for(const o of t.childrenProperties){if(o.type===Fe.Object){let r=1/0;for(const e of o.childrenProperties)e.beginningLineNumber<r&&(r=e.beginningLineNumber);const i=r-o.beginningLineNumber;e.push(new He(n+o.beginningLineNumber-t.beginningLineNumber+i,o.childrenProperties))}o.type===Fe.Array&&Ue(e,o,n+o.beginningLineNumber-t.beginningLineNumber)}}class He{constructor(e,t){this.beginningLineNumber=e,this.propertyTreeArray=t}}function Ke(e,t){const n=[];return t.visit((o=>{if("property"===o.type&&"$ref"===o.keyNode.value&&"string"===o.valueNode?.type){const r=o.valueNode.value,i=function(e,t){const n=function(e){return"#"===e?[]:"#"!==e[0]||"/"!==e[1]?null:e.substring(2).split(/\//).map(Je)}(t);return n?ze(n,e.root):null}(t,r);if(i){const t=e.positionAt(i.offset);n.push({target:`${e.uri}#${t.line+1},${t.character+1}`,range:Be(e,o.valueNode)})}}return!0})),Promise.resolve(n)}function Be(e,t){return N.Range.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function ze(e,t){if(!t)return null;if(0===e.length)return t;const n=e.shift();if(t&&"object"===t.type){const o=t.properties.find((e=>e.keyNode.value===n));return o?ze(e,o.valueNode):null}if(t&&"array"===t.type&&n.match(/^(0|[1-9][0-9]*)$/)){const o=Number.parseInt(n),r=t.items[o];return r?ze(e,r):null}return null}function Je(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Xe(e){const t=e.promiseConstructor||Promise,n=new qe(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(Re);const o=new ce(n,e.contributions,t,e.clientCapabilities),r=new ue(n,e.contributions,t),i=new be(n),s=new de(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 o=-1;const r=e.getText(),i=d(r,!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(N.Range.create(e.positionAt(i.getTokenOffset()),e.positionAt(i.getTokenOffset()+i.getTokenLength())));break;case 15:case 14:break;default:return t}}}function c(t,r,i,s,a=N.DiagnosticSeverity.Error){if(0===n.length||i!==o){const c=N.Range.create(e.positionAt(i),e.positionAt(s));n.push(N.Diagnostic.create(c,t,a,r,e.languageId)),o=i}}function u(e,t,n,o=[],s=[]){let u=i.getTokenOffset(),l=i.getTokenOffset()+i.getTokenLength();if(u===l&&u>0){for(u--;u>0&&/\s/.test(r.charAt(u));)u--;l=u+1}if(c(e,t,u,l),n&&h(n,!1),o.length+s.length>0){let e=i.getToken();for(;17!==e;){if(-1!==o.indexOf(e)){a();break}if(-1!==s.indexOf(e))break;e=a()}}return n}function l(){switch(i.getTokenError()){case 4:return u(L.t("Invalid unicode sequence in string."),_.InvalidUnicode),!0;case 5:return u(L.t("Invalid escape character in string."),_.InvalidEscapeCharacter),!0;case 3:return u(L.t("Unexpected end of number."),_.UnexpectedEndOfNumber),!0;case 1:return u(L.t("Unexpected end of comment."),_.UnexpectedEndOfComment),!0;case 2:return u(L.t("Unexpected end of string."),_.UnexpectedEndOfString),!0;case 6:return u(L.t("Invalid characters in string. Control characters must be escaped."),_.InvalidCharacter),!0}return!1}function h(e,t){return e.length=i.getTokenOffset()+i.getTokenLength()-e.offset,t&&a(),e}const f=new K(void 0,0,0);function m(t,n){const o=new B(t,i.getTokenOffset(),f);let r=p(o);if(!r){if(16!==i.getToken())return;{u(L.t("Property keys must be doublequoted"),_.PropertyKeysMustBeDoublequoted);const e=new K(o,i.getTokenOffset(),i.getTokenLength());e.value=i.getTokenValue(),r=e,a()}}if(o.keyNode=r,"//"!==r.value){const e=n[r.value];e?(c(L.t("Duplicate object key"),_.DuplicateKey,o.keyNode.offset,o.keyNode.offset+o.keyNode.length,N.DiagnosticSeverity.Warning),C(e)&&c(L.t("Duplicate object key"),_.DuplicateKey,e.keyNode.offset,e.keyNode.offset+e.keyNode.length,N.DiagnosticSeverity.Warning),n[r.value]=!0):n[r.value]=o}if(6===i.getToken())o.colonOffset=i.getTokenOffset(),a();else if(u(L.t("Colon expected"),_.ColonExpected),10===i.getToken()&&e.positionAt(r.offset+r.length).line<e.positionAt(i.getTokenOffset()).line)return o.length=r.length,o;const s=g(o);return s?(o.valueNode=s,o.length=s.offset+s.length-o.offset,o):u(L.t("Value expected"),_.ValueExpected,o,[],[2,5])}function p(e){if(10!==i.getToken())return;const t=new K(e,i.getTokenOffset());return t.value=i.getTokenValue(),h(t,!0)}function g(e){return function(e){if(3!==i.getToken())return;const t=new U(e,i.getTokenOffset());a();let n=!1;for(;4!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){n||u(L.t("Value expected"),_.ValueExpected);const e=i.getTokenOffset();if(a(),4===i.getToken()){n&&c(L.t("Trailing comma"),_.TrailingComma,e,e+1);continue}}else n&&u(L.t("Expected comma"),_.CommaExpected);const e=g(t);e?t.items.push(e):u(L.t("Value expected"),_.ValueExpected,void 0,[],[4,5]),n=!0}return 4!==i.getToken()?u(L.t("Expected comma or closing bracket"),_.CommaOrCloseBacketExpected,t):h(t,!0)}(e)||function(e){if(1!==i.getToken())return;const t=new z(e,i.getTokenOffset()),n=Object.create(null);a();let o=!1;for(;2!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){o||u(L.t("Property expected"),_.PropertyExpected);const e=i.getTokenOffset();if(a(),2===i.getToken()){o&&c(L.t("Trailing comma"),_.TrailingComma,e,e+1);continue}}else o&&u(L.t("Expected comma"),_.CommaExpected);const e=m(t,n);e?t.properties.push(e):u(L.t("Property expected"),_.PropertyExpected,void 0,[],[2,5]),o=!0}return 2!==i.getToken()?u(L.t("Expected comma or closing brace"),_.CommaOrCloseBraceExpected,t):h(t,!0)}(e)||p(e)||function(e){if(11!==i.getToken())return;const t=new H(e,i.getTokenOffset());if(0===i.getTokenError()){const e=i.getTokenValue();try{const n=JSON.parse(e);if(!T(n))return u(L.t("Invalid number format."),_.Undefined,t);t.value=n}catch(e){return u(L.t("Invalid number format."),_.Undefined,t)}t.isInteger=-1===e.indexOf(".")}return h(t,!0)}(e)||function(e){switch(i.getToken()){case 7:return h(new W(e,i.getTokenOffset()),!0);case 8:return h(new V(e,!0,i.getTokenOffset()),!0);case 9:return h(new V(e,!1,i.getTokenOffset()),!0);default:return}}(e)}let y;return 17!==a()&&(y=g(y),y?17!==i.getToken()&&u(L.t("End of file expected."),_.Undefined):u(L.t("Expected a JSON object, array or literal."),_.Undefined)),new re(y,n,s)}(e,{collectComments:!0}),newJSONDocument:(e,t)=>function(e,t=[]){return new re(e,t,[])}(e,t),getMatchingSchemas:n.getMatchingSchemas.bind(n),doResolve:o.doResolve.bind(o),doComplete:o.doComplete.bind(o),findDocumentSymbols:i.findDocumentSymbols.bind(i),findDocumentSymbols2:i.findDocumentSymbols2.bind(i),findDocumentColors:i.findDocumentColors.bind(i),getColorPresentations:i.getColorPresentations.bind(i),doHover:r.doHover.bind(r),getFoldingRanges:je,getSelectionRanges:Ie,findDefinition:()=>Promise.resolve([]),findLinks:Ke,format:(e,t,n)=>Le(e,n,t),sort:(e,t)=>function(e,t){const n={...t,keepLines:!1},o=P.applyEdits(e,Le(e,n,void 0)),r=P.create("test://test.json","json",0,o),i=function(e,t){if(0===t.childrenProperties.length)return e;const n=P.create("test://test.json","json",0,e.getText()),o=[];for(Ve(o,t,t.beginningLineNumber);o.length>0;){const t=o.shift(),r=t.propertyTreeArray;let i=t.beginningLineNumber;for(let t=0;t<r.length;t++){const s=r[t],a=N.Range.create(N.Position.create(s.beginningLineNumber,0),N.Position.create(s.endLineNumber+1,0)),c=e.getText(a),u=P.create("test://test.json","json",0,c);if(!0===s.lastProperty&&t!==r.length-1){const e=s.lineWhereToAddComma-s.beginningLineNumber,t=s.indexWhereToAddComa,n={range:N.Range.create(N.Position.create(e,t),N.Position.create(e,t)),text:","};P.update(u,[n],1)}else if(!1===s.lastProperty&&t===r.length-1){const e=s.commaIndex,t=s.commaLine-s.beginningLineNumber,n={range:N.Range.create(N.Position.create(t,e),N.Position.create(t,e+1)),text:""};P.update(u,[n],1)}const l=s.endLineNumber-s.beginningLineNumber+1,d={range:N.Range.create(N.Position.create(i,0),N.Position.create(i+l,0)),text:u.getText()};P.update(n,[d],1),Ve(o,s,i),i+=l}}return n}(r,function(e){const t=e.getText(),n=d(t,!1);let o,r,i,s=new $e,a=s,c=s,u=s,l=0,h=0,f=-1,m=-1,p=0,g=0,y=[],b=!1,v=!1;for(;17!==(o=n.scan());){if(!0===b&&14!==o&&15!==o&&12!==o&&13!==o&&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!==o&&15!==o&&12!==o&&13!==o&&(p=n.getTokenStartLine(),v=!1),n.getTokenStartLine()!==l){for(let t=l;t<n.getTokenStartLine();t++)h+=e.getText(N.Range.create(N.Position.create(t,0),N.Position.create(t+1,0))).length;l=n.getTokenStartLine()}switch(o){case 10:if(void 0===r||1===r||5===r&&y[y.length-1]===Fe.Object){const e=new $e(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]===Fe.Object)a=c;else if(y[y.length-1]===Fe.Array){const e=new $e(n.getTokenValue(),p);e.noKeyName=!0,u=c,c=a.addChildProperty(e),a=c}y.push(Fe.Array),c.type=Fe.Array,p=n.getTokenStartLine(),p++;break;case 1:if(void 0===s.beginningLineNumber)s.beginningLineNumber=n.getTokenStartLine();else if(y[y.length-1]===Fe.Array){const e=new $e(n.getTokenValue(),p);e.noKeyName=!0,u=c,c=a.addChildProperty(e)}c.type=Fe.Object,y.push(Fe.Object),a=c,p=n.getTokenStartLine(),p++;break;case 4:g=n.getTokenStartLine(),y.pop(),void 0!==c.endLineNumber||2!==r&&4!==r||(c.endLineNumber=g-1,c.lastProperty=!0,c.lineWhereToAddComma=f,c.indexWhereToAddComa=m,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!==r&&void 0===c.endLineNumber&&(c.endLineNumber=g-1,c.lastProperty=!0,c.lineWhereToAddComma=f,c.indexWhereToAddComa=m,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]!==Fe.Object&&(y[y.length-1]!==Fe.Array||2!==r&&4!==r)||(c.endLineNumber=g,c.commaIndex=n.getTokenOffset()-h,c.commaLine=g),2!==r&&4!==r||(u=c,c=c?c.parent:void 0,a=c),p=g+1;break;case 13:5!==r||f!==n.getTokenStartLine()||(y[y.length-1]!==Fe.Array||2!==i&&4!==i)&&y[y.length-1]!==Fe.Object||(y[y.length-1]!==Fe.Array||2!==i&&4!==i)&&y[y.length-1]!==Fe.Object||(c.endLineNumber=void 0,b=!0),1!==r&&3!==r||f!==n.getTokenStartLine()||(v=!0)}14!==o&&13!==o&&12!==o&&15!==o&&(i=r,r=o,f=n.getTokenStartLine(),m=n.getTokenOffset()+n.getTokenLength()-h)}return s}(r)),s=Le(i,n,void 0),a=P.applyEdits(i,s);return[N.TextEdit.replace(N.Range.create(N.Position.create(0,0),e.positionAt(e.getText().length)),a)]}(e,t)}}},1169:(e,t,n)=>{"use strict";e.exports=n(9054)},9054:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.BrowserMessageWriter=t.BrowserMessageReader=void 0,n(5669).default.install();const i=n(3870);r(n(3870),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,o){return void 0===n&&(n=i.NullLogger),i.ConnectionStrategy.is(o)&&(o={connectionStrategy:o}),(0,i.createMessageConnection)(e,t,n,o)}},5669:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(3870);class r extends o.AbstractMessageBuffer{constructor(e="utf-8"){super(e),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return r.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)}}r.emptyBuffer=new Uint8Array(0);class i{constructor(e){this.socket=e,this._onData=new o.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then((e=>{this._onData.fire(new Uint8Array(e))}),(()=>{(0,o.RAL)().console.error("Converting blob to array buffer failed.")}))},this.socket.addEventListener("message",this._messageListener)}onClose(e){return this.socket.addEventListener("close",e),o.Disposable.create((()=>this.socket.removeEventListener("close",e)))}onError(e){return this.socket.addEventListener("error",e),o.Disposable.create((()=>this.socket.removeEventListener("error",e)))}onEnd(e){return this.socket.addEventListener("end",e),o.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),o.Disposable.create((()=>this.socket.removeEventListener("close",e)))}onError(e){return this.socket.addEventListener("error",e),o.Disposable.create((()=>this.socket.removeEventListener("error",e)))}onEnd(e){return this.socket.addEventListener("end",e),o.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 r(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 o=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(o)}},setImmediate(e,...t){const n=setTimeout(e,0,...t);return{dispose:()=>clearTimeout(n)}},setInterval(e,t,...n){const o=setInterval(e,t,...n);return{dispose:()=>clearInterval(o)}}})});function u(){return c}!function(e){e.install=function(){o.RAL.install(c)}}(u||(u={})),t.default=u},3870:(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.Trace=void 0;const o=n(839);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 r=n(6184);Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:function(){return r.LinkedMap}}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:function(){return r.LRUCache}}),Object.defineProperty(t,"Touch",{enumerable:!0,get:function(){return r.Touch}});const i=n(3911);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return i.Disposable}});const s=n(7135);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(3881);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(8211);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(6525);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(6654);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(5530);Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return d.AbstractMessageBuffer}});const h=n(1343);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,"TraceValues",{enumerable:!0,get:function(){return h.TraceValues}}),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,"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}});const f=n(147);t.RAL=f.default},3881:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const o=n(147),r=n(7574),i=n(7135);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||r.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(s||(t.CancellationToken=s={}));const a=Object.freeze((function(e,t){const n=(0,o.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}}},1343:(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.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0;const o=n(147),r=n(7574),i=n(839),s=n(6184),a=n(7135),c=n(3881);var u,l,d,h,f,m,p,g,y,b,v,T,R,k,D,C,S,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 r.func(e)}}(h||(h={})),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"}(f||(t.Trace=f={})),function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"}(m||(t.TraceValues=m={})),function(e){e.fromString=function(t){if(!r.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}},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"}}}(f||(t.Trace=f={})),function(e){e.Text="text",e.JSON="json"}(p||(t.TraceFormat=p={})),function(e){e.fromString=function(t){return r.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 P extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,P.prototype)}}t.ConnectionError=P,function(e){e.is=function(e){const t=e;return t&&r.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)&&r.func(t.createCancellationTokenSource)&&(void 0===t.dispose||r.func(t.dispose))}}(T||(t.IdCancellationReceiverStrategy=T={})),function(e){e.is=function(e){const t=e;return t&&"request"===t.kind&&r.func(t.createCancellationTokenSource)&&(void 0===t.dispose||r.func(t.dispose))}}(R||(t.RequestCancellationReceiverStrategy=R={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new c.CancellationTokenSource}),e.is=function(e){return T.is(e)||R.is(e)}}(k||(t.CancellationReceiverStrategy=k={})),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&&r.func(t.sendCancellation)&&r.func(t.cleanup)}}(D||(t.CancellationSenderStrategy=D={})),function(e){e.Message=Object.freeze({receiver:k.Message,sender:D.Message}),e.is=function(e){const t=e;return t&&k.is(t.receiver)&&D.is(t.sender)}}(C||(t.CancellationStrategy=C={})),function(e){e.is=function(e){const t=e;return t&&r.func(t.handleMessage)}}(S||(t.MessageStrategy=S={})),function(e){e.is=function(e){const t=e;return t&&(C.is(t.cancellationStrategy)||v.is(t.connectionStrategy)||S.is(t.messageStrategy))}}(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 R=void 0!==m?m:t.NullLogger;let k=0,D=0,w=0;const _="2.0";let O;const q=new Map;let N;const E=new Map,A=new Map;let M,j,I=new s.LinkedMap,L=new Map,F=new Set,$=new Map,W=f.Off,V=p.Text,U=x.New;const H=new a.Emitter,K=new a.Emitter,B=new a.Emitter,z=new a.Emitter,J=new a.Emitter,X=v&&v.cancellationStrategy?v.cancellationStrategy:C.Message;function G(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 Z(e){}function Q(){return U===x.Listening}function Y(){return U===x.Closed}function ee(){return U===x.Disposed}function te(){U!==x.New&&U!==x.Listening||(U=x.Closed,K.fire(void 0))}function ne(){M||0===I.size||(M=(0,o.default)().timer.setImmediate((()=>{M=void 0,function(){if(0===I.size)return;const e=I.shift();try{const t=v?.messageStrategy;S.is(t)?t.handleMessage(e,oe):oe(e)}finally{ne()}}()})))}function oe(e){i.Message.isRequest(e)?function(e){if(ee())return;function t(t,o,r){const s={jsonrpc:_,id:e.id};t instanceof i.ResponseError?s.error=t.toJson():s.result=void 0===t?null:t,se(s,o,r),n.write(s).catch((()=>R.error("Sending response failed.")))}function o(t,o,r){const i={jsonrpc:_,id:e.id,error:t.toJson()};se(i,o,r),n.write(i).catch((()=>R.error("Sending response failed.")))}!function(e){if(W!==f.Off&&j)if(V===p.Text){let t;W!==f.Verbose&&W!==f.Compact||!e.params||(t=`Params: ${ie(e.params)}\n\n`),j.log(`Received request '${e.method} - (${e.id})'.`,t)}else ce("receive-request",e)}(e);const s=q.get(e.method);let a,c;s&&(a=s.type,c=s.handler);const u=Date.now();if(c||O){const s=e.id??String(Date.now()),l=T.is(X.receiver)?X.receiver.createCancellationTokenSource(s):X.receiver.createCancellationTokenSource(e);null!==e.id&&F.has(e.id)&&l.cancel(),null!==e.id&&$.set(s,l);try{let d;if(c)if(void 0===e.params){if(void 0!==a&&0!==a.numberOfParams)return void o(new i.ResponseError(i.ErrorCodes.InvalidParams,`Request ${e.method} defines ${a.numberOfParams} params but received none.`),e.method,u);d=c(l.token)}else if(Array.isArray(e.params)){if(void 0!==a&&a.parameterStructures===i.ParameterStructures.byName)return void o(new i.ResponseError(i.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,u);d=c(...e.params,l.token)}else{if(void 0!==a&&a.parameterStructures===i.ParameterStructures.byPosition)return void o(new i.ResponseError(i.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,u);d=c(e.params,l.token)}else O&&(d=O(e.method,e.params,l.token));const h=d;d?h.then?h.then((n=>{$.delete(s),t(n,e.method,u)}),(t=>{$.delete(s),t instanceof i.ResponseError?o(t,e.method,u):t&&r.string(t.message)?o(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,u):o(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)})):($.delete(s),t(d,e.method,u)):($.delete(s),function(t,o,r){void 0===t&&(t=null);const i={jsonrpc:_,id:e.id,result:t};se(i,o,r),n.write(i).catch((()=>R.error("Sending response failed.")))}(d,e.method,u))}catch(n){$.delete(s),n instanceof i.ResponseError?t(n,e.method,u):n&&r.string(n.message)?o(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${n.message}`),e.method,u):o(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}}else o(new i.ResponseError(i.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,u)}(e):i.Message.isNotification(e)?function(e){if(ee())return;let t,n;if(e.method===u.type.method){const t=e.params.id;return F.delete(t),void ae(e)}{const o=E.get(e.method);o&&(n=o.handler,t=o.type)}if(n||N)try{if(ae(e),n)if(void 0===e.params)void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==i.ParameterStructures.byName&&R.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),n();else if(Array.isArray(e.params)){const o=e.params;e.method===d.type.method&&2===o.length&&l.is(o[0])?n({token:o[0],value:o[1]}):(void 0!==t&&(t.parameterStructures===i.ParameterStructures.byName&&R.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&R.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${o.length} arguments`)),n(...o))}else void 0!==t&&t.parameterStructures===i.ParameterStructures.byPosition&&R.error(`Notification ${e.method} defines parameters by position but received parameters by name`),n(e.params);else N&&N(e.method,e.params)}catch(t){t.message?R.error(`Notification handler '${e.method}' failed with message: ${t.message}`):R.error(`Notification handler '${e.method}' failed unexpectedly.`)}else B.fire(e)}(e):i.Message.isResponse(e)?function(e){if(!ee())if(null===e.id)e.error?R.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):R.error("Received response message without id. No further error information provided.");else{const t=e.id,n=L.get(t);if(function(e,t){if(W!==f.Off&&j)if(V===p.Text){let n;if(W!==f.Verbose&&W!==f.Compact||(e.error&&e.error.data?n=`Error data: ${ie(e.error.data)}\n\n`:e.result?n=`Result: ${ie(e.result)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),t){const o=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";j.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${o}`,n)}else j.log(`Received response ${e.id} without active response promise.`,n)}else ce("receive-response",e)}(e,n),void 0!==n){L.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?R.error(`Response handler '${n.method}' failed with message: ${e.message}`):R.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void R.error("Received empty message.");R.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(r.string(t.id)||r.number(t.id)){const e=t.id,n=L.get(e);n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}e.onClose(te),e.onError((function(e){H.fire([e,void 0,void 0])})),n.onClose(te),n.onError((function(e){H.fire(e)}));const re=e=>{try{if(i.Message.isNotification(e)&&e.method===u.type.method){const t=e.params.id,o=G(t),r=I.get(o);if(i.Message.isRequest(r)){const i=v?.connectionStrategy,s=i&&i.cancelUndispatched?i.cancelUndispatched(r,Z):void 0;if(s&&(void 0!==s.error||void 0!==s.result))return I.delete(o),$.delete(t),s.id=r.id,se(s,e.method,Date.now()),void n.write(s).catch((()=>R.error("Sending response for canceled message failed.")))}const s=$.get(t);if(void 0!==s)return s.cancel(),void ae(e);F.add(t)}!function(e,t){var n;i.Message.isRequest(t)?e.set(G(t.id),t):i.Message.isResponse(t)?e.set(null===(n=t.id)?"res-unknown-"+(++w).toString():"res-"+n.toString(),t):e.set("not-"+(++D).toString(),t)}(I,e)}finally{ne()}};function ie(e){if(null!=e)switch(W){case f.Verbose:return JSON.stringify(e,null,4);case f.Compact:return JSON.stringify(e);default:return}}function se(e,t,n){if(W!==f.Off&&j)if(V===p.Text){let o;W!==f.Verbose&&W!==f.Compact||(e.error&&e.error.data?o=`Error data: ${ie(e.error.data)}\n\n`:e.result?o=`Result: ${ie(e.result)}\n\n`:void 0===e.error&&(o="No result returned.\n\n")),j.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,o)}else ce("send-response",e)}function ae(e){if(W!==f.Off&&j&&e.method!==y.type.method)if(V===p.Text){let t;W!==f.Verbose&&W!==f.Compact||(t=e.params?`Params: ${ie(e.params)}\n\n`:"No parameters provided.\n\n"),j.log(`Received notification '${e.method}'.`,t)}else ce("receive-notification",e)}function ce(e,t){if(!j||W===f.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};j.log(n)}function ue(){if(Y())throw new P(b.Closed,"Connection is closed.");if(ee())throw new P(b.Disposed,"Connection is disposed.")}function le(e){return void 0===e?null:e}function de(e){return null===e?void 0:e}function he(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function fe(e,t){switch(e){case i.ParameterStructures.auto:return he(t)?de(t):[le(t)];case i.ParameterStructures.byName:if(!he(t))throw new Error("Received parameters by name but param is not an object literal.");return de(t);case i.ParameterStructures.byPosition:return[le(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function me(e,t){let n;const o=e.numberOfParams;switch(o){case 0:n=void 0;break;case 1:n=fe(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e<t.length&&e<o;e++)n.push(le(t[e]));if(t.length<o)for(let e=t.length;e<o;e++)n.push(null)}return n}const pe={sendNotification:(e,...t)=>{let o,s;if(ue(),r.string(e)){o=e;const n=t[0];let r=0,a=i.ParameterStructures.auto;i.ParameterStructures.is(n)&&(r=1,a=n);let c=t.length;const u=c-r;switch(u){case 0:s=void 0;break;case 1:s=fe(a,t[r]);break;default:if(a===i.ParameterStructures.byName)throw new Error(`Received ${u} parameters for 'by Name' notification parameter structure.`);s=t.slice(r,c).map((e=>le(e)))}}else{const n=t;o=e.method,s=me(e,n)}const a={jsonrpc:_,method:o,params:s};return function(e){if(W!==f.Off&&j)if(V===p.Text){let t;W!==f.Verbose&&W!==f.Compact||(t=e.params?`Params: ${ie(e.params)}\n\n`:"No parameters provided.\n\n"),j.log(`Sending notification '${e.method}'.`,t)}else ce("send-notification",e)}(a),n.write(a).catch((e=>{throw R.error("Sending notification failed."),e}))},onNotification:(e,t)=>{let n;return ue(),r.func(e)?N=e:t&&(r.string(e)?(n=e,E.set(e,{type:void 0,handler:t})):(n=e.method,E.set(e.method,{type:e,handler:t}))),{dispose:()=>{void 0!==n?E.delete(n):N=void 0}}},onProgress:(e,t,n)=>{if(A.has(t))throw new Error(`Progress handler for token ${t} already registered`);return A.set(t,n),{dispose:()=>{A.delete(t)}}},sendProgress:(e,t,n)=>pe.sendNotification(d.type,{token:t,value:n}),onUnhandledProgress:z.event,sendRequest:(e,...t)=>{let o,s,a;if(ue(),function(){if(!Q())throw new Error("Call listen() first.")}(),r.string(e)){o=e;const n=t[0],r=t[t.length-1];let u=0,l=i.ParameterStructures.auto;i.ParameterStructures.is(n)&&(u=1,l=n);let d=t.length;c.CancellationToken.is(r)&&(d-=1,a=r);const h=d-u;switch(h){case 0:s=void 0;break;case 1:s=fe(l,t[u]);break;default:if(l===i.ParameterStructures.byName)throw new Error(`Received ${h} parameters for 'by Name' request parameter structure.`);s=t.slice(u,d).map((e=>le(e)))}}else{const n=t;o=e.method,s=me(e,n);const r=e.numberOfParams;a=c.CancellationToken.is(n[r])?n[r]:void 0}const u=k++;let l;a&&(l=a.onCancellationRequested((()=>{const e=X.sender.sendCancellation(pe,u);return void 0===e?(R.log(`Received no promise from cancellation strategy when cancelling id ${u}`),Promise.resolve()):e.catch((()=>{R.log(`Sending cancellation messages for id ${u} failed`)}))})));const d={jsonrpc:_,id:u,method:o,params:s};return function(e){if(W!==f.Off&&j)if(V===p.Text){let t;W!==f.Verbose&&W!==f.Compact||!e.params||(t=`Params: ${ie(e.params)}\n\n`),j.log(`Sending request '${e.method} - (${e.id})'.`,t)}else ce("send-request",e)}(d),"function"==typeof X.sender.enableCancellation&&X.sender.enableCancellation(d),new Promise((async(e,t)=>{const r={method:o,timerStart:Date.now(),resolve:t=>{e(t),X.sender.cleanup(u),l?.dispose()},reject:e=>{t(e),X.sender.cleanup(u),l?.dispose()}};try{await n.write(d),L.set(u,r)}catch(e){throw R.error("Sending request failed."),r.reject(new i.ResponseError(i.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),e}}))},onRequest:(e,t)=>{ue();let n=null;return h.is(e)?(n=void 0,O=e):r.string(e)?(n=null,void 0!==t&&(n=e,q.set(e,{handler:t,type:void 0}))):void 0!==t&&(n=e.method,q.set(e.method,{type:e,handler:t})),{dispose:()=>{null!==n&&(void 0!==n?q.delete(n):O=void 0)}}},hasPendingResponse:()=>L.size>0,trace:async(e,t,n)=>{let o=!1,i=p.Text;void 0!==n&&(r.boolean(n)?o=n:(o=n.sendNotification||!1,i=n.traceFormat||p.Text)),W=e,V=i,j=W===f.Off?void 0:t,!o||Y()||ee()||await pe.sendNotification(g.type,{value:f.toString(e)})},onError:H.event,onClose:K.event,onUnhandledNotification:B.event,onDispose:J.event,end:()=>{n.end()},dispose:()=>{if(ee())return;U=x.Disposed,J.fire(void 0);const t=new i.ResponseError(i.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const e of L.values())e.reject(t);L=new Map,$=new Map,F=new Set,I=new s.LinkedMap,r.func(n.dispose)&&n.dispose(),r.func(e.dispose)&&e.dispose()},listen:()=>{ue(),function(){if(Q())throw new P(b.AlreadyListening,"Connection is already listening")}(),U=x.Listening,e.listen(re)},inspect:()=>{(0,o.default)().console.log("inspect")}};return pe.onNotification(y.type,(e=>{if(W===f.Off||!j)return;const t=W===f.Verbose||W===f.Compact;j.log(e.message,t?e.verbose:void 0)})),pe.onNotification(d.type,(e=>{const t=A.get(e.token);t?t(e.value):z.fire(e)})),pe}},3911:(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={}))},7135:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const o=n(147);var r;!function(e){const t={dispose(){}};e.None=function(){return t}}(r||(t.Event=r={}));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 o=0,r=this._callbacks.length;o<r;o++)if(this._callbacks[o]===e){if(this._contexts[o]===t)return this._callbacks.splice(o,1),void this._contexts.splice(o,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 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 o={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),o.dispose=s._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(o),o}),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(){}},7574:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function o(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=o,t.stringArray=function(e){return o(e)&&e.every((e=>n(e)))}},6184:(e,t)=>{"use strict";var n,o;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}(o||(t.Touch=o={}));class r{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}has(e){return this._map.has(e)}get(e,t=o.None){const n=this._map.get(e);if(n)return t!==o.None&&this.touch(n,t),n.value}set(e,t,n=o.None){let r=this._map.get(e);if(r)r.value=t,n!==o.None&&this.touch(r,n);else{switch(r={key:e,value:t,next:void 0,previous:void 0},n){case o.None:this.addItemLast(r);break;case o.First:this.addItemFirst(r);break;case o.Last:default:this.addItemLast(r)}this._map.set(e,r),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 o=this._head;for(;o;){if(t?e.bind(t)(o.value,o.key,this):e(o.value,o.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");o=o.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===o.First||t===o.Last)if(t===o.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===o.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{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=o.AsNew){return super.get(e,t)}peek(e){return super.get(e,o.None)}set(e,t){return super.set(e,t,o.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},5530:(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,o=0,r=0;e:for(;n<this._chunks.length;){const e=this._chunks[n];for(o=0;o<e.length;){switch(e[o]){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,o++;break e;default:t=0}break;default:t=0}o++}r+=e.byteLength,n++}if(4!==t)return;const i=this._read(r+o),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],o=n.indexOf(":");if(-1===o)throw new Error(`Message header must separate key and value using ':'\n${n}`);const r=n.substr(0,o),i=n.substr(o+1).trim();s.set(e?r.toLowerCase():r,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 o=this._chunks[0];if(o.byteLength>e){const r=o.slice(0,e);t.set(r,n),n+=e,this._chunks[0]=o.slice(e),this._totalLength-=e,e-=e}else t.set(o,n),n+=o.byteLength,this._chunks.shift(),this._totalLength-=o.byteLength,e-=o.byteLength}return t}}},6525:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const o=n(147),r=n(7574),i=n(7135),s=n(142);var a,c;!function(e){e.is=function(e){let t=e;return t&&r.func(t.listen)&&r.func(t.dispose)&&r.func(t.onError)&&r.func(t.onClose)&&r.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: ${r.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageReader=u,function(e){e.fromOptions=function(e){let t,n;const r=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,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&&(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,o.default)().applicationJson.decoder,s.set(i.name,i)),{charset:t,contentDecoder:n,contentDecoders:r,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,o.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,o.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))}}},6654:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const o=n(147),r=n(7574),i=n(142),s=n(7135);var a,c;!function(e){e.is=function(e){let t=e;return t&&r.func(t.dispose)&&r.func(t.onClose)&&r.func(t.onError)&&r.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: ${r.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,o.default)().applicationJson.encoder}:{charset:e.charset??"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,o.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()}}},839:(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 o=n(7574);var r,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}(r||(t.ErrorCodes=r={}));class s extends Error{constructor(e,t,n){super(t),this.code=o.number(e)?e:r.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&&o.string(t.method)&&(o.string(t.id)||o.number(t.id))},e.isNotification=function(e){const t=e;return t&&o.string(t.method)&&void 0===e.id},e.isResponse=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(o.string(t.id)||o.number(t.id)||null===t.id)}}(i||(t.Message=i={}))},147:(e,t)=>{"use strict";let n;function o(){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}}(o||(o={})),t.default=o},142:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const o=n(147);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,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()}}}},8211:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=void 0;const o=n(3881);var r;!function(e){e.Continue=0,e.Cancelled=1}(r||(r={})),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]=r.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 o=new Int32Array(n,0,1);Atomics.store(o,0,r.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)===r.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 o.CancellationTokenSource:new s(t)}}},5224:(e,t,n)=>{"use strict";e.exports=n(152)},152:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const i=n(1169);r(n(1169),t),r(n(1661),t),t.createProtocolConnection=function(e,t,n,o){return(0,i.createMessageConnection)(e,t,n,o)}},1661:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,r(n(9054),t),r(n(2118),t),r(n(6140),t),r(n(542),t);var i,s=n(3767);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={}))},3767:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const o=n(9054);t.createProtocolConnection=function(e,t,n,r){return o.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,o.createMessageConnection)(e,t,n,r)}},6140:(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 o=n(9054);var r;!function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"}(r||(t.MessageDirection=r={})),t.RegistrationType=class{constructor(e){this.method=e}};class i extends o.RequestType0{constructor(e){super(e)}}t.ProtocolRequestType0=i;class s extends o.RequestType{constructor(e){super(e,o.ParameterStructures.byName)}}t.ProtocolRequestType=s;class a extends o.NotificationType0{constructor(e){super(e)}}t.ProtocolNotificationType0=a;class c extends o.NotificationType{constructor(e){super(e,o.ParameterStructures.byName)}}t.ProtocolNotificationType=c},2918:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const o=n(6140);var r,i,s;!function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(r||(t.CallHierarchyPrepareRequest=r={})),function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(i||(t.CallHierarchyIncomingCallsRequest=i={})),function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(s||(t.CallHierarchyOutgoingCallsRequest=s={}))},9891:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const o=n(6140);var r,i;!function(e){e.method="textDocument/documentColor",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(r||(t.DocumentColorRequest=r={})),function(e){e.method="textDocument/colorPresentation",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(i||(t.ColorPresentationRequest=i={}))},5934:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const o=n(6140);var r;!function(e){e.method="workspace/configuration",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType(e.method)}(r||(t.ConfigurationRequest=r={}))},764:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const o=n(6140);var r;!function(e){e.method="textDocument/declaration",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(r||(t.DeclarationRequest=r={}))},9824:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;const o=n(9054),r=n(9533),i=n(6140);var s,a,c,u,l;!function(e){e.is=function(e){const t=e;return t&&r.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 o.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 o.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={}))},7846:(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 o=n(6140);var r,i,s,a,c,u,l;!function(e){e.file="file",e.folder="folder"}(r||(t.FileOperationPatternKind=r={})),function(e){e.method="workspace/willCreateFiles",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(i||(t.WillCreateFilesRequest=i={})),function(e){e.method="workspace/didCreateFiles",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(s||(t.DidCreateFilesNotification=s={})),function(e){e.method="workspace/willRenameFiles",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(a||(t.WillRenameFilesRequest=a={})),function(e){e.method="workspace/didRenameFiles",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(c||(t.DidRenameFilesNotification=c={})),function(e){e.method="workspace/didDeleteFiles",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(u||(t.DidDeleteFilesNotification=u={})),function(e){e.method="workspace/willDeleteFiles",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(l||(t.WillDeleteFilesRequest=l={}))},3394:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=void 0;const o=n(6140);var r,i;!function(e){e.method="textDocument/foldingRange",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(r||(t.FoldingRangeRequest=r={})),function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType0(e.method)}(i||(t.FoldingRangeRefreshRequest=i={}))},2122:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const o=n(6140);var r;!function(e){e.method="textDocument/implementation",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(r||(t.ImplementationRequest=r={}))},9999:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;const o=n(6140);var r,i,s;!function(e){e.method="textDocument/inlayHint",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(r||(t.InlayHintRequest=r={})),function(e){e.method="inlayHint/resolve",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(i||(t.InlayHintResolveRequest=i={})),function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType0(e.method)}(s||(t.InlayHintRefreshRequest=s={}))},7081:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionRequest=void 0;const o=n(6140);var r;!function(e){e.method="textDocument/inlineCompletion",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(r||(t.InlineCompletionRequest=r={}))},5246:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;const o=n(6140);var r,i;!function(e){e.method="textDocument/inlineValue",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(r||(t.InlineValueRequest=r={})),function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType0(e.method)}(i||(t.InlineValueRefreshRequest=i={}))},542:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSymbolRequest=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.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.NotebookCellTextDocumentFilter=t.NotebookDocumentFilter=t.TextDocumentFilter=void 0,t.MonikerRequest=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=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=void 0;const o=n(6140),r=n(2118),i=n(9533),s=n(2122);Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return s.ImplementationRequest}});const a=n(1589);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return a.TypeDefinitionRequest}});const c=n(8744);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(5934);Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return u.ConfigurationRequest}});const l=n(9891);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(3394);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return d.FoldingRangeRequest}}),Object.defineProperty(t,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return d.FoldingRangeRefreshRequest}});const h=n(764);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return h.DeclarationRequest}});const f=n(5206);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return f.SelectionRangeRequest}});const m=n(1862);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(2918);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(9434);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(5726);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return y.ShowDocumentRequest}});const b=n(6305);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return b.LinkedEditingRangeRequest}});const v=n(7846);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 T=n(3443);Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return T.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return T.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return T.MonikerRequest}});const R=n(3693);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 k=n(5246);Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return k.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return k.InlineValueRefreshRequest}});const D=n(9999);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 C=n(9824);Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return C.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return C.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return C.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return C.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return C.DiagnosticRefreshRequest}});const S=n(7169);Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:function(){return S.NotebookCellKind}}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:function(){return S.ExecutionSummary}}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:function(){return S.NotebookCell}}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:function(){return S.NotebookDocument}}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return S.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return S.DidOpenNotebookDocumentNotification}}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:function(){return S.NotebookCellArrayChange}}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return S.DidChangeNotebookDocumentNotification}}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return S.DidSaveNotebookDocumentNotification}}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return S.DidCloseNotebookDocumentNotification}});const w=n(7081);var x,P,_,O,q,N,E,A,M,j,I,L,F,$,W,V,U,H,K,B,z,J,X,G,Z,Q,Y,ee,te,ne,oe,re,ie,se,ae,ce,ue,le,de,he,fe,me,pe,ge,ye,be,ve,Te,Re,ke,De,Ce,Se,we,xe,Pe,_e,Oe,qe,Ne,Ee,Ae,Me,je,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))}}(P||(t.NotebookDocumentFilter=P={})),function(e){e.is=function(e){const t=e;return i.objectLiteral(t)&&(i.string(t.notebook)||P.is(t.notebook))&&(void 0===t.language||i.string(t.language))}}(_||(t.NotebookCellTextDocumentFilter=_={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(let t of e)if(!i.string(t)&&!x.is(t)&&!_.is(t))return!1;return!0}}(O||(t.DocumentSelector=O={})),function(e){e.method="client/registerCapability",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType(e.method)}(q||(t.RegistrationRequest=q={})),function(e){e.method="client/unregisterCapability",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType(e.method)}(N||(t.UnregistrationRequest=N={})),function(e){e.Create="create",e.Rename="rename",e.Delete="delete"}(E||(t.ResourceOperationKind=E={})),function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"}(A||(t.FailureHandlingKind=A={})),function(e){e.UTF8="utf-8",e.UTF16="utf-16",e.UTF32="utf-32"}(M||(t.PositionEncodingKind=M={})),function(e){e.hasId=function(e){const t=e;return t&&i.string(t.id)&&t.id.length>0}}(j||(t.StaticRegistrationOptions=j={})),function(e){e.is=function(e){const t=e;return t&&(null===t.documentSelector||O.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)}}(L||(t.WorkDoneProgressOptions=L={})),function(e){e.method="initialize",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(F||(t.InitializeRequest=F={})),function(e){e.unknownProtocolVersion=1}($||(t.InitializeErrorCodes=$={})),function(e){e.method="initialized",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(W||(t.InitializedNotification=W={})),function(e){e.method="shutdown",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType0(e.method)}(V||(t.ShutdownRequest=V={})),function(e){e.method="exit",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType0(e.method)}(U||(t.ExitNotification=U={})),function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(H||(t.DidChangeConfigurationNotification=H={})),function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5}(K||(t.MessageType=K={})),function(e){e.method="window/showMessage",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolNotificationType(e.method)}(B||(t.ShowMessageNotification=B={})),function(e){e.method="window/showMessageRequest",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType(e.method)}(z||(t.ShowMessageRequest=z={})),function(e){e.method="window/logMessage",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolNotificationType(e.method)}(J||(t.LogMessageNotification=J={})),function(e){e.method="telemetry/event",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolNotificationType(e.method)}(X||(t.TelemetryEventNotification=X={})),function(e){e.None=0,e.Full=1,e.Incremental=2}(G||(t.TextDocumentSyncKind=G={})),function(e){e.method="textDocument/didOpen",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(Z||(t.DidOpenTextDocumentNotification=Z={})),function(e){e.isIncremental=function(e){let 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){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}(Q||(t.TextDocumentContentChangeEvent=Q={})),function(e){e.method="textDocument/didChange",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(Y||(t.DidChangeTextDocumentNotification=Y={})),function(e){e.method="textDocument/didClose",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(ee||(t.DidCloseTextDocumentNotification=ee={})),function(e){e.method="textDocument/didSave",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(te||(t.DidSaveTextDocumentNotification=te={})),function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3}(ne||(t.TextDocumentSaveReason=ne={})),function(e){e.method="textDocument/willSave",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(oe||(t.WillSaveTextDocumentNotification=oe={})),function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(re||(t.WillSaveTextDocumentWaitUntilRequest=re={})),function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(ie||(t.DidChangeWatchedFilesNotification=ie={})),function(e){e.Created=1,e.Changed=2,e.Deleted=3}(se||(t.FileChangeType=se={})),function(e){e.is=function(e){const t=e;return i.objectLiteral(t)&&(r.URI.is(t.baseUri)||r.WorkspaceFolder.is(t.baseUri))&&i.string(t.pattern)}}(ae||(t.RelativePattern=ae={})),function(e){e.Create=1,e.Change=2,e.Delete=4}(ce||(t.WatchKind=ce={})),function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolNotificationType(e.method)}(ue||(t.PublishDiagnosticsNotification=ue={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3}(le||(t.CompletionTriggerKind=le={})),function(e){e.method="textDocument/completion",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(de||(t.CompletionRequest=de={})),function(e){e.method="completionItem/resolve",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(he||(t.CompletionResolveRequest=he={})),function(e){e.method="textDocument/hover",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(fe||(t.HoverRequest=fe={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3}(me||(t.SignatureHelpTriggerKind=me={})),function(e){e.method="textDocument/signatureHelp",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(pe||(t.SignatureHelpRequest=pe={})),function(e){e.method="textDocument/definition",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(ge||(t.DefinitionRequest=ge={})),function(e){e.method="textDocument/references",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(ye||(t.ReferencesRequest=ye={})),function(e){e.method="textDocument/documentHighlight",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(be||(t.DocumentHighlightRequest=be={})),function(e){e.method="textDocument/documentSymbol",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(ve||(t.DocumentSymbolRequest=ve={})),function(e){e.method="textDocument/codeAction",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(Te||(t.CodeActionRequest=Te={})),function(e){e.method="codeAction/resolve",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(Re||(t.CodeActionResolveRequest=Re={})),function(e){e.method="workspace/symbol",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(ke||(t.WorkspaceSymbolRequest=ke={})),function(e){e.method="workspaceSymbol/resolve",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(De||(t.WorkspaceSymbolResolveRequest=De={})),function(e){e.method="textDocument/codeLens",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(Ce||(t.CodeLensRequest=Ce={})),function(e){e.method="codeLens/resolve",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(Se||(t.CodeLensResolveRequest=Se={})),function(e){e.method="workspace/codeLens/refresh",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType0(e.method)}(we||(t.CodeLensRefreshRequest=we={})),function(e){e.method="textDocument/documentLink",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(xe||(t.DocumentLinkRequest=xe={})),function(e){e.method="documentLink/resolve",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(Pe||(t.DocumentLinkResolveRequest=Pe={})),function(e){e.method="textDocument/formatting",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(_e||(t.DocumentFormattingRequest=_e={})),function(e){e.method="textDocument/rangeFormatting",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(Oe||(t.DocumentRangeFormattingRequest=Oe={})),function(e){e.method="textDocument/rangesFormatting",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(qe||(t.DocumentRangesFormattingRequest=qe={})),function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(Ne||(t.DocumentOnTypeFormattingRequest=Ne={})),function(e){e.Identifier=1}(Ee||(t.PrepareSupportDefaultBehavior=Ee={})),function(e){e.method="textDocument/rename",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(Ae||(t.RenameRequest=Ae={})),function(e){e.method="textDocument/prepareRename",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(Me||(t.PrepareRenameRequest=Me={})),function(e){e.method="workspace/executeCommand",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(je||(t.ExecuteCommandRequest=je={})),function(e){e.method="workspace/applyEdit",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType("workspace/applyEdit")}(Ie||(t.ApplyWorkspaceEditRequest=Ie={}))},6305:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const o=n(6140);var r;!function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(r||(t.LinkedEditingRangeRequest=r={}))},3443:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const o=n(6140);var r,i,s;!function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"}(r||(t.UniquenessLevel=r={})),function(e){e.$import="import",e.$export="export",e.local="local"}(i||(t.MonikerKind=i={})),function(e){e.method="textDocument/moniker",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(s||(t.MonikerRequest=s={}))},7169:(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 o=n(2118),r=n(9533),i=n(6140);var s,a,c,u,l,d,h,f,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 r.objectLiteral(t)&&o.uinteger.is(t.executionOrder)&&(void 0===t.success||r.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 o=Array.isArray(e),i=Array.isArray(n);if(o!==i)return!1;if(o&&i){if(e.length!==n.length)return!1;for(let o=0;o<e.length;o++)if(!t(e[o],n[o]))return!1}if(r.objectLiteral(e)&&r.objectLiteral(n)){const o=Object.keys(e),r=Object.keys(n);if(o.length!==r.length)return!1;if(o.sort(),r.sort(),!t(o,r))return!1;for(let r=0;r<o.length;r++){const i=o[r];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 r.objectLiteral(t)&&s.is(t.kind)&&o.DocumentUri.is(t.document)&&(void 0===t.metadata||r.objectLiteral(t.metadata))},e.diff=function(e,n){const o=new Set;return e.document!==n.document&&o.add("document"),e.kind!==n.kind&&o.add("kind"),e.executionSummary!==n.executionSummary&&o.add("executionSummary"),void 0===e.metadata&&void 0===n.metadata||t(e.metadata,n.metadata)||o.add("metadata"),void 0===e.executionSummary&&void 0===n.executionSummary||a.equals(e.executionSummary,n.executionSummary)||o.add("executionSummary"),o}}(c||(t.NotebookCell=c={})),function(e){e.create=function(e,t,n,o){return{uri:e,notebookType:t,version:n,cells:o}},e.is=function(e){const t=e;return r.objectLiteral(t)&&r.string(t.uri)&&o.integer.is(t.version)&&r.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 r.objectLiteral(t)&&o.uinteger.is(t.start)&&o.uinteger.is(t.deleteCount)&&(void 0===t.cells||r.typedArray(t.cells,c.is))},e.create=function(e,t,n){const o={start:e,deleteCount:t};return void 0!==n&&(o.cells=n),o}}(h||(t.NotebookCellArrayChange=h={})),function(e){e.method="notebookDocument/didChange",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method),e.registrationMethod=l.method}(f||(t.DidChangeNotebookDocumentNotification=f={})),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={}))},1862:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;const o=n(9054),r=n(6140);var i,s,a;!function(e){e.type=new o.ProgressType,e.is=function(t){return t===e.type}}(i||(t.WorkDoneProgress=i={})),function(e){e.method="window/workDoneProgress/create",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(s||(t.WorkDoneProgressCreateRequest=s={})),function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(a||(t.WorkDoneProgressCancelNotification=a={}))},5206:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const o=n(6140);var r;!function(e){e.method="textDocument/selectionRange",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(r||(t.SelectionRangeRequest=r={}))},9434:(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 o=n(6140);var r,i,s,a,c,u;!function(e){e.Relative="relative"}(r||(t.TokenFormat=r={})),function(e){e.method="textDocument/semanticTokens",e.type=new o.RegistrationType(e.method)}(i||(t.SemanticTokensRegistrationType=i={})),function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method),e.registrationMethod=i.method}(s||(t.SemanticTokensRequest=s={})),function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method),e.registrationMethod=i.method}(a||(t.SemanticTokensDeltaRequest=a={})),function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method),e.registrationMethod=i.method}(c||(t.SemanticTokensRangeRequest=c={})),function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType0(e.method)}(u||(t.SemanticTokensRefreshRequest=u={}))},5726:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const o=n(6140);var r;!function(e){e.method="window/showDocument",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType(e.method)}(r||(t.ShowDocumentRequest=r={}))},1589:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const o=n(6140);var r;!function(e){e.method="textDocument/typeDefinition",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(r||(t.TypeDefinitionRequest=r={}))},3693:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;const o=n(6140);var r,i,s;!function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(r||(t.TypeHierarchyPrepareRequest=r={})),function(e){e.method="typeHierarchy/supertypes",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(i||(t.TypeHierarchySupertypesRequest=i={})),function(e){e.method="typeHierarchy/subtypes",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method)}(s||(t.TypeHierarchySubtypesRequest=s={}))},8744:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const o=n(6140);var r,i;!function(e){e.method="workspace/workspaceFolders",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType0(e.method)}(r||(t.WorkspaceFoldersRequest=r={})),function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method)}(i||(t.DidChangeWorkspaceFoldersNotification=i={}))},9533:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function o(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=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.objectLiteral=function(e){return null!==e&&"object"==typeof e}},3984:(e,t,n)=>{"use strict";e.exports=n(7630)},7630:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=void 0;const i=n(6265);r(n(5224),t),r(n(6265),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,o){let r,s,c,u;return void 0!==e&&"features"===e.__brand&&(r=e,e=t,t=n,n=o),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,r)}},6265:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.NotebookDocuments=t.TextDocuments=t.SemanticTokensBuilder=void 0;const i=n(9817);Object.defineProperty(t,"SemanticTokensBuilder",{enumerable:!0,get:function(){return i.SemanticTokensBuilder}});const s=n(9229);r(n(152),t);const a=n(8382);Object.defineProperty(t,"TextDocuments",{enumerable:!0,get:function(){return a.TextDocuments}});const c=n(9748);var u;Object.defineProperty(t,"NotebookDocuments",{enumerable:!0,get:function(){return c.NotebookDocuments}}),r(n(5878),t),function(e){e.all={__brand:"features",languages:s.InlineCompletionFeature}}(u||(t.ProposedFeatures=u={}))},7985:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyFeature=void 0;const o=n(152);t.CallHierarchyFeature=e=>class extends e{get callHierarchy(){return{onPrepare:e=>this.connection.onRequest(o.CallHierarchyPrepareRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0))),onIncomingCalls:e=>{const t=o.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(t,((n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onOutgoingCalls:e=>{const t=o.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(t,((n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},2507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationFeature=void 0;const o=n(152),r=n(289);t.ConfigurationFeature=e=>class extends e{getConfiguration(e){return e?r.string(e)?this._getConfiguration({section:e}):this._getConfiguration(e):this._getConfiguration({})}_getConfiguration(e){let t={items:Array.isArray(e)?e:[e]};return this.connection.sendRequest(o.ConfigurationRequest.type,t).then((t=>Array.isArray(t)?Array.isArray(e)?t:t[0]:Array.isArray(e)?[]:null))}}},6634:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticFeature=void 0;const o=n(152);t.DiagnosticFeature=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(o.DiagnosticRefreshRequest.type),on:e=>this.connection.onRequest(o.DocumentDiagnosticRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(o.DocumentDiagnosticRequest.partialResult,t)))),onWorkspace:e=>this.connection.onRequest(o.WorkspaceDiagnosticRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(o.WorkspaceDiagnosticRequest.partialResult,t))))}}}},828:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileOperationsFeature=void 0;const o=n(152);t.FileOperationsFeature=e=>class extends e{onDidCreateFiles(e){return this.connection.onNotification(o.DidCreateFilesNotification.type,(t=>{e(t)}))}onDidRenameFiles(e){return this.connection.onNotification(o.DidRenameFilesNotification.type,(t=>{e(t)}))}onDidDeleteFiles(e){return this.connection.onNotification(o.DidDeleteFilesNotification.type,(t=>{e(t)}))}onWillCreateFiles(e){return this.connection.onRequest(o.WillCreateFilesRequest.type,((t,n)=>e(t,n)))}onWillRenameFiles(e){return this.connection.onRequest(o.WillRenameFilesRequest.type,((t,n)=>e(t,n)))}onWillDeleteFiles(e){return this.connection.onRequest(o.WillDeleteFilesRequest.type,((t,n)=>e(t,n)))}}},7040:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeFeature=void 0;const o=n(152);t.FoldingRangeFeature=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest(o.FoldingRangeRefreshRequest.type),on:e=>{const t=o.FoldingRangeRequest.type;return this.connection.onRequest(t,((n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},6507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintFeature=void 0;const o=n(152);t.InlayHintFeature=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(o.InlayHintRefreshRequest.type),on:e=>this.connection.onRequest(o.InlayHintRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t)))),resolve:e=>this.connection.onRequest(o.InlayHintResolveRequest.type,((t,n)=>e(t,n)))}}}},9229:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionFeature=void 0;const o=n(152);t.InlineCompletionFeature=e=>class extends e{get inlineCompletion(){return{on:e=>this.connection.onRequest(o.InlineCompletionRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t))))}}}},8970:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueFeature=void 0;const o=n(152);t.InlineValueFeature=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(o.InlineValueRefreshRequest.type),on:e=>this.connection.onRequest(o.InlineValueRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t))))}}}},2776:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeFeature=void 0;const o=n(152);t.LinkedEditingRangeFeature=e=>class extends e{onLinkedEditingRange(e){return this.connection.onRequest(o.LinkedEditingRangeRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0)))}}},8120:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerFeature=void 0;const o=n(152);t.MonikerFeature=e=>class extends e{get moniker(){return{on:e=>{const t=o.MonikerRequest.type;return this.connection.onRequest(t,((n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},9748:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookDocuments=t.NotebookSyncFeature=void 0;const o=n(152),r=n(8382);t.NotebookSyncFeature=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:e=>this.connection.onNotification(o.DidOpenNotebookDocumentNotification.type,(t=>{e(t)})),onDidChangeNotebookDocument:e=>this.connection.onNotification(o.DidChangeNotebookDocumentNotification.type,(t=>{e(t)})),onDidSaveNotebookDocument:e=>this.connection.onNotification(o.DidSaveNotebookDocumentNotification.type,(t=>{e(t)})),onDidCloseNotebookDocument:e=>this.connection.onNotification(o.DidCloseNotebookDocumentNotification.type,(t=>{e(t)}))}}};class i{onDidOpenTextDocument(e){return this.openHandler=e,o.Disposable.create((()=>{this.openHandler=void 0}))}openTextDocument(e){this.openHandler&&this.openHandler(e)}onDidChangeTextDocument(e){return this.changeHandler=e,o.Disposable.create((()=>{this.changeHandler=e}))}changeTextDocument(e){this.changeHandler&&this.changeHandler(e)}onDidCloseTextDocument(e){return this.closeHandler=e,o.Disposable.create((()=>{this.closeHandler=void 0}))}closeTextDocument(e){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 r.TextDocuments?this._cellTextDocuments=e:this._cellTextDocuments=new r.TextDocuments(e),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new o.Emitter,this._onDidChange=new o.Emitter,this._onDidSave=new o.Emitter,this._onDidClose=new o.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((e=>{this.notebookDocuments.set(e.notebookDocument.uri,e.notebookDocument);for(const n of e.cellTextDocuments)t.openTextDocument({textDocument:n});this.updateCellMap(e.notebookDocument),this._onDidOpen.fire(e.notebookDocument)}))),n.push(e.notebooks.synchronization.onDidChangeNotebookDocument((e=>{const n=this.notebookDocuments.get(e.notebookDocument.uri);if(void 0===n)return;n.version=e.notebookDocument.version;const o=n.metadata;let r=!1;const i=e.change;void 0!==i.metadata&&(r=!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 o=e.structure.array;if(n.cells.splice(o.start,o.deleteCount,...void 0!==o.cells?o.cells:[]),void 0!==e.structure.didOpen)for(const n of e.structure.didOpen)t.openTextDocument({textDocument:n}),s.push(n.uri);if(e.structure.didClose)for(const n of e.structure.didClose)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 o=t.get(n.cells[e].document);if(void 0!==o){const r=n.cells.splice(e,1,o);if(c.push({old:r[0],new:o}),t.delete(o.document),0===t.size)break}}}if(void 0!==e.textContent)for(const n of e.textContent)t.changeTextDocument({textDocument:n.document,contentChanges:n.changes}),u.push(n.document.uri)}this.updateCellMap(n);const l={notebookDocument:n};r&&(l.metadata={old:o,new:n.metadata});const d=[];for(const e of s)d.push(this.getNotebookCell(e));const h=[];for(const e of a)h.push(this.getNotebookCell(e));const f=[];for(const e of u)f.push(this.getNotebookCell(e));(d.length>0||h.length>0||c.length>0||f.length>0)&&(l.cells={added:d,removed:h,changed:{data:c,textContent:f}}),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((e=>{const n=this.notebookDocuments.get(e.notebookDocument.uri);if(void 0!==n){this._onDidClose.fire(n);for(const n of e.cellTextDocuments)t.closeTextDocument({textDocument:n});this.notebookDocuments.delete(e.notebookDocument.uri);for(const e of n.cells)this.notebookCellMap.delete(e.document)}}))),o.Disposable.create((()=>{n.forEach((e=>e.dispose()))}))}updateCellMap(e){for(const t of e.cells)this.notebookCellMap.set(t.document,[t,e])}}},2731:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attachPartialResult=t.ProgressFeature=t.attachWorkDone=void 0;const o=n(152),r=n(7560);class i{constructor(e,t){this._connection=e,this._token=t,i.Instances.set(this._token,this)}begin(e,t,n,r){let i={kind:"begin",title:e,percentage:t,message:n,cancellable:r};this._connection.sendProgress(o.WorkDoneProgress.type,this._token,i)}report(e,t){let n={kind:"report"};"number"==typeof e?(n.percentage=e,void 0!==t&&(n.message=t)):n.message=e,this._connection.sendProgress(o.WorkDoneProgress.type,this._token,n)}done(){i.Instances.delete(this._token),this._connection.sendProgress(o.WorkDoneProgress.type,this._token,{kind:"end"})}}i.Instances=new Map;class s extends i{constructor(e,t){super(e,t),this._source=new o.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 o.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(o.WorkDoneProgressCancelNotification.type,(e=>{let 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,r.generateUuid)();return this.connection.sendRequest(o.WorkDoneProgressCreateRequest.type,{token:e}).then((()=>new s(this.connection,e)))}return Promise.resolve(new c)}},function(e){e.type=new o.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)}},9817:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensBuilder=t.SemanticTokensDiff=t.SemanticTokensFeature=void 0;const o=n(152);t.SemanticTokensFeature=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(o.SemanticTokensRefreshRequest.type),on:e=>{const t=o.SemanticTokensRequest.type;return this.connection.onRequest(t,((n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onDelta:e=>{const t=o.SemanticTokensDeltaRequest.type;return this.connection.onRequest(t,((n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onRange:e=>{const t=o.SemanticTokensRangeRequest.type;return this.connection.onRequest(t,((n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}};class r{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 o=e-1,r=t-1;for(;o>=n&&r>=n&&this.originalSequence[o]===this.modifiedSequence[r];)o--,r--;(o<n||r<n)&&(o++,r++);const i=o-n+1,s=this.modifiedSequence.slice(n,r+1);return 1===s.length&&s[0]===this.originalSequence[o]?[{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=r,t.SemanticTokensBuilder=class{constructor(){this._prevData=void 0,this.initialize()}initialize(){this._id=Date.now(),this._prevLine=0,this._prevChar=0,this._data=[],this._dataLen=0}push(e,t,n,o,r){let i=e,s=t;this._dataLen>0&&(i-=this._prevLine,0===i&&(s-=this._prevChar)),this._data[this._dataLen++]=i,this._data[this._dataLen++]=s,this._data[this._dataLen++]=n,this._data[this._dataLen++]=o,this._data[this._dataLen++]=r,this._prevLine=e,this._prevChar=t}get id(){return this._id.toString()}previousResult(e){this.id===e&&(this._prevData=this._data),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this._data}}canBuildEdits(){return void 0!==this._prevData}buildEdits(){return void 0!==this._prevData?{resultId:this.id,edits:new r(this._prevData,this._data).computeDiff()}:this.build()}}},5878:(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 o=n(152),r=n(289),i=n(7560),s=n(2731),a=n(2507),c=n(1836),u=n(7985),l=n(9817),d=n(5421),h=n(828),f=n(2776),m=n(4606),p=n(8970),g=n(7040),y=n(6507),b=n(6634),v=n(9748),T=n(8120);function R(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 k{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(o.MessageType.Error,e)}warn(e){this.send(o.MessageType.Warning,e)}info(e){this.send(o.MessageType.Info,e)}log(e){this.send(o.MessageType.Log,e)}debug(e){this.send(o.MessageType.Debug,e)}send(e,t){this._rawConnection&&this._rawConnection.sendNotification(o.LogMessageNotification.type,{type:e,message:t}).catch((()=>{(0,o.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){let n={type:o.MessageType.Error,message:e,actions:t};return this.connection.sendRequest(o.ShowMessageRequest.type,n).then(R)}showWarningMessage(e,...t){let n={type:o.MessageType.Warning,message:e,actions:t};return this.connection.sendRequest(o.ShowMessageRequest.type,n).then(R)}showInformationMessage(e,...t){let n={type:o.MessageType.Info,message:e,actions:t};return this.connection.sendRequest(o.ShowMessageRequest.type,n).then(R)}}));var C,S;!function(e){e.create=function(){return new w}}(C||(t.BulkRegistration=C={}));class w{constructor(){this._registrations=[],this._registered=new Set}add(e,t){const n=r.string(e)?e:e.method;if(this._registered.has(n))throw new Error(`${n} is already added to this registration`);const o=i.generateUuid();this._registrations.push({id:o,method:n,registerOptions:t||{}}),this._registered.add(n)}asRegistrationParams(){return{registrations:this._registrations}}}!function(e){e.create=function(){return new x(void 0,[])}}(S||(t.BulkUnregistration=S={}));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(){let e=[];for(let t of this._unregistrations.values())e.push(t);let t={unregisterations:e};this._connection.sendRequest(o.UnregistrationRequest.type,t).catch((()=>{this._connection.console.info("Bulk unregistration failed.")}))}disposeSingle(e){const t=r.string(e)?e:e.method,n=this._unregistrations.get(t);if(!n)return!1;let i={unregisterations:[n]};return this._connection.sendRequest(o.UnregistrationRequest.type,i).then((()=>{this._unregistrations.delete(t)}),(e=>{this._connection.console.info(`Un-registering request handler for ${n.id} failed.`)})),!0}}class P{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=r.string(t)?t:t.method,a=i.generateUuid();let c={registrations:[{id:a,method:s,registerOptions:n||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(o.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=r.string(e)?e:e.method,s=i.generateUuid();let a={registrations:[{id:s,method:n,registerOptions:t||{}}]};return this.connection.sendRequest(o.RegistrationRequest.type,a).then((e=>o.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){let n={unregisterations:[{id:e,method:t}]};return this.connection.sendRequest(o.UnregistrationRequest.type,n).catch((()=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)}))}registerMany(e){let t=e.asRegistrationParams();return this.connection.sendRequest(o.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 _=(0,h.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){let t=(n=e)&&n.edit?e:{edit:e};var n;return this.connection.sendRequest(o.ApplyWorkspaceEditRequest.type,t)}})));class O{constructor(){this._trace=o.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!==o.Trace.Off&&this.connection.sendNotification(o.LogTraceNotification.type,{message:e,verbose:this._trace===o.Trace.Verbose?t:void 0}).catch((()=>{}))}}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){}logEvent(e){this.connection.sendNotification(o.TelemetryEventNotification.type,e).catch((()=>{this.connection.console.log("Sending TelemetryEventNotification failed")}))}}class N{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=N;const E=(0,g.FoldingRangeFeature)((0,T.MonikerFeature)((0,b.DiagnosticFeature)((0,y.InlayHintFeature)((0,p.InlineValueFeature)((0,m.TypeHierarchyFeature)((0,f.LinkedEditingRangeFeature)((0,l.SemanticTokensFeature)((0,u.CallHierarchyFeature)(N)))))))));class A{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=A;const M=(0,v.NotebookSyncFeature)(A);function j(e,t){return function(n){return t(e(n))}}function I(e,t){return function(n){return t(e(n))}}function L(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 W(e,t){return function(n){return t(e(n))}}function V(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=I,t.combineTracerFeatures=L,t.combineClientFeatures=F,t.combineWindowFeatures=$,t.combineWorkspaceFeatures=W,t.combineLanguagesFeatures=V,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,L),telemetry:n(e.telemetry,t.telemetry,I),client:n(e.client,t.client,F),window:n(e.window,t.window,$),workspace:n(e.workspace,t.workspace,W),languages:n(e.languages,t.languages,V),notebooks:n(e.notebooks,t.notebooks,U)}},t.createConnection=function(e,t,n){const i=n&&n.console?new(n.console(k)):new k,a=e(i);i.rawAttach(a);const c=n&&n.tracer?new(n.tracer(O)):new O,u=n&&n.telemetry?new(n.telemetry(q)):new q,l=n&&n.client?new(n.client(P)):new P,d=n&&n.window?new(n.window(D)):new D,h=n&&n.workspace?new(n.workspace(_)):new _,f=n&&n.languages?new(n.languages(E)):new E,m=n&&n.notebooks?new(n.notebooks(M)):new M,p=[i,c,u,l,d,h,f,m];let g,y,b,v={listen:()=>a.listen(),sendRequest:(e,...t)=>a.sendRequest(r.string(e)?e:e.method,...t),onRequest:(e,t)=>a.onRequest(e,t),sendNotification:(e,t)=>{const n=r.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(o.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 h},get languages(){return f},get notebooks(){return m},onDidChangeConfiguration:e=>a.onNotification(o.DidChangeConfigurationNotification.type,e),onDidChangeWatchedFiles:e=>a.onNotification(o.DidChangeWatchedFilesNotification.type,e),__textDocumentSync:void 0,onDidOpenTextDocument:e=>a.onNotification(o.DidOpenTextDocumentNotification.type,e),onDidChangeTextDocument:e=>a.onNotification(o.DidChangeTextDocumentNotification.type,e),onDidCloseTextDocument:e=>a.onNotification(o.DidCloseTextDocumentNotification.type,e),onWillSaveTextDocument:e=>a.onNotification(o.WillSaveTextDocumentNotification.type,e),onWillSaveTextDocumentWaitUntil:e=>a.onRequest(o.WillSaveTextDocumentWaitUntilRequest.type,e),onDidSaveTextDocument:e=>a.onNotification(o.DidSaveTextDocumentNotification.type,e),sendDiagnostics:e=>a.sendNotification(o.PublishDiagnosticsNotification.type,e),onHover:e=>a.onRequest(o.HoverRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onCompletion:e=>a.onRequest(o.CompletionRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onCompletionResolve:e=>a.onRequest(o.CompletionResolveRequest.type,e),onSignatureHelp:e=>a.onRequest(o.SignatureHelpRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onDeclaration:e=>a.onRequest(o.DeclarationRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onDefinition:e=>a.onRequest(o.DefinitionRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onTypeDefinition:e=>a.onRequest(o.TypeDefinitionRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onImplementation:e=>a.onRequest(o.ImplementationRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onReferences:e=>a.onRequest(o.ReferencesRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onDocumentHighlight:e=>a.onRequest(o.DocumentHighlightRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onDocumentSymbol:e=>a.onRequest(o.DocumentSymbolRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onWorkspaceSymbol:e=>a.onRequest(o.WorkspaceSymbolRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onWorkspaceSymbolResolve:e=>a.onRequest(o.WorkspaceSymbolResolveRequest.type,e),onCodeAction:e=>a.onRequest(o.CodeActionRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onCodeActionResolve:e=>a.onRequest(o.CodeActionResolveRequest.type,((t,n)=>e(t,n))),onCodeLens:e=>a.onRequest(o.CodeLensRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onCodeLensResolve:e=>a.onRequest(o.CodeLensResolveRequest.type,((t,n)=>e(t,n))),onDocumentFormatting:e=>a.onRequest(o.DocumentFormattingRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onDocumentRangeFormatting:e=>a.onRequest(o.DocumentRangeFormattingRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onDocumentOnTypeFormatting:e=>a.onRequest(o.DocumentOnTypeFormattingRequest.type,((t,n)=>e(t,n))),onRenameRequest:e=>a.onRequest(o.RenameRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),onPrepareRename:e=>a.onRequest(o.PrepareRenameRequest.type,((t,n)=>e(t,n))),onDocumentLinks:e=>a.onRequest(o.DocumentLinkRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onDocumentLinkResolve:e=>a.onRequest(o.DocumentLinkResolveRequest.type,((t,n)=>e(t,n))),onDocumentColor:e=>a.onRequest(o.DocumentColorRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onColorPresentation:e=>a.onRequest(o.ColorPresentationRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onFoldingRanges:e=>a.onRequest(o.FoldingRangeRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onSelectionRanges:e=>a.onRequest(o.SelectionRangeRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),(0,s.attachPartialResult)(a,t)))),onExecuteCommand:e=>a.onRequest(o.ExecuteCommandRequest.type,((t,n)=>e(t,n,(0,s.attachWorkDone)(a,t),void 0))),dispose:()=>a.dispose()};for(let e of p)e.attach(v);return a.onRequest(o.InitializeRequest.type,(e=>{t.initialize(e),r.string(e.trace)&&(c.trace=o.Trace.fromString(e.trace));for(let t of p)t.initialize(e.capabilities);if(y){let t=y(e,(new o.CancellationTokenSource).token,(0,s.attachWorkDone)(a,e),void 0);return(n=t,n instanceof Promise?n:r.thenable(n)?new Promise(((e,t)=>{n.then((t=>e(t)),(e=>t(e)))})):Promise.resolve(n)).then((e=>{if(e instanceof o.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=r.number(v.__textDocumentSync)?v.__textDocumentSync:o.TextDocumentSyncKind.None:r.number(n.textDocumentSync)||r.number(n.textDocumentSync.change)||(n.textDocumentSync.change=r.number(v.__textDocumentSync)?v.__textDocumentSync:o.TextDocumentSyncKind.None);for(let e of p)e.fillServerCapabilities(n);return t}))}{let e={capabilities:{textDocumentSync:o.TextDocumentSyncKind.None}};for(let t of p)t.fillServerCapabilities(e.capabilities);return e}var n})),a.onRequest(o.ShutdownRequest.type,(()=>(t.shutdownReceived=!0,g?g((new o.CancellationTokenSource).token):void 0))),a.onNotification(o.ExitNotification.type,(()=>{try{b&&b()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}})),a.onNotification(o.SetTraceNotification.type,(e=>{c.trace=o.Trace.fromString(e.value)})),v}},5421:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentFeature=void 0;const o=n(152);t.ShowDocumentFeature=e=>class extends e{showDocument(e){return this.connection.sendRequest(o.ShowDocumentRequest.type,e)}}},8382:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextDocuments=void 0;const o=n(152);t.TextDocuments=class{constructor(e){this._configuration=e,this._syncedDocuments=new Map,this._onDidChangeContent=new o.Emitter,this._onDidOpen=new o.Emitter,this._onDidClose=new o.Emitter,this._onDidSave=new o.Emitter,this._onWillSave=new o.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=o.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 o=Object.freeze({document:n});this._onDidOpen.fire(o),this._onDidChangeContent.fire(o)}))),t.push(e.onDidChangeTextDocument((e=>{const t=e.textDocument,n=e.contentChanges;if(0===n.length)return;const{version:o}=t;if(null==o)throw new Error(`Received document change event for ${t.uri} without valid version identifier`);let r=this._syncedDocuments.get(t.uri);void 0!==r&&(r=this._configuration.update(r,n,o),this._syncedDocuments.set(t.uri,r),this._onDidChangeContent.fire(Object.freeze({document:r})))}))),t.push(e.onDidCloseTextDocument((e=>{let 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=>{let 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)=>{let 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=>{let t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&this._onDidSave.fire(Object.freeze({document:t}))}))),o.Disposable.create((()=>{t.forEach((e=>e.dispose()))}))}}},4606:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchyFeature=void 0;const o=n(152);t.TypeHierarchyFeature=e=>class extends e{get typeHierarchy(){return{onPrepare:e=>this.connection.onRequest(o.TypeHierarchyPrepareRequest.type,((t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0))),onSupertypes:e=>{const t=o.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(t,((n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))},onSubtypes:e=>{const t=o.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(t,((n,o)=>e(n,o,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t,n))))}}}}},289:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function o(e){return"function"==typeof e}function r(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=o,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.thenable=function(e){return e&&o(e.then)}},7560:(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 o extends n{static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return o._oneOf(o._chars)}constructor(){super([o._randomHex(),o._randomHex(),o._randomHex(),o._randomHex(),o._randomHex(),o._randomHex(),o._randomHex(),o._randomHex(),"-",o._randomHex(),o._randomHex(),o._randomHex(),o._randomHex(),"-","4",o._randomHex(),o._randomHex(),o._randomHex(),"-",o._oneOf(o._timeHighBits),o._randomHex(),o._randomHex(),o._randomHex(),"-",o._randomHex(),o._randomHex(),o._randomHex(),o._randomHex(),o._randomHex(),o._randomHex(),o._randomHex(),o._randomHex(),o._randomHex(),o._randomHex(),o._randomHex(),o._randomHex()].join(""))}}function r(){return new o}o._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],o._timeHighBits=["8","9","a","b"],t.empty=new n("00000000-0000-0000-0000-000000000000"),t.v4=r;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 r().asHex()}},1836:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=void 0;const o=n(152);t.WorkspaceFoldersFeature=e=>class extends e{constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(e){super.initialize(e);let t=e.workspace;t&&t.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new o.Emitter,this.connection.onNotification(o.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(o.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(o.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}}},5447: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,o="",r=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(o.length<2||2!==r||46!==o.charCodeAt(o.length-1)||46!==o.charCodeAt(o.length-2))if(o.length>2){var c=o.lastIndexOf("/");if(c!==o.length-1){-1===c?(o="",r=0):r=(o=o.slice(0,c)).length-1-o.lastIndexOf("/"),i=a,s=0;continue}}else if(2===o.length||1===o.length){o="",r=0,i=a,s=0;continue}t&&(o.length>0?o+="/..":o="..",r=2)}else o.length>0?o+="/"+e.slice(i+1,a):o=e.slice(i+1,a),r=a-i-1;i=a,s=0}else 46===n&&-1!==s?++s:s=-1}return o}var o={resolve:function(){for(var e,o="",r=!1,i=arguments.length-1;i>=-1&&!r;i--){var s;i>=0?s=arguments[i]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(o=s+"/"+o,r=47===s.charCodeAt(0))}return o=n(o,!r),r?o.length>0?"/"+o:"/":o.length>0?o:"."},normalize:function(e){if(t(e),0===e.length)return".";var o=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!o)).length||o||(e="."),e.length>0&&r&&(e+="/"),o?"/"+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 r=arguments[n];t(r),r.length>0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":o.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=o.resolve(e))===(n=o.resolve(n)))return"";for(var r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var i=e.length,s=i-r,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(r+d)?l=d:0===d&&(l=0));break}var h=e.charCodeAt(r+d);if(h!==n.charCodeAt(a+d))break;47===h&&(l=d)}var f="";for(d=r+l+1;d<=i;++d)d!==i&&47!==e.charCodeAt(d)||(0===f.length?f+="..":f+="/..");return f.length>0?f+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),o=47===n,r=-1,i=!0,s=e.length-1;s>=1;--s)if(47===(n=e.charCodeAt(s))){if(!i){r=s;break}}else i=!1;return-1===r?o?"/":".":o&&1===r?"//":e.slice(0,r)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var o,r=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(o=e.length-1;o>=0;--o){var u=e.charCodeAt(o);if(47===u){if(!s){r=o+1;break}}else-1===c&&(s=!1,c=o+1),a>=0&&(u===n.charCodeAt(a)?-1==--a&&(i=o):(a=-1,i=c))}return r===i?i=c:-1===i&&(i=e.length),e.slice(r,i)}for(o=e.length-1;o>=0;--o)if(47===e.charCodeAt(o)){if(!s){r=o+1;break}}else-1===i&&(s=!1,i=o+1);return-1===i?"":e.slice(r,i)},extname:function(e){t(e);for(var n=-1,o=0,r=-1,i=!0,s=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===r&&(i=!1,r=a+1),46===c?-1===n?n=a:1!==s&&(s=1):-1!==n&&(s=-1);else if(!i){o=a+1;break}}return-1===n||-1===r||0===s||1===s&&n===r-1&&n===o+1?"":e.slice(n,r)},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,o=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+o:n+"/"+o:o}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var o,r=e.charCodeAt(0),i=47===r;i?(n.root="/",o=1):o=0;for(var s=-1,a=0,c=-1,u=!0,l=e.length-1,d=0;l>=o;--l)if(47!==(r=e.charCodeAt(l)))-1===c&&(u=!1,c=l+1),46===r?-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};o.posix=o,e.exports=o},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 o=n(674),r=/^\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&&!r.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,o,r,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=o||c,this.fragment=r||c,a(this,i))}get fsPath(){return y(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:o,query:r,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===o?o=this.path:null===o&&(o=c),void 0===r?r=this.query:null===r&&(r=c),void 0===i?i=this.fragment:null===i&&(i=c),t===this.scheme&&n===this.authority&&o===this.path&&r===this.query&&i===this.fragment?this:new f(t,n,o,r,i)}static parse(e,t=!1){const n=l.exec(e);return n?new f(n[2]||c,R(n[4]||c),R(n[5]||c),R(n[7]||c),R(n[9]||c),t):new f(c,c,c,c,c)}static file(e){let t=c;if(o.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 f("file",t,e,c,c)}static from(e){const t=new f(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 f(e);return t._formatted=e.external,t._fsPath=e._sep===h?e.fsPath:null,t}}return e}}t.URI=d;const h=o.isWindows?1:void 0;class f 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=h),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 o,r=-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!==r&&(o+=encodeURIComponent(e.substring(r,i)),r=-1),void 0!==o&&(o+=e.charAt(i));else{void 0===o&&(o=e.substr(0,i));const t=m[s];void 0!==t?(-1!==r&&(o+=encodeURIComponent(e.substring(r,i)),r=-1),o+=t):-1===r&&(r=i)}}return-1!==r&&(o+=encodeURIComponent(e.substring(r))),void 0!==o?o:e}function g(e){let t;for(let n=0;n<e.length;n++){const o=e.charCodeAt(n);35===o||63===o?(void 0===t&&(t=e.substr(0,n)),t+=m[o]):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,o.isWindows&&(n=n.replace(/\//g,"\\")),n}function b(e,t){const n=t?g:p;let o="",{scheme:r,authority:i,path:s,query:a,fragment:c}=e;if(r&&(o+=r,o+=":"),(i||"file"===r)&&(o+=u,o+=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?o+=n(t,!1,!1):(o+=n(t.substr(0,e),!1,!1),o+=":",o+=n(t.substr(e+1),!1,!0)),o+="@"}i=i.toLowerCase(),e=i.lastIndexOf(":"),-1===e?o+=n(i,!1,!0):(o+=n(i.substr(0,e),!1,!0),o+=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)}`)}o+=n(s,!0,!1)}return a&&(o+="?",o+=n(a,!1,!1)),c&&(o+="#",o+=t?c:p(c,!1,!1)),o}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 T=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function R(e){return e.match(T)?e.replace(T,(e=>v(e))):e}},679:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=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)&&o(t,e,n);return r(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,o=!1;n[0]!==c&&(n=c+n,o=!0);let r=a.resolve(n,...t);return o&&r[0]===c&&!e.authority&&(r=r.substring(1)),e.with({path:r})},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(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}var o={};return(()=>{var e=o;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 r=n(679);Object.defineProperty(e,"Utils",{enumerable:!0,get:function(){return r.Utils}})})(),o})(),e.exports=t()},5386:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(3984),r=n(2361),i=new o.BrowserMessageReader(self),s=new o.BrowserMessageWriter(self),a=(0,o.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 o=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(o)}}}};(0,r.$g)(a,c)},2361:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.$g=void 0;const o=n(7630),r=n(7696),i=n(8223),s=n(301),a=n(6224),c=n(5447),u=n(7791);var l,d,h,f,m,p;!function(e){e.type=new o.NotificationType("json/schemaAssociations")}(l||(l={})),function(e){e.type=new o.RequestType("vscode/content")}(d||(d={})),function(e){e.type=new o.NotificationType("json/schemaContent")}(h||(h={})),function(e){e.type=new o.RequestType("json/validate")}(f||(f={})),function(e){e.type=new o.RequestType("json/languageStatus")}(m||(m={})),function(e){e.type=new o.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))}t.$g=function(e,t){function n(n=["https","http","file"]){const o={};for(const e of n)"file"===e?o[e]=t.file:"http"!==e&&"https"!==e||(o[e]=t.http);return t=>{const n=t.substr(0,t.indexOf(":")),r=o[n];return r?r.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 o.TextDocuments(s.TextDocument);b.listen(e);let v,T,R,k=!1,D=!1,C=!1,S=Number.MAX_VALUE,w=Number.MAX_VALUE,x=Number.MAX_VALUE,P=Number.MAX_VALUE,_=Number.MAX_VALUE,O=Number.MAX_VALUE,q=Number.MAX_VALUE;e.onInitialize((r=>{const a=r.initializationOptions||{},u=a?.handledSchemaProtocols;function l(e,t){const n=e.split(".");let o=r.capabilities;for(let e=0;o&&e<n.length;e++){if(!o.hasOwnProperty(n[e]))return t;o=o[n[e]]}return o}c=(0,s.getLanguageService)({schemaRequestService:n(u),workspaceContext:g,contributions:[],clientCapabilities:r.capabilities}),k=l("textDocument.completion.completionItem.snippetSupport",!1),D=l("textDocument.rangeFormatting.dynamicRegistration",!1)&&"boolean"!=typeof a.provideFormatter,S=l("textDocument.foldingRange.rangeLimit",Number.MAX_VALUE),C=l("textDocument.documentSymbol.hierarchicalDocumentSymbolSupport",!1),q=a.customCapabilities?.rangeFormatting?.editLimit||Number.MAX_VALUE;const d=l("textDocument.diagnostic",void 0);return v=void 0===d?(0,i.$d)(b,e,t,j):(0,i.$e)(b,e,t,j),{capabilities:{textDocumentSync:o.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 N=null,E=!0,A=!1;function M(){const e={validate:E,allowComments:!0,schemas:new Array};if(R)if(Array.isArray(R))Array.prototype.push.apply(e.schemas,R);else for(const t in R){const n=R[t];Array.isArray(n)&&n.forEach((n=>{e.schemas.push({uri:n,fileMatch:[t]})}))}T&&T.forEach(((t,n)=>{let o=t.url;!o&&t.schema&&(o=t.schema.id||`vscode://schemas/custom/${n}`),o&&e.schemas.push({uri:o,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=L(e),n="jsonc"===e.languageId?{comments:"ignore",trailingCommas:"warning"}:{comments:"error",trailingCommas:"error"};return await c.doValidation(e,t,n)}e.onDidChangeConfiguration((n=>{const r=n.settings;t.configureHttpRequests?.(r?.http?.proxy,!!r.http?.proxyStrictSSL),T=r.json?.schemas,E=!!r.json?.validate?.enable,A=r.json?.keepLines?.enable||!1,M();const i=e=>Math.trunc(Math.max(e,0));if(w=i(r.json?.resultLimit||Number.MAX_VALUE),x=i(r.json?.jsonFoldingLimit||S),P=i(r.json?.jsoncFoldingLimit||S),_=i(r.json?.jsonColorDecoratorLimit||Number.MAX_VALUE),O=i(r.json?.jsoncColorDecoratorLimit||Number.MAX_VALUE),D){const t=r.json?.format?.enable;if(t){if(!N){const t=[{language:"json"},{language:"jsonc"}];N=[e.client.register(o.DocumentRangeFormattingRequest.type,{documentSelector:t}),e.client.register(o.DocumentFormattingRequest.type,{documentSelector:t})]}}else N&&(N.forEach((e=>e.then((e=>e.dispose())))),N=null)}})),e.onNotification(l.type,(e=>{R=e,M()})),e.onNotification(h.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(f.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=L(t);return c.getLanguageStatus(t,e)}return{schemas:[]}})),e.onRequest(p.type,(async e=>{const t=e.uri,n=e.options,o=b.get(t);return o?c.sort(o,n):[]})),e.onDidChangeWatchedFiles((e=>{let t=!1;e.changes.forEach((e=>{c.resetSchema(e.uri)&&(t=!0)})),t&&v?.requestRefresh()}));const I=(0,a.$f)(10,60,(e=>c.parseJSONDocument(e)));function L(e){return I.get(e)}function F(e,t,n){n.keepLines=A;const r=b.get(e.uri);if(r){const e=c.format(r,t??y(r),n);if(e.length>q){const t=s.TextDocument.applyEdits(r,e);return[o.TextEdit.replace(y(r),t)]}return e}return[]}b.onDidClose((e=>{I.onDocumentRemoved(e.document)})),e.onShutdown((()=>{I.dispose()})),e.onCompletion(((e,n)=>(0,r.$b)(t,(async()=>{const t=b.get(e.textDocument.uri);if(t){const n=L(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,r.$b)(t,(async()=>{const t=b.get(e.textDocument.uri);if(t){const n=L(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,r.$c)(t,(()=>{const t=b.get(e.textDocument.uri);if(t){const e=L(t);return C?c.findDocumentSymbols2(t,e,{resultLimit:w}):c.findDocumentSymbols(t,e,{resultLimit:w})}return[]}),[],`Error while computing document symbols for ${e.textDocument.uri}`,n))),e.onCodeAction(((e,n)=>(0,r.$b)(t,(async()=>{if(b.get(e.textDocument.uri)){const e=o.CodeAction.create("Sort JSON",o.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,r.$c)(t,(()=>F(e.textDocument,e.range,e.options)),[],`Error while formatting range for ${e.textDocument.uri}`,n))),e.onDocumentFormatting(((e,n)=>(0,r.$c)(t,(()=>F(e.textDocument,void 0,e.options)),[],`Error while formatting ${e.textDocument.uri}`,n))),e.onDocumentColor(((e,n)=>(0,r.$b)(t,(async()=>{const t=b.get(e.textDocument.uri);if(t){const e=L(t),n="jsonc"===t.languageId?O:_;return c.findDocumentColors(t,e,{resultLimit:n})}return[]}),[],`Error while computing document colors for ${e.textDocument.uri}`,n))),e.onColorPresentation(((e,n)=>(0,r.$c)(t,(()=>{const t=b.get(e.textDocument.uri);if(t){const n=L(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,r.$c)(t,(()=>{const t=b.get(e.textDocument.uri);if(t){const e="jsonc"===t.languageId?P:x;return c.getFoldingRanges(t,{rangeLimit:e})}return null}),null,`Error while computing folding ranges for ${e.textDocument.uri}`,n))),e.onSelectionRanges(((e,n)=>(0,r.$c)(t,(()=>{const t=b.get(e.textDocument.uri);if(t){const n=L(t);return c.getSelectionRanges(t,e.positions,n)}return[]}),[],`Error while computing selection ranges for ${e.textDocument.uri}`,n))),e.onDocumentLinks(((e,n)=>(0,r.$b)(t,(async()=>{const t=b.get(e.textDocument.uri);if(t){const e=L(t);return c.findLinks(t,e)}return[]}),[],`Error while computing links for ${e.textDocument.uri}`,n))),e.listen()}},6224:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.$f=void 0,t.$f=function(e,t,n){let o,r={},i=0;return t>0&&(o=setInterval((()=>{const e=Date.now()-1e3*t,n=Object.keys(r);for(const t of n)r[t].cTime<e&&(delete r[t],i--)}),1e3*t)),{get(t){const o=t.version,s=t.languageId,a=r[t.uri];if(a&&a.version===o&&a.languageId===s)return a.cTime=Date.now(),a.languageModel;const c=n(t);if(r[t.uri]={languageModel:c,version:o,languageId:s,cTime:Date.now()},a||i++,i===e){let e=Number.MAX_VALUE,t=null;for(const n in r){const o=r[n];o.cTime<e&&(t=n,e=o.cTime)}t&&(delete r[t],i--)}return c},onDocumentRemoved(e){const t=e.uri;r[t]&&(delete r[t],i--)},dispose(){void 0!==o&&(clearInterval(o),o=void 0,r={},i=0)}}}},7696:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.$c=t.$b=t.$a=void 0;const o=n(7630);function r(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 o.ResponseError(o.LSPErrorCodes.RequestCancelled,"Request cancelled")}t.$a=r,t.$b=function(e,t,n,o,s){return new Promise((a=>{e.timer.setImmediate((()=>{if(!s.isCancellationRequested)return t().then((e=>{s.isCancellationRequested?a(i()):a(e)}),(e=>{console.error(r(o,e)),a(n)}));a(i())}))}))},t.$c=function(e,t,n,o,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(r(o,e)),a(n)}}))}))}},8223:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.$e=t.$d=void 0;const o=n(7630),r=n(7696);t.$d=function(e,t,n,o){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 o(e);s===i[e.uri]&&t.sendDiagnostics({uri:e.uri,diagnostics:n}),delete i[e.uri]}catch(n){t.console.error((0,r.$a)(`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.$e=function(e,t,n,i){function s(e){return{kind:o.DocumentDiagnosticReportKind.Full,items:e}}const a=t.languages.diagnostics.on((async(t,o)=>(0,r.$b)(n,(async()=>{const n=e.get(t.textDocument.uri);return s(n?await i(n):[])}),s([]),`Error while computing diagnostics for ${t.textDocument.uri}`,o)));return{requestRefresh:function(){t.languages.diagnostics.refresh()},dispose:()=>{a.dispose()}}}},2118:(e,t,n)=>{"use strict";var o,r,i,s,a,c,u,l,d,h,f,m,p,g,y,b,v,T,R,k,D,C,S,w,x,P,_,O,q,N,E,A,M,j,I,L,F,$,W,V,U,H,K,B,z,J,X,G,Z,Q,Y,ee,te,ne,oe,re,ie,se,ae,ce,ue,le,de,he,fe,me,pe,ge,ye,be,ve,Te,Re,ke,De,Ce,Se,we;n.r(t),n.d(t,{AnnotatedTextEdit:()=>S,ChangeAnnotation:()=>D,ChangeAnnotationIdentifier:()=>C,CodeAction:()=>ie,CodeActionContext:()=>re,CodeActionKind:()=>ne,CodeActionTriggerKind:()=>oe,CodeDescription:()=>v,CodeLens:()=>se,Color:()=>d,ColorInformation:()=>h,ColorPresentation:()=>f,Command:()=>R,CompletionItem:()=>U,CompletionItemKind:()=>I,CompletionItemLabelDetails:()=>V,CompletionItemTag:()=>F,CompletionList:()=>H,CreateFile:()=>x,DeleteFile:()=>_,Diagnostic:()=>T,DiagnosticRelatedInformation:()=>g,DiagnosticSeverity:()=>y,DiagnosticTag:()=>b,DocumentHighlight:()=>G,DocumentHighlightKind:()=>X,DocumentLink:()=>ce,DocumentSymbol:()=>te,DocumentUri:()=>o,EOL:()=>Oe,FoldingRange:()=>p,FoldingRangeKind:()=>m,FormattingOptions:()=>ae,Hover:()=>B,InlayHint:()=>ve,InlayHintKind:()=>ye,InlayHintLabelPart:()=>be,InlineCompletionContext:()=>Se,InlineCompletionItem:()=>Re,InlineCompletionList:()=>ke,InlineCompletionTriggerKind:()=>De,InlineValueContext:()=>ge,InlineValueEvaluatableExpression:()=>pe,InlineValueText:()=>fe,InlineValueVariableLookup:()=>me,InsertReplaceEdit:()=>$,InsertTextFormat:()=>L,InsertTextMode:()=>W,Location:()=>u,LocationLink:()=>l,MarkedString:()=>K,MarkupContent:()=>j,MarkupKind:()=>M,OptionalVersionedTextDocumentIdentifier:()=>E,ParameterInformation:()=>z,Position:()=>a,Range:()=>c,RenameFile:()=>P,SelectedCompletionInfo:()=>Ce,SelectionRange:()=>ue,SemanticTokenModifiers:()=>de,SemanticTokenTypes:()=>le,SemanticTokens:()=>he,SignatureInformation:()=>J,StringValue:()=>Te,SymbolInformation:()=>Y,SymbolKind:()=>Z,SymbolTag:()=>Q,TextDocument:()=>qe,TextDocumentEdit:()=>w,TextDocumentIdentifier:()=>q,TextDocumentItem:()=>A,TextEdit:()=>k,URI:()=>r,VersionedTextDocumentIdentifier:()=>N,WorkspaceChange:()=>_e,WorkspaceEdit:()=>O,WorkspaceFolder:()=>we,WorkspaceSymbol:()=>ee,integer:()=>i,uinteger:()=>s}),function(e){e.is=function(e){return"string"==typeof e}}(o||(o={})),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}}(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){let t=e;return Ne.objectLiteral(t)&&Ne.uinteger(t.line)&&Ne.uinteger(t.character)}}(a||(a={})),function(e){e.create=function(e,t,n,o){if(Ne.uinteger(e)&&Ne.uinteger(t)&&Ne.uinteger(n)&&Ne.uinteger(o))return{start:a.create(e,t),end:a.create(n,o)};if(a.is(e)&&a.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${o}]`)},e.is=function(e){let 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){let 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,o){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:o}},e.is=function(e){let 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,o){return{red:e,green:t,blue:n,alpha:o}},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)}}(h||(h={})),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)||k.is(t))&&(Ne.undefined(t.additionalTextEdits)||Ne.typedArray(t.additionalTextEdits,k.is))}}(f||(f={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(m||(m={})),function(e){e.create=function(e,t,n,o,r,i){const s={startLine:e,endLine:t};return Ne.defined(n)&&(s.startCharacter=n),Ne.defined(o)&&(s.endCharacter=o),Ne.defined(r)&&(s.kind=r),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))}}(p||(p={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){let 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,o,r,i){let s={range:e,message:t};return Ne.defined(n)&&(s.severity=n),Ne.defined(o)&&(s.code=o),Ne.defined(r)&&(s.source=r),Ne.defined(i)&&(s.relatedInformation=i),s},e.is=function(e){var t;let 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))}}(T||(T={})),function(e){e.create=function(e,t,...n){let o={title:e,command:t};return Ne.defined(n)&&n.length>0&&(o.arguments=n),o},e.is=function(e){let t=e;return Ne.defined(t)&&Ne.string(t.title)&&Ne.string(t.command)}}(R||(R={})),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)}}(k||(k={})),function(e){e.create=function(e,t,n){const o={label:e};return void 0!==t&&(o.needsConfirmation=t),void 0!==n&&(o.description=n),o},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)}}(D||(D={})),function(e){e.is=function(e){const t=e;return Ne.string(t)}}(C||(C={})),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 k.is(t)&&(D.is(t.annotationId)||C.is(t.annotationId))}}(S||(S={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){let t=e;return Ne.defined(t)&&E.is(t.textDocument)&&Array.isArray(t.edits)}}(w||(w={})),function(e){e.create=function(e,t,n){let o={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(o.options=t),void 0!==n&&(o.annotationId=n),o},e.is=function(e){let 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||C.is(t.annotationId))}}(x||(x={})),function(e){e.create=function(e,t,n,o){let r={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(r.options=n),void 0!==o&&(r.annotationId=o),r},e.is=function(e){let 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||C.is(t.annotationId))}}(P||(P={})),function(e){e.create=function(e,t,n){let o={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(o.options=t),void 0!==n&&(o.annotationId=n),o},e.is=function(e){let 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||C.is(t.annotationId))}}(_||(_={})),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=>Ne.string(e.kind)?x.is(e)||P.is(e)||_.is(e):w.is(e))))}}(O||(O={}));class xe{constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,n){let o,r;if(void 0===n?o=k.insert(e,t):C.is(n)?(r=n,o=S.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(n),o=S.insert(e,t,r)),this.edits.push(o),void 0!==r)return r}replace(e,t,n){let o,r;if(void 0===n?o=k.replace(e,t):C.is(n)?(r=n,o=S.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(n),o=S.replace(e,t,r)),this.edits.push(o),void 0!==r)return r}delete(e,t){let n,o;if(void 0===t?n=k.del(e):C.is(t)?(o=t,n=S.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(t),n=S.del(e,o)),this.edits.push(n),void 0!==o)return o}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.")}}class Pe{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(C.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 _e{constructor(e){this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Pe(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((e=>{if(w.is(e)){const t=new xe(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}}))):e.changes&&Object.keys(e.changes).forEach((t=>{const n=new xe(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(E.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=[],o={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(o),n=new xe(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){let n=[];this._workspaceEdit.changes[e]=n,t=new xe(n),this._textEditChanges[e]=t}return t}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new Pe,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 o,r,i;if(D.is(t)||C.is(t)?o=t:n=t,void 0===o?r=x.create(e,n):(i=C.is(o)?o:this._changeAnnotations.manage(o),r=x.create(e,n,i)),this._workspaceEdit.documentChanges.push(r),void 0!==i)return i}renameFile(e,t,n,o){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let r,i,s;if(D.is(n)||C.is(n)?r=n:o=n,void 0===r?i=P.create(e,t,o):(s=C.is(r)?r:this._changeAnnotations.manage(r),i=P.create(e,t,o,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 o,r,i;if(D.is(t)||C.is(t)?o=t:n=t,void 0===o?r=_.create(e,n):(i=C.is(o)?o:this._changeAnnotations.manage(o),r=_.create(e,n,i)),this._workspaceEdit.documentChanges.push(r),void 0!==i)return i}}!function(e){e.create=function(e){return{uri:e}},e.is=function(e){let t=e;return Ne.defined(t)&&Ne.string(t.uri)}}(q||(q={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Ne.defined(t)&&Ne.string(t.uri)&&Ne.integer(t.version)}}(N||(N={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Ne.defined(t)&&Ne.string(t.uri)&&(null===t.version||Ne.integer(t.version))}}(E||(E={})),function(e){e.create=function(e,t,n,o){return{uri:e,languageId:t,version:n,text:o}},e.is=function(e){let t=e;return Ne.defined(t)&&Ne.string(t.uri)&&Ne.string(t.languageId)&&Ne.integer(t.version)&&Ne.string(t.text)}}(A||(A={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){const n=t;return n===e.PlainText||n===e.Markdown}}(M||(M={})),function(e){e.is=function(e){const t=e;return Ne.objectLiteral(e)&&M.is(t.kind)&&Ne.string(t.value)}}(j||(j={})),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}(I||(I={})),function(e){e.PlainText=1,e.Snippet=2}(L||(L={})),function(e){e.Deprecated=1}(F||(F={})),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)}}($||($={})),function(e){e.asIs=1,e.adjustIndentation=2}(W||(W={})),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)}}(V||(V={})),function(e){e.create=function(e){return{label:e}}}(U||(U={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(H||(H={})),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){let t=e;return!!t&&Ne.objectLiteral(t)&&(j.is(t.contents)||K.is(t.contents)||Ne.typedArray(t.contents,K.is))&&(void 0===e.range||c.is(e.range))}}(B||(B={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(z||(z={})),function(e){e.create=function(e,t,...n){let o={label:e};return Ne.defined(t)&&(o.documentation=t),Ne.defined(n)?o.parameters=n:o.parameters=[],o}}(J||(J={})),function(e){e.Text=1,e.Read=2,e.Write=3}(X||(X={})),function(e){e.create=function(e,t){let n={range:e};return Ne.number(t)&&(n.kind=t),n}}(G||(G={})),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}(Z||(Z={})),function(e){e.Deprecated=1}(Q||(Q={})),function(e){e.create=function(e,t,n,o,r){let i={name:e,kind:t,location:{uri:o,range:n}};return r&&(i.containerName=r),i}}(Y||(Y={})),function(e){e.create=function(e,t,n,o){return void 0!==o?{name:e,kind:t,location:{uri:n,range:o}}:{name:e,kind:t,location:{uri:n}}}}(ee||(ee={})),function(e){e.create=function(e,t,n,o,r,i){let s={name:e,detail:t,kind:n,range:o,selectionRange:r};return void 0!==i&&(s.children=i),s},e.is=function(e){let 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))}}(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"}(ne||(ne={})),function(e){e.Invoked=1,e.Automatic=2}(oe||(oe={})),function(e){e.create=function(e,t,n){let o={diagnostics:e};return null!=t&&(o.only=t),null!=n&&(o.triggerKind=n),o},e.is=function(e){let t=e;return Ne.defined(t)&&Ne.typedArray(t.diagnostics,T.is)&&(void 0===t.only||Ne.typedArray(t.only,Ne.string))&&(void 0===t.triggerKind||t.triggerKind===oe.Invoked||t.triggerKind===oe.Automatic)}}(re||(re={})),function(e){e.create=function(e,t,n){let o={title:e},r=!0;return"string"==typeof t?(r=!1,o.kind=t):R.is(t)?o.command=t:o.edit=t,r&&void 0!==n&&(o.kind=n),o},e.is=function(e){let t=e;return t&&Ne.string(t.title)&&(void 0===t.diagnostics||Ne.typedArray(t.diagnostics,T.is))&&(void 0===t.kind||Ne.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||R.is(t.command))&&(void 0===t.isPreferred||Ne.boolean(t.isPreferred))&&(void 0===t.edit||O.is(t.edit))}}(ie||(ie={})),function(e){e.create=function(e,t){let n={range:e};return Ne.defined(t)&&(n.data=t),n},e.is=function(e){let t=e;return Ne.defined(t)&&c.is(t.range)&&(Ne.undefined(t.command)||R.is(t.command))}}(se||(se={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){let t=e;return Ne.defined(t)&&Ne.uinteger(t.tabSize)&&Ne.boolean(t.insertSpaces)}}(ae||(ae={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){let t=e;return Ne.defined(t)&&c.is(t.range)&&(Ne.undefined(t.target)||Ne.string(t.target))}}(ce||(ce={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){let n=t;return Ne.objectLiteral(n)&&c.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(ue||(ue={})),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"}(le||(le={})),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"}(de||(de={})),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])}}(he||(he={})),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)}}(fe||(fe={})),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)}}(me||(me={})),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)}}(pe||(pe={})),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)}}(ge||(ge={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(ye||(ye={})),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)||j.is(t.tooltip))&&(void 0===t.location||u.is(t.location))&&(void 0===t.command||R.is(t.command))}}(be||(be={})),function(e){e.create=function(e,t,n){const o={position:e,label:t};return void 0!==n&&(o.kind=n),o},e.is=function(e){const t=e;return Ne.objectLiteral(t)&&a.is(t.position)&&(Ne.string(t.label)||Ne.typedArray(t.label,be.is))&&(void 0===t.kind||ye.is(t.kind))&&void 0===t.textEdits||Ne.typedArray(t.textEdits,k.is)&&(void 0===t.tooltip||Ne.string(t.tooltip)||j.is(t.tooltip))&&(void 0===t.paddingLeft||Ne.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Ne.boolean(t.paddingRight))}}(ve||(ve={})),function(e){e.createSnippet=function(e){return{kind:"snippet",value:e}}}(Te||(Te={})),function(e){e.create=function(e,t,n,o){return{insertText:e,filterText:t,range:n,command:o}}}(Re||(Re={})),function(e){e.create=function(e){return{items:e}}}(ke||(ke={})),function(e){e.Invoked=0,e.Automatic=1}(De||(De={})),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}}}(Se||(Se={})),function(e){e.is=function(e){const t=e;return Ne.objectLiteral(t)&&r.is(t.uri)&&Ne.string(t.name)}}(we||(we={}));const Oe=["\n","\r\n","\r"];var qe,Ne;!function(e){function t(e,n){if(e.length<=1)return e;const o=e.length/2|0,r=e.slice(0,o),i=e.slice(o);t(r,n),t(i,n);let s=0,a=0,c=0;for(;s<r.length&&a<i.length;){let t=n(r[s],i[a]);e[c++]=t<=0?r[s++]:i[a++]}for(;s<r.length;)e[c++]=r[s++];for(;a<i.length;)e[c++]=i[a++];return e}e.create=function(e,t,n,o){return new Ee(e,t,n,o)},e.is=function(e){let 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 o=e.getText(),r=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=o.length;for(let t=r.length-1;t>=0;t--){let n=r[t],s=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end);if(!(a<=i))throw new Error("Overlapping edit");o=o.substring(0,s)+n.newText+o.substring(a,o.length),i=s}return o}}(qe||(qe={}));class Ee{constructor(e,t,n,o){this._uri=e,this._languageId=t,this._version=n,this._content=o,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 o=0;o<t.length;o++){n&&(e.push(o),n=!1);let r=t.charAt(o);n="\r"===r||"\n"===r,"\r"===r&&o+1<t.length&&"\n"===t.charAt(o+1)&&o++}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,o=t.length;if(0===o)return a.create(0,e);for(;n<o;){let r=Math.floor((n+o)/2);t[r]>e?o=r:n=r+1}let r=n-1;return a.create(r,e-t[r])}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],o=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,o),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,o){return"[object Number]"===t.call(e)&&n<=e&&e<=o},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(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},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 o={};(()=>{"use strict";var e=o;Object.defineProperty(e,"__esModule",{value:!0});const t=n(7791);let r=!1;const i=[],s=async e=>{if(r)i.push(e);else{const o=[];r=!0;const a=e.data.i10lLocation;if(a)try{await t.config({uri:a}),o.push(`l10n: Configured to ${a.toString()}.`)}catch(e){o.push(`l10n: Problems loading ${a.toString()} : ${e}.`)}else o.push("l10n: No bundle configured.");await Promise.resolve().then((()=>n(5386))),self.onmessage!==s&&(i.forEach((e=>self.onmessage?.(e))),i.length=0),o.forEach(console.log)}};self.onmessage=s})(),serverExportVar=o})();
2
+ //# sourceMappingURL=https://ticino.blob.core.windows.net/sourcemaps/af28b32d7e553898b2a91af498b1fb666fdebe0c/extensions/json-language-features/server/dist/browser/jsonServerMain.js.map