code-server
Version:
Run VS Code on a remote server.
2 lines • 293 kB
JavaScript
(()=>{"use strict";var e={9444:(e,t,n)=>{e.exports=n(6087)},1006:(e,t,n)=>{const o=n(5622),r="\\.{1,2}(?:\\/|$)",i={DOT_LITERAL:"\\.",PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:"\\/",ONE_CHAR:"(?=.)",QMARK:"[^/]",END_ANCHOR:"(?:\\/|$)",DOTS_SLASH:r,NO_DOT:"(?!\\.)",NO_DOTS:`(?!(?:^|\\/)${r})`,NO_DOT_SLASH:"(?!\\.{0,1}(?:\\/|$))",NO_DOTS_SLASH:`(?!${r})`,QMARK_NO_DOT:"[^.\\/]",STAR:"[^/]*?",START_ANCHOR:"(?:^|\\/)"},s={...i,SLASH_LITERAL:"[\\\\/]",QMARK:"[^\\\\/]",STAR:"[^\\\\/]*?",DOTS_SLASH:"\\.{1,2}(?:[\\\\/]|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:[\\\\/]|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:[\\\\/]|$))",QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)"};e.exports={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:o.sep,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?s:i}},3376:(e,t,n)=>{const o=n(1006),r=n(8702),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:s,REGEX_NON_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_BACKREF:c,REPLACEMENTS:u}=o,l=(e,t)=>{if("function"==typeof t.expandRange)return t.expandRange(...e,t);e.sort();const n=`[${e.join("-")}]`;try{new RegExp(n)}catch(t){return e.map((e=>r.escapeRegex(e))).join("..")}return n},d=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,f=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");e=u[e]||e;const n={...t},h="number"==typeof n.maxLength?Math.min(i,n.maxLength):i;let g=e.length;if(g>h)throw new SyntaxError(`Input length: ${g}, exceeds maximum allowed length: ${h}`);const p={type:"bos",value:"",output:n.prepend||""},m=[p],y=n.capture?"":"?:",v=r.isWindows(t),R=o.globChars(v),b=o.extglobChars(R),{DOT_LITERAL:k,PLUS_LITERAL:_,SLASH_LITERAL:w,ONE_CHAR:D,DOTS_SLASH:C,NO_DOT:P,NO_DOT_SLASH:T,NO_DOTS_SLASH:x,QMARK:S,QMARK_NO_DOT:E,STAR:L,START_ANCHOR:q}=R,O=e=>`(${y}(?:(?!${q}${e.dot?C:k}).)*?)`,A=n.dot?"":P,M=n.dot?S:E;let N=!0===n.bash?O(n):L;n.capture&&(N=`(${N})`),"boolean"==typeof n.noext&&(n.noextglob=n.noext);const F={input:e,index:-1,start:0,dot:!0===n.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:m};e=r.removePrefix(e,F),g=e.length;const I=[],j=[],W=[];let H,$=p;const U=()=>F.index===g-1,z=F.peek=(t=1)=>e[F.index+t],K=F.advance=()=>e[++F.index]||"",B=()=>e.slice(F.index+1),V=(e="",t=0)=>{F.consumed+=e,F.index+=t},G=e=>{F.output+=null!=e.output?e.output:e.value,V(e.value)},X=()=>{let e=1;for(;"!"===z()&&("("!==z(2)||"?"===z(3));)K(),F.start++,e++;return e%2!=0&&(F.negated=!0,F.start++,!0)},J=e=>{F[e]++,W.push(e)},Q=e=>{F[e]--,W.pop()},Y=e=>{if("globstar"===$.type){const t=F.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||I.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(F.output=F.output.slice(0,-$.output.length),$.type="star",$.value="*",$.output=N,F.output+=$.output)}if(I.length&&"paren"!==e.type&&(I[I.length-1].inner+=e.value),(e.value||e.output)&&G(e),$&&"text"===$.type&&"text"===e.type)return $.value+=e.value,void($.output=($.output||"")+e.value);e.prev=$,m.push(e),$=e},Z=(e,t)=>{const o={...b[t],conditions:1,inner:""};o.prev=$,o.parens=F.parens,o.output=F.output;const r=(n.capture?"(":"")+o.open;J("parens"),Y({type:e,value:t,output:F.output?"":D}),Y({type:"paren",extglob:!0,value:K(),output:r}),I.push(o)},ee=e=>{let o,r=e.close+(n.capture?")":"");if("negate"===e.type){let i=N;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(i=O(n)),(i!==N||U()||/^\)+$/.test(B()))&&(r=e.close=`)$))${i}`),e.inner.includes("*")&&(o=B())&&/^\.[^\\/.]+$/.test(o)){const n=f(o,{...t,fastpaths:!1}).output;r=e.close=`)${n})${i})`}"bos"===e.prev.type&&(F.negatedExtglob=!0)}Y({type:"paren",extglob:!0,value:H,output:r}),Q("parens")};if(!1!==n.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(e)){let o=!1,i=e.replace(c,((e,t,n,r,i,s)=>"\\"===r?(o=!0,e):"?"===r?t?t+r+(i?S.repeat(i.length):""):0===s?M+(i?S.repeat(i.length):""):S.repeat(n.length):"."===r?k.repeat(n.length):"*"===r?t?t+r+(i?N:""):N:t?e:`\\${e}`));return!0===o&&(i=!0===n.unescape?i.replace(/\\/g,""):i.replace(/\\+/g,(e=>e.length%2==0?"\\\\":e?"\\":""))),i===e&&!0===n.contains?(F.output=e,F):(F.output=r.wrapOutput(i,F,t),F)}for(;!U();){if(H=K(),"\0"===H)continue;if("\\"===H){const e=z();if("/"===e&&!0!==n.bash)continue;if("."===e||";"===e)continue;if(!e){H+="\\",Y({type:"text",value:H});continue}const t=/^\\+/.exec(B());let o=0;if(t&&t[0].length>2&&(o=t[0].length,F.index+=o,o%2!=0&&(H+="\\")),!0===n.unescape?H=K():H+=K(),0===F.brackets){Y({type:"text",value:H});continue}}if(F.brackets>0&&("]"!==H||"["===$.value||"[^"===$.value)){if(!1!==n.posix&&":"===H){const e=$.value.slice(1);if(e.includes("[")&&($.posix=!0,e.includes(":"))){const e=$.value.lastIndexOf("["),t=$.value.slice(0,e),n=$.value.slice(e+2),o=s[n];if(o){$.value=t+o,F.backtrack=!0,K(),p.output||1!==m.indexOf($)||(p.output=D);continue}}}("["===H&&":"!==z()||"-"===H&&"]"===z())&&(H=`\\${H}`),"]"!==H||"["!==$.value&&"[^"!==$.value||(H=`\\${H}`),!0===n.posix&&"!"===H&&"["===$.value&&(H="^"),$.value+=H,G({value:H});continue}if(1===F.quotes&&'"'!==H){H=r.escapeRegex(H),$.value+=H,G({value:H});continue}if('"'===H){F.quotes=1===F.quotes?0:1,!0===n.keepQuotes&&Y({type:"text",value:H});continue}if("("===H){J("parens"),Y({type:"paren",value:H});continue}if(")"===H){if(0===F.parens&&!0===n.strictBrackets)throw new SyntaxError(d("opening","("));const e=I[I.length-1];if(e&&F.parens===e.parens+1){ee(I.pop());continue}Y({type:"paren",value:H,output:F.parens?")":"\\)"}),Q("parens");continue}if("["===H){if(!0!==n.nobracket&&B().includes("]"))J("brackets");else{if(!0!==n.nobracket&&!0===n.strictBrackets)throw new SyntaxError(d("closing","]"));H=`\\${H}`}Y({type:"bracket",value:H});continue}if("]"===H){if(!0===n.nobracket||$&&"bracket"===$.type&&1===$.value.length){Y({type:"text",value:H,output:`\\${H}`});continue}if(0===F.brackets){if(!0===n.strictBrackets)throw new SyntaxError(d("opening","["));Y({type:"text",value:H,output:`\\${H}`});continue}Q("brackets");const e=$.value.slice(1);if(!0===$.posix||"^"!==e[0]||e.includes("/")||(H=`/${H}`),$.value+=H,G({value:H}),!1===n.literalBrackets||r.hasRegexChars(e))continue;const t=r.escapeRegex($.value);if(F.output=F.output.slice(0,-$.value.length),!0===n.literalBrackets){F.output+=t,$.value=t;continue}$.value=`(${y}${t}|${$.value})`,F.output+=$.value;continue}if("{"===H&&!0!==n.nobrace){J("braces");const e={type:"brace",value:H,output:"(",outputIndex:F.output.length,tokensIndex:F.tokens.length};j.push(e),Y(e);continue}if("}"===H){const e=j[j.length-1];if(!0===n.nobrace||!e){Y({type:"text",value:H,output:H});continue}let t=")";if(!0===e.dots){const e=m.slice(),o=[];for(let t=e.length-1;t>=0&&(m.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&o.unshift(e[t].value);t=l(o,n),F.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const n=F.output.slice(0,e.outputIndex),o=F.tokens.slice(e.tokensIndex);e.value=e.output="\\{",H=t="\\}",F.output=n;for(const e of o)F.output+=e.output||e.value}Y({type:"brace",value:H,output:t}),Q("braces"),j.pop();continue}if("|"===H){I.length>0&&I[I.length-1].conditions++,Y({type:"text",value:H});continue}if(","===H){let e=H;const t=j[j.length-1];t&&"braces"===W[W.length-1]&&(t.comma=!0,e="|"),Y({type:"comma",value:H,output:e});continue}if("/"===H){if("dot"===$.type&&F.index===F.start+1){F.start=F.index+1,F.consumed="",F.output="",m.pop(),$=p;continue}Y({type:"slash",value:H,output:w});continue}if("."===H){if(F.braces>0&&"dot"===$.type){"."===$.value&&($.output=k);const e=j[j.length-1];$.type="dots",$.output+=H,$.value+=H,e.dots=!0;continue}if(F.braces+F.parens===0&&"bos"!==$.type&&"slash"!==$.type){Y({type:"text",value:H,output:k});continue}Y({type:"dot",value:H,output:k});continue}if("?"===H){if((!$||"("!==$.value)&&!0!==n.noextglob&&"("===z()&&"?"!==z(2)){Z("qmark",H);continue}if($&&"paren"===$.type){const e=z();let t=H;if("<"===e&&!r.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===$.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(B()))&&(t=`\\${H}`),Y({type:"text",value:H,output:t});continue}if(!0!==n.dot&&("slash"===$.type||"bos"===$.type)){Y({type:"qmark",value:H,output:E});continue}Y({type:"qmark",value:H,output:S});continue}if("!"===H){if(!0!==n.noextglob&&"("===z()&&("?"!==z(2)||!/[!=<:]/.test(z(3)))){Z("negate",H);continue}if(!0!==n.nonegate&&0===F.index){X();continue}}if("+"===H){if(!0!==n.noextglob&&"("===z()&&"?"!==z(2)){Z("plus",H);continue}if($&&"("===$.value||!1===n.regex){Y({type:"plus",value:H,output:_});continue}if($&&("bracket"===$.type||"paren"===$.type||"brace"===$.type)||F.parens>0){Y({type:"plus",value:H});continue}Y({type:"plus",value:_});continue}if("@"===H){if(!0!==n.noextglob&&"("===z()&&"?"!==z(2)){Y({type:"at",extglob:!0,value:H,output:""});continue}Y({type:"text",value:H});continue}if("*"!==H){"$"!==H&&"^"!==H||(H=`\\${H}`);const e=a.exec(B());e&&(H+=e[0],F.index+=e[0].length),Y({type:"text",value:H});continue}if($&&("globstar"===$.type||!0===$.star)){$.type="star",$.star=!0,$.value+=H,$.output=N,F.backtrack=!0,F.globstar=!0,V(H);continue}let t=B();if(!0!==n.noextglob&&/^\([^?]/.test(t)){Z("star",H);continue}if("star"===$.type){if(!0===n.noglobstar){V(H);continue}const o=$.prev,r=o.prev,i="slash"===o.type||"bos"===o.type,s=r&&("star"===r.type||"globstar"===r.type);if(!0===n.bash&&(!i||t[0]&&"/"!==t[0])){Y({type:"star",value:H,output:""});continue}const a=F.braces>0&&("comma"===o.type||"brace"===o.type),c=I.length&&("pipe"===o.type||"paren"===o.type);if(!i&&"paren"!==o.type&&!a&&!c){Y({type:"star",value:H,output:""});continue}for(;"/**"===t.slice(0,3);){const n=e[F.index+4];if(n&&"/"!==n)break;t=t.slice(3),V("/**",3)}if("bos"===o.type&&U()){$.type="globstar",$.value+=H,$.output=O(n),F.output=$.output,F.globstar=!0,V(H);continue}if("slash"===o.type&&"bos"!==o.prev.type&&!s&&U()){F.output=F.output.slice(0,-(o.output+$.output).length),o.output=`(?:${o.output}`,$.type="globstar",$.output=O(n)+(n.strictSlashes?")":"|$)"),$.value+=H,F.globstar=!0,F.output+=o.output+$.output,V(H);continue}if("slash"===o.type&&"bos"!==o.prev.type&&"/"===t[0]){const e=void 0!==t[1]?"|$":"";F.output=F.output.slice(0,-(o.output+$.output).length),o.output=`(?:${o.output}`,$.type="globstar",$.output=`${O(n)}${w}|${w}${e})`,$.value+=H,F.output+=o.output+$.output,F.globstar=!0,V(H+K()),Y({type:"slash",value:"/",output:""});continue}if("bos"===o.type&&"/"===t[0]){$.type="globstar",$.value+=H,$.output=`(?:^|${w}|${O(n)}${w})`,F.output=$.output,F.globstar=!0,V(H+K()),Y({type:"slash",value:"/",output:""});continue}F.output=F.output.slice(0,-$.output.length),$.type="globstar",$.output=O(n),$.value+=H,F.output+=$.output,F.globstar=!0,V(H);continue}const o={type:"star",value:H,output:N};!0!==n.bash?!$||"bracket"!==$.type&&"paren"!==$.type||!0!==n.regex?(F.index!==F.start&&"slash"!==$.type&&"dot"!==$.type||("dot"===$.type?(F.output+=T,$.output+=T):!0===n.dot?(F.output+=x,$.output+=x):(F.output+=A,$.output+=A),"*"!==z()&&(F.output+=D,$.output+=D)),Y(o)):(o.output=H,Y(o)):(o.output=".*?","bos"!==$.type&&"slash"!==$.type||(o.output=A+o.output),Y(o))}for(;F.brackets>0;){if(!0===n.strictBrackets)throw new SyntaxError(d("closing","]"));F.output=r.escapeLast(F.output,"["),Q("brackets")}for(;F.parens>0;){if(!0===n.strictBrackets)throw new SyntaxError(d("closing",")"));F.output=r.escapeLast(F.output,"("),Q("parens")}for(;F.braces>0;){if(!0===n.strictBrackets)throw new SyntaxError(d("closing","}"));F.output=r.escapeLast(F.output,"{"),Q("braces")}if(!0===n.strictSlashes||"star"!==$.type&&"bracket"!==$.type||Y({type:"maybe_slash",value:"",output:`${w}?`}),!0===F.backtrack){F.output="";for(const e of F.tokens)F.output+=null!=e.output?e.output:e.value,e.suffix&&(F.output+=e.suffix)}return F};f.fastpaths=(e,t)=>{const n={...t},s="number"==typeof n.maxLength?Math.min(i,n.maxLength):i,a=e.length;if(a>s)throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${s}`);e=u[e]||e;const c=r.isWindows(t),{DOT_LITERAL:l,SLASH_LITERAL:d,ONE_CHAR:f,DOTS_SLASH:h,NO_DOT:g,NO_DOTS:p,NO_DOTS_SLASH:m,STAR:y,START_ANCHOR:v}=o.globChars(c),R=n.dot?p:g,b=n.dot?m:g,k=n.capture?"":"?:";let _=!0===n.bash?".*?":y;n.capture&&(_=`(${_})`);const w=e=>!0===e.noglobstar?_:`(${k}(?:(?!${v}${e.dot?h:l}).)*?)`,D=e=>{switch(e){case"*":return`${R}${f}${_}`;case".*":return`${l}${f}${_}`;case"*.*":return`${R}${_}${l}${f}${_}`;case"*/*":return`${R}${_}${d}${f}${b}${_}`;case"**":return R+w(n);case"**/*":return`(?:${R}${w(n)}${d})?${b}${f}${_}`;case"**/*.*":return`(?:${R}${w(n)}${d})?${b}${_}${l}${f}${_}`;case"**/.*":return`(?:${R}${w(n)}${d})?${l}${f}${_}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const n=D(t[1]);if(!n)return;return n+l+t[2]}}},C=r.removePrefix(e,{negated:!1,prefix:""});let P=D(C);return P&&!0!==n.strictSlashes&&(P+=`${d}?`),P},e.exports=f},6087:(e,t,n)=>{const o=n(5622),r=n(3921),i=n(3376),s=n(8702),a=n(1006),c=(e,t,n=!1)=>{if(Array.isArray(e)){const o=e.map((e=>c(e,t,n)));return e=>{for(const t of o){const n=t(e);if(n)return n}return!1}}const o=(r=e)&&"object"==typeof r&&!Array.isArray(r)&&e.tokens&&e.input;var r;if(""===e||"string"!=typeof e&&!o)throw new TypeError("Expected pattern to be a non-empty string");const i=t||{},a=s.isWindows(t),u=o?c.compileRe(e,t):c.makeRe(e,t,!1,!0),l=u.state;delete u.state;let d=()=>!1;if(i.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};d=c(i.ignore,e,n)}const f=(n,o=!1)=>{const{isMatch:r,match:s,output:f}=c.test(n,u,t,{glob:e,posix:a}),h={glob:e,state:l,regex:u,posix:a,input:n,output:f,match:s,isMatch:r};return"function"==typeof i.onResult&&i.onResult(h),!1===r?(h.isMatch=!1,!!o&&h):d(n)?("function"==typeof i.onIgnore&&i.onIgnore(h),h.isMatch=!1,!!o&&h):("function"==typeof i.onMatch&&i.onMatch(h),!o||h)};return n&&(f.state=l),f};c.test=(e,t,n,{glob:o,posix:r}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const i=n||{},a=i.format||(r?s.toPosixSlashes:null);let u=e===o,l=u&&a?a(e):e;return!1===u&&(l=a?a(e):e,u=l===o),!1!==u&&!0!==i.capture||(u=!0===i.matchBase||!0===i.basename?c.matchBase(e,t,n,r):t.exec(l)),{isMatch:Boolean(u),match:u,output:l}},c.matchBase=(e,t,n,r=s.isWindows(n))=>(t instanceof RegExp?t:c.makeRe(t,n)).test(o.basename(e)),c.isMatch=(e,t,n)=>c(t,n)(e),c.parse=(e,t)=>Array.isArray(e)?e.map((e=>c.parse(e,t))):i(e,{...t,fastpaths:!1}),c.scan=(e,t)=>r(e,t),c.compileRe=(e,t,n=!1,o=!1)=>{if(!0===n)return e.output;const r=t||{},i=r.contains?"":"^",s=r.contains?"":"$";let a=`${i}(?:${e.output})${s}`;e&&!0===e.negated&&(a=`^(?!${a}).*$`);const u=c.toRegex(a,t);return!0===o&&(u.state=e),u},c.makeRe=(e,t={},n=!1,o=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let r={negated:!1,fastpaths:!0};return!1===t.fastpaths||"."!==e[0]&&"*"!==e[0]||(r.output=i.fastpaths(e,t)),r.output||(r=i(e,t)),c.compileRe(r,t,n,o)},c.toRegex=(e,t)=>{try{const n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},c.constants=a,e.exports=c},3921:(e,t,n)=>{const o=n(8702),{CHAR_ASTERISK:r,CHAR_AT:i,CHAR_BACKWARD_SLASH:s,CHAR_COMMA:a,CHAR_DOT:c,CHAR_EXCLAMATION_MARK:u,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:d,CHAR_LEFT_PARENTHESES:f,CHAR_LEFT_SQUARE_BRACKET:h,CHAR_PLUS:g,CHAR_QUESTION_MARK:p,CHAR_RIGHT_CURLY_BRACE:m,CHAR_RIGHT_PARENTHESES:y,CHAR_RIGHT_SQUARE_BRACKET:v}=n(1006),R=e=>e===l||e===s,b=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};e.exports=(e,t)=>{const n=t||{},k=e.length-1,_=!0===n.parts||!0===n.scanToEnd,w=[],D=[],C=[];let P,T,x=e,S=-1,E=0,L=0,q=!1,O=!1,A=!1,M=!1,N=!1,F=!1,I=!1,j=!1,W=!1,H=!1,$=0,U={value:"",depth:0,isGlob:!1};const z=()=>S>=k,K=()=>(P=T,x.charCodeAt(++S));for(;S<k;){let e;if(T=K(),T!==s){if(!0===F||T===d){for($++;!0!==z()&&(T=K());)if(T!==s)if(T!==d){if(!0!==F&&T===c&&(T=K())===c){if(q=U.isBrace=!0,A=U.isGlob=!0,H=!0,!0===_)continue;break}if(!0!==F&&T===a){if(q=U.isBrace=!0,A=U.isGlob=!0,H=!0,!0===_)continue;break}if(T===m&&($--,0===$)){F=!1,q=U.isBrace=!0,H=!0;break}}else $++;else I=U.backslashes=!0,K();if(!0===_)continue;break}if(T!==l){if(!0!==n.noext&&!0==(T===g||T===i||T===r||T===p||T===u)&&x.charCodeAt(S+1)===f){if(A=U.isGlob=!0,M=U.isExtglob=!0,H=!0,T===u&&S===E&&(W=!0),!0===_){for(;!0!==z()&&(T=K());)if(T!==s){if(T===y){A=U.isGlob=!0,H=!0;break}}else I=U.backslashes=!0,T=K();continue}break}if(T===r){if(P===r&&(N=U.isGlobstar=!0),A=U.isGlob=!0,H=!0,!0===_)continue;break}if(T===p){if(A=U.isGlob=!0,H=!0,!0===_)continue;break}if(T===h){for(;!0!==z()&&(e=K());)if(e!==s){if(e===v){O=U.isBracket=!0,A=U.isGlob=!0,H=!0;break}}else I=U.backslashes=!0,K();if(!0===_)continue;break}if(!0===n.nonegate||T!==u||S!==E){if(!0!==n.noparen&&T===f){if(A=U.isGlob=!0,!0===_){for(;!0!==z()&&(T=K());)if(T!==f){if(T===y){H=!0;break}}else I=U.backslashes=!0,T=K();continue}break}if(!0===A){if(H=!0,!0===_)continue;break}}else j=U.negated=!0,E++}else{if(w.push(S),D.push(U),U={value:"",depth:0,isGlob:!1},!0===H)continue;if(P===c&&S===E+1){E+=2;continue}L=S+1}}else I=U.backslashes=!0,T=K(),T===d&&(F=!0)}!0===n.noext&&(M=!1,A=!1);let B=x,V="",G="";E>0&&(V=x.slice(0,E),x=x.slice(E),L-=E),B&&!0===A&&L>0?(B=x.slice(0,L),G=x.slice(L)):!0===A?(B="",G=x):B=x,B&&""!==B&&"/"!==B&&B!==x&&R(B.charCodeAt(B.length-1))&&(B=B.slice(0,-1)),!0===n.unescape&&(G&&(G=o.removeBackslashes(G)),B&&!0===I&&(B=o.removeBackslashes(B)));const X={prefix:V,input:e,start:E,base:B,glob:G,isBrace:q,isBracket:O,isGlob:A,isExtglob:M,isGlobstar:N,negated:j,negatedExtglob:W};if(!0===n.tokens&&(X.maxDepth=0,R(T)||D.push(U),X.tokens=D),!0===n.parts||!0===n.tokens){let t;for(let o=0;o<w.length;o++){const r=t?t+1:E,i=w[o],s=e.slice(r,i);n.tokens&&(0===o&&0!==E?(D[o].isPrefix=!0,D[o].value=V):D[o].value=s,b(D[o]),X.maxDepth+=D[o].depth),0===o&&""===s||C.push(s),t=i}if(t&&t+1<e.length){const o=e.slice(t+1);C.push(o),n.tokens&&(D[D.length-1].value=o,b(D[D.length-1]),X.maxDepth+=D[D.length-1].depth)}X.slashes=w,X.parts=C}return X}},8702:(e,t,n)=>{const o=n(5622),r="win32"===process.platform,{REGEX_BACKSLASH:i,REGEX_REMOVE_BACKSLASH:s,REGEX_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_GLOBAL:c}=n(1006);t.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),t.hasRegexChars=e=>a.test(e),t.isRegexChar=e=>1===e.length&&t.hasRegexChars(e),t.escapeRegex=e=>e.replace(c,"\\$1"),t.toPosixSlashes=e=>e.replace(i,"/"),t.removeBackslashes=e=>e.replace(s,(e=>"\\"===e?"":e)),t.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);return 3===e.length&&e[0]>=9||8===e[0]&&e[1]>=10},t.isWindows=e=>e&&"boolean"==typeof e.windows?e.windows:!0===r||"\\"===o.sep,t.escapeLast=(e,n,o)=>{const r=e.lastIndexOf(n,o);return-1===r?e:"\\"===e[r-1]?t.escapeLast(e,n,r-1):`${e.slice(0,r)}\\${e.slice(r)}`},t.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},t.wrapOutput=(e,t={},n={})=>{let o=`${n.contains?"":"^"}(?:${e})${n.contains?"":"$"}`;return!0===t.negated&&(o=`(?:^(?!${o}).*$)`),o}},3870:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TraceFormat=t.TraceValues=t.Trace=t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=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.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=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(6525);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return c.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return c.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return c.ReadableStreamMessageReader}});const u=n(6654);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return u.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return u.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return u.WriteableStreamMessageWriter}});const l=n(1343);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return l.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return l.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return l.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return l.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return l.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return l.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return l.Trace}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return l.TraceValues}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return l.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return l.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return l.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return l.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return l.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return l.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return l.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return l.CancellationStrategy}});const d=n(147);t.RAL=d.default},3881:(e,t,n)=>{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||(t.CancellationToken={}));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)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=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,f,h,g,p,m,y,v,R,b,k,_,w;!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||(t.ProgressToken={})),function(e){e.type=new i.NotificationType("$/progress")}(d||(d={})),t.ProgressType=class{constructor(){}},function(e){e.is=function(e){return r.func(e)}}(f||(f={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"}(h=t.Trace||(t.Trace={})),(w=t.TraceValues||(t.TraceValues={})).Off="off",w.Messages="messages",w.Compact="compact",w.Verbose="verbose",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"}}}(h=t.Trace||(t.Trace={})),function(e){e.Text="text",e.JSON="json"}(t.TraceFormat||(t.TraceFormat={})),function(e){e.fromString=function(t){return r.string(t)&&"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(g=t.TraceFormat||(t.TraceFormat={})),function(e){e.type=new i.NotificationType("$/setTrace")}(p=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new i.NotificationType("$/logTrace")}(m=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(y=t.ConnectionErrors||(t.ConnectionErrors={}));class D extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,D.prototype)}}t.ConnectionError=D,function(e){e.is=function(e){const t=e;return t&&r.func(t.cancelUndispatched)}}(v=t.ConnectionStrategy||(t.ConnectionStrategy={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new c.CancellationTokenSource}),e.is=function(e){const t=e;return t&&r.func(t.createCancellationTokenSource)}}(R=t.CancellationReceiverStrategy||(t.CancellationReceiverStrategy={})),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)}}(b=t.CancellationSenderStrategy||(t.CancellationSenderStrategy={})),function(e){e.Message=Object.freeze({receiver:R.Message,sender:b.Message}),e.is=function(e){const t=e;return t&&R.is(t.receiver)&&b.is(t.sender)}}(k=t.CancellationStrategy||(t.CancellationStrategy={})),(t.ConnectionOptions||(t.ConnectionOptions={})).is=function(e){const t=e;return t&&(k.is(t.cancellationStrategy)||v.is(t.connectionStrategy))},function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(_||(_={})),t.createMessageConnection=function(e,n,v,R){const b=void 0!==v?v:t.NullLogger;let w=0,C=0,P=0;const T="2.0";let x;const S=new Map;let E;const L=new Map,q=new Map;let O,A,M=new s.LinkedMap,N=new Map,F=new Set,I=new Map,j=h.Off,W=g.Text,H=_.New;const $=new a.Emitter,U=new a.Emitter,z=new a.Emitter,K=new a.Emitter,B=new a.Emitter,V=R&&R.cancellationStrategy?R.cancellationStrategy:k.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 X(e){}function J(){return H===_.Listening}function Q(){return H===_.Closed}function Y(){return H===_.Disposed}function Z(){H!==_.New&&H!==_.Listening||(H=_.Closed,U.fire(void 0))}function ee(){O||0===M.size||(O=(0,o.default)().timer.setImmediate((()=>{O=void 0,function(){if(0===M.size)return;const e=M.shift();try{i.Message.isRequest(e)?function(e){if(Y())return;function t(t,o,r){const s={jsonrpc:T,id:e.id};t instanceof i.ResponseError?s.error=t.toJson():s.result=void 0===t?null:t,oe(s,o,r),n.write(s).catch((()=>b.error("Sending response failed.")))}function o(t,o,r){const i={jsonrpc:T,id:e.id,error:t.toJson()};oe(i,o,r),n.write(i).catch((()=>b.error("Sending response failed.")))}!function(e){if(j!==h.Off&&A)if(W===g.Text){let t;j!==h.Verbose&&j!==h.Compact||!e.params||(t=`Params: ${ne(e.params)}\n\n`),A.log(`Received request '${e.method} - (${e.id})'.`,t)}else ie("receive-request",e)}(e);const s=S.get(e.method);let a,c;s&&(a=s.type,c=s.handler);const u=Date.now();if(c||x){const s=e.id??String(Date.now()),l=V.receiver.createCancellationTokenSource(s);null!==e.id&&F.has(e.id)&&l.cancel(),null!==e.id&&I.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 x&&(d=x(e.method,e.params,l.token));const f=d;d?f.then?f.then((n=>{I.delete(s),t(n,e.method,u)}),(t=>{I.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)})):(I.delete(s),t(d,e.method,u)):(I.delete(s),function(t,o,r){void 0===t&&(t=null);const i={jsonrpc:T,id:e.id,result:t};oe(i,o,r),n.write(i).catch((()=>b.error("Sending response failed.")))}(d,e.method,u))}catch(n){I.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(Y())return;let t,n;if(e.method===u.type.method){const t=e.params.id;return F.delete(t),void re(e)}{const o=L.get(e.method);o&&(n=o.handler,t=o.type)}if(n||E)try{if(re(e),n)if(void 0===e.params)void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==i.ParameterStructures.byName&&b.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&&b.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&b.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${o.length} arguments`)),n(...o))}else void 0!==t&&t.parameterStructures===i.ParameterStructures.byPosition&&b.error(`Notification ${e.method} defines parameters by position but received parameters by name`),n(e.params);else E&&E(e.method,e.params)}catch(t){t.message?b.error(`Notification handler '${e.method}' failed with message: ${t.message}`):b.error(`Notification handler '${e.method}' failed unexpectedly.`)}else z.fire(e)}(e):i.Message.isResponse(e)?function(e){if(!Y())if(null===e.id)e.error?b.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):b.error("Received response message without id. No further error information provided.");else{const t=e.id,n=N.get(t);if(function(e,t){if(j!==h.Off&&A)if(W===g.Text){let n;if(j!==h.Verbose&&j!==h.Compact||(e.error&&e.error.data?n=`Error data: ${ne(e.error.data)}\n\n`:e.result?n=`Result: ${ne(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}).`:"";A.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${o}`,n)}else A.log(`Received response ${e.id} without active response promise.`,n)}else ie("receive-response",e)}(e,n),void 0!==n){N.delete(t);try{if(e.error){const t=e.error;n.reject(new i.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");n.resolve(e.result)}}catch(e){e.message?b.error(`Response handler '${n.method}' failed with message: ${e.message}`):b.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void b.error("Received empty message.");b.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=N.get(e);n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}finally{ee()}}()})))}e.onClose(Z),e.onError((function(e){$.fire([e,void 0,void 0])})),n.onClose(Z),n.onError((function(e){$.fire(e)}));const te=e=>{try{if(i.Message.isNotification(e)&&e.method===u.type.method){const t=e.params.id,o=G(t),r=M.get(o);if(i.Message.isRequest(r)){const i=R?.connectionStrategy,s=i&&i.cancelUndispatched?i.cancelUndispatched(r,X):void 0;if(s&&(void 0!==s.error||void 0!==s.result))return M.delete(o),I.delete(t),s.id=r.id,oe(s,e.method,Date.now()),void n.write(s).catch((()=>b.error("Sending response for canceled message failed.")))}const s=I.get(t);if(void 0!==s)return s.cancel(),void re(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-"+(++P).toString():"res-"+n.toString(),t):e.set("not-"+(++C).toString(),t)}(M,e)}finally{ee()}};function ne(e){if(null!=e)switch(j){case h.Verbose:return JSON.stringify(e,null,4);case h.Compact:return JSON.stringify(e);default:return}}function oe(e,t,n){if(j!==h.Off&&A)if(W===g.Text){let o;j!==h.Verbose&&j!==h.Compact||(e.error&&e.error.data?o=`Error data: ${ne(e.error.data)}\n\n`:e.result?o=`Result: ${ne(e.result)}\n\n`:void 0===e.error&&(o="No result returned.\n\n")),A.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,o)}else ie("send-response",e)}function re(e){if(j!==h.Off&&A&&e.method!==m.type.method)if(W===g.Text){let t;j!==h.Verbose&&j!==h.Compact||(t=e.params?`Params: ${ne(e.params)}\n\n`:"No parameters provided.\n\n"),A.log(`Received notification '${e.method}'.`,t)}else ie("receive-notification",e)}function ie(e,t){if(!A||j===h.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};A.log(n)}function se(){if(Q())throw new D(y.Closed,"Connection is closed.");if(Y())throw new D(y.Disposed,"Connection is disposed.")}function ae(e){return void 0===e?null:e}function ce(e){return null===e?void 0:e}function ue(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function le(e,t){switch(e){case i.ParameterStructures.auto:return ue(t)?ce(t):[ae(t)];case i.ParameterStructures.byName:if(!ue(t))throw new Error("Received parameters by name but param is not an object literal.");return ce(t);case i.ParameterStructures.byPosition:return[ae(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function de(e,t){let n;const o=e.numberOfParams;switch(o){case 0:n=void 0;break;case 1:n=le(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e<t.length&&e<o;e++)n.push(ae(t[e]));if(t.length<o)for(let e=t.length;e<o;e++)n.push(null)}return n}const fe={sendNotification:(e,...t)=>{let o,s;if(se(),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=le(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=>ae(e)))}}else{const n=t;o=e.method,s=de(e,n)}const a={jsonrpc:T,method:o,params:s};return function(e){if(j!==h.Off&&A)if(W===g.Text){let t;j!==h.Verbose&&j!==h.Compact||(t=e.params?`Params: ${ne(e.params)}\n\n`:"No parameters provided.\n\n"),A.log(`Sending notification '${e.method}'.`,t)}else ie("send-notification",e)}(a),n.write(a).catch((()=>b.error("Sending notification failed.")))},onNotification:(e,t)=>{let n;return se(),r.func(e)?E=e:t&&(r.string(e)?(n=e,L.set(e,{type:void 0,handler:t})):(n=e.method,L.set(e.method,{type:e,handler:t}))),{dispose:()=>{void 0!==n?L.delete(n):E=void 0}}},onProgress:(e,t,n)=>{if(q.has(t))throw new Error(`Progress handler for token ${t} already registered`);return q.set(t,n),{dispose:()=>{q.delete(t)}}},sendProgress:(e,t,n)=>fe.sendNotification(d.type,{token:t,value:n}),onUnhandledProgress:K.event,sendRequest:(e,...t)=>{let o,s,a;if(se(),function(){if(!J())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 f=d-u;switch(f){case 0:s=void 0;break;case 1:s=le(l,t[u]);break;default:if(l===i.ParameterStructures.byName)throw new Error(`Received ${f} parameters for 'by Name' request parameter structure.`);s=t.slice(u,d).map((e=>ae(e)))}}else{const n=t;o=e.method,s=de(e,n);const r=e.numberOfParams;a=c.CancellationToken.is(n[r])?n[r]:void 0}const u=w++;let l;return a&&(l=a.onCancellationRequested((()=>{const e=V.sender.sendCancellation(fe,u);return void 0===e?(b.log(`Received no promise from cancellation strategy when cancelling id ${u}`),Promise.resolve()):e.catch((()=>{b.log(`Sending cancellation messages for id ${u} failed`)}))}))),new Promise(((e,t)=>{const r={jsonrpc:T,id:u,method:o,params:s};let a={method:o,timerStart:Date.now(),resolve:t=>{e(t),V.sender.cleanup(u),l?.dispose()},reject:e=>{t(e),V.sender.cleanup(u),l?.dispose()}};!function(e){if(j!==h.Off&&A)if(W===g.Text){let t;j!==h.Verbose&&j!==h.Compact||!e.params||(t=`Params: ${ne(e.params)}\n\n`),A.log(`Sending request '${e.method} - (${e.id})'.`,t)}else ie("send-request",e)}(r);try{n.write(r).catch((()=>b.error("Sending request failed.")))}catch(e){a.reject(new i.ResponseError(i.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),a=null}a&&N.set(u,a)}))},onRequest:(e,t)=>{se();let n=null;return f.is(e)?(n=void 0,x=e):r.string(e)?(n=null,void 0!==t&&(n=e,S.set(e,{handler:t,type:void 0}))):void 0!==t&&(n=e.method,S.set(e.method,{type:e,handler:t})),{dispose:()=>{null!==n&&(void 0!==n?S.delete(n):x=void 0)}}},hasPendingResponse:()=>N.size>0,trace:async(e,t,n)=>{let o=!1,i=g.Text;void 0!==n&&(r.boolean(n)?o=n:(o=n.sendNotification||!1,i=n.traceFormat||g.Text)),j=e,W=i,A=j===h.Off?void 0:t,!o||Q()||Y()||await fe.sendNotification(p.type,{value:h.toString(e)})},onError:$.event,onClose:U.event,onUnhandledNotification:z.event,onDispose:B.event,end:()=>{n.end()},dispose:()=>{if(Y())return;H=_.Disposed,B.fire(void 0);const t=new i.ResponseError(i.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const e of N.values())e.reject(t);N=new Map,I=new Map,F=new Set,M=new s.LinkedMap,r.func(n.dispose)&&n.dispose(),r.func(e.dispose)&&e.dispose()},listen:()=>{se(),function(){if(J())throw new D(y.AlreadyListening,"Connection is already listening")}(),H=_.Listening,e.listen(te)},inspect:()=>{(0,o.default)().console.log("inspect")}};return fe.onNotification(m.type,(e=>{if(j===h.Off||!A)return;const t=j===h.Verbose||j===h.Compact;A.log(e.message,t?e.verbose:void 0)})),fe.onNotification(d.type,(e=>{const t=q.get(e.token);t?t(e.value):K.fire(e)})),fe}},3911:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,(t.Disposable||(t.Disposable={})).create=function(e){return{dispose:e}}},7135:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const o=n(147);!function(e){const t={dispose(){}};e.None=function(){return t}}(t.Event||(t.Event={}));class r{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 i{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,n)=>{this._callbacks||(this._callbacks=new r),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=i._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=i,i._noop=function(){}},7574:(e,t)=>{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)=>{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||(t.Touch={}));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)=>{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(){if(0===this._chunks.length)return;let e=0,t=0,n=0,o=0;e:for(;t<this._chunks.length;){const r=this._chunks[t];for(n=0;n<r.length;){switch(r[n]){case 13:switch(e){case 0:e=1;break;case 2:e=3;break;default:e=0}break;case 10:switch(e){case 1:e=2;break;case 3:e=4,n++;break e;default:e=0}break;default:e=0}n++}o+=r.byteLength,t++}if(4!==e)return;const r=this._read(o+n),i=new Map,s=this.toString(r,"ascii").split("\r\n");if(s.length<2)return i;for(let e=0;e<s.length-2;e++){const t=s[e],n=t.indexOf(":");if(-1===n)throw new Error("Message header must separate key and value using :");const o=t.substr(0,n),r=t.substr(n+1).trim();i.set(o,r)}return i}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)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const o=n(147),r=n(7574),i=n(7135);var s;(t.MessageReader||(t.MessageReader={})).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)};class a{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=a,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}}}(s||(s={})),t.ReadableStreamMessageReader=class extends a{constructor(e,t){super(),this.readable=e,this.options=s.fromOptions(t),this.buffer=(0,o.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0}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){for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders();if(!e)return;const t=e.get("Content-Length");if(!t)throw new Error("Header must provide a Content-Length property.");const n=parseInt(t);if(isNaN(n))throw new Error("Content-Length value must be a number.");this.nextMessageLength=n}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();let t;this.clearPartialMessageTimer(),this.nextMessageLength=-1,t=void 0!==this.options.contentDecoder?this.options.contentDecoder.decode(e):Promise.resolve(e),t.then((e=>{this.options.contentTypeDecoder.decode(e,this.options).then((e=>{this.callback(e)}),(e=>{this.fireError(e)}))}),(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)=>{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;(t.MessageWriter||(t.MessageWriter={})).is=function(e){let t=e;return t&&r.func(t.dispose)&&r.func(t.onClose)&&r.func(t.onError)&&r.func(t.write)};class c{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=c,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}}}(a||(a={})),t.WriteableStreamMessageWriter=class extends c{constructor(e,t){super(),this.writable=e,this.options=a.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)=>{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||(t.ErrorCodes={}));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)}},(i=t.Message||(t.Message={})).isRequest=function(e){const t=e;return t&&o.string(t.method)&&(o.string(t.id)||o.number(t.id))},i.isNotification=function(e){const t=e;return t&&o.string(t.method)&&void 0===e.id},i.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)}},147:(e,t)=>{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)=>{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()}}}},4389: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.__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.createServerSocketTransport=t.createClientSocketTransport=t.createServerPipeTransport=t.createClientPipeTransport=t.generateRandomPipeName=t.StreamMessageWriter=t.StreamMessageReader=t.SocketMessageWriter=t.SocketMessageReader=t.IPCMessageWriter=t.IPCMessageReader=void 0;const i=n(3034);i.default.install();const s=n(3870),a=n(5622),c=n(2087),u=n(6417),l=n(1631);r(n(3870),t);class d extends s.AbstractMessageReader{constructor(e){super(),this.process=e;let t=this.process;t.on("error",(e=>this.fireError(e))),t.on("close",(()=>this.fireClose()))}listen(e){return this.process.on("message",e),s.Disposable.create((()=>this.process.off("message",e)))}}t.IPCMessageReader=d;class f extends s.AbstractMessageWriter{constructor(e){super(),this.process=e,this.errorCount=0;let t=this.process;t.on("error",(e=>this.fireError(e))),t.on("close",(()=>this.fireClose))}write(e){try{return"function"==typeof this.process.send&&this.process.send(e,void 0,void 0,(t=>{t?(this.errorCount++,this.handleError(t,e)):this.errorCount=0})),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.IPCMessageWriter=f;class h extends s.ReadableStreamMessageReader{constructor(e,t="utf-8"){super((0,i.default)().stream.asReadableStream(e),t)}}t.SocketMessageReader=h;class g extends s.WriteableStreamMessageWriter{constructor(e,t){super((0,i.default)().stream.asWritableStream(e),t),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}}t.SocketMessageWriter=g;class p extends s.ReadableStreamMessageReader{constructor(e,t){super((0,i.default)().stream.asReadableStream(e),t)}}t.StreamMessageReader=p;class m extends s.WriteableStreamMessageWriter{constructor(e,t){super((0,i.default)().stream.asWritableStream(e),t)}}t.StreamMessageWriter=m;const y=process.env.XDG_RUNTIME_DIR,v=new Map([["linux",107],["darwin",103]]);t.generateRandomPipeName=function(){const e=(0,u.randomBytes)(21).toString("hex");if("win32"===process.platform)return`\\\\.\\pipe\\vscode-jsonrpc-${e}-sock`;let t;t=y?a.join(y,`vscode-ipc-${e}.sock`):a.join(c.tmpdir(),`vscode-${e}.sock`);const n=v.get(process.platform);return void 0!==n&&t.length>=n&&(0,i.default)().console.warn(`WARNING: IPC handle "${t}" is longer than ${n} characters.`),t},t.createClientPipeTransport=function(e,t="utf-8"){let n;const o=new Promise(((e,t)=>{n=e}));return new Promise(((r,i)=>{let s=(0,l.createServer)((e=>{s.close(),n([new h(e,t),new g(e,t)])}));s.on("error",i),s.listen(e,(()=>{s.removeListener("error",i),r({onConnected:()=>o})}))}))},t.createServerPipeTransport=function(e,t="utf-8"){const n=(0,l.createConnection)(e);return[new h(n,t),new g(n,t)]},t.createClientSocketTransport=function(e,t="utf-8"){let n;const o=new Promise(((e,t)=>{n=e}));return new Promise(((r,i)=>{const s=(0,l.createServer)((e=>{s.close(),n([new h(e,t),new g(e,t)])}));s.on("error",i),s.listen(e,"127.0.0.1",(()=>{s.removeListener("error",i),r({onConnected:()=>o})}))}))},t.createServerSocketTransport=function(e,t="utf-8"){const n=(0,l.createConnection)(e,"127.0.0.1");return[new h(n,t),new g(n,t)]},t.createMessageConnection=function(e,t,n,o){n||(n=s.NullLogger);const r=function(e){const t=e;return void 0!==t.read&&void 0!==t.addListener}(e)?new p(e):e,i=function(e){const t=e;return void 0!==t.write&&void 0!==t.addListener}(t)?new m(t):t;return s.ConnectionStrategy.is(o)&&(o={connectionStrategy:o}),(0,s.createMessageConnection)(r,i,n,o)}},3034:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const o=n(147),r=n(1669),i=n(3911),s=n(5530);class a extends s.AbstractMessageBuffer{constructor(e="utf-8"){super(e)}emptyBuffer(){return a.emptyBuffer}fromString(e,t){return Buffer.from(e,t)}toString(e,t){return e instanceof Buffer?e.toString(t):new r.TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e instanceof Buffer?e:Buffer.from(e):e instanceof Buffer?e.slice(0,t):Buffer.from(e,0,t)}allocNative(e){return Buffer.allocUnsafe(e)}}a.emptyBuffer=Buffer.allocUnsafe(0);class c{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),i.Disposable.create((()=>this.stream.off("close",e)))}onError(e){return this.stream.on("error",e),i.Disposable.create((()=>this.stream.off("error",e)))}onEnd(e){return this.stream.on("end",e),i.Disposable.create((()=>this.stream.off("end",e)))}onData(e){return this.stream.on("data",e),i.Disposable.create((()=>this.stream.off("data",e)))}}class u{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),i.Disposable.create((()=>this.stream.off("close",e)))}onError(e){return this.stream.on("error",e),i.Disposable.create((()=>this.stream.off("error",e)))}onEnd(e){return this.stream.on("end",e),i.Disposable.create((()=>this.stream.off("end",e)))}write(e,t){return new Promise(((n,o)=>{const r=e=>{null==e?n():o(e)};"string"==typeof e?this.stream.write(e,t,r):this.stream.write(e,r)}))}end(){this.stream.end()}}const l=Object.freeze({messageBuffer:Object.freeze({create:e=>new a(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(e){return Promise.reject(e)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new r.TextDecoder(t.charset).decode(e)))}catch(e){return Promise.reject(e)}}})}),stream:Object.freeze({asReadableStream:e=>new c(e),asWritableStream:e=>new u(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){const o=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(o)}},setImmediate(e,...t){const n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setInterval(e,t,...n){const o=setInterval(e,t,...n);return{dispose:()=>clearInterval(o)}}})});function d(){return l}!function(e){e.install=function(){o.default.install(l)}}(d||(d={})),t.default=d},5028:(e,t,n)=>{e.exports=n(4389)},1661: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.__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(4389),t),r(n(5882),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}}),(i=t.LSPErrorCodes||(t.LSPErrorCodes={})).lspReservedErrorRangeStart=-32899,i.RequestFailed=-32803,i.ServerCancelled=-32802,i.ContentModified=-32801,i.RequestCancelled=-32800,i.lspReservedErrorRangeEnd=-32800},3767:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const o=n(4389);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)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=void 0;const o=n(4389);t.RegistrationType=class{constructor(e){this.method=e}};class r extends o.RequestType0{constructor(e){super(e)}}t.ProtocolRequestType0=r;class i extends o.RequestType{constructor(e){super(e,o.ParameterStructures.byName)}}t.ProtocolRequestType=i;class s extends o.NotificationType0{constructor(e){super(e)}}t.ProtocolNotificationType0=s;class a extends o.NotificationType{constructor(e){super(e,o.ParameterStructures.byName)}}t.ProtocolNotificationType=a},2918:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const o=n(6140);var r,i,s;(s=t.CallHierarchyPrepareRequest||(t.CallHierarchyPrepareRequest={})).method="textDocument/prepareCallHierarchy",s.type=new o.ProtocolRequestType(s.method),(i=t.CallHierarchyIncomingCallsRequest||(t.CallHierarchyIncomingCallsRequest={})).method="callHierarchy/incomingCalls",i.type=new o.ProtocolRequestType(i.method),(r=t.CallHierarchyOutgoingCallsRequest||(t.CallHierarchyOutgoingCallsRequest={})).method="callHierarchy/outgoingCalls",r.type=new o.ProtocolRequestType(r.method)},3390:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const o=n(6140);var r;(r=t.DocumentColorRequest||(t.DocumentColorRequest={})).method="textDocument/documentColor",r.type=new o.ProtocolRequestType(r.method),(t.ColorPresentationRequest||(t.ColorPresentationRequest={})).type=new o.ProtocolRequestType("textDocument/colorPresentation")},5934:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const o=n(6140);(t.ConfigurationRequest||(t.ConfigurationRequest={})).type=new o.ProtocolRequestType("workspace/configuration")},764:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const o=n(6140);var r;(r=t.DeclarationRequest||(t.DeclarationRequest={})).method="textDocument/declaration",r.type=new o.ProtocolRequestType(r.method)},9824:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;const o=n(4389),r=n(9533),i=n(6140);var s,a,c,u;(t.DiagnosticServerCancellationData||(t.DiagnosticServerCancellationData={})).is=function(e){const t=e;return t&&r.boolean(t.retriggerRequest)},(u=t.DocumentDiagnosticReportKind||(t.DocumentDiagnosticReportKind={})).Full="full",u.Unchanged="unchanged",(c=t.DocumentDiagnosticRequest||(t.DocumentDiagnosticRequest={})).method="textDocument/diagnostic",c.type=new i.ProtocolRequestType(c.method),c.partialResult=new o.ProgressType,(a=t.WorkspaceDiagnosticRequest||(t.WorkspaceDiagnosticRequest={})).method="workspace/diagnostic",a.type=new i.ProtocolRequestType(a.method),a.partialResult=new o.ProgressType,(s=t.DiagnosticRefreshRequest||(t.DiagnosticRefreshRequest={})).method="workspace/diagnostic/refresh",s.type=new i.ProtocolRequestType0(s.method)},7846:(e,t,n)=>{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;(l=t.FileOperationPatternKind||(t.FileOperationPatternKind={})).file="file",l.folder="folder",(u=t.WillCreateFilesRequest||(t.WillCreateFilesRequest={})).method="workspace/willCreateFiles",u.type=new o.ProtocolRequestType(u.method),(c=t.DidCreateFilesNotification||(t.DidCreateFilesNotification={})).method="workspace/didCreateFiles",c.type=new o.ProtocolNotificationType(c.method),(a=t.WillRenameFilesRequest||(t.WillRenameFilesRequest={})).method="workspace/willRenameFiles",a.type=new o.ProtocolRequestType(a.method),(s=t.DidRenameFilesNotification||(t.DidRenameFilesNotification={})).method="workspace/didRenameFiles",s.type=new o.ProtocolNotificationType(s.method),(i=t.DidDeleteFilesNotification||(t.DidDeleteFilesNotification={})).method="workspace/didDeleteFiles",i.type=new o.ProtocolNotificationType(i.method),(r=t.WillDeleteFilesRequest||(t.WillDeleteFilesRequest={})).method="workspace/willDeleteFiles",r.type=new o.ProtocolRequestType(r.method)},3394:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRequest=void 0;const o=n(6140);var r;(r=t.FoldingRangeRequest||(t.FoldingRangeRequest={})).method="textDocument/foldingRange",r.type=new o.ProtocolRequestType(r.method)},2122:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const o=n(6140);var r;(r=t.ImplementationRequest||(t.ImplementationRequest={})).method="textDocument/implementation",r.type=new o.ProtocolRequestType(r.method)},9999:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;const o=n(6140);var r,i,s;(s=t.InlayHintRequest||(t.InlayHintRequest={})).method="textDocument/inlayHint",s.type=new o.ProtocolRequestType(s.method),(i=t.InlayHintResolveRequest||(t.InlayHintResolveRequest={})).method="inlayHint/resolve",i.type=new o.ProtocolRequestType(i.method),(r=t.InlayHintRefreshRequest||(t.InlayHintRefreshRequest={})).method="workspace/inlayHint/refresh",r.type=new o.ProtocolRequestType0(r.method)},5246:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;const o=n(6140);var r,i;(i=t.InlineValueRequest||(t.InlineValueRequest={})).method="textDocument/inlineValue",i.type=new o.ProtocolRequestType(i.method),(r=t.InlineValueRefreshRequest||(t.InlineValueRefreshRequest={})).method="workspace/inlineValue/refresh",r.type=new o.ProtocolRequestType0(r.method)},542:(e,t,n)=>{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.TypeHierarchySubtypesRequest=t.TypeHierarchyPrepareRequest=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.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.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolResolveRequest=void 0,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=void 0;const o=n(6140),r=n(5882),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(3390);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}});const f=n(764);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return f.DeclarationRequest}});const h=n(5206);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return h.SelectionRangeRequest}});const g=n(1862);Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return g.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return g.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return g.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 m=n(9434);Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return m.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return m.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return m.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return m.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return m.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return m.SemanticTokensRegistrationType}});const y=n(5726);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return y.ShowDocumentRequest}});const v=n(6305);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return v.LinkedEditingRangeRequest}});const R=n(7846);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return R.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return R.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return R.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return R.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return R.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return R.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return R.WillDeleteFilesRequest}});const b=n(3443);Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return b.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return b.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return b.MonikerRequest}});const k=n(3693);Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return k.TypeHierarchyPrepareRequest}}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return k.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return k.TypeHierarchySupertypesRequest}});const _=n(5246);Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return _.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return _.InlineValueRefreshRequest}});const w=n(9999);Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:function(){return w.InlayHintRequest}}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:function(){return w.InlayHintResolveRequest}}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return w.InlayHintRefreshRequest}});const D=n(9824);Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return D.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return D.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return D.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return D.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return D.DiagnosticRefreshRequest}});const C=n(7169);var P,T,x,S,E,L,q,O,A,M,N,F,I,j,W,H,$,U,z,K,B,V,G,X,J,Q,Y,Z,ee,te,ne,oe,re,ie,se,ae,ce,ue,le,de,fe,he,ge,pe;Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:function(){return C.NotebookCellKind}}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:function(){return C.ExecutionSummary}}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:function(){return C.NotebookCell}}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:function(){return C.NotebookDocument}}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return C.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return C.DidOpenNotebookDocumentNotification}}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:function(){return C.NotebookCellArrayChange}}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return C.DidChangeNotebookDocumentNotification}}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return C.DidSaveNotebookDocumentNotification}}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return C.DidCloseNotebookDocumentNotification}}),function(e){e.is=function(e){const t=e;return i.string(t.language)||i.string(t.scheme)||i.string(t.pattern)}}(P=t.TextDocumentFilter||(t.TextDocumentFilter={})),function(e){e.is=function(e){const t=e;return i.objectLiteral(t)&&(i.string(t.notebookType)||i.string(t.scheme)||i.string(t.pattern))}}(T=t.NotebookDocumentFilter||(t.NotebookDocumentFilter={})),function(e){e.is=function(e){const t=e;return i.objectLiteral(t)&&(i.string(t.notebook)||T.is(t.notebook))&&(void 0===t.language||i.string(t.language))}}(x=t.NotebookCellTextDocumentFilter||(t.NotebookCellTextDocumentFilter={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(let t of e)if(!i.string(t)&&!P.is(t)&&!x.is(t))return!1;return!0}}(S=t.DocumentSelector||(t.DocumentSelector={})),(t.RegistrationRequest||(t.RegistrationRequest={})).type=new o.ProtocolRequestType("client/registerCapability"),(t.UnregistrationRequest||(t.UnregistrationRequest={})).type=new o.ProtocolRequestType("client/unregisterCapability"),(pe=t.ResourceOperationKind||(t.ResourceOperationKind={})).Create="create",pe.Rename="rename",pe.Delete="delete",(ge=t.FailureHandlingKind||(t.FailureHandlingKind={})).Abort="abort",ge.Transactional="transactional",ge.TextOnlyTransactional="textOnlyTransactional",ge.Undo="undo",(he=t.PositionEncodingKind||(t.PositionEncodingKind={})).UTF8="utf-8",he.UTF16="utf-16",he.UTF32="utf-32",(t.StaticRegistrationOptions||(t.StaticRegistrationOptions={})).hasId=function(e){const t=e;return t&&i.string(t.id)&&t.id.length>0},(t.TextDocumentRegistrationOptions||(t.TextDocumentRegistrationOptions={})).is=function(e){const t=e;return t&&(null===t.documentSelector||S.is(t.documentSelector))},(fe=t.WorkDoneProgressOptions||(t.WorkDoneProgressOptions={})).is=function(e){const t=e;return i.objectLiteral(t)&&(void 0===t.workDoneProgress||i.boolean(t.workDoneProgress))},fe.hasWorkDoneProgress=function(e){const t=e;return t&&i.boolean(t.workDoneProgress)},(t.InitializeRequest||(t.InitializeRequest={})).type=new o.ProtocolRequestType("initialize"),(t.InitializeErrorCodes||(t.InitializeErrorCodes={})).unknownProtocolVersion=1,(t.InitializedNotification||(t.InitializedNotification={})).type=new o.ProtocolNotificationType("initialized"),(t.ShutdownRequest||(t.ShutdownRequest={})).type=new o.ProtocolRequestType0("shutdown"),(t.ExitNotification||(t.ExitNotification={})).type=new o.ProtocolNotificationType0("exit"),(t.DidChangeConfigurationNotification||(t.DidChangeConfigurationNotification={})).type=new o.ProtocolNotificationType("workspace/didChangeConfiguration"),(de=t.MessageType||(t.MessageType={})).Error=1,de.Warning=2,de.Info=3,de.Log=4,(t.ShowMessageNotification||(t.ShowMessageNotification={})).type=new o.ProtocolNotificationType("window/showMessage"),(t.ShowMessageRequest||(t.ShowMessageRequest={})).type=new o.ProtocolRequestType("window/showMessageRequest"),(t.LogMessageNotification||(t.LogMessageNotification={})).type=new o.ProtocolNotificationType("window/logMessage"),(t.TelemetryEventNotification||(t.TelemetryEventNotification={})).type=new o.ProtocolNotificationType("telemetry/event"),(le=t.TextDocumentSyncKind||(t.TextDocumentSyncKind={})).None=0,le.Full=1,le.Incremental=2,(ue=t.DidOpenTextDocumentNotification||(t.DidOpenTextDocumentNotification={})).method="textDocument/didOpen",ue.type=new o.ProtocolNotificationType(ue.method),(ce=t.TextDocumentContentChangeEvent||(t.TextDocumentContentChangeEvent={})).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)},ce.isFull=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength},(ae=t.DidChangeTextDocumentNotification||(t.DidChangeTextDocumentNotification={})).method="textDocument/didChange",ae.type=new o.ProtocolNotificationType(ae.method),(se=t.DidCloseTextDocumentNotification||(t.DidCloseTextDocumentNotification={})).method="textDocument/didClose",se.type=new o.ProtocolNotificationType(se.method),(ie=t.DidSaveTextDocumentNotification||(t.DidSaveTextDocumentNotification={})).method="textDocument/didSave",ie.type=new o.ProtocolNotificationType(ie.method),(re=t.TextDocumentSaveReason||(t.TextDocumentSaveReason={})).Manual=1,re.AfterDelay=2,re.FocusOut=3,(oe=t.WillSaveTextDocumentNotification||(t.WillSaveTextDocumentNotification={})).method="textDocument/willSave",oe.type=new o.ProtocolNotificationType(oe.method),(ne=t.WillSaveTextDocumentWaitUntilRequest||(t.WillSaveTextDocumentWaitUntilRequest={})).method="textDocument/willSaveWaitUntil",ne.type=new o.ProtocolRequestType(ne.method),(t.DidChangeWatchedFilesNotification||(t.DidChangeWatchedFilesNotification={})).type=new o.ProtocolNotificationType("workspace/didChangeWatchedFiles"),(te=t.FileChangeType||(t.FileChangeType={})).Created=1,te.Changed=2,te.Deleted=3,(t.RelativePattern||(t.RelativePattern={})).is=function(e){const t=e;return i.objectLiteral(t)&&(r.URI.is(t.baseUri)||r.WorkspaceFolder.is(t.baseUri))&&i.string(t.pattern)},(ee=t.WatchKind||(t.WatchKind={})).Create=1,ee.Change=2,ee.Delete=4,(t.PublishDiagnosticsNotification||(t.PublishDiagnosticsNotification={})).type=new o.ProtocolNotificationType("textDocument/publishDiagnostics"),(Z=t.CompletionTriggerKind||(t.CompletionTriggerKind={})).Invoked=1,Z.TriggerCharacter=2,Z.TriggerForIncompleteCompletions=3,(Y=t.CompletionRequest||(t.CompletionRequest={})).method="textDocument/completion",Y.type=new o.ProtocolRequestType(Y.method),(Q=t.CompletionResolveRequest||(t.CompletionResolveRequest={})).method="completionItem/resolve",Q.type=new o.ProtocolRequestType(Q.method),(J=t.HoverRequest||(t.HoverRequest={})).method="textDocument/hover",J.type=new o.ProtocolRequestType(J.method),(X=t.SignatureHelpTriggerKind||(t.SignatureHelpTriggerKind={})).Invoked=1,X.TriggerCharacter=2,X.ContentChange=3,(G=t.SignatureHelpRequest||(t.SignatureHelpRequest={})).method="textDocument/signatureHelp",G.type=new o.ProtocolRequestType(G.method),(V=t.DefinitionRequest||(t.DefinitionRequest={})).method="textDocument/definition",V.type=new o.ProtocolRequestType(V.method),(B=t.ReferencesRequest||(t.ReferencesRequest={})).method="textDocument/references",B.type=new o.ProtocolRequestType(B.method),(K=t.DocumentHighlightRequest||(t.DocumentHighlightRequest={})).method="textDocument/documentHighlight",K.type=new o.ProtocolRequestType(K.method),(z=t.DocumentSymbolRequest||(t.DocumentSymbolRequest={})).method="textDocument/documentSymbol",z.type=new o.ProtocolRequestType(z.method),(U=t.CodeActionRequest||(t.CodeActionRequest={})).method="textDocument/codeAction",U.type=new o.ProtocolRequestType(U.method),($=t.CodeActionResolveRequest||(t.CodeActionResolveRequest={})).method="codeAction/resolve",$.type=new o.ProtocolRequestType($.method),(H=t.WorkspaceSymbolRequest||(t.WorkspaceSymbolRequest={})).method="workspace/symbol",H.type=new o.ProtocolRequestType(H.method),(W=t.WorkspaceSymbolResolveRequest||(t.WorkspaceSymbolResolveRequest={})).method="workspaceSymbol/resolve",W.type=new o.ProtocolRequestType(W.method),(j=t.CodeLensRequest||(t.CodeLensRequest={})).method="textDocument/codeLens",j.type=new o.ProtocolRequestType(j.method),(I=t.CodeLensResolveRequest||(t.CodeLensResolveRequest={})).method="codeLens/resolve",I.type=new o.ProtocolRequestType(I.method),(F=t.CodeLensRefreshRequest||(t.CodeLensRefreshRequest={})).method="workspace/codeLens/refresh",F.type=new o.ProtocolRequestType0(F.method),(N=t.DocumentLinkRequest||(t.DocumentLinkRequest={})).method="textDocument/documentLink",N.type=new o.ProtocolRequestType(N.method),(M=t.DocumentLinkResolveRequest||(t.DocumentLinkResolveRequest={})).method="documentLink/resolve",M.type=new o.ProtocolRequestType(M.method),(A=t.DocumentFormattingRequest||(t.DocumentFormattingRequest={})).method="textDocument/formatting",A.type=new o.ProtocolRequestType(A.method),(O=t.DocumentRangeFormattingRequest||(t.DocumentRangeFormattingRequest={})).method="textDocument/rangeFormatting",O.type=new o.ProtocolRequestType(O.method),(q=t.DocumentOnTypeFormattingRequest||(t.DocumentOnTypeFormattingRequest={})).method="textDocument/onTypeFormatting",q.type=new o.ProtocolRequestType(q.method),(t.PrepareSupportDefaultBehavior||(t.PrepareSupportDefaultBehavior={})).Identifier=1,(L=t.RenameRequest||(t.RenameRequest={})).method="textDocument/rename",L.type=new o.ProtocolRequestType(L.method),(E=t.PrepareRenameRequest||(t.PrepareRenameRequest={})).method="textDocument/prepareRename",E.type=new o.ProtocolRequestType(E.method),(t.ExecuteCommandRequest||(t.ExecuteCommandRequest={})).type=new o.ProtocolRequestType("workspace/executeCommand"),(t.ApplyWorkspaceEditRequest||(t.ApplyWorkspaceEditRequest={})).type=new o.ProtocolRequestType("workspace/applyEdit")},6305:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const o=n(6140);var r;(r=t.LinkedEditingRangeRequest||(t.LinkedEditingRangeRequest={})).method="textDocument/linkedEditingRange",r.type=new o.ProtocolRequestType(r.method)},3443:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const o=n(6140);var r,i,s;(s=t.UniquenessLevel||(t.UniquenessLevel={})).document="document",s.project="project",s.group="group",s.scheme="scheme",s.global="global",(i=t.MonikerKind||(t.MonikerKind={})).$import="import",i.$export="export",i.local="local",(r=t.MonikerRequest||(t.MonikerRequest={})).method="textDocument/moniker",r.type=new o.ProtocolRequestType(r.method)},7169:(e,t,n)=>{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(5882),r=n(9533),i=n(6140);var s,a,c,u,l,d,f,h,g,p;!function(e){e.Markup=1,e.Code=2,e.is=function(e){return 1===e||2===e}}(s=t.NotebookCellKind||(t.NotebookCellKind={})),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||(t.ExecutionSummary={})),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||(t.NotebookCell={})),(p=t.NotebookDocument||(t.NotebookDocument={})).create=function(e,t,n,o){return{uri:e,notebookType:t,version:n,cells:o}},p.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)},(g=t.NotebookDocumentSyncRegistrationType||(t.NotebookDocumentSyncRegistrationType={})).method="notebookDocument/sync",g.type=new i.RegistrationType(g.method),(h=t.DidOpenNotebookDocumentNotification||(t.DidOpenNotebookDocumentNotification={})).method="notebookDocument/didOpen",h.type=new i.ProtocolNotificationType(h.method),(f=t.NotebookCellArrayChange||(t.NotebookCellArrayChange={})).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))},f.create=function(e,t,n){const o={start:e,deleteCount:t};return void 0!==n&&(o.cells=n),o},(d=t.DidChangeNotebookDocumentNotification||(t.DidChangeNotebookDocumentNotification={})).method="notebookDocument/didChange",d.type=new i.ProtocolNotificationType(d.method),(l=t.DidSaveNotebookDocumentNotification||(t.DidSaveNotebookDocumentNotification={})).method="notebookDocument/didSave",l.type=new i.ProtocolNotificationType(l.method),(u=t.DidCloseNotebookDocumentNotification||(t.DidCloseNotebookDocumentNotification={})).method="notebookDocument/didClose",u.type=new i.ProtocolNotificationType(u.method)},1862:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;const o=n(4389),r=n(6140);var i,s,a;(a=t.WorkDoneProgress||(t.WorkDoneProgress={})).type=new o.ProgressType,a.is=function(e){return e===a.type},(s=t.WorkDoneProgressCreateRequest||(t.WorkDoneProgressCreateRequest={})).method="window/workDoneProgress/create",s.type=new r.ProtocolRequestType(s.method),(i=t.WorkDoneProgressCancelNotification||(t.WorkDoneProgressCancelNotification={})).method="window/workDoneProgress/cancel",i.type=new r.ProtocolNotificationType(i.method)},5206:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const o=n(6140);var r;(r=t.SelectionRangeRequest||(t.SelectionRangeRequest={})).method="textDocument/selectionRange",r.type=new o.ProtocolRequestType(r.method)},9434:(e,t,n)=>{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;(t.TokenFormat||(t.TokenFormat={})).Relative="relative",(c=t.SemanticTokensRegistrationType||(t.SemanticTokensRegistrationType={})).method="textDocument/semanticTokens",c.type=new o.RegistrationType(c.method),(a=t.SemanticTokensRequest||(t.SemanticTokensRequest={})).method="textDocument/semanticTokens/full",a.type=new o.ProtocolRequestType(a.method),(s=t.SemanticTokensDeltaRequest||(t.SemanticTokensDeltaRequest={})).method="textDocument/semanticTokens/full/delta",s.type=new o.ProtocolRequestType(s.method),(i=t.SemanticTokensRangeRequest||(t.SemanticTokensRangeRequest={})).method="textDocument/semanticTokens/range",i.type=new o.ProtocolRequestType(i.method),(r=t.SemanticTokensRefreshRequest||(t.SemanticTokensRefreshRequest={})).method="workspace/semanticTokens/refresh",r.type=new o.ProtocolRequestType0(r.method)},5726:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const o=n(6140);var r;(r=t.ShowDocumentRequest||(t.ShowDocumentRequest={})).method="window/showDocument",r.type=new o.ProtocolRequestType(r.method)},1589:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const o=n(6140);var r;(r=t.TypeDefinitionRequest||(t.TypeDefinitionRequest={})).method="textDocument/typeDefinition",r.type=new o.ProtocolRequestType(r.method)},3693:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;const o=n(6140);var r,i,s;(s=t.TypeHierarchyPrepareRequest||(t.TypeHierarchyPrepareRequest={})).method="textDocument/prepareTypeHierarchy",s.type=new o.ProtocolRequestType(s.method),(i=t.TypeHierarchySupertypesRequest||(t.TypeHierarchySupertypesRequest={})).method="typeHierarchy/supertypes",i.type=new o.ProtocolRequestType(i.method),(r=t.TypeHierarchySubtypesRequest||(t.TypeHierarchySubtypesRequest={})).method="typeHierarchy/subtypes",r.type=new o.ProtocolRequestType(r.method)},8744:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const o=n(6140);(t.WorkspaceFoldersRequest||(t.WorkspaceFoldersRequest={})).type=new o.ProtocolRequestType0("workspace/workspaceFolders"),(t.DidChangeWorkspaceFoldersNotification||(t.DidChangeWorkspaceFoldersNotification={})).type=new o.ProtocolNotificationType("workspace/didChangeWorkspaceFolders")},9533:(e,t)=>{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}},273: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.__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(5028);r(n(5028),t),r(n(1661),t),t.createProtocolConnection=function(e,t,n,o){return(0,i.createMessageConnection)(e,t,n,o)}},6560:(e,t,n)=>{e.exports=n(273)},5882:(e,t,n)=>{var o,r,i,s,a,c,u,l,d,f,h,g,p,m,y,v,R,b,k,_,w,D,C,P,T,x,S,E;n.r(t),n.d(t,{DocumentUri:()=>o,URI:()=>r,integer:()=>i,uinteger:()=>s,Position:()=>a,Range:()=>c,Location:()=>u,LocationLink:()=>l,Color:()=>d,ColorInformation:()=>f,ColorPresentation:()=>h,FoldingRangeKind:()=>g,FoldingRange:()=>p,DiagnosticRelatedInformation:()=>m,DiagnosticSeverity:()=>y,DiagnosticTag:()=>v,CodeDescription:()=>R,Diagnostic:()=>b,Command:()=>k,TextEdit:()=>_,ChangeAnnotation:()=>w,ChangeAnnotationIdentifier:()=>D,AnnotatedTextEdit:()=>C,TextDocumentEdit:()=>P,CreateFile:()=>T,RenameFile:()=>x,DeleteFile:()=>S,WorkspaceEdit:()=>E,WorkspaceChange:()=>we,TextDocumentIdentifier:()=>L,VersionedTextDocumentIdentifier:()=>q,OptionalVersionedTextDocumentIdentifier:()=>O,TextDocumentItem:()=>A,MarkupKind:()=>M,MarkupContent:()=>N,CompletionItemKind:()=>F,InsertTextFormat:()=>I,CompletionItemTag:()=>j,InsertReplaceEdit:()=>W,InsertTextMode:()=>H,CompletionItemLabelDetails:()=>$,CompletionItem:()=>U,CompletionList:()=>z,MarkedString:()=>K,Hover:()=>B,ParameterInformation:()=>V,SignatureInformation:()=>G,DocumentHighlightKind:()=>X,DocumentHighlight:()=>J,SymbolKind:()=>Q,SymbolTag:()=>Y,SymbolInformation:()=>Z,WorkspaceSymbol:()=>ee,DocumentSymbol:()=>te,CodeActionKind:()=>ne,CodeActionTriggerKind:()=>oe,CodeActionContext:()=>re,CodeAction:()=>ie,CodeLens:()=>se,FormattingOptions:()=>ae,DocumentLink:()=>ce,SelectionRange:()=>ue,SemanticTokenTypes:()=>le,SemanticTokenModifiers:()=>de,SemanticTokens:()=>fe,InlineValueText:()=>he,InlineValueVariableLookup:()=>ge,InlineValueEvaluatableExpression:()=>pe,InlineValueContext:()=>me,InlayHintKind:()=>ye,InlayHintLabelPart:()=>ve,InlayHint:()=>Re,WorkspaceFolder:()=>be,EOL:()=>Ce,TextDocument:()=>De}),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){var t=e;return Pe.objectLiteral(t)&&Pe.uinteger(t.line)&&Pe.uinteger(t.character)}}(a||(a={})),function(e){e.create=function(e,t,n,o){if(Pe.uinteger(e)&&Pe.uinteger(t)&&Pe.uinteger(n)&&Pe.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[".concat(e,", ").concat(t,", ").concat(n,", ").concat(o,"]"))},e.is=function(e){var t=e;return Pe.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){var t=e;return Pe.defined(t)&&c.is(t.range)&&(Pe.string(t.uri)||Pe.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){var t=e;return Pe.defined(t)&&c.is(t.targetRange)&&Pe.string(t.targetUri)&&c.is(t.targetSelectionRange)&&(c.is(t.originSelectionRange)||Pe.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){var t=e;return Pe.objectLiteral(t)&&Pe.numberRange(t.red,0,1)&&Pe.numberRange(t.green,0,1)&&Pe.numberRange(t.blue,0,1)&&Pe.numberRange(t.alpha,0,1)}}(d||(d={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return Pe.objectLiteral(t)&&c.is(t.range)&&d.is(t.color)}}(f||(f={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){var t=e;return Pe.objectLiteral(t)&&Pe.string(t.label)&&(Pe.undefined(t.textEdit)||_.is(t))&&(Pe.undefined(t.additionalTextEdits)||Pe.typedArray(t.additionalTextEdits,_.is))}}(h||(h={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(g||(g={})),function(e){e.create=function(e,t,n,o,r,i){var s={startLine:e,endLine:t};return Pe.defined(n)&&(s.startCharacter=n),Pe.defined(o)&&(s.endCharacter=o),Pe.defined(r)&&(s.kind=r),Pe.defined(i)&&(s.collapsedText=i),s},e.is=function(e){var t=e;return Pe.objectLiteral(t)&&Pe.uinteger(t.startLine)&&Pe.uinteger(t.startLine)&&(Pe.undefined(t.startCharacter)||Pe.uinteger(t.startCharacter))&&(Pe.undefined(t.endCharacter)||Pe.uinteger(t.endCharacter))&&(Pe.undefined(t.kind)||Pe.string(t.kind))}}(p||(p={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return Pe.defined(t)&&u.is(t.location)&&Pe.string(t.message)}}(m||(m={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(y||(y={})),function(e){e.Unnecessary=1,e.Deprecated=2}(v||(v={})),function(e){e.is=function(e){var t=e;return Pe.objectLiteral(t)&&Pe.string(t.href)}}(R||(R={})),function(e){e.create=function(e,t,n,o,r,i){var s={range:e,message:t};return Pe.defined(n)&&(s.severity=n),Pe.defined(o)&&(s.code=o),Pe.defined(r)&&(s.source=r),Pe.defined(i)&&(s.relatedInformation=i),s},e.is=function(e){var t,n=e;return Pe.defined(n)&&c.is(n.range)&&Pe.string(n.message)&&(Pe.number(n.severity)||Pe.undefined(n.severity))&&(Pe.integer(n.code)||Pe.string(n.code)||Pe.undefined(n.code))&&(Pe.undefined(n.codeDescription)||Pe.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(Pe.string(n.source)||Pe.undefined(n.source))&&(Pe.undefined(n.relatedInformation)||Pe.typedArray(n.relatedInformation,m.is))}}(b||(b={})),function(e){e.create=function(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var r={title:e,command:t};return Pe.defined(n)&&n.length>0&&(r.arguments=n),r},e.is=function(e){var t=e;return Pe.defined(t)&&Pe.string(t.title)&&Pe.string(t.command)}}(k||(k={})),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){var t=e;return Pe.objectLiteral(t)&&Pe.string(t.newText)&&c.is(t.range)}}(_||(_={})),function(e){e.create=function(e,t,n){var o={label:e};return void 0!==t&&(o.needsConfirmation=t),void 0!==n&&(o.description=n),o},e.is=function(e){var t=e;return Pe.objectLiteral(t)&&Pe.string(t.label)&&(Pe.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Pe.string(t.description)||void 0===t.description)}}(w||(w={})),function(e){e.is=function(e){var t=e;return Pe.string(t)}}(D||(D={})),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){var t=e;return _.is(t)&&(w.is(t.annotationId)||D.is(t.annotationId))}}(C||(C={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return Pe.defined(t)&&O.is(t.textDocument)&&Array.isArray(t.edits)}}(P||(P={})),function(e){e.create=function(e,t,n){var 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){var t=e;return t&&"create"===t.kind&&Pe.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Pe.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Pe.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||D.is(t.annotationId))}}(T||(T={})),function(e){e.create=function(e,t,n,o){var 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){var t=e;return t&&"rename"===t.kind&&Pe.string(t.oldUri)&&Pe.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Pe.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Pe.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||D.is(t.annotationId))}}(x||(x={})),function(e){e.create=function(e,t,n){var 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){var t=e;return t&&"delete"===t.kind&&Pe.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Pe.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Pe.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||D.is(t.annotationId))}}(S||(S={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return Pe.string(e.kind)?T.is(e)||x.is(e)||S.is(e):P.is(e)})))}}(E||(E={}));var L,q,O,A,M,N,F,I,j,W,H,$,U,z,K,B,V,G,X,J,Q,Y,Z,ee,te,ne,oe,re,ie,se,ae,ce,ue,le,de,fe,he,ge,pe,me,ye,ve,Re,be,ke=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,n){var o,r;if(void 0===n?o=_.insert(e,t):D.is(n)?(r=n,o=C.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(n),o=C.insert(e,t,r)),this.edits.push(o),void 0!==r)return r},e.prototype.replace=function(e,t,n){var o,r;if(void 0===n?o=_.replace(e,t):D.is(n)?(r=n,o=C.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(n),o=C.replace(e,t,r)),this.edits.push(o),void 0!==r)return r},e.prototype.delete=function(e,t){var n,o;if(void 0===t?n=_.del(e):D.is(t)?(o=t,n=C.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(t),n=C.del(e,o)),this.edits.push(n),void 0!==o)return o},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),_e=function(){function e(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(e,t){var n;if(D.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error("Id ".concat(n," is already in use."));if(void 0===t)throw new Error("No annotation provided for id ".concat(n));return this._annotations[n]=t,this._size++,n},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}(),we=function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new _e(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(P.is(e)){var n=new ke(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}}))):e.changes&&Object.keys(e.changes).forEach((function(n){var o=new ke(e.changes[n]);t._textEditChanges[n]=o}))):this._workspaceEdit={}}return Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(e){if(O.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version};if(!(o=this._textEditChanges[t.uri])){var n={textDocument:t,edits:r=[]};this._workspaceEdit.documentChanges.push(n),o=new ke(r,this._changeAnnotations),this._textEditChanges[t.uri]=o}return o}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var o;if(!(o=this._textEditChanges[e])){var r=[];this._workspaceEdit.changes[e]=r,o=new ke(r),this._textEditChanges[e]=o}return o},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new _e,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var o,r,i;if(w.is(t)||D.is(t)?o=t:n=t,void 0===o?r=T.create(e,n):(i=D.is(o)?o:this._changeAnnotations.manage(o),r=T.create(e,n,i)),this._workspaceEdit.documentChanges.push(r),void 0!==i)return i},e.prototype.renameFile=function(e,t,n,o){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,i,s;if(w.is(n)||D.is(n)?r=n:o=n,void 0===r?i=x.create(e,t,o):(s=D.is(r)?r:this._changeAnnotations.manage(r),i=x.create(e,t,o,s)),this._workspaceEdit.documentChanges.push(i),void 0!==s)return s},e.prototype.deleteFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var o,r,i;if(w.is(t)||D.is(t)?o=t:n=t,void 0===o?r=S.create(e,n):(i=D.is(o)?o:this._changeAnnotations.manage(o),r=S.create(e,n,i)),this._workspaceEdit.documentChanges.push(r),void 0!==i)return i},e}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return Pe.defined(t)&&Pe.string(t.uri)}}(L||(L={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return Pe.defined(t)&&Pe.string(t.uri)&&Pe.integer(t.version)}}(q||(q={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return Pe.defined(t)&&Pe.string(t.uri)&&(null===t.version||Pe.integer(t.version))}}(O||(O={})),function(e){e.create=function(e,t,n,o){return{uri:e,languageId:t,version:n,text:o}},e.is=function(e){var t=e;return Pe.defined(t)&&Pe.string(t.uri)&&Pe.string(t.languageId)&&Pe.integer(t.version)&&Pe.string(t.text)}}(A||(A={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(M||(M={})),function(e){e.is=function(e){var t=e;return Pe.objectLiteral(e)&&M.is(t.kind)&&Pe.string(t.value)}}(N||(N={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(F||(F={})),function(e){e.PlainText=1,e.Snippet=2}(I||(I={})),function(e){e.Deprecated=1}(j||(j={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){var t=e;return t&&Pe.string(t.newText)&&c.is(t.insert)&&c.is(t.replace)}}(W||(W={})),function(e){e.asIs=1,e.adjustIndentation=2}(H||(H={})),function(e){e.is=function(e){var t=e;return t&&(Pe.string(t.detail)||void 0===t.detail)&&(Pe.string(t.description)||void 0===t.description)}}($||($={})),function(e){e.create=function(e){return{label:e}}}(U||(U={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(z||(z={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return Pe.string(t)||Pe.objectLiteral(t)&&Pe.string(t.language)&&Pe.string(t.value)}}(K||(K={})),function(e){e.is=function(e){var t=e;return!!t&&Pe.objectLiteral(t)&&(N.is(t.contents)||K.is(t.contents)||Pe.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}}}(V||(V={})),function(e){e.create=function(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var r={label:e};return Pe.defined(t)&&(r.documentation=t),Pe.defined(n)?r.parameters=n:r.parameters=[],r}}(G||(G={})),function(e){e.Text=1,e.Read=2,e.Write=3}(X||(X={})),function(e){e.create=function(e,t){var n={range:e};return Pe.number(t)&&(n.kind=t),n}}(J||(J={})),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}(Q||(Q={})),function(e){e.Deprecated=1}(Y||(Y={})),function(e){e.create=function(e,t,n,o,r){var i={name:e,kind:t,location:{uri:o,range:n}};return r&&(i.containerName=r),i}}(Z||(Z={})),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){var s={name:e,detail:t,kind:n,range:o,selectionRange:r};return void 0!==i&&(s.children=i),s},e.is=function(e){var t=e;return t&&Pe.string(t.name)&&Pe.number(t.kind)&&c.is(t.range)&&c.is(t.selectionRange)&&(void 0===t.detail||Pe.string(t.detail))&&(void 0===t.deprecated||Pe.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){var o={diagnostics:e};return null!=t&&(o.only=t),null!=n&&(o.triggerKind=n),o},e.is=function(e){var t=e;return Pe.defined(t)&&Pe.typedArray(t.diagnostics,b.is)&&(void 0===t.only||Pe.typedArray(t.only,Pe.string))&&(void 0===t.triggerKind||t.triggerKind===oe.Invoked||t.triggerKind===oe.Automatic)}}(re||(re={})),function(e){e.create=function(e,t,n){var o={title:e},r=!0;return"string"==typeof t?(r=!1,o.kind=t):k.is(t)?o.command=t:o.edit=t,r&&void 0!==n&&(o.kind=n),o},e.is=function(e){var t=e;return t&&Pe.string(t.title)&&(void 0===t.diagnostics||Pe.typedArray(t.diagnostics,b.is))&&(void 0===t.kind||Pe.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||k.is(t.command))&&(void 0===t.isPreferred||Pe.boolean(t.isPreferred))&&(void 0===t.edit||E.is(t.edit))}}(ie||(ie={})),function(e){e.create=function(e,t){var n={range:e};return Pe.defined(t)&&(n.data=t),n},e.is=function(e){var t=e;return Pe.defined(t)&&c.is(t.range)&&(Pe.undefined(t.command)||k.is(t.command))}}(se||(se={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){var t=e;return Pe.defined(t)&&Pe.uinteger(t.tabSize)&&Pe.boolean(t.insertSpaces)}}(ae||(ae={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){var t=e;return Pe.defined(t)&&c.is(t.range)&&(Pe.undefined(t.target)||Pe.string(t.target))}}(ce||(ce={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){var n=t;return Pe.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){var t=e;return Pe.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(fe||(fe={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){var t=e;return null!=t&&c.is(t.range)&&Pe.string(t.text)}}(he||(he={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){var t=e;return null!=t&&c.is(t.range)&&Pe.boolean(t.caseSensitiveLookup)&&(Pe.string(t.variableName)||void 0===t.variableName)}}(ge||(ge={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){var t=e;return null!=t&&c.is(t.range)&&(Pe.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){var t=e;return Pe.defined(t)&&c.is(e.stoppedLocation)}}(me||(me={})),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){var t=e;return Pe.objectLiteral(t)&&(void 0===t.tooltip||Pe.string(t.tooltip)||N.is(t.tooltip))&&(void 0===t.location||u.is(t.location))&&(void 0===t.command||k.is(t.command))}}(ve||(ve={})),function(e){e.create=function(e,t,n){var o={position:e,label:t};return void 0!==n&&(o.kind=n),o},e.is=function(e){var t=e;return Pe.objectLiteral(t)&&a.is(t.position)&&(Pe.string(t.label)||Pe.typedArray(t.label,ve.is))&&(void 0===t.kind||ye.is(t.kind))&&void 0===t.textEdits||Pe.typedArray(t.textEdits,_.is)&&(void 0===t.tooltip||Pe.string(t.tooltip)||N.is(t.tooltip))&&(void 0===t.paddingLeft||Pe.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Pe.boolean(t.paddingRight))}}(Re||(Re={})),function(e){e.is=function(e){var t=e;return Pe.objectLiteral(t)&&r.is(t.uri)&&Pe.string(t.name)}}(be||(be={}));var De,Ce=["\n","\r\n","\r"];!function(e){function t(e,n){if(e.length<=1)return e;var o=e.length/2|0,r=e.slice(0,o),i=e.slice(o);t(r,n),t(i,n);for(var s=0,a=0,c=0;s<r.length&&a<i.length;){var u=n(r[s],i[a]);e[c++]=u<=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 Te(e,t,n,o)},e.is=function(e){var t=e;return!!(Pe.defined(t)&&Pe.string(t.uri)&&(Pe.undefined(t.languageId)||Pe.string(t.languageId))&&Pe.uinteger(t.lineCount)&&Pe.func(t.getText)&&Pe.func(t.positionAt)&&Pe.func(t.offsetAt))},e.applyEdits=function(e,n){for(var o=e.getText(),r=t(n,(function(e,t){var n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),i=o.length,s=r.length-1;s>=0;s--){var a=r[s],c=e.offsetAt(a.range.start),u=e.offsetAt(a.range.end);if(!(u<=i))throw new Error("Overlapping edit");o=o.substring(0,c)+a.newText+o.substring(u,o.length),i=c}return o}}(De||(De={}));var Pe,Te=function(){function e(e,t,n,o){this._uri=e,this._languageId=t,this._version=n,this._content=o,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,n=!0,o=0;o<t.length;o++){n&&(e.push(o),n=!1);var 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},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,o=t.length;if(0===o)return a.create(0,e);for(;n<o;){var r=Math.floor((n+o)/2);t[r]>e?o=r:n=r+1}var i=n-1;return a.create(i,e-t[i])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var 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)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e}();!function(e){var 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)}}(Pe||(Pe={}))},6813:(e,t,n)=>{n.r(t),n.d(t,{TextDocument:()=>r});class o{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(o.isIncremental(t)){const e=a(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 c=this._lineOffsets;const u=s(t.text,!1,n);if(i-r===u.length)for(let e=0,t=u.length;e<t;e++)c[e+r+1]=u[e];else u.length<1e4?c.splice(r+1,i-r,...u):this._lineOffsets=c=c.slice(0,r+1).concat(u,c.slice(i+1));const l=t.text.length-(o-n);if(0!==l)for(let e=r+1+u.length,t=c.length;e<t;e++)c[e]=c[e]+l}else{if(!o.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=s(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}}var r;function i(e,t){if(e.length<=1)return e;const n=e.length/2|0,o=e.slice(0,n),r=e.slice(n);i(o,t),i(r,t);let s=0,a=0,c=0;for(;s<o.length&&a<r.length;){let n=t(o[s],r[a]);e[c++]=n<=0?o[s++]:r[a++]}for(;s<o.length;)e[c++]=o[s++];for(;a<r.length;)e[c++]=r[a++];return e}function s(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 a(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 c(e){const t=a(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,n,r){return new o(e,t,n,r)},e.update=function(e,t,n){if(e instanceof o)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=i(t.map(c),((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 s=[];for(const t of o){let o=e.offsetAt(t.range.start);if(o<r)throw new Error("Overlapping edit");o>r&&s.push(n.substring(r,o)),t.newText.length&&s.push(t.newText),r=e.offsetAt(t.range.end)}return s.push(n.substr(r)),s.join("")}}(r||(r={}))},1674:(e,t,n)=>{var o,r,i,s,a,c,u,l,d,f,h,g,p,m,y,v,R,b,k,_,w,D,C,P,T,x,S,E;n.r(t),n.d(t,{DocumentUri:()=>o,URI:()=>r,integer:()=>i,uinteger:()=>s,Position:()=>a,Range:()=>c,Location:()=>u,LocationLink:()=>l,Color:()=>d,ColorInformation:()=>f,ColorPresentation:()=>h,FoldingRangeKind:()=>g,FoldingRange:()=>p,DiagnosticRelatedInformation:()=>m,DiagnosticSeverity:()=>y,DiagnosticTag:()=>v,CodeDescription:()=>R,Diagnostic:()=>b,Command:()=>k,TextEdit:()=>_,ChangeAnnotation:()=>w,ChangeAnnotationIdentifier:()=>D,AnnotatedTextEdit:()=>C,TextDocumentEdit:()=>P,CreateFile:()=>T,RenameFile:()=>x,DeleteFile:()=>S,WorkspaceEdit:()=>E,WorkspaceChange:()=>we,TextDocumentIdentifier:()=>L,VersionedTextDocumentIdentifier:()=>q,OptionalVersionedTextDocumentIdentifier:()=>O,TextDocumentItem:()=>A,MarkupKind:()=>M,MarkupContent:()=>N,CompletionItemKind:()=>F,InsertTextFormat:()=>I,CompletionItemTag:()=>j,InsertReplaceEdit:()=>W,InsertTextMode:()=>H,CompletionItemLabelDetails:()=>$,CompletionItem:()=>U,CompletionList:()=>z,MarkedString:()=>K,Hover:()=>B,ParameterInformation:()=>V,SignatureInformation:()=>G,DocumentHighlightKind:()=>X,DocumentHighlight:()=>J,SymbolKind:()=>Q,SymbolTag:()=>Y,SymbolInformation:()=>Z,WorkspaceSymbol:()=>ee,DocumentSymbol:()=>te,CodeActionKind:()=>ne,CodeActionTriggerKind:()=>oe,CodeActionContext:()=>re,CodeAction:()=>ie,CodeLens:()=>se,FormattingOptions:()=>ae,DocumentLink:()=>ce,SelectionRange:()=>ue,SemanticTokenTypes:()=>le,SemanticTokenModifiers:()=>de,SemanticTokens:()=>fe,InlineValueText:()=>he,InlineValueVariableLookup:()=>ge,InlineValueEvaluatableExpression:()=>pe,InlineValueContext:()=>me,InlayHintKind:()=>ye,InlayHintLabelPart:()=>ve,InlayHint:()=>Re,WorkspaceFolder:()=>be,EOL:()=>Ce,TextDocument:()=>De}),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){var t=e;return Pe.objectLiteral(t)&&Pe.uinteger(t.line)&&Pe.uinteger(t.character)}}(a||(a={})),function(e){e.create=function(e,t,n,o){if(Pe.uinteger(e)&&Pe.uinteger(t)&&Pe.uinteger(n)&&Pe.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[".concat(e,", ").concat(t,", ").concat(n,", ").concat(o,"]"))},e.is=function(e){var t=e;return Pe.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){var t=e;return Pe.defined(t)&&c.is(t.range)&&(Pe.string(t.uri)||Pe.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){var t=e;return Pe.defined(t)&&c.is(t.targetRange)&&Pe.string(t.targetUri)&&c.is(t.targetSelectionRange)&&(c.is(t.originSelectionRange)||Pe.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){var t=e;return Pe.objectLiteral(t)&&Pe.numberRange(t.red,0,1)&&Pe.numberRange(t.green,0,1)&&Pe.numberRange(t.blue,0,1)&&Pe.numberRange(t.alpha,0,1)}}(d||(d={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return Pe.objectLiteral(t)&&c.is(t.range)&&d.is(t.color)}}(f||(f={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){var t=e;return Pe.objectLiteral(t)&&Pe.string(t.label)&&(Pe.undefined(t.textEdit)||_.is(t))&&(Pe.undefined(t.additionalTextEdits)||Pe.typedArray(t.additionalTextEdits,_.is))}}(h||(h={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(g||(g={})),function(e){e.create=function(e,t,n,o,r,i){var s={startLine:e,endLine:t};return Pe.defined(n)&&(s.startCharacter=n),Pe.defined(o)&&(s.endCharacter=o),Pe.defined(r)&&(s.kind=r),Pe.defined(i)&&(s.collapsedText=i),s},e.is=function(e){var t=e;return Pe.objectLiteral(t)&&Pe.uinteger(t.startLine)&&Pe.uinteger(t.startLine)&&(Pe.undefined(t.startCharacter)||Pe.uinteger(t.startCharacter))&&(Pe.undefined(t.endCharacter)||Pe.uinteger(t.endCharacter))&&(Pe.undefined(t.kind)||Pe.string(t.kind))}}(p||(p={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return Pe.defined(t)&&u.is(t.location)&&Pe.string(t.message)}}(m||(m={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(y||(y={})),function(e){e.Unnecessary=1,e.Deprecated=2}(v||(v={})),function(e){e.is=function(e){var t=e;return Pe.objectLiteral(t)&&Pe.string(t.href)}}(R||(R={})),function(e){e.create=function(e,t,n,o,r,i){var s={range:e,message:t};return Pe.defined(n)&&(s.severity=n),Pe.defined(o)&&(s.code=o),Pe.defined(r)&&(s.source=r),Pe.defined(i)&&(s.relatedInformation=i),s},e.is=function(e){var t,n=e;return Pe.defined(n)&&c.is(n.range)&&Pe.string(n.message)&&(Pe.number(n.severity)||Pe.undefined(n.severity))&&(Pe.integer(n.code)||Pe.string(n.code)||Pe.undefined(n.code))&&(Pe.undefined(n.codeDescription)||Pe.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(Pe.string(n.source)||Pe.undefined(n.source))&&(Pe.undefined(n.relatedInformation)||Pe.typedArray(n.relatedInformation,m.is))}}(b||(b={})),function(e){e.create=function(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var r={title:e,command:t};return Pe.defined(n)&&n.length>0&&(r.arguments=n),r},e.is=function(e){var t=e;return Pe.defined(t)&&Pe.string(t.title)&&Pe.string(t.command)}}(k||(k={})),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){var t=e;return Pe.objectLiteral(t)&&Pe.string(t.newText)&&c.is(t.range)}}(_||(_={})),function(e){e.create=function(e,t,n){var o={label:e};return void 0!==t&&(o.needsConfirmation=t),void 0!==n&&(o.description=n),o},e.is=function(e){var t=e;return Pe.objectLiteral(t)&&Pe.string(t.label)&&(Pe.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Pe.string(t.description)||void 0===t.description)}}(w||(w={})),function(e){e.is=function(e){var t=e;return Pe.string(t)}}(D||(D={})),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){var t=e;return _.is(t)&&(w.is(t.annotationId)||D.is(t.annotationId))}}(C||(C={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return Pe.defined(t)&&O.is(t.textDocument)&&Array.isArray(t.edits)}}(P||(P={})),function(e){e.create=function(e,t,n){var 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){var t=e;return t&&"create"===t.kind&&Pe.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Pe.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Pe.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||D.is(t.annotationId))}}(T||(T={})),function(e){e.create=function(e,t,n,o){var 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){var t=e;return t&&"rename"===t.kind&&Pe.string(t.oldUri)&&Pe.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Pe.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Pe.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||D.is(t.annotationId))}}(x||(x={})),function(e){e.create=function(e,t,n){var 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){var t=e;return t&&"delete"===t.kind&&Pe.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Pe.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Pe.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||D.is(t.annotationId))}}(S||(S={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return Pe.string(e.kind)?T.is(e)||x.is(e)||S.is(e):P.is(e)})))}}(E||(E={}));var L,q,O,A,M,N,F,I,j,W,H,$,U,z,K,B,V,G,X,J,Q,Y,Z,ee,te,ne,oe,re,ie,se,ae,ce,ue,le,de,fe,he,ge,pe,me,ye,ve,Re,be,ke=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,n){var o,r;if(void 0===n?o=_.insert(e,t):D.is(n)?(r=n,o=C.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(n),o=C.insert(e,t,r)),this.edits.push(o),void 0!==r)return r},e.prototype.replace=function(e,t,n){var o,r;if(void 0===n?o=_.replace(e,t):D.is(n)?(r=n,o=C.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(n),o=C.replace(e,t,r)),this.edits.push(o),void 0!==r)return r},e.prototype.delete=function(e,t){var n,o;if(void 0===t?n=_.del(e):D.is(t)?(o=t,n=C.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(t),n=C.del(e,o)),this.edits.push(n),void 0!==o)return o},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),_e=function(){function e(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(e,t){var n;if(D.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error("Id ".concat(n," is already in use."));if(void 0===t)throw new Error("No annotation provided for id ".concat(n));return this._annotations[n]=t,this._size++,n},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}(),we=function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new _e(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(P.is(e)){var n=new ke(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}}))):e.changes&&Object.keys(e.changes).forEach((function(n){var o=new ke(e.changes[n]);t._textEditChanges[n]=o}))):this._workspaceEdit={}}return Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(e){if(O.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version};if(!(o=this._textEditChanges[t.uri])){var n={textDocument:t,edits:r=[]};this._workspaceEdit.documentChanges.push(n),o=new ke(r,this._changeAnnotations),this._textEditChanges[t.uri]=o}return o}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var o;if(!(o=this._textEditChanges[e])){var r=[];this._workspaceEdit.changes[e]=r,o=new ke(r),this._textEditChanges[e]=o}return o},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new _e,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var o,r,i;if(w.is(t)||D.is(t)?o=t:n=t,void 0===o?r=T.create(e,n):(i=D.is(o)?o:this._changeAnnotations.manage(o),r=T.create(e,n,i)),this._workspaceEdit.documentChanges.push(r),void 0!==i)return i},e.prototype.renameFile=function(e,t,n,o){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,i,s;if(w.is(n)||D.is(n)?r=n:o=n,void 0===r?i=x.create(e,t,o):(s=D.is(r)?r:this._changeAnnotations.manage(r),i=x.create(e,t,o,s)),this._workspaceEdit.documentChanges.push(i),void 0!==s)return s},e.prototype.deleteFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var o,r,i;if(w.is(t)||D.is(t)?o=t:n=t,void 0===o?r=S.create(e,n):(i=D.is(o)?o:this._changeAnnotations.manage(o),r=S.create(e,n,i)),this._workspaceEdit.documentChanges.push(r),void 0!==i)return i},e}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return Pe.defined(t)&&Pe.string(t.uri)}}(L||(L={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return Pe.defined(t)&&Pe.string(t.uri)&&Pe.integer(t.version)}}(q||(q={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return Pe.defined(t)&&Pe.string(t.uri)&&(null===t.version||Pe.integer(t.version))}}(O||(O={})),function(e){e.create=function(e,t,n,o){return{uri:e,languageId:t,version:n,text:o}},e.is=function(e){var t=e;return Pe.defined(t)&&Pe.string(t.uri)&&Pe.string(t.languageId)&&Pe.integer(t.version)&&Pe.string(t.text)}}(A||(A={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(M||(M={})),function(e){e.is=function(e){var t=e;return Pe.objectLiteral(e)&&M.is(t.kind)&&Pe.string(t.value)}}(N||(N={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(F||(F={})),function(e){e.PlainText=1,e.Snippet=2}(I||(I={})),function(e){e.Deprecated=1}(j||(j={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){var t=e;return t&&Pe.string(t.newText)&&c.is(t.insert)&&c.is(t.replace)}}(W||(W={})),function(e){e.asIs=1,e.adjustIndentation=2}(H||(H={})),function(e){e.is=function(e){var t=e;return t&&(Pe.string(t.detail)||void 0===t.detail)&&(Pe.string(t.description)||void 0===t.description)}}($||($={})),function(e){e.create=function(e){return{label:e}}}(U||(U={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(z||(z={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return Pe.string(t)||Pe.objectLiteral(t)&&Pe.string(t.language)&&Pe.string(t.value)}}(K||(K={})),function(e){e.is=function(e){var t=e;return!!t&&Pe.objectLiteral(t)&&(N.is(t.contents)||K.is(t.contents)||Pe.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}}}(V||(V={})),function(e){e.create=function(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var r={label:e};return Pe.defined(t)&&(r.documentation=t),Pe.defined(n)?r.parameters=n:r.parameters=[],r}}(G||(G={})),function(e){e.Text=1,e.Read=2,e.Write=3}(X||(X={})),function(e){e.create=function(e,t){var n={range:e};return Pe.number(t)&&(n.kind=t),n}}(J||(J={})),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}(Q||(Q={})),function(e){e.Deprecated=1}(Y||(Y={})),function(e){e.create=function(e,t,n,o,r){var i={name:e,kind:t,location:{uri:o,range:n}};return r&&(i.containerName=r),i}}(Z||(Z={})),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){var s={name:e,detail:t,kind:n,range:o,selectionRange:r};return void 0!==i&&(s.children=i),s},e.is=function(e){var t=e;return t&&Pe.string(t.name)&&Pe.number(t.kind)&&c.is(t.range)&&c.is(t.selectionRange)&&(void 0===t.detail||Pe.string(t.detail))&&(void 0===t.deprecated||Pe.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){var o={diagnostics:e};return null!=t&&(o.only=t),null!=n&&(o.triggerKind=n),o},e.is=function(e){var t=e;return Pe.defined(t)&&Pe.typedArray(t.diagnostics,b.is)&&(void 0===t.only||Pe.typedArray(t.only,Pe.string))&&(void 0===t.triggerKind||t.triggerKind===oe.Invoked||t.triggerKind===oe.Automatic)}}(re||(re={})),function(e){e.create=function(e,t,n){var o={title:e},r=!0;return"string"==typeof t?(r=!1,o.kind=t):k.is(t)?o.command=t:o.edit=t,r&&void 0!==n&&(o.kind=n),o},e.is=function(e){var t=e;return t&&Pe.string(t.title)&&(void 0===t.diagnostics||Pe.typedArray(t.diagnostics,b.is))&&(void 0===t.kind||Pe.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||k.is(t.command))&&(void 0===t.isPreferred||Pe.boolean(t.isPreferred))&&(void 0===t.edit||E.is(t.edit))}}(ie||(ie={})),function(e){e.create=function(e,t){var n={range:e};return Pe.defined(t)&&(n.data=t),n},e.is=function(e){var t=e;return Pe.defined(t)&&c.is(t.range)&&(Pe.undefined(t.command)||k.is(t.command))}}(se||(se={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){var t=e;return Pe.defined(t)&&Pe.uinteger(t.tabSize)&&Pe.boolean(t.insertSpaces)}}(ae||(ae={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){var t=e;return Pe.defined(t)&&c.is(t.range)&&(Pe.undefined(t.target)||Pe.string(t.target))}}(ce||(ce={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){var n=t;return Pe.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){var t=e;return Pe.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(fe||(fe={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){var t=e;return null!=t&&c.is(t.range)&&Pe.string(t.text)}}(he||(he={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){var t=e;return null!=t&&c.is(t.range)&&Pe.boolean(t.caseSensitiveLookup)&&(Pe.string(t.variableName)||void 0===t.variableName)}}(ge||(ge={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){var t=e;return null!=t&&c.is(t.range)&&(Pe.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){var t=e;return Pe.defined(t)&&c.is(e.stoppedLocation)}}(me||(me={})),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){var t=e;return Pe.objectLiteral(t)&&(void 0===t.tooltip||Pe.string(t.tooltip)||N.is(t.tooltip))&&(void 0===t.location||u.is(t.location))&&(void 0===t.command||k.is(t.command))}}(ve||(ve={})),function(e){e.create=function(e,t,n){var o={position:e,label:t};return void 0!==n&&(o.kind=n),o},e.is=function(e){var t=e;return Pe.objectLiteral(t)&&a.is(t.position)&&(Pe.string(t.label)||Pe.typedArray(t.label,ve.is))&&(void 0===t.kind||ye.is(t.kind))&&void 0===t.textEdits||Pe.typedArray(t.textEdits,_.is)&&(void 0===t.tooltip||Pe.string(t.tooltip)||N.is(t.tooltip))&&(void 0===t.paddingLeft||Pe.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Pe.boolean(t.paddingRight))}}(Re||(Re={})),function(e){e.is=function(e){var t=e;return Pe.objectLiteral(t)&&r.is(t.uri)&&Pe.string(t.name)}}(be||(be={}));var De,Ce=["\n","\r\n","\r"];!function(e){function t(e,n){if(e.length<=1)return e;var o=e.length/2|0,r=e.slice(0,o),i=e.slice(o);t(r,n),t(i,n);for(var s=0,a=0,c=0;s<r.length&&a<i.length;){var u=n(r[s],i[a]);e[c++]=u<=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 Te(e,t,n,o)},e.is=function(e){var t=e;return!!(Pe.defined(t)&&Pe.string(t.uri)&&(Pe.undefined(t.languageId)||Pe.string(t.languageId))&&Pe.uinteger(t.lineCount)&&Pe.func(t.getText)&&Pe.func(t.positionAt)&&Pe.func(t.offsetAt))},e.applyEdits=function(e,n){for(var o=e.getText(),r=t(n,(function(e,t){var n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),i=o.length,s=r.length-1;s>=0;s--){var a=r[s],c=e.offsetAt(a.range.start),u=e.offsetAt(a.range.end);if(!(u<=i))throw new Error("Overlapping edit");o=o.substring(0,c)+a.newText+o.substring(u,o.length),i=c}return o}}(De||(De={}));var Pe,Te=function(){function e(e,t,n,o){this._uri=e,this._languageId=t,this._version=n,this._content=o,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,n=!0,o=0;o<t.length;o++){n&&(e.push(o),n=!1);var 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},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,o=t.length;if(0===o)return a.create(0,e);for(;n<o;){var r=Math.floor((n+o)/2);t[r]>e?o=r:n=r+1}var i=n-1;return a.create(i,e-t[i])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var 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)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e}();!function(e){var 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)}}(Pe||(Pe={}))},6265: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.__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}}),r(n(273),t);const s=n(8382);Object.defineProperty(t,"TextDocuments",{enumerable:!0,get:function(){return s.TextDocuments}});const a=n(9748);Object.defineProperty(t,"NotebookDocuments",{enumerable:!0,get:function(){return a.NotebookDocuments}}),r(n(9891),t),(t.ProposedFeatures||(t.ProposedFeatures={})).all={__brand:"features"}},7985:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyFeature=void 0;const o=n(273);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)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationFeature=void 0;const o=n(273),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)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticFeature=void 0;const o=n(273);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)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FileOperationsFeature=void 0;const o=n(273);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)))}}},6507:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintFeature=void 0;const o=n(273);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)))}}}},8970:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueFeature=void 0;const o=n(273);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)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeFeature=void 0;const o=n(273);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)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerFeature=void 0;const o=n(273);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)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookDocuments=t.NotebookSyncFeature=void 0;const o=n(273),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 f=[];for(const e of a)f.push(this.getNotebookCell(e));const h=[];for(const e of u)h.push(this.getNotebookCell(e));(d.length>0||f.length>0||c.length>0||h.length>0)&&(l.cells={added:d,removed:f,changed:{data:c,textContent:h}}),void 0===l.metadata&&void 0===l.cells||this._onDidChange.fire(l)}))),n.push(e.notebooks.synchronization.onDidSaveNotebookDocument((e=>{const t=this.notebookDocuments.get(e.notebookDocument.uri);void 0!==t&&this._onDidSave.fire(t)}))),n.push(e.notebooks.synchronization.onDidCloseNotebookDocument((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)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.attachPartialResult=t.ProgressFeature=t.attachWorkDone=void 0;const o=n(273),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)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensBuilder=t.SemanticTokensDiff=t.SemanticTokensFeature=void 0;const o=n(273);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()}}},9891:(e,t,n)=>{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(273),r=n(289),i=n(7560),s=n(2731),a=n(2507),c=n(1836),u=n(7985),l=n(9817),d=n(5421),f=n(828),h=n(2776),g=n(4606),p=n(8970),m=n(6507),y=n(6634),v=n(9748),R=n(8120);function b(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)}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 _=(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(b)}showWarningMessage(e,...t){let n={type:o.MessageType.Warning,message:e,actions:t};return this.connection.sendRequest(o.ShowMessageRequest.type,n).then(b)}showInformationMessage(e,...t){let n={type:o.MessageType.Info,message:e,actions:t};return this.connection.sendRequest(o.ShowMessageRequest.type,n).then(b)}}));(t.BulkRegistration||(t.BulkRegistration={})).create=function(){return new w};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}}}(t.BulkUnregistration||(t.BulkUnregistration={})).create=function(){return new D(void 0,[])};class D{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 C{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 D?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 D(this._connection,t.registrations.map((e=>({id:e.id,method:e.method}))))),(e=>(this.connection.console.info("Bulk registration failed."),Promise.reject(e))))}}const P=(0,f.FileOperationsFeature)((0,c.WorkspaceFoldersFeature)((0,a.ConfigurationFeature)(class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}applyEdit(e){let t=(n=e)&&n.edit?e:{edit:e};var n;return this.connection.sendRequest(o.ApplyWorkspaceEditRequest.type,t)}})));class T{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 x{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 S{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=S;const E=(0,R.MonikerFeature)((0,y.DiagnosticFeature)((0,m.InlayHintFeature)((0,p.InlineValueFeature)((0,g.TypeHierarchyFeature)((0,h.LinkedEditingRangeFeature)((0,l.SemanticTokensFeature)((0,u.CallHierarchyFeature)(S))))))));class L{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=L;const q=(0,v.NotebookSyncFeature)(L);function O(e,t){return function(n){return t(e(n))}}function A(e,t){return function(n){return t(e(n))}}function M(e,t){return function(n){return t(e(n))}}function N(e,t){return function(n){return t(e(n))}}function F(e,t){return function(n){return t(e(n))}}function I(e,t){return function(n){return t(e(n))}}function j(e,t){return function(n){return t(e(n))}}function W(e,t){return function(n){return t(e(n))}}t.combineConsoleFeatures=O,t.combineTelemetryFeatures=A,t.combineTracerFeatures=M,t.combineClientFeatures=N,t.combineWindowFeatures=F,t.combineWorkspaceFeatures=I,t.combineLanguagesFeatures=j,t.combineNotebooksFeatures=W,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,O),tracer:n(e.tracer,t.tracer,M),telemetry:n(e.telemetry,t.telemetry,A),client:n(e.client,t.client,N),window:n(e.window,t.window,F),workspace:n(e.workspace,t.workspace,I),languages:n(e.languages,t.languages,j),notebooks:n(e.notebooks,t.notebooks,W)}},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(T)):new T,u=n&&n.telemetry?new(n.telemetry(x)):new x,l=n&&n.client?new(n.client(C)):new C,d=n&&n.window?new(n.window(_)):new _,f=n&&n.workspace?new(n.workspace(P)):new P,h=n&&n.languages?new(n.languages(E)):new E,g=n&&n.notebooks?new(n.notebooks(q)):new q,p=[i,c,u,l,d,f,h,g];function m(e){return e instanceof Promise?e:r.thenable(e)?new Promise(((t,n)=>{e.then((e=>t(e)),(e=>n(e)))})):Promise.resolve(e)}let y,v,R,b={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 1===arguments.length?a.sendNotification(n):a.sendNotification(n,t)},onNotification:(e,t)=>a.onNotification(e,t),onProgress:a.onProgress,sendProgress:a.sendProgress,onInitialize:e=>(v=e,{dispose:()=>{v=void 0}}),onInitialized:e=>a.onNotification(o.InitializedNotification.type,e),onShutdown:e=>(y=e,{dispose:()=>{y=void 0}}),onExit:e=>(R=e,{dispose:()=>{R=void 0}}),get console(){return i},get telemetry(){return u},get tracer(){return c},get client(){return l},get window(){return d},get workspace(){return f},get languages(){return h},get notebooks(){return g},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(b);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(v)return m(v(e,(new o.CancellationTokenSource).token,(0,s.attachWorkDone)(a,e),void 0)).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(b.__textDocumentSync)?b.__textDocumentSync:o.TextDocumentSyncKind.None:r.number(n.textDocumentSync)||r.number(n.textDocumentSync.change)||(n.textDocumentSync.change=r.number(b.__textDocumentSync)?b.__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}})),a.onRequest(o.ShutdownRequest.type,(()=>(t.shutdownReceived=!0,y?y((new o.CancellationTokenSource).token):void 0))),a.onNotification(o.ExitNotification.type,(()=>{try{R&&R()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}})),a.onNotification(o.SetTraceNotification.type,(e=>{c.trace=o.Trace.fromString(e.value)})),b}},5421:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentFeature=void 0;const o=n(273);t.ShowDocumentFeature=e=>class extends e{showDocument(e){return this.connection.sendRequest(o.ShowDocumentRequest.type,e)}}},8382:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextDocuments=void 0;const o=n(273);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)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchyFeature=void 0;const o=n(273);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)=>{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)=>{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{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(""))}static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return o._oneOf(o._chars)}}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)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=void 0;const o=n(273);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}}},7613:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resolveModulePath=t.FileSystem=t.resolveGlobalYarnPath=t.resolveGlobalNodePath=t.resolve=t.uriToFilePath=void 0;const o=n(8835),r=n(5622),i=n(5747),s=n(3129);function a(){return"win32"===process.platform}function c(e,t,n,o){const a=["var p = process;","p.on('message',function(m){","if(m.c==='e'){","p.exit(0);","}","else if(m.c==='rs'){","try{","var r=require.resolve(m.a);","p.send({c:'r',s:true,r:r});","}","catch(err){","p.send({c:'r',s:false});","}","}","});"].join("");return new Promise(((c,u)=>{let l=process.env,d=Object.create(null);Object.keys(l).forEach((e=>d[e]=l[e])),t&&i.existsSync(t)&&(d.NODE_PATH?d.NODE_PATH=t+r.delimiter+d.NODE_PATH:d.NODE_PATH=t,o&&o(`NODE_PATH value is: ${d.NODE_PATH}`)),d.ELECTRON_RUN_AS_NODE="1";try{let t=(0,s.fork)("",[],{cwd:n,env:d,execArgv:["-e",a]});if(void 0===t.pid)return void u(new Error(`Starting process to resolve node module ${e} failed`));t.on("error",(e=>{u(e)})),t.on("message",(n=>{"r"===n.c&&(t.send({c:"e"}),n.s?c(n.r):u(new Error(`Failed to resolve module: ${e}`)))}));let o={c:"rs",a:e};t.send(o)}catch(e){u(e)}}))}function u(e){let t="npm";const n=Object.create(null);Object.keys(process.env).forEach((e=>n[e]=process.env[e])),n.NO_UPDATE_NOTIFIER="true";const o={encoding:"utf8",env:n};a()&&(t="npm.cmd",o.shell=!0);let i=()=>{};try{process.on("SIGPIPE",i);let n=(0,s.spawnSync)(t,["config","get","prefix"],o).stdout;if(!n)return void(e&&e("'npm config get prefix' didn't return a value."));let c=n.trim();return e&&e(`'npm config get prefix' value is: ${c}`),c.length>0?a()?r.join(c,"node_modules"):r.join(c,"lib","node_modules"):void 0}catch(e){return}finally{process.removeListener("SIGPIPE",i)}}var l;t.uriToFilePath=function(e){let t=o.parse(e);if("file:"!==t.protocol||!t.path)return;let n=t.path.split("/");for(var i=0,s=n.length;i<s;i++)n[i]=decodeURIComponent(n[i]);if("win32"===process.platform&&n.length>1){let e=n[0],t=n[1];0===e.length&&t.length>1&&":"===t[1]&&n.shift()}return r.normalize(n.join("/"))},t.resolve=c,t.resolveGlobalNodePath=u,t.resolveGlobalYarnPath=function(e){let t="yarn",n={encoding:"utf8"};a()&&(t="yarn.cmd",n.shell=!0);let o=()=>{};try{process.on("SIGPIPE",o);let i=(0,s.spawnSync)(t,["global","dir","--json"],n),a=i.stdout;if(!a)return void(e&&(e("'yarn global dir' didn't return a value."),i.stderr&&e(i.stderr)));let c=a.trim().split(/\r?\n/);for(let e of c)try{let t=JSON.parse(e);if("log"===t.type)return r.join(t.data,"node_modules")}catch(e){}return}catch(e){return}finally{process.removeListener("SIGPIPE",o)}},function(e){let t;function n(){return void 0!==t||(t=!("win32"===process.platform||i.existsSync(__filename.toUpperCase())&&i.existsSync(__filename.toLowerCase()))),t}e.isCaseSensitive=n,e.isParent=function(e,t){return n()?0===r.normalize(t).indexOf(r.normalize(e)):0===r.normalize(t).toLowerCase().indexOf(r.normalize(e).toLowerCase())}}(l=t.FileSystem||(t.FileSystem={})),t.resolveModulePath=function(e,t,n,o){return n?(r.isAbsolute(n)||(n=r.join(e,n)),c(t,n,n,o).then((e=>l.isParent(n,e)?e:Promise.reject(new Error(`Failed to load ${t} from node path location.`)))).then(void 0,(n=>c(t,u(o),e,o)))):c(t,u(o),e,o)}},5809: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.__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=t.Files=void 0;const i=n(289),s=n(9891),a=n(7613),c=n(6560);var u;r(n(6560),t),r(n(6265),t),(u=t.Files||(t.Files={})).uriToFilePath=a.uriToFilePath,u.resolveGlobalNodePath=a.resolveGlobalNodePath,u.resolveGlobalYarnPath=a.resolveGlobalYarnPath,u.resolve=a.resolve,u.resolveModulePath=a.resolveModulePath;let l,d=!1;!function(){const e="--clientProcessId";function t(e){try{let t=parseInt(e);isNaN(t)||(l=setInterval((()=>{try{process.kill(t,0)}catch(e){process.exit(d?0:1)}}),3e3))}catch(e){}}for(let n=2;n<process.argv.length;n++){let o=process.argv[n];if(o===e&&n+1<process.argv.length)return void t(process.argv[n+1]);{let n=o.split("=");n[0]===e&&t(n[1])}}}();const f={initialize:e=>{const t=e.processId;i.number(t)&&void 0===l&&setInterval((()=>{try{process.kill(t,0)}catch(e){process.exit(d?0:1)}}),3e3)},get shutdownReceived(){return d},set shutdownReceived(e){d=e},exit:e=>{process.exit(e)}};t.createConnection=function(e,t,n,o){let r,a,u,l;return void 0!==e&&"features"===e.__brand&&(r=e,e=t,t=n,n=o),c.ConnectionStrategy.is(e)||c.ConnectionOptions.is(e)?l=e:(a=e,u=t,l=n),function(e,t,n,o){if(!e&&!t&&process.argv.length>2){let n,o,i=process.argv.slice(2);for(let s=0;s<i.length;s++){let a=i[s];if("--node-ipc"===a){e=new c.IPCMessageReader(process),t=new c.IPCMessageWriter(process);break}if("--stdio"===a){e=process.stdin,t=process.stdout;break}if("--socket"===a){n=parseInt(i[s+1]);break}if("--pipe"===a){o=i[s+1];break}var r=a.split("=");if("--socket"===r[0]){n=parseInt(r[1]);break}if("--pipe"===r[0]){o=r[1];break}}if(n){let o=(0,c.createServerSocketTransport)(n);e=o[0],t=o[1]}else if(o){let n=(0,c.createServerPipeTransport)(o);e=n[0],t=n[1]}}var a="Use arguments of createConnection or set command line parameters: '--node-ipc', '--stdio' or '--socket={number}'";if(!e)throw new Error("Connection input stream is not set. "+a);if(!t)throw new Error("Connection output stream is not set. "+a);if(i.func(e.read)&&i.func(e.on)){let t=e;t.on("end",(()=>{process.exit(d?0:1)})),t.on("close",(()=>{process.exit(d?0:1)}))}return(0,s.createConnection)((o=>(0,c.createProtocolConnection)(e,t,o,n)),f,o)}(a,u,l,r)}},8212:(e,t,n)=>{e.exports=n(5809)},3477:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getLsConfiguration=void 0;const n={markdownFileExtensions:["md"],knownLinkedToFileExtensions:["jpg","jpeg","png","gif","webp","bmp","tiff"]};t.getLsConfiguration=function(e){return{...n,...e}}},8377:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createLanguageService=t.githubSlugifier=t.LogLevel=t.DiagnosticLevel=t.DiagnosticCode=void 0;const o=n(3477),r=n(6900),i=n(899),s=n(121),a=n(2757),c=n(1421),u=n(5324),l=n(2891),d=n(9965),f=n(401),h=n(6188),g=n(9877),p=n(8318);var m=n(899);Object.defineProperty(t,"DiagnosticCode",{enumerable:!0,get:function(){return m.DiagnosticCode}}),Object.defineProperty(t,"DiagnosticLevel",{enumerable:!0,get:function(){return m.DiagnosticLevel}});var y=n(9136);Object.defineProperty(t,"LogLevel",{enumerable:!0,get:function(){return y.LogLevel}});var v=n(5001);Object.defineProperty(t,"githubSlugifier",{enumerable:!0,get:function(){return v.githubSlugifier}}),t.createLanguageService=function(e){const t=(0,o.getLsConfiguration)(e),n=e.logger,m=new g.MdTableOfContentsProvider(e.parser,e.workspace,n),y=new a.MdDocumentSymbolProvider(m,n),v=new f.MdSelectionRangeProvider(e.parser,m,n),R=new c.MdFoldingProvider(e.parser,m,n),b=new h.MdWorkspaceSymbolProvider(e.workspace,y),k=new s.MdLinkProvider(e.parser,e.workspace,m,n),_=new u.MdPathCompletionProvider(t,e.workspace,e.parser,k),w=new l.MdReferencesProvider(t,e.parser,e.workspace,m,n),D=new r.MdDefinitionProvider(w),C=new d.MdRenameProvider(t,e.workspace,w,e.parser.slugifier),P=new i.DiagnosticComputer(t,e.workspace,k,m);return Object.freeze({dispose:()=>{m.dispose(),b.dispose(),k.dispose(),w.dispose()},getDocumentLinks:k.provideDocumentLinks.bind(k),resolveDocumentLink:k.resolveDocumentLink.bind(k),getDocumentSymbols:y.provideDocumentSymbols.bind(y),getFoldingRanges:R.provideFoldingRanges.bind(R),getSelectionRanges:v.provideSelectionRanges.bind(v),getWorkspaceSymbols:b.provideWorkspaceSymbols.bind(b),getCompletionItems:_.provideCompletionItems.bind(_),getReferences:w.provideReferences.bind(w),getFileReferences:async(e,t)=>(await w.getReferencesToFileInWorkspace(e,t)).map((e=>e.location)),getDefinition:D.provideDefinition.bind(D),prepareRename:C.prepareRename.bind(C),getRenameEdit:C.provideRenameEdits.bind(C),computeDiagnostics:async(e,t,n)=>(await P.compute(e,t,n))?.diagnostics,createPullDiagnosticsManager:()=>{if(!(0,p.isWorkspaceWithFileWatching)(e.workspace))throw new Error("Workspace does not support file watching. Diagnostics manager not supported");return new i.DiagnosticsManager(t,e.workspace,k,m)}})}},6900:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MdDefinitionProvider=void 0,t.MdDefinitionProvider=class{constructor(e){this.referencesProvider=e}async provideDefinition(e,t,n){return(await this.referencesProvider.getReferencesAtPosition(e,t,n)).find((e=>e.isDefinition))?.location}}},899:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticsManager=t.DiagnosticComputer=t.DiagnosticCode=t.DiagnosticLevel=void 0;const o=n(9444),r=n(5809),i=n(8472),s=n(7373),a=n(6080),c=n(5910),u=n(8223),l=n(1731),d=n(5288),f=n(6930),h=n(8318),g=i.loadMessageBundle();var p,m;function y(e){switch(e){case p.error:return r.DiagnosticSeverity.Error;case p.warning:return r.DiagnosticSeverity.Warning;case p.ignore:case void 0:return}}!function(e){e.ignore="ignore",e.warning="warning",e.error="error"}(p=t.DiagnosticLevel||(t.DiagnosticLevel={})),function(e){e.link_noSuchReferences="link.no-such-reference",e.link_noSuchHeaderInOwnFile="link.no-such-header-in-own-file",e.link_noSuchFile="link.no-such-file",e.link_noSuchHeaderInFile="link.no-such-header-in-file"}(m=t.DiagnosticCode||(t.DiagnosticCode={}));class v{constructor(e){this._filesToLinksMap=new f.ResourceMap;for(const t of e){if("internal"!==t.href.kind)continue;const e=this._filesToLinksMap.get(t.href.path),n={source:t.source,fragment:t.href.fragment};e?e.outgoingLinks.push(n):this._filesToLinksMap.set(t.href.path,{outgoingLinks:[n]})}}get size(){return this._filesToLinksMap.size}entries(){return this._filesToLinksMap.entries()}}class R{constructor(e,t,n,o){this.configuration=e,this.workspace=t,this.linkProvider=n,this.tocProvider=o}async compute(e,t,n){const{links:o,definitions:r}=await this.linkProvider.getLinks(e),i=new f.ResourceMap;return n.isCancellationRequested?{links:o,diagnostics:[],statCache:i}:{links:o,statCache:i,diagnostics:(await Promise.all([this.validateFileLinks(t,o,i,n),Array.from(this.validateReferenceLinks(t,o,r)),this.validateFragmentLinks(e,t,o,n)])).flat()}}async validateFragmentLinks(e,t,n,o){const r=y(t.validateFragmentLinks);if(void 0===r)return[];const i=await this.tocProvider.getForDocument(e);if(o.isCancellationRequested)return[];const s=[];for(const o of n)"internal"===o.href.kind&&o.source.hrefText.startsWith("#")&&o.href.path.toString()===e.uri.toString()&&o.href.fragment&&!i.lookup(o.href.fragment)&&(this.isIgnoredLink(t,o.source.hrefText)||s.push({code:m.link_noSuchHeaderInOwnFile,message:g("invalidHeaderLink","No header found: '{0}'",o.href.fragment),range:o.source.hrefRange,severity:r,data:{hrefText:o.source.hrefText}}));return s}*validateReferenceLinks(e,t,n){const o=y(e.validateReferences);if(void 0===o)return[];for(const e of t)"reference"!==e.href.kind||n.lookup(e.href.ref)||(yield{code:m.link_noSuchReferences,message:g("invalidReferenceLink","No link definition found: '{0}'",e.href.ref),range:e.source.hrefRange,severity:o,data:{ref:e.href.ref}})}async validateFileLinks(e,t,n,o){const r=y(e.validateFileLinks);if(void 0===r)return[];const i=y(void 0===e.validateMarkdownFileLinkFragments?e.validateFragmentLinks:e.validateMarkdownFileLinkFragments),s=new v(t.filter((e=>!e.source.hrefText.startsWith("#"))));if(0===s.size)return[];const u=new d.Limiter(10),l=[];return await Promise.all(Array.from(s.entries()).map((([t,{outgoingLinks:s}])=>u.queue((async()=>{if(o.isCancellationRequested)return;const u=await(0,h.statLinkToMarkdownFile)(this.configuration,this.workspace,t,n);if(u){if(void 0!==i&&this.isMarkdownPath(u)){const t=s.filter((e=>e.fragment));if(t.length){const n=await this.tocProvider.get(u);for(const o of t)if(!n.lookup(o.fragment)&&!this.isIgnoredLink(e,o.source.pathText)&&!this.isIgnoredLink(e,o.source.hrefText)){const e=(o.source.fragmentRange&&(0,c.modifyRange)(o.source.fragmentRange,(0,a.translatePosition)(o.source.fragmentRange.start,{characterDelta:-1}),void 0))??o.source.hrefRange;l.push({code:m.link_noSuchHeaderInFile,message:g("invalidLinkToHeaderInOtherFile","Header does not exist in file: {0}",o.fragment),range:e,severity:i,data:{fragment:o.fragment,hrefText:o.source.hrefText}})}}}}else for(const n of s)this.isIgnoredLink(e,n.source.pathText)||l.push({code:m.link_noSuchFile,message:g("invalidPathLink","File does not exist at path: {0}",t.fsPath),range:n.source.hrefRange,severity:r,data:{fsPath:t.fsPath,hrefText:n.source.pathText}})}))))),l}isMarkdownPath(e){return this.workspace.hasMarkdownDocument(e)||(0,l.looksLikeMarkdownPath)(this.configuration,e)}isIgnoredLink(e,t){return e.ignoreLinks.some((e=>o.isMatch(t,e)))}}t.DiagnosticComputer=R;class b extends u.Disposable{constructor(e){super(),this._workspace=e,this._onDidChangeLinkedToFile=this._register(new r.Emitter),this.onDidChangeLinkedToFile=this._onDidChangeLinkedToFile.event,this._linkedToFile=new f.ResourceMap}dispose(){super.dispose();for(const e of this._linkedToFile.values())e.watcher.dispose();this._linkedToFile.clear()}updateLinksForDocument(e,t,n){const o=new Set(t.filter((e=>"internal"===e.href.kind)).map((e=>({path:e.href.path,exists:!!n.get(e.href.path)?.exists}))));for(const t of this._linkedToFile.values())t.documents.delete(e);for(const{path:t,exists:n}of o){let o=this._linkedToFile.get(t);o||(o={watcher:this.startWatching(t),documents:new f.ResourceMap,exists:n},this._linkedToFile.set(t,o)),o.documents.set(e,e)}for(const[e,t]of this._linkedToFile)0===t.documents.size&&(t.watcher.dispose(),this._linkedToFile.delete(e))}deleteDocument(e){this.updateLinksForDocument(e,[],new f.ResourceMap)}tryStatFileLink(e){const t=this._linkedToFile.get(e);if(t)return{exists:t.exists}}startWatching(e){const t=this._workspace.watchFile(e,{ignoreChange:!0}),n=t.onDidDelete((e=>this.onLinkedResourceChanged(e,!1))),o=t.onDidCreate((e=>this.onLinkedResourceChanged(e,!0)));return{dispose:()=>{t.dispose(),n.dispose(),o.dispose()}}}onLinkedResourceChanged(e,t){const n=this._linkedToFile.get(e);n&&(n.exists=t,this._onDidChangeLinkedToFile.fire({changedResource:e,linkingFiles:n.documents.values(),exists:t}))}}class k extends u.Disposable{constructor(e,t,n,o){super(),this._onLinkedToFileChanged=this._register(new r.Emitter),this.onLinkedToFileChanged=this._onLinkedToFileChanged.event;const i=new b(t);this._linkWatcher=this._register(i),this._linkWatcher.onDidChangeLinkedToFile((e=>{this._onLinkedToFileChanged.fire({changedResource:e.changedResource,linkingResources:Array.from(e.linkingFiles)})}));const s=new Proxy(t,{get:(e,n,o)=>"stat"!==n?t[n]:async function(n){const r=i.tryStatFileLink(n);return r?r.exists?{isDirectory:!1}:void 0:t.stat.call(this===o?e:this,n)}});this._computer=new R(e,s,n,o)}async computeDiagnostics(e,t,n){const o=s.URI.parse(e.uri),r=await this._computer.compute(e,t,n);return n.isCancellationRequested?[]:(this._linkWatcher.updateLinksForDocument(o,r.links,r.statCache),r.diagnostics)}}t.DiagnosticsManager=k},121:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MdLinkProvider=t.LinkDefinitionSet=t.MdLinkComputer=t.resolveDocumentLink=void 0;const o=n(7373),r=n(9136),i=n(6080),s=n(5910),a=n(5875),c=n(8825),u=n(5699),l=n(8223),d=n(3568),f=n(8318),h=n(2835);function g(e,t,n){const r=R(t);if(/^[a-z\-][a-z\-]+:/i.test(r))return{kind:"external",uri:o.URI.parse(r)};const i=p(o.URI.parse(e.uri),t,n);return i?{kind:"internal",path:i.path,fragment:i.fragment}:void 0}function p(e,t,n){const r=o.URI.parse(`vscode-resource:${t}`),i=n.getContainingDocument?.(e)?.uri??e;let s;if(r.path)if("/"===r.path[0]){const e=(0,f.getWorkspaceFolder)(n,i);e&&(s=o.Utils.joinPath(e,r.path))}else if("untitled"===i.scheme){const e=(0,f.getWorkspaceFolder)(n,i);e&&(s=o.Utils.joinPath(e,r.path))}else{const e=o.Utils.dirname(i);s=o.Utils.joinPath(e,r.path)}else s=i;if(s)return{path:s.with({fragment:""}),fragment:r.fragment}}function m(e,t,n,r,s,a){const c=n.startsWith("<"),u=R(n);let l;try{l=g(e,u,a)}catch{return}if(!l)return;const d=e.positionAt(r),f=(0,i.translatePosition)(d,{characterDelta:s.length}),h=(0,i.translatePosition)(d,{characterDelta:t.length+(c?1:0)}),p=(0,i.translatePosition)(h,{characterDelta:u.length});return{kind:"link",href:l,source:{hrefText:u,resource:o.URI.parse(e.uri),range:{start:d,end:f},hrefRange:{start:h,end:p},...y(e,u,h,p)}}}function y(e,t,n,o){const r=function(e,t,n){const o=e.indexOf("#");if(!(o<0))return{start:(0,i.translatePosition)(t,{characterDelta:o+1}),end:n}}(t,n,o);return{pathText:e.getText({start:n,end:r?(0,i.translatePosition)(r.start,{characterDelta:-1}):o}),fragmentRange:r}}t.resolveDocumentLink=p;const v=/^<(.*)>$/;function R(e){return e.replace(v,"$1")}const b=new RegExp(d.r`(\[`+d.r`(?:`+d.r`[^\[\]\\]|`+d.r`\\.|`+d.r`\[[^\[\]]*\]`+d.r`)*`+d.r`\]`+d.r`\(\s*)`+d.r`(`+d.r`[^\s\(\)\<](?:[^\s\(\)]|\([^\s\(\)]*?\))*|`+d.r`<[^<>]+>`+d.r`)`+d.r`\s*(?:"[^"]*"|'[^']*'|\([^\(\)]*\))?\s*`+d.r`\)`,"g"),k=/(^|[^\]\\])(?:(?:(\[((?:\\\]|[^\]])+)\]\[\s*?)([^\s\]]*?)\]|\[\s*?([^\s\\\]]*?)\])(?![\:\(]))/gm,_=/\<(\w+:[^\>\s]+)\>/g,w=/^([\t ]*\[(?!\^)((?:\\\]|[^\]])+)\]:\s*)([^<]\S*|<[^>]+>)/gm,D=/(?:^|[^`])(`+)(?:.+?|.*?(?:(?:\r?\n).+?)*?)(?:\r?\n)?\1(?:$|[^`])/gm;class C{constructor(e,t){this.multiline=e,this.inline=t}static async compute(e,t){const n=(await e.tokenize(t)).filter((e=>("code_block"===e.type||"fence"===e.type||"html_block"===e.type)&&!!e.map)).map((e=>e.map)),o=new Map,r=t.getText();for(const e of r.matchAll(D)){const n=e.index??0,r={start:t.positionAt(n),end:t.positionAt(n+e[0].length)};for(let e=r.start.line;e<=r.end.line;++e){let t=o.get(e);t||(t=[],o.set(e,t)),t.push(r)}}return new C(n,o)}contains(e){return this.multiline.some((t=>e.line>=t[0]&&e.line<t[1]))||!!this.inline.get(e.line)?.some((t=>(0,s.rangeContains)(t,e)))}concatInline(e){const t=new Map(this.inline);for(const n of e)for(let e=n.start.line;e<=n.end.line;++e){let o=t.get(e);o||(o=[],t.set(e,o)),o.push(n)}return new C(this.multiline,t)}}class P{constructor(e,t){this.tokenizer=e,this.workspace=t}async getAllLinks(e,t){const n=await C.compute(this.tokenizer,e);if(t.isCancellationRequested)return[];const o=Array.from(this.getInlineLinks(e,n));return Array.from([...o,...this.getReferenceLinks(e,n.concatInline(o.map((e=>e.source.range)))),...this.getLinkDefinitions(e,n),...this.getAutoLinks(e,n)])}*getInlineLinks(e,t){const n=e.getText();for(const o of n.matchAll(b)){const n=m(e,o[1],o[2],o.index??0,o[0],this.workspace);if(n&&!t.contains(n.source.hrefRange.start)){yield n;for(const t of o[1].matchAll(b)){const n=m(e,t[1],t[2],(o.index??0)+(t.index??0),t[0],this.workspace);n&&(yield n)}}}}*getAutoLinks(e,t){const n=e.getText();for(const r of n.matchAll(_)){const n=r.index??0,s=e.positionAt(n);if(t.contains(s))continue;const a=r[1],c=g(e,a,this.workspace);if(!c)continue;const u=(0,i.translatePosition)(s,{characterDelta:r[0].length}),l=(0,i.translatePosition)(s,{characterDelta:1}),d=(0,i.translatePosition)(l,{characterDelta:a.length});yield{kind:"link",href:c,source:{hrefText:a,resource:o.URI.parse(e.uri),hrefRange:{start:l,end:d},range:{start:s,end:u},...y(e,a,l,d)}}}}*getReferenceLinks(e,t){const n=e.getText();for(const r of n.matchAll(k)){const n=(r.index??0)+r[1].length,s=e.positionAt(n);if(t.contains(s))continue;let c,u,l=r[4];if(""===l){l=r[3];const t=n+1;c=e.positionAt(t),u=e.positionAt(t+l.length)}else if(l){const t=n+r[2].length;c=e.positionAt(t),u=e.positionAt(t+l.length)}else{if(!r[5])continue;{l=r[5];const t=n+1;c=e.positionAt(t);const o=(0,a.getLine)(e,c.line).match(/^\s*[\-\*]\s*\[x\]/i);if(o&&c.character<=o[0].length)continue;u=e.positionAt(t+l.length)}}const d=(0,i.translatePosition)(s,{characterDelta:r[0].length-r[1].length});yield{kind:"link",source:{hrefText:l,pathText:l,resource:o.URI.parse(e.uri),range:{start:s,end:d},hrefRange:{start:c,end:u},fragmentRange:void 0},href:{kind:"reference",ref:l}}}}*getLinkDefinitions(e,t){const n=e.getText();for(const r of n.matchAll(w)){const n=r.index??0,s=e.positionAt(n);if(t.contains(s))continue;const a=r[1],c=r[2],u=r[3].trim(),l=g(e,u,this.workspace);if(!l)continue;const d=v.test(u),f=R(u),h=(0,i.translatePosition)(s,{characterDelta:a.length+(d?1:0)}),p=(0,i.translatePosition)(h,{characterDelta:f.length}),m={start:h,end:p},b=(0,i.translatePosition)(s,{characterDelta:1}),k={start:b,end:(0,i.translatePosition)(b,{characterDelta:c.length})},_=(0,i.translatePosition)(s,{characterDelta:r[0].length});yield{kind:"definition",source:{hrefText:f,resource:o.URI.parse(e.uri),range:{start:s,end:_},hrefRange:m,...y(e,u,h,p)},ref:{text:c,range:k},href:l}}}}t.MdLinkComputer=P;class T{constructor(e){this._map=new Map;for(const t of e)"definition"===t.kind&&this._map.set(t.ref.text,t)}[Symbol.iterator](){return this._map.entries()}lookup(e){return this._map.get(e)}}t.LinkDefinitionSet=T;class x extends l.Disposable{constructor(e,t,n,o){super(),this._workspace=t,this._tocProvider=n,this._linkComputer=new P(e,t),this._linkCache=this._register(new h.MdDocumentInfoCache(this._workspace,(async e=>{o.log(r.LogLevel.Debug,"LinkProvider",`compute - ${e.uri}`);const t=await this._linkComputer.getAllLinks(e,u.noopToken);return{links:t,definitions:new T(t)}})))}getLinks(e){return this._linkCache.getForDocument(e)}async provideDocumentLinks(e,t){const{links:n,definitions:o}=await this.getLinks(e);return t.isCancellationRequested?[]:(0,c.coalesce)(n.map((e=>this.toValidDocumentLink(e,o))))}async resolveDocumentLink(e,t){if(!e.data)return;const n=e.data;if("internal"!==n.href.kind)return;e.target=this.createCommandUri("vscode.open",n.href.path);let r=o.URI.from(n.href.path);const i=await this._workspace.stat(r);if(i?.isDirectory)return e.target=this.createCommandUri("revealInExplorer",n.href.path),e;if(!i){let t=!1;if(""===o.Utils.extname(r)){const e=r.with({path:r.path+".md"});await this._workspace.stat(e)&&(r=e,t=!0)}if(!t)return e}if(!n.href.fragment)return e.target=this.createCommandUri("vscode.open",r),e;const s=n.href.fragment.match(/^L(\d+)(?:,(\d+))?$/i);if(s){const t=+s[1]-1;if(!isNaN(t)){const n=+s[2]-1,o={line:t,character:isNaN(n)?0:n};return e.target=this.createOpenAtPosCommand(r,o),e}}const a=await this._workspace.openMarkdownDocument(r);if(a){const t=(await this._tocProvider.getForDocument(a)).lookup(n.href.fragment);if(t)return e.target=this.createOpenAtPosCommand(r,t.headerLocation.range.start),e}return e.target=this.createCommandUri("vscode.open",r),e}toValidDocumentLink(e,t){switch(e.href.kind){case"external":return{range:e.source.hrefRange,target:e.href.uri.toString()};case"internal":return{range:e.source.hrefRange,target:void 0,tooltip:"Follow link",data:e};case"reference":{const n=t.lookup(e.href.ref);if(!n)return;const o=this.createOpenAtPosCommand(e.source.resource,n.source.hrefRange.start);return{range:e.source.hrefRange,tooltip:"Go to link definition",target:o,data:e}}}}createCommandUri(e,...t){return`command:${e}?${encodeURIComponent(JSON.stringify(t))}`}createOpenAtPosCommand(e,t){return this.createCommandUri("_workbench.open",e,[void 0,{selection:{startLineNumber:t.line+1,startColumn:t.character+1,endLineNumber:t.line+1,endColumn:t.character+1}}])}}t.MdLinkProvider=x},2757:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MdDocumentSymbolProvider=void 0;const o=n(1674),r=n(9136);t.MdDocumentSymbolProvider=class{constructor(e,t){this.tocProvider=e,this.logger=t}async provideDocumentSymbolInformation(e){return this.logger.log(r.LogLevel.Debug,"DocumentSymbolProvider",`provideDocumentSymbolInformation - ${e.uri}`),(await this.tocProvider.getForDocument(e)).entries.map((e=>this.toSymbolInformation(e)))}async provideDocumentSymbols(e){const t=await this.tocProvider.getForDocument(e),n={level:-1/0,children:[],parent:void 0};return this.buildTree(n,t.entries),n.children}buildTree(e,t){if(!t.length)return;const n=t[0],o=this.toDocumentSymbol(n);for(o.children=[];n.level<=e.level;)e=e.parent;e.children.push(o),this.buildTree({level:n.level,children:o.children,parent:e},t.slice(1))}toSymbolInformation(e){return{name:this.getSymbolName(e),kind:o.SymbolKind.String,location:e.sectionLocation}}toDocumentSymbol(e){return{name:this.getSymbolName(e),kind:o.SymbolKind.String,range:e.sectionLocation.range,selectionRange:e.sectionLocation.range}}getSymbolName(e){return"#".repeat(e.level)+" "+e.text}}},1421:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MdFoldingProvider=void 0;const o=n(1674),r=n(9136),i=n(5875),s=n(3568);t.MdFoldingProvider=class{constructor(e,t,n){this.parser=e,this.tocProvider=t,this.logger=n}async provideFoldingRanges(e,t){return this.logger.log(r.LogLevel.Debug,"MdFoldingProvider",`provideFoldingRanges - ${e.uri}`),(await Promise.all([this.getRegions(e),this.getHeaderFoldingRanges(e),this.getBlockFoldingRanges(e)])).flat().slice(0,5e3)}async getRegions(e){const t=(await this.parser.tokenize(e)).filter(c).map((e=>({line:e.map[0],isStart:a(e.content)}))),n=[];return t.map((e=>{if(e.isStart)n.push(e);else if(n.length&&n[n.length-1].isStart)return{startLine:n.pop().line,endLine:e.line,kind:o.FoldingRangeKind.Region};return null})).filter((e=>!!e))}async getHeaderFoldingRanges(e){return(await this.tocProvider.getForDocument(e)).entries.map((t=>{let n=t.sectionLocation.range.end.line;return(0,s.isEmptyOrWhitespace)((0,i.getLine)(e,n))&&n>=t.line+1&&(n-=1),{startLine:t.line,endLine:n}}))}async getBlockFoldingRanges(e){return(await this.parser.tokenize(e)).filter(u).map((t=>{const n=t.map[0];let o=t.map[1]-1;return(0,s.isEmptyOrWhitespace)((0,i.getLine)(e,o))&&o>=n+1&&(o-=1),{startLine:n,endLine:o,kind:this.getFoldingRangeKind(t)}}))}getFoldingRangeKind(e){return"html_block"===e.type&&e.content.startsWith("\x3c!--")?o.FoldingRangeKind.Comment:void 0}};const a=e=>/^\s*<!--\s*#?region\b.*-->/.test(e),c=e=>{return!!e.map&&"html_block"===e.type&&(a(e.content)||(t=e.content,/^\s*<!--\s*#?endregion\b.*-->/.test(t)));var t},u=e=>{if(!e.map)return!1;switch(e.type){case"fence":case"list_item_open":return e.map[1]>e.map[0];case"html_block":return!c(e)&&e.map[1]>e.map[0]+1;default:return!1}}},5324:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MdPathCompletionProvider=void 0;const o=n(5622),r=n(9877),i=n(5875),s=n(3052),a=n(1674),c=n(8318),u=n(5910),l=n(7373),d=n(6080),f=n(3568);var h;function g(e){try{return decodeURIComponent(e)}catch{return e}}!function(e){e[e.Link=0]="Link",e[e.ReferenceLink=1]="ReferenceLink",e[e.LinkDefinition=2]="LinkDefinition"}(h||(h={})),t.MdPathCompletionProvider=class{constructor(e,t,n,o){this.configuration=e,this.workspace=t,this.parser=n,this.linkProvider=o,this.linkStartPattern=new RegExp(f.r`\[`+f.r`(?:`+f.r`[^\[\]\\]|`+f.r`\\.|`+f.r`\[[^\[\]]*\]`+f.r`)*`+f.r`\]`+f.r`\(\s*(<[^\>\)]*|[^\s\(\)]*)`+f.r`$`),this.referenceLinkStartPattern=/\[([^\]]*?)\]\[\s*([^\s\(\)]*)$/,this.definitionPattern=/^\s*\[[\w\-]+\]:\s*([^\s]*)$/m}async provideCompletionItems(e,t,n,o){const r=this.getPathCompletionContext(e,t);if(!r)return[];switch(r.kind){case h.ReferenceLink:{const n=[];for await(const o of this.provideReferenceSuggestions(e,t,r))n.push(o);return n}case h.LinkDefinition:case h.Link:{const n=[],o=r.anchorInfo&&0===r.anchorInfo.beforeAnchor.length;if(0===r.linkPrefix.length||o){const o=(0,u.makeRange)(r.linkTextStartPosition,t);for await(const i of this.provideHeaderSuggestions(e,t,r,o))n.push(i)}if(!o)if(r.anchorInfo){const o=this.resolveReference(e,r.anchorInfo.beforeAnchor);if(o){const e=await(0,c.openLinkToMarkdownFile)(this.configuration,this.workspace,o);if(e){const o=(0,d.translatePosition)(t,{characterDelta:-(r.anchorInfo.anchorPrefix.length+1)}),i=(0,u.makeRange)(o,t);for await(const o of this.provideHeaderSuggestions(e,t,r,i))n.push(o)}}}else for await(const o of this.providePathSuggestions(e,t,r))n.push(o);return n}}}getPathCompletionContext(e,t){const n=(0,i.getLine)(e,t.line),o=n.slice(0,t.character),r=n.slice(t.character),s=o.match(this.linkStartPattern);if(s){const e=s[1].startsWith("<"),n=s[1].slice(e?1:0);if(this.refLooksLikeUrl(n))return;const o=r.match(/^[^\)\s][^\)\s\>]*/);return{kind:h.Link,linkPrefix:g(n),linkTextStartPosition:(0,d.translatePosition)(t,{characterDelta:-n.length}),linkSuffix:o?o[0]:"",anchorInfo:this.getAnchorContext(n),skipEncoding:e}}const a=o.match(this.definitionPattern);if(a){const e=a[1].startsWith("<"),n=a[1].slice(e?1:0);if(this.refLooksLikeUrl(n))return;const o=r.match(/^[^\s]*/);return{kind:h.LinkDefinition,linkPrefix:g(n),linkTextStartPosition:(0,d.translatePosition)(t,{characterDelta:-n.length}),linkSuffix:o?o[0]:"",anchorInfo:this.getAnchorContext(n),skipEncoding:e}}const c=o.match(this.referenceLinkStartPattern);if(c){const e=c[2],n=r.match(/^[^\]\s]*/);return{kind:h.ReferenceLink,linkPrefix:e,linkTextStartPosition:(0,d.translatePosition)(t,{characterDelta:-e.length}),linkSuffix:n?n[0]:""}}}refLooksLikeUrl(e){return/^\s*[\w\d\-]+:/.test(e)}getAnchorContext(e){const t=e.match(/^(.*)#([\w\d\-]*)$/);if(t)return{beforeAnchor:t[1],anchorPrefix:t[2]}}async*provideReferenceSuggestions(e,t,n){const o=(0,u.makeRange)(n.linkTextStartPosition,t),r=(0,u.makeRange)(o.start,(0,d.translatePosition)(t,{characterDelta:n.linkSuffix.length})),{definitions:i}=await this.linkProvider.getLinks(e);for(const[e,t]of i)yield{kind:a.CompletionItemKind.Reference,label:t.ref.text,textEdit:{newText:t.ref.text,insert:o,replace:r}}}async*provideHeaderSuggestions(e,t,n,o){const i=await r.TableOfContents.createForContainingDoc(this.parser,this.workspace,e);for(const e of i.entries){const r=(0,u.makeRange)(o.start,(0,d.translatePosition)(t,{characterDelta:n.linkSuffix.length})),i="#"+decodeURIComponent(e.slug.value);yield{kind:a.CompletionItemKind.Reference,label:i,textEdit:{newText:i,insert:o,replace:r}}}}async*providePathSuggestions(e,t,n){const o=n.linkPrefix.substring(0,n.linkPrefix.lastIndexOf("/")+1),r=this.resolveReference(e,o||".");if(!r)return;const i=(0,d.translatePosition)(t,{characterDelta:o.length-n.linkPrefix.length}),s=(0,u.makeRange)(i,t),c=(0,d.translatePosition)(t,{characterDelta:n.linkSuffix.length}),l=(0,u.makeRange)(i,c);let f;try{f=await this.workspace.readDirectory(r)}catch{return}for(const[e,t]of f){if(e.startsWith("."))continue;const o=!!t.isDirectory,r=(n.skipEncoding?e:encodeURIComponent(e))+(o?"/":"");yield{label:o?e+"/":e,kind:o?a.CompletionItemKind.Folder:a.CompletionItemKind.File,textEdit:{newText:r,insert:s,replace:l},command:o?{command:"editor.action.triggerSuggest",title:""}:void 0}}}resolveReference(e,t){const n=this.getFileUriOfTextDocument(e);if(t.startsWith("/")){const e=(0,c.getWorkspaceFolder)(this.workspace,n);return e?l.Utils.joinPath(e,t):this.resolvePath(n,t.slice(1))}return this.resolvePath(n,t)}resolvePath(e,t){try{return e.scheme===s.Schemes.file?l.URI.file((0,o.resolve)((0,o.dirname)(e.fsPath),t)):e.with({path:(0,o.resolve)((0,o.dirname)(e.path),t)})}catch{return}}getFileUriOfTextDocument(e){return this.workspace.getContainingDocument?.(l.URI.parse(e.uri))?.uri??l.URI.parse(e.uri)}}},2891:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MdReferencesProvider=void 0;const o=n(7373),r=n(7373),i=n(9136),s=n(6080),a=n(5910),c=n(5699),u=n(8223),l=n(1731),d=n(8318),f=n(2835),h=n(121);class g extends u.Disposable{constructor(e,t,n,o,r){super(),this.configuration=e,this.parser=t,this.workspace=n,this.tocProvider=o,this.logger=r;const i=new h.MdLinkComputer(t,n);this._linkCache=this._register(new f.MdWorkspaceInfoCache(n,(e=>i.getAllLinks(e,c.noopToken))))}async provideReferences(e,t,n,o){return(await this.getReferencesAtPosition(e,t,o)).filter((e=>n.includeDeclaration||!e.isDefinition)).map((e=>e.location))}async getReferencesAtPosition(e,t,n){this.logger.log(i.LogLevel.Debug,"ReferencesProvider",`getReferencesAtPosition: ${e.uri}`);const o=await this.tocProvider.getForDocument(e);if(n.isCancellationRequested)return[];const r=o.entries.find((e=>e.line===t.line));return r?this.getReferencesToHeader(e,r):this.getReferencesToLinkAtPosition(e,t,n)}async getReferencesToFileInWorkspace(e,t){this.logger.log(i.LogLevel.Debug,"ReferencesProvider",`getAllReferencesToFileInWorkspace: ${e}`);const n=(await this._linkCache.values()).flat();return t.isCancellationRequested?[]:Array.from(this.findLinksToFile(e,n,void 0))}async getReferencesToFileInDocs(e,t,n){this.logger.log(i.LogLevel.Debug,"ReferencesProvider",`getAllReferencesToFileInFiles: ${e}`);const o=(await this._linkCache.getForDocs(t)).flat();return n.isCancellationRequested?[]:Array.from(this.findLinksToFile(e,o,void 0))}async getReferencesToHeader(e,t){const n=(await this._linkCache.values()).flat(),o=[];o.push({kind:"header",isTriggerLocation:!0,isDefinition:!0,location:t.headerLocation,headerText:t.text,headerTextLocation:t.headerTextLocation});for(const i of n)"internal"===i.href.kind&&this.looksLikeLinkToDoc(i.href,r.URI.parse(e.uri))&&this.parser.slugifier.fromHeading(i.href.fragment).value===t.slug.value&&o.push({kind:"link",isTriggerLocation:!1,isDefinition:!1,link:i,location:{uri:i.source.resource.toString(),range:i.source.hrefRange}});return o}async getReferencesToLinkAtPosition(e,t,n){const o=(await this._linkCache.getForDocs([e]))[0];for(const i of o)if("definition"===i.kind){if((0,a.rangeContains)(i.ref.range,t))return Array.from(this.getReferencesToLinkReference(o,i.ref.text,{resource:r.URI.parse(e.uri),range:i.ref.range}));if((0,a.rangeContains)(i.source.hrefRange,t))return this.getReferencesToLink(i,t,n)}else if((0,a.rangeContains)(i.source.hrefRange,t))return this.getReferencesToLink(i,t,n);return[]}async getReferencesToLink(e,t,n){const o=(await this._linkCache.values()).flat();if(n.isCancellationRequested)return[];if("reference"===e.href.kind)return Array.from(this.getReferencesToLinkReference(o,e.href.ref,{resource:e.source.resource,range:e.source.hrefRange}));if("external"===e.href.kind){const t=[];for(const n of o)if("external"===n.href.kind&&n.href.uri.toString()===e.href.uri.toString()){const o=e.source.resource.fsPath===n.source.resource.fsPath&&(0,a.areRangesEqual)(e.source.hrefRange,n.source.hrefRange);t.push({kind:"link",isTriggerLocation:o,isDefinition:!1,link:n,location:{uri:n.source.resource.toString(),range:n.source.hrefRange}})}return t}const r=await(0,d.statLinkToMarkdownFile)(this.configuration,this.workspace,e.href.path);if(n.isCancellationRequested)return[];const i=[];if(r&&this.isMarkdownPath(r)&&e.href.fragment&&e.source.fragmentRange&&(0,a.rangeContains)(e.source.fragmentRange,t)){const t=(await this.tocProvider.get(r)).lookup(e.href.fragment);t&&i.push({kind:"header",isTriggerLocation:!1,isDefinition:!0,location:t.headerLocation,headerText:t.text,headerTextLocation:t.headerTextLocation});for(const t of o)if("internal"===t.href.kind&&this.looksLikeLinkToDoc(t.href,r)&&this.parser.slugifier.fromHeading(t.href.fragment).equals(this.parser.slugifier.fromHeading(e.href.fragment))){const n=e.source.resource.fsPath===t.source.resource.fsPath&&(0,a.areRangesEqual)(e.source.hrefRange,t.source.hrefRange);i.push({kind:"link",isTriggerLocation:n,isDefinition:!1,link:t,location:{uri:t.source.resource.toString(),range:t.source.hrefRange}})}}else i.push(...this.findLinksToFile(r??e.href.path,o,e));return i}isMarkdownPath(e){return this.workspace.hasMarkdownDocument(e)||(0,l.looksLikeMarkdownPath)(this.configuration,e)}looksLikeLinkToDoc(e,t){return e.path.fsPath===t.fsPath||""===o.Utils.extname(e.path)&&e.path.with({path:e.path.path+".md"}).fsPath===t.fsPath}*findLinksToFile(e,t,n){for(const o of t){if("internal"!==o.href.kind||!this.looksLikeLinkToDoc(o.href,e))continue;if(o.source.hrefText.startsWith("#")&&o.source.resource.fsPath===e.fsPath)continue;const t=!!n&&n.source.resource.fsPath===o.source.resource.fsPath&&(0,a.areRangesEqual)(n.source.hrefRange,o.source.hrefRange),r=this.getPathRange(o);yield{kind:"link",isTriggerLocation:t,isDefinition:!1,link:o,location:{uri:o.source.resource.toString(),range:r}}}}*getReferencesToLinkReference(e,t,n){for(const o of e){let e;if("definition"===o.kind)e=o.ref.text;else{if("reference"!==o.href.kind)continue;e=o.href.ref}if(e===t&&o.source.resource.fsPath===n.resource.fsPath){const e=n.resource.fsPath===o.source.resource.fsPath&&("reference"===o.href.kind&&(0,a.areRangesEqual)(n.range,o.source.hrefRange)||"definition"===o.kind&&(0,a.areRangesEqual)(n.range,o.ref.range)),t=this.getPathRange(o);yield{kind:"link",isTriggerLocation:e,isDefinition:"definition"===o.kind,link:o,location:{uri:n.resource.toString(),range:t}}}}}getPathRange(e){return e.source.fragmentRange?(0,a.modifyRange)(e.source.hrefRange,void 0,(0,s.translatePosition)(e.source.fragmentRange.start,{characterDelta:-1})):e.source.hrefRange}}t.MdReferencesProvider=g},9965:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MdRenameProvider=void 0;const o=n(5622),r=n(1674),i=n(7373),s=n(6080),a=n(5910),c=n(8223),u=n(8318),l=n(121);function d(e){try{return decodeURI(e)}catch{return e}}class f extends c.Disposable{constructor(e,t,n,o){super(),this.configuration=e,this.workspace=t,this.referencesProvider=n,this.slugifier=o,this.renameNotSupportedText="Rename not supported at location"}async prepareRename(e,t,n){const o=await this.getAllReferences(e,t,n);if(n.isCancellationRequested)return;if(!o||!o.references.length)throw new Error(this.renameNotSupportedText);const r=o.triggerRef;switch(r.kind){case"header":return{range:r.headerTextLocation.range,placeholder:r.headerText};case"link":{if("definition"===r.link.kind&&(0,a.rangeContains)(r.link.ref.range,t))return{range:r.link.ref.range,placeholder:r.link.ref.text};if("external"===r.link.href.kind)return{range:r.link.source.hrefRange,placeholder:e.getText(r.link.source.hrefRange)};const{fragmentRange:n}=r.link.source;if(n&&(0,a.rangeContains)(n,t)){const t=this.findHeaderDeclaration(o.references);return t?{range:n,placeholder:t.headerText}:{range:n,placeholder:e.getText(n)}}const i=this.getFilePathRange(r);if(!i)throw new Error(this.renameNotSupportedText);return{range:i,placeholder:d(e.getText(i))}}}}getFilePathRange(e){return e.link.source.fragmentRange?(0,a.modifyRange)(e.link.source.hrefRange,void 0,(0,s.translatePosition)(e.link.source.fragmentRange.start,{characterDelta:-1})):e.link.source.hrefRange}findHeaderDeclaration(e){return e.find((e=>e.isDefinition&&"header"===e.kind))}async provideRenameEdits(e,t,n,o){return(await this.provideRenameEditsImpl(e,t,n,o))?.edit}async provideRenameEditsImpl(e,t,n,o){const r=await this.getAllReferences(e,t,o);if(o.isCancellationRequested||!r||!r.references.length)return;const i=r.triggerRef;return"link"===i.kind&&("definition"===i.link.kind&&(0,a.rangeContains)(i.link.ref.range,t)||"reference"===i.link.href.kind)?this.renameReferenceLinks(r,n):"link"===i.kind&&"external"===i.link.href.kind?this.renameExternalLink(r,n):"header"===i.kind||"link"===i.kind&&i.link.source.fragmentRange&&(0,a.rangeContains)(i.link.source.fragmentRange,t)&&("definition"===i.link.kind||"link"===i.link.kind&&"internal"===i.link.href.kind)?this.renameFragment(r,n):"link"!==i.kind||i.link.source.fragmentRange&&(0,a.rangeContains)(i.link.source.fragmentRange,t)||"link"!==i.link.kind&&"definition"!==i.link.kind||"internal"!==i.link.href.kind?void 0:this.renameFilePath(i.link.source.resource,i.link.href,r,n)}async renameFilePath(e,t,n,r){const s=new h,a=[],c=await(0,u.statLinkToMarkdownFile)(this.configuration,this.workspace,t.path)??t.path,d=(0,l.resolveDocumentLink)(e,r,this.workspace);if(!d)return{edit:s.getEdit()};let f=d.path;i.Utils.extname(f)||i.Utils.extname(c)&&(f=f.with({path:f.path+".md"})),await this.workspace.stat(c)&&(a.push({from:c,to:f}),s.renameFile(c,f));for(const e of n.references)if("link"===e.kind){let t;if(e.link.source.hrefText.startsWith("/")){const n=(0,l.resolveDocumentLink)(e.link.source.resource,"/",this.workspace);if(!n)continue;t="/"+o.relative(n.path.toString(!0),d.path.toString(!0))}else{const n=i.Utils.dirname(e.link.source.resource);n.scheme===d.path.scheme&&"untitled"!==n.scheme?(t=o.relative(n.toString(!0),d.path.toString(!0)),(r.startsWith("./")&&!t.startsWith("../")||r.startsWith(".\\")&&!t.startsWith("..\\"))&&(t="./"+t)):t=r}s.replace(e.link.source.resource,this.getFilePathRange(e),encodeURI(t.replace(/\\/g,"/")))}return{edit:s.getEdit(),fileRenames:a}}renameFragment(e,t){const n=this.slugifier.fromHeading(t).value,o=new h;for(const r of e.references)switch(r.kind){case"header":o.replace(i.URI.parse(r.location.uri),r.headerTextLocation.range,t);break;case"link":o.replace(r.link.source.resource,r.link.source.fragmentRange??r.location.range,r.link.source.fragmentRange&&"external"!==r.link.href.kind?n:t)}return{edit:o.getEdit()}}renameExternalLink(e,t){const n=new h;for(const o of e.references)"link"===o.kind&&n.replace(o.link.source.resource,o.location.range,t);return{edit:n.getEdit()}}renameReferenceLinks(e,t){const n=new h;for(const o of e.references)"link"===o.kind&&("definition"===o.link.kind?n.replace(o.link.source.resource,o.link.ref.range,t):n.replace(o.link.source.resource,o.link.source.fragmentRange??o.location.range,t));return{edit:n.getEdit()}}async getAllReferences(e,t,n){const o=e.version;if(this.cachedRefs&&this.cachedRefs.resource.fsPath===i.URI.parse(e.uri).fsPath&&this.cachedRefs.version===e.version&&(0,s.arePositionsEqual)(this.cachedRefs.position,t))return this.cachedRefs;const r=await this.referencesProvider.getReferencesAtPosition(e,t,n),a=r.find((e=>e.isTriggerLocation));return a?(this.cachedRefs={resource:i.URI.parse(e.uri),version:o,position:t,references:r,triggerRef:a},this.cachedRefs):void 0}}t.MdRenameProvider=f;class h{constructor(){this.edit={changes:{}}}replace(e,t,n){const o=e.toString();let i=this.edit.changes[o];i||(i=[],this.edit.changes[o]=i),i.push(r.TextEdit.replace(t,n))}getEdit(){return this.edit}renameFile(e,t){this.edit.documentChanges||(this.edit.documentChanges=[]),this.edit.documentChanges.push(r.RenameFile.create(e.toString(),t.toString()))}}},401:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MdSelectionRangeProvider=void 0;const o=n(9136),r=n(6080),i=n(5910),s=n(5875),a=n(3568);function c(e,t,n,o,s){const a=e.sectionLocation.range,c=(0,i.makeRange)((0,r.translatePosition)(a.start,{lineDelta:1}),a.end);return n&&t&&s?h((0,i.modifyRange)(a,void 0,s),h(a,o)):n&&t?h(a,o):t&&s?h((0,i.modifyRange)(c,void 0,s),h(c,h(a,o))):h(c,h(a,o))}function u(e,t,n,o){if("fence"===e.type)return function(e,t,n,o){const r=e.map[0],a=e.map[1]-1,c=t===r||t===a,u=(0,i.makeRange)(r,0,a,(0,s.getLine)(n,a).length),l=a-r>2&&!c?(0,i.makeRange)(r+1,0,a-1,(0,s.getLine)(n,a-1).length):void 0;return l?h(l,h(u,o)):o&&(0,i.areRangesEqual)(o.range,u)?o:h(u,o)}(e,n,t,o);{let c=(0,a.isEmptyOrWhitespace)((0,s.getLine)(t,e.map[0]))?e.map[0]+1:e.map[0],u=c===e.map[1]?e.map[1]:e.map[1]-1;"paragraph_open"===e.type&&e.map[1]-e.map[0]==2?c=u=n:(r=e).type&&["ordered_list_open","list_item_open","bullet_list_open"].includes(r.type)&&(0,a.isEmptyOrWhitespace)((0,s.getLine)(t,u))&&(u-=1);const l=(0,i.makeRange)(c,0,u,(0,s.getLine)(t,u).length);return o&&(0,i.rangeContains)(o.range,l)&&!(0,i.areRangesEqual)(o.range,l)?h(l,o):o&&(0,i.areRangesEqual)(o.range,l)?o:h(l,void 0)}var r}function l(e,t,n,o){const r=[...e.matchAll(/\*\*([^*]+\*?[^*]+\*?[^*]+)\*\*/gim)].filter((n=>e.indexOf(n[0])<=t&&e.indexOf(n[0])+n[0].length>=t));if(r.length){const s=r[0][0],a=e.indexOf(s),c=t===a||t===a+1||t===a+s.length||t===a+s.length-1,u=h((0,i.makeRange)(n,a,n,a+s.length),o),l=h((0,i.makeRange)(n,a+2,n,a+s.length-2),u);return c?u:l}}function d(e,t,n,o,r){const s=[/(?:[^*]+)(\*([^*]+)(?:\*\*[^*]*\*\*)*([^*]+)\*)(?:[^*]+)/g,/^(?:[^*]*)(\*([^*]+)(?:\*\*[^*]*\*\*)*([^*]+)\*)(?:[^*]*)$/g];let a=[];if(o?(a=[...e.matchAll(s[0])].filter((n=>e.indexOf(n[0])<=t&&e.indexOf(n[0])+n[0].length>=t)),a.length||(a=[...e.matchAll(s[1])].filter((n=>e.indexOf(n[0])<=t&&e.indexOf(n[0])+n[0].length>=t)))):a=[...e.matchAll(/\`[^\`]*\`/g)].filter((n=>e.indexOf(n[0])<=t&&e.indexOf(n[0])+n[0].length>=t)),a.length){const s=o?a[0][1]:a[0][0],c=e.indexOf(s),u=t===c||t===c+s.length,l=h((0,i.makeRange)(n,c,n,c+s.length),r),d=h((0,i.makeRange)(n,c+1,n,c+s.length-1),l);return u?l:d}}function f(e,t,n){let o;if(t&&n){const a=n.filter((e=>(0,i.rangeContains)(t.sectionLocation.range,e.sectionLocation.range)&&e.sectionLocation.range.start.line>t.sectionLocation.range.start.line)).sort(((e,t)=>e.line-t.line));if(a.length>0){o=a[0].sectionLocation.range.start;const t=(0,s.getLine)(e,o.line-1);return o?(0,r.translatePosition)(o,{lineDelta:-1,characterDelta:t.length}):void 0}}}function h(e,t){return{range:e,parent:t}}t.MdSelectionRangeProvider=class{constructor(e,t,n){this.parser=e,this.tocProvider=t,this.logger=n}async provideSelectionRanges(e,t,n){return this.logger.log(o.LogLevel.Debug,"MdSelectionRangeProvider",`provideSelectionRanges - ${e.uri}`),(await Promise.all(t.map((t=>this.provideSelectionRange(e,t))))).filter((e=>void 0!==e))}async provideSelectionRange(e,t){const n=await this.getHeaderSelectionRange(e,t),o=await this.getBlockSelectionRange(e,t,n);return await this.getInlineSelectionRange(e,t,o)||o||n}async getInlineSelectionRange(e,t,n){return function(e,t,n){const o=(0,s.getLine)(e,t.line),r=l(o,t.character,t.line,n),a=d(o,t.character,t.line,!0,n);let c;r&&a&&!(0,i.areRangesEqual)(r.range,a.range)&&((0,i.rangeContains)(r.range,a.range)?c=d(o,t.character,t.line,!0,r):(0,i.rangeContains)(a.range,r.range)&&(c=l(o,t.character,t.line,a)));const u=function(e,t,n,o){const r=[...e.matchAll(/(\[[^\(\)]*\])(\([^\[\]]*\))/g)].filter((n=>e.indexOf(n[0])<=t&&e.indexOf(n[0])+n[0].length>t));if(r.length){const s=r[0][0],a=h((0,i.makeRange)(n,e.indexOf(s),n,e.indexOf(s)+s.length),o),c=r[0][1],u=r[0][2],l=t>=e.indexOf(c)&&t<e.indexOf(c)+c.length?c:u,d=e.indexOf(l),f=t===d||t===d+l.length,g=h((0,i.makeRange)(n,d,n,d+l.length),a),p=h((0,i.makeRange)(n,d+1,n,d+l.length-1),g);return f?g:p}}(o,t.character,t.line,c||r||a||n);return d(o,t.character,t.line,!1,u||n)||u||c||r||a}(e,t,n)}async getBlockSelectionRange(e,t,n){const o=function(e,t,n){const o=e.filter((e=>!!e.map&&e.map[0]<=t.line&&e.map[1]>t.line&&(!n||e.map[0]>=n.range.start.line&&e.map[1]<=n.range.end.line+1)&&function(e){return!["list_item_close","paragraph_close","bullet_list_close","inline","heading_close","heading_open"].includes(e.type)}(e)));return 0===o.length?[]:o.sort(((e,t)=>t.map[1]-t.map[0]-(e.map[1]-e.map[0])))}(await this.parser.tokenize(e),t,n);if(0===o.length)return;let r=n||u(o.shift(),e,t.line);for(let n=0;n<o.length;n++)r=u(o[n],e,t.line,r);return r}async getHeaderSelectionRange(e,t){const n=await this.tocProvider.getForDocument(e),o=function(e,t){return{headers:e.filter((e=>e.sectionLocation.range.start.line<=t.line&&e.sectionLocation.range.end.line>=t.line)).sort(((e,n)=>e.line-t.line-(n.line-t.line))),headerOnThisLine:void 0!==e.find((e=>e.line===t.line))}}(n.entries,t),r=o.headers;let i;for(let t=0;t<r.length;t++)i=c(r[t],t===r.length-1,o.headerOnThisLine,i,f(e,r[t],n.entries));return i}}},6188:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MdWorkspaceSymbolProvider=void 0;const o=n(8223),r=n(2835);class i extends o.Disposable{constructor(e,t){super(),this._cache=this._register(new r.MdWorkspaceInfoCache(e,(e=>t.provideDocumentSymbolInformation(e))))}async provideWorkspaceSymbols(e,t){return(await this._cache.values()).flat().filter((t=>-1!==t.name.toLowerCase().indexOf(e.toLowerCase())))}}t.MdWorkspaceSymbolProvider=i},9136:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevel=void 0,(n=t.LogLevel||(t.LogLevel={})).Debug="Debug",n.Trace="Trace"},5001:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.githubSlugifier=t.Slug=void 0;class n{constructor(e){this.value=e}equals(e){return this.value===e.value}}t.Slug=n,t.githubSlugifier=new class{fromHeading(e){const t=encodeURI(e.trim().toLowerCase().replace(/\s+/g,"-").replace(/[\]\[\!\/\'\"\#\$\%\&\(\)\*\+\,\.\/\:\;\<\=\>\?\@\\\^\_\{\|\}\~\`。,、;:?!…—·ˉ¨‘’“”々~‖∶"'`|〃〔〕〈〉《》「」『』.〖〗【】()[]{}]/g,"").replace(/^-+/,"").replace(/-+$/,""));return new n(t)}}},9877:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MdTableOfContentsProvider=t.TableOfContents=void 0;const o=n(7373),r=n(9136),i=n(5001),s=n(5910),a=n(5875),c=n(8223),u=n(2835);class l{constructor(e,t){this.entries=e,this.slugifier=t}static async create(e,t){const n=await this.buildToc(e,t);return new l(n,e.slugifier)}static async createForContainingDoc(e,t,n){const r=t.getContainingDocument?.(o.URI.parse(n.uri));if(r){const n=[];return await Promise.all(Array.from(r.children,(async o=>{const r=await t.openMarkdownDocument(o.uri);r&&n.push(...await this.buildToc(e,r))}))),new l(n,e.slugifier)}return this.create(e,n)}static async buildToc(e,t){const n=o.URI.parse(t.uri),r=[],i=await e.tokenize(t),c=new Map;for(const o of i.filter((e=>"heading_open"===e.type))){if(!o.map)continue;const i=o.map[0],u=(0,a.getLine)(t,i);let d=e.slugifier.fromHeading(u);const f=c.get(d.value);f?(++f.count,d=e.slugifier.fromHeading(d.value+"-"+f.count)):c.set(d.value,{count:0});const h={uri:n.toString(),range:(0,s.makeRange)(i,0,i,u.length)},g={uri:n.toString(),range:(0,s.makeRange)(i,u.match(/^#+\s*/)?.[0].length??0,i,u.length-(u.match(/\s*#*$/)?.[0].length??0))};r.push({slug:d,text:l.getHeaderText(u),level:l.getHeaderLevel(o.markup),line:i,sectionLocation:h,headerLocation:h,headerTextLocation:g})}return r.map(((e,o)=>{let i;for(let t=o+1;t<r.length;++t)if(r[t].level<=e.level){i=r[t].line-1;break}const c=i??t.lineCount-1;return{...e,sectionLocation:{uri:n.toString(),range:(0,s.makeRange)(e.sectionLocation.range.start,{line:c,character:(0,a.getLine)(t,c).length})}}}))}static getHeaderLevel(e){return"="===e?1:"-"===e?2:e.length}static getHeaderText(e){return e.replace(/^\s*#+\s*(.*?)(\s+#+)?$/,((e,t)=>t.trim()))}lookup(e){const t=this.slugifier.fromHeading(e);return this.entries.find((e=>e.slug.equals(t)))}}t.TableOfContents=l,l.empty=new l([],i.githubSlugifier);class d extends c.Disposable{constructor(e,t,n){super(),this.logger=n,this._cache=this._register(new u.MdDocumentInfoCache(t,(t=>(this.logger.log(r.LogLevel.Debug,"TableOfContentsProvider",`create - ${t.uri}`),l.create(e,t)))))}async get(e){return await this._cache.get(e)??l.empty}getForDocument(e){return this._cache.getForDocument(e)}}t.MdTableOfContentsProvider=d},6080:(e,t)=>{function n(e,t){return e.line<t.line||!(t.line<e.line)&&e.character<=t.character}Object.defineProperty(t,"__esModule",{value:!0}),t.comparePosition=t.isAfter=t.isBeforeOrEqual=t.isBefore=t.translatePosition=t.isPosition=t.arePositionsEqual=void 0,t.arePositionsEqual=function(e,t){return e.line===t.line&&e.character===t.character},t.isPosition=function(e){if(!e)return!1;const{line:t,character:n}=e;return"number"==typeof t&&"number"==typeof n},t.translatePosition=function(e,t){return{line:e.line+(t.lineDelta??0),character:e.character+(t.characterDelta??0)}},t.isBefore=function(e,t){return e.line<t.line||!(t.line<e.line)&&e.character<t.character},t.isBeforeOrEqual=n,t.isAfter=function(e,t){return!n(e,t)},t.comparePosition=function(e,t){return e.line<t.line?-1:e.line>t.line?1:e.character<t.character?-1:e.character>t.character?1:0}},5910:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.rangeContains=t.modifyRange=t.areRangesEqual=t.makeRange=t.isRange=void 0;const o=n(6080);function r(e){return!!e&&(0,o.isPosition)(e.start)&&(0,o.isPosition)(e.end)}t.isRange=r,t.makeRange=function(e,t,n,o){return"number"==typeof e?{start:{line:e,character:t},end:{line:n,character:o}}:{start:e,end:t}},t.areRangesEqual=function(e,t){return(0,o.arePositionsEqual)(e.start,t.start)&&(0,o.arePositionsEqual)(e.end,t.end)},t.modifyRange=function(e,t,n){return{start:t??e.start,end:n??e.end}},t.rangeContains=function e(t,n){return r(n)?e(t,n.start)&&e(t,n.end):!(0,o.isBefore)(n,t.start)&&!(0,o.isBefore)(t.end,n)}},5875:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getLine=void 0;const o=n(5910);t.getLine=function(e,t){return e.getText((0,o.makeRange)(t,0,t,Number.MAX_VALUE)).replace(/\r?\n$/,"")}},8825:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.coalesce=void 0,t.coalesce=function(e){return e.filter((e=>!!e))}},5699:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.noopToken=void 0;const o=n(5809);t.noopToken=new class{constructor(){this._onCancellationRequestedEmitter=new o.Emitter,this.onCancellationRequested=this._onCancellationRequestedEmitter.event}get isCancellationRequested(){return!1}}},8223:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DisposableStore=t.Disposable=t.disposeAll=t.MultiDisposeError=void 0;class n extends Error{constructor(e){super(`Encountered errors while disposing of store. Errors: [${e.join(", ")}]`),this.errors=e}}function o(e){const t=[];for(const n of e)try{n.dispose()}catch(e){t.push(e)}if(1===t.length)throw t[0];if(t.length>1)throw new n(t)}t.MultiDisposeError=n,t.disposeAll=o;class r{constructor(){this._isDisposed=!1,this._disposables=[]}dispose(){this._isDisposed||(this._isDisposed=!0,o(this._disposables))}_register(e){return this._isDisposed?e.dispose():this._disposables.push(e),e}get isDisposed(){return this._isDisposed}}t.Disposable=r,t.DisposableStore=class extends r{constructor(){super(...arguments),this.items=new Set}dispose(){super.dispose(),o(this.items),this.items.clear()}add(e){return this.isDisposed&&console.warn("Adding to disposed store. Item will be leaked"),this.items.add(e),e}}},1731:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.looksLikeMarkdownPath=void 0;const o=n(7373);t.looksLikeMarkdownPath=function(e,t){return e.markdownFileExtensions.includes(o.Utils.extname(o.URI.from(t)).toLowerCase().replace(".",""))}},3125:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.lazy=void 0;class n{constructor(e){this._getValue=e,this._hasValue=!1}get value(){return this._hasValue||(this._hasValue=!0,this._value=this._getValue()),this._value}get hasValue(){return this._hasValue}map(e){return new n((()=>e(this.value)))}}t.lazy=function(e){return new n(e)}},5288:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Limiter=void 0,t.Limiter=class{constructor(e){this._size=0,this.maxDegreeOfParalellism=e,this.outstandingPromises=[],this.runningPromises=0}get size(){return this._size}queue(e){return this._size++,new Promise(((t,n)=>{this.outstandingPromises.push({factory:e,c:t,e:n}),this.consume()}))}consume(){for(;this.outstandingPromises.length&&this.runningPromises<this.maxDegreeOfParalellism;){const e=this.outstandingPromises.shift();this.runningPromises++;const t=e.factory();t.then(e.c,e.e),t.then((()=>this.consumed()),(()=>this.consumed()))}}consumed(){this._size--,this.runningPromises--,this.outstandingPromises.length>0&&this.consume()}}},6930:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceMap=void 0;const n=e=>e.toString();class o{constructor(e=n){this.map=new Map,this.toKey=e}set(e,t){return this.map.set(this.toKey(e),{uri:e,value:t}),this}get(e){return this.map.get(this.toKey(e))?.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}*values(){for(const e of this.map.values())yield e.value}*keys(){for(const e of this.map.values())yield e.uri}*entries(){for(const e of this.map.values())yield[e.uri,e.value]}[Symbol.iterator](){return this.entries()}}t.ResourceMap=o},3052:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Schemes=void 0,t.Schemes=Object.freeze({file:"file",untitled:"untitled"})},3568:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.r=t.isEmptyOrWhitespace=void 0,t.isEmptyOrWhitespace=function(e){return/^\s*$/.test(e)},t.r=String.raw},8318:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.statLinkToMarkdownFile=t.openLinkToMarkdownFile=t.getWorkspaceFolder=t.isWorkspaceWithFileWatching=void 0;const o=n(7373);function r(e,t){const n=o.Utils.extname(t).toLowerCase().replace(/^\./,"");if(""===n||!e.markdownFileExtensions.includes(n)&&!e.knownLinkedToFileExtensions.includes(n))return t.with({path:t.path+".md"})}t.isWorkspaceWithFileWatching=function(e){return"watchFile"in e},t.getWorkspaceFolder=function(e,t){if(0===e.workspaceFolders.length)return;const n=e.workspaceFolders.filter((e=>e.scheme===t.scheme&&e.authority===t.authority&&(t.fsPath.startsWith(e.fsPath+"/")||t.fsPath.startsWith(e.path+"\\")))).sort(((e,t)=>t.fsPath.length-e.fsPath.length));return n.length?n[0]:e.workspaceFolders[0]},t.openLinkToMarkdownFile=async function(e,t,n){try{const e=await t.openMarkdownDocument(n);if(e)return e}catch{}const o=r(e,n);if(o)return t.openMarkdownDocument(o)},t.statLinkToMarkdownFile=async function(e,t,n,o){const i=async e=>{const n=await t.stat(e);return o?.set(e,{exists:!!n}),!!n};if(await i(n))return n;const s=r(e,n);return s&&await i(s)?s:void 0}},2835:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MdWorkspaceInfoCache=t.MdDocumentInfoCache=void 0;const o=n(7373),r=n(8223),i=n(3125),s=n(6930);class a{constructor(){this._map=new s.ResourceMap}has(e){return this._map.has(e)}get(e){return this._map.get(e)?.value}set(e,t){this._map.set(e,t)}delete(e){this._map.delete(e)}entries(){return Promise.all(Array.from(this._map.entries(),(async([e,t])=>[e,await t.value])))}}class c extends r.Disposable{constructor(e,t){super(),this.workspace=e,this.getValue=t,this._cache=new a,this._loadingDocuments=new s.ResourceMap,this._register(this.workspace.onDidChangeMarkdownDocument((e=>this.invalidate(e)))),this._register(this.workspace.onDidDeleteMarkdownDocument(this.onDidDeleteDocument,this))}async get(e){let t=this._cache.get(e);if(t)return t;const n=await this.loadDocument(e);return n?(t=this._cache.get(e),t||this.resetEntry(n)?.value):void 0}async getForDocument(e){return this._cache.get(o.URI.parse(e.uri))||this.resetEntry(e).value}loadDocument(e){const t=this._loadingDocuments.get(e);if(t)return t;const n=this.workspace.openMarkdownDocument(e);return this._loadingDocuments.set(e,n),n.finally((()=>{this._loadingDocuments.delete(e)})),n}resetEntry(e){const t=(0,i.lazy)((()=>this.getValue(e)));return this._cache.set(o.URI.parse(e.uri),t),t}invalidate(e){this._cache.has(o.URI.parse(e.uri))&&this.resetEntry(e)}onDidDeleteDocument(e){this._cache.delete(e)}}t.MdDocumentInfoCache=c;class u extends r.Disposable{constructor(e,t){super(),this.workspace=e,this.getValue=t,this._cache=new a}async entries(){return await this.ensureInit(),this._cache.entries()}async values(){return await this.ensureInit(),Array.from(await this._cache.entries(),(e=>e[1]))}async getForDocs(e){for(const t of e)this._cache.has(o.URI.parse(t.uri))||this.update(t);return Promise.all(e.map((e=>this._cache.get(o.URI.parse(e.uri)))))}async ensureInit(){this._init||(this._init=this.populateCache(),this._register(this.workspace.onDidChangeMarkdownDocument(this.onDidChangeDocument,this)),this._register(this.workspace.onDidCreateMarkdownDocument(this.onDidChangeDocument,this)),this._register(this.workspace.onDidDeleteMarkdownDocument(this.onDidDeleteDocument,this))),await this._init}async populateCache(){const e=await this.workspace.getAllMarkdownDocuments();for(const t of e)this._cache.has(o.URI.parse(t.uri))||this.update(t)}update(e){this._cache.set(o.URI.parse(e.uri),(0,i.lazy)((()=>this.getValue(e))))}onDidChangeDocument(e){this.update(e)}onDidDeleteDocument(e){this._cache.delete(e)}}t.MdWorkspaceInfoCache=u},800:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.loadMessageBundle=t.localize=t.format=t.setPseudo=t.isPseudo=t.isDefined=t.BundleFormat=t.MessageFormat=void 0;var o,r,i,s=n(1926);function a(e){return void 0!==e}function c(e,n){return t.isPseudo&&(e="["+e.replace(/[aouei]/g,"$&$&")+"]"),0===n.length?e:e.replace(/\{(\d+)\}/g,(function(e,t){var o=t[0],r=n[o],i=e;return"string"==typeof r?i=r:"number"!=typeof r&&"boolean"!=typeof r&&null!=r||(i=String(r)),i}))}(i=t.MessageFormat||(t.MessageFormat={})).file="file",i.bundle="bundle",i.both="both",(r=t.BundleFormat||(t.BundleFormat={})).standalone="standalone",r.languagePack="languagePack",function(e){e.is=function(e){var t=e;return t&&a(t.key)&&a(t.comment)}}(o||(o={})),t.isDefined=a,t.isPseudo=!1,t.setPseudo=function(e){t.isPseudo=e},t.format=c,t.localize=function(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];return c(t,n)},t.loadMessageBundle=function(e){return(0,s.default)().loadMessageBundle(e)},t.config=function(e){return(0,s.default)().config(e)}},1926:(e,t)=>{var 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},8472:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.loadMessageBundle=t.BundleFormat=t.MessageFormat=void 0;var o=n(5622),r=n(5747),i=n(1926),s=n(800),a=n(800);Object.defineProperty(t,"MessageFormat",{enumerable:!0,get:function(){return a.MessageFormat}}),Object.defineProperty(t,"BundleFormat",{enumerable:!0,get:function(){return a.BundleFormat}});var c,u,l=Object.prototype.toString;function d(e){return"[object Number]"===l.call(e)}function f(e){return"[object String]"===l.call(e)}function h(e){return JSON.parse(r.readFileSync(e,"utf8"))}function g(e){return function(t,n){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];return d(t)?t>=e.length?void console.error("Broken localize call found. Index out of bounds. Stacktrace is\n: ".concat(new Error("").stack)):(0,s.format)(e[t],o):f(n)?(console.warn("Message ".concat(n," didn't get externalized correctly.")),(0,s.format)(n,o)):void console.error("Broken localize call found. Stacktrace is\n: ".concat(new Error("").stack))}}function p(e,t){return c[e]=t,t}function m(e){try{return function(e){var t=h(o.join(e,"nls.metadata.json")),n=Object.create(null);for(var r in t){var i=t[r];n[r]=i.messages}return n}(e)}catch(e){return void console.log("Generating default bundle from meta data failed.",e)}}function y(e,t){var n;if(!0===u.languagePackSupport&&void 0!==u.cacheRoot&&void 0!==u.languagePackId&&void 0!==u.translationsConfigFile&&void 0!==u.translationsConfig)try{n=function(e,t){var n,i,s,a=o.join(u.cacheRoot,"".concat(e.id,"-").concat(e.hash,".json")),c=!1,l=!1;try{return n=JSON.parse(r.readFileSync(a,{encoding:"utf8",flag:"r"})),i=a,s=new Date,r.utimes(i,s,s,(function(){})),n}catch(e){if("ENOENT"===e.code)l=!0;else{if(!(e instanceof SyntaxError))throw e;console.log("Syntax error parsing message bundle: ".concat(e.message,".")),r.unlink(a,(function(e){e&&console.error("Deleting corrupted bundle ".concat(a," failed."))})),c=!0}}if(!(n=function(e,t){var n=u.translationsConfig[e.id];if(n){var r=h(n).contents,i=h(o.join(t,"nls.metadata.json")),s=Object.create(null);for(var a in i){var c=i[a],l=r["".concat(e.outDir,"/").concat(a)];if(l){for(var d=[],g=0;g<c.keys.length;g++){var p=c.keys[g],m=l[f(p)?p:p.key];void 0===m&&(m=c.messages[g]),d.push(m)}s[a]=d}else s[a]=c.messages}return s}}(e,t))||c)return n;if(l)try{r.writeFileSync(a,JSON.stringify(n),{encoding:"utf8",flag:"wx"})}catch(e){if("EEXIST"===e.code)return n;throw e}return n}(e,t)}catch(e){console.log("Load or create bundle failed ",e)}if(!n){if(u.languagePackSupport)return m(t);var i=function(e){for(var t=u.language;t;){var n=o.join(e,"nls.bundle.".concat(t,".json"));if(r.existsSync(n))return n;var i=t.lastIndexOf("-");t=i>0?t.substring(0,i):void 0}if(void 0===t&&(n=o.join(e,"nls.bundle.json"),r.existsSync(n)))return n}(t);if(i)try{return h(i)}catch(e){console.log("Loading in the box message bundle failed.",e)}n=m(t)}return n}function v(e){if(!e)return s.localize;var t=o.extname(e);if(t&&(e=e.substr(0,e.length-t.length)),u.messageFormat===s.MessageFormat.both||u.messageFormat===s.MessageFormat.bundle){var n=function(e){for(var t,n=o.dirname(e);t=o.join(n,"nls.metadata.header.json"),!r.existsSync(t);){var i=o.dirname(n);if(i===n){t=void 0;break}n=i}return t}(e);if(n){var i=o.dirname(n),a=c[i];if(void 0===a)try{var l=JSON.parse(r.readFileSync(n,"utf8"));try{var d=y(l,i);a=p(i,d?{header:l,nlsBundle:d}:null)}catch(e){console.error("Failed to load nls bundle",e),a=p(i,null)}}catch(e){console.error("Failed to read header file",e),a=p(i,null)}if(a){var f=e.substr(i.length+1).replace(/\\/g,"/"),m=a.nlsBundle[f];return void 0===m?(console.error("Messages for file ".concat(e," not found. See console for details.")),function(){return"Messages not found."}):g(m)}}}if(u.messageFormat===s.MessageFormat.both||u.messageFormat===s.MessageFormat.file)try{var v=h(function(e){var t;if(u.cacheLanguageResolution&&t)t=t;else{if(s.isPseudo||!u.language)t=".nls.json";else for(var n=u.language;n;){var o=".nls."+n+".json";if(r.existsSync(e+o)){t=o;break}var i=n.lastIndexOf("-");i>0?n=n.substring(0,i):(t=".nls.json",n=null)}u.cacheLanguageResolution&&(t=t)}return e+t}(e));return Array.isArray(v)?g(v):(0,s.isDefined)(v.messages)&&(0,s.isDefined)(v.keys)?g(v.messages):(console.error("String bundle '".concat(e,"' uses an unsupported format.")),function(){return"File bundle has unsupported format. See console for details"})}catch(e){"ENOENT"!==e.code&&console.error("Failed to load single file bundle",e)}return console.error("Failed to load message bundle for file ".concat(e)),function(){return"Failed to load message bundle. See console for details."}}function R(e){return e&&(f(e.locale)&&(u.locale=e.locale.toLowerCase(),u.language=u.locale,c=Object.create(null)),void 0!==e.messageFormat&&(u.messageFormat=e.messageFormat),e.bundleFormat===s.BundleFormat.standalone&&!0===u.languagePackSupport&&(u.languagePackSupport=!1)),(0,s.setPseudo)("pseudo"===u.locale),v}!function(){if(u={locale:void 0,language:void 0,languagePackSupport:!1,cacheLanguageResolution:!0,messageFormat:s.MessageFormat.bundle},f(process.env.VSCODE_NLS_CONFIG))try{var e=JSON.parse(process.env.VSCODE_NLS_CONFIG),t=void 0;if(e.availableLanguages){var n=e.availableLanguages["*"];f(n)&&(t=n)}if(f(e.locale)&&(u.locale=e.locale.toLowerCase()),void 0===t?u.language=u.locale:"en"!==t&&(u.language=t),function(e){return!0===e||!1===e}(e._languagePackSupport)&&(u.languagePackSupport=e._languagePackSupport),f(e._cacheRoot)&&(u.cacheRoot=e._cacheRoot),f(e._languagePackId)&&(u.languagePackId=e._languagePackId),f(e._translationsConfigFile)){u.translationsConfigFile=e._translationsConfigFile;try{u.translationsConfig=h(u.translationsConfigFile)}catch(t){if(e._corruptedFile){var i=o.dirname(e._corruptedFile);r.exists(i,(function(t){t&&r.writeFile(e._corruptedFile,"corrupted","utf8",(function(e){console.error(e)}))}))}}}}catch(e){}(0,s.setPseudo)("pseudo"===u.locale),c=Object.create(null)}(),t.loadMessageBundle=v,t.config=R,i.default.install(Object.freeze({loadMessageBundle:v,config:R}))},7373:(e,t,n)=>{var o;n.r(t),n.d(t,{URI:()=>r,Utils:()=>i}),o=(()=>{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 f=e.charCodeAt(r+d);if(f!==n.charCodeAt(a+d))break;47===f&&(l=d)}var h="";for(d=r+l+1;d<=i;++d)d!==i&&47!==e.charCodeAt(d)||(0===h.length?h+="..":h+="/..");return h.length>0?h+n.slice(a+l):(a+=l,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),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},447:(e,t,n)=>{var o;if(n.r(t),n.d(t,{URI:()=>p,Utils:()=>P}),"object"==typeof process)o="win32"===process.platform;else if("object"==typeof navigator){var r=navigator.userAgent;o=r.indexOf("Windows")>=0}var i,s,a=(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=/^\w[\w\d+.-]*$/,u=/^\//,l=/^\/\//;function d(e,t){if(!e.scheme&&t)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(e.authority,'", path: "').concat(e.path,'", query: "').concat(e.query,'", fragment: "').concat(e.fragment,'"}'));if(e.scheme&&!c.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!u.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(l.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 ("//")')}var f="",h="/",g=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,p=function(){function e(e,t,n,o,r,i){void 0===i&&(i=!1),"object"==typeof e?(this.scheme=e.scheme||f,this.authority=e.authority||f,this.path=e.path||f,this.query=e.query||f,this.fragment=e.fragment||f):(this.scheme=function(e,t){return e||t?e:"file"}(e,i),this.authority=t||f,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==h&&(t=h+t):t=h}return t}(this.scheme,n||f),this.query=o||f,this.fragment=r||f,d(this,i))}return e.isUri=function(t){return t instanceof e||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString},Object.defineProperty(e.prototype,"fsPath",{get:function(){return k(this,!1)},enumerable:!1,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,n=e.authority,o=e.path,r=e.query,i=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=f),void 0===n?n=this.authority:null===n&&(n=f),void 0===o?o=this.path:null===o&&(o=f),void 0===r?r=this.query:null===r&&(r=f),void 0===i?i=this.fragment:null===i&&(i=f),t===this.scheme&&n===this.authority&&o===this.path&&r===this.query&&i===this.fragment?this:new y(t,n,o,r,i)},e.parse=function(e,t){void 0===t&&(t=!1);var n=g.exec(e);return n?new y(n[2]||f,C(n[4]||f),C(n[5]||f),C(n[7]||f),C(n[9]||f),t):new y(f,f,f,f,f)},e.file=function(e){var t=f;if(o&&(e=e.replace(/\\/g,h)),e[0]===h&&e[1]===h){var n=e.indexOf(h,2);-1===n?(t=e.substring(2),e=h):(t=e.substring(2,n),e=e.substring(n)||h)}return new y("file",t,e,f,f)},e.from=function(e){var t=new y(e.scheme,e.authority,e.path,e.query,e.fragment);return d(t,!0),t},e.prototype.toString=function(e){return void 0===e&&(e=!1),_(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var n=new y(t);return n._formatted=t.external,n._fsPath=t._sep===m?t.fsPath:null,n}return t},e}(),m=o?1:void 0,y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return a(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=k(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?_(this,!0):(this._formatted||(this._formatted=_(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=m),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},t}(p),v=((s={})[58]="%3A",s[47]="%2F",s[63]="%3F",s[35]="%23",s[91]="%5B",s[93]="%5D",s[64]="%40",s[33]="%21",s[36]="%24",s[38]="%26",s[39]="%27",s[40]="%28",s[41]="%29",s[42]="%2A",s[43]="%2B",s[44]="%2C",s[59]="%3B",s[61]="%3D",s[32]="%20",s);function R(e,t){for(var n=void 0,o=-1,r=0;r<e.length;r++){var i=e.charCodeAt(r);if(i>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57||45===i||46===i||95===i||126===i||t&&47===i)-1!==o&&(n+=encodeURIComponent(e.substring(o,r)),o=-1),void 0!==n&&(n+=e.charAt(r));else{void 0===n&&(n=e.substr(0,r));var s=v[i];void 0!==s?(-1!==o&&(n+=encodeURIComponent(e.substring(o,r)),o=-1),n+=s):-1===o&&(o=r)}}return-1!==o&&(n+=encodeURIComponent(e.substring(o))),void 0!==n?n:e}function b(e){for(var t=void 0,n=0;n<e.length;n++){var o=e.charCodeAt(n);35===o||63===o?(void 0===t&&(t=e.substr(0,n)),t+=v[o]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function k(e,t){var n;return n=e.authority&&e.path.length>1&&"file"===e.scheme?"//".concat(e.authority).concat(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&&(n=n.replace(/\//g,"\\")),n}function _(e,t){var n=t?b:R,o="",r=e.scheme,i=e.authority,s=e.path,a=e.query,c=e.fragment;if(r&&(o+=r,o+=":"),(i||"file"===r)&&(o+=h,o+=h),i){var u=i.indexOf("@");if(-1!==u){var l=i.substr(0,u);i=i.substr(u+1),-1===(u=l.indexOf(":"))?o+=n(l,!1):(o+=n(l.substr(0,u),!1),o+=":",o+=n(l.substr(u+1),!1)),o+="@"}-1===(u=(i=i.toLowerCase()).indexOf(":"))?o+=n(i,!1):(o+=n(i.substr(0,u),!1),o+=i.substr(u))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2))(d=s.charCodeAt(1))>=65&&d<=90&&(s="/".concat(String.fromCharCode(d+32),":").concat(s.substr(3)));else if(s.length>=2&&58===s.charCodeAt(1)){var d;(d=s.charCodeAt(0))>=65&&d<=90&&(s="".concat(String.fromCharCode(d+32),":").concat(s.substr(2)))}o+=n(s,!0)}return a&&(o+="?",o+=n(a,!1)),c&&(o+="#",o+=t?c:R(c,!1)),o}function w(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+w(e.substr(3)):e}}var D=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function C(e){return e.match(D)?e.replace(D,(function(e){return w(e)})):e}var P,T=n(470),x=function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},S=T.posix||T;!function(e){e.joinPath=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return e.with({path:S.join.apply(S,x([e.path],t,!1))})},e.resolvePath=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var o=e.path||"/";return e.with({path:S.resolve.apply(S,x([o],t,!1))})},e.dirname=function(e){var t=S.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)?e:e.with({path:t})},e.basename=function(e){return S.basename(e.path)},e.extname=function(e){return S.extname(e.path)}}(P||(P={}))}},t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={exports:{}};return e[o](r,r.exports,n),r.exports}return 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})},n(447)})();const{URI:r,Utils:i}=o},287:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getLsConfiguration=void 0;const n={markdownFileExtensions:["md"]};t.getLsConfiguration=function(e){return{...n,...e}}},2428:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationManager=void 0;const o=n(5809),r=n(3827);class i extends r.Disposable{constructor(e){super(),this._onDidChangeConfiguration=this._register(new o.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._register(e.onDidChangeConfiguration((e=>{this._settings=e.settings,this._onDidChangeConfiguration.fire(this._settings)})))}getSettings(){return this._settings}}t.ConfigurationManager=i},5200:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.registerValidateSupport=void 0;const o=n(8377),r=n(8223),i=n(7373),s={validateFileLinks:o.DiagnosticLevel.ignore,validateReferences:o.DiagnosticLevel.ignore,validateFragmentLinks:o.DiagnosticLevel.ignore,validateMarkdownFileLinkFragments:o.DiagnosticLevel.ignore,ignoreLinks:[]};function a(e){switch(e){case"error":return o.DiagnosticLevel.error;case"warning":return o.DiagnosticLevel.warning;case"ignore":default:return o.DiagnosticLevel.ignore}}t.registerValidateSupport=function(e,t,n,o){let c=s;function u(){c=function(e){const t=e.getSettings();return t?{validateFileLinks:a(t.markdown.experimental.validate.fileLinks.enabled),validateReferences:a(t.markdown.experimental.validate.referenceLinks.enabled),validateFragmentLinks:a(t.markdown.experimental.validate.fragmentLinks.enabled),validateMarkdownFileLinkFragments:a(t.markdown.experimental.validate.fileLinks.markdownFragmentLinks),ignoreLinks:t.markdown.experimental.validate.ignoreLinks}:s}(o)}const l=[],d=n.createPullDiagnosticsManager();return l.push(d),l.push(d.onLinkedToFileChanged((()=>{e.languages.diagnostics.refresh()}))),e.languages.diagnostics.on((async(e,n)=>{if(!o.getSettings()?.markdown.experimental.validate.enabled)return{kind:"full",items:[]};const r=await t.openMarkdownDocument(i.URI.parse(e.textDocument.uri));return r?{kind:"full",items:await d.computeDiagnostics(r,c,n)}:{kind:"full",items:[]}})),u(),l.push(o.onDidChangeConfiguration((()=>{u(),e.languages.diagnostics.refresh()}))),{dispose:()=>{(0,r.disposeAll)(l)}}}},2919:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.consoleLogger=t.LogFunctionLogger=void 0;class n{constructor(e){this._logFn=e}static now(){const e=new Date;return String(e.getUTCHours()).padStart(2,"0")+":"+String(e.getMinutes()).padStart(2,"0")+":"+String(e.getUTCSeconds()).padStart(2,"0")+"."+String(e.getMilliseconds()).padStart(3,"0")}static data2String(e){return e instanceof Error?"string"==typeof e.stack?e.stack:e.message:"string"==typeof e?e:JSON.stringify(e,void 0,2)}log(e,t,o,r){this.appendLine(`[${e} ${n.now()}] ${t}: ${o}`),r&&this.appendLine(n.data2String(r))}appendLine(e){this._logFn(e)}}t.LogFunctionLogger=n,t.consoleLogger=new n(console.log)},9957:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fs_watcher_onChange=t.getReferencesToFileInWorkspace=t.findMarkdownFilesInWorkspace=t.fs_watcher_delete=t.fs_watcher_create=t.fs_stat=t.fs_readDirectory=t.fs_readFile=t.parse=void 0;const o=n(5809);t.parse=new o.RequestType("markdown/parse"),t.fs_readFile=new o.RequestType("markdown/fs/readFile"),t.fs_readDirectory=new o.RequestType("markdown/fs/readDirectory"),t.fs_stat=new o.RequestType("markdown/fs/stat"),t.fs_watcher_create=new o.RequestType("markdown/fs/watcher/create"),t.fs_watcher_delete=new o.RequestType("markdown/fs/watcher/delete"),t.findMarkdownFilesInWorkspace=new o.RequestType("markdown/findMarkdownFilesInWorkspace"),t.getReferencesToFileInWorkspace=new o.RequestType("markdown/getReferencesToFileInWorkspace"),t.fs_watcher_onChange=new o.RequestType("markdown/fs/watcher/onChange")},6519:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.startServer=void 0;const o=n(5809),r=n(6813),i=n(8377),s=n(7373),a=n(287),c=n(2428),u=n(5200),l=n(2919),d=n(9957),f=n(6618);t.startServer=async function(e){const t=new o.TextDocuments(r.TextDocument),n=new o.NotebookDocuments(t),h=new c.ConfigurationManager(e);let g,p;e.onInitialize((o=>{const r=new class{constructor(){this.slugifier=i.githubSlugifier}async tokenize(t){return await e.sendRequest(d.parse,{uri:t.uri.toString()})}},c=(0,a.getLsConfiguration)({markdownFileExtensions:o.initializationOptions.markdownFileExtensions}),m=new l.LogFunctionLogger(e.console.log.bind(e.console));return p=new f.VsCodeClientWorkspace(e,c,t,n,m),g=i.createLanguageService({workspace:p,parser:r,logger:m,markdownFileExtensions:c.markdownFileExtensions}),function(e,t,n,o){e.onCompletion((async(e,r)=>{try{if(!o.getSettings()?.markdown.suggest.paths.enabled)return[];const i=t.get(e.textDocument.uri);if(i)return await n.getCompletionItems(i,e.position,e.context,r)}catch(e){console.error(e.stack)}return[]})),o.onDidChangeConfiguration((()=>{}))}(e,t,g,h),(0,u.registerValidateSupport)(e,p,g,h),p.workspaceFolders=(o.workspaceFolders??[]).map((e=>s.URI.parse(e.uri))),{capabilities:{diagnosticProvider:{documentSelector:null,identifier:"markdown",interFileDependencies:!0,workspaceDiagnostics:!1},completionProvider:{triggerCharacters:[".","/","#"]},definitionProvider:!0,documentLinkProvider:{resolveProvider:!0},documentSymbolProvider:!0,foldingRangeProvider:!0,renameProvider:{prepareProvider:!0},selectionRangeProvider:!0,workspaceSymbolProvider:!0,workspace:{workspaceFolders:{supported:!0,changeNotifications:!0}}}}})),e.onDocumentLinks((async(e,n)=>{try{const o=t.get(e.textDocument.uri);if(o)return await g.getDocumentLinks(o,n)}catch(e){console.error(e.stack)}return[]})),e.onDocumentLinkResolve((async(e,t)=>{try{return await g.resolveDocumentLink(e,t)}catch(e){console.error(e.stack)}})),e.onDocumentSymbol((async(e,n)=>{try{const o=t.get(e.textDocument.uri);if(o)return await g.getDocumentSymbols(o,n)}catch(e){console.error(e.stack)}return[]})),e.onFoldingRanges((async(e,n)=>{try{const o=t.get(e.textDocument.uri);if(o)return await g.getFoldingRanges(o,n)}catch(e){console.error(e.stack)}return[]})),e.onSelectionRanges((async(e,n)=>{try{const o=t.get(e.textDocument.uri);if(o)return await g.getSelectionRanges(o,e.positions,n)}catch(e){console.error(e.stack)}return[]})),e.onWorkspaceSymbol((async(e,t)=>{try{return await g.getWorkspaceSymbols(e.query,t)}catch(e){console.error(e.stack)}return[]})),e.onReferences((async(e,n)=>{try{const o=t.get(e.textDocument.uri);if(o)return await g.getReferences(o,e.position,e.context,n)}catch(e){console.error(e.stack)}return[]})),e.onDefinition((async(e,n)=>{try{const o=t.get(e.textDocument.uri);if(o)return await g.getDefinition(o,e.position,n)}catch(e){console.error(e.stack)}})),e.onPrepareRename((async(e,n)=>{try{const o=t.get(e.textDocument.uri);if(o)return await g.prepareRename(o,e.position,n)}catch(e){console.error(e.stack)}})),e.onRenameRequest((async(e,n)=>{try{const o=t.get(e.textDocument.uri);if(o){const t=await g.getRenameEdit(o,e.position,e.newName,n);return console.log(JSON.stringify(t)),t}}catch(e){console.error(e.stack)}})),e.onRequest(d.getReferencesToFileInWorkspace,(async(e,t)=>{try{return await g.getFileReferences(s.URI.parse(e.uri),t)}catch(e){console.error(e.stack)}})),t.listen(e),n.listen(e),e.listen()}},7598:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.coalesce=void 0,t.coalesce=function(e){return e.filter((e=>!!e))}},3827:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DisposableStore=t.Disposable=t.disposeAll=t.MultiDisposeError=void 0;class n extends Error{constructor(e){super(`Encountered errors while disposing of store. Errors: [${e.join(", ")}]`),this.errors=e}}function o(e){const t=[];for(const n of e)try{n.dispose()}catch(e){t.push(e)}if(1===t.length)throw t[0];if(t.length>1)throw new n(t)}t.MultiDisposeError=n,t.disposeAll=o;class r{constructor(){this._isDisposed=!1,this._disposables=[]}dispose(){this._isDisposed||(this._isDisposed=!0,o(this._disposables))}_register(e){return this._isDisposed?e.dispose():this._disposables.push(e),e}get isDisposed(){return this._isDisposed}}t.Disposable=r,t.DisposableStore=class extends r{constructor(){super(...arguments),this.items=new Set}dispose(){super.dispose(),o(this.items),this.items.clear()}add(e){return this.isDisposed&&console.warn("Adding to disposed store. Item will be leaked"),this.items.add(e),e}}},9116:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isMarkdownFile=t.looksLikeMarkdownPath=void 0;const o=n(7373);t.looksLikeMarkdownPath=function(e,t){return e.markdownFileExtensions.includes(o.Utils.extname(o.URI.from(t)).toLowerCase().replace(".",""))},t.isMarkdownFile=function(e){return"markdown"===e.languageId}},3675:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Limiter=void 0,t.Limiter=class{constructor(e){this._size=0,this.maxDegreeOfParalellism=e,this.outstandingPromises=[],this.runningPromises=0}get size(){return this._size}queue(e){return this._size++,new Promise(((t,n)=>{this.outstandingPromises.push({factory:e,c:t,e:n}),this.consume()}))}consume(){for(;this.outstandingPromises.length&&this.runningPromises<this.maxDegreeOfParalellism;){const e=this.outstandingPromises.shift();this.runningPromises++;const t=e.factory();t.then(e.c,e.e),t.then((()=>this.consumed()),(()=>this.consumed()))}}consumed(){this._size--,this.runningPromises--,this.outstandingPromises.length>0&&this.consume()}}},946:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceMap=void 0;const n=e=>e.toString();class o{constructor(e=n){this.map=new Map,this.toKey=e}set(e,t){return this.map.set(this.toKey(e),{uri:e,value:t}),this}get(e){return this.map.get(this.toKey(e))?.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}*values(){for(const e of this.map.values())yield e.value}*keys(){for(const e of this.map.values())yield e.uri}*entries(){for(const e of this.map.values())yield[e.uri,e.value]}[Symbol.iterator](){return this.entries()}}t.ResourceMap=o},3729:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Schemes=void 0,t.Schemes=Object.freeze({notebookCell:"vscode-notebook-cell"})},6618:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VsCodeClientWorkspace=void 0;const o=n(5809),r=n(6813),i=n(8377),s=n(7373),a=n(9957),c=n(7598),u=n(9116),l=n(3675),d=n(946),f=n(3729);t.VsCodeClientWorkspace=class{constructor(e,t,n,r,c){this.connection=e,this.config=t,this.documents=n,this.notebooks=r,this.logger=c,this._onDidCreateMarkdownDocument=new o.Emitter,this.onDidCreateMarkdownDocument=this._onDidCreateMarkdownDocument.event,this._onDidChangeMarkdownDocument=new o.Emitter,this.onDidChangeMarkdownDocument=this._onDidChangeMarkdownDocument.event,this._onDidDeleteMarkdownDocument=new o.Emitter,this.onDidDeleteMarkdownDocument=this._onDidDeleteMarkdownDocument.event,this._documentCache=new d.ResourceMap,this._utf8Decoder=new TextDecoder("utf-8"),this._watcherPool=0,this._watchers=new Map,this._workspaceFolders=[],n.onDidOpen((e=>{this._documentCache.delete(s.URI.parse(e.document.uri)),this.isRelevantMarkdownDocument(e.document)&&this._onDidCreateMarkdownDocument.fire(e.document)})),n.onDidChangeContent((e=>{this.isRelevantMarkdownDocument(e.document)&&this._onDidChangeMarkdownDocument.fire(e.document)})),n.onDidClose((e=>{this._documentCache.delete(s.URI.parse(e.document.uri))})),e.onDidChangeWatchedFiles((async({changes:e})=>{for(const t of e){const e=s.URI.parse(t.uri);switch(this.logger.log(i.LogLevel.Trace,"VsCodeClientWorkspace: onDidChangeWatchedFiles",`${t.type}: ${e}`),t.type){case o.FileChangeType.Changed:{this._documentCache.delete(e);const t=await this.openMarkdownDocument(e);t&&this._onDidChangeMarkdownDocument.fire(t);break}case o.FileChangeType.Created:{const t=await this.openMarkdownDocument(e);t&&this._onDidCreateMarkdownDocument.fire(t);break}case o.FileChangeType.Deleted:this._documentCache.delete(e),this._onDidDeleteMarkdownDocument.fire(e)}}})),e.onRequest(a.fs_watcher_onChange,(e=>{this.logger.log(i.LogLevel.Trace,"VsCodeClientWorkspace: fs_watcher_onChange",`${e.kind}: ${e.uri}`);const t=this._watchers.get(e.id);if(t)switch(e.kind){case"create":return void t.onDidCreate.fire(s.URI.parse(e.uri));case"change":return void t.onDidChange.fire(s.URI.parse(e.uri));case"delete":return void t.onDidDelete.fire(s.URI.parse(e.uri))}}))}listen(){this.connection.workspace.onDidChangeWorkspaceFolders((async()=>{this.workspaceFolders=(await this.connection.workspace.getWorkspaceFolders()??[]).map((e=>s.URI.parse(e.uri)))}))}get workspaceFolders(){return this._workspaceFolders}set workspaceFolders(e){this._workspaceFolders=e}async getAllMarkdownDocuments(){const e=new d.ResourceMap,t=new l.Limiter(20),n=await this.connection.sendRequest(a.findMarkdownFilesInWorkspace,{}),o=await Promise.all(n.map((n=>t.queue((async()=>{const t=s.URI.parse(n),o=await this.openMarkdownDocument(t);return o&&e.set(t),o}))))),r=await Promise.all(this.documents.all().filter((t=>!e.has(s.URI.parse(t.uri))&&this.isRelevantMarkdownDocument(t))));return(0,c.coalesce)([...o,...r])}hasMarkdownDocument(e){return!!this.documents.get(e.toString())}async openMarkdownDocument(e){const t=this._documentCache.get(e);if(t)return t;const n=this.documents.get(e.toString());if(n)return this._documentCache.set(e,n),n;if((0,u.looksLikeMarkdownPath)(this.config,e))try{const t=await this.connection.sendRequest(a.fs_readFile,{uri:e.toString()}),n=new Uint8Array(t),o=this._utf8Decoder.decode(n),i=r.TextDocument.create(e.toString(),"markdown",0,o);return this._documentCache.set(e,i),i}catch(e){return}}async stat(e){return this.logger.log(i.LogLevel.Trace,"VsCodeClientWorkspace: stat",`${e}`),this._documentCache.has(e)||this.documents.get(e.toString())?{isDirectory:!1}:this.connection.sendRequest(a.fs_stat,{uri:e.toString()})}async readDirectory(e){return this.logger.log(i.LogLevel.Trace,"VsCodeClientWorkspace: readDir",`${e}`),this.connection.sendRequest(a.fs_readDirectory,{uri:e.toString()})}getContainingDocument(e){if(e.scheme===f.Schemes.notebookCell){const t=this.notebooks.findNotebookDocumentForCell(e.toString());if(t)return{uri:s.URI.parse(t.uri),children:t.cells.map((e=>({uri:s.URI.parse(e.document)})))}}}watchFile(e,t){const n=this._watcherPool++;this.logger.log(i.LogLevel.Trace,"VsCodeClientWorkspace: watchFile",`(${n}) ${e}`);const r={resource:e,options:t,onDidCreate:new o.Emitter,onDidChange:new o.Emitter,onDidDelete:new o.Emitter};return this._watchers.set(n,r),this.connection.sendRequest(a.fs_watcher_create,{id:n,uri:e.toString(),options:t}),{onDidCreate:r.onDidCreate.event,onDidChange:r.onDidChange.event,onDidDelete:r.onDidDelete.event,dispose:()=>{this.logger.log(i.LogLevel.Trace,"VsCodeClientWorkspace: disposeWatcher",`(${n}) ${e}`),this.connection.sendRequest(a.fs_watcher_delete,{id:n}),this._watchers.delete(n)}}}isRelevantMarkdownDocument(e){return(0,u.isMarkdownFile)(e)&&"vscode-bulkeditpreview"!==s.URI.parse(e.uri).scheme}}},3129:e=>{e.exports=require("child_process")},6417:e=>{e.exports=require("crypto")},5747:e=>{e.exports=require("fs")},1631:e=>{e.exports=require("net")},2087:e=>{e.exports=require("os")},5622:e=>{e.exports=require("path")},8835:e=>{e.exports=require("url")},1669:e=>{e.exports=require("util")}},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={};(()=>{var e=o;Object.defineProperty(e,"__esModule",{value:!0});const t=n(8212),r=n(6519),i=(0,t.createConnection)();console.log=i.console.log.bind(i.console),console.error=i.console.error.bind(i.console),process.on("unhandledRejection",(e=>{i.console.error(`Unhandled exception ${e}`)})),(0,r.startServer)(i)})();var r=exports;for(var i in o)r[i]=o[i];o.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
//# sourceMappingURL=https://ticino.blob.core.windows.net/sourcemaps/e4503b30fc78200f846c62cf8091b76ff5547662/extensions/markdown-language-features/server/dist/node/main.js.map