/*!--------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
(function(){
var e=["require","exports","vs/base/common/path","vs/base/common/lifecycle","vs/platform/instantiation/common/instantiation","vs/nls!vs/code/node/cliProcessMain","vs/base/common/event","vs/nls","vs/base/node/pfs","vs/base/common/types","vs/base/common/objects","vs/base/common/strings","vs/platform/log/common/log","vs/base/common/platform","vs/base/common/async","vs/base/common/uri","vs/base/common/buffer","vs/base/common/network","fs","vs/base/common/errors","vs/platform/registry/common/platform","vs/platform/configuration/common/configuration","vs/base/common/amd","vs/platform/files/common/files","vs/base/common/resources","vs/platform/environment/common/environment","vs/base/common/cancellation","vs/platform/configuration/common/configurationRegistry","vs/base/common/arrays","vs/platform/extensionManagement/common/extensionManagement","vs/platform/extensionManagement/common/extensionManagementUtil","vs/base/common/map","vs/platform/extensions/common/extensions","vs/platform/telemetry/common/telemetry","vs/platform/product/common/product","vs/base/common/extpath","child_process","vs/base/common/stream","vs/base/parts/ipc/common/ipc","vs/platform/instantiation/common/descriptors","vs/base/common/json","util","vs/base/node/watcher","vs/base/common/errorMessage","vs/platform/files/common/io","vs/platform/files/node/watcher/watcher","vs/platform/instantiation/common/serviceCollection","vs/base/common/labels","os","vs/base/node/decoder","vs/platform/product/common/productService","vs/base/parts/ipc/node/ipc.cp","vs/base/common/glob","vs/base/node/extpath","vs/platform/request/common/request","vs/platform/extensions/common/extensionValidator","vs/base/common/uuid","vs/platform/telemetry/common/telemetryUtils","vs/base/node/zip","vs/platform/extensionManagement/node/extensionManagementUtil","vs/platform/extensionManagement/common/extensionNls","vs/platform/extensionManagement/node/extensionLifecycle","vs/base/common/console","vs/base/common/collections","vs/base/common/decorators","vs/platform/extensionManagement/node/extensionsManifestCache","vs/platform/files/node/watcher/nsfw/watcherIpc","vs/platform/files/node/watcher/nsfw/watcherService","vs/platform/files/node/watcher/unix/watcherIpc","vs/platform/files/node/watcher/unix/watcherService","vs/platform/files/node/watcher/win32/csharpWatcherService","vs/platform/files/node/watcher/win32/watcherService","vs/nls!vs/base/common/errorMessage","vs/platform/instantiation/common/graph","vs/platform/request/node/requestService","vs/platform/download/common/download","semver-umd","vs/base/node/paths","vs/base/node/config","vs/nls!vs/base/node/processes","vs/base/node/processes","vs/platform/files/node/watcher/nodejs/watcherService","vs/base/common/assert","vs/platform/instantiation/common/instantiationService","vs/platform/localizations/common/localizations","vs/base/common/date","vs/platform/files/common/fileService","vs/platform/files/node/diskFileSystemProvider","vs/platform/log/node/spdlogService","vs/platform/environment/node/environmentService","crypto","vs/nls!vs/base/node/zip","vs/nls!vs/platform/configuration/common/configurationRegistry","vs/platform/localizations/node/localizations","vs/nls!vs/platform/extensionManagement/common/extensionManagement","vs/nls!vs/platform/extensionManagement/node/extensionManagementService","vs/platform/jsonschemas/common/jsonContributionRegistry","vs/nls!vs/platform/extensionManagement/node/extensionManagementUtil","vs/nls!vs/platform/extensions/common/extensionValidator","vs/platform/configuration/common/configurationModels","vs/platform/configuration/node/configurationService","vs/nls!vs/platform/files/common/fileService","vs/platform/request/node/proxy","url","vs/platform/state/node/state","vs/platform/state/node/stateService","vs/platform/storage/common/storage","vs/nls!vs/platform/files/common/files","vs/platform/extensionManagement/common/extensionGalleryService","vs/nls!vs/platform/files/common/io","vs/platform/telemetry/common/telemetryService","vs/nls!vs/platform/files/node/diskFileSystemProvider","vs/platform/telemetry/node/appInsightsAppender","vs/platform/extensionManagement/node/extensionManagementService","vs/platform/telemetry/node/commonProperties","vs/platform/telemetry/node/telemetry","vs/nls!vs/platform/request/common/request","vs/nls!vs/platform/telemetry/common/telemetryService","yazl","yauzl","applicationinsights","vs/base/common/normalization","string_decoder","zlib","vs/code/node/cliProcessMain"],t=function(t){
for(var i=[],n=0,r=t.length;n<r;n++)i[n]=e[t[n]];return i};define(e[82],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ok=function(e,t){if(!e)throw new Error(t?"Assertion failed ("+t+")":"Assertion Failed")}})),define(e[63],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=Object.prototype.hasOwnProperty;t.values=function(e){const t=[];for(let n in e)i.call(e,n)&&t.push(e[n]);return t},t.size=function(e){let t=0;for(let n in e)i.call(e,n)&&(t+=1);return t},t.first=function(e){for(const t in e)if(i.call(e,t))return e[t]},t.forEach=function(e,t){for(let n in e)if(i.call(e,n)){if(!1===t({key:n,value:e[n]},(function(){delete e[n]})))return}},t.groupBy=function(e,t){const i=Object.create(null);for(const n of e){const e=t(n);let r=i[e];r||(r=i[e]=[]),r.push(n)}return i},t.fromMap=function(e){const t=Object.create(null);return e&&e.forEach((e,i)=>{t[i]=e}),t},t.mapValues=function(e){const t=[];return e.forEach(e=>t.push(e)),t}
;t.SetMap=class{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){const i=this.map.get(e);i&&(i.delete(t),0===i.size&&this.map.delete(e))}forEach(e,t){const i=this.map.get(e);i&&i.forEach(t)}}})),define(e[64],t([0,1]),(function(e,t){"use strict";function i(e){return(t,i,n)=>{let r=null,s=null;if("function"==typeof n.value?(r="value",s=n.value):"function"==typeof n.get&&(r="get",s=n.get),!s)throw new Error("not supported");n[r]=e(s,i)}}Object.defineProperty(t,"__esModule",{value:!0}),t.createDecorator=i;let n=0;function r(){const e=`$memoize${n++}`;let t=void 0;const i=function(i,n,r){let s=null,o=null;if("function"==typeof r.value?(s="value",0!==(o=r.value).length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"==typeof r.get&&(s="get",o=r.get),!o)throw new Error("not supported");const a=`${e}:${n}`;r[s]=function(...e){return t=this,this.hasOwnProperty(a)||Object.defineProperty(this,a,{configurable:!0,
enumerable:!1,writable:!0,value:o.apply(this,e)}),this[a]}};return i.clear=()=>{void 0!==t&&Object.getOwnPropertyNames(t).forEach(i=>{0===i.indexOf(e)&&delete t[i]})},i}t.createMemoizer=r,t.memoize=function(e,t,i){return r()(e,t,i)},t.debounce=function(e,t,n){return i((i,r)=>{const s=`$debounce$${r}`,o=`$debounce$result$${r}`;return function(...r){this[o]||(this[o]=n?n():void 0),clearTimeout(this[s]),t&&(this[o]=t(this[o],...r),r=[this[o]]),this[s]=setTimeout(()=>{i.apply(this,r),this[o]=n?n():void 0},e)}})}})),define(e[40],t([0,1]),(function(e,t){"use strict";var i,n;function r(e,t=!1){let i=0,n=e.length,r="",l=0,c=16,u=0;function h(t){let n=0,r=0;for(;n<t;){const t=e.charCodeAt(i);if(t>=48&&t<=57)r=16*r+t-48;else if(t>=65&&t<=70)r=16*r+t-65+10;else{if(!(t>=97&&t<=102))break;r=16*r+t-97+10}i++,n++}return n<t&&(r=-1),r}function d(){if(r="",u=0,l=i,i>=n)return l=n,c=17;let t=e.charCodeAt(i);if(s(t)){do{i++,r+=String.fromCharCode(t),t=e.charCodeAt(i)}while(s(t));return c=15}if(o(t))return i++,
r+=String.fromCharCode(t),13===t&&10===e.charCodeAt(i)&&(i++,r+="\n"),c=14;switch(t){case 123:return i++,c=1;case 125:return i++,c=2;case 91:return i++,c=3;case 93:return i++,c=4;case 58:return i++,c=6;case 44:return i++,c=5;case 34:return i++,r=function(){let t="",r=i;for(;;){if(i>=n){t+=e.substring(r,i),u=2;break}const s=e.charCodeAt(i);if(34===s){t+=e.substring(r,i),i++;break}if(92!==s){if(s>=0&&s<=31){if(o(s)){t+=e.substring(r,i),u=2;break}u=6}i++}else{if(t+=e.substring(r,i),++i>=n){u=2;break}switch(e.charCodeAt(i++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:const e=h(4);e>=0?t+=String.fromCharCode(e):u=4;break;default:u=5}r=i}}return t}(),c=10;case 47:const s=i-1;if(47===e.charCodeAt(i+1)){for(i+=2;i<n&&!o(e.charCodeAt(i));)i++;return r=e.substring(s,i),c=12}if(42===e.charCodeAt(i+1)){i+=2;const t=n-1;let o=!1;for(;i<t;){
if(42===e.charCodeAt(i)&&47===e.charCodeAt(i+1)){i+=2,o=!0;break}i++}return o||(i++,u=1),r=e.substring(s,i),c=13}return r+=String.fromCharCode(t),i++,c=16;case 45:if(r+=String.fromCharCode(t),++i===n||!a(e.charCodeAt(i)))return c=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return r+=function(){const t=i;if(48===e.charCodeAt(i))i++;else for(i++;i<e.length&&a(e.charCodeAt(i));)i++;if(i<e.length&&46===e.charCodeAt(i)){if(!(++i<e.length&&a(e.charCodeAt(i))))return u=3,e.substring(t,i);for(i++;i<e.length&&a(e.charCodeAt(i));)i++}let n=i;if(i<e.length&&(69===e.charCodeAt(i)||101===e.charCodeAt(i)))if((++i<e.length&&43===e.charCodeAt(i)||45===e.charCodeAt(i))&&i++,i<e.length&&a(e.charCodeAt(i))){for(i++;i<e.length&&a(e.charCodeAt(i));)i++;n=i}else u=3;return e.substring(t,n)}(),c=11;default:for(;i<n&&f(t);)i++,t=e.charCodeAt(i);if(l!==i){switch(r=e.substring(l,i)){case"true":return c=8;case"false":return c=9;case"null":return c=7}return c=16}return r+=String.fromCharCode(t),
i++,c=16}}function f(e){if(s(e)||o(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(e){i=e,r="",l=0,c=16,u=0},getPosition:()=>i,scan:t?function(){let e;do{e=d()}while(e>=12&&e<=15);return e}:d,getToken:()=>c,getTokenValue:()=>r,getTokenOffset:()=>l,getTokenLength:()=>i-l,getTokenError:()=>u}}function s(e){return 32===e||9===e||11===e||12===e||160===e||5760===e||e>=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function o(e){return 10===e||13===e||8232===e||8233===e}function a(e){return e>=48&&e<=57}function l(e,t,i=!1){return t>=e.offset&&t<e.offset+e.length||i&&t===e.offset+e.length}function c(e,t,n=i.DEFAULT){const s=r(e,!1);function o(e){return e?()=>e(s.getTokenOffset(),s.getTokenLength()):()=>!0}function a(e){return e?t=>e(t,s.getTokenOffset(),s.getTokenLength()):()=>!0}
const l=o(t.onObjectBegin),c=a(t.onObjectProperty),u=o(t.onObjectEnd),h=o(t.onArrayBegin),d=o(t.onArrayEnd),f=a(t.onLiteralValue),g=a(t.onSeparator),p=o(t.onComment),m=a(t.onError),v=n&&n.disallowComments,y=n&&n.allowTrailingComma;function E(){for(;;){const e=s.scan();switch(s.getTokenError()){case 4:S(14);break;case 5:S(15);break;case 3:S(13);break;case 1:v||S(11);break;case 2:S(12);break;case 6:S(16)}switch(e){case 12:case 13:v?S(10):p();break;case 16:S(1);break;case 15:case 14:break;default:return e}}}function S(e,t=[],i=[]){if(m(e),t.length+i.length>0){let e=s.getToken();for(;17!==e;){if(-1!==t.indexOf(e)){E();break}if(-1!==i.indexOf(e))break;e=E()}}}function w(e){const t=s.getTokenValue();return e?f(t):c(t),E(),!0}function b(){switch(s.getToken()){case 3:return function(){h(),E();let e=!1;for(;4!==s.getToken()&&17!==s.getToken();){if(5===s.getToken()){if(e||S(4,[],[]),g(","),E(),4===s.getToken()&&y)break}else e&&S(6,[],[]);b()||S(4,[],[4,5]),e=!0}return d(),4!==s.getToken()?S(8,[4],[]):E(),!0}();case 1:
return function(){l(),E();let e=!1;for(;2!==s.getToken()&&17!==s.getToken();){if(5===s.getToken()){if(e||S(4,[],[]),g(","),E(),2===s.getToken()&&y)break}else e&&S(6,[],[]);(10!==s.getToken()?(S(3,[],[2,5]),0):(w(!1),6===s.getToken()?(g(":"),E(),b()||S(4,[],[2,5])):S(5,[],[2,5]),1))||S(4,[],[2,5]),e=!0}return u(),2!==s.getToken()?S(7,[2],[]):E(),!0}();case 10:return w(!0);default:return function(){switch(s.getToken()){case 11:let e=0;try{"number"!=typeof(e=JSON.parse(s.getTokenValue()))&&(S(2),e=0)}catch(e){S(2)}f(e);break;case 7:f(null);break;case 8:f(!0);break;case 9:f(!1);break;default:return!1}return E(),!0}()}}return E(),17===s.getToken()?!!n.allowEmptyContent||(S(4,[],[]),!1):b()?(17!==s.getToken()&&S(9,[],[]),!0):(S(4,[],[]),!1)}function u(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":return e?Array.isArray(e)?"array":"object":"null";default:return"null"}}Object.defineProperty(t,"__esModule",{value:!0}),function(e){
e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"}(t.ScanError||(t.ScanError={})),function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"}(t.SyntaxKind||(t.SyntaxKind={})),function(e){
e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"}(t.ParseErrorCode||(t.ParseErrorCode={})),function(e){e.DEFAULT={allowTrailingComma:!0}}(i=t.ParseOptions||(t.ParseOptions={})),t.createScanner=r,function(e){e[e.nullCharacter=0]="nullCharacter",e[e.maxAsciiCharacter=127]="maxAsciiCharacter",e[e.lineFeed=10]="lineFeed",
e[e.carriageReturn=13]="carriageReturn",e[e.lineSeparator=8232]="lineSeparator",e[e.paragraphSeparator=8233]="paragraphSeparator",e[e.nextLine=133]="nextLine",e[e.space=32]="space",e[e.nonBreakingSpace=160]="nonBreakingSpace",e[e.enQuad=8192]="enQuad",e[e.emQuad=8193]="emQuad",e[e.enSpace=8194]="enSpace",e[e.emSpace=8195]="emSpace",e[e.threePerEmSpace=8196]="threePerEmSpace",e[e.fourPerEmSpace=8197]="fourPerEmSpace",e[e.sixPerEmSpace=8198]="sixPerEmSpace",e[e.figureSpace=8199]="figureSpace",e[e.punctuationSpace=8200]="punctuationSpace",e[e.thinSpace=8201]="thinSpace",e[e.hairSpace=8202]="hairSpace",e[e.zeroWidthSpace=8203]="zeroWidthSpace",e[e.narrowNoBreakSpace=8239]="narrowNoBreakSpace",e[e.ideographicSpace=12288]="ideographicSpace",e[e.mathematicalSpace=8287]="mathematicalSpace",e[e.ogham=5760]="ogham",e[e._=95]="_",e[e.$=36]="$",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",
e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.ampersand=38]="ampersand",e[e.asterisk=42]="asterisk",e[e.at=64]="at",e[e.backslash=92]="backslash",e[e.bar=124]="bar",e[e.caret=94]="caret",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.closeParen=41]="closeParen",e[e.colon=58]="colon",
e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.equals=61]="equals",e[e.exclamation=33]="exclamation",e[e.greaterThan=62]="greaterThan",e[e.lessThan=60]="lessThan",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.openParen=40]="openParen",e[e.percent=37]="percent",e[e.plus=43]="plus",e[e.question=63]="question",e[e.semicolon=59]="semicolon",e[e.singleQuote=39]="singleQuote",e[e.slash=47]="slash",e[e.tilde=126]="tilde",e[e.backspace=8]="backspace",e[e.formFeed=12]="formFeed",e[e.byteOrderMark=65279]="byteOrderMark",e[e.tab=9]="tab",e[e.verticalTab=11]="verticalTab"}(n||(n={})),t.getLocation=function(e,t){const i=[],n=new Object;let r=void 0;const s={value:{},offset:0,length:0,type:"object",parent:void 0};let o=!1;function a(e,t,i,n){s.value=e,s.offset=t,s.length=i,s.type=n,s.colonOffset=void 0,r=s}try{c(e,{onObjectBegin:(e,s)=>{if(t<=e)throw n;r=void 0,o=t>e,i.push("")},onObjectProperty:(e,r,s)=>{if(t<r)throw n;if(a(e,r,s,"property"),
i[i.length-1]=e,t<=r+s)throw n},onObjectEnd:(e,s)=>{if(t<=e)throw n;r=void 0,i.pop()},onArrayBegin:(e,s)=>{if(t<=e)throw n;r=void 0,i.push(0)},onArrayEnd:(e,s)=>{if(t<=e)throw n;r=void 0,i.pop()},onLiteralValue:(e,i,r)=>{if(t<i)throw n;if(a(e,i,r,u(e)),t<=i+r)throw n},onSeparator:(e,s,a)=>{if(t<=s)throw n;if(":"===e&&r&&"property"===r.type)r.colonOffset=s,o=!1,r=void 0;else if(","===e){const e=i[i.length-1];"number"==typeof e?i[i.length-1]=e+1:(o=!0,i[i.length-1]=""),r=void 0}}})}catch(e){if(e!==n)throw e}return{path:i,previousNode:r,isAtPropertyKey:o,matches:e=>{let t=0;for(let n=0;t<e.length&&n<i.length;n++)if(e[t]===i[n]||"*"===e[t])t++;else if("**"!==e[t])return!1;return t===e.length}}},t.parse=function(e,t=[],n=i.DEFAULT){let r=null,s=[];const o=[];function a(e){Array.isArray(s)?s.push(e):null!==r&&(s[r]=e)}return c(e,{onObjectBegin:()=>{const e={};a(e),o.push(s),s=e,r=null},onObjectProperty:e=>{r=e},onObjectEnd:()=>{s=o.pop()},onArrayBegin:()=>{const e=[];a(e),o.push(s),s=e,r=null},onArrayEnd:()=>{
s=o.pop()},onLiteralValue:a,onError:(e,i,n)=>{t.push({error:e,offset:i,length:n})}},n),s[0]},t.parseTree=function(e,t=[],n=i.DEFAULT){let r={type:"array",offset:-1,length:-1,children:[],parent:void 0};function s(e){"property"===r.type&&(r.length=e-r.offset,r=r.parent)}function o(e){return r.children.push(e),e}c(e,{onObjectBegin:e=>{r=o({type:"object",offset:e,length:-1,parent:r,children:[]})},onObjectProperty:(e,t,i)=>{(r=o({type:"property",offset:t,length:-1,parent:r,children:[]})).children.push({type:"string",value:e,offset:t,length:i,parent:r})},onObjectEnd:(e,t)=>{r.length=e+t-r.offset,r=r.parent,s(e+t)},onArrayBegin:(e,t)=>{r=o({type:"array",offset:e,length:-1,parent:r,children:[]})},onArrayEnd:(e,t)=>{r.length=e+t-r.offset,r=r.parent,s(e+t)},onLiteralValue:(e,t,i)=>{o({type:u(e),offset:t,length:i,parent:r,value:e}),s(t+i)},onSeparator:(e,t,i)=>{"property"===r.type&&(":"===e?r.colonOffset=t:","===e&&s(t))},onError:(e,i,n)=>{t.push({error:e,offset:i,length:n})}},n);const a=r.children[0]
;return a&&delete a.parent,a},t.findNodeAtLocation=function(e,t){if(!e)return;let i=e;for(let e of t)if("string"==typeof e){if("object"!==i.type||!Array.isArray(i.children))return;let t=!1;for(const n of i.children)if(Array.isArray(n.children)&&n.children[0].value===e){i=n.children[1],t=!0;break}if(!t)return}else{const t=e;if("array"!==i.type||t<0||!Array.isArray(i.children)||t>=i.children.length)return;i=i.children[t]}return i},t.getNodePath=function e(t){if(!t.parent||!t.parent.children)return[];const i=e(t.parent);if("property"===t.parent.type){const e=t.parent.children[0].value;i.push(e)}else if("array"===t.parent.type){const e=t.parent.children.indexOf(t);-1!==e&&i.push(e)}return i},t.getNodeValue=function e(t){switch(t.type){case"array":return t.children.map(e);case"object":const i=Object.create(null);for(let n of t.children){const t=n.children[1];t&&(i[n.children[0].value]=e(t))}return i;case"null":case"string":case"number":case"boolean":return t.value;default:return}},t.contains=l,
t.findNodeAtOffset=function e(t,i,n=!1){if(l(t,i,n)){const r=t.children;if(Array.isArray(r))for(let t=0;t<r.length&&r[t].offset<=i;t++){const s=e(r[t],i,n);if(s)return s}return t}},t.visit=c,t.stripComments=function(e,t){let i,n,s=r(e),o=[],a=0;do{switch(n=s.getPosition(),i=s.scan()){case 12:case 13:case 17:a!==n&&o.push(e.substring(a,n)),void 0!==t&&o.push(s.getTokenValue().replace(/[^\r\n]/g,t)),a=s.getPosition()}}while(17!==i);return o.join("")},t.getNodeType=u})),define(e[37],t([0,1]),(function(e,t){"use strict";function i(e){return new n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isReadableStream=function(e){const t=e;return t&&[t.on,t.pause,t.resume,t.destroy].every(e=>"function"==typeof e)},t.newWriteableStream=i;class n{constructor(e){this.reducer=e,this.state={flowing:!1,ended:!1,destroyed:!1},this.buffer={data:[],error:[]},this.listeners={data:[],error:[],end:[]}}pause(){this.state.destroyed||(this.state.flowing=!1)}resume(){
this.state.destroyed||this.state.flowing||(this.state.flowing=!0,this.flowData(),this.flowErrors(),this.flowEnd())}write(e){this.state.destroyed||(this.state.flowing?this.listeners.data.forEach(t=>t(e)):this.buffer.data.push(e))}error(e){this.state.destroyed||(this.state.flowing?this.listeners.error.forEach(t=>t(e)):this.buffer.error.push(e))}end(e){this.state.destroyed||(e instanceof Error?this.error(e):e&&this.write(e),this.state.flowing?(this.listeners.end.forEach(e=>e()),this.destroy()):this.state.ended=!0)}on(e,t){if(!this.state.destroyed)switch(e){case"data":this.listeners.data.push(t),this.resume();break;case"end":this.listeners.end.push(t),this.state.flowing&&this.flowEnd()&&this.destroy();break;case"error":this.listeners.error.push(t),this.state.flowing&&this.flowErrors()}}flowData(){if(this.buffer.data.length>0){const e=this.reducer(this.buffer.data);this.listeners.data.forEach(t=>t(e)),this.buffer.data.length=0}}flowErrors(){if(this.listeners.error.length>0){
for(const e of this.buffer.error)this.listeners.error.forEach(t=>t(e));this.buffer.error.length=0}}flowEnd(){return!!this.state.ended&&(this.listeners.end.forEach(e=>e()),this.listeners.end.length>0)}destroy(){this.state.destroyed||(this.state.destroyed=!0,this.state.ended=!0,this.buffer.data.length=0,this.buffer.error.length=0,this.listeners.data.length=0,this.listeners.error.length=0,this.listeners.end.length=0)}}t.consumeReadable=function(e,t){const i=[];let n;for(;null!==(n=e.read());)i.push(n);return t(i)},t.consumeReadableWithLimit=function(e,t,i){const n=[];let r=void 0;for(;null!==(r=e.read())&&n.length<i;)n.push(r);return null===r&&n.length>0?t(n):{read:()=>{if(n.length>0)return n.shift();if(void 0!==r){const e=r;return r=void 0,e}return e.read()}}},t.consumeStream=function(e,t){return new Promise((i,n)=>{const r=[];e.on("data",e=>r.push(e)),e.on("error",e=>n(e)),e.on("end",()=>i(t(r)))})},t.consumeStreamWithLimit=function(e,t,n){return new Promise((r,s)=>{const o=[];let a=void 0;e.on("data",e=>{
if(!a&&o.length===n){for(a=i(t);o.length;)a.write(o.shift());return a.write(e),r(a)}a?a.write(e):o.push(e)}),e.on("error",e=>{if(!a)return s(e);a.error(e)}),e.on("end",()=>{if(!a)return r(t(o));for(;o.length;)a.write(o.shift());a.end()})})},t.toStream=function(e,t){const n=i(t);return n.end(e),n},t.toReadable=function(e){let t=!1;return{read:()=>t?null:(t=!0,e)}},t.transform=function(e,t,n){const r=i(n);return e.on("data",e=>r.write(t.data(e))),e.on("end",()=>r.end()),e.on("error",e=>r.error(t.error?t.error(e):e)),r}})),define(e[16],t([0,1,11,37]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r="undefined"!=typeof Buffer,s="undefined"!=typeof TextEncoder,o="undefined"!=typeof TextDecoder;let a,l;class c{constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}static alloc(e){return new c(r?Buffer.allocUnsafe(e):new Uint8Array(e))}static wrap(e){return r&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new c(e)}static fromString(e){
return r?new c(Buffer.from(e)):s?(a||(a=new TextEncoder),new c(a.encode(e))):new c(i.encodeUTF8(e))}static concat(e,t){if(void 0===t){t=0;for(let i=0,n=e.length;i<n;i++)t+=e[i].byteLength}const i=c.alloc(t);let n=0;for(let t=0,r=e.length;t<r;t++){const r=e[t];i.set(r,n),n+=r.byteLength}return i}toString(){return r?this.buffer.toString():o?(l||(l=new TextDecoder),l.decode(this.buffer)):i.decodeUTF8(this.buffer)}slice(e,t){return new c(this.buffer.subarray(e,t))}set(e,t){this.buffer.set(e.buffer,t)}readUInt32BE(e){return u(this.buffer,e)}writeUInt32BE(e,t){h(this.buffer,e,t)}readUInt8(e){return function(e,t){return e[t]}(this.buffer,e)}writeUInt8(e,t){!function(e,t,i){e[i]=t}(this.buffer,e,t)}}function u(e,t){return e[t]*2**24+65536*e[t+1]+256*e[t+2]+e[t+3]}function h(e,t,i){e[i+3]=t,t>>>=8,e[i+2]=t,t>>>=8,e[i+1]=t,t>>>=8,e[i]=t}t.VSBuffer=c,t.readUInt32BE=u,t.writeUInt32BE=h,t.readableToBuffer=function(e){return n.consumeReadable(e,e=>c.concat(e))},t.bufferToReadable=function(e){return n.toReadable(e)},
t.streamToBuffer=function(e){return n.consumeStream(e,e=>c.concat(e))},t.bufferToStream=function(e){return n.toStream(e,e=>c.concat(e))},t.streamToBufferReadableStream=function(e){return n.transform(e,{data:e=>"string"==typeof e?c.fromString(e):c.wrap(e)},e=>c.concat(e))},t.newWriteableBufferStream=function(){return n.newWriteableStream(e=>c.concat(e))}})),define(e[85],t([0,1,11]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toLocalISOString=function(e){return e.getFullYear()+"-"+i.pad(e.getMonth()+1,2)+"-"+i.pad(e.getDate(),2)+"T"+i.pad(e.getHours(),2)+":"+i.pad(e.getMinutes(),2)+":"+i.pad(e.getSeconds(),2)+"."+(e.getMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"}})),define(e[62],t([0,1,15]),(function(e,t,i){"use strict";function n(e){const t=[];let i;try{const n=JSON.parse(e.arguments),r=n[n.length-1];r&&r.__$stack&&(n.pop(),i=r.__$stack),t.push(...n)}catch(i){t.push("Unable to log remote console arguments",e.arguments)}return{args:t,stack:i}}function r(e){if(!e)return e
;const t=e.indexOf("\n");return-1===t?e:e.substring(0,t)}function s(e){return`color: ${e}`}Object.defineProperty(t,"__esModule",{value:!0}),t.isRemoteConsoleLog=function(e){const t=e;return t&&"string"==typeof t.type&&"string"==typeof t.severity},t.parse=n,t.getFirstFrame=function e(t){if("string"!=typeof t)return e(n(t).stack);if(t){const e=r(t),n=/at [^\/]*((?:(?:[a-zA-Z]+:)|(?:[\/])|(?:\\\\))(?:.+)):(\d+):(\d+)/.exec(e||"");if(n&&4===n.length)return{uri:i.URI.file(n[1]),line:Number(n[2]),column:Number(n[3])}}},t.log=function(e,t){const{args:i,stack:o}=n(e),a="string"==typeof i[0]&&1===i.length;let l=r(o);l&&(l=`(${l.trim()})`);let c=[];if(c="string"==typeof i[0]?l&&a?[`%c[${t}] %c${i[0]} %c${l}`,s("blue"),s(""),s("grey")]:[`%c[${t}] %c${i[0]}`,s("blue"),s(""),...i.slice(1)]:[`%c[${t}]%`,s("blue"),...i],l&&!a&&c.push(l),"function"!=typeof console[e.severity])throw new Error("Unknown console method");console[e.severity].apply(console,c)}})),define(e[52],t([0,1,28,11,35,2,31,14]),(function(e,t,i,n,r,s,o,a){
"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEmptyExpression=function(){return Object.create(null)};const l="**",c="/",u="[/\\\\]",h="[^/\\\\]",d=/\//g;function f(e){switch(e){case 0:return"";case 1:return`${h}*?`;default:return`(?:${u}|${h}+${u}|${u}${h}+)*?`}}function g(e,t){if(!e)return[];const i=[];let n=!1,r=!1,s="";for(const o of e){switch(o){case t:if(!n&&!r){i.push(s),s="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":r=!0;break;case"]":r=!1}s+=o}return s&&i.push(s),i}t.splitGlobAware=g;const p=/^\*\*\/\*\.[\w\.-]+$/,m=/^\*\*\/([\w\.-]+)\/?$/,v=/^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/,y=/^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/,E=/^\*\*((\/[\w\.-]+)+)\/?$/,S=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,w=new o.LRUCache(1e4),b=function(){return!1},C=function(){return null};function P(e,t){if(!e)return C;let r;const s=`${r=(r="string"!=typeof e?e.pattern:e).trim()}_${!!t.trimForExclusions}`;let o,a=w.get(s);if(a)return _(a,e)
;if(p.test(r)){const e=r.substr(4);a=function(t,i){return"string"==typeof t&&n.endsWith(t,e)?r:null}}else a=(o=m.exec(x(r,t)))?function(e,t){const i=`/${e}`,r=`\\${e}`,s=function(s,o){return"string"!=typeof s?null:o?o===e?t:null:s===e||n.endsWith(s,i)||n.endsWith(s,r)?t:null},o=[e];return s.basenames=o,s.patterns=[t],s.allBasenames=o,s}(o[1],r):(t.trimForExclusions?y:v).test(r)?function(e,t){const n=L(e.slice(1,-1).split(",").map(e=>P(e,t)).filter(e=>e!==C),e),r=n.length;if(!r)return C;if(1===r)return n[0];const s=function(t,i){for(let r=0,s=n.length;r<s;r++)if(n[r](t,i))return e;return null},o=i.first(n,e=>!!e.allBasenames);o&&(s.allBasenames=o.allBasenames);const a=n.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);a.length&&(s.allPaths=a);return s}(r,t):(o=E.exec(x(r,t)))?I(o[1].substr(1),r,!0):(o=S.exec(x(r,t)))?I(o[1],r,!1):function(e){try{const t=new RegExp(`^${function e(t){if(!t)return"";let i="";const r=g(t,c);if(r.every(e=>e===l))i=".*";else{let t=!1;r.forEach((s,o)=>{
if(s===l)return void(t||(i+=f(2),t=!0));let a=!1,d="",p=!1,m="";for(const t of s)if("}"!==t&&a)d+=t;else if(!p||"]"===t&&m)switch(t){case"{":a=!0;continue;case"[":p=!0;continue;case"}":const r=`(?:${g(d,",").map(t=>e(t)).join("|")})`;i+=r,a=!1,d="";break;case"]":i+="["+m+"]",p=!1,m="";break;case"?":i+=h;continue;case"*":i+=f(1);continue;default:i+=n.escapeRegExpCharacters(t)}else{let e;m+=e="-"===t?t:"^"!==t&&"!"!==t||m?t===c?"":n.escapeRegExpCharacters(t):"^"}o<r.length-1&&(r[o+1]!==l||o+2<r.length)&&(i+=u),t=!1})}return i}(e)}$`);return function(i,n){return t.lastIndex=0,"string"==typeof i&&t.test(i)?e:null}}catch(e){return C}}(r);return w.set(s,a),_(a,e)}function _(e,t){return"string"==typeof t?e:function(i,n){return r.isEqualOrParent(i,t.base)?e(s.relative(t.base,i),n):null}}function x(e,t){return t.trimForExclusions&&n.endsWith(e,"/**")?e.substr(0,e.length-2):e}function I(e,t,i){const r=s.sep!==s.posix.sep?e.replace(d,s.sep):e,o=s.sep+r,a=i?function(e,i){
return"string"!=typeof e||e!==r&&!n.endsWith(e,o)?null:t}:function(e,i){return"string"==typeof e&&e===r?t:null};return a.allPaths=[(i?"*/":"./")+e],a}function O(e,t={}){if(!e)return b;if("string"==typeof e||D(e)){const i=P(e,t);if(i===C)return b;const n=function(e,t){return!!i(e,t)};return i.allBasenames&&(n.allBasenames=i.allBasenames),i.allPaths&&(n.allPaths=i.allPaths),n}return function(e,t){const n=L(Object.getOwnPropertyNames(e).map(i=>(function(e,t,i){if(!1===t)return C;const n=P(e,i);if(n===C)return C;if("boolean"==typeof t)return n;if(t){const i=t.when;if("string"==typeof i){const t=(t,r,s,o)=>{if(!o||!n(t,r))return null;const l=o(i.replace("$(basename)",s));return a.isThenable(l)?l.then(t=>t?e:null):l?e:null};return t.requiresSiblings=!0,t}}return n})(i,e[i],t)).filter(e=>e!==C)),r=n.length;if(!r)return C;if(!n.some(e=>!!e.requiresSiblings)){if(1===r)return n[0];const e=function(e,t){for(let i=0,r=n.length;i<r;i++){const r=n[i](e,t);if(r)return r}return null},t=i.first(n,e=>!!e.allBasenames)
;t&&(e.allBasenames=t.allBasenames);const s=n.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);return s.length&&(e.allPaths=s),e}const o=function(e,t,i){let r=void 0;for(let o=0,a=n.length;o<a;o++){const a=n[o];a.requiresSiblings&&i&&(t||(t=s.basename(e)),r||(r=t.substr(0,t.length-s.extname(e).length)));const l=a(e,t,r,i);if(l)return l}return null},l=i.first(n,e=>!!e.allBasenames);l&&(o.allBasenames=l.allBasenames);const c=n.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);c.length&&(o.allPaths=c);return o}(e,t)}function F(e){const t={};for(const i of e)t[i]=!0;return t}function D(e){const t=e;return t&&"string"==typeof t.base&&"string"==typeof t.pattern}function L(e,t){const i=e.filter(e=>!!e.basenames);if(i.length<2)return e;const n=i.reduce((e,t)=>{const i=t.basenames;return i?e.concat(i):e},[]);let r;if(t){r=[];for(let e=0,i=n.length;e<i;e++)r.push(t)}else r=i.reduce((e,t)=>{const i=t.patterns;return i?e.concat(i):e},[]);const s=function(e,t){if("string"!=typeof e)return null;if(!t){let i
;for(i=e.length;i>0;i--){const t=e.charCodeAt(i-1);if(47===t||92===t)break}t=e.substr(i)}const i=n.indexOf(t);return-1!==i?r[i]:null};s.basenames=n,s.patterns=r,s.allBasenames=n;const o=e.filter(e=>!e.basenames);return o.push(s),o}t.match=function(e,t,i){return!(!e||"string"!=typeof t)&&O(e)(t,void 0,i)},t.parse=O,t.hasSiblingPromiseFn=function(e){if(!e)return;let t;return i=>(t||(t=(e()||Promise.resolve([])).then(e=>e?F(e):{})),t.then(e=>!!e[i]))},t.hasSiblingFn=function(e){if(!e)return;let t;return i=>{if(!t){const i=e();t=i?F(i):{}}return!!t[i]}},t.isRelativePattern=D,t.getBasenameTerms=function(e){return e.allBasenames||[]},t.getPathTerms=function(e){return e.allPaths||[]}})),define(e[17],t([0,1,15,13]),(function(e,t,i,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",
e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.userData="vscode-userdata"}(r=t.Schemas||(t.Schemas={}));t.RemoteAuthorities=new class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null}setPreferredWebSchema(e){this._preferredWebSchema=e}setDelegate(e){this._delegate=e}set(e,t,i){this._hosts[e]=t,this._ports[e]=i}setConnectionToken(e,t){this._connectionTokens[e]=t}rewrite(e){if(this._delegate)return this._delegate(e);const t=e.authority;let s=this._hosts[t];s&&-1!==s.indexOf(":")&&(s=`[${s}]`);const o=this._ports[t],a=this._connectionTokens[t];let l=`path=${encodeURIComponent(e.path)}`;return"string"==typeof a&&(l+=`&tkn=${encodeURIComponent(a)}`),i.URI.from({scheme:n.isWeb?this._preferredWebSchema:r.vscodeRemoteResource,authority:`${s}:${o}`,path:"/vscode-remote-resource",query:l})}}})),
define(e[24],t([0,1,35,2,15,11,17,13,52,31]),(function(e,t,i,n,r,s,o,a,l,c){"use strict";function u(e){return!e||e.scheme!==o.Schemas.file||!a.isLinux}function h(e,t,n=u(e)){if(e.scheme===t.scheme){if(e.scheme===o.Schemas.file)return i.isEqualOrParent(g(e),g(t),n);if(d(e.authority,t.authority))return i.isEqualOrParent(e.path,t.path,n,"/")}return!1}function d(e,t){return e===t||s.equalsIgnoreCase(e,t)}function f(e){return n.posix.basename(e.path)}function g(e){let t;const n=e.path;return t=e.authority&&n.length>1&&e.scheme===o.Schemas.file?`//${e.authority}${n}`:a.isWindows&&47===n.charCodeAt(0)&&i.isWindowsDriveLetter(n.charCodeAt(1))&&58===n.charCodeAt(2)?n.substr(1):n,a.isWindows&&(t=t.replace(/\//g,"\\")),t}function p(e,t=n.sep){if(e.scheme===o.Schemas.file){const n=g(e);return n.length>i.getRoot(n).length&&n[n.length-1]===t}{const t=e.path;return t.length>1&&47===t.charCodeAt(t.length-1)}}function m(e,t,r=u(e)){if(e.scheme!==t.scheme||!d(e.authority,t.authority))return;if(e.scheme===o.Schemas.file){
const r=n.relative(e.path,t.path);return a.isWindows?i.toSlashes(r):r}let s=e.path||"/",l=t.path||"/";if(r){let e=0;for(const t=Math.min(s.length,l.length);e<t&&(s.charCodeAt(e)===l.charCodeAt(e)||s.charAt(e).toLowerCase()===l.charAt(e).toLowerCase());e++);s=l.substr(0,e)+s.substr(e)}return n.posix.relative(s,l)}Object.defineProperty(t,"__esModule",{value:!0}),t.getComparisonKey=function(e){return u(e)?e.toString().toLowerCase():e.toString()},t.hasToIgnoreCase=u,t.basenameOrAuthority=function(e){return f(e)||e.authority},t.isEqualOrParent=h,t.isEqualAuthority=d,t.isEqual=function(e,t,i=u(e)){if(e===t)return!0;if(!e||!t)return!1;if(e.scheme!==t.scheme||!d(e.authority,t.authority))return!1;const n=e.path||"/",r=t.path||"/";return n===r||i&&s.equalsIgnoreCase(n||"/",r||"/")},t.basename=f,t.extname=function(e){return n.posix.extname(e.path)},t.dirname=function(e){if(0===e.path.length)return e;if(e.scheme===o.Schemas.file)return r.URI.file(n.dirname(g(e)));let t=n.posix.dirname(e.path)
;return e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/"),e.with({path:t})},t.joinPath=function(e,...t){let i;return i=e.scheme===o.Schemas.file?r.URI.file(n.join(g(e),...t)).path:n.posix.join(e.path||"/",...t),e.with({path:i})},t.normalizePath=function(e){if(!e.path.length)return e;let t;return t=e.scheme===o.Schemas.file?r.URI.file(n.normalize(g(e))).path:n.posix.normalize(e.path),e.with({path:t})},t.originalFSPath=g,t.isAbsolutePath=function(e){return!!e.path&&"/"===e.path[0]},t.hasTrailingPathSeparator=p,t.removeTrailingPathSeparator=function(e,t=n.sep){return p(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e},t.addTrailingPathSeparator=function(e,t=n.sep){let r=!1;if(e.scheme===o.Schemas.file){const n=g(e);r=void 0!==n&&n.length===i.getRoot(n).length&&n[n.length-1]===t}else{t="/";const i=e.path;r=1===i.length&&47===i.charCodeAt(i.length-1)}return r||p(e,t)?e:e.with({path:e.path+"/"})},t.relativePath=m,
t.resolvePath=function(e,t){if(e.scheme===o.Schemas.file){const i=r.URI.file(n.resolve(g(e),t));return e.with({authority:i.authority,path:i.path})}return-1===t.indexOf("/")&&(t=i.toSlashes(t),/^[a-zA-Z]:(\/|$)/.test(t)&&(t="/"+t)),e.with({path:n.posix.resolve(e.path,t)})},t.distinctParents=function(e,t){const i=[];for(let n=0;n<e.length;n++){const r=t(e[n]);e.some((e,i)=>i!==n&&h(r,t(e)))||i.push(e[n])}return i},function(e){e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=function(t){const i=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach(e=>{const[t,n]=e.split(":");t&&n&&i.set(t,n)});const n=t.path.substring(0,t.path.indexOf(";"));return n&&i.set(e.META_DATA_MIME,n),i}}(t.DataUri||(t.DataUri={}));t.ResourceGlobMatcher=class{constructor(e,t){this.expressionsByRoot=c.TernarySearchTree.forPaths(),this.globalExpression=l.parse(e);for(const e of t)this.expressionsByRoot.set(e.root.toString(),{
root:e.root,expression:l.parse(e.expression)})}matches(e){const t=this.expressionsByRoot.findSubstr(e.toString());if(t){const i=m(t.root,e);if(i&&t.expression(i))return!0}return!!this.globalExpression(e.path)}},t.toLocalResource=function(e,t){if(t){let i=e.path;return i&&i[0]!==n.posix.sep&&(i=n.posix.sep+i),e.with({scheme:o.Schemas.vscodeRemote,authority:t,path:i})}return e.with({scheme:o.Schemas.file})}})),define(e[47],t([0,1,15,2,11,17,13,24]),(function(e,t,i,n,r,s,o,a){"use strict";function l(e){return!(!o.isWindows||!e||":"!==e[1])}function c(e){return l(e)?e.charAt(0).toUpperCase()+e.slice(1):e}Object.defineProperty(t,"__esModule",{value:!0}),t.getPathLabel=function(e,t,r){if("string"==typeof e&&(e=i.URI.file(e)),r){const t=r.getWorkspaceFolder(e);if(t){const i=r.getWorkspace().folders.length>1;let n;if(n=a.isEqual(t.uri,e)?"":a.relativePath(t.uri,e),i){const e=t.name?t.name:a.basename(t.uri);n=n?e+" • "+n:e}return n}}if(e.scheme!==s.Schemas.file&&e.scheme!==s.Schemas.untitled)return e.with({query:null,
fragment:null}).toString(!0);if(l(e.fsPath))return n.normalize(c(e.fsPath));let u=n.normalize(e.fsPath);return!o.isWindows&&t&&(u=h(u,t.userHome)),u},t.getBaseLabel=function(e){if(!e)return;"string"==typeof e&&(e=i.URI.file(e));const t=a.basename(e)||(e.scheme===s.Schemas.file?e.fsPath:e.path);return l(t)?c(t):t},t.normalizeDriveLetter=c;let u=Object.create(null);function h(e,t){if(o.isWindows||!e||!t)return e;let i=u.original===t?u.normalized:void 0;return i||(i=`${r.rtrim(t,n.posix.sep)}${n.posix.sep}`,u={original:t,normalized:i}),(o.isLinux?r.startsWith(e,i):r.startsWithIgnoreCase(e,i))&&(e=`~/${e.substr(i.length)}`),e}t.tildify=h,t.untildify=function(e,t){return e.replace(/^~($|\/|\\)/,`${t}$1`)};const d="…",f="\\\\",g="~";var p;t.shorten=function(e){const t=new Array(e.length);let i=!1;for(let s=0;s<e.length;s++){let o=e[s];if(""===o){t[s]=`.${n.sep}`;continue}if(!o){t[s]=o;continue}i=!0;let a="";0===o.indexOf(f)?(a=o.substr(0,o.indexOf(f)+f.length),
o=o.substr(o.indexOf(f)+f.length)):0===o.indexOf(n.sep)?(a=o.substr(0,o.indexOf(n.sep)+n.sep.length),o=o.substr(o.indexOf(n.sep)+n.sep.length)):0===o.indexOf(g)&&(a=o.substr(0,o.indexOf(g)+g.length),o=o.substr(o.indexOf(g)+g.length));const l=o.split(n.sep);for(let o=1;i&&o<=l.length;o++)for(let c=l.length-o;i&&c>=0;c--){i=!1;let u=l.slice(c,c+o).join(n.sep);for(let t=0;!i&&t<e.length;t++)if(t!==s&&e[t]&&e[t].indexOf(u)>-1){const s=c+o===l.length,a=c>0&&e[t].indexOf(n.sep)>-1?n.sep+u:u,h=r.endsWith(e[t],a);i=!s||h}if(!i){let e="";(r.endsWith(l[0],":")||""!==a)&&(1===c&&(c=0,o++,u=l[0]+n.sep+u),c>0&&(e=l[0]+n.sep),e=a+e),c>0&&(e=e+d+n.sep),e+=u,c+o<l.length&&(e=e+n.sep+d),t[s]=e}}i&&(t[s]=o)}return t},function(e){e[e.TEXT=0]="TEXT",e[e.VARIABLE=1]="VARIABLE",e[e.SEPARATOR=2]="SEPARATOR"}(p||(p={})),t.template=function(e,t=Object.create(null)){const i=[];let n=!1,r="";for(const s of e)if("$"===s||n&&"{"===s)r&&i.push({value:r,type:p.TEXT}),r="",n=!0;else if("}"===s&&n){const e=t[r]
;if("string"==typeof e)e.length&&i.push({value:e,type:p.VARIABLE});else if(e){const t=i[i.length-1];t&&t.type===p.SEPARATOR||i.push({value:e.label,type:p.SEPARATOR})}r="",n=!1}else r+=s;return r&&!n&&i.push({value:r,type:p.TEXT}),i.filter((e,t)=>{if(e.type===p.SEPARATOR){return[i[t-1],i[t+1]].every(e=>e&&(e.type===p.VARIABLE||e.type===p.TEXT)&&e.value.length>0)}return!0}).map(e=>e.value).join("")},t.mnemonicMenuLabel=function(e,t){return o.isMacintosh||t?e.replace(/\(&&\w\)|&&/g,"").replace(/&/g,o.isMacintosh?"&":"&&"):e.replace(/&&|&/g,e=>"&"===e?"&&":"&")},t.mnemonicButtonLabel=function(e,t){return o.isMacintosh||t?e.replace(/\(&&\w\)|&&/g,""):o.isWindows?e.replace(/&&|&/g,e=>"&"===e?"&&":"&"):e.replace(/&&/g,"_")},t.unmnemonicLabel=function(e){return e.replace(/&/g,"&&")},t.splitName=function(e){const t=-1!==e.indexOf("/")?n.posix:n.win32,i=t.basename(e),r=t.dirname(e);return i.length?{name:i,parentPath:r}:{name:r,parentPath:""}}})),define(e[49],t([0,1,122]),(function(e,t,i){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});t.LineDecoder=class{constructor(e="utf8"){this.stringDecoder=new i.StringDecoder(e),this.remaining=null}write(e){const t=[],i=this.remaining?this.remaining+this.stringDecoder.write(e):this.stringDecoder.write(e);if(i.length<1)return t;let n,r=0,s=r;for(;s<i.length;)if(13===(n=i.charCodeAt(s))||10===n){if(t.push(i.substring(r,s)),++s<i.length){const e=n;n=i.charCodeAt(s),(13===e&&10===n||10===e&&13===n)&&s++}r=s}else s++;return this.remaining=r<i.length?i.substr(r):null,t}end(){return this.remaining}}})),define(e[77],t([0,1,22]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i.getPathFromAmdModule(e,"paths"),r=e.__$__nodeRequire(n);t.getAppDataPath=r.getAppDataPath,t.getDefaultUserDataPath=r.getDefaultUserDataPath})),define(e[53],t([0,1,18,11,2,8,41]),(function(e,t,i,n,r,s,o){"use strict";function a(e){return n.rtrim(r.normalize(e),r.sep)}Object.defineProperty(t,"__esModule",{value:!0}),t.realcaseSync=function e(t){
const i=r.dirname(t);if(t===i)return t;const n=(r.basename(t)||t).toLowerCase();try{const t=s.readdirSync(i).filter(e=>e.toLowerCase()===n);if(1===t.length){const n=e(i);if(n)return r.join(n,t[0])}else if(t.length>1){const s=t.indexOf(n);if(s>=0){const n=e(i);if(n)return r.join(n,t[s])}}}catch(e){}return null},t.realpath=async function(e){try{return await o.promisify(i.realpath)(e)}catch(t){const n=a(e);return await o.promisify(i.access)(n,i.constants.R_OK),n}},t.realpathSync=function(e){try{return i.realpathSync(e)}catch(t){const n=a(e);return i.accessSync(n,i.constants.R_OK),n}}})),define(e[42],t([0,1,2,18,13,121,3,8]),(function(e,t,i,n,r,s,o,a){"use strict";function l(e,c,u){const h=i.basename(e.path),d=new Map;let f=!1,g=[o.toDisposable(()=>{d.forEach(e=>o.dispose(e)),d.clear()})];try{const p=n.watch(e.path);g.push(o.toDisposable(()=>{p.removeAllListeners(),p.close()}));const m=new Set;e.isDirectory&&a.readdir(e.path).then(e=>e.forEach(e=>m.add(e))),p.on("error",(t,i)=>{
f||u(`Failed to watch ${e.path} for changes using fs.watch() (${t}, ${i})`)}),p.on("change",(n,p)=>{if(f)return;let v="";if(p&&(v=p.toString(),r.isMacintosh&&(v=s.normalizeNFC(v))),!v||"change"!==n&&"rename"!==n)return;const y=e.isDirectory?i.join(e.path,v):e.path;if(e.isDirectory)if("rename"===n){const e=d.get(y);e&&o.dispose(e);const i=setTimeout(async()=>{d.delete(y);const e=await a.exists(y);if(f)return;let t;e?m.has(v)?t="changed":(t="added",m.add(v)):(m.delete(v),t="deleted"),c(t,y)},t.CHANGE_BUFFER_DELAY);d.set(y,o.toDisposable(()=>clearTimeout(i)))}else{let e;m.has(v)?e="changed":(e="added",m.add(v)),c(e,y)}else if("rename"===n||v!==h){const i=setTimeout(async()=>{const t=await a.exists(y);f||(t?(c("changed",y),g=[l(e,c,u)]):c("deleted",y))},t.CHANGE_BUFFER_DELAY);o.dispose(g),g=[o.toDisposable(()=>clearTimeout(i))]}else c("changed",y)})}catch(t){a.exists(e.path).then(i=>{i&&!f&&u(`Failed to watch ${e.path} for changes using fs.watch() (${t.toString()})`)})}return o.toDisposable(()=>{f=!0,
g=o.dispose(g)})}Object.defineProperty(t,"__esModule",{value:!0}),t.watchFile=function(e,t,i){return l({path:e,isDirectory:!1},t,i)},t.watchFolder=function(e,t,i){return l({path:e,isDirectory:!0},t,i)},t.CHANGE_BUFFER_DELAY=100})),define(e[78],t([0,1,18,2,10,3,6,40,8,53,42]),(function(e,t,i,n,r,s,o,a,l,c,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class h extends s.Disposable{constructor(e,t={defaultConfig:Object.create(null),onError:e=>console.error(e)}){super(),this._path=e,this.options=t,this._onDidUpdateConfiguration=this._register(new o.Emitter),this.registerWatcher(),this.initAsync()}get path(){return this._path}get hasParseErrors(){return!!this.parseErrors&&this.parseErrors.length>0}get onDidUpdateConfiguration(){return this._onDidUpdateConfiguration.event}initAsync(){this.loadAsync(e=>{this.loaded||this.updateCache(e),this.options.initCallback&&this.options.initCallback(this.getConfig())})}updateCache(e){this.cache=e,this.loaded=!0}loadSync(){try{
return this.parse(i.readFileSync(this._path).toString())}catch(e){return this.options.defaultConfig}}loadAsync(e){i.readFile(this._path,(t,i)=>e(t?this.options.defaultConfig:this.parse(i.toString())))}parse(e){let t;try{return this.parseErrors=[],(t=this.options.parse?this.options.parse(e,this.parseErrors):a.parse(e,this.parseErrors))||this.options.defaultConfig}catch(e){return this.options.defaultConfig}}registerWatcher(){const e=n.dirname(this._path);this.watch(e,!0),this.handleSymbolicLink().then(void 0,()=>{})}async handleSymbolicLink(){const{stat:e,isSymbolicLink:t}=await l.statLink(this._path);if(t&&!e.isDirectory()){const e=await c.realpath(this._path);this.watch(e,!1)}}watch(e,t){this.disposed||(t?this._register(u.watchFolder(e,(e,t)=>t===this._path?this.onConfigFileChange():void 0,e=>this.options.onError(e))):this._register(u.watchFile(e,()=>this.onConfigFileChange(),e=>this.options.onError(e))))}onConfigFileChange(){this.timeoutHandle&&(global.clearTimeout(this.timeoutHandle),
this.timeoutHandle=null),this.timeoutHandle=global.setTimeout(()=>this.reload(),this.options.changeBufferDelay||0)}reload(e){this.loadAsync(t=>{if(r.equals(t,this.cache)||(this.updateCache(t),this._onDidUpdateConfiguration.fire({config:t})),e)return e(t)})}getConfig(){return this.ensureLoaded(),this.cache}ensureLoaded(){this.loaded||this.updateCache(this.loadSync())}dispose(){this.disposed=!0,super.dispose()}}t.ConfigWatcher=h})),define(e[38],t([0,1,6,3,14,26,19,16]),(function(e,t,i,n,r,s,o,a){"use strict";var l,c;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Promise=100]="Promise",e[e.PromiseCancel=101]="PromiseCancel",e[e.EventListen=102]="EventListen",e[e.EventDispose=103]="EventDispose"}(t.RequestType||(t.RequestType={})),function(e){e[e.Initialize=200]="Initialize",e[e.PromiseSuccess=201]="PromiseSuccess",e[e.PromiseError=202]="PromiseError",e[e.PromiseErrorObj=203]="PromiseErrorObj",e[e.EventFire=204]="EventFire"}(t.ResponseType||(t.ResponseType={})),function(e){
e[e.Uninitialized=0]="Uninitialized",e[e.Idle=1]="Idle"}(l||(l={}));class u{constructor(e){this.buffer=e,this.pos=0}read(e){const t=this.buffer.slice(this.pos,this.pos+e);return this.pos+=t.byteLength,t}}class h{constructor(){this.buffers=[]}get buffer(){return a.VSBuffer.concat(this.buffers)}write(e){this.buffers.push(e)}}function d(e){const t=a.VSBuffer.alloc(4);return t.writeUInt32BE(e,0),t}function f(e){return e.read(4).readUInt32BE(0)}function g(e){const t=a.VSBuffer.alloc(1);return t.writeUInt8(e,0),t}!function(e){e[e.Undefined=0]="Undefined",e[e.String=1]="String",e[e.Buffer=2]="Buffer",e[e.VSBuffer=3]="VSBuffer",e[e.Array=4]="Array",e[e.Object=5]="Object"}(c||(c={}));const p={Undefined:g(c.Undefined),String:g(c.String),Buffer:g(c.Buffer),VSBuffer:g(c.VSBuffer),Array:g(c.Array),Object:g(c.Object)},m="undefined"!=typeof Buffer;function v(e,t){if(void 0===t)e.write(p.Undefined);else if("string"==typeof t){const i=a.VSBuffer.fromString(t);e.write(p.String),e.write(d(i.byteLength)),e.write(i)
}else if(m&&Buffer.isBuffer(t)){const i=a.VSBuffer.wrap(t);e.write(p.Buffer),e.write(d(i.byteLength)),e.write(i)}else if(t instanceof a.VSBuffer)e.write(p.VSBuffer),e.write(d(t.byteLength)),e.write(t);else if(Array.isArray(t)){e.write(p.Array),e.write(d(t.length));for(const i of t)v(e,i)}else{const i=a.VSBuffer.fromString(JSON.stringify(t));e.write(p.Object),e.write(d(i.byteLength)),e.write(i)}}function y(e){switch(e.read(1).readUInt8(0)){case c.Undefined:return;case c.String:return e.read(f(e)).toString();case c.Buffer:return e.read(f(e)).buffer;case c.VSBuffer:return e.read(f(e));case c.Array:{const t=f(e),i=[];for(let n=0;n<t;n++)i.push(y(e));return i}case c.Object:return JSON.parse(e.read(f(e)).toString())}}class E{constructor(e,t,i=1e3){this.protocol=e,this.ctx=t,this.timeoutDelay=i,this.channels=new Map,this.activeRequests=new Map,this.pendingRequests=new Map,this.protocolListener=this.protocol.onMessage(e=>this.onRawMessage(e)),this.sendResponse({type:200})}registerChannel(e,t){this.channels.set(e,t),
setTimeout(()=>this.flushPendingRequests(e),0)}sendResponse(e){switch(e.type){case 200:return this.send([e.type]);case 201:case 202:case 204:case 203:return this.send([e.type,e.id],e.data)}}send(e,t){const i=new h;v(i,e),v(i,t),this.sendBuffer(i.buffer)}sendBuffer(e){try{this.protocol.send(e)}catch(e){}}onRawMessage(e){const t=new u(e),i=y(t),n=y(t),r=i[0];switch(r){case 100:return this.onPromise({type:r,id:i[1],channelName:i[2],name:i[3],arg:n});case 102:return this.onEventListen({type:r,id:i[1],channelName:i[2],name:i[3],arg:n});case 101:case 103:return this.disposeActiveRequest({type:r,id:i[1]})}}onPromise(e){const t=this.channels.get(e.channelName);if(!t)return void this.collectPendingRequest(e);const i=new s.CancellationTokenSource;let r;try{r=t.call(this.ctx,e.name,e.arg,i.token)}catch(e){r=Promise.reject(e)}const o=e.id;r.then(t=>{this.sendResponse({id:o,data:t,type:201}),this.activeRequests.delete(e.id)},t=>{t instanceof Error?this.sendResponse({id:o,data:{message:t.message,name:t.name,
stack:t.stack?t.stack.split?t.stack.split("\n"):t.stack:void 0},type:202}):this.sendResponse({id:o,data:t,type:203}),this.activeRequests.delete(e.id)});const a=n.toDisposable(()=>i.cancel());this.activeRequests.set(e.id,a)}onEventListen(e){const t=this.channels.get(e.channelName);if(!t)return void this.collectPendingRequest(e);const i=e.id,n=t.listen(this.ctx,e.name,e.arg)(e=>this.sendResponse({id:i,data:e,type:204}));this.activeRequests.set(e.id,n)}disposeActiveRequest(e){const t=this.activeRequests.get(e.id);t&&(t.dispose(),this.activeRequests.delete(e.id))}collectPendingRequest(e){let t=this.pendingRequests.get(e.channelName);t||(t=[],this.pendingRequests.set(e.channelName,t));const i=setTimeout(()=>{console.error(`Unknown channel: ${e.channelName}`),100===e.type&&this.sendResponse({id:e.id,data:{name:"Unknown channel",message:`Channel name '${e.channelName}' timed out after ${this.timeoutDelay}ms`,stack:void 0},type:202})},this.timeoutDelay);t.push({request:e,timeoutTimer:i})}flushPendingRequests(e){
const t=this.pendingRequests.get(e);if(t){for(const e of t)switch(clearTimeout(e.timeoutTimer),e.request.type){case 100:this.onPromise(e.request);break;case 102:this.onEventListen(e.request)}this.pendingRequests.delete(e)}}dispose(){this.protocolListener&&(this.protocolListener.dispose(),this.protocolListener=null),this.activeRequests.forEach(e=>e.dispose()),this.activeRequests.clear()}}t.ChannelServer=E;class S{constructor(e){this.protocol=e,this.state=l.Uninitialized,this.activeRequests=new Set,this.handlers=new Map,this.lastRequestId=0,this._onDidInitialize=new i.Emitter,this.onDidInitialize=this._onDidInitialize.event,this.protocolListener=this.protocol.onMessage(e=>this.onBuffer(e))}getChannel(e){const t=this;return{call:(i,n,r)=>t.requestPromise(e,i,n,r),listen:(i,n)=>t.requestEvent(e,i,n)}}requestPromise(e,t,i,a=s.CancellationToken.None){const l=this.lastRequestId++,c={id:l,type:100,channelName:e,name:t,arg:i};if(a.isCancellationRequested)return Promise.reject(o.canceled());let u
;return new Promise((e,t)=>{if(a.isCancellationRequested)return t(o.canceled());let i=r.createCancelablePromise(e=>this.whenInitialized());i.then(()=>{i=null;this.handlers.set(l,i=>{switch(i.type){case 201:this.handlers.delete(l),e(i.data);break;case 202:this.handlers.delete(l);const n=new Error(i.data.message);n.stack=i.data.stack,n.name=i.data.name,t(n);break;case 203:this.handlers.delete(l),t(i.data)}}),this.sendRequest(c)});const s=()=>{i?(i.cancel(),i=null):this.sendRequest({id:l,type:101}),t(o.canceled())},h=a.onCancellationRequested(s);u=n.combinedDisposable(n.toDisposable(s),h),this.activeRequests.add(u)}).finally(()=>this.activeRequests.delete(u))}requestEvent(e,t,n){const s=this.lastRequestId++,o={id:s,type:102,channelName:e,name:t,arg:n};let a=null;const l=new i.Emitter({onFirstListenerAdd:()=>{(a=r.createCancelablePromise(e=>this.whenInitialized())).then(()=>{a=null,this.activeRequests.add(l),this.sendRequest(o)})},onLastListenerRemove:()=>{a?(a.cancel(),a=null):(this.activeRequests.delete(l),
this.sendRequest({id:s,type:103}))}});return this.handlers.set(s,e=>l.fire(e.data)),l.event}sendRequest(e){switch(e.type){case 100:case 102:return this.send([e.type,e.id,e.channelName,e.name],e.arg);case 101:case 103:return this.send([e.type,e.id])}}send(e,t){const i=new h;v(i,e),v(i,t),this.sendBuffer(i.buffer)}sendBuffer(e){try{this.protocol.send(e)}catch(e){}}onBuffer(e){const t=new u(e),i=y(t),n=y(t);switch(i[0]){case 200:return this.onResponse({type:i[0]});case 201:case 202:case 204:case 203:return this.onResponse({type:i[0],id:i[1],data:n})}}onResponse(e){if(200===e.type)return this.state=l.Idle,void this._onDidInitialize.fire();const t=this.handlers.get(e.id);t&&t(e)}whenInitialized(){return this.state===l.Idle?Promise.resolve():i.Event.toPromise(this.onDidInitialize)}dispose(){this.protocolListener&&(this.protocolListener.dispose(),this.protocolListener=null),this.activeRequests.forEach(e=>e.dispose()),this.activeRequests.clear()}}t.ChannelClient=S;t.IPCServer=class{constructor(e){
this.channels=new Map,this._connections=new Set,this._onDidChangeConnections=new i.Emitter,this.onDidChangeConnections=this._onDidChangeConnections.event,e(({protocol:e,onDidClientDisconnect:t})=>{i.Event.once(e.onMessage)(i=>{const n=y(new u(i)),r=new E(e,n),s=new S(e);this.channels.forEach((e,t)=>r.registerChannel(t,e));const o={channelServer:r,channelClient:s,ctx:n};this._connections.add(o),this._onDidChangeConnections.fire(o),t(()=>{r.dispose(),s.dispose(),this._connections.delete(o)})})})}get connections(){const e=[];return this._connections.forEach(t=>e.push(t)),e}getChannel(e,t){const i=this;return{call:(n,r,s)=>w(t.routeCall(i,n,r).then(t=>t.channelClient.getChannel(e))).call(n,r,s),listen:(n,r)=>w(t.routeEvent(i,n,r).then(t=>t.channelClient.getChannel(e))).listen(n,r)}}registerChannel(e,t){this.channels.set(e,t),this._connections.forEach(i=>{i.channelServer.registerChannel(e,t)})}dispose(){this.channels.clear(),this._connections.clear(),this._onDidChangeConnections.dispose()}};function w(e){return{
call:(t,i,n)=>e.then(e=>e.call(t,i,n)),listen(t,n){const r=new i.Relay;return e.then(e=>r.input=e.listen(t,n)),r.event}}}t.IPCClient=class{constructor(e,t){const i=new h;v(i,t),e.send(i.buffer),this.channelClient=new S(e),this.channelServer=new E(e,t)}getChannel(e){return this.channelClient.getChannel(e)}registerChannel(e,t){this.channelServer.registerChannel(e,t)}dispose(){this.channelClient.dispose(),this.channelServer.dispose()}},t.getDelayedChannel=w,t.getNextTickChannel=function(e){let t=!1;return{call:(i,n,s)=>t?e.call(i,n,s):r.timeout(0).then(()=>t=!0).then(()=>e.call(i,n,s)),listen(n,s){if(t)return e.listen(n,s);const o=new i.Relay;return r.timeout(0).then(()=>t=!0).then(()=>o.input=e.listen(n,s)),o.event}}};t.StaticRouter=class{constructor(e){this.fn=e}routeCall(e){return this.route(e)}routeEvent(e){return this.route(e)}async route(e){for(const t of e.connections)if(await Promise.resolve(this.fn(t.ctx)))return Promise.resolve(t);return await i.Event.toPromise(e.onDidChangeConnections),
await this.route(e)}}})),define(e[72],t([7,5]),(function(e,t){return e.create("vs/base/common/errorMessage",t)})),define(e[43],t([0,1,72,9,28]),(function(e,t,i,n,r){"use strict";function s(e,t){return e.message?t&&(e.stack||e.stacktrace)?i.localize(0,null,a(e),o(e.stack)||o(e.stacktrace)):a(e):i.localize(1,null)}function o(e){return Array.isArray(e)?e.join("\n"):e}function a(e){return"string"==typeof e.code&&"number"==typeof e.errno&&"string"==typeof e.syscall?i.localize(2,null,e.message):e.message}Object.defineProperty(t,"__esModule",{value:!0}),t.toErrorMessage=function e(t=null,o=!1){if(!t)return i.localize(3,null);if(Array.isArray(t)){const n=r.coalesce(t),s=e(n[0],o);return n.length>1?i.localize(4,null,s,n.length):s}if(n.isString(t))return t;if(t.detail){const e=t.detail;if(e.error)return s(e.error,o);if(e.exception)return s(e.exception,o)}return t.stack?s(t,o):t.message?t.message:i.localize(5,null)}})),define(e[79],t([7,5]),(function(e,t){return e.create("vs/base/node/processes",t)})),
define(e[80],t([0,1,2,18,41,36,79,9,10,35,13,49,22]),(function(e,t,i,n,r,s,o,a,l,c,u,h,d){"use strict";function f(e){switch(e){case 0:return 0;case 1:return 2;case 128:return 3;default:return 1}}function g(){return process.env.comspec||"cmd.exe"}Object.defineProperty(t,"__esModule",{value:!0}),t.getWindowsShell=g;class p{constructor(e,t,i,n){if(void 0!==t&&void 0!==i&&void 0!==n)this.cmd=e,this.args=t,this.shell=i,this.options=n;else{const t=e;this.cmd=t.command,this.shell=t.isShellCommand,this.args=t.args.slice(0),this.options=t.options||{}}if(this.childProcess=null,this.childProcessPromise=null,this.terminateRequested=!1,this.options.env){const e=Object.create(null);Object.keys(process.env).forEach(t=>{e[t]=process.env[t]}),Object.keys(this.options.env).forEach(t=>{e[t]=this.options.env[t]}),this.options.env=e}}getSanitizedCommand(){let e=this.cmd.toLowerCase();const t=e.lastIndexOf(i.sep);return-1!==t&&(e=e.substring(t+1)),p.WellKnowCommands[e]?e:"other"}start(e){
return u.isWindows&&(this.options&&this.options.cwd&&c.isUNC(this.options.cwd)||!this.options&&c.isUNC(process.cwd()))?Promise.reject(new Error(o.localize(0,null))):this.useExec().then(t=>{let i,n;const r=new Promise((e,t)=>{i=e,n=t});if(t){let t=this.cmd;this.args&&(t=t+" "+this.args.join(" ")),this.childProcess=s.exec(t,this.options,(t,r,s)=>{this.childProcess=null;t&&t.killed?n({killed:this.terminateRequested,stdout:r.toString(),stderr:s.toString()}):this.handleExec(i,e,t,r,s)})}else{let t=null;const r=t=>{this.childProcess=null,this.childProcessPromise=null,this.handleClose(t,i,e,n);const r={terminated:this.terminateRequested};a.isNumber(t)&&(r.cmdCode=t),i(r)};if(this.shell&&u.isWindows){const e=l.deepClone(this.options);e.windowsVerbatimArguments=!0,e.detached=!1;let i=!1,n=!1;const r=[];let o=this.ensureQuotes(this.cmd);r.push(o.value),i=o.quoted,this.args&&this.args.forEach(e=>{o=this.ensureQuotes(e),r.push(o.value),n=n&&o.quoted});const a=["/s","/c"]
;i?n?a.push('"'+r.join(" ")+'"'):r.length>1?a.push('"'+r[0]+'" '+r.slice(1).join(" ")):a.push('"'+r[0]+'"'):a.push(r.join(" ")),t=s.spawn(g(),a,e)}else this.cmd&&(t=s.spawn(this.cmd,this.args,this.options));t&&(this.childProcess=t,this.childProcessPromise=Promise.resolve(t),this.pidResolve&&(this.pidResolve(a.isNumber(t.pid)?t.pid:-1),this.pidResolve=void 0),t.on("error",e=>{this.childProcess=null,n({terminated:this.terminateRequested,error:e})}),t.pid&&(this.childProcess.on("close",r),this.handleSpawn(t,i,e,n,!0)))}return r})}handleClose(e,t,i,n){}ensureQuotes(e){return p.regexp.test(e)?{value:'"'+e+'"',quoted:!0}:{value:e,quoted:e.length>0&&'"'===e[0]&&'"'===e[e.length-1]}}get pid(){return this.childProcessPromise?this.childProcessPromise.then(e=>e.pid,e=>-1):new Promise(e=>{this.pidResolve=e})}terminate(){return this.childProcessPromise?this.childProcessPromise.then(t=>(this.terminateRequested=!0,function(t,i){if(u.isWindows)try{const e={stdio:["pipe","pipe","ignore"]};i&&(e.cwd=i)
;const n=s.execFile("taskkill",["/T","/F","/PID",t.pid.toString()],e);return new Promise((e,t)=>{n.once("error",t=>{e({success:!1,error:t})}),n.once("exit",(t,i)=>{e(0===t?{success:!0}:{success:!1,code:null!==t?t:1})})})}catch(e){return Promise.resolve({success:!1,error:e,code:e.status?f(e.status):1})}else if(u.isLinux||u.isMacintosh)try{const i=d.getPathFromAmdModule(e,"vs/base/node/terminateProcess.sh");return new Promise((e,n)=>{s.execFile(i,[t.pid.toString()],{encoding:"utf8",shell:!0},(t,i,n)=>{e(t?{success:!1,error:t}:{success:!0})})})}catch(e){return Promise.resolve({success:!1,error:e})}else t.kill("SIGKILL");return Promise.resolve({success:!0})}(t,this.options.cwd).then(e=>(e.success&&(this.childProcess=null),e))),e=>({success:!0})):Promise.resolve({success:!0})}useExec(){return new Promise((e,t)=>{if(!this.shell||!u.isWindows)return e(!1);const i=s.spawn(g(),["/s","/c"]);i.on("error",t=>e(!0)),i.on("exit",t=>e(!1))})}}t.AbstractProcess=p,p.WellKnowCommands={ant:!0,cmake:!0,eslint:!0,gradle:!0,
grunt:!0,gulp:!0,jake:!0,jenkins:!0,jshint:!0,make:!0,maven:!0,msbuild:!0,msc:!0,nmake:!0,npm:!0,rake:!0,tsc:!0,xbuild:!0},p.regexp=/^[^"].* .*[^"]/;t.LineProcess=class extends p{constructor(e,t,i,n){super(e,t,i,n),this.stdoutLineDecoder=null,this.stderrLineDecoder=null}handleExec(e,t,i,n,r){[n,r].forEach((e,i)=>{const n=new h.LineDecoder;n.write(e).forEach(e=>{t({line:e,source:0===i?0:1})});const r=n.end();r&&t({line:r,source:0===i?0:1})}),e({terminated:this.terminateRequested,error:i})}handleSpawn(e,t,i,n,r){const s=new h.LineDecoder,o=new h.LineDecoder;e.stdout.on("data",e=>{s.write(e).forEach(e=>i({line:e,source:0}))}),e.stderr.on("data",e=>{o.write(e).forEach(e=>i({line:e,source:1}))}),this.stdoutLineDecoder=s,this.stderrLineDecoder=o}handleClose(e,t,i,n){const r=this.stdoutLineDecoder?this.stdoutLineDecoder.end():null;r&&i({line:r,source:0});const s=this.stderrLineDecoder?this.stderrLineDecoder.end():null;s&&i({line:s,source:1})}},t.createQueuedSender=function(e){let t=[],i=!1;const n=function(r){
if(i)return void t.push(r);e.send(r,e=>{if(e&&console.error(e),i=!1,t.length>0){const e=t.slice(0);t=[],e.forEach(e=>n(e))}})&&!u.isWindows||(i=!0)};return{send:n}},function(e){e.findExecutable=async function(e,t,s){if(i.isAbsolute(e))return e;if(void 0===t&&(t=process.cwd()),"."!==i.dirname(e))return i.join(t,e);if(void 0===s&&a.isString(process.env.PATH)&&(s=process.env.PATH.split(i.delimiter)),void 0===s||0===s.length)return i.join(t,e);async function o(e){return!!await r.promisify(n.exists)(e)&&!(await r.promisify(n.stat)(e)).isDirectory}for(let n of s){let r;if(r=i.isAbsolute(n)?i.join(n,e):i.join(t,n,e),await o(r))return r;let s=r+".com";if(await o(s))return s;if(s=r+".exe",await o(s))return s}return i.join(t,e)}}(t.win32||(t.win32={}))})),define(e[51],t([0,1,36,3,14,10,6,80,38,62,26,19,16]),(function(e,t,i,n,r,s,o,a,l,c,u,h,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class f extends l.ChannelServer{constructor(e){super({send:e=>{try{
process.send&&process.send(e.buffer.toString("base64"))}catch(e){}},onMessage:o.Event.fromNodeEventEmitter(process,"message",e=>d.VSBuffer.wrap(Buffer.from(e,"base64")))},e),process.once("disconnect",()=>this.dispose())}}t.Server=f;t.Client=class{constructor(e,t){this.modulePath=e,this.options=t,this.activeRequests=new Set,this.channels=new Map,this._onDidProcessExit=new o.Emitter,this.onDidProcessExit=this._onDidProcessExit.event;const i=t&&t.timeout?t.timeout:6e4;this.disposeDelayer=new r.Delayer(i),this.child=null,this._client=null}getChannel(e){const t=this;return{call:(i,n,r)=>t.requestPromise(e,i,n,r),listen:(i,n)=>t.requestEvent(e,i,n)}}requestPromise(e,t,i,s=u.CancellationToken.None){if(!this.disposeDelayer)return Promise.reject(new Error("disposed"));if(s.isCancellationRequested)return Promise.reject(h.canceled());this.disposeDelayer.cancel();const o=this.getCachedChannel(e),a=r.createCancelablePromise(e=>o.call(t,i,e)),l=s.onCancellationRequested(()=>a.cancel()),c=n.toDisposable(()=>a.cancel())
;return this.activeRequests.add(c),a.finally(()=>{l.dispose(),this.activeRequests.delete(c),0===this.activeRequests.size&&this.disposeDelayer&&this.disposeDelayer.trigger(()=>this.disposeClient())}),a}requestEvent(e,t,i){if(!this.disposeDelayer)return o.Event.None;let n;this.disposeDelayer.cancel();const r=new o.Emitter({onFirstListenerAdd:()=>{const s=this.getCachedChannel(e).listen(t,i);n=s(r.fire,r),this.activeRequests.add(n)},onLastListenerRemove:()=>{this.activeRequests.delete(n),n.dispose(),0===this.activeRequests.size&&this.disposeDelayer&&this.disposeDelayer.trigger(()=>this.disposeClient())}});return r.event}get client(){if(!this._client){const e=this.options&&this.options.args?this.options.args:[],t=Object.create(null);t.env=s.assign(s.deepClone(process.env),{VSCODE_PARENT_PID:String(process.pid)}),this.options&&this.options.env&&(t.env=s.assign(t.env,this.options.env)),this.options&&this.options.freshExecArgv&&(t.execArgv=[]),
this.options&&"number"==typeof this.options.debug&&(t.execArgv=["--nolazy","--inspect="+this.options.debug]),this.options&&"number"==typeof this.options.debugBrk&&(t.execArgv=["--nolazy","--inspect-brk="+this.options.debugBrk]),this.child=i.fork(this.modulePath,e,t);const r=new o.Emitter;o.Event.fromNodeEventEmitter(this.child,"message",e=>e)(e=>{c.isRemoteConsoleLog(e)?c.log(e,`IPC Library: ${this.options.serverName}`):r.fire(d.VSBuffer.wrap(Buffer.from(e,"base64")))});const u=this.options.useQueue?a.createQueuedSender(this.child):this.child,h={send:e=>this.child&&this.child.connected&&u.send(e.buffer.toString("base64")),onMessage:r.event};this._client=new l.ChannelClient(h);const f=()=>this.disposeClient();process.once("exit",f),this.child.on("error",e=>console.warn('IPC "'+this.options.serverName+'" errored with '+e)),this.child.on("exit",(e,t)=>{process.removeListener("exit",f),this.activeRequests.forEach(e=>n.dispose(e)),this.activeRequests.clear(),
0!==e&&"SIGTERM"!==t&&console.warn('IPC "'+this.options.serverName+'" crashed with exit code '+e+" and signal "+t),this.disposeDelayer&&this.disposeDelayer.cancel(),this.disposeClient(),this._onDidProcessExit.fire({code:e,signal:t})})}return this._client}getCachedChannel(e){let t=this.channels.get(e);return t||(t=this.client.getChannel(e),this.channels.set(e,t)),t}disposeClient(){this._client&&(this.child&&(this.child.kill(),this.child=null),this._client=null,this.channels.clear())}dispose(){this._onDidProcessExit.dispose(),this.disposeDelayer&&(this.disposeDelayer.cancel(),this.disposeDelayer=void 0),this.disposeClient(),this.activeRequests.clear()}}})),define(e[91],t([7,5]),(function(e,t){return e.create("vs/base/node/zip",t)})),define(e[92],t([7,5]),(function(e,t){return e.create("vs/platform/configuration/common/configurationRegistry",t)})),define(e[94],t([7,5]),(function(e,t){return e.create("vs/platform/extensionManagement/common/extensionManagement",t)})),define(e[95],t([7,5]),(function(e,t){
return e.create("vs/platform/extensionManagement/node/extensionManagementService",t)})),define(e[97],t([7,5]),(function(e,t){return e.create("vs/platform/extensionManagement/node/extensionManagementUtil",t)})),define(e[98],t([7,5]),(function(e,t){return e.create("vs/platform/extensions/common/extensionValidator",t)})),define(e[101],t([7,5]),(function(e,t){return e.create("vs/platform/files/common/fileService",t)})),define(e[107],t([7,5]),(function(e,t){return e.create("vs/platform/files/common/files",t)})),define(e[109],t([7,5]),(function(e,t){return e.create("vs/platform/files/common/io",t)})),define(e[111],t([7,5]),(function(e,t){return e.create("vs/platform/files/node/diskFileSystemProvider",t)})),define(e[116],t([7,5]),(function(e,t){return e.create("vs/platform/request/common/request",t)})),define(e[117],t([7,5]),(function(e,t){return e.create("vs/platform/telemetry/common/telemetryService",t)})),define(e[60],t([0,1,10]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0})
;const n=/^%([\w\d.-]+)%$/i;t.localizeManifest=function(e,t){return i.cloneAndChange(e,e=>{if("string"!=typeof e)return;const i=n.exec(e);return i?t[i[1]]||e:void 0})}})),define(e[61],t([0,1,3,36,43,2,14,6,17,8]),(function(e,t,i,n,r,s,o,a,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class u extends i.Disposable{constructor(e,t){super(),this.environmentService=e,this.logService=t,this.processesLimiter=new o.Limiter(5)}async postUninstall(e){const t=this.parseScript(e,"uninstall");return t&&(this.logService.info(e.identifier.id,e.manifest.version,"Running post uninstall script"),await this.processesLimiter.queue(()=>this.runLifecycleHook(t.script,"uninstall",t.args,!0,e).then(()=>this.logService.info(e.identifier.id,e.manifest.version,"Finished running post uninstall script"),t=>this.logService.error(e.identifier.id,e.manifest.version,`Failed to run post uninstall script: ${t}`)))),
c.rimraf(this.getExtensionStoragePath(e)).then(void 0,e=>this.logService.error("Error while removing extension storage path",e))}parseScript(e,t){const i=`vscode:${t}`;if(e.location.scheme===l.Schemas.file&&e.manifest&&e.manifest.scripts&&"string"==typeof e.manifest.scripts[i]){const t=e.manifest.scripts[i].split(" ");return t.length<2||"node"!==t[0]||!t[1]?(this.logService.warn(e.identifier.id,e.manifest.version,`${i} should be a node script`),null):{script:s.join(e.location.fsPath,t[1]),args:t.slice(2)||[]}}return null}runLifecycleHook(e,t,i,n,s){return new Promise((o,a)=>{const l=this.start(e,t,i,s);let c;const u=e=>{c&&(clearTimeout(c),c=null),e?a(e):o(void 0)};l.on("error",e=>{u(r.toErrorMessage(e)||"Unknown")}),l.on("exit",(e,i)=>{u(e?`post-${t} process exited with code ${e}`:void 0)}),n&&(c=setTimeout(()=>{c=null,l.kill(),a("timed out")},5e3))})}start(e,t,i,r){const s={silent:!0,execArgv:void 0},o=n.fork(e,[`--type=extension-post-${t}`,...i],s);o.stdout.setEncoding("utf8"),o.stderr.setEncoding("utf8")
;const l=a.Event.fromNodeEventEmitter(o.stdout,"data"),c=a.Event.fromNodeEventEmitter(o.stderr,"data");l(e=>this.logService.info(r.identifier.id,r.manifest.version,`post-${t}`,e)),c(e=>this.logService.error(r.identifier.id,r.manifest.version,`post-${t}`,e));const u=a.Event.any(a.Event.map(l,e=>({data:`%c${e}`,format:[""]})),a.Event.map(c,e=>({data:`%c${e}`,format:["color: red"]})));return a.Event.debounce(u,(e,t)=>e?{data:e.data+t.data,format:[...e.format,...t.format]}:{data:t.data,format:t.format},100)(e=>{console.group(r.identifier.id),console.log(e.data,...e.format),console.groupEnd()}),o}getExtensionStoragePath(e){return s.join(this.environmentService.globalStorageHome,e.identifier.id.toLowerCase())}}t.ExtensionsLifecycle=u})),define(e[55],t([0,1,98]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=/^(\^|>=)?((\d+)|x)\.((\d+)|x)\.((\d+)|x)(\-.*)?$/;function r(e){return"*"===(e=e.trim())||n.test(e)}function s(e){if(!r(e))return null;if("*"===(e=e.trim()))return{
hasCaret:!1,hasGreaterEquals:!1,majorBase:0,majorMustEqual:!1,minorBase:0,minorMustEqual:!1,patchBase:0,patchMustEqual:!1,preRelease:null};let t=e.match(n);return t?{hasCaret:"^"===t[1],hasGreaterEquals:">="===t[1],majorBase:"x"===t[2]?0:parseInt(t[2],10),majorMustEqual:"x"!==t[2],minorBase:"x"===t[4]?0:parseInt(t[4],10),minorMustEqual:"x"!==t[4],patchBase:"x"===t[6]?0:parseInt(t[6],10),patchMustEqual:"x"!==t[6],preRelease:t[8]||null}:null}function o(e){if(!e)return null;let t=e.majorBase,i=e.majorMustEqual,n=e.minorBase,r=e.minorMustEqual,s=e.patchBase,o=e.patchMustEqual;return e.hasCaret&&(0===t?o=!1:(r=!1,o=!1)),{majorBase:t,majorMustEqual:i,minorBase:n,minorMustEqual:r,patchBase:s,patchMustEqual:o,isMinimum:e.hasGreaterEquals}}function a(e,t){let i,n;if(i="string"==typeof e?o(s(e)):e,n="string"==typeof t?o(s(t)):t,!i||!n)return!1;let r=i.majorBase,a=i.minorBase,l=i.patchBase,c=n.majorBase,u=n.minorBase,h=n.patchBase,d=n.majorMustEqual,f=n.minorMustEqual,g=n.patchMustEqual
;return n.isMinimum?r>c||!(r<c)&&(a>u||!(a<u)&&l>=h):(1!==r||0!==c||d&&f&&g||(c=1,u=0,h=0,d=!0,f=!1,g=!1),!(r<c)&&(r>c?!d:!(a<u)&&(a>u?!f:!(l<h)&&(!(l>h)||!g))))}function l(e,t,n=[]){let r=o(s(t));if(!r)return n.push(i.localize(0,null,t)),!1;if(0===r.majorBase){if(!r.majorMustEqual||!r.minorMustEqual)return n.push(i.localize(1,null,t)),!1}else if(!r.majorMustEqual)return n.push(i.localize(2,null,t)),!1;return!!a(e,r)||(n.push(i.localize(3,null,e,t)),!1)}t.isValidVersionStr=r,t.parseVersion=s,t.normalizeVersion=o,t.isValidVersion=a,t.isValidExtensionVersion=function(e,t,i){return!(!t.isBuiltin&&void 0!==t.main)||l(e,t.engines.vscode,i)},t.isEngineValid=function(e,t){return"*"===e||l(t,e)},t.isVersionValid=l})),define(e[32],t([0,1,11]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MANIFEST_CACHE_FOLDER="CachedExtensions",t.USER_MANIFEST_CACHE_FILE="user",t.BUILTIN_MANIFEST_CACHE_FILE="builtin",t.isIExtensionIdentifier=function(e){
return e&&"object"==typeof e&&"string"==typeof e.id&&(!e.uuid||"string"==typeof e.uuid)},function(e){e[e.System=0]="System",e[e.User=1]="User"}(t.ExtensionType||(t.ExtensionType={}));t.ExtensionIdentifier=class{constructor(e){this.value=e,this._lower=e.toLowerCase()}static equals(e,t){if(null==e)return null==t;if(null==t)return!1;if("string"==typeof e||"string"==typeof t){let n="string"==typeof e?e:e.value,r="string"==typeof t?t:t.value;return i.equalsIgnoreCase(n,r)}return e._lower===t._lower}static toKey(e){return"string"==typeof e?e.toLowerCase():e._lower}},t.isLanguagePackExtension=function(e){return!(!e.contributes||!e.contributes.localizations)&&e.contributes.localizations.length>0}})),define(e[30],t([0,1,11,32]),(function(e,t,i,n){"use strict";function r(e,t){return e.uuid&&t.uuid?e.uuid===t.uuid:e.id===t.id||0===i.compareIgnoreCase(e.id,t.id)}Object.defineProperty(t,"__esModule",{value:!0}),t.areSameExtensions=r;class s{constructor(e,t){this.identifier=e,this.version=t}key(){
return`${this.identifier.id}-${this.version}`}equals(e){return e instanceof s&&(r(this.identifier,e.identifier)&&this.version===e.version)}}t.ExtensionIdentifierWithVersion=s,t.adoptToGalleryExtensionId=function(e){return e.toLocaleLowerCase()},t.getGalleryExtensionId=function(e,t){return`${e.toLocaleLowerCase()}.${t.toLocaleLowerCase()}`},t.groupByExtension=function(e,t){const i=[],n=e=>{for(const n of i)if(n.some(i=>r(t(i),t(e))))return n;return null};for(const t of e){const e=n(t);e?e.push(t):i.push([t])}return i},t.getLocalExtensionTelemetryData=function(e){return{id:e.identifier.id,name:e.manifest.name,galleryId:null,publisherId:e.metadata?e.metadata.publisherId:null,publisherName:e.manifest.publisher,publisherDisplayName:e.metadata?e.metadata.publisherDisplayName:null,dependencies:e.manifest.extensionDependencies&&e.manifest.extensionDependencies.length>0}},t.getGalleryExtensionTelemetryData=function(e){return Object.assign({id:e.identifier.id,name:e.name,galleryId:e.identifier.uuid,
publisherId:e.publisherId,publisherName:e.publisher,publisherDisplayName:e.publisherDisplayName,dependencies:!!(e.properties.dependencies&&e.properties.dependencies.length>0)},e.telemetryData)},t.BetterMergeId=new n.ExtensionIdentifier("pprice.better-merge"),t.getMaliciousExtensionsSet=function(e){const t=new Set;for(const i of e)i.malicious&&t.add(i.id.id);return t}})),define(e[65],t([0,1,3,2,32,8]),(function(e,t,i,n,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class o extends i.Disposable{constructor(e,t){super(),this.environmentService=e,this.extensionsManifestCache=n.join(this.environmentService.userDataPath,r.MANIFEST_CACHE_FOLDER,r.USER_MANIFEST_CACHE_FILE),this._register(t.onDidInstallExtension(e=>this.onDidInstallExtension(e))),this._register(t.onDidUninstallExtension(e=>this.onDidUnInstallExtension(e)))}onDidInstallExtension(e){e.error||this.invalidate()}onDidUnInstallExtension(e){e.error||this.invalidate()}invalidate(){
s.rimraf(this.extensionsManifestCache,s.RimRafMode.MOVE).then(()=>{},()=>{})}}t.ExtensionsManifestCache=o})),define(e[66],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.WatcherChannel=class{constructor(e){this.service=e}listen(e,t,i){switch(t){case"watch":return this.service.watch(i);case"onLogMessage":return this.service.onLogMessage}throw new Error(`Event not found: ${t}`)}call(e,t,i){switch(t){case"setRoots":return this.service.setRoots(i);case"setVerboseLogging":return this.service.setVerboseLogging(i);case"stop":return this.service.stop()}throw new Error(`Call not found: ${t}`)}};t.WatcherChannelClient=class{constructor(e){this.channel=e}watch(e){return this.channel.listen("watch",e)}setVerboseLogging(e){return this.channel.call("setVerboseLogging",e)}setRoots(e){return this.channel.call("setRoots",e)}get onLogMessage(){return this.channel.listen("onLogMessage")}stop(){return this.channel.call("stop")}}})),
define(e[67],t([0,1,38,51,66,3,22]),(function(e,t,i,n,r,s,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class a extends s.Disposable{constructor(e,t,i,n){super(),this.folders=e,this.onFileChanges=t,this.onLogMessage=i,this.verboseLogging=n,this.isDisposed=!1,this.restartCounter=0,this.startWatching()}startWatching(){const t=this._register(new n.Client(o.getPathFromAmdModule(e,"bootstrap-fork"),{serverName:"File Watcher (nsfw)",args:["--type=watcherService"],env:{AMD_ENTRYPOINT:"vs/platform/files/node/watcher/nsfw/watcherApp",PIPE_LOGGING:"true",VERBOSE_LOGGING:"true"}}));this._register(t.onDidProcessExit(()=>{this.isDisposed||(this.restartCounter<=a.MAX_RESTARTS?(this.error("terminated unexpectedly and is restarted again..."),this.restartCounter++,this.startWatching()):this.error("failed to start after retrying for some time, giving up. Please report this as a bug report!"))}));const s=i.getNextTickChannel(t.getChannel("watcher"));this.service=new r.WatcherChannelClient(s),
this.service.setVerboseLogging(this.verboseLogging);this._register(this.service.watch({})(e=>!this.isDisposed&&this.onFileChanges(e))),this._register(this.service.onLogMessage(e=>this.onLogMessage(e))),this.setFolders(this.folders)}setVerboseLogging(e){this.verboseLogging=e,!this.isDisposed&&this.service&&this.service.setVerboseLogging(e)}error(e){this.onLogMessage({type:"error",message:`[File Watcher (nsfw)] ${e}`})}setFolders(e){this.folders=e,this.service&&this.service.setRoots(e)}dispose(){this.isDisposed=!0,super.dispose()}}t.FileWatcher=a,a.MAX_RESTARTS=5})),define(e[68],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.WatcherChannel=class{constructor(e){this.service=e}listen(e,t,i){switch(t){case"watch":return this.service.watch(i);case"onLogMessage":return this.service.onLogMessage}throw new Error(`Event not found: ${t}`)}call(e,t,i){switch(t){case"setRoots":return this.service.setRoots(i);case"setVerboseLogging":return this.service.setVerboseLogging(i)
;case"stop":return this.service.stop()}throw new Error(`Call not found: ${t}`)}};t.WatcherChannelClient=class{constructor(e){this.channel=e}watch(e){return this.channel.listen("watch",e)}setVerboseLogging(e){return this.channel.call("setVerboseLogging",e)}get onLogMessage(){return this.channel.listen("onLogMessage")}setRoots(e){return this.channel.call("setRoots",e)}stop(){return this.channel.call("stop")}}})),define(e[69],t([0,1,38,51,68,3,22]),(function(e,t,i,n,r,s,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class a extends s.Disposable{constructor(e,t,i,n,r={}){super(),this.folders=e,this.onFileChanges=t,this.onLogMessage=i,this.verboseLogging=n,this.watcherOptions=r,this.isDisposed=!1,this.restartCounter=0,this.startWatching()}startWatching(){const t=this._register(new n.Client(o.getPathFromAmdModule(e,"bootstrap-fork"),{serverName:"File Watcher (chokidar)",args:["--type=watcherService"],env:{AMD_ENTRYPOINT:"vs/platform/files/node/watcher/unix/watcherApp",PIPE_LOGGING:"true",
VERBOSE_LOGGING:"true"}}));this._register(t.onDidProcessExit(()=>{this.isDisposed||(this.restartCounter<=a.MAX_RESTARTS?(this.error("terminated unexpectedly and is restarted again..."),this.restartCounter++,this.startWatching()):this.error("failed to start after retrying for some time, giving up. Please report this as a bug report!"))}));const s=i.getNextTickChannel(t.getChannel("watcher"));this.service=new r.WatcherChannelClient(s),this.service.setVerboseLogging(this.verboseLogging),this._register(this.service.watch(this.watcherOptions)(e=>!this.isDisposed&&this.onFileChanges(e))),this._register(this.service.onLogMessage(e=>this.onLogMessage(e))),this.service.setRoots(this.folders)}error(e){this.onLogMessage({type:"error",message:`[File Watcher (chokidar)] ${e}`})}setVerboseLogging(e){this.verboseLogging=e,this.service&&this.service.setVerboseLogging(e)}setFolders(e){this.folders=e,this.service&&this.service.setRoots(e)}dispose(){this.isDisposed=!0,super.dispose()}}t.FileWatcher=a,a.MAX_RESTARTS=5})),
define(e[70],t([0,1,36,49,52,22]),(function(e,t,i,n,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class o{constructor(e,t,i,n,s){this.watchedFolder=e,this.eventCallback=i,this.logCallback=n,this.verboseLogging=s,this.restartCounter=0,Array.isArray(t)?this.ignored=t.map(e=>r.parse(e)):this.ignored=[],this.verboseLogging&&this.log(`Start watching: ${e}`),this.startWatcher()}startWatcher(){const t=[this.watchedFolder];this.verboseLogging&&t.push("-verbose"),this.handle=i.spawn(s.getPathFromAmdModule(e,"vs/platform/files/node/watcher/win32/CodeHelper.exe"),t);const r=new n.LineDecoder;this.handle.stdout.on("data",e=>{const t=[];r.write(e).forEach(e=>{const i=e.split("|");if(2===i.length){const e=Number(i[0]),n=i[1];if(e>=0&&e<3){if(this.ignored&&this.ignored.some(e=>e(n)))return void(this.verboseLogging&&this.log(n));t.push({type:o.changeTypeMap[e],path:n})}else this.log(i[1])}}),t.length>0&&this.eventCallback(t)}),this.handle.on("error",e=>this.onError(e)),
this.handle.stderr.on("data",e=>this.onError(e)),this.handle.on("exit",(e,t)=>this.onExit(e,t))}onError(e){this.error("process error: "+e.toString())}onExit(e,t){this.handle&&(this.error(`terminated unexpectedly (code: ${e}, signal: ${t})`),this.restartCounter<=o.MAX_RESTARTS?(this.error("is restarted again..."),this.restartCounter++,this.startWatcher()):this.error("Watcher failed to start after retrying for some time, giving up. Please report this as a bug report!"))}error(e){this.logCallback({type:"error",message:`[File Watcher (C#)] ${e}`})}log(e){this.logCallback({type:"trace",message:`[File Watcher (C#)] ${e}`})}dispose(){this.handle&&(this.handle.kill(),this.handle=void 0)}}t.OutOfProcessWin32FolderWatcher=o,o.MAX_RESTARTS=5,o.changeTypeMap=[0,1,2]})),define(e[71],t([0,1,70,2,11]),(function(e,t,i,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.FileWatcher=class{constructor(e,t,i,s){this.onFileChanges=t,this.onLogMessage=i,this.verboseLogging=s,this.service=void 0,this.folder=e[0],
0===this.folder.path.indexOf("\\\\")&&r.endsWith(this.folder.path,n.posix.sep)&&(this.folder.path=r.rtrim(this.folder.path,n.posix.sep)),this.service=this.startWatching()}get isDisposed(){return!this.service}startWatching(){return new i.OutOfProcessWin32FolderWatcher(this.folder.path,this.folder.excludes,e=>this.onFileEvents(e),e=>this.onLogMessage(e),this.verboseLogging)}setVerboseLogging(e){this.verboseLogging=e,this.service&&(this.service.dispose(),this.service=this.startWatching())}onFileEvents(e){this.isDisposed||e.length>0&&this.onFileChanges(e)}dispose(){this.service&&(this.service.dispose(),this.service=void 0)}}})),define(e[39],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i{constructor(e,t=[],i=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=i}}t.SyncDescriptor=i,t.createSyncDescriptor=(e,...t)=>new i(e,t)})),define(e[73],t([0,1,9,63]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.Graph=class{
constructor(e){this._hashFn=e,this._nodes=Object.create(null)}roots(){const e=[];return n.forEach(this._nodes,t=>{i.isEmptyObject(t.value.outgoing)&&e.push(t.value)}),e}insertEdge(e,t){const i=this.lookupOrInsertNode(e),n=this.lookupOrInsertNode(t);i.outgoing[this._hashFn(t)]=n,n.incoming[this._hashFn(e)]=i}removeNode(e){const t=this._hashFn(e);delete this._nodes[t],n.forEach(this._nodes,e=>{delete e.value.outgoing[t],delete e.value.incoming[t]})}lookupOrInsertNode(e){const t=this._hashFn(e);let i=this._nodes[t];return i||(i=function(e){return{data:e,incoming:Object.create(null),outgoing:Object.create(null)}}(e),this._nodes[t]=i),i}lookup(e){return this._nodes[this._hashFn(e)]}isEmpty(){for(const e in this._nodes)return!1;return!0}toString(){let e=[];return n.forEach(this._nodes,t=>{e.push(`${t.key}, (incoming)[${Object.keys(t.value.incoming).join(", ")}], (outgoing)[${Object.keys(t.value.outgoing).join(",")}]`)}),e.join("\n")}}})),define(e[4],t([0,1]),(function(e,t){"use strict";var i;function n(e,t,n,r){
t[i.DI_TARGET]===t?t[i.DI_DEPENDENCIES].push({id:e,index:n,optional:r}):(t[i.DI_DEPENDENCIES]=[{id:e,index:n,optional:r}],t[i.DI_TARGET]=t)}function r(e){if(i.serviceIds.has(e))return i.serviceIds.get(e);const t=function(e,i,r){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");n(t,e,r,!1)};return t.toString=()=>e,i.serviceIds.set(e,t),t}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=function(t){return t[e.DI_DEPENDENCIES]||[]}}(i=t._util||(t._util={})),t.IInstantiationService=r("instantiationService"),t.createDecorator=r,t.optional=function(e){return function(t,i,r){if(3!==arguments.length)throw new Error("@optional-decorator can only be used to decorate a parameter");n(e,t,r,!0)}}})),define(e[75],t([0,1,4]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),
t.IDownloadService=i.createDecorator("downloadService")})),define(e[25],t([0,1,4]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IEnvironmentService=i.createDecorator("environmentService"),t.BACKUPS="Backups"})),define(e[29],t([0,1,94,4]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXTENSION_IDENTIFIER_PATTERN="^([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$",t.EXTENSION_IDENTIFIER_REGEX=new RegExp(t.EXTENSION_IDENTIFIER_PATTERN),t.isIExtensionIdentifier=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&(!e.uuid||"string"==typeof e.uuid)},t.IExtensionManagementService=n.createDecorator("extensionManagementService"),t.IExtensionGalleryService=n.createDecorator("extensionGalleryService"),function(e){e[e.NoneOrRelevance=0]="NoneOrRelevance",e[e.LastUpdatedDate=1]="LastUpdatedDate",e[e.Title=2]="Title",e[e.PublisherName=3]="PublisherName",e[e.InstallCount=4]="InstallCount",e[e.PublishedDate=5]="PublishedDate",
e[e.AverageRating=6]="AverageRating",e[e.WeightedRating=12]="WeightedRating"}(t.SortBy||(t.SortBy={})),function(e){e[e.Default=0]="Default",e[e.Ascending=1]="Ascending",e[e.Descending=2]="Descending"}(t.SortOrder||(t.SortOrder={})),function(e){e.Uninstall="uninstall"}(t.StatisticType||(t.StatisticType={})),function(e){e[e.None=0]="None",e[e.Install=1]="Install",e[e.Update=2]="Update"}(t.InstallOperation||(t.InstallOperation={})),t.INSTALL_ERROR_NOT_SUPPORTED="notsupported",t.INSTALL_ERROR_MALICIOUS="malicious",t.INSTALL_ERROR_INCOMPATIBLE="incompatible",t.ExtensionsLabel=i.localize(0,null),t.ExtensionsChannelId="extensions",t.PreferencesLabel=i.localize(1,null)})),define(e[23],t([0,1,107,2,15,4,11,24,9]),(function(e,t,i,n,r,s,o,a,l){"use strict";var c;Object.defineProperty(t,"__esModule",{value:!0}),t.IFileService=s.createDecorator("fileService"),function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Directory=2]="Directory",e[e.SymbolicLink=64]="SymbolicLink"}(t.FileType||(t.FileType={})),function(e){
e[e.FileReadWrite=2]="FileReadWrite",e[e.FileOpenReadWriteClose=4]="FileOpenReadWriteClose",e[e.FileReadStream=16]="FileReadStream",e[e.FileFolderCopy=8]="FileFolderCopy",e[e.PathCaseSensitive=1024]="PathCaseSensitive",e[e.Readonly=2048]="Readonly",e[e.Trash=4096]="Trash"}(t.FileSystemProviderCapabilities||(t.FileSystemProviderCapabilities={})),t.hasReadWriteCapability=function(e){return!!(2&e.capabilities)},t.hasFileFolderCopyCapability=function(e){return!!(8&e.capabilities)},t.hasOpenReadWriteCloseCapability=function(e){return!!(4&e.capabilities)},t.hasFileReadStreamCapability=function(e){return!!(16&e.capabilities)},function(e){e.FileExists="EntryExists",e.FileNotFound="EntryNotFound",e.FileNotADirectory="EntryNotADirectory",e.FileIsADirectory="EntryIsADirectory",e.FileExceedsMemoryLimit="EntryExceedsMemoryLimit",e.FileTooLarge="EntryTooLarge",e.NoPermissions="NoPermissions",e.Unavailable="Unavailable",e.Unknown="Unknown"}(c=t.FileSystemProviderErrorCode||(t.FileSystemProviderErrorCode={}))
;class u extends Error{constructor(e,t){super(e),this.code=t}}function h(e,t){const i=new u(e.toString(),t);return d(i,t),i}function d(e,t){return e.name=t?`${t} (FileSystemError)`:"FileSystemError",e}function f(e){if(!e)return c.Unknown;if(e instanceof u)return e.code;const t=/^(.+) \(FileSystemError\)$/.exec(e.name);if(!t)return c.Unknown;switch(t[1]){case c.FileExists:return c.FileExists;case c.FileIsADirectory:return c.FileIsADirectory;case c.FileNotADirectory:return c.FileNotADirectory;case c.FileNotFound:return c.FileNotFound;case c.FileExceedsMemoryLimit:return c.FileExceedsMemoryLimit;case c.FileTooLarge:return c.FileTooLarge;case c.NoPermissions:return c.NoPermissions;case c.Unavailable:return c.Unavailable}return c.Unknown}t.FileSystemProviderError=u,t.createFileSystemProviderError=h,t.ensureFileSystemProviderError=function(e){return e||h(i.localize(0,null),c.Unknown)},t.markAsFileSystemProviderError=d,t.toFileSystemProviderErrorCode=f,t.toFileOperationResult=function(e){
if(e instanceof g)return e.fileOperationResult;switch(f(e)){case c.FileNotFound:return 1;case c.FileIsADirectory:return 0;case c.NoPermissions:return 6;case c.FileExists:return 4;case c.FileExceedsMemoryLimit:return 9;case c.FileTooLarge:return 7;default:return 10}},function(e){e[e.CREATE=0]="CREATE",e[e.DELETE=1]="DELETE",e[e.MOVE=2]="MOVE",e[e.COPY=3]="COPY"}(t.FileOperation||(t.FileOperation={}));t.FileOperationEvent=class{constructor(e,t,i){this.resource=e,this.operation=t,this.target=i}isOperation(e){return this.operation===e}},function(e){e[e.UPDATED=0]="UPDATED",e[e.ADDED=1]="ADDED",e[e.DELETED=2]="DELETED"}(t.FileChangeType||(t.FileChangeType={}));t.FileChangesEvent=class{constructor(e){this._changes=e}get changes(){return this._changes}contains(e,t){if(!e)return!1;const i=!l.isUndefinedOrNull(t);return this._changes.some(n=>(!i||n.type===t)&&(2===n.type?a.isEqualOrParent(e,n.resource):a.isEqual(e,n.resource)))}getAdded(){return this.getOfType(1)}gotAdded(){return this.hasType(1)}getDeleted(){
return this.getOfType(2)}gotDeleted(){return this.hasType(2)}getUpdated(){return this.getOfType(0)}gotUpdated(){return this.hasType(0)}getOfType(e){return this._changes.filter(t=>t.type===e)}hasType(e){return this._changes.some(t=>t.type===e)}},t.isParent=function(e,t,i){return!(!e||!t||e===t)&&(!(t.length>e.length)&&(t.charAt(t.length-1)!==n.sep&&(t+=n.sep),i?o.startsWithIgnoreCase(e,t):0===e.indexOf(t)))};class g extends Error{constructor(e,t,i){super(e),this.fileOperationResult=t,this.options=i}static isFileOperationError(e){return e instanceof Error&&!l.isUndefinedOrNull(e.fileOperationResult)}}t.FileOperationError=g,function(e){e[e.FILE_IS_DIRECTORY=0]="FILE_IS_DIRECTORY",e[e.FILE_NOT_FOUND=1]="FILE_NOT_FOUND",e[e.FILE_NOT_MODIFIED_SINCE=2]="FILE_NOT_MODIFIED_SINCE",e[e.FILE_MODIFIED_SINCE=3]="FILE_MODIFIED_SINCE",e[e.FILE_MOVE_CONFLICT=4]="FILE_MOVE_CONFLICT",e[e.FILE_READ_ONLY=5]="FILE_READ_ONLY",e[e.FILE_PERMISSION_DENIED=6]="FILE_PERMISSION_DENIED",e[e.FILE_TOO_LARGE=7]="FILE_TOO_LARGE",
e[e.FILE_INVALID_PATH=8]="FILE_INVALID_PATH",e[e.FILE_EXCEEDS_MEMORY_LIMIT=9]="FILE_EXCEEDS_MEMORY_LIMIT",e[e.FILE_OTHER_ERROR=10]="FILE_OTHER_ERROR"}(t.FileOperationResult||(t.FileOperationResult={})),t.AutoSaveConfiguration={OFF:"off",AFTER_DELAY:"afterDelay",ON_FOCUS_CHANGE:"onFocusChange",ON_WINDOW_CHANGE:"onWindowChange"},t.HotExitConfiguration={OFF:"off",ON_EXIT:"onExit",ON_EXIT_AND_WINDOW_CLOSE:"onExitAndWindowClose"},t.CONTENT_CHANGE_EVENT_BUFFER_DELAY=1e3,t.FILES_ASSOCIATIONS_CONFIG="files.associations",t.FILES_EXCLUDE_CONFIG="files.exclude",function(e){e[e.FILE=0]="FILE",e[e.FOLDER=1]="FOLDER",e[e.ROOT_FOLDER=2]="ROOT_FOLDER"}(t.FileKind||(t.FileKind={})),t.ETAG_DISABLED="",t.etag=function(e){if("number"==typeof e.size&&"number"==typeof e.mtime)return e.mtime.toString(29)+e.size.toString(31)},t.whenProviderRegistered=function(e,t){return t.canHandleResource(r.URI.from({scheme:e.scheme}))?Promise.resolve():new Promise((i,n)=>{const r=t.onDidChangeFileSystemProviderRegistrations(t=>{
t.scheme===e.scheme&&t.added&&(r.dispose(),i())})})}})),define(e[44],t([0,1,109,16,23,19]),(function(e,t,i,n,r,s){"use strict";function o(e){if(e&&e.isCancellationRequested)throw s.canceled();return!0}function a(e,t){var n;if(null===(n=t)||void 0===n?void 0:n.limits){if("number"==typeof t.limits.memory&&e>t.limits.memory)throw r.createFileSystemProviderError(i.localize(0,null),r.FileSystemProviderErrorCode.FileExceedsMemoryLimit);if("number"==typeof t.limits.size&&e>t.limits.size)throw r.createFileSystemProviderError(i.localize(1,null),r.FileSystemProviderErrorCode.FileTooLarge)}return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.createReadStream=function(e,t,i,s){const l=n.newWriteableBufferStream();let c=void 0;return async function(e,t,i,s,l){o(l);const c=await e.open(t,{create:!1});o(l);try{let t=0,r=0,u=s&&"number"==typeof s.length?s.length:void 0,h=n.VSBuffer.alloc(Math.min(s.bufferSize,"number"==typeof u?u:s.bufferSize)),d=s&&"number"==typeof s.position?s.position:0,f=0;do{
r=await e.read(c,d,h.buffer,f,h.byteLength-f),d+=r,t+=r,"number"==typeof u&&(u-=r),(f+=r)===h.byteLength&&(i.write(h),h=n.VSBuffer.alloc(Math.min(s.bufferSize,"number"==typeof u?u:s.bufferSize)),f=0)}while(r>0&&("number"!=typeof u||u>0)&&o(l)&&a(t,s));if(f>0){let e=f;"number"==typeof u&&(e=Math.min(f,u)),i.write(h.slice(0,e))}}catch(e){throw r.ensureFileSystemProviderError(e)}finally{await e.close(c)}}(e,t,l,i,s).then(void 0,e=>c=e).finally(()=>l.end(c)),l}})),define(e[45],t([0,1,15,23,13]),(function(e,t,i,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toFileChanges=function(e){return e.map(e=>({type:e.type,resource:i.URI.file(e.path)}))},t.normalizeFileChanges=function(e){const t=new s;for(const i of e)t.processEvent(i);return t.normalize()};class s{constructor(){this.normalized=[],this.mapPathToChange=new Map}processEvent(e){const t=this.mapPathToChange.get(e.path);if(t){const i=t.type,n=e.type;1===i&&2===n?(this.mapPathToChange.delete(e.path),
this.normalized.splice(this.normalized.indexOf(t),1)):2===i&&1===n?t.type=0:1===i&&0===n||(t.type=n)}else this.normalized.push(e),this.mapPathToChange.set(e.path,e)}normalize(){const e=[],t=[];return this.normalized.filter(t=>2===t.type||(e.push(t),!1)).sort((e,t)=>e.path.length-t.path.length).filter(e=>!t.some(t=>n.isParent(e.path,t,!r.isLinux))&&(t.push(e.path),!0)).concat(e)}}})),define(e[81],t([0,1,45,3,8,53,42,14,2]),(function(e,t,i,n,r,s,o,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class c extends n.Disposable{constructor(e,t,i,n){super(),this.path=e,this.onFileChanges=t,this.onLogMessage=i,this.verboseLogging=n,this.fileChangesDelayer=this._register(new a.ThrottledDelayer(2*o.CHANGE_BUFFER_DELAY)),this.fileChangesBuffer=[],this.startWatching()}setVerboseLogging(e){this.verboseLogging=e}async startWatching(){try{const{stat:e,isSymbolicLink:t}=await r.statLink(this.path);if(this.isDisposed)return;let i=this.path;if(t)try{i=await s.realpath(i)}catch(e){this.onError(e)}
e.isDirectory()?this._register(o.watchFolder(i,(e,t)=>{this.onFileChange({type:"changed"===e?0:"added"===e?1:2,path:l.join(this.path,l.basename(t))})},e=>this.onError(e))):this._register(o.watchFile(i,e=>{this.onFileChange({type:"changed"===e?0:2,path:this.path})},e=>this.onError(e)))}catch(e){this.onError(e)}}onFileChange(e){this.fileChangesBuffer.push(e),this.verboseLogging&&this.onVerbose(`${1===e.type?"[ADDED]":2===e.type?"[DELETED]":"[CHANGED]"} ${e.path}`),this.fileChangesDelayer.trigger(()=>{const e=this.fileChangesBuffer;this.fileChangesBuffer=[];const t=i.normalizeFileChanges(e);return this.verboseLogging&&t.forEach(e=>{this.onVerbose(`>> normalized ${1===e.type?"[ADDED]":2===e.type?"[DELETED]":"[CHANGED]"} ${e.path}`)}),t.length>0&&this.onFileChanges(t),Promise.resolve()})}onError(e){this.isDisposed||this.onLogMessage({type:"error",message:`[File Watcher (node.js)] ${e}`})}onVerbose(e){this.isDisposed||this.onLogMessage({type:"trace",message:`[File Watcher (node.js)] ${e}`})}dispose(){
this.isDisposed=!0,super.dispose()}}t.FileWatcher=c})),define(e[46],t([0,1]),(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.ServiceCollection=class{constructor(...e){this._entries=new Map;for(let[t,i]of e)this.set(t,i)}set(e,t){const i=this._entries.get(e);return this._entries.set(e,t),i}forEach(e){this._entries.forEach((t,i)=>e(i,t))}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}}})),define(e[83],t([0,1,19,73,39,4,46,14]),(function(e,t,i,n,r,s,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const l=!1,c="function"==typeof Proxy;class u extends Error{constructor(e){super("cyclic dependency between services"),this.message=e.toString()}}class h{constructor(e=new o.ServiceCollection,t=!1,i){this._services=e,this._strict=t,this._parent=i,this._services.set(s.IInstantiationService,this)}createChild(e){return new h(e,this._strict,this)}invokeFunction(e,...t){let n=f.traceInvocation(e),r=!1;try{const o={get:(e,t)=>{
if(r)throw i.illegalState("service accessor is only valid during the invocation of its target method");const o=this._getOrCreateServiceInstance(e,n);if(!o&&t!==s.optional)throw new Error(`[invokeFunction] unknown service '${e}'`);return o}};return e.apply(void 0,[o,...t])}finally{r=!0,n.stop()}}createInstance(e,...t){let i,n;return e instanceof r.SyncDescriptor?(i=f.traceCreation(e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=f.traceCreation(e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){let n=s._util.getServiceDependencies(e).sort((e,t)=>e.index-t.index),r=[];for(const t of n){let n=this._getOrCreateServiceInstance(t.id,i);if(!n&&this._strict&&!t.optional)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${t.id}.`);r.push(n)}let o=n.length>0?n[0].index:t.length;if(t.length!==o){console.warn(`[createInstance] First service dependency of ${e.name} at position ${o+1} conflicts with ${t.length} static arguments`);let i=o-t.length
;t=i>0?t.concat(new Array(i)):t.slice(0,o)}return new e(...[...t,...r])}_setServiceInstance(e,t){if(this._services.get(e)instanceof r.SyncDescriptor)this._services.set(e,t);else{if(!this._parent)throw new Error("illegalState - setting UNKNOWN service instance");this._parent._setServiceInstance(e,t)}}_getServiceInstanceOrDescriptor(e){let t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){let i=this._getServiceInstanceOrDescriptor(e);return i instanceof r.SyncDescriptor?this._createAndCacheServiceInstance(e,i,t.branch(e,!0)):(t.branch(e,!1),i)}_createAndCacheServiceInstance(e,t,i){const o=new n.Graph(e=>e.id.toString());let a=0;const l=[{id:e,desc:t,_trace:i}];for(;l.length;){const t=l.pop();if(o.lookupOrInsertNode(t),a++>150)throw new u(o);for(let i of s._util.getServiceDependencies(t.desc.ctor)){let n=this._getServiceInstanceOrDescriptor(i.id)
;if(n||i.optional||console.warn(`[createInstance] ${e} depends on ${i.id} which is NOT registered.`),n instanceof r.SyncDescriptor){const e={id:i.id,desc:n,_trace:t._trace.branch(i.id,!0)};o.insertEdge(t,e),l.push(e)}}}for(;;){const e=o.roots();if(0===e.length){if(!o.isEmpty())throw new u(o);break}for(const{data:t}of e){const e=this._createServiceInstanceWithOwner(t.id,t.desc.ctor,t.desc.staticArguments,t.desc.supportsDelayedInstantiation,t._trace);this._setServiceInstance(t.id,e),o.removeNode(t)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,s){if(this._services.get(e)instanceof r.SyncDescriptor)return this._createServiceInstance(t,i,n,s);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,i,n,s);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t=[],i,n){if(i&&c){const i=new a.IdleValue(()=>this._createInstance(e,t,n));return new Proxy(Object.create(null),{get(e,t){if(t in e)return e[t]
;let n=i.getValue(),r=n[t];return"function"!=typeof r?r:(r=r.bind(n),e[t]=r,r)},set:(e,t,n)=>(i.getValue()[t]=n,!0)})}return this._createInstance(e,t,n)}}var d;t.InstantiationService=h,function(e){e[e.Creation=0]="Creation",e[e.Invocation=1]="Invocation",e[e.Branch=2]="Branch"}(d||(d={}));class f{constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}static traceInvocation(e){return l?new f(1,e.name||e.toString().substring(0,42).replace(/\n/g,"")):f._None}static traceCreation(e){return l?new f(0,e.name):f._None}branch(e,t){let i=new f(2,e.toString());return this._dep.push([e,t,i]),i}stop(){let e=Date.now()-this._start;f._totals+=e;let t=!1;let i=[`${0===this.type?"CREATE":"CALL"} ${this.name}`,`${function e(i,n){let r=[],s=new Array(i+1).join("\t");for(const[o,a,l]of n._dep)if(a&&l){t=!0,r.push(`${s}CREATES -> ${o}`);let n=e(i+1,l);n&&r.push(n)}else r.push(`${s}uses -> ${o}`);return r.join("\n")}(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${f._totals.toFixed(2)}ms)`]
;(e>2||t)&&console.log(i.join("\n"))}}f._None=new class extends f{constructor(){super(-1,null)}stop(){}branch(){return this}},f._totals=0})),define(e[84],t([0,1,4]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Core=1]="Core",e[e.Contributed=2]="Contributed"}(t.LanguageType||(t.LanguageType={})),t.ILocalizationsService=i.createDecorator("localizationsService"),t.isValidLocalization=function(e){if("string"!=typeof e.languageId)return!1;if(!Array.isArray(e.translations)||0===e.translations.length)return!1;for(const t of e.translations){if("string"!=typeof t.id)return!1;if("string"!=typeof t.path)return!1}return(!e.languageName||"string"==typeof e.languageName)&&(!e.localizedLanguageName||"string"==typeof e.localizedLanguageName)}})),define(e[12],t([0,1,4,3,13,6]),(function(e,t,i,n,r,s){"use strict";function o(){return(new Date).toISOString()}var a;Object.defineProperty(t,"__esModule",{value:!0}),t.ILogService=i.createDecorator("logService"),
t.ILoggerService=i.createDecorator("loggerService"),function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Info=2]="Info",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.Off=6]="Off"}(a=t.LogLevel||(t.LogLevel={})),t.DEFAULT_LOG_LEVEL=a.Info;class l extends n.Disposable{constructor(){super(...arguments),this.level=t.DEFAULT_LOG_LEVEL,this._onDidChangeLogLevel=this._register(new s.Emitter),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}t.AbstractLogService=l;t.ConsoleLogMainService=class extends l{constructor(e=t.DEFAULT_LOG_LEVEL){super(),this.setLevel(e),this.useColors=!r.isWindows}trace(e,...t){this.getLevel()<=a.Trace&&(this.useColors?console.log(`[90m[main ${o()}][0m`,e,...t):console.log(`[main ${o()}]`,e,...t))}debug(e,...t){this.getLevel()<=a.Debug&&(this.useColors?console.log(`[90m[main ${o()}][0m`,e,...t):console.log(`[main ${o()}]`,e,...t))}
info(e,...t){this.getLevel()<=a.Info&&(this.useColors?console.log(`[90m[main ${o()}][0m`,e,...t):console.log(`[main ${o()}]`,e,...t))}warn(e,...t){this.getLevel()<=a.Warning&&(this.useColors?console.warn(`[93m[main ${o()}][0m`,e,...t):console.warn(`[main ${o()}]`,e,...t))}error(e,...t){this.getLevel()<=a.Error&&(this.useColors?console.error(`[91m[main ${o()}][0m`,e,...t):console.error(`[main ${o()}]`,e,...t))}critical(e,...t){this.getLevel()<=a.Critical&&(this.useColors?console.error(`[90m[main ${o()}][0m`,e,...t):console.error(`[main ${o()}]`,e,...t))}dispose(){}flush(){}};t.ConsoleLogService=class extends l{constructor(e=t.DEFAULT_LOG_LEVEL){super(),this.setLevel(e)}trace(e,...t){this.getLevel()<=a.Trace&&console.log("%cTRACE","color: #888",e,...t)}debug(e,...t){this.getLevel()<=a.Debug&&console.log("%cDEBUG","background: #eee; color: #888",e,...t)}info(e,...t){this.getLevel()<=a.Info&&console.log("%c INFO","color: #33f",e,...t)}warn(e,...t){
this.getLevel()<=a.Warning&&console.log("%c WARN","color: #993",e,...t)}error(e,...t){this.getLevel()<=a.Error&&console.log("%c  ERR","color: #f33",e,...t)}critical(e,...t){this.getLevel()<=a.Critical&&console.log("%cCRITI","background: #f33; color: white",e,...t)}dispose(){}flush(){}};t.ConsoleLogInMainService=class extends l{constructor(e,i=t.DEFAULT_LOG_LEVEL){super(),this.client=e,this.setLevel(i)}trace(e,...t){this.getLevel()<=a.Trace&&this.client.consoleLog("trace",[e,...t])}debug(e,...t){this.getLevel()<=a.Debug&&this.client.consoleLog("debug",[e,...t])}info(e,...t){this.getLevel()<=a.Info&&this.client.consoleLog("info",[e,...t])}warn(e,...t){this.getLevel()<=a.Warning&&this.client.consoleLog("warn",[e,...t])}error(e,...t){this.getLevel()<=a.Error&&this.client.consoleLog("error",[e,...t])}critical(e,...t){this.getLevel()<=a.Critical&&this.client.consoleLog("critical",[e,...t])}dispose(){}flush(){}};t.MultiplexLogService=class extends l{constructor(e){super(),this.logServices=e,
e.length&&this.setLevel(e[0].getLevel())}setLevel(e){for(const t of this.logServices)t.setLevel(e);super.setLevel(e)}trace(e,...t){for(const i of this.logServices)i.trace(e,...t)}debug(e,...t){for(const i of this.logServices)i.debug(e,...t)}info(e,...t){for(const i of this.logServices)i.info(e,...t)}warn(e,...t){for(const i of this.logServices)i.warn(e,...t)}error(e,...t){for(const i of this.logServices)i.error(e,...t)}critical(e,...t){for(const i of this.logServices)i.critical(e,...t)}flush(){for(const e of this.logServices)e.flush()}dispose(){for(const e of this.logServices)e.dispose()}};class c extends n.Disposable{constructor(e){super(),this.logService=e,this._register(e)}get onDidChangeLogLevel(){return this.logService.onDidChangeLogLevel}setLevel(e){this.logService.setLevel(e)}getLevel(){return this.logService.getLevel()}trace(e,...t){this.logService.trace(e,...t)}debug(e,...t){this.logService.debug(e,...t)}info(e,...t){this.logService.info(e,...t)}warn(e,...t){this.logService.warn(e,...t)}
error(e,...t){this.logService.error(e,...t)}critical(e,...t){this.logService.critical(e,...t)}flush(){this.logService.flush()}}t.DelegatedLogService=c;t.NullLogService=class{constructor(){this.onDidChangeLogLevel=(new s.Emitter).event}setLevel(e){}getLevel(){return a.Info}trace(e,...t){}debug(e,...t){}info(e,...t){}warn(e,...t){}error(e,...t){}critical(e,...t){}dispose(){}flush(){}},t.getLogLevel=function(e){if(e.verbose)return a.Trace;if("string"==typeof e.args.log){switch(e.args.log.toLowerCase()){case"trace":return a.Trace;case"debug":return a.Debug;case"info":return a.Info;case"warn":return a.Warning;case"error":return a.Error;case"critical":return a.Critical;case"off":return a.Off}}return t.DEFAULT_LOG_LEVEL}}));var i=this&&this.__decorate||function(e,t,i,n){var r,s=arguments.length,o=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n
;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,i,o):r(t,i))||o);return s>3&&o&&Object.defineProperty(t,i,o),o},n=this&&this.__param||function(e,t){return function(i,n){t(i,n,e)}};define(e[86],t([0,1,3,23,6,24,101,31,28,47,12,16,37,14,26,17,10,44]),(function(e,t,r,s,o,a,l,c,u,h,d,f,g,p,m,v,y,E){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let S=class extends r.Disposable{constructor(e){super(),this.logService=e,this.BUFFER_SIZE=65536,this._onDidChangeFileSystemProviderRegistrations=this._register(new o.Emitter),this.onDidChangeFileSystemProviderRegistrations=this._onDidChangeFileSystemProviderRegistrations.event,this._onWillActivateFileSystemProvider=this._register(new o.Emitter),this.onWillActivateFileSystemProvider=this._onWillActivateFileSystemProvider.event,this.provider=new Map,this._onAfterOperation=this._register(new o.Emitter),
this.onAfterOperation=this._onAfterOperation.event,this._onError=this._register(new o.Emitter),this.onError=this._onError.event,this._onFileChanges=this._register(new o.Emitter),this.onFileChanges=this._onFileChanges.event,this.activeWatchers=new Map,this.writeQueues=new Map}registerProvider(e,t){if(this.provider.has(e))throw new Error(`A provider for the scheme ${e} is already registered.`);this.provider.set(e,t),this._onDidChangeFileSystemProviderRegistrations.fire({added:!0,scheme:e,provider:t});const i=new r.DisposableStore;return i.add(t.onDidChangeFile(e=>this._onFileChanges.fire(new s.FileChangesEvent(e)))),"function"==typeof t.onDidErrorOccur&&i.add(t.onDidErrorOccur(e=>this._onError.fire(new Error(e)))),r.toDisposable(()=>{this._onDidChangeFileSystemProviderRegistrations.fire({added:!1,scheme:e,provider:t}),this.provider.delete(e),r.dispose(i)})}async activateProvider(e){const t=[];this._onWillActivateFileSystemProvider.fire({scheme:e,join(e){e&&t.push(e)}}),this.provider.has(e)||await Promise.all(t)
}canHandleResource(e){return this.provider.has(e.scheme)}hasCapability(e,t){const i=this.provider.get(e.scheme);return!!(i&&i.capabilities&t)}async withProvider(e){if(!a.isAbsolutePath(e))throw new s.FileOperationError(l.localize(0,null,this.resourceForError(e)),8);await this.activateProvider(e.scheme);const t=this.provider.get(e.scheme);if(!t){const t=new Error;throw t.name="ENOPRO",t.message=l.localize(1,null,e.toString()),t}return t}async withReadProvider(e){const t=await this.withProvider(e);if(s.hasOpenReadWriteCloseCapability(t)||s.hasReadWriteCapability(t)||s.hasFileReadStreamCapability(t))return t;throw new Error("Provider neither has FileReadWrite, FileReadStream nor FileOpenReadWriteClose capability which is needed for the read operation.")}async withWriteProvider(e){const t=await this.withProvider(e);if(s.hasOpenReadWriteCloseCapability(t)||s.hasReadWriteCapability(t))return t
;throw new Error("Provider neither has FileReadWrite nor FileOpenReadWriteClose capability which is needed for the write operation.")}async resolve(e,t){try{return await this.doResolveFile(e,t)}catch(t){if(s.toFileSystemProviderErrorCode(t)===s.FileSystemProviderErrorCode.FileNotFound)throw new s.FileOperationError(l.localize(2,null,this.resourceForError(e)),1);throw s.ensureFileSystemProviderError(t)}}async doResolveFile(e,t){var i,n,r;const s=await this.withProvider(e),o=null===(i=t)||void 0===i?void 0:i.resolveTo,a=null===(n=t)||void 0===n?void 0:n.resolveSingleChildDescendants,l=null===(r=t)||void 0===r?void 0:r.resolveMetadata,h=await s.stat(e);let d;return this.toFileStat(s,e,h,void 0,!!l,(t,i)=>(d||((d=c.TernarySearchTree.forPaths()).set(e.toString(),!0),u.isNonEmptyArray(o)&&o.forEach(e=>d.set(e.toString(),!0))),!!Boolean(d.findSuperstr(t.resource.toString())||d.get(t.resource.toString()))||!(!t.isDirectory||!a)&&1===i))}async toFileStat(e,t,i,n,r,o){const l={resource:t,name:h.getBaseLabel(t),
isFile:0!=(i.type&s.FileType.File),isDirectory:0!=(i.type&s.FileType.Directory),isSymbolicLink:0!=(i.type&s.FileType.SymbolicLink),mtime:i.mtime,ctime:i.ctime,size:i.size,etag:s.etag({mtime:i.mtime,size:i.size})};if(l.isDirectory&&o(l,n)){try{const i=await e.readdir(t),n=await Promise.all(i.map(async([n,s])=>{try{const l=a.joinPath(t,n),c=r?await e.stat(l):{type:s};return await this.toFileStat(e,l,c,i.length,r,o)}catch(e){return this.logService.trace(e),null}}));l.children=u.coalesce(n)}catch(e){this.logService.trace(e),l.children=[]}return l}return l}async resolveAll(e){return Promise.all(e.map(async e=>{try{return{stat:await this.doResolveFile(e.resource,e.options),success:!0}}catch(e){return this.logService.trace(e),{stat:void 0,success:!1}}}))}async exists(e){const t=await this.withProvider(e);try{return!!await t.stat(e)}catch(e){return!1}}async createFile(e,t=f.VSBuffer.fromString(""),i){var n
;if(!(null===(n=i)||void 0===n?void 0:n.overwrite)&&await this.exists(e))throw new s.FileOperationError(l.localize(3,null,this.resourceForError(e)),3,i);const r=await this.writeFile(e,t);return this._onAfterOperation.fire(new s.FileOperationEvent(e,0,r)),r}async writeFile(e,t,i){const n=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(e));try{await this.validateWriteFile(n,e,i)||await this.mkdirp(n,a.dirname(e)),!s.hasReadWriteCapability(n)||t instanceof f.VSBuffer||(t=g.isReadableStream(t)?await g.consumeStreamWithLimit(t,e=>f.VSBuffer.concat(e),3):g.consumeReadableWithLimit(t,e=>f.VSBuffer.concat(e),3)),!s.hasOpenReadWriteCloseCapability(n)||s.hasReadWriteCapability(n)&&t instanceof f.VSBuffer?await this.doWriteUnbuffered(n,e,t):await this.doWriteBuffered(n,e,t instanceof f.VSBuffer?f.bufferToReadable(t):t)}catch(e){throw new s.FileOperationError(l.localize(4,null,s.ensureFileSystemProviderError(e).toString()),s.toFileOperationResult(e),i)}return this.resolve(e,{resolveMetadata:!0})}
async validateWriteFile(e,t,i){let n=void 0;try{n=await e.stat(t)}catch(e){return}if(0!=(n.type&s.FileType.Directory))throw new s.FileOperationError(l.localize(5,null,this.resourceForError(t)),0,i);if(i&&"number"==typeof i.mtime&&"string"==typeof i.etag&&i.etag!==s.ETAG_DISABLED&&"number"==typeof n.mtime&&"number"==typeof n.size&&i.mtime<n.mtime&&i.etag!==s.etag({mtime:i.mtime,size:n.size}))throw new s.FileOperationError(l.localize(6,null),3,i);return n}async readFile(e,t){const i=await this.withReadProvider(e),n=await this.doReadAsFileStream(i,e,y.assign({preferUnbuffered:!0},t||Object.create(null)));return Object.assign(Object.assign({},n),{value:await f.streamToBuffer(n.value)})}async readFileStream(e,t){const i=await this.withReadProvider(e);return this.doReadAsFileStream(i,e,t)}async doReadAsFileStream(e,t,i){var n;const r=new m.CancellationTokenSource,o=this.validateReadFile(t,i).then(e=>e,e=>{throw r.cancel(),e});try{let a;i&&"string"==typeof i.etag&&i.etag!==s.ETAG_DISABLED&&await o,
a=!s.hasOpenReadWriteCloseCapability(e)&&!s.hasFileReadStreamCapability(e)||s.hasReadWriteCapability(e)&&(null===(n=i)||void 0===n?void 0:n.preferUnbuffered)?this.readFileUnbuffered(e,t,i):s.hasFileReadStreamCapability(e)?Promise.resolve(this.readFileStreamed(e,t,r.token,i)):Promise.resolve(this.readFileBuffered(e,t,r.token,i));const[l,c]=await Promise.all([o,a]);return Object.assign(Object.assign({},l),{value:c})}catch(e){throw new s.FileOperationError(l.localize(7,null,s.ensureFileSystemProviderError(e).toString()),s.toFileOperationResult(e),i)}}readFileStreamed(e,t,i,n=Object.create(null)){const r=e.readFileStream(t,n,i);return this.transformFileReadStream(r,n)}readFileBuffered(e,t,i,n=Object.create(null)){const r=E.createReadStream(e,t,Object.assign(Object.assign({},n),{bufferSize:this.BUFFER_SIZE}),i);return this.transformFileReadStream(r,n)}transformFileReadStream(e,t){return g.transform(e,{data:e=>e instanceof f.VSBuffer?e:f.VSBuffer.wrap(e),
error:e=>new s.FileOperationError(l.localize(8,null,s.ensureFileSystemProviderError(e).toString()),s.toFileOperationResult(e),t)},e=>f.VSBuffer.concat(e))}async readFileUnbuffered(e,t,i){let n=await e.readFile(t);return i&&"number"==typeof i.position&&(n=n.slice(i.position)),i&&"number"==typeof i.length&&(n=n.slice(0,i.length)),this.validateReadFileLimits(n.byteLength,i),f.bufferToStream(f.VSBuffer.wrap(n))}async validateReadFile(e,t){const i=await this.resolve(e,{resolveMetadata:!0});if(i.isDirectory)throw new s.FileOperationError(l.localize(9,null,this.resourceForError(e)),0,t);if(t&&"string"==typeof t.etag&&t.etag!==s.ETAG_DISABLED&&t.etag===i.etag)throw new s.FileOperationError(l.localize(10,null),2,t);return this.validateReadFileLimits(i.size,t),i}validateReadFileLimits(e,t){var i;if(null===(i=t)||void 0===i?void 0:i.limits){let i=void 0;if("number"==typeof t.limits.memory&&e>t.limits.memory&&(i=9),"number"==typeof t.limits.size&&e>t.limits.size&&(i=7),
"number"==typeof i)throw new s.FileOperationError(l.localize(11,null),i)}}async move(e,t,i){const n=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(e)),r=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(t)),o=await this.doMoveCopy(n,e,r,t,"move",!!i),a=await this.resolve(t,{resolveMetadata:!0});return this._onAfterOperation.fire(new s.FileOperationEvent(e,"move"===o?2:3,a)),a}async copy(e,t,i){const n=await this.withReadProvider(e),r=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(t)),o=await this.doMoveCopy(n,e,r,t,"copy",!!i),a=await this.resolve(t,{resolveMetadata:!0});return this._onAfterOperation.fire(new s.FileOperationEvent(e,"copy"===o?3:2,a)),a}async doMoveCopy(e,t,i,n,r,o){if(t.toString()===n.toString())return r;const{exists:l,isSameResourceWithDifferentPathCase:c}=await this.doValidateMoveCopy(e,t,i,n,r,o);if(l&&!c&&o&&await this.del(n,{recursive:!0}),await this.mkdirp(i,a.dirname(n)),"copy"===r){if(e===i&&s.hasFileFolderCopyCapability(e))await e.copy(t,n,{
overwrite:o});else{const r=await this.resolve(t);r.isDirectory?await this.doCopyFolder(e,r,i,n):await this.doCopyFile(e,t,i,n)}return r}return e===i?(await e.rename(t,n,{overwrite:o}),r):(await this.doMoveCopy(e,t,i,n,"copy",o),await this.del(t,{recursive:!0}),"copy")}async doCopyFile(e,t,i,n){return s.hasOpenReadWriteCloseCapability(e)&&s.hasOpenReadWriteCloseCapability(i)?this.doPipeBuffered(e,t,i,n):s.hasOpenReadWriteCloseCapability(e)&&s.hasReadWriteCapability(i)?this.doPipeBufferedToUnbuffered(e,t,i,n):s.hasReadWriteCapability(e)&&s.hasOpenReadWriteCloseCapability(i)?this.doPipeUnbufferedToBuffered(e,t,i,n):s.hasReadWriteCapability(e)&&s.hasReadWriteCapability(i)?this.doPipeUnbuffered(e,t,i,n):void 0}async doCopyFolder(e,t,i,n){await i.mkdir(n),Array.isArray(t.children)&&await Promise.all(t.children.map(async t=>{const r=a.joinPath(n,t.name);return t.isDirectory?this.doCopyFolder(e,await this.resolve(t.resource),i,r):this.doCopyFile(e,t.resource,i,r)}))}async doValidateMoveCopy(e,t,i,n,r,o){let c=!1
;if(e===i){const i=!!(1024&e.capabilities);if(i||(c=a.isEqual(t,n,!0)),c&&"copy"===r)throw new Error(l.localize(12,null));if(!c&&a.isEqualOrParent(n,t,!i))throw new Error(l.localize(13,null))}const u=await this.exists(n);if(u&&!c){if(!o)throw new s.FileOperationError(l.localize(14,null),4);if(e===i){const i=!!(1024&e.capabilities);if(a.isEqualOrParent(t,n,!i))throw new Error(l.localize(15,null))}}return{exists:u,isSameResourceWithDifferentPathCase:c}}async createFolder(e){const t=this.throwIfFileSystemIsReadonly(await this.withProvider(e));await this.mkdirp(t,e);const i=await this.resolve(e,{resolveMetadata:!0});return this._onAfterOperation.fire(new s.FileOperationEvent(e,0,i)),i}async mkdirp(e,t){const i=[];for(;!a.isEqual(t,a.dirname(t));)try{if(0==((await e.stat(t)).type&s.FileType.Directory))throw new Error(l.localize(16,null,this.resourceForError(t)));break}catch(e){if(s.toFileSystemProviderErrorCode(e)!==s.FileSystemProviderErrorCode.FileNotFound)throw e;i.push(a.basename(t)),t=a.dirname(t)}
for(let n=i.length-1;n>=0;n--)t=a.joinPath(t,i[n]),await e.mkdir(t)}async del(e,t){var i,n;const r=this.throwIfFileSystemIsReadonly(await this.withProvider(e)),o=!!(null===(i=t)||void 0===i?void 0:i.useTrash);if(o&&!(4096&r.capabilities))throw new Error(l.localize(17,null));const a=!!(null===(n=t)||void 0===n?void 0:n.recursive);if(!a&&await this.exists(e)){const t=await this.resolve(e);if(t.isDirectory&&Array.isArray(t.children)&&t.children.length>0)throw new Error(l.localize(18,null,this.resourceForError(e)))}await r.delete(e,{recursive:a,useTrash:o}),this._onAfterOperation.fire(new s.FileOperationEvent(e,1))}watch(e,t={recursive:!1,excludes:[]}){let i=!1,n=r.toDisposable(()=>i=!0);return this.doWatch(e,t).then(e=>{i?r.dispose(e):n=e},e=>this.logService.error(e)),r.toDisposable(()=>r.dispose(n))}async doWatch(e,t){const i=await this.withProvider(e),n=this.toWatchKey(i,e,t),s=this.activeWatchers.get(n)||{count:0,disposable:i.watch(e,t)};return this.activeWatchers.has(n)||this.activeWatchers.set(n,s),
s.count+=1,r.toDisposable(()=>{s.count--,0===s.count&&(r.dispose(s.disposable),this.activeWatchers.delete(n))})}toWatchKey(e,t,i){return[this.toMapKey(e,t),String(i.recursive),i.excludes.join()].join()}dispose(){super.dispose(),this.activeWatchers.forEach(e=>r.dispose(e.disposable)),this.activeWatchers.clear()}ensureWriteQueue(e,t){const i=this.toMapKey(e,t);let n=this.writeQueues.get(i);if(!n){n=new p.Queue,this.writeQueues.set(i,n),o.Event.once(n.onFinished)(()=>{this.writeQueues.delete(i),r.dispose(n)})}return n}toMapKey(e,t){return!!(1024&e.capabilities)?t.toString():t.toString().toLowerCase()}async doWriteBuffered(e,t,i){return this.ensureWriteQueue(e,t).queue(async()=>{const n=await e.open(t,{create:!0});try{g.isReadableStream(i)?await this.doWriteStreamBufferedQueued(e,n,i):await this.doWriteReadableBufferedQueued(e,n,i)}catch(e){throw s.ensureFileSystemProviderError(e)}finally{await e.close(n)}})}doWriteStreamBufferedQueued(e,t,i){return new Promise((n,r)=>{let s=0;i.on("data",async n=>{i.pause();try{
await this.doWriteBuffer(e,t,n,n.byteLength,s,0)}catch(e){return r(e)}s+=n.byteLength,setTimeout(()=>i.resume())}),i.on("error",e=>r(e)),i.on("end",()=>n())})}async doWriteReadableBufferedQueued(e,t,i){let n,r=0;for(;null!==(n=i.read());)await this.doWriteBuffer(e,t,n,n.byteLength,r,0),r+=n.byteLength}async doWriteBuffer(e,t,i,n,r,s){let o=0;for(;o<n;){o+=await e.write(t,r+o,i.buffer,s+o,n-o)}}async doWriteUnbuffered(e,t,i){return this.ensureWriteQueue(e,t).queue(()=>this.doWriteUnbufferedQueued(e,t,i))}async doWriteUnbufferedQueued(e,t,i){let n;return n=i instanceof f.VSBuffer?i:g.isReadableStream(i)?await f.streamToBuffer(i):f.readableToBuffer(i),e.writeFile(t,n.buffer,{create:!0,overwrite:!0})}async doPipeBuffered(e,t,i,n){return this.ensureWriteQueue(i,n).queue(()=>this.doPipeBufferedQueued(e,t,i,n))}async doPipeBufferedQueued(e,t,i,n){let r=void 0,o=void 0;try{r=await e.open(t,{create:!1}),o=await i.open(n,{create:!0});const s=f.VSBuffer.alloc(this.BUFFER_SIZE);let a=0,l=0,c=0;do{
c=await e.read(r,a,s.buffer,l,s.byteLength-l),await this.doWriteBuffer(i,o,s,c,a,l),a+=c,(l+=c)===s.byteLength&&(l=0)}while(c>0)}catch(e){throw s.ensureFileSystemProviderError(e)}finally{await Promise.all(["number"==typeof r?e.close(r):Promise.resolve(),"number"==typeof o?i.close(o):Promise.resolve()])}}async doPipeUnbuffered(e,t,i,n){return this.ensureWriteQueue(i,n).queue(()=>this.doPipeUnbufferedQueued(e,t,i,n))}async doPipeUnbufferedQueued(e,t,i,n){return i.writeFile(n,await e.readFile(t),{create:!0,overwrite:!0})}async doPipeUnbufferedToBuffered(e,t,i,n){return this.ensureWriteQueue(i,n).queue(()=>this.doPipeUnbufferedToBufferedQueued(e,t,i,n))}async doPipeUnbufferedToBufferedQueued(e,t,i,n){const r=await i.open(n,{create:!0});try{const n=await e.readFile(t);await this.doWriteBuffer(i,r,f.VSBuffer.wrap(n),n.byteLength,0,0)}catch(e){throw s.ensureFileSystemProviderError(e)}finally{await i.close(r)}}async doPipeBufferedToUnbuffered(e,t,i,n){
const r=await f.streamToBuffer(this.readFileBuffered(e,t,m.CancellationToken.None));await this.doWriteUnbuffered(i,n,r)}throwIfFileSystemIsReadonly(e){if(2048&e.capabilities)throw new s.FileOperationError(l.localize(19,null),6);return e}resourceForError(e){return e.scheme===v.Schemas.file?e.fsPath:e.toString(!0)}};S=i([n(0,d.ILogService)],S),t.FileService=S})),define(e[87],t([0,1,18,41,3,23,6,13,8,2,24,35,14,12,111,45,69,71,67,81,16,37,44]),(function(e,t,i,n,r,s,o,a,l,c,u,h,d,f,g,p,m,v,y,E,S,w,b){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class C extends r.Disposable{constructor(e,t){var i;super(),this.logService=e,this.options=t,this.BUFFER_SIZE=(null===(i=this.options)||void 0===i?void 0:i.bufferSize)||65536,this.onDidChangeCapabilities=o.Event.None,this.mapHandleToPos=new Map,this.writeHandles=new Set,this.canFlush=!0,this._onDidWatchErrorOccur=this._register(new o.Emitter),this.onDidErrorOccur=this._onDidWatchErrorOccur.event,this._onDidChangeFile=this._register(new o.Emitter),
this.recursiveFoldersToWatch=[],this.recursiveWatchRequestDelayer=this._register(new d.ThrottledDelayer(0))}get capabilities(){return this._capabilities||(this._capabilities=30,a.isLinux&&(this._capabilities|=1024)),this._capabilities}async stat(e){try{const{stat:t,isSymbolicLink:i}=await l.statLink(this.toFilePath(e));return{type:this.toType(t,i),ctime:t.birthtime.getTime(),mtime:t.mtime.getTime(),size:t.size}}catch(e){throw this.toFileSystemProviderError(e)}}async readdir(e){try{const t=await l.readdirWithFileTypes(this.toFilePath(e)),i=[];return await Promise.all(t.map(async t=>{try{let n;n=t.isSymbolicLink()?(await this.stat(u.joinPath(e,t.name))).type:this.toType(t),i.push([t.name,n])}catch(e){this.logService.trace(e)}})),i}catch(e){throw this.toFileSystemProviderError(e)}}toType(e,t=e.isSymbolicLink()){return t?s.FileType.SymbolicLink|(e.isDirectory()?s.FileType.Directory:s.FileType.File):e.isFile()?s.FileType.File:e.isDirectory()?s.FileType.Directory:s.FileType.Unknown}async readFile(e){try{
const t=this.toFilePath(e);return await l.readFile(t)}catch(e){throw this.toFileSystemProviderError(e)}}readFileStream(e,t,i){const n=b.createReadStream(this,e,Object.assign(Object.assign({},t),{bufferSize:this.BUFFER_SIZE}),i);return w.transform(n,{data:e=>e.buffer},e=>S.VSBuffer.concat(e.map(e=>S.VSBuffer.wrap(e))).buffer)}async writeFile(e,t,i){let n=void 0;try{const r=this.toFilePath(e);if(!i.create||!i.overwrite){if(await l.exists(r)){if(!i.overwrite)throw s.createFileSystemProviderError(g.localize(0,null),s.FileSystemProviderErrorCode.FileExists)}else if(!i.create)throw s.createFileSystemProviderError(g.localize(1,null),s.FileSystemProviderErrorCode.FileNotFound)}n=await this.open(e,{create:!0}),await this.write(n,0,t,0,t.byteLength)}catch(e){throw this.toFileSystemProviderError(e)}finally{"number"==typeof n&&await this.close(n)}}async open(e,t){try{const r=this.toFilePath(e);let s=void 0;if(t.create){if(a.isWindows&&await l.exists(r))try{await l.truncate(r,0),s="r+"}catch(e){this.logService.trace(e)}
s||(s="w")}else s="r";const o=await n.promisify(i.open)(r,s);return this.mapHandleToPos.set(o,0),t.create&&this.writeHandles.add(o),o}catch(e){throw this.toFileSystemProviderError(e)}}async close(e){try{if(this.mapHandleToPos.delete(e),this.writeHandles.delete(e)&&this.canFlush)try{await n.promisify(i.fdatasync)(e)}catch(e){this.canFlush=!1,this.logService.error(e)}return await n.promisify(i.close)(e)}catch(e){throw this.toFileSystemProviderError(e)}}async read(e,t,r,s,o){const a=this.normalizePos(e,t);let l=null;try{const t=await n.promisify(i.read)(e,r,s,o,a);return l="number"==typeof t?t:t.bytesRead}catch(e){throw this.toFileSystemProviderError(e)}finally{this.updatePos(e,a,l)}}normalizePos(e,t){return t===this.mapHandleToPos.get(e)?null:t}updatePos(e,t,i){const n=this.mapHandleToPos.get(e);"number"==typeof n&&("number"==typeof t||("number"==typeof i?this.mapHandleToPos.set(e,n+i):this.mapHandleToPos.delete(e)))}async write(e,t,i,n,r){return d.retry(()=>this.doWrite(e,t,i,n,r),100,3)}
async doWrite(e,t,r,s,o){const a=this.normalizePos(e,t);let l=null;try{const t=await n.promisify(i.write)(e,r,s,o,a);return l="number"==typeof t?t:t.bytesWritten}catch(e){throw this.toFileSystemProviderError(e)}finally{this.updatePos(e,a,l)}}async mkdir(e){try{await n.promisify(i.mkdir)(this.toFilePath(e))}catch(e){throw this.toFileSystemProviderError(e)}}async delete(e,t){try{const i=this.toFilePath(e);await this.doDelete(i,t)}catch(e){throw this.toFileSystemProviderError(e)}}async doDelete(e,t){t.recursive?await l.rimraf(e,l.RimRafMode.MOVE):await l.unlink(e)}async rename(e,t,i){const n=this.toFilePath(e),r=this.toFilePath(t);if(n!==r)try{await this.validateTargetDeleted(e,t,"move",i.overwrite),await l.move(n,r)}catch(e){throw"EINVAL"!==e.code&&"EBUSY"!==e.code&&"ENAMETOOLONG"!==e.code||(e=new Error(g.localize(2,null,c.basename(n),c.basename(c.dirname(r)),e.toString()))),this.toFileSystemProviderError(e)}}async copy(e,t,i){const n=this.toFilePath(e),r=this.toFilePath(t);if(n!==r)try{
await this.validateTargetDeleted(e,t,"copy",i.overwrite),await l.copy(n,r)}catch(e){throw"EINVAL"!==e.code&&"EBUSY"!==e.code&&"ENAMETOOLONG"!==e.code||(e=new Error(g.localize(3,null,c.basename(n),c.basename(c.dirname(r)),e.toString()))),this.toFileSystemProviderError(e)}}async validateTargetDeleted(e,t,i,n){const r=!!(1024&this.capabilities),o=this.toFilePath(e),a=this.toFilePath(t);let c=!1;if(r||(c=h.isEqual(o,a,!0)),c&&"copy"===i)throw s.createFileSystemProviderError(g.localize(4,null),s.FileSystemProviderErrorCode.FileExists);if(!c&&await l.exists(a)){if(!n)throw s.createFileSystemProviderError(g.localize(5,null),s.FileSystemProviderErrorCode.FileExists);await this.delete(t,{recursive:!0,useTrash:!1})}}get onDidChangeFile(){return this._onDidChangeFile.event}watch(e,t){return t.recursive?this.watchRecursive(e,t.excludes):this.watchNonRecursive(e)}watchRecursive(e,t){const i={path:this.toFilePath(e),excludes:t};return this.recursiveFoldersToWatch.push(i),this.refreshRecursiveWatchers(),r.toDisposable(()=>{
this.recursiveFoldersToWatch.splice(this.recursiveFoldersToWatch.indexOf(i),1),this.refreshRecursiveWatchers()})}refreshRecursiveWatchers(){this.recursiveWatchRequestDelayer.trigger(()=>(this.doRefreshRecursiveWatchers(),Promise.resolve()))}doRefreshRecursiveWatchers(){var e,t,i;if(this.recursiveWatcher instanceof y.FileWatcher)this.recursiveWatcher.setFolders(this.recursiveFoldersToWatch);else if(r.dispose(this.recursiveWatcher),this.recursiveWatcher=void 0,this.recursiveFoldersToWatch.length>0){let n,r=void 0;(null===(t=null===(e=this.options)||void 0===e?void 0:e.watcher)||void 0===t?void 0:t.usePolling)?(n=m.FileWatcher,r=null===(i=this.options)||void 0===i?void 0:i.watcher):n=1===this.recursiveFoldersToWatch.length?a.isWindows?v.FileWatcher:m.FileWatcher:y.FileWatcher,this.recursiveWatcher=new n(this.recursiveFoldersToWatch,e=>this._onDidChangeFile.fire(p.toFileChanges(e)),e=>{"error"===e.type&&this._onDidWatchErrorOccur.fire(e.message),this.logService[e.type](e.message)
},this.logService.getLevel()===f.LogLevel.Trace,r),this.recursiveWatcherLogLevelListener||(this.recursiveWatcherLogLevelListener=this.logService.onDidChangeLogLevel(()=>{this.recursiveWatcher&&this.recursiveWatcher.setVerboseLogging(this.logService.getLevel()===f.LogLevel.Trace)}))}}watchNonRecursive(e){const t=new E.FileWatcher(this.toFilePath(e),e=>this._onDidChangeFile.fire(p.toFileChanges(e)),e=>{"error"===e.type&&this._onDidWatchErrorOccur.fire(e.message),this.logService[e.type](e.message)},this.logService.getLevel()===f.LogLevel.Trace),i=this.logService.onDidChangeLogLevel(()=>{t.setVerboseLogging(this.logService.getLevel()===f.LogLevel.Trace)});return r.combinedDisposable(t,i)}toFilePath(e){return c.normalize(e.fsPath)}toFileSystemProviderError(e){if(e instanceof s.FileSystemProviderError)return e;let t;switch(e.code){case"ENOENT":t=s.FileSystemProviderErrorCode.FileNotFound;break;case"EISDIR":t=s.FileSystemProviderErrorCode.FileIsADirectory;break;case"EEXIST":t=s.FileSystemProviderErrorCode.FileExists
;break;case"EPERM":case"EACCES":t=s.FileSystemProviderErrorCode.NoPermissions;break;default:t=s.FileSystemProviderErrorCode.Unknown}return s.createFileSystemProviderError(e,t)}dispose(){super.dispose(),r.dispose(this.recursiveWatcher),this.recursiveWatcher=void 0,r.dispose(this.recursiveWatcherLogLevelListener),this.recursiveWatcherLogLevelListener=void 0}}t.DiskFileSystemProvider=C})),define(e[88],t([0,1,2,12]),(function(e,t,i,n){"use strict";function r(e,t,i){switch(t){case n.LogLevel.Trace:e.trace(i);break;case n.LogLevel.Debug:e.debug(i);break;case n.LogLevel.Info:e.info(i);break;case n.LogLevel.Warning:e.warn(i);break;case n.LogLevel.Error:e.error(i);break;case n.LogLevel.Critical:e.critical(i);break;default:throw new Error("Invalid log level")}}Object.defineProperty(t,"__esModule",{value:!0}),t.createRotatingLogger=function(t,i,n,r){return e.__$__nodeRequire("spdlog").createRotatingLogger(t,i,n,r)};class s extends n.AbstractLogService{constructor(e,t,i){super(),this.name=e,this.logsFolder=t,
this.buffer=[],this._loggerCreationPromise=void 0,this.setLevel(i),this._createSpdLogLogger(),this._register(this.onDidChangeLogLevel(e=>{this._logger&&this._logger.setLevel(e)}))}_createSpdLogLogger(){return this._loggerCreationPromise||(this._loggerCreationPromise=async function(t,n){try{const r=await new Promise((t,i)=>{e(["spdlog"],t,i)});r.setAsyncMode(8192,500);const s=i.join(n,`${t}.log`);return r.createRotatingLoggerAsync(t,s,5242880,6)}catch(e){console.error(e)}return null}(this.name,this.logsFolder).then(e=>{if(e){this._logger=e,this._logger.setLevel(this.getLevel());for(const{level:e,message:t}of this.buffer)r(this._logger,e,t);this.buffer=[]}})),this._loggerCreationPromise}_log(e,t){this._logger?r(this._logger,e,t):this.getLevel()<=e&&this.buffer.push({level:e,message:t})}trace(e,...t){this.getLevel()<=n.LogLevel.Trace&&this._log(n.LogLevel.Trace,this.format([e,...t]))}debug(e,...t){this.getLevel()<=n.LogLevel.Debug&&this._log(n.LogLevel.Debug,this.format([e,...t]))}info(e,...t){
this.getLevel()<=n.LogLevel.Info&&this._log(n.LogLevel.Info,this.format([e,...t]))}warn(e,...t){this.getLevel()<=n.LogLevel.Warning&&this._log(n.LogLevel.Warning,this.format([e,...t]))}error(e,...t){if(this.getLevel()<=n.LogLevel.Error)if(e instanceof Error){const t=Array.prototype.slice.call(arguments);t[0]=e.stack,this._log(n.LogLevel.Error,this.format(t))}else this._log(n.LogLevel.Error,this.format([e,...t]))}critical(e,...t){this.getLevel()<=n.LogLevel.Critical&&this._log(n.LogLevel.Critical,this.format([e,...t]))}flush(){this._logger?this._logger.flush():this._loggerCreationPromise&&this._loggerCreationPromise.then(()=>this.flush())}dispose(){this._logger?this.disposeLogger():this._loggerCreationPromise&&this._loggerCreationPromise.then(()=>this.disposeLogger()),this._loggerCreationPromise=void 0}disposeLogger(){this._logger&&(this._logger.drop(),this._logger=void 0)}format(e){let t="";for(let i=0;i<e.length;i++){let n=e[i];if("object"==typeof n)try{n=JSON.stringify(n)}catch(e){}t+=(i>0?" ":"")+n}
return t}}t.SpdLogService=s})),define(e[89],t([0,1,25,90,77,48,2,24,64,34,85,13,22,15]),(function(e,t,n,r,s,o,a,l,c,u,h,d,f,g){"use strict";function p(e,i){return d.isWindows?function(e,t){return`\\\\.\\pipe\\${r.createHash("md5").update(e).digest("hex")}-${u.default.version}-${t}-sock`}(e,i):function(e,i){const n=process.env.VSCODE_PORTABLE;if(t.xdgRuntimeDir&&!n){const n=r.createHash("md5").update(e).digest("hex").substr(0,8);return a.join(t.xdgRuntimeDir,`vscode-${n}-${u.default.version}-${i}.sock`)}return a.join(e,`${u.default.version}-${i}.sock`)}(e,i)}Object.defineProperty(t,"__esModule",{value:!0}),t.xdgRuntimeDir=process.env.XDG_RUNTIME_DIR;class m{constructor(e,t){if(this._args=e,this._execPath=t,!process.env.VSCODE_LOGS){const e=h.toLocalISOString(new Date).replace(/-|:|\.\d+Z$/g,"");process.env.VSCODE_LOGS=a.join(this.userDataPath,"logs",e)}this.logsPath=process.env.VSCODE_LOGS}get args(){return this._args}get appRoot(){return a.dirname(f.getPathFromAmdModule(e,""))}get execPath(){
return this._execPath}get cliPath(){return e=this.execPath,t=this.appRoot,i=this.isBuilt,d.isWindows?i?a.join(a.dirname(e),"bin",`${u.default.applicationName}.cmd`):a.join(t,"scripts","code-cli.bat"):d.isLinux?"/usr/bin/code":i?a.join(t,"bin","code"):"/usr/bin/code";var e,t,i}get userHome(){return o.homedir()}get userDataPath(){const e=process.env.VSCODE_PORTABLE;return e?a.join(e,"user-data"):S(this._args,process)}get appSettingsHome(){return g.URI.file(a.join(this.userDataPath,"User"))}get userRoamingDataHome(){return this.appSettingsHome}get settingsResource(){return l.joinPath(this.userRoamingDataHome,"settings.json")}get settingsSyncPreviewResource(){return l.joinPath(this.userRoamingDataHome,".settings.json")}get keybindingsSyncPreviewResource(){return l.joinPath(this.userRoamingDataHome,".keybindings.json")}get userDataSyncLogResource(){return g.URI.file(a.join(this.logsPath,"userDataSync.log"))}get machineSettingsHome(){return g.URI.file(a.join(this.userDataPath,"Machine"))}
get machineSettingsResource(){return l.joinPath(this.machineSettingsHome,"settings.json")}get globalStorageHome(){return a.join(this.appSettingsHome.fsPath,"globalStorage")}get workspaceStorageHome(){return a.join(this.appSettingsHome.fsPath,"workspaceStorage")}get keybindingsResource(){return l.joinPath(this.userRoamingDataHome,"keybindings.json")}get keyboardLayoutResource(){return l.joinPath(this.userRoamingDataHome,"keyboardLayout.json")}get argvResource(){const e=process.env.VSCODE_PORTABLE;return e?g.URI.file(a.join(e,"argv.json")):g.URI.file(a.join(this.userHome,u.default.dataFolderName,"argv.json"))}get isExtensionDevelopment(){return!!this._args.extensionDevelopmentPath}get backupHome(){return g.URI.file(a.join(this.userDataPath,n.BACKUPS))}get backupWorkspacesPath(){return a.join(this.backupHome.fsPath,"workspaces.json")}get untitledWorkspacesHome(){return g.URI.file(a.join(this.userDataPath,"Workspaces"))}get installSourcePath(){return a.join(this.userDataPath,"installSource")}
get builtinExtensionsPath(){const t=E(this._args["builtin-extensions-dir"],process);return t||a.normalize(a.join(f.getPathFromAmdModule(e,""),"..","extensions"))}get extensionsPath(){const e=E(this._args["extensions-dir"],process);if(e)return e;const t=process.env.VSCODE_EXTENSIONS;if(t)return t;const i=process.env.VSCODE_PORTABLE;return i?a.join(i,"extensions"):a.join(this.userHome,u.default.dataFolderName,"extensions")}get extensionDevelopmentLocationURI(){const e=this._args.extensionDevelopmentPath;if(Array.isArray(e))return e.map(e=>/^[^:/?#]+?:\/\//.test(e)?g.URI.parse(e):g.URI.file(a.normalize(e)))}get extensionTestsLocationURI(){const e=this._args.extensionTestsPath;if(e)return/^[^:/?#]+?:\/\//.test(e)?g.URI.parse(e):g.URI.file(a.normalize(e))}get disableExtensions(){if(this._args["disable-extensions"])return!0;const e=this._args["disable-extension"];if(e){if("string"==typeof e)return[e];if(Array.isArray(e)&&e.length>0)return e}return!1}get debugExtensionHost(){return v(this._args,this.isBuilt)}
get logExtensionHostCommunication(){return!!this.args.logExtensionHostCommunication}get isBuilt(){return!process.env.VSCODE_DEV}get verbose(){return!!this._args.verbose}get log(){return this._args.log}get wait(){return!!this._args.wait}get status(){return!!this._args.status}get mainIPCHandle(){return p(this.userDataPath,"main")}get sharedIPCHandle(){return p(this.userDataPath,"shared")}get nodeCachedDataDir(){return process.env.VSCODE_NODE_CACHED_DATA_DIR||void 0}get galleryMachineIdResource(){return l.joinPath(g.URI.file(this.userDataPath),"machineid")}get disableUpdates(){return!!this._args["disable-updates"]}get disableCrashReporter(){return!!this._args["disable-crash-reporter"]}get driverHandle(){return this._args.driver}get driverVerbose(){return!!this._args["driver-verbose"]}}function v(e,t){return y(e["inspect-extensions"],e["inspect-brk-extensions"],5870,t,e.debugId)}function y(e,t,i,n,r){const s=Number(t||e)||(n?null:i);return{port:s,break:!!s&&Boolean(!!t),debugId:r}}function E(e,t){if(!e)return
;const i=a.resolve(e);return a.normalize(e)===i?i:a.resolve(t.env.VSCODE_CWD||t.cwd(),e)}function S(e,t){return E(e["user-data-dir"],t)||a.resolve(s.getDefaultUserDataPath(t.platform))}i([c.memoize],m.prototype,"appRoot",null),i([c.memoize],m.prototype,"cliPath",null),i([c.memoize],m.prototype,"userHome",null),i([c.memoize],m.prototype,"userDataPath",null),i([c.memoize],m.prototype,"appSettingsHome",null),i([c.memoize],m.prototype,"userRoamingDataHome",null),i([c.memoize],m.prototype,"settingsResource",null),i([c.memoize],m.prototype,"settingsSyncPreviewResource",null),i([c.memoize],m.prototype,"keybindingsSyncPreviewResource",null),i([c.memoize],m.prototype,"userDataSyncLogResource",null),i([c.memoize],m.prototype,"machineSettingsHome",null),i([c.memoize],m.prototype,"machineSettingsResource",null),i([c.memoize],m.prototype,"globalStorageHome",null),i([c.memoize],m.prototype,"workspaceStorageHome",null),i([c.memoize],m.prototype,"keybindingsResource",null),
i([c.memoize],m.prototype,"keyboardLayoutResource",null),i([c.memoize],m.prototype,"argvResource",null),i([c.memoize],m.prototype,"isExtensionDevelopment",null),i([c.memoize],m.prototype,"backupHome",null),i([c.memoize],m.prototype,"backupWorkspacesPath",null),i([c.memoize],m.prototype,"untitledWorkspacesHome",null),i([c.memoize],m.prototype,"installSourcePath",null),i([c.memoize],m.prototype,"builtinExtensionsPath",null),i([c.memoize],m.prototype,"extensionsPath",null),i([c.memoize],m.prototype,"extensionDevelopmentLocationURI",null),i([c.memoize],m.prototype,"extensionTestsLocationURI",null),i([c.memoize],m.prototype,"debugExtensionHost",null),i([c.memoize],m.prototype,"logExtensionHostCommunication",null),i([c.memoize],m.prototype,"mainIPCHandle",null),i([c.memoize],m.prototype,"sharedIPCHandle",null),i([c.memoize],m.prototype,"nodeCachedDataDir",null),i([c.memoize],m.prototype,"galleryMachineIdResource",null),t.EnvironmentService=m,t.parseExtensionHostPort=v,t.parseSearchPort=function(e,t){
return y(e["inspect-search"],e["inspect-brk-search"],5876,t)},t.parsePathArg=E,t.parseUserDataDir=S})),define(e[93],t([0,1,8,90,29,3,25,14,30,12,84,34,28,6,17,2]),(function(e,t,r,s,o,a,l,c,u,h,d,f,g,p,m,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const y=["de","en","en-US","es","fr","it","ja","ko","ru","zh-CN","zh-TW"];"stable"!==f.default.quality&&y.push("hu");let E=class extends a.Disposable{constructor(e,t,i){super(),this.extensionManagementService=e,this.logService=i,this._onDidLanguagesChange=this._register(new p.Emitter),this.onDidLanguagesChange=this._onDidLanguagesChange.event,this.cache=this._register(new S(t,i)),this._register(e.onDidInstallExtension(({local:e})=>this.onDidInstallExtension(e))),this._register(e.onDidUninstallExtension(({identifier:e})=>this.onDidUninstallExtension(e)))}getLanguageIds(e){return 1===e?Promise.resolve([...y]):this.cache.getLanguagePacks().then(t=>{const i=2===e?Object.keys(t):[...y,...Object.keys(t)];return g.distinct(i)})}onDidInstallExtension(e){
e&&e.manifest&&e.manifest.contributes&&e.manifest.contributes.localizations&&e.manifest.contributes.localizations.length&&(this.logService.debug("Adding language packs from the extension",e.identifier.id),this.update().then(e=>{e&&this._onDidLanguagesChange.fire()}))}onDidUninstallExtension(e){this.cache.getLanguagePacks().then(t=>{Object.keys(t).some(i=>t[i]&&t[i].extensions.some(t=>u.areSameExtensions(t.extensionIdentifier,e)))&&(this.logService.debug("Removing language packs from the extension",e.id),this.update().then(e=>{e&&this._onDidLanguagesChange.fire()}))})}update(){return Promise.all([this.cache.getLanguagePacks(),this.extensionManagementService.getInstalled()]).then(([e,t])=>this.cache.update(t).then(t=>!g.equals(Object.keys(e),Object.keys(t))))}};E=i([n(0,o.IExtensionManagementService),n(1,l.IEnvironmentService),n(2,h.ILogService)],E),t.LocalizationsService=E;let S=class extends a.Disposable{constructor(e,t){super(),this.logService=t,this.languagePacks={},
this.languagePacksFilePath=v.join(e.userDataPath,"languagepacks.json"),this.languagePacksFileLimiter=new c.Queue}getLanguagePacks(){return this.languagePacksFileLimiter.size||!this.initializedCache?this.withLanguagePacks().then(()=>this.languagePacks):Promise.resolve(this.languagePacks)}update(e){return this.withLanguagePacks(t=>{Object.keys(t).forEach(e=>delete t[e]),this.createLanguagePacksFromExtensions(t,...e)}).then(()=>this.languagePacks)}createLanguagePacksFromExtensions(e,...t){for(const i of t)i&&i.manifest&&i.manifest.contributes&&i.manifest.contributes.localizations&&i.manifest.contributes.localizations.length&&this.createLanguagePacksFromExtension(e,i);Object.keys(e).forEach(t=>this.updateHash(e[t]))}createLanguagePacksFromExtension(e,t){const i=t.identifier,n=t.manifest.contributes&&t.manifest.contributes.localizations?t.manifest.contributes.localizations:[];for(const r of n)if(t.location.scheme===m.Schemas.file&&d.isValidLocalization(r)){let n=e[r.languageId];n||(n={hash:"",extensions:[],
translations:{}},e[r.languageId]=n);let s=n.extensions.filter(e=>u.areSameExtensions(e.extensionIdentifier,i))[0];s?s.version=t.manifest.version:n.extensions.push({extensionIdentifier:i,version:t.manifest.version});for(const e of r.translations)n.translations[e.id]=v.join(t.location.fsPath,e.path)}}updateHash(e){if(e){const t=s.createHash("md5");for(const i of e.extensions)t.update(i.extensionIdentifier.uuid||i.extensionIdentifier.id).update(i.version);e.hash=t.digest("hex")}}withLanguagePacks(e=(()=>null)){return this.languagePacksFileLimiter.queue(()=>{let t=null;return r.readFile(this.languagePacksFilePath,"utf8").then(void 0,e=>"ENOENT"===e.code?Promise.resolve("{}"):Promise.reject(e)).then(e=>{try{return JSON.parse(e)}catch(e){return{}}}).then(i=>(t=e(i),i)).then(e=>{for(const t of Object.keys(e))e[t]||delete e[t];this.languagePacks=e,this.initializedCache=!0;const t=JSON.stringify(this.languagePacks);return this.logService.debug("Writing language packs",t),r.writeFile(this.languagePacksFilePath,t)
}).then(()=>t,e=>this.logService.error(e))})}};S=i([n(0,l.IEnvironmentService),n(1,h.ILogService)],S)})),define(e[50],t([0,1,4]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IProductService=i.createDecorator("productService")})),define(e[20],t([0,1,9,82]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.Registry=new class{constructor(){this.data=new Map}add(e,t){n.ok(i.isString(e)),n.ok(i.isObject(t)),n.ok(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}knows(e){return this.data.has(e)}as(e){return this.data.get(e)||null}}})),define(e[96],t([0,1,20,6]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Extensions={JSONContribution:"base.contributions.json"};const r=new class{constructor(){this._onDidChangeSchema=new n.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.schemasById={}}registerSchema(e,t){var i;this.schemasById[(i=e,
i.length>0&&"#"===i.charAt(i.length-1)?i.substring(0,i.length-1):i)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}getSchemaContributions(){return{schemas:this.schemasById}}};i.Registry.add(t.Extensions.JSONContribution,r)})),define(e[27],t([0,1,92,6,20,9,11,96]),(function(e,t,i,n,r,s,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Extensions={Configuration:"base.contributions.configuration"},function(e){e[e.APPLICATION=1]="APPLICATION",e[e.MACHINE=2]="MACHINE",e[e.WINDOW=3]="WINDOW",e[e.RESOURCE=4]="RESOURCE",e[e.MACHINE_OVERRIDABLE=5]="MACHINE_OVERRIDABLE"}(t.ConfigurationScope||(t.ConfigurationScope={})),t.allSettings={properties:{},patternProperties:{}},t.applicationSettings={properties:{},patternProperties:{}},t.machineSettings={properties:{},patternProperties:{}},t.machineOverridableSettings={properties:{},patternProperties:{}},t.windowSettings={properties:{},patternProperties:{}},t.resourceSettings={properties:{},patternProperties:{}},
t.editorConfigurationSchemaId="vscode://schemas/settings/editor";const l=r.Registry.as(a.Extensions.JSONContribution);const c="override",u="\\[.*\\]$",h="\\[(${0})\\]$";function d(e){switch(Array.isArray(e)?e[0]:e){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}t.OVERRIDE_PROPERTY_PATTERN=new RegExp(u),t.getDefaultValue=d;const f=new class{constructor(){this.overrideIdentifiers=[],this._onDidSchemaChange=new n.Emitter,this.onDidSchemaChange=this._onDidSchemaChange.event,this._onDidUpdateConfiguration=new n.Emitter,this.onDidUpdateConfiguration=this._onDidUpdateConfiguration.event,this.defaultOverridesConfigurationNode={id:"defaultOverrides",title:i.localize(0,null),properties:{}},this.configurationContributors=[this.defaultOverridesConfigurationNode],this.editorConfigurationSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting",
allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.excludedConfigurationProperties={},this.overridePropertyPattern=this.computeOverridePropertyPattern(),l.registerSchema(t.editorConfigurationSchemaId,this.editorConfigurationSchema)}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const i=[];e.forEach(e=>{i.push(...this.validateAndRegisterProperties(e,t)),this.configurationContributors.push(e),this.registerJSONConfiguration(e),this.updateSchemaForOverrideSettingsConfiguration(e)}),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(i)}deregisterConfigurations(e){const i=[],n=e=>{if(e.properties)for(const n in e.properties)switch(i.push(n),delete this.configurationProperties[n],delete this.editorConfigurationSchema.properties[n],delete t.allSettings.properties[n],e.properties[n].scope){case 1:delete t.applicationSettings.properties[n];break;case 2:delete t.machineSettings.properties[n];break;case 5:
delete t.machineOverridableSettings.properties[n];break;case 3:delete t.windowSettings.properties[n];break;case 4:delete t.resourceSettings.properties[n]}e.allOf&&e.allOf.forEach(e=>n(e))};for(const t of e){n(t);const e=this.configurationContributors.indexOf(t);-1!==e&&this.configurationContributors.splice(e,1)}l.registerSchema(t.editorConfigurationSchemaId,this.editorConfigurationSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(i)}registerDefaultConfigurations(e){const n=[];for(const r of e)for(const e in r.defaults){const s=r.defaults[e];if(t.OVERRIDE_PROPERTY_PATTERN.test(e)&&"object"==typeof s){const r={type:"object",default:s,description:i.localize(1,null,e),$ref:t.editorConfigurationSchemaId};t.allSettings.properties[e]=r,this.defaultOverridesConfigurationNode.properties[e]=r,this.configurationProperties[e]=r,n.push(e)}}this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(n)}deregisterDefaultConfigurations(e){const i=[]
;for(const n of e)for(const e in n.defaults)i.push(e),delete t.allSettings.properties[e],delete this.defaultOverridesConfigurationNode.properties[e],delete this.configurationProperties[e];this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(i)}notifyConfigurationSchemaUpdated(...e){this._onDidSchemaChange.fire()}registerOverrideIdentifiers(e){this.overrideIdentifiers.push(...e),this.updateOverridePropertyPatternKey()}validateAndRegisterProperties(e,i=!0,n=3,r=!1){n=s.isUndefinedOrNull(e.scope)?n:e.scope,r=e.overridable||r;let o=[],a=e.properties;if(a)for(let e in a){let l;if(i&&(l=g(e))){console.warn(l),delete a[e];continue}let c=a[e],u=c.default;s.isUndefined(u)&&(c.default=d(c.type)),r&&(c.overridable=!0),t.OVERRIDE_PROPERTY_PATTERN.test(e)?c.scope=void 0:c.scope=s.isUndefinedOrNull(c.scope)?n:c.scope,!a[e].hasOwnProperty("included")||a[e].included?(this.configurationProperties[e]=a[e],o.push(e)):(this.excludedConfigurationProperties[e]=a[e],delete a[e])}let l=e.allOf
;if(l)for(let e of l)o.push(...this.validateAndRegisterProperties(e,i,n,r));return o}getConfigurations(){return this.configurationContributors}getConfigurationProperties(){return this.configurationProperties}getExcludedConfigurationProperties(){return this.excludedConfigurationProperties}registerJSONConfiguration(e){!function e(i){let n=i.properties;if(n)for(const e in n)switch(t.allSettings.properties[e]=n[e],n[e].scope){case 1:t.applicationSettings.properties[e]=n[e];break;case 2:t.machineSettings.properties[e]=n[e];break;case 5:t.machineOverridableSettings.properties[e]=n[e];break;case 3:t.windowSettings.properties[e]=n[e];break;case 4:t.resourceSettings.properties[e]=n[e]}let r=i.allOf;r&&r.forEach(e)}(e)}updateSchemaForOverrideSettingsConfiguration(e){e.id!==c&&(this.update(e),l.registerSchema(t.editorConfigurationSchemaId,this.editorConfigurationSchema))}updateOverridePropertyPatternKey(){let e=t.allSettings.patternProperties[this.overridePropertyPattern];e||(e={type:"object",
description:i.localize(2,null),errorMessage:"Unknown Identifier. Use language identifiers",$ref:t.editorConfigurationSchemaId}),delete t.allSettings.patternProperties[this.overridePropertyPattern],delete t.applicationSettings.patternProperties[this.overridePropertyPattern],delete t.machineSettings.patternProperties[this.overridePropertyPattern],delete t.machineOverridableSettings.patternProperties[this.overridePropertyPattern],delete t.windowSettings.patternProperties[this.overridePropertyPattern],delete t.resourceSettings.patternProperties[this.overridePropertyPattern],this.overridePropertyPattern=this.computeOverridePropertyPattern(),t.allSettings.patternProperties[this.overridePropertyPattern]=e,t.applicationSettings.patternProperties[this.overridePropertyPattern]=e,t.machineSettings.patternProperties[this.overridePropertyPattern]=e,t.machineOverridableSettings.patternProperties[this.overridePropertyPattern]=e,t.windowSettings.patternProperties[this.overridePropertyPattern]=e,
t.resourceSettings.patternProperties[this.overridePropertyPattern]=e,this._onDidSchemaChange.fire()}update(e){let t=e.properties;if(t)for(let e in t)t[e].overridable&&(this.editorConfigurationSchema.properties[e]=this.getConfigurationProperties()[e]);let i=e.allOf;i&&i.forEach(e=>this.update(e))}computeOverridePropertyPattern(){return this.overrideIdentifiers.length?h.replace("${0}",this.overrideIdentifiers.map(e=>o.createRegExp(e,!1).source).join("|")):u}};function g(e){return t.OVERRIDE_PROPERTY_PATTERN.test(e)?i.localize(3,null,e):void 0!==f.getConfigurationProperties()[e]?i.localize(4,null,e):null}r.Registry.add(t.Extensions.Configuration,f),t.validateProperty=g,t.getScopes=function(){const e=[],t=f.getConfigurationProperties();for(const i of Object.keys(t))e.push([i,t[i].scope]);return e.push(["launch",4]),e.push(["task",4]),e}})),define(e[21],t([0,1,10,9,15,20,4,27]),(function(e,t,i,n,r,s,o,a){"use strict";function l(e,t){const i=Object.create(null);for(let n in e)c(i,n,e[n],t);return i}
function c(e,t,i,n){const r=t.split("."),s=r.pop();let o=e;for(let e=0;e<r.length;e++){let i=r[e],s=o[i];switch(typeof s){case"undefined":s=o[i]=Object.create(null);break;case"object":break;default:return void n(`Ignoring ${t} as ${r.slice(0,e+1).join(".")} is ${JSON.stringify(s)}`)}o=s}"object"==typeof o?o[s]=i:n(`Ignoring ${t} as ${r.join(".")} is ${JSON.stringify(o)}`)}function u(e,t,i){const n=function(e,t){let i=e;for(const e of t){if("object"!=typeof i||null===i)return;i=i[e]}return i}(e,t.split("."));return void 0===n?i:n}function h(e){return e.substring(1,e.length-1)}Object.defineProperty(t,"__esModule",{value:!0}),t.IConfigurationService=o.createDecorator("configurationService"),t.isConfigurationOverrides=function(e){return e&&"object"==typeof e&&(!e.overrideIdentifier||"string"==typeof e.overrideIdentifier)&&(!e.resource||e.resource instanceof r.URI)},function(e){e[e.USER=1]="USER",e[e.USER_LOCAL=2]="USER_LOCAL",e[e.USER_REMOTE=3]="USER_REMOTE",e[e.WORKSPACE=4]="WORKSPACE",
e[e.WORKSPACE_FOLDER=5]="WORKSPACE_FOLDER",e[e.DEFAULT=6]="DEFAULT",e[e.MEMORY=7]="MEMORY"}(t.ConfigurationTarget||(t.ConfigurationTarget={})),t.ConfigurationTargetToString=function(e){switch(e){case 1:return"USER";case 2:return"USER_LOCAL";case 3:return"USER_REMOTE";case 4:return"WORKSPACE";case 5:return"WORKSPACE_FOLDER";case 6:return"DEFAULT";case 7:return"MEMORY"}},t.compare=function(e,t){const n=t.keys.filter(t=>-1===e.keys.indexOf(t)),r=e.keys.filter(e=>-1===t.keys.indexOf(e)),s=[];for(const n of e.keys){const r=u(e.contents,n),o=u(t.contents,n);i.equals(r,o)||s.push(n)}return{added:n,removed:r,updated:s}},t.toOverrides=function(e,t){const i=[],n=s.Registry.as(a.Extensions.Configuration).getConfigurationProperties();for(const r of Object.keys(e))if(a.OVERRIDE_PROPERTY_PATTERN.test(r)){const s={};for(const t in e[r])n[t]&&n[t].overridable&&(s[t]=e[r][t]);i.push({identifiers:[h(r).trim()],contents:l(s,t)})}return i},t.toValuesTree=l,t.addToValueTree=c,t.removeFromValueTree=function(e,t){!function e(t,i){
const n=i.shift();if(0===i.length)return void delete t[n];if(-1!==Object.keys(t).indexOf(n)){const r=t[n];"object"!=typeof r||Array.isArray(r)||(e(r,i),0===Object.keys(r).length&&delete t[n])}}(e,t.split("."))},t.getConfigurationValue=u,t.merge=function e(t,i,r){Object.keys(i).forEach(s=>{s in t?n.isObject(t[s])&&n.isObject(i[s])?e(t[s],i[s],r):r&&(t[s]=i[s]):t[s]=i[s]})},t.getConfigurationKeys=function(){const e=s.Registry.as(a.Extensions.Configuration).getConfigurationProperties();return Object.keys(e)},t.getDefaultValues=function(){const e=Object.create(null),t=s.Registry.as(a.Extensions.Configuration).getConfigurationProperties();for(let i in t){c(e,i,t[i].default,e=>console.error(`Conflict in default settings: ${e}`))}return e},t.overrideIdentifierFromKey=h,t.keyFromOverrideIdentifier=function(e){return`[${e}]`},t.getMigratedSettingValue=function(e,t,i){const n=e.inspect(t),r=e.inspect(i)
;return void 0!==n.user||void 0!==n.workspace||void 0!==n.workspaceFolder?n.value:void 0!==r.user||void 0!==r.workspace||void 0!==r.workspaceFolder?r.value:n.default}})),define(e[99],t([0,1,40,31,28,9,10,27,21,20]),(function(e,t,i,n,r,s,o,a,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class u{constructor(e={},t=[],i=[]){this._contents=e,this._keys=t,this._overrides=i,this.isFrozen=!1}get contents(){return this.checkAndFreeze(this._contents)}get overrides(){return this.checkAndFreeze(this._overrides)}get keys(){return this.checkAndFreeze(this._keys)}isEmpty(){return 0===this._keys.length&&0===Object.keys(this._contents).length&&0===this._overrides.length}getValue(e){return e?l.getConfigurationValue(this.contents,e):this.contents}override(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||"object"!=typeof t||!Object.keys(t).length)return this;let i={};for(const e of r.distinct([...Object.keys(this.contents),...Object.keys(t)])){let n=this.contents[e],r=t[e]
;r&&("object"==typeof n&&"object"==typeof r?(n=o.deepClone(n),this.mergeContents(n,r)):n=r),i[e]=n}return new u(i)}merge(...e){const t=o.deepClone(this.contents),i=o.deepClone(this.overrides),n=[...this.keys];for(const s of e){this.mergeContents(t,s.contents);for(const e of s.overrides){const[t]=i.filter(t=>r.equals(t.identifiers,e.identifiers));t?this.mergeContents(t.contents,e.contents):i.push(o.deepClone(e))}for(const e of s.keys)-1===n.indexOf(e)&&n.push(e)}return new u(t,n,i)}freeze(){return this.isFrozen=!0,this}mergeContents(e,t){for(const i of Object.keys(t))i in e&&s.isObject(e[i])&&s.isObject(t[i])?this.mergeContents(e[i],t[i]):e[i]=o.deepClone(t[i])}checkAndFreeze(e){return this.isFrozen&&!Object.isFrozen(e)?o.deepFreeze(e):e}getContentsForOverrideIdentifer(e){for(const t of this.overrides)if(-1!==t.identifiers.indexOf(e))return t.contents;return null}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,t){this.addKey(e),l.addToValueTree(this.contents,e,t,e=>{
throw new Error(e)})}removeValue(e){this.removeKey(e)&&l.removeFromValueTree(this.contents,e)}addKey(e){let t=this.keys.length;for(let i=0;i<t;i++)0===e.indexOf(this.keys[i])&&(t=i);this.keys.splice(t,1,e)}removeKey(e){let t=this.keys.indexOf(e);return-1!==t&&(this.keys.splice(t,1),!0)}}t.ConfigurationModel=u;t.DefaultConfigurationModel=class extends u{constructor(){const e=l.getDefaultValues(),t=l.getConfigurationKeys(),i=[];for(const t of Object.keys(e))a.OVERRIDE_PROPERTY_PATTERN.test(t)&&i.push({identifiers:[l.overrideIdentifierFromKey(t).trim()],contents:l.toValuesTree(e[t],e=>console.error(`Conflict in default settings file: ${e}`))});super(e,t,i)}};t.ConfigurationModelParser=class{constructor(e,t){this._name=e,this._scopes=t,this._raw=null,this._configurationModel=null,this._parseErrors=[]}get configurationModel(){return this._configurationModel||new u}get errors(){return this._parseErrors}parseContent(e){if(e){const t=this.doParseContent(e);this.parseRaw(t)}}parseRaw(e){this._raw=e
;const t=this.doParseRaw(e);this._configurationModel=new u(t.contents,t.keys,t.overrides)}parse(){this._raw&&this.parseRaw(this._raw)}doParseContent(e){let t={},n=null,r=[],s=[],o=[];function a(e){Array.isArray(r)?r.push(e):n&&(r[n]=e)}let l={onObjectBegin:()=>{let e={};a(e),s.push(r),r=e,n=null},onObjectProperty:e=>{n=e},onObjectEnd:()=>{r=s.pop()},onArrayBegin:()=>{let e=[];a(e),s.push(r),r=e,n=null},onArrayEnd:()=>{r=s.pop()},onLiteralValue:a,onError:(e,t,i)=>{o.push({error:e,offset:t,length:i})}};if(e)try{i.visit(e,l),t=r[0]||{}}catch(e){console.error(`Error while parsing settings file ${this._name}: ${e}`),this._parseErrors=[e]}return t}doParseRaw(e){if(this._scopes){const t=c.Registry.as(a.Extensions.Configuration).getConfigurationProperties();e=this.filterByScope(e,t,!0,this._scopes)}return{contents:l.toValuesTree(e,e=>console.error(`Conflict in settings file ${this._name}: ${e}`)),keys:Object.keys(e),overrides:l.toOverrides(e,e=>console.error(`Conflict in settings file ${this._name}: ${e}`))}}
filterByScope(e,t,i,n){const r={};for(let s in e)if(a.OVERRIDE_PROPERTY_PATTERN.test(s)&&i)r[s]=this.filterByScope(e[s],t,!1,n);else{const i=this.getScope(s,t);-1!==n.indexOf(i)&&(r[s]=e[s])}return r}getScope(e,t){const i=t[e];return i&&void 0!==i.scope?i.scope:3}};t.Configuration=class{constructor(e,t,i=new u,r=new u,s=new n.ResourceMap,o=new u,a=new n.ResourceMap,l=!0){this._defaultConfiguration=e,this._localUserConfiguration=t,this._remoteUserConfiguration=i,this._workspaceConfiguration=r,this._folderConfigurations=s,this._memoryConfiguration=o,this._memoryConfigurationByResource=a,this._freeze=l,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new n.ResourceMap,this._userConfiguration=null}getValue(e,t,i){return this.getConsolidateConfigurationModel(t,i).getValue(e)}updateValue(e,t,i={}){let n;i.resource?(n=this._memoryConfigurationByResource.get(i.resource))||(n=new u,this._memoryConfigurationByResource.set(i.resource,n)):n=this._memoryConfiguration,
void 0===t?n.removeValue(e):n.setValue(e,t),i.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,t,i){const n=this.getConsolidateConfigurationModel(t,i),r=this.getFolderConfigurationModelForResource(t.resource,i),s=t.resource&&this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration;return{default:t.overrideIdentifier?this._defaultConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this._defaultConfiguration.freeze().getValue(e),user:t.overrideIdentifier?this.userConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this.userConfiguration.freeze().getValue(e),userLocal:t.overrideIdentifier?this.localUserConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this.localUserConfiguration.freeze().getValue(e),userRemote:t.overrideIdentifier?this.remoteUserConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this.remoteUserConfiguration.freeze().getValue(e),
workspace:i?t.overrideIdentifier?this._workspaceConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this._workspaceConfiguration.freeze().getValue(e):void 0,workspaceFolder:r?t.overrideIdentifier?r.freeze().override(t.overrideIdentifier).getValue(e):r.freeze().getValue(e):void 0,memory:t.overrideIdentifier?s.override(t.overrideIdentifier).getValue(e):s.getValue(e),value:n.getValue(e)}}keys(e){const t=this.getFolderConfigurationModelForResource(void 0,e);return{default:this._defaultConfiguration.freeze().keys,user:this.userConfiguration.freeze().keys,workspace:this._workspaceConfiguration.freeze().keys,workspaceFolder:t?t.freeze().keys:[]}}updateDefaultConfiguration(e){this._defaultConfiguration=e,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateLocalUserConfiguration(e){this._localUserConfiguration=e,this._userConfiguration=null,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}
updateRemoteUserConfiguration(e){this._remoteUserConfiguration=e,this._userConfiguration=null,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateWorkspaceConfiguration(e){this._workspaceConfiguration=e,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateFolderConfiguration(e,t){this._folderConfigurations.set(e,t),this._foldersConsolidatedConfigurations.delete(e)}deleteFolderConfiguration(e){this.folderConfigurations.delete(e),this._foldersConsolidatedConfigurations.delete(e)}get defaults(){return this._defaultConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration),this._freeze&&this._userConfiguration.freeze()),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){
return this._remoteUserConfiguration}get workspaceConfiguration(){return this._workspaceConfiguration}get folderConfigurations(){return this._folderConfigurations}getConsolidateConfigurationModel(e,t){let i=this.getConsolidatedConfigurationModelForResource(e,t);return e.overrideIdentifier?i.override(e.overrideIdentifier):i}getConsolidatedConfigurationModelForResource({resource:e},t){let i=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const n=t.getFolder(e);n&&(i=this.getFolderConsolidatedConfiguration(n.uri)||i);const r=this._memoryConfigurationByResource.get(e);r&&(i=i.merge(r))}return i}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){
let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const i=this.getWorkspaceConsolidatedConfiguration(),n=this._folderConfigurations.get(e);n?(t=i.merge(n),this._freeze&&(t=t.freeze()),this._foldersConsolidatedConfigurations.set(e,t)):t=i}return t}getFolderConfigurationModelForResource(e,t){if(t&&e){const i=t.getFolder(e);if(i)return this._folderConfigurations.get(i.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:this._folderConfigurations.keys().reduce((e,t)=>{const{contents:i,overrides:n,keys:r}=this._folderConfigurations.get(t);return e.push([t,{contents:i,overrides:n,keys:r}]),e},[])}}allKeys(e){
let t=this.keys(e),i=[...t.default];const n=e=>{for(const t of e)-1===i.indexOf(t)&&i.push(t)};n(t.user),n(t.workspace);for(const e of this.folderConfigurations.keys())n(this.folderConfigurations.get(e).keys);return i}};class h{doesConfigurationContains(e,t){let i,n=e.contents,r=l.toValuesTree({[t]:!0},()=>{});for(;"object"==typeof r&&(i=Object.keys(r)[0]);){if(!(n=n[i]))return!1;r=r[i]}return!0}updateKeys(e,t,i){for(const i of t)e.setValue(i,{})}}t.AbstractConfigurationChangeEvent=h;class d extends h{constructor(e=new u,t=new n.ResourceMap){super(),this._changedConfiguration=e,this._changedConfigurationByResource=t,this._source=6}get changedConfiguration(){return this._changedConfiguration}get changedConfigurationByResource(){return this._changedConfigurationByResource}change(e,t){if(e instanceof d){this._changedConfiguration=this._changedConfiguration.merge(e._changedConfiguration);for(const t of e._changedConfigurationByResource.keys()){let i=this.getOrSetChangedConfigurationForResource(t)
;i=i.merge(e._changedConfigurationByResource.get(t)),this._changedConfigurationByResource.set(t,i)}}else this.changeWithKeys(e,t);return this}telemetryData(e,t){return this._source=e,this._sourceConfig=t,this}get affectedKeys(){const e=[...this._changedConfiguration.keys];return this._changedConfigurationByResource.forEach(t=>e.push(...t.keys)),r.distinct(e)}get source(){return this._source}get sourceConfig(){return this._sourceConfig}affectsConfiguration(e,t){let i=[this._changedConfiguration];if(t){let e=this._changedConfigurationByResource.get(t);e&&i.push(e)}else i.push(...this._changedConfigurationByResource.values());return i.some(t=>this.doesConfigurationContains(t,e))}changeWithKeys(e,t){let i=t?this.getOrSetChangedConfigurationForResource(t):this._changedConfiguration;this.updateKeys(i,e)}getOrSetChangedConfigurationForResource(e){let t=this._changedConfigurationByResource.get(e);return t||(t=new u,this._changedConfigurationByResource.set(e,t)),t}}t.ConfigurationChangeEvent=d})),
define(e[100],t([0,1,20,27,3,21,99,6,78,19,17]),(function(e,t,i,n,r,s,o,a,l,c,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class h extends r.Disposable{constructor(e){super(),this.settingsResource=e,this._onDidChangeConfiguration=this._register(new a.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this.configuration=new o.Configuration(new o.DefaultConfigurationModel,new o.ConfigurationModel),this._register(i.Registry.as(n.Extensions.Configuration).onDidUpdateConfiguration(e=>this.onDidDefaultConfigurationChange(e)))}initialize(){return this.userConfigModelWatcher&&this.userConfigModelWatcher.dispose(),this.settingsResource.scheme!==u.Schemas.file?Promise.resolve():new Promise((e,t)=>{this.userConfigModelWatcher=this._register(new l.ConfigWatcher(this.settingsResource.fsPath,{changeBufferDelay:300,onError:e=>c.onUnexpectedError(e),defaultConfig:new o.ConfigurationModelParser(this.settingsResource.fsPath),parse:(e,t)=>{
const i=new o.ConfigurationModelParser(this.settingsResource.fsPath);return i.parseContent(e),[...i.errors],i},initCallback:()=>{this.configuration=new o.Configuration(new o.DefaultConfigurationModel,this.userConfigModelWatcher.getConfig().configurationModel),this._register(this.userConfigModelWatcher.onDidUpdateConfiguration(()=>this.onDidChangeUserConfiguration(this.userConfigModelWatcher.getConfig().configurationModel))),e()}}))})}getConfigurationData(){return this.configuration.toData()}getValue(e,t){const i="string"==typeof e?e:void 0,n=s.isConfigurationOverrides(e)?e:s.isConfigurationOverrides(t)?t:{};return this.configuration.getValue(i,n,void 0)}updateValue(e,t,i,n){return Promise.reject(new Error("not supported"))}inspect(e){return this.configuration.inspect(e,{},void 0)}keys(){return this.configuration.keys(void 0)}reloadConfiguration(e){return this.userConfigModelWatcher?new Promise(e=>this.userConfigModelWatcher.reload(t=>{this.onDidChangeUserConfiguration(t.configurationModel),e()
})):this.initialize()}onDidChangeUserConfiguration(e){const{added:t,updated:i,removed:n}=s.compare(this.configuration.localUserConfiguration,e),r=[...t,...i,...n];r.length&&(this.configuration.updateLocalUserConfiguration(e),this.trigger(r,1))}onDidDefaultConfigurationChange(e){this.configuration.updateDefaultConfiguration(new o.DefaultConfigurationModel),this.trigger(e,6)}trigger(e,t){this._onDidChangeConfiguration.fire((new o.ConfigurationChangeEvent).change(e).telemetryData(t,this.getTargetConfiguration(t)))}getTargetConfiguration(e){switch(e){case 6:return this.configuration.defaults.contents;case 1:return this.configuration.localUserConfiguration.contents}return{}}}t.ConfigurationService=h})),define(e[54],t([0,1,116,4,27,20,16]),(function(e,t,i,n,r,s,o){"use strict";function a(e){return e.res.statusCode&&e.res.statusCode>=200&&e.res.statusCode<300||1223===e.res.statusCode}function l(e){return 204===e.res.statusCode}Object.defineProperty(t,"__esModule",{value:!0}),
t.IRequestService=n.createDecorator("requestService"),t.isSuccess=a,t.asText=async function(e){if(!a(e))throw new Error("Server returned "+e.res.statusCode);return l(e)?null:(await o.streamToBuffer(e.stream)).toString()},t.asJson=async function(e){if(!a(e))throw new Error("Server returned "+e.res.statusCode);if(l(e))return null;const t=await o.streamToBuffer(e.stream);return JSON.parse(t.toString())},s.Registry.as(r.Extensions.Configuration).registerConfiguration({id:"http",order:15,title:i.localize(0,null),type:"object",properties:{"http.proxy":{type:"string",pattern:"^https?://([^:]*(:[^@]*)?@)?([^:]+|\\[[:0-9a-fA-F]+\\])(:\\d+)?/?$|^$",markdownDescription:i.localize(1,null)},"http.proxyStrictSSL":{type:"boolean",default:!0,description:i.localize(2,null)},"http.proxyAuthorization":{type:["null","string"],default:null,markdownDescription:i.localize(3,null)},"http.proxySupport":{type:"string",enum:["off","on","override"],enumDescriptions:[i.localize(4,null),i.localize(5,null),i.localize(6,null)],
default:"override",description:i.localize(7,null)},"http.systemCertificates":{type:"boolean",default:!0,description:i.localize(8,null)}}})})),define(e[102],t([0,1,103,9]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getProxyAgent=async function(t,r={}){const s=i.parse(t),o=r.proxyUrl||function(e){return"http:"===e.protocol?process.env.HTTP_PROXY||process.env.http_proxy||null:"https:"===e.protocol&&(process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy)||null}(s);if(!o)return null;const a=i.parse(o);if(!/^https?:$/.test(a.protocol||""))return null;const l={host:a.hostname||"",port:a.port||("https"===a.protocol?"443":"80"),auth:a.auth,rejectUnauthorized:!n.isBoolean(r.strictSSL)||r.strictSSL};return"http:"===s.protocol?new(await new Promise((t,i)=>{e(["http-proxy-agent"],t,i)}))(l):new(await new Promise((t,i)=>{e(["https-proxy-agent"],t,i)}))(l)}})),define(e[104],t([0,1,4]),(function(e,t,i){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0}),t.IStateService=i.createDecorator("stateService")})),define(e[105],t([0,1,2,18,25,8,9,12]),(function(e,t,r,s,o,a,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class u{constructor(e,t){this.dbPath=e,this.onError=t,this._database=null,this.lastFlushedSerializedDatabase=null}get database(){return this._database||(this._database=this.loadSync()),this._database}async init(){if(this._database)return;const e=await this.loadAsync();this._database||(this._database=e)}loadSync(){try{return this.lastFlushedSerializedDatabase=s.readFileSync(this.dbPath).toString(),JSON.parse(this.lastFlushedSerializedDatabase)}catch(e){return"ENOENT"!==e.code&&this.onError(e),{}}}async loadAsync(){try{return this.lastFlushedSerializedDatabase=(await a.readFile(this.dbPath)).toString(),JSON.parse(this.lastFlushedSerializedDatabase)}catch(e){return"ENOENT"!==e.code&&this.onError(e),{}}}getItem(e,t){const i=this.database[e];return l.isUndefinedOrNull(i)?t:i}setItem(e,t){
if(l.isUndefinedOrNull(t))return this.removeItem(e);("string"!=typeof t&&"number"!=typeof t&&"boolean"!=typeof t||this.database[e]!==t)&&(this.database[e]=t,this.saveSync())}removeItem(e){l.isUndefined(this.database[e])||(this.database[e]=void 0,this.saveSync())}saveSync(){const e=JSON.stringify(this.database,null,4);if(e!==this.lastFlushedSerializedDatabase)try{a.writeFileSync(this.dbPath,e),this.lastFlushedSerializedDatabase=e}catch(e){this.onError(e)}}}t.FileStorage=u;let h=class e{constructor(t,i){this.fileStorage=new u(r.join(t.userDataPath,e.STATE_FILE),e=>i.error(e))}init(){return this.fileStorage.init()}getItem(e,t){return this.fileStorage.getItem(e,t)}setItem(e,t){this.fileStorage.setItem(e,t)}removeItem(e){this.fileStorage.removeItem(e)}};h.STATE_FILE="storage.json",h=i([n(0,o.IEnvironmentService),n(1,c.ILogService)],h),t.StateService=h})),define(e[106],t([0,1,4,6,3,9]),(function(e,t,i,n,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),
t.IStorageService=i.createDecorator("storageService"),function(e){e[e.NONE=0]="NONE",e[e.SHUTDOWN=1]="SHUTDOWN"}(t.WillSaveStateReason||(t.WillSaveStateReason={})),function(e){e[e.GLOBAL=0]="GLOBAL",e[e.WORKSPACE=1]="WORKSPACE"}(t.StorageScope||(t.StorageScope={}));class o extends r.Disposable{constructor(){super(...arguments),this._onDidChangeStorage=this._register(new n.Emitter),this.onDidChangeStorage=this._onDidChangeStorage.event,this.onWillSaveState=n.Event.None,this.globalCache=new Map,this.workspaceCache=new Map}getCache(e){return 0===e?this.globalCache:this.workspaceCache}get(e,t,i){const n=this.getCache(t).get(e);return s.isUndefinedOrNull(n)?i:n}getBoolean(e,t,i){const n=this.getCache(t).get(e);return s.isUndefinedOrNull(n)?i:"true"===n}getNumber(e,t,i){const n=this.getCache(t).get(e);return s.isUndefinedOrNull(n)?i:parseInt(n,10)}store(e,t,i){if(s.isUndefinedOrNull(t))return this.remove(e,i);const n=String(t);return this.getCache(i).get(e)===n?Promise.resolve():(this.getCache(i).set(e,n),
this._onDidChangeStorage.fire({scope:i,key:e}),Promise.resolve())}remove(e,t){return this.getCache(t).delete(e)?(this._onDidChangeStorage.fire({scope:t,key:e}),Promise.resolve()):Promise.resolve()}logStorage(){a(this.globalCache,this.workspaceCache,"inMemory","inMemory")}async migrate(e){}}async function a(e,t,i,n){const r=e=>{try{return JSON.parse(e)}catch(t){return e}},s=new Map,o=new Map;e.forEach((e,t)=>{s.set(t,e),o.set(t,r(e))});const a=new Map,l=new Map;t.forEach((e,t)=>{a.set(t,e),l.set(t,r(e))}),console.group(`Storage: Global (path: ${i})`);let c=[];s.forEach((e,t)=>{c.push({key:t,value:e})}),console.table(c),console.groupEnd(),console.log(o),console.group(`Storage: Workspace (path: ${n})`);let u=[];a.forEach((e,t)=>{u.push({key:t,value:e})}),console.table(u),console.groupEnd(),console.log(l)}t.InMemoryStorageService=o,t.logStorage=a})),define(e[33],t([0,1,4]),(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITelemetryService=i.createDecorator("telemetryService"),
t.instanceStorageKey="telemetry.instanceId",t.currentSessionDateStorageKey="telemetry.currentSessionDate",t.firstSessionDateStorageKey="telemetry.firstSessionDate",t.lastSessionDateStorageKey="telemetry.lastSessionDate"})),define(e[108],t([0,1,19,29,30,10,33,54,55,25,56,31,26,12,23,24,16,50,106,4]),(function(e,t,r,s,o,a,l,c,u,h,d,f,g,p,m,v,y,E,S,w){"use strict";var b,C;function P(...e){return String(e.reduce((e,t)=>e|t,0))}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.None=0]="None",e[e.IncludeVersions=1]="IncludeVersions",e[e.IncludeFiles=2]="IncludeFiles",e[e.IncludeCategoryAndTags=4]="IncludeCategoryAndTags",e[e.IncludeSharedAccounts=8]="IncludeSharedAccounts",e[e.IncludeVersionProperties=16]="IncludeVersionProperties",e[e.ExcludeNonValidated=32]="ExcludeNonValidated",e[e.IncludeInstallationTargets=64]="IncludeInstallationTargets",e[e.IncludeAssetUri=128]="IncludeAssetUri",e[e.IncludeStatistics=256]="IncludeStatistics",e[e.IncludeLatestVersionOnly=512]="IncludeLatestVersionOnly",
e[e.Unpublished=4096]="Unpublished"}(b||(b={})),function(e){e[e.Tag=1]="Tag",e[e.ExtensionId=4]="ExtensionId",e[e.Category=5]="Category",e[e.ExtensionName=7]="ExtensionName",e[e.Target=8]="Target",e[e.Featured=9]="Featured",e[e.SearchText=10]="SearchText",e[e.ExcludeWithFlags=12]="ExcludeWithFlags"}(C||(C={}));const _={Icon:"Microsoft.VisualStudio.Services.Icons.Default",Details:"Microsoft.VisualStudio.Services.Content.Details",Changelog:"Microsoft.VisualStudio.Services.Content.Changelog",Manifest:"Microsoft.VisualStudio.Code.Manifest",VSIX:"Microsoft.VisualStudio.Services.VSIXPackage",License:"Microsoft.VisualStudio.Services.Content.License",Repository:"Microsoft.VisualStudio.Services.Links.Source"},x={Dependency:"Microsoft.VisualStudio.Code.ExtensionDependencies",ExtensionPack:"Microsoft.VisualStudio.Code.ExtensionPack",Engine:"Microsoft.VisualStudio.Code.Engine",LocalizedLanguages:"Microsoft.VisualStudio.Code.LocalizedLanguages"},I={pageNumber:1,pageSize:10,sortBy:0,sortOrder:0,flags:b.None,criteria:[],
assetTypes:[]};class O{constructor(e=I){this.state=e}get pageNumber(){return this.state.pageNumber}get pageSize(){return this.state.pageSize}get sortBy(){return this.state.sortBy}get sortOrder(){return this.state.sortOrder}get flags(){return this.state.flags}withPage(e,t=this.state.pageSize){return new O(a.assign({},this.state,{pageNumber:e,pageSize:t}))}withFilter(e,...t){const i=[...this.state.criteria,...t.map(t=>({filterType:e,value:t}))];return new O(a.assign({},this.state,{criteria:i}))}withSortBy(e){return new O(a.assign({},this.state,{sortBy:e}))}withSortOrder(e){return new O(a.assign({},this.state,{sortOrder:e}))}withFlags(...e){return new O(a.assign({},this.state,{flags:e.reduce((e,t)=>e|t,0)}))}withAssetTypes(...e){return new O(a.assign({},this.state,{assetTypes:e}))}get raw(){const{criteria:e,pageNumber:t,pageSize:i,sortBy:n,sortOrder:r,flags:s,assetTypes:o}=this.state;return{filters:[{criteria:e,pageNumber:t,pageSize:i,sortBy:n,sortOrder:r}],assetTypes:o,flags:s}}get searchText(){
const e=this.state.criteria.filter(e=>e.filterType===C.SearchText)[0];return e&&e.value?e.value:""}}function F(e,t){const i=(e||[]).filter(e=>e.statisticName===t)[0];return i?i.value:0}function D(e){return e.files.filter(e=>0===e.assetType.indexOf("Microsoft.VisualStudio.Code.Translation.")).reduce((t,i)=>{const n=k(e,i.assetType);return n&&t.push([i.assetType.substring("Microsoft.VisualStudio.Code.Translation.".length),n]),t},[])}function L(e){if(e.properties){const t=e.properties.filter(e=>e.key===_.Repository),i=new RegExp("((git|ssh|http(s)?)|(git@[w.]+))(:(//)?)([w.@:/-~]+)(.git)(/)?"),n=t.filter(e=>i.test(e.value))[0];return n?{uri:n.value,fallbackUri:n.value}:null}return k(e,_.Repository)}function R(e){return{uri:`${e.fallbackAssetUri}/${_.VSIX}?redirect=true`,fallbackUri:`${e.fallbackAssetUri}/${_.VSIX}`}}function T(t){const i=k(t,_.Icon);if(i)return i;const n=e.toUrl("./media/defaultIcon.png");return{uri:n,fallbackUri:n}}function k(e,t){return e.files.filter(e=>e.assetType===t)[0]?{
uri:`${e.assetUri}/${t}`,fallbackUri:`${e.fallbackAssetUri}/${t}`}:null}function A(e,t){const i=e.properties?e.properties.filter(e=>e.key===t):[],n=i.length>0&&i[0].value;return n?n.split(",").map(e=>o.adoptToGalleryExtensionId(e)):[]}function M(e){const t=e.properties?e.properties.filter(e=>e.key===x.Engine):[];return t.length>0&&t[0].value||""}function j(e){const t=e.properties?e.properties.filter(e=>e.key===x.LocalizedLanguages):[],i=t.length>0&&t[0].value||"";return i?i.split(","):[]}function N(e,t,i,n,r){const s={manifest:k(t,_.Manifest),readme:k(t,_.Details),changelog:k(t,_.Changelog),license:k(t,_.License),repository:L(t),download:R(t),icon:T(t),coreTranslations:D(t)};return{identifier:{id:o.getGalleryExtensionId(e.publisher.publisherName,e.extensionName),uuid:e.extensionId},name:e.extensionName,version:t.version,date:t.lastUpdated,displayName:e.displayName,publisherId:e.publisher.publisherId,publisher:e.publisher.publisherName,publisherDisplayName:e.publisher.displayName,
description:e.shortDescription||"",installCount:F(e.statistics,"install"),rating:F(e.statistics,"averagerating"),ratingCount:F(e.statistics,"ratingcount"),assets:s,properties:{dependencies:A(t,x.Dependency),extensionPack:A(t,x.ExtensionPack),engine:M(t),localizedLanguages:j(t)},telemetryData:{index:(n.pageNumber-1)*n.pageSize+i,searchText:n.searchText,querySource:r},preview:(a=e.flags,-1!==a.indexOf("preview"))};var a}let U=class{constructor(e,t,i,n,r,s,o){this.requestService=e,this.logService=t,this.environmentService=i,this.telemetryService=n,this.fileService=r,this.productService=s,this.storageService=o;const a=s.extensionsGallery;this.extensionsGalleryUrl=a&&a.serviceUrl,this.extensionsControlUrl=a&&a.controlUrl,this.commonHeadersPromise=z(s.version,this.environmentService,this.fileService,this.storageService)}api(e=""){return`${this.extensionsGalleryUrl}${e}`}isEnabled(){return!!this.extensionsGalleryUrl}getCompatibleExtension(e,t){const i=s.isIExtensionIdentifier(e)?null:e
;if(i&&i.properties.engine&&u.isEngineValid(i.properties.engine,this.productService.version))return Promise.resolve(i);const{id:n,uuid:r}=i?i.identifier:e;let o=(new O).withFlags(b.IncludeAssetUri,b.IncludeStatistics,b.IncludeFiles,b.IncludeVersionProperties,b.ExcludeNonValidated).withPage(1,1).withFilter(C.Target,"Microsoft.VisualStudio.Code").withFilter(C.ExcludeWithFlags,P(b.Unpublished));return o=r?o.withFilter(C.ExtensionId,r):o.withFilter(C.ExtensionName,n),this.queryGallery(o,g.CancellationToken.None).then(({galleryExtensions:e})=>{const[i]=e;if(!i||!i.versions.length)return null;if(t){const e=i.versions.filter(e=>e.version===t)[0];if(e){const t=N(i,e,0,o);if(t.properties.engine&&u.isEngineValid(t.properties.engine,this.productService.version))return t}return null}return this.getLastValidExtensionVersion(i,i.versions).then(e=>e?N(i,e,0,o):null)})}query(e,t){const i=g.CancellationToken.isCancellationToken(e)?{}:e,n=g.CancellationToken.isCancellationToken(e)?e:t
;if(!this.isEnabled())return Promise.reject(new Error("No extension gallery service configured."));const s=i.names?"ids":i.text?"text":"all";let o=i.text||"";const l=a.getOrDefault(i,e=>e.pageSize,50);this.telemetryService.publicLog2("galleryService:query",{type:s,text:o});let c=(new O).withFlags(b.IncludeLatestVersionOnly,b.IncludeAssetUri,b.IncludeStatistics,b.IncludeFiles,b.IncludeVersionProperties).withPage(1,l).withFilter(C.Target,"Microsoft.VisualStudio.Code").withFilter(C.ExcludeWithFlags,P(b.Unpublished));return o?((o=(o=(o=o.replace(/\bcategory:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g,(e,t,i)=>(c=c.withFilter(C.Category,i||t),""))).replace(/\btag:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g,(e,t,i)=>(c=c.withFilter(C.Tag,i||t),""))).trim())&&(o=o.length<200?o:o.substring(0,200),c=c.withFilter(C.SearchText,o)),c=c.withSortBy(0)):c=i.ids?c.withFilter(C.ExtensionId,...i.ids):i.names?c.withFilter(C.ExtensionName,...i.names):c.withSortBy(4),"number"==typeof i.sortBy&&(c=c.withSortBy(i.sortBy)),
"number"==typeof i.sortOrder&&(c=c.withSortOrder(i.sortOrder)),this.queryGallery(c,n).then(({galleryExtensions:e,total:t})=>{return{firstPage:e.map((e,t)=>N(e,e.versions[0],t,c,i.source)),total:t,pageSize:c.pageSize,getPage:(e,t)=>{if(t.isCancellationRequested)return Promise.reject(r.canceled());const n=c.withPage(e+1);return this.queryGallery(n,t).then(({galleryExtensions:e})=>e.map((e,t)=>N(e,e.versions[0],t,n,i.source)))}}})}queryGallery(e,t){return this.isEnabled()?this.commonHeadersPromise.then(i=>{const n=JSON.stringify(e.raw),r=a.assign({},i,{"Content-Type":"application/json",Accept:"application/json;api-version=3.0-preview.1","Accept-Encoding":"gzip","Content-Length":n.length});return this.requestService.request({type:"POST",url:this.api("/extensionquery"),data:n,headers:r},t).then(e=>e.res.statusCode&&e.res.statusCode>=400&&e.res.statusCode<500?{galleryExtensions:[],total:0}:c.asJson(e).then(e=>{if(e){
const t=e.results[0],i=t.extensions,n=t.resultMetadata&&t.resultMetadata.filter(e=>"ResultCount"===e.metadataType)[0];return{galleryExtensions:i,total:n&&n.metadataItems.filter(e=>"TotalCount"===e.name)[0].count||0}}return{galleryExtensions:[],total:0}}))}):Promise.reject(new Error("No extension gallery service configured."))}reportStatistic(e,t,i,n){return this.isEnabled()?this.commonHeadersPromise.then(r=>{const s=Object.assign(Object.assign({},r),{Accept:"*/*;api-version=4.0-preview.1"});return this.requestService.request({type:"POST",url:this.api(`/publishers/${e}/extensions/${t}/${i}/stats?statType=${n}`),headers:s},g.CancellationToken.None).then(void 0,()=>void 0)}):Promise.resolve(void 0)}download(e,t,i){this.logService.trace("ExtensionGalleryService#download",e.identifier.id);const n=v.joinPath(t,d.generateUuid()),r=o.getGalleryExtensionTelemetryData(e),s=(new Date).getTime(),l=e=>this.telemetryService.publicLog("galleryService:downloadVSIX",a.assign(r,{duration:e
})),c=1===i?"install":2===i?"update":"",u=c?{uri:`${e.assets.download.uri}&${c}=true`,fallbackUri:`${e.assets.download.fallbackUri}?${c}=true`}:e.assets.download;return this.getAsset(u).then(e=>this.fileService.writeFile(n,e.stream)).then(()=>l((new Date).getTime()-s)).then(()=>n)}getReadme(e,t){return e.assets.readme?this.getAsset(e.assets.readme,{},t).then(e=>c.asText(e)).then(e=>e||""):Promise.resolve("")}getManifest(e,t){return e.assets.manifest?this.getAsset(e.assets.manifest,{},t).then(c.asText).then(e=>e?JSON.parse(e):null):Promise.resolve(null)}getCoreTranslation(e,t){const i=e.assets.coreTranslations.filter(e=>e[0]===t.toUpperCase())[0];return i?this.getAsset(i[1]).then(c.asText).then(e=>e?JSON.parse(e):null):Promise.resolve(null)}getChangelog(e,t){return e.assets.changelog?this.getAsset(e.assets.changelog,{},t).then(e=>c.asText(e)).then(e=>e||""):Promise.resolve("")}getAllVersions(e,t){
let i=(new O).withFlags(b.IncludeVersions,b.IncludeFiles,b.IncludeVersionProperties,b.ExcludeNonValidated).withPage(1,1).withFilter(C.Target,"Microsoft.VisualStudio.Code").withFilter(C.ExcludeWithFlags,P(b.Unpublished));return i=e.identifier.uuid?i.withFilter(C.ExtensionId,e.identifier.uuid):i.withFilter(C.ExtensionName,e.identifier.id),this.queryGallery(i,g.CancellationToken.None).then(({galleryExtensions:e})=>e.length?t?Promise.all(e[0].versions.map(e=>this.getEngine(e).then(t=>u.isEngineValid(t,this.productService.version)?e:null))).then(e=>e.filter(e=>!!e).map(e=>({version:e.version,date:e.lastUpdated}))):e[0].versions.map(e=>({version:e.version,date:e.lastUpdated})):[])}getAsset(e,t={},i=g.CancellationToken.None){return this.commonHeadersPromise.then(n=>{const s=a.assign({},n,t.headers||{});t=a.assign({},t,{type:"GET"},{headers:s});const o=e.uri,l=e.fallbackUri,u=a.assign({},t,{url:o})
;return this.requestService.request(u,i).then(e=>200===e.res.statusCode?Promise.resolve(e):c.asText(e).then(t=>Promise.reject(new Error(`Expected 200, got back ${e.res.statusCode} instead.\n\n${t}`)))).then(void 0,e=>{if(r.isPromiseCanceledError(e))return Promise.reject(e);const n=r.getErrorMessage(e);this.telemetryService.publicLog2("galleryService:cdnFallback",{url:o,message:n});const s=a.assign({},t,{url:l});return this.requestService.request(s,i)})})}getLastValidExtensionVersion(e,t){const i=this.getLastValidExtensionVersionFromProperties(e,t);return i||this.getLastValidExtensionVersionRecursively(e,t)}getLastValidExtensionVersionFromProperties(e,t){for(const e of t){const t=M(e);if(!t)return null;if(u.isEngineValid(t,this.productService.version))return Promise.resolve(e)}return null}getEngine(e){const t=M(e);if(t)return Promise.resolve(t);const i=k(e,_.Manifest);if(!i)return Promise.reject("Manifest was not found");return this.getAsset(i,{headers:{"Accept-Encoding":"gzip"}
}).then(e=>c.asJson(e)).then(e=>e?e.engines.vscode:Promise.reject("Error while reading manifest"))}getLastValidExtensionVersionRecursively(e,t){if(!t.length)return Promise.resolve(null);const i=t[0];return this.getEngine(i).then(n=>u.isEngineValid(n,this.productService.version)?(i.properties=i.properties||[],i.properties.push({key:x.Engine,value:n}),i):this.getLastValidExtensionVersionRecursively(e,t.slice(1)))}getExtensionsReport(){return this.isEnabled()?this.extensionsControlUrl?this.requestService.request({type:"GET",url:this.extensionsControlUrl},g.CancellationToken.None).then(e=>200!==e.res.statusCode?Promise.reject(new Error("Could not get extensions report.")):c.asJson(e).then(e=>{const t=new Map;if(e)for(const i of e.malicious){const e=t.get(i)||{id:{id:i},malicious:!0,slow:!1};e.malicious=!0,t.set(i,e)}return Promise.resolve(f.values(t))})):Promise.resolve([]):Promise.reject(new Error("No extension gallery service configured."))}};async function z(e,t,i,n){const r={
"X-Market-Client-Id":`VSCode ${e}`,"User-Agent":`VSCode ${e}`};let s=null;if(t.galleryMachineIdResource){try{const e=(await i.readFile(t.galleryMachineIdResource)).value.toString();s=d.isUUID(e)?e:null}catch(e){s=null}if(!s){s=d.generateUuid();try{await i.writeFile(t.galleryMachineIdResource,y.VSBuffer.fromString(s))}catch(e){}}}return n&&((s=n.get("marketplace.userid",0)||null)||(s=d.generateUuid(),n.store("marketplace.userid",s,0))),s&&(r["X-Market-User-Id"]=s),r}U=i([n(0,c.IRequestService),n(1,p.ILogService),n(2,h.IEnvironmentService),n(3,l.ITelemetryService),n(4,m.IFileService),n(5,E.IProductService),n(6,w.optional(S.IStorageService))],U),t.ExtensionGalleryService=U,t.resolveMarketplaceHeaders=z})),define(e[110],t([0,1,117,11,4,21,27,3,10,20]),(function(e,t,r,s,o,a,l,c,u,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let d=class{constructor(e,t){this._configurationService=t,this._disposables=new c.DisposableStore,this._cleanupPatterns=[],this._appender=e.appender,
this._commonProperties=e.commonProperties||Promise.resolve({}),this._piiPaths=e.piiPaths||[],this._userOptIn=!0,this._enabled=!0,this._cleanupPatterns=[/file:\/\/\/.*?\/resources\/app\//gi];for(let e of this._piiPaths)this._cleanupPatterns.push(new RegExp(s.escapeRegExpCharacters(e),"gi"));this._configurationService&&(this._updateUserOptIn(),this._configurationService.onDidChangeConfiguration(this._updateUserOptIn,this,this._disposables),this.publicLog2("optInStatus",{optIn:this._userOptIn}),this._commonProperties.then(t=>{const i=/^[a-f0-9]+$/i.test(t["common.machineId"]);this.publicLog2("machineIdFallback",{usingFallbackGuid:!i}),e.trueMachineId&&this.publicLog2("machineIdDisambiguation",{correctedMachineId:e.trueMachineId})}))}setEnabled(e){this._enabled=e}_updateUserOptIn(){const e=this._configurationService.getValue(f);this._userOptIn=e?e.enableTelemetry:this._userOptIn}get isOptedIn(){return this._userOptIn&&this._enabled}async getTelemetryInfo(){const e=await this._commonProperties;return{
sessionId:e.sessionID,instanceId:e["common.instanceId"],machineId:e["common.machineId"],msftInternal:e["common.msftInternal"]}}dispose(){this._disposables.dispose()}publicLog(e,t,i){return this.isOptedIn?this._commonProperties.then(n=>{t=u.mixin(t,n),t=u.cloneAndChange(t,e=>{if("string"==typeof e)return this._cleanupInfo(e,i)}),this._appender.log(e,t)},e=>{console.error(e)}):Promise.resolve(void 0)}publicLog2(e,t,i){return this.publicLog(e,t,i)}_cleanupInfo(e,t){let i=e;if(t){const t=[];for(let i of this._cleanupPatterns)for(;;){const n=i.exec(e);if(!n)break;t.push([n.index,i.lastIndex])}const n=/^[\\\/]?(node_modules|node_modules\.asar)[\\\/]/,r=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-\._]+(\\\\|\\|\/))+[\w-\._]*/g;let s=0;for(i="";;){const o=r.exec(e);if(!o)break;!n.test(o[0])&&t.every(([e,t])=>o.index<e||o.index>=t)&&(i+=e.substring(s,o.index)+"<REDACTED: user-file-path>",s=r.lastIndex)}s<e.length&&(i+=e.substr(s))}for(let e of this._cleanupPatterns)i=i.replace(e,"");return i}}
;d.IDLE_START_EVENT_NAME="UserIdleStart",d.IDLE_STOP_EVENT_NAME="UserIdleStop",d=i([n(1,o.optional(a.IConfigurationService))],d),t.TelemetryService=d;const f="telemetry";h.Registry.as(l.Extensions.Configuration).registerConfiguration({id:f,order:110,type:"object",title:r.localize(0,null),properties:{"telemetry.enableTelemetry":{type:"boolean",description:r.localize(1,null),default:!0,tags:["usesOnlineServices"]}}})})),define(e[57],t([0,1,21,12,10,9]),(function(e,t,r,s,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NullTelemetryService=new class{constructor(){this.isOptedIn=!0}publicLog(e,t){return Promise.resolve(void 0)}publicLog2(e,t){return this.publicLog(e,t)}setEnabled(){}getTelemetryInfo(){return Promise.resolve({instanceId:"someValue.instanceId",sessionId:"someValue.sessionId",machineId:"someValue.machineId"})}},t.combinedAppender=function(...e){return{log:(t,i)=>e.forEach(e=>e.log(t,i)),flush:()=>Promise.all(e.map(e=>e.flush()))}},t.NullAppender={log:()=>null,
flush:()=>Promise.resolve(null)};let l=class{constructor(e){this._logService=e,this.commonPropertiesRegex=/^sessionID$|^version$|^timestamp$|^commitHash$|^common\./}flush(){return Promise.resolve(void 0)}log(e,t){const i={};Object.keys(t).forEach(e=>{this.commonPropertiesRegex.test(e)||(i[e]=t[e])}),this._logService.trace(`telemetry/${e}`,i)}};function c(e){if(!e)return[];const t=[];return function e(t,i,n){n&&"object"==typeof n&&!Array.isArray(n)?Object.keys(n).forEach(r=>e(t,i?`${i}.${r}`:r,n[r])):t.push(i)}(t,"",e),t}l=i([n(0,s.ILogService)],l),t.LogAppender=l,t.configurationTelemetry=function(e,t){return t.onDidChangeConfiguration(t=>{6!==t.source&&e.publicLog2("updateConfiguration",{configurationSource:r.ConfigurationTargetToString(t.source),configurationKeys:c(t.sourceConfig)})})},t.validateTelemetryData=function(e){const t=Object.create(null),i=Object.create(null),n=Object.create(null);!function e(t,i,n=0,r){if(!t)return;for(let s of Object.getOwnPropertyNames(t)){const l=t[s],c=r?r+s:s
;Array.isArray(l)?i[c]=o.safeStringify(l):l instanceof Date?i[c]=l.toISOString():a.isObject(l)?n<2?e(l,i,n+1,c+"."):i[c]=o.safeStringify(l):i[c]=l}}(e,n);for(let e in n){const r=n[e=e.length>150?e.substr(e.length-149):e];"number"==typeof r?i[e]=r:"boolean"==typeof r?i[e]=r?1:0:"string"==typeof r?t[e]=r.substring(0,1023):null!=r&&(t[e]=r)}return{properties:t,measurements:i}},t.cleanRemoteAuthority=function(e){if(!e)return"none";let t="other";return["ssh-remote","dev-container","attached-container","wsl"].forEach(i=>{0===e.indexOf(`${i}+`)&&(t=i)}),t}})),define(e[112],t([0,1,120,10,57,12]),(function(e,t,r,s,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let l=class{constructor(e,t,i,n){this._eventPrefix=e,this._defaultData=t,this._logService=n,this._defaultData||(this._defaultData=Object.create(null)),"string"==typeof i?this._aiClient=function(e){let t
;return r.defaultClient?(t=new r.TelemetryClient(e)).channel.setUseDiskRetryCaching(!0):(r.setup(e).setAutoCollectRequests(!1).setAutoCollectPerformance(!1).setAutoCollectExceptions(!1).setAutoCollectDependencies(!1).setAutoDependencyCorrelation(!1).setAutoCollectConsole(!1).setInternalLogging(!1,!1).setUseDiskRetryCaching(!0).start(),t=r.defaultClient),0===e.indexOf("AIF-")&&(t.config.endpointUrl="https://vortex.data.microsoft.com/collect/v1"),t}(i):"function"==typeof i&&(this._aiClient=i())}log(e,t){this._aiClient&&(t=s.mixin(t,this._defaultData),t=o.validateTelemetryData(t),this._logService&&this._logService.trace(`telemetry/${e}`,t),this._aiClient.trackEvent({name:this._eventPrefix+"/"+e,properties:t.properties,measurements:t.measurements}))}flush(){return this._aiClient?new Promise(e=>{this._aiClient.flush({callback:()=>{this._aiClient=void 0,e(void 0)}})}):Promise.resolve(void 0)}};l=i([n(3,a.ILogService)],l),t.AppInsightsAppender=l})),define(e[114],t([0,1,13,48,56,8]),(function(e,t,i,n,r,s){
"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveCommonProperties=async function(e,t,o,a,l,c){const u=Object.create(null);u["common.machineId"]=o,u.sessionID=r.generateUuid()+Date.now(),u.commitHash=e,u.version=t,u["common.platformVersion"]=(n.release()||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),u["common.platform"]=i.PlatformToString(i.platform),u["common.nodePlatform"]=process.platform,u["common.nodeArch"]=process.arch,u["common.product"]=c||"desktop";const h=function(e){if(!process||!process.env||!process.env.USERDNSDOMAIN)return!1;const t=process.env.USERDNSDOMAIN.toLowerCase();return e.some(e=>t===e)}(a||[]);h&&(u["common.msftInternal"]=h);let d=0;const f=Date.now();Object.defineProperties(u,{timestamp:{get:()=>new Date,enumerable:!0},"common.timesincesessionstart":{get:()=>Date.now()-f,enumerable:!0},"common.sequence":{get:()=>d++,enumerable:!0}}),"linux"===process.platform&&process.env.SNAP&&process.env.SNAP_REVISION&&(u["common.snap"]="true");try{
const e=await s.readFile(l,"utf8");u["common.source"]=e.slice(0,30)}catch(e){}return u}})),define(e[115],t([0,1,8,18,2]),(function(e,t,i,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildTelemetryMessage=function(e,t){const s=Object.create(null),o=(e,t)=>{const i=JSON.parse(e);s[t]=i};if(t){const e=i.readdirSync(t).filter(e=>{try{return n.statSync(r.join(t,e)).isDirectory()}catch(e){return!1}}),s=[];e.forEach(e=>{1===i.readdirSync(r.join(t,e)).filter(e=>"telemetry.json"===e).length&&s.push(e)}),s.forEach(e=>{const i=n.readFileSync(r.join(t,e,"telemetry.json")).toString();o(i,e)})}let a=n.readFileSync(r.join(e,"telemetry-core.json")).toString();return o(a,"vscode-core"),a=n.readFileSync(r.join(e,"telemetry-extensions.json")).toString(),o(a,"vscode-extensions"),JSON.stringify(s,null,4)}})),define(e[58],t([0,1,91,2,18,14,8,119,118,6]),(function(e,t,i,n,r,s,o,a,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class u extends Error{constructor(e,t){let i=t.message
;switch(e){case"CorruptZip":i=`Corrupt ZIP: ${i}`}super(i),this.type=e,this.cause=t}}function h(e){if(e instanceof u)return e;let t=void 0;return/end of central directory record signature not found/.test(e.message)&&(t="CorruptZip"),new u(t,e)}function d(e,t,a,l){let h=s.createCancelablePromise(()=>Promise.resolve()),d=0;return c.Event.once(l.onCancellationRequested)(()=>{h.cancel(),e.close()}),new Promise((f,p)=>{const m=new s.Sequencer,v=t=>{t.isCancellationRequested||(d++,e.readEntry())};e.once("error",p),e.once("close",()=>h.then(()=>{l.isCancellationRequested||e.entryCount===d?f():p(new u("Incomplete",new Error(i.localize(1,null,d,e.entryCount))))},p)),e.readEntry(),e.on("entry",u=>{if(l.isCancellationRequested)return;if(!a.sourcePathRegex.test(u.fileName))return void v(l);const d=u.fileName.replace(a.sourcePathRegex,"");if(/\/$/.test(d)){const e=n.join(t,d);return void(h=s.createCancelablePromise(t=>o.mkdirp(e).then(()=>v(t)).then(void 0,p)))}const f=g(e,u),y=function(e){
const t=e.externalFileAttributes>>16||33188;return[448,56,7].map(e=>t&e).reduce((e,t)=>e+t,61440&t)}(u);h=s.createCancelablePromise(e=>m.queue(()=>f.then(s=>(function(e,t,s,a,l,u){const h=n.dirname(t),d=n.join(a,h);if(0!==d.indexOf(a))return Promise.reject(new Error(i.localize(0,null,t)));const f=n.join(a,t);let g;return c.Event.once(u.onCancellationRequested)(()=>{g&&g.destroy()}),Promise.resolve(o.mkdirp(d)).then(()=>new Promise((t,i)=>{if(!u.isCancellationRequested)try{(g=r.createWriteStream(f,{mode:s})).once("close",()=>t()),g.once("error",i),e.once("error",i),e.pipe(g)}catch(e){i(e)}}))})(s,d,y,t,0,e).then(()=>v(e)))).then(null,p))})})}function f(e,t=!1){return new Promise((i,n)=>{a.open(e,t?{lazyEntries:!0}:void 0,(e,t)=>{e?n(h(e)):i(t)})})}function g(e,t){return new Promise((i,n)=>{e.openReadStream(t,(e,t)=>{e?n(h(e)):i(t)})})}t.ExtractError=u,t.zip=function(e,t){return new Promise((i,n)=>{const s=new l.ZipFile;t.forEach(e=>{
e.contents?s.addBuffer("string"==typeof e.contents?Buffer.from(e.contents,"utf8"):e.contents,e.path):e.localPath&&s.addFile(e.localPath,e.path)}),s.end();const o=r.createWriteStream(e);s.outputStream.pipe(o),s.outputStream.once("error",n),o.once("error",n),o.once("finish",()=>i(e))})},t.extract=function(e,t,i={},n){const r=new RegExp(i.sourcePath?`^${i.sourcePath}`:"");let s=f(e,!0);return i.overwrite&&(s=s.then(e=>o.rimraf(t).then(()=>e))),s.then(e=>d(e,t,{sourcePathRegex:r},n))},t.buffer=function(e,t){return function(e,t){return f(e).then(e=>new Promise((n,r)=>{e.on("entry",i=>{i.fileName===t&&g(e,i).then(e=>n(e),e=>r(e))}),e.once("close",()=>r(new Error(i.localize(2,null,t))))}))}(e,t).then(e=>new Promise((t,i)=>{const n=[];e.once("error",i),e.on("data",e=>n.push(e)),e.on("end",()=>t(Buffer.concat(n)))}))}})),define(e[59],t([0,1,58,97]),(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getManifest=function(e){return i.buffer(e,"extension/package.json").then(e=>{try{
return JSON.parse(e.toString("utf8"))}catch(e){throw new Error(n.localize(0,null))}})}})),define(e[113],t([0,1,95,2,8,10,3,28,58,29,30,60,25,14,6,76,15,34,13,12,65,61,43,33,55,48,56,75,4,17,26,22,59]),(function(e,t,r,s,o,a,l,c,u,h,d,f,g,p,m,v,y,E,S,w,b,C,P,_,x,I,O,F,D,L,R,T,k){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class A extends Error{constructor(e,t){super(e),this.code=t}}function M(e){return new Promise((t,i)=>{try{const i=JSON.parse(e),n=i.__metadata||null;delete i.__metadata,t({manifest:i,metadata:n})}catch(e){i(new Error(r.localize(0,null)))}})}t.ExtensionManagementError=A;let j=class extends l.Disposable{constructor(e,t,i,n,r){super(),this.environmentService=e,this.galleryService=t,this.logService=i,this.downloadService=n,this.telemetryService=r,this.lastReportTimestamp=0,this.installingExtensions=new Map,this.uninstallingExtensions=new Map,this._onInstallExtension=this._register(new m.Emitter),this.onInstallExtension=this._onInstallExtension.event,
this._onDidInstallExtension=this._register(new m.Emitter),this.onDidInstallExtension=this._onDidInstallExtension.event,this._onUninstallExtension=this._register(new m.Emitter),this.onUninstallExtension=this._onUninstallExtension.event,this._onDidUninstallExtension=this._register(new m.Emitter),this.onDidUninstallExtension=this._onDidUninstallExtension.event,this._devSystemExtensionsPath=null,this._devSystemExtensionsFilePath=null,this.systemExtensionsPath=e.builtinExtensionsPath,this.extensionsPath=e.extensionsPath,this.uninstalledPath=s.join(this.extensionsPath,".obsolete"),this.uninstalledFileLimiter=new p.Queue,this.manifestCache=this._register(new b.ExtensionsManifestCache(e,this)),this.extensionLifecycle=this._register(new C.ExtensionsLifecycle(e,this.logService)),this._register(l.toDisposable(()=>{this.installingExtensions.forEach(e=>e.cancel()),this.uninstallingExtensions.forEach(e=>e.cancel()),this.installingExtensions.clear(),this.uninstallingExtensions.clear()}))}zip(e){
return this.logService.trace("ExtensionManagementService#zip",e.identifier.id),this.collectFiles(e).then(e=>u.zip(s.join(I.tmpdir(),O.generateUuid()),e)).then(e=>y.URI.file(e))}unzip(e,t){return this.logService.trace("ExtensionManagementService#unzip",e.toString()),this.install(e,t).then(e=>e.identifier)}async getManifest(e){const t=await this.downloadVsix(e),i=s.resolve(t.fsPath);return k.getManifest(i)}collectFiles(e){const t=async e=>{let i=await o.readdir(e);i=i.map(t=>s.join(e,t));const n=await Promise.all(i.map(e=>o.stat(e)));let r=Promise.resolve([]);return n.forEach((e,n)=>{const s=i[n];e.isFile()&&(r=r.then(e=>[...e,s])),e.isDirectory()&&(r=r.then(e=>t(s).then(t=>[...e,...t])))}),r};return t(e.location.fsPath).then(t=>t.map(t=>({path:`extension/${s.relative(e.location.fsPath,t)}`,localPath:t})))}install(e,t=1){return this.logService.trace("ExtensionManagementService#install",e.toString()),p.createCancelablePromise(i=>this.downloadVsix(e).then(e=>{const n=s.resolve(e.fsPath)
;return k.getManifest(n).then(e=>{const s={id:d.getGalleryExtensionId(e.publisher,e.name)};let o=1;if(e.engines&&e.engines.vscode&&!x.isEngineValid(e.engines.vscode,E.default.version))return Promise.reject(new Error(r.localize(1,null,s.id,E.default.version)));const a=new d.ExtensionIdentifierWithVersion(s,e.version);return this.getInstalled(1).then(t=>{const i=t.filter(e=>d.areSameExtensions(s,e.identifier))[0];return i?(o=2,a.equals(new d.ExtensionIdentifierWithVersion(i.identifier,i.manifest.version))?this.removeExtension(i,"existing").then(null,t=>Promise.reject(new Error(r.localize(2,null,e.displayName||e.name)))):v.gt(i.manifest.version,e.version)?this.uninstall(i,!0):void 0):this.unsetUninstalledAndGetLocal(a).then(t=>{if(t)return this.removeExtension(t,"existing").then(null,t=>Promise.reject(new Error(r.localize(3,null,e.displayName||e.name))))})}).then(()=>(this.logService.info("Installing the extension:",s.id),this._onInstallExtension.fire({identifier:s,zipPath:n}),
this.getMetadata(d.getGalleryExtensionId(e.publisher,e.name)).then(e=>this.installFromZipPath(a,n,e,t,o,i),()=>this.installFromZipPath(a,n,null,t,o,i)).then(e=>(this.logService.info("Successfully installed the extension:",s.id),e),e=>(this.logService.error("Failed to install the extension:",s.id,e.message),Promise.reject(e)))))})}))}downloadVsix(e){if(e.scheme===L.Schemas.file)return Promise.resolve(e);if(!this.downloadService)throw new Error("Download service is not available");const t=s.join(I.tmpdir(),O.generateUuid());return this.downloadService.download(e,y.URI.file(t)).then(()=>y.URI.file(t))}installFromZipPath(e,t,i,n,r,s){return this.toNonCancellablePromise(this.installExtension({zipPath:t,identifierWithVersion:e,metadata:i},n,s).then(e=>this.installDependenciesAndPackExtensions(e,null).then(()=>e,t=>(c.isNonEmptyArray(e.manifest.extensionDependencies)&&this.logService.warn("Cannot install dependencies of extension:",e.identifier.id,t.message),
c.isNonEmptyArray(e.manifest.extensionPack)&&this.logService.warn("Cannot install packed extensions of extension:",e.identifier.id,t.message),e))).then(i=>(this._onDidInstallExtension.fire({identifier:e.identifier,zipPath:t,local:i,operation:r}),i),i=>(this._onDidInstallExtension.fire({identifier:e.identifier,zipPath:t,operation:r,error:i}),Promise.reject(i))))}async installFromGallery(e){if(!this.galleryService.isEnabled())return Promise.reject(new Error(r.localize(4,null)));const t=(new Date).getTime(),i=(e,i,n)=>{this.logService.info("Extensions installed successfully:",e.identifier.id),this._onDidInstallExtension.fire({identifier:e.identifier,gallery:e,local:n,operation:i}),this.reportTelemetry(this.getTelemetryEvent(i),d.getGalleryExtensionTelemetryData(e),(new Date).getTime()-t,void 0)},n=(e,i,n)=>{const r=n&&n.code?n.code:"unknown";this.logService.error("Failed to install extension:",e.identifier.id,n?n.message:r),this._onDidInstallExtension.fire({identifier:e.identifier,gallery:e,operation:i,error:r
}),this.reportTelemetry(this.getTelemetryEvent(i),d.getGalleryExtensionTelemetryData(e),(new Date).getTime()-t,n),n instanceof Error&&(n.name=r)};try{e=await this.checkAndGetCompatibleVersion(e)}catch(t){return n(e,1,t),Promise.reject(t)}const s=new d.ExtensionIdentifierWithVersion(e.identifier,e.version).key();let a=this.installingExtensions.get(s);if(!a){this.logService.info("Installing extension:",e.identifier.id),this._onInstallExtension.fire({identifier:e.identifier,gallery:e});let t,r,l,c=1;a=p.createCancelablePromise(e=>(t=e,new Promise((e,t)=>{r=e,l=t}))),this.installingExtensions.set(s,a);try{const a=(await this.getInstalled(1)).filter(t=>d.areSameExtensions(t.identifier,e.identifier))[0];a&&(c=2),this.downloadInstallableExtension(e,c).then(e=>this.installExtension(e,1,t).then(t=>o.rimraf(e.zipPath).finally(()=>null).then(()=>t))).then(e=>this.installDependenciesAndPackExtensions(e,a).then(()=>e,t=>this.uninstall(e,!0).then(()=>Promise.reject(t),()=>Promise.reject(t)))).then(async t=>{
a&&v.neq(a.manifest.version,e.version)&&await this.setUninstalled(a),this.installingExtensions.delete(s),i(e,c,t),r(t)},t=>{this.installingExtensions.delete(s),n(e,c,t),l(t)})}catch(t){return this.installingExtensions.delete(s),n(e,c,t),Promise.reject(t)}}return a}async checkAndGetCompatibleVersion(e){if(await this.isMalicious(e))return Promise.reject(new A(r.localize(5,null),h.INSTALL_ERROR_MALICIOUS));const t=await this.galleryService.getCompatibleExtension(e);return t||Promise.reject(new A(r.localize(6,null,e.identifier.id,E.default.version),h.INSTALL_ERROR_INCOMPATIBLE))}reinstallFromGallery(e){return this.logService.trace("ExtensionManagementService#reinstallFromGallery",e.identifier.id),
this.galleryService.isEnabled()?this.findGalleryExtension(e).then(t=>t?this.setUninstalled(e).then(()=>this.removeUninstalledExtension(e).then(()=>this.installFromGallery(t).then(),e=>Promise.reject(new Error(r.localize(8,null,P.toErrorMessage(e)))))):Promise.reject(new Error(r.localize(9,null)))):Promise.reject(new Error(r.localize(7,null)))}getTelemetryEvent(e){return 2===e?"extensionGallery:update":"extensionGallery:install"}isMalicious(e){return this.getExtensionsReport().then(t=>d.getMaliciousExtensionsSet(t).has(e.identifier.id))}downloadInstallableExtension(e,t){const i={id:e.identifier.uuid,publisherId:e.publisherId,publisherDisplayName:e.publisherDisplayName};return this.logService.trace("Started downloading extension:",e.identifier.id),this.galleryService.download(e,y.URI.file(I.tmpdir()),t).then(t=>{const n=t.fsPath;return this.logService.info("Downloaded extension:",e.identifier.id,n),k.getManifest(n).then(t=>({zipPath:n,
identifierWithVersion:new d.ExtensionIdentifierWithVersion(e.identifier,t.version),metadata:i}),e=>Promise.reject(new A(this.joinErrors(e).message,"validating")))},e=>Promise.reject(new A(this.joinErrors(e).message,"downloading")))}installExtension(e,t,i){return this.unsetUninstalledAndGetLocal(e.identifierWithVersion).then(n=>n||this.extractAndInstall(e,t,i),e=>S.isMacintosh?Promise.reject(new A(r.localize(10,null),"unsetUninstalled")):Promise.reject(new A(r.localize(11,null),"unsetUninstalled")))}unsetUninstalledAndGetLocal(e){return this.isUninstalled(e).then(t=>t?(this.logService.trace("Removing the extension from uninstalled list:",e.identifier.id),this.unsetUninstalled(e).then(()=>(this.logService.info("Removed the extension from uninstalled list:",e.identifier.id),this.getInstalled(1))).then(t=>t.filter(t=>new d.ExtensionIdentifierWithVersion(t.identifier,t.manifest.version).equals(e))[0])):null)}extractAndInstall({zipPath:e,identifierWithVersion:t,metadata:i},n,a){
const{identifier:l}=t,c=1===n?this.extensionsPath:this.systemExtensionsPath,u=t.key(),h=s.join(c,`.${u}`),d=s.join(c,u);return o.rimraf(d).then(()=>this.extractAndRename(l,e,h,d,a),e=>Promise.reject(new A(r.localize(12,null,d,l.id),"deleting"))).then(()=>this.scanExtension(u,c,n)).then(e=>e?(this.logService.info("Installation completed.",l.id),i?(this.setMetadata(e,i),this.saveMetadataForLocalExtension(e)):e):Promise.reject(r.localize(13,null,c)),e=>o.rimraf(d).then(()=>Promise.reject(e),()=>Promise.reject(e)))}extractAndRename(e,t,i,n,r){return this.extract(e,t,i,r).then(()=>this.rename(e,i,n,Date.now()+12e4).then(()=>this.logService.info("Renamed to",n),e=>(this.logService.info("Rename failed. Deleting from extracted location",i),o.rimraf(i).finally(()=>null).then(()=>Promise.reject(e)))))}extract(e,t,i,n){return this.logService.trace(`Started extracting the extension from ${t} to ${i}`),o.rimraf(i).then(()=>u.extract(t,i,{sourcePath:"extension",overwrite:!0
},n).then(()=>this.logService.info(`Extracted extension to ${i}:`,e.id),e=>o.rimraf(i).finally(()=>null).then(()=>Promise.reject(new A(e.message,e instanceof u.ExtractError&&e.type?e.type:"extracting")))),e=>Promise.reject(new A(this.joinErrors(e).message,"deleting")))}rename(e,t,i,n){return o.rename(t,i).then(void 0,s=>S.isWindows&&s&&"EPERM"===s.code&&Date.now()<n?(this.logService.info(`Failed renaming ${t} to ${i} with 'EPERM' error. Trying again...`,e.id),this.rename(e,t,i,n)):Promise.reject(new A(s.message||r.localize(14,null,t,i),s.code||"renaming")))}async installDependenciesAndPackExtensions(e,t){if(this.galleryService.isEnabled()){const i=e.manifest.extensionDependencies||[];if(e.manifest.extensionPack)for(const n of e.manifest.extensionPack)t&&t.manifest.extensionPack&&t.manifest.extensionPack.some(e=>d.areSameExtensions({id:e},{id:n}))||i.every(e=>!d.areSameExtensions({id:e},{id:n}))&&i.push(n);if(i.length)return this.getInstalled().then(e=>{
const t=i.filter(t=>e.every(({identifier:e})=>!d.areSameExtensions(e,{id:t})));if(t.length)return this.galleryService.query({names:t,pageSize:i.length},R.CancellationToken.None).then(e=>{const t=e.firstPage;return Promise.all(t.map(e=>this.installFromGallery(e))).then(void 0,e=>this.rollback(t).then(()=>Promise.reject(e),()=>Promise.reject(e)))})})}return Promise.resolve(void 0)}rollback(e){return this.getInstalled(1).then(t=>Promise.all(t.filter(t=>e.some(e=>new d.ExtensionIdentifierWithVersion(t.identifier,t.manifest.version).equals(new d.ExtensionIdentifierWithVersion(e.identifier,e.version)))).map(e=>this.uninstall(e,!0)))).then(()=>void 0,()=>void 0)}uninstall(e,t=!1){return this.logService.trace("ExtensionManagementService#uninstall",e.identifier.id),this.toNonCancellablePromise(this.getInstalled(1).then(t=>{const i=t.filter(t=>d.areSameExtensions(t.identifier,e.identifier))[0]
;return i?this.checkForDependenciesAndUninstall(i,t).then(void 0,e=>Promise.reject(this.joinErrors(e))):Promise.reject(new Error(r.localize(15,null,e.manifest.displayName||e.manifest.name)))}))}updateMetadata(e,t){return this.logService.trace("ExtensionManagementService#updateMetadata",e.identifier.id),e.metadata=t,this.saveMetadataForLocalExtension(e).then(e=>(this.manifestCache.invalidate(),e))}saveMetadataForLocalExtension(e){if(!e.metadata)return Promise.resolve(e);const t=s.join(e.location.fsPath,"package.json");return o.readFile(t,"utf8").then(e=>M(e)).then(({manifest:t})=>a.assign(t,{__metadata:e.metadata})).then(e=>o.writeFile(t,JSON.stringify(e,null,"\t"))).then(()=>e)}getMetadata(e){return this.findGalleryExtensionByName(e).then(e=>e?{id:e.identifier.uuid,publisherDisplayName:e.publisherDisplayName,publisherId:e.publisherId}:null)}findGalleryExtension(e){
return e.identifier.uuid?this.findGalleryExtensionById(e.identifier.uuid).then(t=>t||this.findGalleryExtensionByName(e.identifier.id)):this.findGalleryExtensionByName(e.identifier.id)}findGalleryExtensionById(e){return this.galleryService.query({ids:[e],pageSize:1},R.CancellationToken.None).then(e=>e.firstPage[0])}findGalleryExtensionByName(e){return this.galleryService.query({names:[e],pageSize:1},R.CancellationToken.None).then(e=>e.firstPage[0])}joinErrors(e){const t=Array.isArray(e)?e:[e];return 1===t.length?t[0]instanceof Error?t[0]:new Error(t[0]):t.reduce((e,t)=>new Error(`${e.message}${e.message?",":""}${t instanceof Error?t.message:t}`),new Error(""))}checkForDependenciesAndUninstall(e,t){return this.preUninstallExtension(e).then(()=>{const i=this.getAllPackExtensionsToUninstall(e,t);return i.length?this.uninstallExtensions(e,i,t):this.uninstallExtensions(e,[],t)}).then(()=>this.postUninstallExtension(e),t=>(this.postUninstallExtension(e,new A(t instanceof Error?t.message:t,"local")),
Promise.reject(t)))}uninstallExtensions(e,t,i){const n=this.getDependents(e,i);if(n.length){const i=n.filter(i=>e!==i&&-1===t.indexOf(i));if(i.length)return Promise.reject(new Error(this.getDependentsErrorMessage(e,i)))}return Promise.all([this.uninstallExtension(e),...t.map(e=>this.doUninstall(e))]).then(()=>void 0)}getDependentsErrorMessage(e,t){return 1===t.length?r.localize(16,null,e.manifest.displayName||e.manifest.name,t[0].manifest.displayName||t[0].manifest.name):2===t.length?r.localize(17,null,e.manifest.displayName||e.manifest.name,t[0].manifest.displayName||t[0].manifest.name,t[1].manifest.displayName||t[1].manifest.name):r.localize(18,null,e.manifest.displayName||e.manifest.name,t[0].manifest.displayName||t[0].manifest.name,t[1].manifest.displayName||t[1].manifest.name)}getAllPackExtensionsToUninstall(e,t,i=[]){if(-1!==i.indexOf(e))return[];i.push(e);const n=e.manifest.extensionPack?e.manifest.extensionPack:[];if(n.length){const e=t.filter(e=>n.some(t=>d.areSameExtensions({id:t
},e.identifier))),r=[];for(const n of e)r.push(...this.getAllPackExtensionsToUninstall(n,t,i));return[...e,...r]}return[]}getDependents(e,t){return t.filter(t=>t.manifest.extensionDependencies&&t.manifest.extensionDependencies.some(t=>d.areSameExtensions({id:t},e.identifier)))}doUninstall(e){return this.preUninstallExtension(e).then(()=>this.uninstallExtension(e)).then(()=>this.postUninstallExtension(e),t=>(this.postUninstallExtension(e,new A(t instanceof Error?t.message:t,"local")),Promise.reject(t)))}preUninstallExtension(e){return Promise.resolve(o.exists(e.location.fsPath)).then(e=>e?null:Promise.reject(new Error(r.localize(19,null)))).then(()=>{this.logService.info("Uninstalling extension:",e.identifier.id),this._onUninstallExtension.fire(e.identifier)})}uninstallExtension(e){let t=this.uninstallingExtensions.get(e.identifier.id);return t||(t=p.createCancelablePromise(t=>this.scanUserExtensions(!1).then(t=>this.setUninstalled(...t.filter(t=>d.areSameExtensions(t.identifier,e.identifier)))).then(()=>{
this.uninstallingExtensions.delete(e.identifier.id)})),this.uninstallingExtensions.set(e.identifier.id,t)),t}async postUninstallExtension(e,t){t?this.logService.error("Failed to uninstall extension:",e.identifier.id,t.message):(this.logService.info("Successfully uninstalled extension:",e.identifier.id),e.identifier.uuid&&await this.galleryService.reportStatistic(e.manifest.publisher,e.manifest.name,e.manifest.version,"uninstall")),this.reportTelemetry("extensionGallery:uninstall",d.getLocalExtensionTelemetryData(e),void 0,t);const i=t?t instanceof A?t.code:"unknown":void 0;this._onDidUninstallExtension.fire({identifier:e.identifier,error:i})}getInstalled(e=null){const t=[];return null!==e&&0!==e||t.push(this.scanSystemExtensions().then(null,e=>Promise.reject(new A(this.joinErrors(e).message,"scanningSystem")))),null!==e&&1!==e||t.push(this.scanUserExtensions(!0).then(null,e=>Promise.reject(new A(this.joinErrors(e).message,"scanningUser")))),Promise.all(t).then(c.flatten,e=>Promise.reject(this.joinErrors(e)))}
scanSystemExtensions(){this.logService.trace("Started scanning system extensions");const e=this.scanExtensions(this.systemExtensionsPath,0).then(e=>(this.logService.trace("Scanned system extensions:",e.length),e));if(this.environmentService.isBuilt)return e;const t=this.getDevSystemExtensionsList().then(e=>e.length?this.scanExtensions(this.devSystemExtensionsPath,0).then(t=>(this.logService.trace("Scanned dev system extensions:",t.length),t.filter(t=>e.some(e=>d.areSameExtensions(t.identifier,{id:e}))))):[]);return Promise.all([e,t]).then(([e,t])=>[...e,...t])}scanUserExtensions(e){return this.logService.trace("Started scanning user extensions"),Promise.all([this.getUninstalledExtensions(),this.scanExtensions(this.extensionsPath,1)]).then(([t,i])=>{if(i=i.filter(e=>!t[new d.ExtensionIdentifierWithVersion(e.identifier,e.manifest.version).key()]),e){i=d.groupByExtension(i,e=>e.identifier).map(e=>e.sort((e,t)=>v.rcompare(e.manifest.version,t.manifest.version))[0])}
return this.logService.trace("Scanned user extensions:",i.length),i})}scanExtensions(e,t){const i=new p.Limiter(10);return o.readdir(e).then(n=>Promise.all(n.map(n=>i.queue(()=>this.scanExtension(n,e,t))))).then(e=>e.filter(e=>e&&e.identifier))}scanExtension(e,t,i){if(1===i&&0===e.indexOf("."))return Promise.resolve(null);const n=s.join(t,e);return o.readdir(n).then(e=>(function(e){const t=[o.readFile(s.join(e,"package.json"),"utf8").then(e=>M(e)),o.readFile(s.join(e,"package.nls.json"),"utf8").then(void 0,e=>"ENOENT"!==e.code?Promise.reject(e):"{}").then(e=>JSON.parse(e))];return Promise.all(t).then(([{manifest:e,metadata:t},i])=>({manifest:f.localizeManifest(e,i),metadata:t}))})(n).then(({manifest:t,metadata:r})=>{const o=e.filter(e=>/^readme(\.txt|\.md|)$/i.test(e))[0],a=o?y.URI.file(s.join(n,o)):null,l=e.filter(e=>/^changelog(\.txt|\.md|)$/i.test(e))[0],c=l?y.URI.file(s.join(n,l)):null,u={id:d.getGalleryExtensionId(t.publisher,t.name)},h={type:i,identifier:u,manifest:t,metadata:r,location:y.URI.file(n),
readmeUrl:a,changelogUrl:c};return r&&this.setMetadata(h,r),h})).then(void 0,()=>null)}setMetadata(e,t){e.metadata=t,e.identifier.uuid=t.id}async removeDeprecatedExtensions(){await this.removeUninstalledExtensions(),await this.removeOutdatedExtensions()}async removeUninstalledExtensions(){const e=await this.getUninstalledExtensions(),t=await this.scanExtensions(this.extensionsPath,1),i=new Set;for(const n of t)e[new d.ExtensionIdentifierWithVersion(n.identifier,n.manifest.version).key()]||i.add(n.identifier.id.toLowerCase());const n=d.groupByExtension(t,e=>e.identifier);await Promise.all(n.map(async e=>{const t=e.sort((e,t)=>v.rcompare(e.manifest.version,t.manifest.version))[0];i.has(t.identifier.id.toLowerCase())||await this.extensionLifecycle.postUninstall(t)}));const r=t.filter(t=>e[new d.ExtensionIdentifierWithVersion(t.identifier,t.manifest.version).key()]);await Promise.all(r.map(e=>this.removeUninstalledExtension(e)))}removeOutdatedExtensions(){
return this.scanExtensions(this.extensionsPath,1).then(e=>{const t=[],i=d.groupByExtension(e,e=>e.identifier);return t.push(...c.flatten(i.map(e=>e.sort((e,t)=>v.rcompare(e.manifest.version,t.manifest.version)).slice(1)))),Promise.all(t.map(e=>this.removeExtension(e,"outdated")))}).then(()=>void 0)}removeUninstalledExtension(e){return this.removeExtension(e,"uninstalled").then(()=>this.withUninstalledExtensions(t=>delete t[new d.ExtensionIdentifierWithVersion(e.identifier,e.manifest.version).key()])).then(()=>void 0)}removeExtension(e,t){return this.logService.trace(`Deleting ${t} extension from disk`,e.identifier.id,e.location.fsPath),o.rimraf(e.location.fsPath).then(()=>this.logService.info("Deleted from disk",e.identifier.id,e.location.fsPath))}isUninstalled(e){return this.filterUninstalled(e).then(e=>1===e.length)}filterUninstalled(...e){return this.withUninstalledExtensions(t=>{const i=[];for(const n of e)t[n.key()]&&i.push(n.key());return i})}setUninstalled(...e){
const t=e.map(e=>new d.ExtensionIdentifierWithVersion(e.identifier,e.manifest.version));return this.withUninstalledExtensions(e=>a.assign(e,t.reduce((e,t)=>(e[t.key()]=!0,e),{})))}unsetUninstalled(e){return this.withUninstalledExtensions(t=>delete t[e.key()])}getUninstalledExtensions(){return this.withUninstalledExtensions(e=>e)}async withUninstalledExtensions(e){return await this.uninstalledFileLimiter.queue(()=>{let t=null;return o.readFile(this.uninstalledPath,"utf8").then(void 0,e=>"ENOENT"===e.code?Promise.resolve("{}"):Promise.reject(e)).then(e=>{try{return JSON.parse(e)}catch(e){return{}}}).then(i=>(t=e(i),i)).then(e=>{if(0===Object.keys(e).length)return o.rimraf(this.uninstalledPath);{const t=JSON.stringify(e);return o.writeFile(this.uninstalledPath,t)}}).then(()=>t)})}getExtensionsReport(){const e=(new Date).getTime();return(!this.reportedExtensions||e-this.lastReportTimestamp>3e5)&&(this.reportedExtensions=this.updateReportCache(),this.lastReportTimestamp=e),this.reportedExtensions}
updateReportCache(){return this.logService.trace("ExtensionManagementService.refreshReportedCache"),this.galleryService.getExtensionsReport().then(e=>(this.logService.trace(`ExtensionManagementService.refreshReportedCache - got ${e.length} reported extensions from service`),e),e=>(this.logService.trace("ExtensionManagementService.refreshReportedCache - failed to get extension report"),[]))}get devSystemExtensionsPath(){return this._devSystemExtensionsPath||(this._devSystemExtensionsPath=s.normalize(s.join(T.getPathFromAmdModule(e,""),"..",".build","builtInExtensions"))),this._devSystemExtensionsPath}get devSystemExtensionsFilePath(){return this._devSystemExtensionsFilePath||(this._devSystemExtensionsFilePath=s.normalize(s.join(T.getPathFromAmdModule(e,""),"..","build","builtInExtensions.json"))),this._devSystemExtensionsFilePath}getDevSystemExtensionsList(){return o.readFile(this.devSystemExtensionsFilePath,"utf8").then(e=>{return JSON.parse(e).map(({name:e})=>e)})}toNonCancellablePromise(e){
return new Promise((t,i)=>e.then(e=>t(e),e=>i(e)))}reportTelemetry(e,t,i,n){const r=n?n instanceof A?n.code:"unknown":void 0;this.telemetryService.publicLog(e,a.assign(t,{success:!n,duration:i,errorcode:r}))}};j=i([n(0,g.IEnvironmentService),n(1,h.IExtensionGalleryService),n(2,w.ILogService),n(3,D.optional(F.IDownloadService)),n(4,_.ITelemetryService)],j),t.ExtensionManagementService=j})),define(e[74],t([0,1,123,103,3,10,9,19,102,21,12,16]),(function(e,t,r,s,o,a,l,c,u,h,d,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let g=class extends o.Disposable{constructor(e,t){super(),this.logService=t,this.configure(e.getValue()),this._register(e.onDidChangeConfiguration(()=>this.configure(e.getValue()),this))}configure(e){this.proxyUrl=e.http&&e.http.proxy,this.strictSSL=!(!e.http||!e.http.proxyStrictSSL),this.authorization=e.http&&e.http.proxyAuthorization}async request(e,t){this.logService.trace("RequestService#request",e.url)
;const{proxyUrl:i,strictSSL:n}=this,r=e.agent?e.agent:await u.getProxyAgent(e.url||"",{proxyUrl:i,strictSSL:n});return e.agent=r,e.strictSSL=n,this.authorization&&(e.headers=a.assign(e.headers||{},{"Proxy-Authorization":this.authorization})),this._request(e,t)}async getNodeRequest(t){return("https:"===s.parse(t.url).protocol?await new Promise((t,i)=>{e(["https"],t,i)}):await new Promise((t,i)=>{e(["http"],t,i)})).request}_request(e,t){return new Promise(async(i,n)=>{let o;const u=s.parse(e.url),h=e.getRawRequest?e.getRawRequest(e):await this.getNodeRequest(e),d={hostname:u.hostname,port:u.port?parseInt(u.port):"https:"===u.protocol?443:80,protocol:u.protocol,path:u.path,method:e.type||"GET",headers:e.headers,agent:e.agent,rejectUnauthorized:!l.isBoolean(e.strictSSL)||e.strictSSL};e.user&&e.password&&(d.auth=e.user+":"+e.password),(o=h(d,s=>{const o=l.isNumber(e.followRedirects)?e.followRedirects:3;if(s.statusCode&&s.statusCode>=300&&s.statusCode<400&&o>0&&s.headers.location)this._request(a.assign({},e,{
url:s.headers.location,followRedirects:o-1}),t).then(i,n);else{let e=s;"gzip"===s.headers["content-encoding"]&&(e=s.pipe(r.createGunzip())),i({res:s,stream:f.streamToBufferReadableStream(e)})}})).on("error",n),e.timeout&&o.setTimeout(e.timeout),e.data&&"string"==typeof e.data&&o.write(e.data),o.end(),t.onCancellationRequested(()=>{o.abort(),n(c.canceled())})})}async resolveProxy(e){}};g=i([n(0,h.IConfigurationService),n(1,d.ILogService)],g),t.RequestService=g})),define(e[124],t([0,1,5,34,2,76,46,39,4,83,25,89,29,113,108,33,57,110,114,54,74,21,100,112,8,47,104,105,12,19,30,15,59,32,26,93,17,88,115,86,23,87,3,50]),(function(e,t,r,s,o,a,l,c,u,h,d,f,g,p,m,v,y,E,S,w,b,C,P,_,x,I,O,F,D,L,R,T,k,A,M,j,N,U,z,W,B,V,$,q){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const G=e=>r.localize(1,null,e),H=r.localize(2,null,"ms-vscode.csharp");function K(e,t){return t?`${e.publisher}.${e.name}@${e.version}`:`${e.publisher}.${e.name}`}const Q=/^([^.]+\..+)@(\d+\.\d+\.\d+(-.*)?)$/;function J(e){const t=Q.exec(e)
;return t&&t[1]?[R.adoptToGalleryExtensionId(t[1]),t[2]]:[R.adoptToGalleryExtensionId(e),void 0]}t.getIdAndVersion=J;let X=class{constructor(e,t,i,n){this.instantiationService=e,this.environmentService=t,this.extensionManagementService=i,this.extensionGalleryService=n}async run(e){e["install-source"]?await this.setInstallSource(e["install-source"]):e["list-extensions"]?await this.listExtensions(!!e["show-versions"],e.category):e["install-extension"]?await this.installExtensions(e["install-extension"],!!e.force):e["uninstall-extension"]?await this.uninstallExtension(e["uninstall-extension"]):e["locate-extension"]?await this.locateExtension(e["locate-extension"]):e.telemetry&&console.log(z.buildTelemetryMessage(this.environmentService.appRoot,this.environmentService.extensionsPath?this.environmentService.extensionsPath:void 0))}setInstallSource(e){return x.writeFile(this.environmentService.installSourcePath,e.slice(0,30))}async listExtensions(e,t){let i=await this.extensionManagementService.getInstalled(1)
;const n=['"programming languages"',"snippets","linters","themes","debuggers","formatters","keymaps",'"scm providers"',"other",'"extension packs"','"language packs"'];if(t&&""!==t){if(n.indexOf(t.toLowerCase())<0)return void console.log("Invalid category please enter a valid category. To list valid categories run --category without a category specified");i=i.filter(e=>{if(e.manifest.categories){return e.manifest.categories.map(e=>e.toLowerCase()).indexOf(t.toLowerCase())>-1}return!1})}else if(""===t)return console.log("Possible Categories: "),void n.forEach(e=>{console.log(e)});i.forEach(t=>console.log(K(t.manifest,e)))}async installExtensions(e,t){const i=[],n=[];e.length&&console.log(r.localize(3,null));for(const r of e)try{const e=await this.installExtension(r,t);e&&n.push(e)}catch(e){console.error(e.message||e.stack||e),i.push(r)}return n.some(e=>A.isLanguagePackExtension(e))&&await this.updateLocalizationsCache(),i.length?Promise.reject(r.localize(4,null,i.join(", "))):Promise.resolve()}
async installExtension(e,t){if(/\.vsix$/i.test(e)){e=o.isAbsolute(e)?e:o.join(process.cwd(),e);const i=await k.getManifest(e);return await this.validate(i,t)?this.extensionManagementService.install(T.URI.file(e)).then(t=>(console.log(r.localize(5,null,I.getBaseLabel(e))),i),t=>L.isPromiseCanceledError(t)?(console.log(r.localize(6,null,I.getBaseLabel(e))),null):Promise.reject(t)):null}const[i,n]=J(e);return this.extensionManagementService.getInstalled(1).then(e=>this.extensionGalleryService.getCompatibleExtension({id:i},n).then(null,e=>{if(e.responseText)try{const t=JSON.parse(e.responseText);return Promise.reject(t.message)}catch(e){}return Promise.reject(e)}).then(async s=>{if(!s)return Promise.reject(new Error(`${(e=>r.localize(0,null,e))(n?`${i}@${n}`:i)}\n${H}`));const o=await this.extensionGalleryService.getManifest(s,M.CancellationToken.None),[a]=e.filter(e=>R.areSameExtensions(e.identifier,{id:i}));if(a){if(s.version===a.manifest.version)return console.log(r.localize(7,null,n?`${i}@${n}`:i)),
Promise.resolve(null);if(!n&&!t)return console.log(r.localize(8,null,i,a.manifest.version,s.version)),Promise.resolve(null);console.log(r.localize(9,null,i,s.version))}return await this.installFromGallery(i,s),o}))}async validate(e,t){if(!e)throw new Error("Invalid vsix");const i={id:R.getGalleryExtensionId(e.publisher,e.name)},n=(await this.extensionManagementService.getInstalled(1)).filter(t=>R.areSameExtensions(i,t.identifier)&&a.gt(t.manifest.version,e.version))[0];return!(n&&!t)||(console.log(r.localize(10,null,n.identifier.id,n.manifest.version,e.version)),!1)}async installFromGallery(e,t){console.log(r.localize(11,null,e,t.version));try{await this.extensionManagementService.installFromGallery(t),console.log(r.localize(12,null,e,t.version))}catch(t){if(!L.isPromiseCanceledError(t))throw t;console.log(r.localize(13,null,e))}}async uninstallExtension(e){async function t(e){if(!/\.vsix$/i.test(e))return e;const t=o.isAbsolute(e)?e:o.join(process.cwd(),e);return K(await k.getManifest(t))}const i=[]
;for(const n of e){const e=await t(n),s=await this.extensionManagementService.getInstalled(1),[o]=s.filter(t=>R.areSameExtensions(t.identifier,{id:e}));if(!o)return Promise.reject(new Error(`${G(e)}\n${H}`));console.log(r.localize(14,null,e)),await this.extensionManagementService.uninstall(o,!0),i.push(o),console.log(r.localize(15,null,e))}i.some(e=>A.isLanguagePackExtension(e.manifest))&&await this.updateLocalizationsCache()}async locateExtension(e){const t=await this.extensionManagementService.getInstalled();e.forEach(e=>{t.forEach(t=>{t.identifier.id!==e||t.location.scheme!==N.Schemas.file||console.log(t.location.fsPath)})})}async updateLocalizationsCache(){const e=this.instantiationService.createInstance(j.LocalizationsService);await e.update(),e.dispose()}};X=i([n(0,u.IInstantiationService),n(1,d.IEnvironmentService),n(2,g.IExtensionManagementService),n(3,g.IExtensionGalleryService)],X),t.Main=X;const Y="monacoworkbench";t.main=async function(e){
const t=new l.ServiceCollection,i=new $.DisposableStore,n=new f.EnvironmentService(e,process.execPath),r=new U.SpdLogService("cli",n.logsPath,D.getLogLevel(n));process.once("exit",()=>r.dispose()),r.info("main",e),await Promise.all([n.appSettingsHome.fsPath,n.extensionsPath].map(e=>e?x.mkdirp(e):void 0));const o=new P.ConfigurationService(n.settingsResource);i.add(o),await o.initialize(),t.set(d.IEnvironmentService,n),t.set(D.ILogService,r),t.set(C.IConfigurationService,o),t.set(O.IStateService,new c.SyncDescriptor(F.StateService)),t.set(q.IProductService,Object.assign({_serviceBrand:void 0},s.default));const a=new W.FileService(r);i.add(a),t.set(B.IFileService,a);const u=new V.DiskFileSystemProvider(r);i.add(u),a.registerProvider(N.Schemas.file,u);const I=new h.InstantiationService(t);return I.invokeFunction(async t=>{const n=t.get(d.IEnvironmentService),o=t.get(O.IStateService),{appRoot:a,extensionsPath:u,extensionDevelopmentLocationURI:h,isBuilt:f,installSourcePath:C}=n,P=new l.ServiceCollection
;P.set(w.IRequestService,new c.SyncDescriptor(b.RequestService)),P.set(g.IExtensionManagementService,new c.SyncDescriptor(p.ExtensionManagementService)),P.set(g.IExtensionGalleryService,new c.SyncDescriptor(m.ExtensionGalleryService));const x=[];if(f&&!h&&!n.args["disable-telemetry"]&&s.default.enableTelemetry){s.default.aiConfig&&s.default.aiConfig.asimovKey&&x.push(new _.AppInsightsAppender(Y,null,s.default.aiConfig.asimovKey,r));const e={appender:y.combinedAppender(...x),commonProperties:S.resolveCommonProperties(s.default.commit,s.default.version,o.getItem("telemetry.machineId"),s.default.msftInternalDomains,C),piiPaths:u?[a,u]:[a]};P.set(v.ITelemetryService,new c.SyncDescriptor(E.TelemetryService,[e]))}else P.set(v.ITelemetryService,y.NullTelemetryService);const F=I.createChild(P).createInstance(X);try{await F.run(e),await y.combinedAppender(...x).flush()}finally{i.dispose()}})}}))}).call(this);
//# sourceMappingURL=https://ticino.blob.core.windows.net/sourcemaps/9579eda04fdb3a9bba2750f15193e5fafe16b959/core/vs/code/node/cliProcessMain.js.map
