/*!--------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
(function(){
var e=["require","exports","vs/base/common/lifecycle","vs/base/common/path","vs/platform/instantiation/common/instantiation","vs/base/node/pfs","vs/base/common/event","vs/nls!vs/code/node/cliProcessMain","vs/platform/log/common/log","vs/base/common/types","vs/base/common/objects","vs/nls","vs/base/common/async","vs/base/common/platform","fs","vs/base/common/buffer","vs/base/common/strings","vs/platform/registry/common/platform","vs/platform/configuration/common/configuration","vs/base/common/amd","vs/base/common/errors","vs/base/common/network","vs/base/common/uri","vs/platform/environment/common/environment","vs/base/common/cancellation","vs/platform/configuration/common/configurationRegistry","vs/base/common/resources","vs/platform/extensionManagement/common/extensionManagementUtil","vs/platform/extensionManagement/common/extensionManagement","vs/platform/files/common/files","vs/base/common/arrays","vs/base/common/map","vs/platform/product/node/package","vs/platform/product/node/product","vs/platform/extensions/common/extensions","child_process","vs/base/parts/ipc/common/ipc","vs/platform/telemetry/common/telemetry","vs/base/common/errorMessage","vs/base/node/extpath","vs/platform/files/node/watcher/watcher","vs/base/common/labels","vs/platform/instantiation/common/serviceCollection","vs/base/node/zip","vs/base/parts/ipc/node/ipc.cp","vs/platform/product/common/product","os","vs/platform/extensions/common/extensionValidator","util","vs/base/node/watcher","vs/base/node/decoder","vs/platform/instantiation/common/descriptors","vs/platform/request/common/request","vs/base/common/json","vs/base/common/uuid","vs/platform/telemetry/common/telemetryUtils","vs/platform/extensionManagement/node/extensionManagementUtil","vs/platform/files/node/watcher/nsfw/watcherIpc","vs/platform/request/node/requestService","vs/nls!vs/base/common/errorMessage","vs/platform/extensionManagement/node/extensionsManifestCache","semver-umd","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/extensionManagement/node/extensionManagementService","vs/platform/files/node/watcher/win32/watcherService","vs/base/node/paths","vs/platform/instantiation/common/graph","vs/platform/download/common/download","vs/base/node/config","vs/base/common/date","vs/base/common/collections","vs/nls!vs/base/node/processes","vs/base/node/processes","vs/platform/files/node/watcher/nodejs/watcherService","vs/base/common/console","vs/platform/instantiation/common/instantiationService","vs/platform/localizations/common/localizations","vs/base/common/extpath","vs/platform/files/common/fileService","vs/base/common/decorators","vs/platform/files/node/diskFileSystemProvider","vs/platform/log/node/spdlogService","vs/nls!vs/base/node/zip","vs/platform/environment/node/environmentService","crypto","vs/nls!vs/platform/configuration/common/configurationRegistry","vs/nls!vs/platform/extensionManagement/common/extensionManagement","vs/nls!vs/platform/extensionManagement/node/extensionManagementService","vs/platform/localizations/node/localizations","vs/platform/product/node/productService","vs/nls!vs/platform/extensionManagement/node/extensionManagementUtil","vs/platform/jsonschemas/common/jsonContributionRegistry","vs/nls!vs/platform/extensions/common/extensionValidator","vs/nls!vs/platform/files/common/fileService","vs/platform/configuration/common/configurationModels","vs/platform/configuration/node/configurationService","vs/nls!vs/platform/files/node/diskFileSystemProvider","vs/platform/request/node/proxy","url","vs/platform/state/common/state","vs/platform/state/node/stateService","vs/platform/storage/common/storage","vs/nls!vs/platform/request/common/request","vs/platform/extensionManagement/common/extensionGalleryService","vs/nls!vs/platform/telemetry/common/telemetryService","vs/platform/telemetry/common/telemetryService","vs/platform/extensionManagement/common/extensionNls","vs/platform/telemetry/node/appInsightsAppender","vs/platform/extensionManagement/node/extensionLifecycle","vs/platform/telemetry/node/commonProperties","vs/platform/telemetry/node/telemetry","vs/base/common/assert","yauzl","yazl","applicationinsights","vs/base/common/glob","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[114],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[15],t([0,1]),function(e,t){"use strict";function i(e,t){return e[t]*Math.pow(2,24)+e[t+1]*Math.pow(2,16)+e[t+2]*Math.pow(2,8)+e[t+3]}function n(e,t,i){e[i+3]=t,t>>>=8,e[i+2]=t,t>>>=8,e[i+1]=t,t>>>=8,e[i]=t}function r(){return new l}Object.defineProperty(t,"__esModule",{value:!0}),t.hasBuffer="undefined"!=typeof Buffer;let s,o;class a{static alloc(e){return new a(t.hasBuffer?Buffer.allocUnsafe(e):new Uint8Array(e))}static wrap(e){return t.hasBuffer&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new a(e)}static fromString(e){return t.hasBuffer?new a(Buffer.from(e)):(s||(s=new TextEncoder),new a(s.encode(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=a.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}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return t.hasBuffer?this.buffer.toString():(o||(o=new TextDecoder),o.decode(this.buffer))}slice(e,t){return new a(this.buffer.subarray(e,t))}set(e,t){this.buffer.set(e.buffer,t)}readUInt32BE(e){return i(this.buffer,e)}writeUInt32BE(e,t){n(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)}}t.VSBuffer=a,t.readUInt32BE=i,t.writeUInt32BE=n,t.isVSBufferReadableStream=function(e){const t=e;return t&&[t.on,t.pause,t.resume,t.destroy].every(e=>"function"==typeof e)},t.readableToBuffer=function(e){const t=[];let i;for(;i=e.read();)t.push(i);return a.concat(t)},t.bufferToReadable=function(e){let t=!1;return{read:()=>t?null:(t=!0,e)}},t.streamToBuffer=function(e){return new Promise((t,i)=>{const n=[];e.on("data",e=>n.push(e)),e.on("error",e=>i(e)),e.on("end",()=>t(a.concat(n)))
})},t.bufferToStream=function(e){const t=r();return t.end(e),t},t.toVSBufferReadableStream=function(e){const t=r();return e.on("data",e=>t.write("string"==typeof e?a.fromString(e):a.wrap(e))),e.on("end",()=>t.end()),e.on("error",e=>t.error(e)),t},t.writeableBufferStream=r;class l{constructor(){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=a.concat(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)}}}),define(e[73],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)&&!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};class n{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)}}t.SetMap=n}),define(e[82],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,t.memoize=function(e,t,i){let n=null,r=null;if("function"==typeof i.value?(n="value",0!==(r=i.value).length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"==typeof i.get&&(n="get",r=i.get),!r)throw new Error("not supported");const s=`$memoize$${t}`;i[n]=function(...e){return this.hasOwnProperty(s)||Object.defineProperty(this,s,{configurable:!1,enumerable:!1,writable:!1,value:r.apply(this,e)}),this[s]}},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[53],t([0,1]),function(e,t){"use strict";function i(e,t=!1){function i(t){let i=0,n=0;for(;i<t;){const t=e.charCodeAt(a)
;if(t>=48&&t<=57)n=16*n+t-48;else if(t>=65&&t<=70)n=16*n+t-65+10;else{if(!(t>=97&&t<=102))break;n=16*n+t-97+10}a++,i++}return i<t&&(n=-1),n}function o(){if(c="",d=0,u=a,a>=l)return u=l,h=17;let t=e.charCodeAt(a);if(n(t)){do{a++,c+=String.fromCharCode(t),t=e.charCodeAt(a)}while(n(t));return h=15}if(r(t))return a++,c+=String.fromCharCode(t),13===t&&10===e.charCodeAt(a)&&(a++,c+="\n"),h=14;switch(t){case 123:return a++,h=1;case 125:return a++,h=2;case 91:return a++,h=3;case 93:return a++,h=4;case 58:return a++,h=6;case 44:return a++,h=5;case 34:return a++,c=function(){let t="",n=a;for(;;){if(a>=l){t+=e.substring(n,a),d=2;break}let s=e.charCodeAt(a);if(34===s){t+=e.substring(n,a),a++;break}if(92!==s){if(s>=0&&s<=31){if(r(s)){t+=e.substring(n,a),d=2;break}d=6}a++}else{if(t+=e.substring(n,a),++a>=l){d=2;break}switch(n=e.charCodeAt(a++)){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 n=i(4);n>=0?t+=String.fromCharCode(n):d=4;break;default:d=5}n=a}}return t}(),h=10;case 47:const o=a-1;if(47===e.charCodeAt(a+1)){for(a+=2;a<l&&!r(e.charCodeAt(a));)a++;return c=e.substring(o,a),h=12}if(42===e.charCodeAt(a+1)){a+=2;const t=l-1;let i=!1;for(;a<t;){if(42===e.charCodeAt(a)&&47===e.charCodeAt(a+1)){a+=2,i=!0;break}a++}return i||(a++,d=1),c=e.substring(o,a),h=13}return c+=String.fromCharCode(t),a++,h=16;case 45:if(c+=String.fromCharCode(t),++a===l||!s(e.charCodeAt(a)))return h=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return c+=function(){const t=a;if(48===e.charCodeAt(a))a++;else for(a++;a<e.length&&s(e.charCodeAt(a));)a++;if(a<e.length&&46===e.charCodeAt(a)){if(!(++a<e.length&&s(e.charCodeAt(a))))return d=3,e.substring(t,a);for(a++;a<e.length&&s(e.charCodeAt(a));)a++}let i=a;if(a<e.length&&(69===e.charCodeAt(a)||101===e.charCodeAt(a)))if((++a<e.length&&43===e.charCodeAt(a)||45===e.charCodeAt(a))&&a++,a<e.length&&s(e.charCodeAt(a))){
for(a++;a<e.length&&s(e.charCodeAt(a));)a++;i=a}else d=3;return e.substring(t,i)}(),h=11;default:for(;a<l&&function(e){if(n(e)||r(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}(t);)a++,t=e.charCodeAt(a);if(u!==a){switch(c=e.substring(u,a)){case"true":return h=8;case"false":return h=9;case"null":return h=7}return h=16}return c+=String.fromCharCode(t),a++,h=16}}let a=0,l=e.length,c="",u=0,h=16,d=0;return{setPosition:function(e){a=e,c="",u=0,h=16,d=0},getPosition:()=>a,scan:t?function(){let e;do{e=o()}while(e>=12&&e<=15);return e}:o,getToken:()=>h,getTokenValue:()=>c,getTokenOffset:()=>u,getTokenLength:()=>a-u,getTokenError:()=>d}}function n(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 r(e){return 10===e||13===e||8232===e||8233===e}function s(e){return e>=48&&e<=57}function o(e){if(!e.parent||!e.parent.children)return[];const t=o(e.parent);if("property"===e.parent.type){
const i=e.parent.children[0].value;t.push(i)}else if("array"===e.parent.type){const i=e.parent.children.indexOf(e);-1!==i&&t.push(i)}return t}function a(e){switch(e.type){case"array":return e.children.map(a);case"object":const t=Object.create(null);for(let i of e.children){const e=i.children[1];e&&(t[i.children[0].value]=a(e))}return t;case"null":case"string":case"number":case"boolean":return e.value;default:return}}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,i=!1){if(l(e,t,i)){const n=e.children;if(Array.isArray(n))for(let e=0;e<n.length&&n[e].offset<=t;e++){const r=c(n[e],t,i);if(r)return r}return e}}function u(e,t,n=d.DEFAULT){function r(e){return e?()=>e(h.getTokenOffset(),h.getTokenLength()):()=>!0}function s(e){return e?t=>e(t,h.getTokenOffset(),h.getTokenLength()):()=>!0}function o(){for(;;){const e=h.scan();switch(h.getTokenError()){case 4:a(14);break;case 5:a(15);break;case 3:a(13);break;case 1:C||a(11);break;case 2:a(12);break;case 6:a(16)}
switch(e){case 12:case 13:C?a(10):E();break;case 16:a(1);break;case 15:case 14:break;default:return e}}}function a(e,t=[],i=[]){if(b(e),t.length+i.length>0){let e=h.getToken();for(;17!==e;){if(-1!==t.indexOf(e)){o();break}if(-1!==i.indexOf(e))break;e=o()}}}function l(e){const t=h.getTokenValue();return e?y(t):g(t),o(),!0}function c(){return 10!==h.getToken()?(a(3,[],[2,5]),!1):(l(!1),6===h.getToken()?(S(":"),o(),u()||a(4,[],[2,5])):a(5,[],[2,5]),!0)}function u(){switch(h.getToken()){case 3:return function(){m(),o();let e=!1;for(;4!==h.getToken()&&17!==h.getToken();){if(5===h.getToken()){if(e||a(4,[],[]),S(","),o(),4===h.getToken()&&w)break}else e&&a(6,[],[]);u()||a(4,[],[4,5]),e=!0}return v(),4!==h.getToken()?a(8,[4],[]):o(),!0}();case 1:return function(){f(),o();let e=!1;for(;2!==h.getToken()&&17!==h.getToken();){if(5===h.getToken()){if(e||a(4,[],[]),S(","),o(),2===h.getToken()&&w)break}else e&&a(6,[],[]);c()||a(4,[],[2,5]),e=!0}return p(),2!==h.getToken()?a(7,[2],[]):o(),!0}();case 10:return l(!0);default:
return function(){switch(h.getToken()){case 11:let e=0;try{"number"!=typeof(e=JSON.parse(h.getTokenValue()))&&(a(2),e=0)}catch(e){a(2)}y(e);break;case 7:y(null);break;case 8:y(!0);break;case 9:y(!1);break;default:return!1}return o(),!0}()}}const h=i(e,!1),f=r(t.onObjectBegin),g=s(t.onObjectProperty),p=r(t.onObjectEnd),m=r(t.onArrayBegin),v=r(t.onArrayEnd),y=s(t.onLiteralValue),S=s(t.onSeparator),E=r(t.onComment),b=s(t.onError),C=n&&n.disallowComments,w=n&&n.allowTrailingComma;return o(),17===h.getToken()||(u()?(17!==h.getToken()&&a(9,[],[]),!0):(a(4,[],[]),!1))}function h(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";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={}));var d;!function(e){e.DEFAULT={allowTrailingComma:!0}}(d=t.ParseOptions||(t.ParseOptions={})),t.createScanner=i;var f;!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"}(f||(f={})),t.getLocation=function(e,t){function i(e,t,i,n){o.value=e,o.offset=t,o.length=i,o.type=n,o.colonOffset=void 0,s=o}const n=[],r=new Object;let s=void 0;const o={value:{},offset:0,length:0,type:"object",parent:void 0};let a=!1;try{u(e,{onObjectBegin:(e,i)=>{if(t<=e)throw r;s=void 0,a=t>e,n.push("")},onObjectProperty:(e,s,o)=>{if(t<s)throw r;if(i(e,s,o,"property"),n[n.length-1]=e,t<=s+o)throw r},onObjectEnd:(e,i)=>{if(t<=e)throw r;s=void 0,n.pop()},onArrayBegin:(e,i)=>{if(t<=e)throw r;s=void 0,n.push(0)},onArrayEnd:(e,i)=>{if(t<=e)throw r;s=void 0,n.pop()},
onLiteralValue:(e,n,s)=>{if(t<n)throw r;if(i(e,n,s,h(e)),t<=n+s)throw r},onSeparator:(e,i,o)=>{if(t<=i)throw r;if(":"===e&&s&&"property"===s.type)s.colonOffset=i,a=!1,s=void 0;else if(","===e){const e=n[n.length-1];"number"==typeof e?n[n.length-1]=e+1:(a=!0,n[n.length-1]=""),s=void 0}}})}catch(e){if(e!==r)throw e}return{path:n,previousNode:s,isAtPropertyKey:a,matches:e=>{let t=0;for(let i=0;t<e.length&&i<n.length;i++)if(e[t]===n[i]||"*"===e[t])t++;else if("**"!==e[t])return!1;return t===e.length}}},t.parse=function(e,t=[],i=d.DEFAULT){function n(e){Array.isArray(s)?s.push(e):r&&(s[r]=e)}let r=null,s=[];const o=[];return u(e,{onObjectBegin:()=>{const e={};n(e),o.push(s),s=e,r=null},onObjectProperty:e=>{r=e},onObjectEnd:()=>{s=o.pop()},onArrayBegin:()=>{const e=[];n(e),o.push(s),s=e,r=null},onArrayEnd:()=>{s=o.pop()},onLiteralValue:n,onError:(e,i,n)=>{t.push({error:e,offset:i,length:n})}},i),s[0]},t.parseTree=function(e,t=[],i=d.DEFAULT){function n(e){"property"===s.type&&(s.length=e-s.offset,s=s.parent)}
function r(e){return s.children.push(e),e}let s={type:"array",offset:-1,length:-1,children:[],parent:void 0};u(e,{onObjectBegin:e=>{s=r({type:"object",offset:e,length:-1,parent:s,children:[]})},onObjectProperty:(e,t,i)=>{(s=r({type:"property",offset:t,length:-1,parent:s,children:[]})).children.push({type:"string",value:e,offset:t,length:i,parent:s})},onObjectEnd:(e,t)=>{s.length=e+t-s.offset,s=s.parent,n(e+t)},onArrayBegin:(e,t)=>{s=r({type:"array",offset:e,length:-1,parent:s,children:[]})},onArrayEnd:(e,t)=>{s.length=e+t-s.offset,s=s.parent,n(e+t)},onLiteralValue:(e,t,i)=>{r({type:h(e),offset:t,length:i,parent:s,value:e}),n(t+i)},onSeparator:(e,t,i)=>{"property"===s.type&&(":"===e?s.colonOffset=t:","===e&&n(t))},onError:(e,i,n)=>{t.push({error:e,offset:i,length:n})}},i);const o=s.children[0];return o&&delete o.parent,o},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=o,t.getNodeValue=a,t.contains=l,t.findNodeAtOffset=c,t.visit=u,t.stripComments=function(e,t){let n,r,s=i(e),o=[],a=0;do{switch(r=s.getPosition(),n=s.scan()){case 12:case 13:case 17:a!==r&&o.push(e.substring(a,r)),void 0!==t&&o.push(s.getTokenValue().replace(/[^\r\n]/g,t)),a=s.getPosition()}}while(17!==n);return o.join("")}}),define(e[72],t([0,1,16]),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[77],t([0,1,22]),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("string"!=typeof e)return r(n(e).stack);const t=e;if(t){const e=s(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])}}}function s(e){if(!e)return e;const t=e.indexOf("\n");return-1===t?e:e.substring(0,t)}function o(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=r,t.log=function(e,t){const{args:i,stack:r}=n(e),a="string"==typeof i[0]&&1===i.length;let l=s(r);l&&(l=`(${l.trim()})`);let c=[]
;if(c="string"==typeof i[0]?l&&a?[`%c[${t}] %c${i[0]} %c${l}`,o("blue"),o("black"),o("grey")]:[`%c[${t}] %c${i[0]}`,o("blue"),o("black"),...i.slice(1)]:[`%c[${t}]%`,o("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[41],t([0,1,22,3,16,21,13,26]),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}function u(e,t){if(o.isWindows||!e||!t)return e;let i=h.original===t?h.normalized:void 0;return i||(i=`${r.rtrim(t,n.posix.sep)}${n.posix.sep}`,h={original:t,normalized:i}),(o.isLinux?r.startsWith(e,i):r.startsWithIgnoreCase(e,i))&&(e=`~/${e.substr(i.length)}`),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&&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 h=n.normalize(e.fsPath);return!o.isWindows&&t&&(h=u(h,t.userHome)),h},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 h=Object.create(null);t.tildify=u,t.untildify=function(e,t){return e.replace(/^~($|\/|\\)/,`${t}$1`)};const d="…",f="\\\\",g="~";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};var p;!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)=>e.type!==p.SEPARATOR||[i[t-1],i[t+1]].every(e=>e&&(e.type===p.VARIABLE||e.type===p.TEXT)&&e.value.length>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){for(let t=e.length-1;t>=1;t--){const i=e.charCodeAt(t);if(47===i||92===i)return{parentPath:e.substr(0,t),name:e.substr(t+1)}}return{parentPath:"",name:e}}}),define(e[50],t([0,1,120]),function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{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}}t.LineDecoder=n}),define(e[68],t([0,1,19]),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});var i=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(r,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){e.done?r(e.value):new i(function(t){t(e.value)}).then(o,a)}l((n=n.apply(e,t||[])).next())})}
;define(e[39],t([0,1,14,16,3,5,48]),function(e,t,n,r,s,o,a){"use strict";function l(e){const t=s.dirname(e);if(e===t)return e;const i=(s.basename(e)||e).toLowerCase();try{const e=o.readdirSync(t).filter(e=>e.toLowerCase()===i);if(1===e.length){const i=l(t);if(i)return s.join(i,e[0])}else if(e.length>1){const n=e.indexOf(i);if(n>=0){const i=l(t);if(i)return s.join(i,e[n])}}}catch(e){}return null}function c(e){return r.rtrim(s.normalize(e),s.sep)}Object.defineProperty(t,"__esModule",{value:!0}),t.realcaseSync=l,t.realpath=function(e){return i(this,void 0,void 0,function*(){try{return yield a.promisify(n.realpath)(e)}catch(t){const i=c(e);return yield a.promisify(n.access)(i,n.constants.R_OK),i}})},t.realpathSync=function(e){try{return n.realpathSync(e)}catch(t){const i=c(e);return n.accessSync(i,n.constants.R_OK),i}}}),define(e[49],t([0,1,3,14,13,119,2,5]),function(e,t,n,r,s,o,a,l){"use strict";function c(e,u,h){const d=n.basename(e.path),f=new Map;let g=!1,p=[a.toDisposable(()=>{f.forEach(e=>a.dispose(e)),
f.clear()})];try{const m=r.watch(e.path);p.push(a.toDisposable(()=>{m.removeAllListeners(),m.close()}));const v=new Set;e.isDirectory&&l.readdir(e.path).then(e=>e.forEach(e=>v.add(e))),m.on("error",(t,i)=>{g||h(`Failed to watch ${e.path} for changes using fs.watch() (${t}, ${i})`)}),m.on("change",(r,m)=>{if(g)return;let y="";if(m&&(y=m.toString(),s.isMacintosh&&(y=o.normalizeNFC(y))),!y||"change"!==r&&"rename"!==r)return;const S=e.isDirectory?n.join(e.path,y):e.path;if(e.isDirectory)if("rename"===r){const e=f.get(S);e&&a.dispose(e);const n=setTimeout(()=>i(this,void 0,void 0,function*(){f.delete(S);const e=yield l.exists(S);if(g)return;let t;e?v.has(y)?t="changed":(t="added",v.add(y)):(v.delete(y),t="deleted"),u(t,S)}),t.CHANGE_BUFFER_DELAY);f.set(S,a.toDisposable(()=>clearTimeout(n)))}else{let e;v.has(y)?e="changed":(e="added",v.add(y)),u(e,S)}else if("rename"===r||y!==d){const n=setTimeout(()=>i(this,void 0,void 0,function*(){const t=yield l.exists(S);g||(t?(u("changed",S),p=[c(e,u,h)]):u("deleted",S))
}),t.CHANGE_BUFFER_DELAY);a.dispose(p),p=[a.toDisposable(()=>clearTimeout(n))]}else u("changed",S)})}catch(t){l.exists(e.path).then(i=>{i&&!g&&h(`Failed to watch ${e.path} for changes using fs.watch() (${t.toString()})`)})}return a.toDisposable(()=>{g=!0,p=a.dispose(p)})}Object.defineProperty(t,"__esModule",{value:!0}),t.watchFile=function(e,t,i){return c({path:e,isDirectory:!1},t,i)},t.watchFolder=function(e,t,i){return c({path:e,isDirectory:!0},t,i)},t.CHANGE_BUFFER_DELAY=100}),define(e[71],t([0,1,14,3,10,2,6,53,5,39,49]),function(e,t,n,r,s,o,a,l,c,u,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class d extends o.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 a.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(n.readFileSync(this._path).toString())}catch(e){return this.options.defaultConfig}}loadAsync(e){n.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):l.parse(e,this.parseErrors))||this.options.defaultConfig}catch(e){return this.options.defaultConfig}}registerWatcher(){const e=r.dirname(this._path);this.watch(e,!0),this.handleSymbolicLink().then(void 0,()=>{})}handleSymbolicLink(){return i(this,void 0,void 0,function*(){const{stat:e,isSymbolicLink:t}=yield c.statLink(this._path);if(t&&!e.isDirectory()){const e=yield u.realpath(this._path);this.watch(e,!1)}})}watch(e,t){
this.disposed||(t?this._register(h.watchFolder(e,(e,t)=>t===this._path?this.onConfigFileChange():void 0,e=>this.options.onError(e))):this._register(h.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(s.equals(t,this.cache)||(this.updateCache(t),this._onDidUpdateConfiguration.fire({config:this.cache})),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=d}),define(e[36],t([0,1,6,2,12,24,20,15]),function(e,t,n,r,s,o,a,l){"use strict";function c(e){const t=l.VSBuffer.alloc(4);return t.writeUInt32BE(e,0),t}function u(e){return e.read(4).readUInt32BE(0)}function h(e){const t=l.VSBuffer.alloc(1);return t.writeUInt8(e,0),t}
function d(e,t){if(void 0===t)e.write(S.Undefined);else if("string"==typeof t){const i=l.VSBuffer.fromString(t);e.write(S.String),e.write(c(i.byteLength)),e.write(i)}else if(E&&Buffer.isBuffer(t)){const i=l.VSBuffer.wrap(t);e.write(S.Buffer),e.write(c(i.byteLength)),e.write(i)}else if(t instanceof l.VSBuffer)e.write(S.VSBuffer),e.write(c(t.byteLength)),e.write(t);else if(Array.isArray(t)){e.write(S.Array),e.write(c(t.length));for(const i of t)d(e,i)}else{const i=l.VSBuffer.fromString(JSON.stringify(t));e.write(S.Object),e.write(c(i.byteLength)),e.write(i)}}function f(e){switch(e.read(1).readUInt8(0)){case y.Undefined:return;case y.String:return e.read(u(e)).toString();case y.Buffer:return e.read(u(e)).buffer;case y.VSBuffer:return e.read(u(e));case y.Array:{const t=u(e),i=[];for(let n=0;n<t;n++)i.push(f(e));return i}case y.Object:return JSON.parse(e.read(u(e)).toString())}}function g(e){return{call:(t,i,n)=>e.then(e=>e.call(t,i,n)),listen(t,i){const r=new n.Relay;return e.then(e=>r.input=e.listen(t,i)),
r.event}}}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={}));var p;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Idle=1]="Idle"}(p||(p={}));class m{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 v{constructor(){this.buffers=[]}get buffer(){return l.VSBuffer.concat(this.buffers)}write(e){this.buffers.push(e)}}var y;!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"}(y||(y={}));const S={
Undefined:h(y.Undefined),String:h(y.String),Buffer:h(y.Buffer),VSBuffer:h(y.VSBuffer),Array:h(y.Array),Object:h(y.Object)},E="undefined"!=typeof Buffer;class b{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 v;d(i,e),d(i,t),this.sendBuffer(i.buffer)}sendBuffer(e){try{this.protocol.send(e)}catch(e){}}onRawMessage(e){const t=new m(e),i=f(t),n=f(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 o.CancellationTokenSource;let n;try{n=t.call(this.ctx,e.name,e.arg,i.token)}catch(e){n=Promise.reject(e)}const s=e.id;n.then(t=>{this.sendResponse({id:s,data:t,type:201}),this.activeRequests.delete(e.id)},t=>{t instanceof Error?this.sendResponse({id:s,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:s,data:t,type:203}),this.activeRequests.delete(e.id)});const a=r.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=b;class C{constructor(e){this.protocol=e,this.state=p.Uninitialized,this.activeRequests=new Set,this.handlers=new Map,this.lastRequestId=0,
this._onDidInitialize=new n.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,n=o.CancellationToken.None){const l=this.lastRequestId++,c={id:l,type:100,channelName:e,name:t,arg:i};if(n.isCancellationRequested)return Promise.reject(a.canceled());let u;return new Promise((e,t)=>{if(n.isCancellationRequested)return t(a.canceled());let i=s.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 o=()=>{i?(i.cancel(),i=null):this.sendRequest({id:l,type:101}),t(a.canceled())},h=n.onCancellationRequested(o)
;u=r.combinedDisposable(r.toDisposable(o),h),this.activeRequests.add(u)}).finally(()=>this.activeRequests.delete(u))}requestEvent(e,t,i){const r=this.lastRequestId++,o={id:r,type:102,channelName:e,name:t,arg:i};let a=null;const l=new n.Emitter({onFirstListenerAdd:()=>{(a=s.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:r,type:103}))}});return this.handlers.set(r,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 v;d(i,e),d(i,t),this.sendBuffer(i.buffer)}sendBuffer(e){try{this.protocol.send(e)}catch(e){}}onBuffer(e){const t=new m(e),i=f(t),n=f(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=p.Idle,void this._onDidInitialize.fire();const t=this.handlers.get(e.id);t&&t(e)}whenInitialized(){return this.state===p.Idle?Promise.resolve():n.Event.toPromise(this.onDidInitialize)}dispose(){this.protocolListener&&(this.protocolListener.dispose(),this.protocolListener=null),this.activeRequests.forEach(e=>e.dispose()),this.activeRequests.clear()}}t.ChannelClient=C;class w{constructor(e){this.channels=new Map,this._connections=new Set,this._onDidChangeConnections=new n.Emitter,this.onDidChangeConnections=this._onDidChangeConnections.event,e(({protocol:e,onDidClientDisconnect:t})=>{n.Event.once(e.onMessage)(i=>{const n=f(new m(i)),r=new b(e,n),s=new C(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)=>g(t.routeCall(i,n,r).then(t=>t.channelClient.getChannel(e))).call(n,r,s),listen:(n,r)=>g(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()}}t.IPCServer=w;class P{constructor(e,t){const i=new v;d(i,t),e.send(i.buffer),this.channelClient=new C(e),this.channelServer=new b(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.IPCClient=P,t.getDelayedChannel=g,t.getNextTickChannel=function(e){let t=!1;return{call:(i,n,r)=>t?e.call(i,n,r):s.timeout(0).then(()=>t=!0).then(()=>e.call(i,n,r)),listen(i,r){if(t)return e.listen(i,r);const o=new n.Relay
;return s.timeout(0).then(()=>t=!0).then(()=>o.input=e.listen(i,r)),o.event}}};class x{constructor(e){this.fn=e}routeCall(e){return this.route(e)}routeEvent(e){return this.route(e)}route(e){return i(this,void 0,void 0,function*(){for(const t of e.connections)if(yield Promise.resolve(this.fn(t.ctx)))return Promise.resolve(t);return yield n.Event.toPromise(e.onDidChangeConnections),yield this.route(e)})}}t.StaticRouter=x}),define(e[59],t([11,7]),function(e,t){return e.create("vs/base/common/errorMessage",t)}),define(e[38],t([0,1,59,9,30]),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}function l(e=null,t=!1){if(!e)return i.localize(3,null);if(Array.isArray(e)){const n=r.coalesce(e),s=l(n[0],t)
;return n.length>1?i.localize(4,null,s,n.length):s}if(n.isString(e))return e;if(e.detail){const i=e.detail;if(i.error)return s(i.error,t);if(i.exception)return s(i.exception,t)}return e.stack?s(e,t):e.message?e.message:i.localize(5,null)}Object.defineProperty(t,"__esModule",{value:!0}),t.toErrorMessage=l}),define(e[74],t([11,7]),function(e,t){return e.create("vs/base/node/processes",t)}),define(e[75],t([0,1,3,14,48,35,74,9,10,80,13,50,19]),function(e,t,n,r,s,o,a,l,c,u,h,d,f){"use strict";function g(t,i){if(h.isWindows)try{const e={stdio:["pipe","pipe","ignore"]};i&&(e.cwd=i),o.execFileSync("taskkill",["/T","/F","/PID",t.pid.toString()],e)}catch(e){return{success:!1,error:e,code:e.status?function(e){switch(e){case 0:return 0;case 1:return 2;case 128:return 3;default:return 1}}(e.status):1}}else if(h.isLinux||h.isMacintosh)try{const i=f.getPathFromAmdModule(e,"vs/base/node/terminateProcess.sh"),n=o.spawnSync(i,[t.pid.toString()]);if(n.error)return{success:!1,error:n.error}}catch(e){return{success:!1,error:e}
}else t.kill("SIGKILL");return{success:!0}}function p(){return process.env.comspec||"cmd.exe"}Object.defineProperty(t,"__esModule",{value:!0}),t.terminateProcess=g,t.getWindowsShell=p;class m{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.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(n.sep);return-1!==t&&(e=e.substring(t+1)),m.WellKnowCommands[e]?e:"other"}start(e){return h.isWindows&&(this.options&&this.options.cwd&&u.isUNC(this.options.cwd)||!this.options&&u.isUNC(process.cwd()))?Promise.reject(new Error(a.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=o.exec(t,this.options,(t,r,s)=>{this.childProcess=null;const o=t;o&&o.killed?n({killed:this.terminateRequested,stdout:r.toString(),stderr:s.toString()}):this.handleExec(i,e,t,r,s)})}else{let t=null;if(this.shell&&h.isWindows){const e=c.deepClone(this.options);e.windowsVerbatimArguments=!0,e.detached=!1;let i=!1,n=!1;const r=[];let s=this.ensureQuotes(this.cmd);r.push(s.value),i=s.quoted,this.args&&this.args.forEach(e=>{s=this.ensureQuotes(e),r.push(s.value),n=n&&s.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=o.spawn(p(),a,e)}else this.cmd&&(t=o.spawn(this.cmd,this.args,this.options));t&&(this.childProcess=t,this.childProcessPromise=Promise.resolve(t),this.pidResolve&&(this.pidResolve(l.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",t=>{this.childProcess=null,this.childProcessPromise=null,this.handleClose(t,i,e,n);const r={terminated:this.terminateRequested};l.isNumber(t)&&(r.cmdCode=t),i(r)}),this.handleSpawn(t,i,e,n,!0)))}return r})}handleClose(e,t,i,n){}ensureQuotes(e){return m.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(e=>{this.terminateRequested=!0;const t=g(e,this.options.cwd);return t.success&&(this.childProcess=null),t},e=>({success:!0})):Promise.resolve({success:!0})}useExec(){return new Promise((e,t)=>{if(!this.shell||!h.isWindows)return e(!1);const i=o.spawn(p(),["/s","/c"]);i.on("error",t=>e(!0)),i.on("exit",t=>e(!1))})}}m.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},m.regexp=/^[^"].* .*[^"]/,t.AbstractProcess=m;class v extends m{constructor(e,t,i,n){super(e,t,i,n)}handleExec(e,t,i,n,r){[n,r].forEach((e,i)=>{const n=new d.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){this.stdoutLineDecoder=new d.LineDecoder,this.stderrLineDecoder=new d.LineDecoder,e.stdout.on("data",e=>{this.stdoutLineDecoder.write(e).forEach(e=>i({line:e,source:0}))}),e.stderr.on("data",e=>{this.stderrLineDecoder.write(e).forEach(e=>i({line:e,source:1}))})}handleClose(e,t,i,n){[this.stdoutLineDecoder.end(),this.stderrLineDecoder.end()].forEach((e,t)=>{e&&i({line:e,source:0===t?0:1})})}}t.LineProcess=v,t.createQueuedSender=function(e){let t=[],i=!1;const n=function(r){i?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))}})&&!h.isWindows||(i=!0)};return{send:n}};!function(e){e.findExecutable=function(e,t,o){return i(this,void 0,void 0,function*(){if(n.isAbsolute(e))return e;if(void 0===t&&(t=process.cwd()),"."!==n.dirname(e))return n.join(t,e);if(void 0===o&&l.isString(process.env.PATH)&&(o=process.env.PATH.split(n.delimiter)),void 0===o||0===o.length)return n.join(t,e);for(let i of o){let o;if(o=n.isAbsolute(i)?n.join(i,e):n.join(t,i,e),yield s.promisify(r.exists)(o))return o;let a=o+".com";if(yield s.promisify(r.exists)(a))return a;if(a=o+".exe",yield s.promisify(r.exists)(a))return a}return n.join(t,e)})}}(t.win32||(t.win32={}))}),define(e[44],t([0,1,35,2,12,10,6,75,36,77,24,20,15]),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;class g{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.trigger(()=>this.disposeClient())}),a}requestEvent(e,t,i){if(!this.disposeDelayer)return o.Event.None;this.disposeDelayer.cancel();let n;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.cancel(),this.disposeDelayer=null,this.disposeClient(),this.activeRequests.clear()}}t.Client=g}),define(e[85],t([11,7]),function(e,t){return e.create("vs/base/node/zip",t)}),define(e[88],t([11,7]),function(e,t){return e.create("vs/platform/configuration/common/configurationRegistry",t)}),define(e[89],t([11,7]),function(e,t){return e.create("vs/platform/extensionManagement/common/extensionManagement",t)}),define(e[90],t([11,7]),function(e,t){return e.create("vs/platform/extensionManagement/node/extensionManagementService",t)}),define(e[93],t([11,7]),function(e,t){
return e.create("vs/platform/extensionManagement/node/extensionManagementUtil",t)}),define(e[95],t([11,7]),function(e,t){return e.create("vs/platform/extensions/common/extensionValidator",t)}),define(e[96],t([11,7]),function(e,t){return e.create("vs/platform/files/common/fileService",t)}),define(e[99],t([11,7]),function(e,t){return e.create("vs/platform/files/node/diskFileSystemProvider",t)}),define(e[105],t([11,7]),function(e,t){return e.create("vs/platform/request/common/request",t)}),define(e[107],t([11,7]),function(e,t){return e.create("vs/platform/telemetry/common/telemetryService",t)}),define(e[109],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[111],t([0,1,2,35,38,3,12,6,21,5]),function(e,t,n,r,s,o,a,l,c,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0})
;class h extends n.Disposable{constructor(e,t){super(),this.environmentService=e,this.logService=t,this.processesLimiter=new a.Limiter(5)}postUninstall(e){return i(this,void 0,void 0,function*(){const t=this.parseScript(e,"uninstall");return t&&(this.logService.info(e.identifier.id,e.manifest.version,"Running post uninstall script"),yield 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}`)))),u.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===c.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:o.join(e.location.fsPath,t[1]),args:t.slice(2)||[]}}return null}runLifecycleHook(e,t,i,n,r){return new Promise((o,a)=>{const l=this.start(e,t,i,r);let c;const u=e=>{c&&(clearTimeout(c),c=null),e?a(e):o(void 0)};l.on("error",e=>{u(s.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,n){const s={silent:!0,execArgv:void 0},o=r.fork(e,[`--type=extension-post-${t}`,...i],s);o.stdout.setEncoding("utf8"),o.stderr.setEncoding("utf8");const a=l.Event.fromNodeEventEmitter(o.stdout,"data"),c=l.Event.fromNodeEventEmitter(o.stderr,"data");a(e=>this.logService.info(n.identifier.id,n.manifest.version,`post-${t}`,e)),c(e=>this.logService.error(n.identifier.id,n.manifest.version,`post-${t}`,e));const u=l.Event.any(l.Event.map(a,e=>({data:`%c${e}`,
format:[""]})),l.Event.map(c,e=>({data:`%c${e}`,format:["color: red"]})));return l.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(n.identifier.id),console.log(e.data,...e.format),console.groupEnd()}),o}getExtensionStoragePath(e){return o.join(this.environmentService.globalStorageHome,e.identifier.id.toLowerCase())}}t.ExtensionsLifecycle=h}),define(e[47],t([0,1,95]),function(e,t,i){"use strict";function n(e){return"*"===(e=e.trim())||l.test(e)}function r(e){if(!n(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(l);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 s(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 o(e,t){let i;i="string"==typeof e?s(r(e)):e;let n;if(n="string"==typeof t?s(r(t)):t,!i||!n)return!1;let o=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?o>c||!(o<c)&&(a>u||!(a<u)&&l>=h):(1!==o||0!==c||d&&f&&g||(c=1,u=0,h=0,d=!0,f=!1,g=!1),!(o<c)&&(o>c?!d:!(a<u)&&(a>u?!f:!(l<h)&&(!(l>h)||!g))))}function a(e,t,n=[]){let a=s(r(t));if(!a)return n.push(i.localize(0,null,t)),!1;if(0===a.majorBase){if(!a.majorMustEqual||!a.minorMustEqual)return n.push(i.localize(1,null,t)),!1}else if(!a.majorMustEqual)return n.push(i.localize(2,null,t)),!1
;return!!o(e,a)||(n.push(i.localize(3,null,e,t)),!1)}Object.defineProperty(t,"__esModule",{value:!0});const l=/^(\^|>=)?((\d+)|x)\.((\d+)|x)\.((\d+)|x)(\-.*)?$/;t.isValidVersionStr=n,t.parseVersion=r,t.normalizeVersion=s,t.isValidVersion=o,t.isValidExtensionVersion=function(e,t,i){return!(!t.isBuiltin&&void 0!==t.main)||a(e,t.engines.vscode,i)},t.isEngineValid=function(e,t){return"*"===e||a(t,e)},t.isVersionValid=a}),define(e[34],t([0,1,16]),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={}));class n{constructor(e){this.value=e,this._lower=e.toLowerCase()}static equals(e,t){if(void 0===e||null===e)return void 0===t||null===t
;if(void 0===t||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.ExtensionIdentifier=n,t.isLanguagePackExtension=function(e){return!(!e.contributes||!e.contributes.localizations)&&e.contributes.localizations.length>0}}),define(e[27],t([0,1,16,34]),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[60],t([0,1,2,3,34,5]),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[57],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i{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.WatcherChannel=i;class n{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")}}t.WatcherChannelClient=n}),define(e[62],t([0,1,36,44,57,2,19]),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.setVerboseLogging(e)}error(e){this.onLogMessage({
type:"error",message:`[File Watcher (nsfw)] ${e}`})}setFolders(e){this.folders=e,this.service.setRoots(e)}dispose(){this.isDisposed=!0,super.dispose()}}a.MAX_RESTARTS=5,t.FileWatcher=a}),define(e[63],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i{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.WatcherChannel=i;class n{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")}}
t.WatcherChannelClient=n}),define(e[64],t([0,1,36,44,63,2,19]),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.setVerboseLogging(e)}setFolders(e){this.folders=e,this.service.setRoots(e)}dispose(){this.isDisposed=!0,super.dispose()}}a.MAX_RESTARTS=5,t.FileWatcher=a}),define(e[65],t([0,1,35,50,118,19]),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=null)}}o.MAX_RESTARTS=5,o.changeTypeMap=[0,1,2],t.OutOfProcessWin32FolderWatcher=o}),define(e[67],t([0,1,65,3,16]),function(e,t,i,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s{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)}}t.FileWatcher=s}),define(e[51],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[69],t([0,1,9,73]),function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{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")}}t.Graph=r}),define(e[70],t([0,1,4]),function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDownloadService=i.createDecorator("downloadService")}),define(e[23],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[28],t([0,1,89,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_MALICIOUS="malicious",t.INSTALL_ERROR_INCOMPATIBLE="incompatible",t.ExtensionsLabel=i.localize(0,null),t.ExtensionsChannelId="extensions",t.PreferencesLabel=i.localize(1,null)}),define(e[40],t([0,1,22,29,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[76],t([0,1,40,2,5,39,49,12,3]),function(e,t,n,r,s,o,a,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class u extends r.Disposable{constructor(e,t,i,n){super(),this.path=e,this.onFileChanges=t,this.onLogMessage=i,this.verboseLogging=n,this.fileChangesDelayer=this._register(new l.ThrottledDelayer(2*a.CHANGE_BUFFER_DELAY)),this.fileChangesBuffer=[],this.startWatching()}setVerboseLogging(e){this.verboseLogging=e}startWatching(){return i(this,void 0,void 0,function*(){try{const{stat:e,isSymbolicLink:t}=yield s.statLink(this.path);if(this.isDisposed)return;let i=this.path;if(t)try{i=yield o.realpath(i)
}catch(e){this.onError(e)}e.isDirectory()?this._register(a.watchFolder(i,(e,t)=>{this.onFileChange({type:"changed"===e?0:"added"===e?1:2,path:c.join(this.path,c.basename(t))})},e=>this.onError(e))):this._register(a.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=n.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=u}),define(e[42],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i{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)}}t.ServiceCollection=i}),define(e[78],t([0,1,20,69,51,4,42,12]),function(e,t,i,n,r,s,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const l="function"==typeof Proxy;class c extends Error{constructor(e){super("cyclic dependency between services"),this.message=e.toString()}}class u{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 u(e,this._strict,this)}invokeFunction(e,...t){let n=d.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=d.traceCreation(e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=d.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++>100)throw new c(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 c(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")}_createServiceInstance(e,t=[],i,n){if(i&&l){const i=new a.IdleValue(()=>this._createInstance(e,t,n));return new Proxy(Object.create(null),{get:(e,t)=>i.getValue()[t],
set:(e,t,n)=>(i.getValue()[t]=n,!0)})}return this._createInstance(e,t,n)}}t.InstantiationService=u;var h;!function(e){e[e.Creation=0]="Creation",e[e.Invocation=1]="Invocation",e[e.Branch=2]="Branch"}(h||(h={}));class d{constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}static traceInvocation(e){return d._None}static traceCreation(e){return d._None}branch(e,t){let i=new d(2,e.toString());return this._dep.push([e,t,i]),i}stop(){function e(t,n){let r=[],s=new Array(t+1).join("\t");for(const[o,a,l]of n._dep)if(a&&l){i=!0,r.push(`${s}CREATES -> ${o}`);let n=e(t+1,l);n&&r.push(n)}else r.push(`${s}uses -> ${o}`);return r.join("\n")}let t=Date.now()-this._start;d._totals+=t;let i=!1,n=[`${0===this.type?"CREATE":"CALL"} ${this.name}`,`${e(1,this)}`,`DONE, took ${t.toFixed(2)}ms (grand total ${d._totals.toFixed(2)}ms)`];(t>2||i)&&console.log(n.join("\n"))}}d._None=new class extends d{constructor(){super(-1,null)}stop(){}branch(){return this}},d._totals=0}),
define(e[79],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[8],t([0,1,4,2,13,6]),function(e,t,i,n,r,s){"use strict";function o(){return(new Date).toISOString()}Object.defineProperty(t,"__esModule",{value:!0}),t.ILogService=i.createDecorator("logService");var a;!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;class c 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(){}}t.ConsoleLogMainService=c;class u 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(){}}t.ConsoleLogService=u;class h 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)}dispose(){for(const e of this.logServices)e.dispose()}}t.MultiplexLogService=h;class d 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)}}t.DelegatedLogService=d;class f{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(){}}t.NullLogService=f,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 n=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},r=this&&this.__param||function(e,t){return function(i,n){t(i,n,e)}};define(e[81],t([0,1,2,29,6,26,96,31,30,41,8,15,12,24,21]),function(e,t,s,o,a,l,c,u,h,d,f,g,p,m,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let y=class extends s.Disposable{constructor(e){super(),this.logService=e,this.BUFFER_SIZE=65536,this._onDidChangeFileSystemProviderRegistrations=this._register(new a.Emitter),this.onDidChangeFileSystemProviderRegistrations=this._onDidChangeFileSystemProviderRegistrations.event,this._onWillActivateFileSystemProvider=this._register(new a.Emitter),this.onWillActivateFileSystemProvider=this._onWillActivateFileSystemProvider.event,this.provider=new Map,this._onAfterOperation=this._register(new a.Emitter),this.onAfterOperation=this._onAfterOperation.event,
this._onError=this._register(new a.Emitter),this.onError=this._onError.event,this._onFileChanges=this._register(new a.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 s.DisposableStore;return i.add(t.onDidChangeFile(e=>this._onFileChanges.fire(new o.FileChangesEvent(e)))),"function"==typeof t.onDidErrorOccur&&i.add(t.onDidErrorOccur(e=>this._onError.fire(new Error(e)))),s.toDisposable(()=>{this._onDidChangeFileSystemProviderRegistrations.fire({added:!1,scheme:e,provider:t}),this.provider.delete(e),s.dispose(i)})}activateProvider(e){return i(this,void 0,void 0,function*(){const t=[];this._onWillActivateFileSystemProvider.fire({scheme:e,join(e){e&&t.push(e)}}),this.provider.has(e)||(yield 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)}withProvider(e){return i(this,void 0,void 0,function*(){if(!l.isAbsolutePath(e))throw new o.FileOperationError(c.localize(0,null,this.resourceForError(e)),8);yield this.activateProvider(e.scheme);const t=this.provider.get(e.scheme);if(!t){const t=new Error;throw t.name="ENOPRO",t.message=c.localize(1,null,e.toString()),t}return t})}withReadWriteProvider(e){return i(this,void 0,void 0,function*(){const t=yield this.withProvider(e);if(o.hasOpenReadWriteCloseCapability(t)||o.hasReadWriteCapability(t))return t;throw new Error("Provider neither has FileReadWrite nor FileOpenReadWriteClose capability which is needed for the operation.")})}resolve(e,t){return i(this,void 0,void 0,function*(){try{return yield this.doResolveFile(e,t)}catch(t){
if(o.toFileSystemProviderErrorCode(t)===o.FileSystemProviderErrorCode.FileNotFound)throw new o.FileOperationError(c.localize(2,null,this.resourceForError(e)),1);throw this.ensureError(t)}})}doResolveFile(e,t){return i(this,void 0,void 0,function*(){const i=yield this.withProvider(e),n=t&&t.resolveTo,r=u.TernarySearchTree.forPaths();r.set(e.toString(),!0),h.isNonEmptyArray(n)&&n.forEach(e=>r.set(e.toString(),!0));const s=!(!t||!t.resolveSingleChildDescendants),o=!(!t||!t.resolveMetadata),a=yield i.stat(e);return this.toFileStat(i,e,a,void 0,o,(e,t)=>!!Boolean(r.findSuperstr(e.resource.toString())||r.get(e.resource.toString()))||!(!e.isDirectory||!s)&&1===t)})}toFileStat(e,t,n,r,s,a){return i(this,void 0,void 0,function*(){const c={resource:t,name:d.getBaseLabel(t),isDirectory:0!=(n.type&o.FileType.Directory),isSymbolicLink:0!=(n.type&o.FileType.SymbolicLink),isReadonly:!!(2048&e.capabilities),mtime:n.mtime,size:n.size,etag:o.etag({mtime:n.mtime,size:n.size})};if(c.isDirectory&&a(c,r)){try{
const n=yield e.readdir(t),r=yield Promise.all(n.map(([r,o])=>i(this,void 0,void 0,function*(){try{const i=l.joinPath(t,r),c=s?yield e.stat(i):{type:o};return yield this.toFileStat(e,i,c,n.length,s,a)}catch(e){return this.logService.trace(e),null}})));c.children=h.coalesce(r)}catch(e){this.logService.trace(e),c.children=[]}return c}return c})}resolveAll(e){return i(this,void 0,void 0,function*(){return Promise.all(e.map(e=>i(this,void 0,void 0,function*(){try{return{stat:yield this.doResolveFile(e.resource,e.options),success:!0}}catch(e){return this.logService.trace(e),{stat:void 0,success:!1}}})))})}exists(e){return i(this,void 0,void 0,function*(){try{return!!(yield this.resolve(e))}catch(e){return!1}})}createFile(e,t=g.VSBuffer.fromString(""),n){return i(this,void 0,void 0,function*(){if(!!(!n||!n.overwrite)&&(yield this.exists(e)))throw new o.FileOperationError(c.localize(3,null,this.resourceForError(e)),3,n);const i=yield this.writeFile(e,t)
;return this._onAfterOperation.fire(new o.FileOperationEvent(e,0,i)),i})}writeFile(e,t,n){return i(this,void 0,void 0,function*(){const i=this.throwIfFileSystemIsReadonly(yield this.withReadWriteProvider(e));try{(yield this.validateWriteFile(i,e,n))||(yield this.mkdirp(i,l.dirname(e))),o.hasOpenReadWriteCloseCapability(i)?yield this.doWriteBuffered(i,e,t instanceof g.VSBuffer?g.bufferToReadable(t):t):yield this.doWriteUnbuffered(i,e,t)}catch(e){throw new o.FileOperationError(c.localize(4,null,this.ensureError(e).toString()),o.toFileOperationResult(e),n)}return this.resolve(e,{resolveMetadata:!0})})}validateWriteFile(e,t,n){return i(this,void 0,void 0,function*(){let i=void 0;try{i=yield e.stat(t)}catch(e){return}if(0!=(i.type&o.FileType.Directory))throw new o.FileOperationError(c.localize(5,null,this.resourceForError(t)),0,n);if(n&&"number"==typeof n.mtime&&"string"==typeof n.etag&&n.etag!==o.ETAG_DISABLED&&"number"==typeof i.mtime&&"number"==typeof i.size&&n.mtime<i.mtime&&n.etag!==o.etag({mtime:n.mtime,
size:i.size}))throw new o.FileOperationError(c.localize(6,null),3,n);return i})}readFile(e,t){return i(this,void 0,void 0,function*(){const i=yield this.readFileStream(e,t);return Object.assign({},i,{value:yield g.streamToBuffer(i.value)})})}readFileStream(e,t){return i(this,void 0,void 0,function*(){const i=yield this.withReadWriteProvider(e),n=new m.CancellationTokenSource,r=this.validateReadFile(e,t).then(e=>e,e=>{throw n.cancel(),e});try{t&&"string"==typeof t.etag&&t.etag!==o.ETAG_DISABLED&&(yield r);let s;s=o.hasOpenReadWriteCloseCapability(i)?Promise.resolve(this.readFileBuffered(i,e,n.token,t)):this.readFileUnbuffered(i,e,t);const[a,l]=yield Promise.all([r,s]);return Object.assign({},a,{value:l})}catch(e){throw new o.FileOperationError(c.localize(7,null,this.ensureError(e).toString()),o.toFileOperationResult(e),t)}})}readFileBuffered(e,t,i,n){const r=g.writeableBufferStream();let s=void 0;return this.doReadFileBuffered(e,t,r,i,n).then(void 0,e=>s=e).finally(()=>r.end(s)),r}
doReadFileBuffered(e,t,n,r,s){return i(this,void 0,void 0,function*(){const i=yield e.open(t,{create:!1});try{let t=0,o=0,a=s&&"number"==typeof s.length?s.length:void 0,l=g.VSBuffer.alloc(Math.min(this.BUFFER_SIZE,"number"==typeof a?a:this.BUFFER_SIZE)),c=s&&"number"==typeof s.position?s.position:0,u=0;do{c+=o=yield e.read(i,c,l.buffer,u,l.byteLength-u),u+=o,t+=o,"number"==typeof a&&(a-=o),u===l.byteLength&&(n.write(l),l=g.VSBuffer.alloc(Math.min(this.BUFFER_SIZE,"number"==typeof a?a:this.BUFFER_SIZE)),u=0)}while(o>0&&("number"!=typeof a||a>0)&&this.throwIfCancelled(r)&&this.throwIfTooLarge(t,s));if(u>0){let e=u;"number"==typeof a&&(e=Math.min(u,a)),n.write(l.slice(0,e))}}catch(e){throw this.ensureError(e)}finally{yield e.close(i)}})}readFileUnbuffered(e,t,n){return i(this,void 0,void 0,function*(){let i=yield e.readFile(t);return n&&"number"==typeof n.position&&(i=i.slice(n.position)),n&&"number"==typeof n.length&&(i=i.slice(0,n.length)),g.bufferToStream(g.VSBuffer.wrap(i))})}validateReadFile(e,t){
return i(this,void 0,void 0,function*(){const i=yield this.resolve(e,{resolveMetadata:!0});if(i.isDirectory)throw new o.FileOperationError(c.localize(8,null,this.resourceForError(e)),0,t);if(t&&"string"==typeof t.etag&&t.etag!==o.ETAG_DISABLED&&t.etag===i.etag)throw new o.FileOperationError(c.localize(9,null),2,t);if(t&&t.limits){if("number"==typeof t.limits.memory&&i.size>t.limits.memory)throw new o.FileOperationError(c.localize(10,null),9);if("number"==typeof t.limits.size&&i.size>t.limits.size)throw new o.FileOperationError(c.localize(11,null),7)}return i})}move(e,t,n){return i(this,void 0,void 0,function*(){const i=this.throwIfFileSystemIsReadonly(yield this.withReadWriteProvider(e)),r=this.throwIfFileSystemIsReadonly(yield this.withReadWriteProvider(t)),s=yield this.doMoveCopy(i,e,r,t,"move",n),a=yield this.resolve(t,{resolveMetadata:!0});return this._onAfterOperation.fire(new o.FileOperationEvent(e,"move"===s?2:3,a)),a})}copy(e,t,n){return i(this,void 0,void 0,function*(){
const i=yield this.withReadWriteProvider(e),r=this.throwIfFileSystemIsReadonly(yield this.withReadWriteProvider(t)),s=yield this.doMoveCopy(i,e,r,t,"copy",n),a=yield this.resolve(t,{resolveMetadata:!0});return this._onAfterOperation.fire(new o.FileOperationEvent(e,"copy"===s?3:2,a)),a})}doMoveCopy(e,t,n,r,s,a){return i(this,void 0,void 0,function*(){if(t.toString()===r.toString())return s;const{exists:i,isSameResourceWithDifferentPathCase:c}=yield this.doValidateMoveCopy(e,t,n,r,s,a);if(i&&!c&&a&&(yield this.del(r,{recursive:!0})),yield this.mkdirp(n,l.dirname(r)),"copy"===s){if(e===n&&o.hasFileFolderCopyCapability(e))yield e.copy(t,r,{overwrite:!!a});else{const i=yield this.resolve(t);i.isDirectory?yield this.doCopyFolder(e,i,n,r):yield this.doCopyFile(e,t,n,r)}return s}return e===n?(yield e.rename(t,r,{overwrite:!!a}),s):(yield this.doMoveCopy(e,t,n,r,"copy",a),yield this.del(t,{recursive:!0}),"copy")})}doCopyFile(e,t,n,r){return i(this,void 0,void 0,function*(){
return o.hasOpenReadWriteCloseCapability(e)&&o.hasOpenReadWriteCloseCapability(n)?this.doPipeBuffered(e,t,n,r):o.hasOpenReadWriteCloseCapability(e)&&o.hasReadWriteCapability(n)?this.doPipeBufferedToUnbuffered(e,t,n,r):o.hasReadWriteCapability(e)&&o.hasOpenReadWriteCloseCapability(n)?this.doPipeUnbufferedToBuffered(e,t,n,r):o.hasReadWriteCapability(e)&&o.hasReadWriteCapability(n)?this.doPipeUnbuffered(e,t,n,r):void 0})}doCopyFolder(e,t,n,r){return i(this,void 0,void 0,function*(){yield n.mkdir(r),Array.isArray(t.children)&&(yield Promise.all(t.children.map(t=>i(this,void 0,void 0,function*(){const i=l.joinPath(r,t.name);return t.isDirectory?this.doCopyFolder(e,yield this.resolve(t.resource),n,i):this.doCopyFile(e,t.resource,n,i)}))))})}doValidateMoveCopy(e,t,n,r,s,a){return i(this,void 0,void 0,function*(){let i=!1;if(e===n){const n=!!(1024&e.capabilities);if(n||(i=l.isEqual(t,r,!0)),i&&"copy"===s)throw new Error(c.localize(12,null));if(!i&&l.isEqualOrParent(r,t,!n))throw new Error(c.localize(13,null))}
const u=yield this.exists(r);if(u&&!i){if(!a)throw new o.FileOperationError(c.localize(14,null),4);if(e===n){const i=!!(1024&e.capabilities);if(l.isEqualOrParent(t,r,!i))throw new Error(c.localize(15,null))}}return{exists:u,isSameResourceWithDifferentPathCase:i}})}createFolder(e){return i(this,void 0,void 0,function*(){const t=this.throwIfFileSystemIsReadonly(yield this.withProvider(e));yield this.mkdirp(t,e);const i=yield this.resolve(e,{resolveMetadata:!0});return this._onAfterOperation.fire(new o.FileOperationEvent(e,0,i)),i})}mkdirp(e,t){return i(this,void 0,void 0,function*(){const i=[];for(;!l.isEqual(t,l.dirname(t));)try{if(0==((yield e.stat(t)).type&o.FileType.Directory))throw new Error(c.localize(16,null,this.resourceForError(t)));break}catch(e){if(o.toFileSystemProviderErrorCode(e)!==o.FileSystemProviderErrorCode.FileNotFound)throw e;i.push(l.basename(t)),t=l.dirname(t)}for(let n=i.length-1;n>=0;n--)t=l.joinPath(t,i[n]),yield e.mkdir(t)})}del(e,t){return i(this,void 0,void 0,function*(){
const i=this.throwIfFileSystemIsReadonly(yield this.withProvider(e)),n=!(!t||!t.useTrash);if(n&&!(4096&i.capabilities))throw new Error(c.localize(17,null));const r=!(!t||!t.recursive);if(!r&&(yield this.exists(e))){const t=yield this.resolve(e);if(t.isDirectory&&Array.isArray(t.children)&&t.children.length>0)throw new Error(c.localize(18,null,this.resourceForError(e)))}yield i.delete(e,{recursive:r,useTrash:n}),this._onAfterOperation.fire(new o.FileOperationEvent(e,1))})}watch(e,t={recursive:!1,excludes:[]}){let i=!1,n=s.toDisposable(()=>i=!0);return this.doWatch(e,t).then(e=>{i?s.dispose(e):n=e},e=>this.logService.error(e)),s.toDisposable(()=>s.dispose(n))}doWatch(e,t){return i(this,void 0,void 0,function*(){const i=yield this.withProvider(e),n=this.toWatchKey(i,e,t),r=this.activeWatchers.get(n)||{count:0,disposable:i.watch(e,t)};return this.activeWatchers.has(n)||this.activeWatchers.set(n,r),r.count+=1,s.toDisposable(()=>{r.count--,0===r.count&&(s.dispose(r.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=>s.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);a.Event.once(n.onFinished)(()=>{this.writeQueues.delete(i),s.dispose(n)})}return n}toMapKey(e,t){return!!(1024&e.capabilities)?t.toString():t.toString().toLowerCase()}doWriteBuffered(e,t,n){return i(this,void 0,void 0,function*(){return this.ensureWriteQueue(e,t).queue(()=>i(this,void 0,void 0,function*(){const i=yield e.open(t,{create:!0});try{g.isVSBufferReadableStream(n)?yield this.doWriteStreamBufferedQueued(e,i,n):yield this.doWriteReadableBufferedQueued(e,i,n)}catch(e){throw this.ensureError(e)}finally{yield e.close(i)}}))})}doWriteStreamBufferedQueued(e,t,n){return new Promise((r,s)=>{let o=0;n.on("data",r=>i(this,void 0,void 0,function*(){n.pause();try{
yield this.doWriteBuffer(e,t,r,r.byteLength,o,0)}catch(e){return s(e)}o+=r.byteLength,setTimeout(()=>n.resume())})),n.on("error",e=>s(e)),n.on("end",()=>r())})}doWriteReadableBufferedQueued(e,t,n){return i(this,void 0,void 0,function*(){let i,r=0;for(;i=n.read();)yield this.doWriteBuffer(e,t,i,i.byteLength,r,0),r+=i.byteLength})}doWriteBuffer(e,t,n,r,s,o){return i(this,void 0,void 0,function*(){let i=0;for(;i<r;){i+=(yield e.write(t,s+i,n.buffer,o+i,r-i))}})}doWriteUnbuffered(e,t,n){return i(this,void 0,void 0,function*(){return this.ensureWriteQueue(e,t).queue(()=>this.doWriteUnbufferedQueued(e,t,n))})}doWriteUnbufferedQueued(e,t,n){return i(this,void 0,void 0,function*(){let i;return i=n instanceof g.VSBuffer?n:g.isVSBufferReadableStream(n)?yield g.streamToBuffer(n):g.readableToBuffer(n),e.writeFile(t,i.buffer,{create:!0,overwrite:!0})})}doPipeBuffered(e,t,n,r){return i(this,void 0,void 0,function*(){return this.ensureWriteQueue(n,r).queue(()=>this.doPipeBufferedQueued(e,t,n,r))})}
doPipeBufferedQueued(e,t,n,r){return i(this,void 0,void 0,function*(){let i=void 0,s=void 0;try{i=yield e.open(t,{create:!1}),s=yield n.open(r,{create:!0});const o=g.VSBuffer.alloc(this.BUFFER_SIZE);let a=0,l=0,c=0;do{c=yield e.read(i,a,o.buffer,l,o.byteLength-l),yield this.doWriteBuffer(n,s,o,c,a,l),a+=c,(l+=c)===o.byteLength&&(l=0)}while(c>0)}catch(e){throw this.ensureError(e)}finally{yield Promise.all(["number"==typeof i?e.close(i):Promise.resolve(),"number"==typeof s?n.close(s):Promise.resolve()])}})}doPipeUnbuffered(e,t,n,r){return i(this,void 0,void 0,function*(){return this.ensureWriteQueue(n,r).queue(()=>this.doPipeUnbufferedQueued(e,t,n,r))})}doPipeUnbufferedQueued(e,t,n,r){return i(this,void 0,void 0,function*(){return n.writeFile(r,yield e.readFile(t),{create:!0,overwrite:!0})})}doPipeUnbufferedToBuffered(e,t,n,r){return i(this,void 0,void 0,function*(){return this.ensureWriteQueue(n,r).queue(()=>this.doPipeUnbufferedToBufferedQueued(e,t,n,r))})}doPipeUnbufferedToBufferedQueued(e,t,n,r){
return i(this,void 0,void 0,function*(){const i=yield n.open(r,{create:!0});try{const r=yield e.readFile(t);yield this.doWriteBuffer(n,i,g.VSBuffer.wrap(r),r.byteLength,0,0)}catch(e){throw this.ensureError(e)}finally{yield n.close(i)}})}doPipeBufferedToUnbuffered(e,t,n,r){return i(this,void 0,void 0,function*(){const i=yield g.streamToBuffer(this.readFileBuffered(e,t,m.CancellationToken.None));yield this.doWriteUnbuffered(n,r,i)})}throwIfFileSystemIsReadonly(e){if(2048&e.capabilities)throw new o.FileOperationError(c.localize(19,null),6);return e}throwIfCancelled(e){if(e.isCancellationRequested)throw new Error("cancelled");return!0}ensureError(e){return e||new Error(c.localize(20,null))}throwIfTooLarge(e,t){if(t&&t.limits){if("number"==typeof t.limits.memory&&e>t.limits.memory)throw new o.FileOperationError(c.localize(21,null),9);if("number"==typeof t.limits.size&&e>t.limits.size)throw new o.FileOperationError(c.localize(22,null),7)}return!0}resourceForError(e){
return e.scheme===v.Schemas.file?e.fsPath:e.toString(!0)}};y=n([r(0,f.ILogService)],y),t.FileService=y}),define(e[83],t([0,1,14,48,2,29,6,13,5,3,26,80,12,8,99,40,64,67,62,76]),function(e,t,n,r,s,o,a,l,c,u,h,d,f,g,p,m,v,y,S,E){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class b extends s.Disposable{constructor(e,t){super(),this.logService=e,this.watcherOptions=t,this.onDidChangeCapabilities=a.Event.None,this.writeHandles=new Set,this.canFlush=!0,this._onDidWatchErrorOccur=this._register(new a.Emitter),this.onDidErrorOccur=this._onDidWatchErrorOccur.event,this._onDidChangeFile=this._register(new a.Emitter),this.recursiveFoldersToWatch=[],this.recursiveWatchRequestDelayer=this._register(new f.ThrottledDelayer(0))}get capabilities(){return this._capabilities||(this._capabilities=14,l.isLinux&&(this._capabilities|=1024)),this._capabilities}stat(e){return i(this,void 0,void 0,function*(){try{const{stat:t,isSymbolicLink:i}=yield c.statLink(this.toFilePath(e));return{type:this.toType(t,i),
ctime:t.ctime.getTime(),mtime:t.mtime.getTime(),size:t.size}}catch(e){throw this.toFileSystemProviderError(e)}})}readdir(e){return i(this,void 0,void 0,function*(){try{const t=yield c.readdirWithFileTypes(this.toFilePath(e)),n=[];return yield Promise.all(t.map(t=>i(this,void 0,void 0,function*(){try{let i;i=t.isSymbolicLink()?(yield this.stat(h.joinPath(e,t.name))).type:this.toType(t),n.push([t.name,i])}catch(e){this.logService.trace(e)}}))),n}catch(e){throw this.toFileSystemProviderError(e)}})}toType(e,t=e.isSymbolicLink()){return t?o.FileType.SymbolicLink|(e.isDirectory()?o.FileType.Directory:o.FileType.File):e.isFile()?o.FileType.File:e.isDirectory()?o.FileType.Directory:o.FileType.Unknown}readFile(e){return i(this,void 0,void 0,function*(){try{const t=this.toFilePath(e);return yield c.readFile(t)}catch(e){throw this.toFileSystemProviderError(e)}})}writeFile(e,t,n){return i(this,void 0,void 0,function*(){let i=void 0;try{const r=this.toFilePath(e),s=yield c.exists(r)
;if(s&&!n.overwrite)throw o.createFileSystemProviderError(new Error(p.localize(0,null)),o.FileSystemProviderErrorCode.FileExists);if(!s&&!n.create)throw o.createFileSystemProviderError(new Error(p.localize(1,null)),o.FileSystemProviderErrorCode.FileNotFound);i=yield this.open(e,{create:!0}),yield this.write(i,0,t,0,t.byteLength)}catch(e){throw this.toFileSystemProviderError(e)}finally{"number"==typeof i&&(yield this.close(i))}})}open(e,t){return i(this,void 0,void 0,function*(){try{const i=this.toFilePath(e);let s=void 0;if(t.create){if(l.isWindows&&(yield c.exists(i)))try{yield c.truncate(i,0),s="r+"}catch(e){this.logService.trace(e)}s||(s="w")}else s="r";const o=yield r.promisify(n.open)(i,s);return t.create&&this.writeHandles.add(o),o}catch(e){throw this.toFileSystemProviderError(e)}})}close(e){return i(this,void 0,void 0,function*(){try{if(this.writeHandles.delete(e)&&this.canFlush)try{yield r.promisify(n.fdatasync)(e)}catch(e){this.canFlush=!1,this.logService.error(e)}return yield r.promisify(n.close)(e)
}catch(e){throw this.toFileSystemProviderError(e)}})}read(e,t,s,o,a){return i(this,void 0,void 0,function*(){try{const i=yield r.promisify(n.read)(e,s,o,a,t);return"number"==typeof i?i:i.bytesRead}catch(e){throw this.toFileSystemProviderError(e)}})}write(e,t,n,r,s){return i(this,void 0,void 0,function*(){return f.retry(()=>this.doWrite(e,t,n,r,s),100,3)})}doWrite(e,t,s,o,a){return i(this,void 0,void 0,function*(){try{const i=yield r.promisify(n.write)(e,s,o,a,t);return"number"==typeof i?i:i.bytesWritten}catch(e){throw this.toFileSystemProviderError(e)}})}mkdir(e){return i(this,void 0,void 0,function*(){try{yield r.promisify(n.mkdir)(this.toFilePath(e))}catch(e){throw this.toFileSystemProviderError(e)}})}delete(e,t){return i(this,void 0,void 0,function*(){try{const i=this.toFilePath(e);yield this.doDelete(i,t)}catch(e){throw this.toFileSystemProviderError(e)}})}doDelete(e,t){return i(this,void 0,void 0,function*(){t.recursive?yield c.rimraf(e,c.RimRafMode.MOVE):yield c.unlink(e)})}rename(e,t,n){
return i(this,void 0,void 0,function*(){const i=this.toFilePath(e),r=this.toFilePath(t);if(i!==r)try{yield this.validateTargetDeleted(e,t,"move",n&&n.overwrite),yield c.move(i,r)}catch(e){throw"EINVAL"!==e.code&&"EBUSY"!==e.code&&"ENAMETOOLONG"!==e.code||(e=new Error(p.localize(2,null,u.basename(i),u.basename(u.dirname(r)),e.toString()))),this.toFileSystemProviderError(e)}})}copy(e,t,n){return i(this,void 0,void 0,function*(){const i=this.toFilePath(e),r=this.toFilePath(t);if(i!==r)try{yield this.validateTargetDeleted(e,t,"copy",n&&n.overwrite),yield c.copy(i,r)}catch(e){throw"EINVAL"!==e.code&&"EBUSY"!==e.code&&"ENAMETOOLONG"!==e.code||(e=new Error(p.localize(3,null,u.basename(i),u.basename(u.dirname(r)),e.toString()))),this.toFileSystemProviderError(e)}})}validateTargetDeleted(e,t,n,r){return i(this,void 0,void 0,function*(){const i=!!(1024&this.capabilities),s=this.toFilePath(e),a=this.toFilePath(t);let l=!1;if(i||(l=d.isEqual(s,a,!0)),
l&&"copy"===n)throw o.createFileSystemProviderError(new Error("File cannot be copied to same path with different path case"),o.FileSystemProviderErrorCode.FileExists);if(!l&&(yield c.exists(a))){if(!r)throw o.createFileSystemProviderError(new Error("File at target already exists"),o.FileSystemProviderErrorCode.FileExists);yield 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(),s.toDisposable(()=>{this.recursiveFoldersToWatch.splice(this.recursiveFoldersToWatch.indexOf(i),1),this.refreshRecursiveWatchers()})}refreshRecursiveWatchers(){this.recursiveWatchRequestDelayer.trigger(()=>(this.doRefreshRecursiveWatchers(),Promise.resolve()))}doRefreshRecursiveWatchers(){
if(this.recursiveWatcher instanceof S.FileWatcher)this.recursiveWatcher.setFolders(this.recursiveFoldersToWatch);else if(s.dispose(this.recursiveWatcher),this.recursiveWatcher=void 0,this.recursiveFoldersToWatch.length>0){let e,t=void 0;this.watcherOptions&&this.watcherOptions.usePolling?(e=v.FileWatcher,t=this.watcherOptions):e=1===this.recursiveFoldersToWatch.length?l.isWindows?y.FileWatcher:v.FileWatcher:S.FileWatcher,this.recursiveWatcher=new e(this.recursiveFoldersToWatch,e=>this._onDidChangeFile.fire(m.toFileChanges(e)),e=>{"error"===e.type&&this._onDidWatchErrorOccur.fire(e.message),this.logService[e.type](e.message)},this.logService.getLevel()===g.LogLevel.Trace,t),this.recursiveWatcherLogLevelListener||(this.recursiveWatcherLogLevelListener=this.logService.onDidChangeLogLevel(e=>{this.recursiveWatcher&&this.recursiveWatcher.setVerboseLogging(this.logService.getLevel()===g.LogLevel.Trace)}))}}watchNonRecursive(e){
const t=new E.FileWatcher(this.toFilePath(e),e=>this._onDidChangeFile.fire(m.toFileChanges(e)),e=>{"error"===e.type&&this._onDidWatchErrorOccur.fire(e.message),this.logService[e.type](e.message)},this.logService.getLevel()===g.LogLevel.Trace),i=this.logService.onDidChangeLogLevel(e=>{t.setVerboseLogging(this.logService.getLevel()===g.LogLevel.Trace)});return s.combinedDisposable(t,i)}toFilePath(e){return u.normalize(e.fsPath)}toFileSystemProviderError(e){if(e instanceof o.FileSystemProviderError)return e;let t;switch(e.code){case"ENOENT":t=o.FileSystemProviderErrorCode.FileNotFound;break;case"EISDIR":t=o.FileSystemProviderErrorCode.FileIsADirectory;break;case"EEXIST":t=o.FileSystemProviderErrorCode.FileExists;break;case"EPERM":case"EACCES":t=o.FileSystemProviderErrorCode.NoPermissions;break;default:t=o.FileSystemProviderErrorCode.Unknown}return o.createFileSystemProviderError(e,t)}dispose(){super.dispose(),s.dispose(this.recursiveWatcher),this.recursiveWatcher=void 0,
s.dispose(this.recursiveWatcherLogLevelListener),this.recursiveWatcherLogLevelListener=void 0}}t.DiskFileSystemProvider=b}),define(e[84],t([0,1,3,8]),function(e,t,n,r){"use strict";function s(e,t,i){switch(t){case r.LogLevel.Trace:return e.trace(i);case r.LogLevel.Debug:return e.debug(i);case r.LogLevel.Info:return e.info(i);case r.LogLevel.Warning:return e.warn(i);case r.LogLevel.Error:return e.error(i);case r.LogLevel.Critical:return e.critical(i);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 o extends r.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=function(t,r){return i(this,void 0,void 0,function*(){try{const i=yield new Promise((t,i)=>{e(["spdlog"],t,i)});i.setAsyncMode(8192,500);const s=n.join(r,`${t}.log`);return i.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)s(this._logger,e,t);this.buffer=[]}})),this._loggerCreationPromise}_log(e,t){this._logger?s(this._logger,e,t):this.getLevel()<=e&&this.buffer.push({level:e,message:t})}trace(){this.getLevel()<=r.LogLevel.Trace&&this._log(r.LogLevel.Trace,this.format(arguments))}debug(){this.getLevel()<=r.LogLevel.Debug&&this._log(r.LogLevel.Debug,this.format(arguments))}info(){this.getLevel()<=r.LogLevel.Info&&this._log(r.LogLevel.Info,this.format(arguments))}warn(){this.getLevel()<=r.LogLevel.Warning&&this._log(r.LogLevel.Warning,this.format(arguments))}error(){
if(this.getLevel()<=r.LogLevel.Error){const e=arguments[0];if(e instanceof Error){const t=Array.prototype.slice.call(arguments);t[0]=e.stack,this._log(r.LogLevel.Error,this.format(t))}else this._log(r.LogLevel.Error,this.format(arguments))}}critical(){this.getLevel()<=r.LogLevel.Critical&&this._log(r.LogLevel.Critical,this.format(arguments))}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=o}),define(e[45],t([0,1,4]),function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IProductService=i.createDecorator("productService")}),define(e[86],t([0,1,23,87,68,46,3,26,82,32,33,72,13,19,22]),function(e,t,i,r,s,o,a,l,c,u,h,d,f,g,p){"use strict"
;function m(e,i){return f.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)}function v(e,t){return S(e["inspect-extensions"],e["inspect-brk-extensions"],5870,t,e.debugId)}function y(e,t){return S(e["inspect-search"],e["inspect-brk-search"],5876,t)}function S(e,t,i,n,r){const s=t||e,o=Number(s)||(n?null:i);return{port:o,break:!!o&&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 b(e,t){return E(e["user-data-dir"],t)||a.resolve(s.getDefaultUserDataPath(t.platform))}Object.defineProperty(t,"__esModule",{value:!0}),t.xdgRuntimeDir=process.env.XDG_RUNTIME_DIR;class C{
constructor(e,t){if(this._args=e,this._execPath=t,this.webviewResourceRoot="vscode-resource:{{resource}}",this.webviewCspSource="vscode-resource:",!process.env.VSCODE_LOGS){const e=d.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(g.getPathFromAmdModule(e,""))}get execPath(){return this._execPath}get cliPath(){return function(e,t,i){return f.isWindows?i?a.join(a.dirname(e),"bin",`${h.default.applicationName}.cmd`):a.join(t,"scripts","code-cli.bat"):f.isLinux?i?a.join(a.dirname(e),"bin",`${h.default.applicationName}`):a.join(t,"scripts","code-cli.sh"):i?a.join(t,"bin","code"):a.join(t,"scripts","code-cli.sh")}(this.execPath,this.appRoot,this.isBuilt)}get userHome(){return o.homedir()}get userDataPath(){const e=process.env.VSCODE_PORTABLE;return e?a.join(e,"user-data"):b(this._args,process)}get webUserDataHome(){
return p.URI.file(E(this._args["web-user-data-dir"],process)||this.userDataPath)}get appNameLong(){return h.default.nameLong}get appQuality(){return h.default.quality}get appSettingsHome(){return p.URI.file(a.join(this.userDataPath,"User"))}get userRoamingDataHome(){return this.appSettingsHome}get settingsResource(){return l.joinPath(this.userRoamingDataHome,"settings.json")}get machineSettingsHome(){return p.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 localeResource(){return l.joinPath(this.userRoamingDataHome,"locale.json")}get isExtensionDevelopment(){
return!!this._args.extensionDevelopmentPath}get backupHome(){return p.URI.file(a.join(this.userDataPath,i.BACKUPS))}get backupWorkspacesPath(){return a.join(this.backupHome.fsPath,"workspaces.json")}get untitledWorkspacesHome(){return p.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(g.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,h.default.dataFolderName,"extensions")}get extensionDevelopmentLocationURI(){const e=this._args.extensionDevelopmentPath
;return Array.isArray(e)?e.map(e=>/^[^:/?#]+?:\/\//.test(e)?p.URI.parse(e):p.URI.file(a.normalize(e))):e?/^[^:/?#]+?:\/\//.test(e)?[p.URI.parse(e)]:[p.URI.file(a.normalize(e))]:void 0}get extensionTestsLocationURI(){const e=this._args.extensionTestsPath;if(e)return/^[^:/?#]+?:\/\//.test(e)?p.URI.parse(e):p.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 skipGettingStarted(){return!!this._args["skip-getting-started"]}get skipReleaseNotes(){return!!this._args["skip-release-notes"]}get skipAddToRecentlyOpened(){return!!this._args["skip-add-to-recently-opened"]}get debugExtensionHost(){return v(this._args,this.isBuilt)}get debugSearch(){return y(this._args,this.isBuilt)}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 logExtensionHostCommunication(){return!!this._args.logExtensionHostCommunication}get status(){return!!this._args.status}get mainIPCHandle(){return m(this.userDataPath,"main")}get sharedIPCHandle(){return m(this.userDataPath,"shared")}get nodeCachedDataDir(){return process.env.VSCODE_NODE_CACHED_DATA_DIR||void 0}get galleryMachineIdResource(){return l.joinPath(p.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"]}}n([c.memoize],C.prototype,"appRoot",null),n([c.memoize],C.prototype,"cliPath",null),n([c.memoize],C.prototype,"userHome",null),n([c.memoize],C.prototype,"userDataPath",null),n([c.memoize],C.prototype,"webUserDataHome",null),n([c.memoize],C.prototype,"appSettingsHome",null),n([c.memoize],C.prototype,"userRoamingDataHome",null),n([c.memoize],C.prototype,"settingsResource",null),
n([c.memoize],C.prototype,"machineSettingsHome",null),n([c.memoize],C.prototype,"machineSettingsResource",null),n([c.memoize],C.prototype,"globalStorageHome",null),n([c.memoize],C.prototype,"workspaceStorageHome",null),n([c.memoize],C.prototype,"keybindingsResource",null),n([c.memoize],C.prototype,"keyboardLayoutResource",null),n([c.memoize],C.prototype,"localeResource",null),n([c.memoize],C.prototype,"isExtensionDevelopment",null),n([c.memoize],C.prototype,"backupHome",null),n([c.memoize],C.prototype,"backupWorkspacesPath",null),n([c.memoize],C.prototype,"untitledWorkspacesHome",null),n([c.memoize],C.prototype,"installSourcePath",null),n([c.memoize],C.prototype,"builtinExtensionsPath",null),n([c.memoize],C.prototype,"extensionsPath",null),n([c.memoize],C.prototype,"extensionDevelopmentLocationURI",null),n([c.memoize],C.prototype,"extensionTestsLocationURI",null),n([c.memoize],C.prototype,"debugExtensionHost",null),n([c.memoize],C.prototype,"debugSearch",null),n([c.memoize],C.prototype,"mainIPCHandle",null),
n([c.memoize],C.prototype,"sharedIPCHandle",null),n([c.memoize],C.prototype,"nodeCachedDataDir",null),n([c.memoize],C.prototype,"galleryMachineIdResource",null),t.EnvironmentService=C,t.parseExtensionHostPort=v,t.parseSearchPort=y,t.parseUserDataDir=b}),define(e[91],t([0,1,5,87,28,2,23,12,27,8,79,33,30,6,21,3]),function(e,t,i,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 S=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 E(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))))}}
;S=n([r(0,o.IExtensionManagementService),r(1,l.IEnvironmentService),r(2,h.ILogService)],S),t.LocalizationsService=S;let E=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 i.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),i.writeFile(this.languagePacksFilePath,t)}).then(()=>t,e=>this.logService.error(e))})}};E=n([r(0,l.IEnvironmentService),r(1,h.ILogService)],E)}),define(e[92],t([0,1,33,32]),function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{get version(){return n.default.version}get commit(){return i.default.commit}get nameLong(){return i.default.nameLong}get urlProtocol(){return i.default.urlProtocol}get extensionAllowedProposedApi(){return i.default.extensionAllowedProposedApi}get uiExtensions(){return i.default.uiExtensions}get enableTelemetry(){return i.default.enableTelemetry}get sendASmile(){return i.default.sendASmile}get extensionsGallery(){return i.default.extensionsGallery}get settingsSearchBuildId(){return i.default.settingsSearchBuildId}
get settingsSearchUrl(){return i.default.settingsSearchUrl}get experimentsUrl(){return i.default.experimentsUrl}get extensionKeywords(){return i.default.extensionKeywords}get extensionAllowedBadgeProviders(){return i.default.extensionAllowedBadgeProviders}}t.ProductService=r}),define(e[17],t([0,1,9,114]),function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{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}}t.Registry=new r}),define(e[94],t([0,1,17,6]),function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Extensions={JSONContribution:"base.contributions.json"};class r{constructor(){this._onDidChangeSchema=new n.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.schemasById={}}registerSchema(e,t){this.schemasById[function(e){
return e.length>0&&"#"===e.charAt(e.length-1)?e.substring(0,e.length-1):e}(e)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}getSchemaContributions(){return{schemas:this.schemasById}}}const s=new r;i.Registry.add(t.Extensions.JSONContribution,s)}),define(e[25],t([0,1,88,6,17,9,16,94]),function(e,t,i,n,r,s,o,a){"use strict";function l(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}}function c(e){return t.OVERRIDE_PROPERTY_PATTERN.test(e)?i.localize(3,null,e):void 0!==p.getConfigurationProperties()[e]?i.localize(4,null,e):null}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"}(t.ConfigurationScope||(t.ConfigurationScope={})),t.allSettings={properties:{},
patternProperties:{}},t.applicationSettings={properties:{},patternProperties:{}},t.machineSettings={properties:{},patternProperties:{}},t.windowSettings={properties:{},patternProperties:{}},t.resourceSettings={properties:{},patternProperties:{}},t.editorConfigurationSchemaId="vscode://schemas/settings/editor";const u=r.Registry.as(a.Extensions.JSONContribution);class h{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"},this.configurationProperties={},this.excludedConfigurationProperties={},
this.computeOverridePropertyPattern(),u.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 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)}u.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 u;if(i&&(u=c(e))){console.warn(u),delete a[e];continue}let h=a[e],d=h.default;s.isUndefined(d)&&(h.default=l(h.type)),r&&(h.overridable=!0),t.OVERRIDE_PROPERTY_PATTERN.test(e)?h.scope=void 0:h.scope=s.isUndefinedOrNull(h.scope)?n:h.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 u=e.allOf;if(u)for(let e of u)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 i(e){let n=e.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 3:t.windowSettings.properties[e]=n[e];break;case 4:t.resourceSettings.properties[e]=n[e]}let r=e.allOf;r&&r.forEach(i)}i(e)}updateSchemaForOverrideSettingsConfiguration(e){e.id!==d&&(this.update(e),u.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.windowSettings.patternProperties[this.overridePropertyPattern],delete t.resourceSettings.patternProperties[this.overridePropertyPattern],this.computeOverridePropertyPattern(),t.allSettings.patternProperties[this.overridePropertyPattern]=e,t.applicationSettings.patternProperties[this.overridePropertyPattern]=e,t.machineSettings.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(){this.overridePropertyPattern=this.overrideIdentifiers.length?g.replace("${0}",this.overrideIdentifiers.map(e=>o.createRegExp(e,!1).source).join("|")):f}}
const d="override",f="\\[.*\\]$",g="\\[(${0})\\]$";t.OVERRIDE_PROPERTY_PATTERN=new RegExp(f),t.getDefaultValue=l;const p=new h;r.Registry.add(t.Extensions.Configuration,p),t.validateProperty=c,t.getScopes=function(){const e=[],t=p.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[18],t([0,1,10,9,22,17,4,25]),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){const i=t.shift();if(0!==t.length){if(-1!==Object.keys(e).indexOf(i)){const n=e[i]
;"object"!=typeof n||Array.isArray(n)||(u(n,t),0===Object.keys(n).length&&delete e[i])}}else delete e[i]}function h(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 d(e,t,i){Object.keys(t).forEach(r=>{r in e?n.isObject(e[r])&&n.isObject(t[r])?d(e[r],t[r],i):i&&(e[r]=t[r]):e[r]=t[r]})}function f(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=h(e.contents,n),o=h(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:[f(r).trim()],contents:l(s,t)})}return i},t.toValuesTree=l,t.addToValueTree=c,t.removeFromValueTree=function(e,t){u(e,t.split("."))},t.getConfigurationValue=h,t.merge=d,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=f,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[97],t([0,1,53,31,30,9,10,25,18,17]),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;class h 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.DefaultConfigurationModel=h;class d{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){function t(e){Array.isArray(s)?s.push(e):r&&(s[r]=e)}let n={},r=null,s=[],o=[],a=[],l={onObjectBegin:()=>{let e={};t(e),o.push(s),s=e,r=null},onObjectProperty:e=>{r=e},onObjectEnd:()=>{s=o.pop()},onArrayBegin:()=>{let e=[];t(e),o.push(s),s=e,r=null},onArrayEnd:()=>{s=o.pop()},onLiteralValue:t,onError:(e,t,i)=>{a.push({error:e,offset:t,length:i})}};if(e)try{i.visit(e,l),n=s[0]||{}}catch(e){
console.error(`Error while parsing settings file ${this._name}: ${e}`),this._parseErrors=[e]}return n}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.ConfigurationModelParser=d;class f{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}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: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 s.withUndefinedAsNull(this._folderConfigurations.get(i.uri))}return null}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}}t.Configuration=f;class g{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=g
;class p extends g{constructor(e=new u,t=new n.ResourceMap){super(),this._changedConfiguration=e,this._changedConfigurationByResource=t}get changedConfiguration(){return this._changedConfiguration}get changedConfigurationByResource(){return this._changedConfigurationByResource}change(e,t){if(e instanceof p){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());for(const t of i)if(this.doesConfigurationContains(t,e))return!0;return!1}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=p}),define(e[98],t([0,1,17,25,2,18,97,6,71,20,21]),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[52],t([0,1,105,4,25,17,15]),function(e,t,n,r,s,o,a){"use strict";function l(e){return e.res.statusCode&&e.res.statusCode>=200&&e.res.statusCode<300||1223===e.res.statusCode}function c(e){return 204===e.res.statusCode}Object.defineProperty(t,"__esModule",{value:!0}),t.IRequestService=r.createDecorator("requestService"),t.asText=function(e){return i(this,void 0,void 0,function*(){if(!l(e))throw new Error("Server returned "+e.res.statusCode);return c(e)?null:(yield a.streamToBuffer(e.stream)).toString()})},t.asJson=function(e){return i(this,void 0,void 0,function*(){if(!l(e))throw new Error("Server returned "+e.res.statusCode);if(c(e))return null;const t=yield a.streamToBuffer(e.stream)
;return JSON.parse(t.toString())})},o.Registry.as(s.Extensions.Configuration).registerConfiguration({id:"http",order:15,title:n.localize(0,null),type:"object",properties:{"http.proxy":{type:"string",pattern:"^https?://([^:]*(:[^@]*)?@)?([^:]+)(:\\d+)?/?$|^$",markdownDescription:n.localize(1,null)},"http.proxyStrictSSL":{type:"boolean",default:!0,description:n.localize(2,null)},"http.proxyAuthorization":{type:["null","string"],default:null,markdownDescription:n.localize(3,null)},"http.proxySupport":{type:"string",enum:["off","on","override"],enumDescriptions:[n.localize(4,null),n.localize(5,null),n.localize(6,null)],default:"override",description:n.localize(7,null)},"http.systemCertificates":{type:"boolean",default:!0,description:n.localize(8,null)}}})}),define(e[100],t([0,1,101,9]),function(e,t,n,r){"use strict";function s(t,s={}){return i(this,void 0,void 0,function*(){const i=n.parse(t),o=s.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:null}(i);if(!o)return null;const a=n.parse(o);if(!/^https?:$/.test(a.protocol||""))return null;const l={host:a.hostname||"",port:Number(a.port),auth:a.auth,rejectUnauthorized:!r.isBoolean(s.strictSSL)||s.strictSSL};return new("http:"===i.protocol?yield new Promise((t,i)=>{e(["http-proxy-agent"],t,i)}):yield new Promise((t,i)=>{e(["https-proxy-agent"],t,i)}))(l)})}Object.defineProperty(t,"__esModule",{value:!0}),t.getProxyAgent=s}),define(e[102],t([0,1,4]),function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IStateService=i.createDecorator("stateService")}),define(e[103],t([0,1,3,14,23,5,9,8]),function(e,t,s,o,a,l,c,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class h{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}init(){return i(this,void 0,void 0,function*(){if(this._database)return;const e=yield this.loadAsync();this._database||(this._database=e)})}loadSync(){try{return this.lastFlushedSerializedDatabase=o.readFileSync(this.dbPath).toString(),JSON.parse(this.lastFlushedSerializedDatabase)}catch(e){return"ENOENT"!==e.code&&this.onError(e),{}}}loadAsync(){return i(this,void 0,void 0,function*(){try{return this.lastFlushedSerializedDatabase=(yield l.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 c.isUndefinedOrNull(i)?t:i}setItem(e,t){if(c.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){
c.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{l.writeFileSync(this.dbPath,e),this.lastFlushedSerializedDatabase=e}catch(e){this.onError(e)}}}t.FileStorage=h;let d=class e{constructor(t,i){this.fileStorage=new h(s.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)}};d.STATE_FILE="storage.json",d=n([r(0,a.IEnvironmentService),r(1,u.ILogService)],d),t.StateService=d}),define(e[104],t([0,1,4,6,2,9,31,15]),function(e,t,n,r,s,o,a,l){"use strict";function c(e,t,n,r){return i(this,void 0,void 0,function*(){const i=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,i(e))});const a=new Map,l=new Map;t.forEach((e,t)=>{a.set(t,e),l.set(t,i(e))}),
console.group(`Storage: Global (path: ${n})`);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: ${r})`);let u=[];a.forEach((e,t)=>{u.push({key:t,value:e})}),console.table(u),console.groupEnd(),console.log(l)})}Object.defineProperty(t,"__esModule",{value:!0}),t.IStorageService=n.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 u extends s.Disposable{constructor(){super(...arguments),this._serviceBrand=null,this._onDidChangeStorage=this._register(new r.Emitter),this.onDidChangeStorage=this._onDidChangeStorage.event,this.onWillSaveState=r.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 o.isUndefinedOrNull(n)?i:n}getBoolean(e,t,i){const n=this.getCache(t).get(e);return o.isUndefinedOrNull(n)?i:"true"===n}getNumber(e,t,i){const n=this.getCache(t).get(e);return o.isUndefinedOrNull(n)?i:parseInt(n,10)}store(e,t,i){if(o.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(){c(this.globalCache,this.workspaceCache,"inMemory","inMemory")}}t.InMemoryStorageService=u;class h extends s.Disposable{constructor(e,t){super(),this.file=e,this.fileService=t,this.onDidChangeItemsExternal=r.Event.None,this.pendingUpdate=Promise.resolve()}getItems(){return i(this,void 0,void 0,function*(){if(!this.cache)try{this.cache=yield this.doGetItemsFromFile()}catch(e){this.cache=new Map}return this.cache})}
doGetItemsFromFile(){return i(this,void 0,void 0,function*(){yield this.pendingUpdate;const e=yield this.fileService.readFile(this.file);return a.serializableToMap(JSON.parse(e.value.toString()))})}updateItems(e){return i(this,void 0,void 0,function*(){const t=yield this.getItems();return e.insert&&e.insert.forEach((e,i)=>t.set(i,e)),e.delete&&e.delete.forEach(e=>t.delete(e)),yield this.pendingUpdate,this.pendingUpdate=this.fileService.writeFile(this.file,l.VSBuffer.fromString(JSON.stringify(a.mapToSerializable(t)))).then(),this.pendingUpdate})}close(){return this.pendingUpdate}}t.FileStorageDatabase=h,t.logStorage=c}),define(e[37],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[106],t([0,1,20,28,27,10,37,52,47,23,54,31,24,8,29,26,15,45,104,4]),function(e,t,s,o,a,l,c,u,h,d,f,g,p,m,v,y,S,E,b,C){"use strict";function w(...e){return String(e.reduce((e,t)=>e|t,0))}function P(e,t){const i=(e||[]).filter(e=>e.statisticName===t)[0];return i?i.value:0}function x(e,t){return e.files.filter(e=>e.assetType===t)[0]?{uri:`${e.assetUri}/${t}`,fallbackUri:`${e.fallbackAssetUri}/${t}`}:null}function _(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=>a.adoptToGalleryExtensionId(e)):[]}function I(e){const t=e.properties?e.properties.filter(e=>e.key===F.Engine):[];return t.length>0&&t[0].value||""}function L(t,i,n,r,s){const o={manifest:x(i,R.Manifest),readme:x(i,R.Details),changelog:x(i,R.Changelog),license:x(i,R.License),repository:function(e){if(e.properties){const t=e.properties.filter(e=>e.key===R.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 x(e,R.Repository)}(i),download:function(e){return{uri:`${e.fallbackAssetUri}/${R.VSIX}?redirect=true`,fallbackUri:`${e.fallbackAssetUri}/${R.VSIX}`}}(i),icon:function(t){const i=x(t,R.Icon);if(i)return i;const n=e.toUrl("./media/defaultIcon.png");return{uri:n,fallbackUri:n}}(i),coreTranslations:function(e){return e.files.filter(e=>0===e.assetType.indexOf("Microsoft.VisualStudio.Code.Translation.")).reduce((t,i)=>{const n=x(e,i.assetType);return n&&t.push([i.assetType.substring("Microsoft.VisualStudio.Code.Translation.".length),n]),t},[])}(i)};return{identifier:{id:a.getGalleryExtensionId(t.publisher.publisherName,t.extensionName),uuid:t.extensionId},name:t.extensionName,version:i.version,date:i.lastUpdated,displayName:t.displayName,publisherId:t.publisher.publisherId,publisher:t.publisher.publisherName,publisherDisplayName:t.publisher.displayName,description:t.shortDescription||"",installCount:P(t.statistics,"install")+P(t.statistics,"updateCount"),
rating:P(t.statistics,"averagerating"),ratingCount:P(t.statistics,"ratingcount"),assets:o,properties:{dependencies:_(i,F.Dependency),extensionPack:_(i,F.ExtensionPack),engine:I(i),localizedLanguages:function(e){const t=e.properties?e.properties.filter(e=>e.key===F.LocalizedLanguages):[],i=t.length>0&&t[0].value||"";return i?i.split(","):[]}(i)},telemetryData:{index:(r.pageNumber-1)*r.pageSize+n,searchText:r.searchText,querySource:s},preview:function(e){return-1!==e.indexOf("preview")}(t.flags)}}function D(e,t,n,r){return i(this,void 0,void 0,function*(){const i={"X-Market-Client-Id":`VSCode ${e}`,"User-Agent":`VSCode ${e}`};let s=null;if(t.galleryMachineIdResource){try{const e=(yield n.readFile(t.galleryMachineIdResource)).value.toString();s=f.isUUID(e)?e:null}catch(e){s=null}if(!s){s=f.generateUuid();try{yield n.writeFile(t.galleryMachineIdResource,S.VSBuffer.fromString(s))}catch(e){}}}return r&&((s=r.get("marketplace.userid",0)||null)||(s=f.generateUuid(),r.store("marketplace.userid",s,0))),
s&&(i["X-Market-User-Id"]=s),i})}Object.defineProperty(t,"__esModule",{value:!0});var O;!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"}(O||(O={}));var k;!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"}(k||(k={}));const R={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"},F={Dependency:"Microsoft.VisualStudio.Code.ExtensionDependencies",ExtensionPack:"Microsoft.VisualStudio.Code.ExtensionPack",Engine:"Microsoft.VisualStudio.Code.Engine",LocalizedLanguages:"Microsoft.VisualStudio.Code.LocalizedLanguages"},T={pageNumber:1,pageSize:10,sortBy:0,sortOrder:0,flags:O.None,criteria:[],assetTypes:[]};class M{constructor(e=T){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 M(l.assign({},this.state,{pageNumber:e,pageSize:t}))}withFilter(e,...t){
const i=[...this.state.criteria,...t.map(t=>({filterType:e,value:t}))];return new M(l.assign({},this.state,{criteria:i}))}withSortBy(e){return new M(l.assign({},this.state,{sortBy:e}))}withSortOrder(e){return new M(l.assign({},this.state,{sortOrder:e}))}withFlags(...e){return new M(l.assign({},this.state,{flags:e.reduce((e,t)=>e|t,0)}))}withAssetTypes(...e){return new M(l.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===k.SearchText)[0];return e&&e.value?e.value:""}}let j=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=D(s.version,this.environmentService,this.fileService,this.storageService)}api(e=""){return`${this.extensionsGalleryUrl}${e}`}isEnabled(){return!!this.extensionsGalleryUrl}getCompatibleExtension(e,t){const i=o.isIExtensionIdentifier(e)?null:e;if(i&&i.properties.engine&&h.isEngineValid(i.properties.engine,this.productService.version))return Promise.resolve(i);const{id:n,uuid:r}=i?i.identifier:e;let s=(new M).withFlags(O.IncludeAssetUri,O.IncludeStatistics,O.IncludeFiles,O.IncludeVersionProperties,O.ExcludeNonValidated).withPage(1,1).withFilter(k.Target,"Microsoft.VisualStudio.Code").withFilter(k.ExcludeWithFlags,w(O.Unpublished));return s=r?s.withFilter(k.ExtensionId,r):s.withFilter(k.ExtensionName,n),this.queryGallery(s,p.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=L(i,e,0,s)
;if(t.properties.engine&&h.isEngineValid(t.properties.engine,this.productService.version))return t}return null}return this.getLastValidExtensionVersion(i,i.versions).then(e=>e?L(i,e,0,s):null)})}query(e,t){const i=p.CancellationToken.isCancellationToken(e)?{}:e,n=p.CancellationToken.isCancellationToken(e)?e:t;if(!this.isEnabled())return Promise.reject(new Error("No extension gallery service configured."));const r=i.names?"ids":i.text?"text":"all";let o=i.text||"";const a=l.getOrDefault(i,e=>e.pageSize,50);this.telemetryService.publicLog2("galleryService:query",{type:r,text:o});let c=(new M).withFlags(O.IncludeLatestVersionOnly,O.IncludeAssetUri,O.IncludeStatistics,O.IncludeFiles,O.IncludeVersionProperties).withPage(1,a).withFilter(k.Target,"Microsoft.VisualStudio.Code").withFilter(k.ExcludeWithFlags,w(O.Unpublished));return o?((o=(o=(o=o.replace(/\bcategory:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g,(e,t,i)=>(c=c.withFilter(k.Category,i||t),
""))).replace(/\btag:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g,(e,t,i)=>(c=c.withFilter(k.Tag,i||t),""))).trim())&&(o=o.length<200?o:o.substring(0,200),c=c.withFilter(k.SearchText,o)),c=c.withSortBy(0)):c=i.ids?c.withFilter(k.ExtensionId,...i.ids):i.names?c.withFilter(k.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)=>L(e,e.versions[0],t,c,i.source)),total:t,pageSize:c.pageSize,getPage:(e,t)=>{if(t.isCancellationRequested)return Promise.reject(s.canceled());const n=c.withPage(e+1);return this.queryGallery(n,t).then(({galleryExtensions:e})=>e.map((e,t)=>L(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=l.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}:u.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({},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},p.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=y.joinPath(t,f.generateUuid()),r=a.getGalleryExtensionTelemetryData(e),s=(new Date).getTime(),o=1===i?"install":2===i?"update":"",c=o?{uri:`${e.assets.download.uri}&${o}=true`,fallbackUri:`${e.assets.download.fallbackUri}?${o}=true`}:e.assets.download;return this.getAsset(c).then(e=>this.fileService.writeFile(n,e.stream)).then(()=>(e=>this.telemetryService.publicLog("galleryService:downloadVSIX",l.assign(r,{duration:e})))((new Date).getTime()-s)).then(()=>n)}getReadme(e,t){return e.assets.readme?this.getAsset(e.assets.readme,{},t).then(e=>u.asText(e)).then(e=>e||""):Promise.resolve("")}getManifest(e,t){return e.assets.manifest?this.getAsset(e.assets.manifest,{},t).then(u.asText).then(JSON.parse):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(u.asText).then(JSON.parse):Promise.resolve(null)}getChangelog(e,t){
return e.assets.changelog?this.getAsset(e.assets.changelog,{},t).then(e=>u.asText(e)).then(e=>e||""):Promise.resolve("")}getAllVersions(e,t){let i=(new M).withFlags(O.IncludeVersions,O.IncludeFiles,O.IncludeVersionProperties,O.ExcludeNonValidated).withPage(1,1).withFilter(k.Target,"Microsoft.VisualStudio.Code").withFilter(k.ExcludeWithFlags,w(O.Unpublished));return i=e.identifier.uuid?i.withFilter(k.ExtensionId,e.identifier.uuid):i.withFilter(k.ExtensionName,e.identifier.id),this.queryGallery(i,p.CancellationToken.None).then(({galleryExtensions:e})=>e.length?t?Promise.all(e[0].versions.map(e=>this.getEngine(e).then(t=>h.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=p.CancellationToken.None){return this.commonHeadersPromise.then(n=>{const r=l.assign({},n,t.headers||{});t=l.assign({},t,{type:"GET"},{headers:r})
;const o=e.uri,a=e.fallbackUri,c=l.assign({},t,{url:o});return this.requestService.request(c,i).then(e=>200===e.res.statusCode?Promise.resolve(e):u.asText(e).then(t=>Promise.reject(new Error(`Expected 200, got back ${e.res.statusCode} instead.\n\n${t}`)))).then(void 0,e=>{if(s.isPromiseCanceledError(e))return Promise.reject(e);const n=s.getErrorMessage(e);this.telemetryService.publicLog2("galleryService:requestError",{url:o,cdn:!0,message:n}),this.telemetryService.publicLog2("galleryService:cdnFallback",{url:o,message:n});const r=l.assign({},t,{url:a});return this.requestService.request(r,i).then(void 0,e=>{if(s.isPromiseCanceledError(e))return Promise.reject(e);const t=s.getErrorMessage(e);return this.telemetryService.publicLog2("galleryService:requestError",{url:a,cdn:!1,message:t}),Promise.reject(e)})})})}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=I(e);if(!t)return null;if(h.isEngineValid(t,this.productService.version))return Promise.resolve(e)}return null}getEngine(e){const t=I(e);if(t)return Promise.resolve(t);const i=x(e,R.Manifest);if(!i)return Promise.reject("Manifest was not found");return this.getAsset(i,{headers:{"Accept-Encoding":"gzip"}}).then(e=>u.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=>h.isEngineValid(n,this.productService.version)?(i.properties=i.properties||[],i.properties.push({key:F.Engine,value:n}),i):this.getLastValidExtensionVersionRecursively(e,t.slice(1)))}getExtensionsReport(){return this.isEnabled()?this.extensionsControlUrl?this.requestService.request({type:"GET",url:this.extensionsControlUrl
},p.CancellationToken.None).then(e=>200!==e.res.statusCode?Promise.reject(new Error("Could not get extensions report.")):u.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(g.values(t))})):Promise.resolve([]):Promise.reject(new Error("No extension gallery service configured."))}};j=n([r(0,u.IRequestService),r(1,m.ILogService),r(2,d.IEnvironmentService),r(3,c.ITelemetryService),r(4,v.IFileService),r(5,E.IProductService),r(6,C.optional(b.IStorageService))],j),t.ExtensionGalleryService=j,t.resolveMarketplaceHeaders=D}),define(e[108],t([0,1,107,16,4,18,25,2,10,17]),function(e,t,s,o,a,l,c,u,h,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let f=class{constructor(e,t){this._configurationService=t,this._disposables=new u.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(o.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(g);this._userOptIn=e?e.enableTelemetry:this._userOptIn}get isOptedIn(){return this._userOptIn&&this._enabled}getTelemetryInfo(){return i(this,void 0,void 0,function*(){const e=yield this._commonProperties;return{sessionId:e.sessionID,instanceId:e["common.instanceId"],
machineId:e["common.machineId"]}})}dispose(){this._disposables.dispose()}publicLog(e,t,i){return this.isOptedIn?this._commonProperties.then(n=>{t=h.mixin(t,n),t=h.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}};f.IDLE_START_EVENT_NAME="UserIdleStart",f.IDLE_STOP_EVENT_NAME="UserIdleStop",
f=n([r(1,a.optional(l.IConfigurationService))],f),t.TelemetryService=f;const g="telemetry";d.Registry.as(c.Extensions.Configuration).registerConfiguration({id:g,order:110,type:"object",title:s.localize(0,null),properties:{"telemetry.enableTelemetry":{type:"boolean",description:s.localize(1,null),default:!0,tags:["usesOnlineServices"]}}})}),define(e[55],t([0,1,18,8,10,9]),function(e,t,i,s,o,a){"use strict";function l(e,t){return t.onDidChangeConfiguration(t=>{6!==t.source&&(e.publicLog2("updateConfiguration",{configurationSource:i.ConfigurationTargetToString(t.source),configurationKeys:function(e){if(!e)return[];const t=[];return u(t,"",e),t}(t.sourceConfig)}),e.publicLog2("updateConfigurationValues",{configurationSource:i.ConfigurationTargetToString(t.source),configurationValues:function(e,t){if(!e)return[];return t.reduce((t,i)=>{const n=i.split(".").reduce((e,t)=>e&&"object"==typeof e?e[t]:void 0,e);return void 0!==n&&t.push({[i]:n}),t},[])}(t.sourceConfig,d)}))})}function c(e,t,i=0,n){
if(e)for(let r of Object.getOwnPropertyNames(e)){const s=e[r],l=n?n+r:r;Array.isArray(s)?t[l]=o.safeStringify(s):s instanceof Date?t[l]=s.toISOString():a.isObject(s)?i<2?c(s,t,i+1,l+"."):t[l]=o.safeStringify(s):t[l]=s}}function u(e,t,i){i&&"object"==typeof i&&!Array.isArray(i)?Object.keys(i).forEach(n=>u(e,t?`${t}.${n}`:n,i[n])):e.push(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.NullTelemetryService=new class{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 h=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)}};h=n([r(0,s.ILogService)],h),t.LogAppender=h
;const d=["editor.fontFamily","editor.fontWeight","editor.fontSize","editor.lineHeight","editor.letterSpacing","editor.lineNumbers","editor.rulers","editor.wordSeparators","editor.tabSize","editor.indentSize","editor.insertSpaces","editor.detectIndentation","editor.roundedSelection","editor.scrollBeyondLastLine","editor.minimap.enabled","editor.minimap.side","editor.minimap.renderCharacters","editor.minimap.maxColumn","editor.find.seedSearchStringFromSelection","editor.find.autoFindInSelection","editor.wordWrap","editor.wordWrapColumn","editor.wrappingIndent","editor.mouseWheelScrollSensitivity","editor.multiCursorModifier","editor.quickSuggestions","editor.quickSuggestionsDelay","editor.parameterHints.enabled","editor.parameterHints.cycle","editor.autoClosingBrackets","editor.autoClosingQuotes","editor.autoSurround","editor.autoIndent","editor.formatOnType","editor.formatOnPaste","editor.suggestOnTriggerCharacters","editor.acceptSuggestionOnEnter","editor.acceptSuggestionOnCommitCharacter","editor.snippetSuggestions","editor.emptySelectionClipboard","editor.wordBasedSuggestions","editor.suggestSelection","editor.suggestFontSize","editor.suggestLineHeight","editor.tabCompletion","editor.selectionHighlight","editor.occurrencesHighlight","editor.overviewRulerLanes","editor.overviewRulerBorder","editor.cursorBlinking","editor.cursorSmoothCaretAnimation","editor.cursorStyle","editor.mouseWheelZoom","editor.fontLigatures","editor.hideCursorInOverviewRuler","editor.renderWhitespace","editor.renderControlCharacters","editor.renderIndentGuides","editor.renderLineHighlight","editor.codeLens","editor.folding","editor.showFoldingControls","editor.matchBrackets","editor.glyphMargin","editor.useTabStops","editor.trimAutoWhitespace","editor.stablePeek","editor.dragAndDrop","editor.formatOnSave","editor.colorDecorators","breadcrumbs.enabled","breadcrumbs.filePath","breadcrumbs.symbolPath","breadcrumbs.symbolSortOrder","breadcrumbs.useQuickPick","explorer.openEditors.visible","extensions.autoUpdate","files.associations","files.autoGuessEncoding","files.autoSave","files.autoSaveDelay","files.encoding","files.eol","files.hotExit","files.trimTrailingWhitespace","git.confirmSync","git.enabled","http.proxyStrictSSL","javascript.validate.enable","php.builtInCompletions.enable","php.validate.enable","php.validate.run","terminal.integrated.fontFamily","window.openFilesInNewWindow","window.restoreWindows","window.nativeFullScreen","window.zoomLevel","workbench.editor.enablePreview","workbench.editor.enablePreviewFromQuickOpen","workbench.editor.showTabs","workbench.editor.highlightModifiedTabs","workbench.sideBar.location","workbench.startupEditor","workbench.statusBar.visible","workbench.welcome.enabled"]
;t.configurationTelemetry=l,t.keybindingsTelemetry=function(e,t){return t.onDidUpdateKeybindings(t=>{2===t.source&&t.keybindings&&e.publicLog2("updateKeybindings",{bindings:t.keybindings.map(e=>({key:e.key,command:e.command,when:e.when,args:!!e.args||void 0}))})})},t.validateTelemetryData=function(e){const t=Object.create(null),i=Object.create(null),n=Object.create(null);c(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):void 0!==r&&null!==r&&(t[e]=r)}return{properties:t,measurements:i}}}),define(e[110],t([0,1,117,10,55,8]),function(e,t,i,s,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let l=class{constructor(e,t,n,r){this._eventPrefix=e,this._defaultData=t,this._logService=r,this._defaultData||(this._defaultData=Object.create(null)),"string"==typeof n?this._aiClient=function(e){let t
;return i.defaultClient?(t=new i.TelemetryClient(e)).channel.setUseDiskRetryCaching(!0):(i.setup(e).setAutoCollectRequests(!1).setAutoCollectPerformance(!1).setAutoCollectExceptions(!1).setAutoCollectDependencies(!1).setAutoDependencyCorrelation(!1).setAutoCollectConsole(!1).setInternalLogging(!1,!1).setUseDiskRetryCaching(!0).start(),t=i.defaultClient),0===e.indexOf("AIF-")&&(t.config.endpointUrl="https://vortex.data.microsoft.com/collect/v1"),t}(n):"function"==typeof n&&(this._aiClient=n())}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=n([r(3,a.ILogService)],l),t.AppInsightsAppender=l}),define(e[112],t([0,1,13,46,54,5]),function(e,t,n,r,s,o){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0}),t.resolveCommonProperties=function(e,t,a,l,c){return i(this,void 0,void 0,function*(){const i=Object.create(null);i["common.machineId"]=a,i.sessionID=s.generateUuid()+Date.now(),i.commitHash=e,i.version=t,i["common.platformVersion"]=(r.release()||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),i["common.platform"]=n.PlatformToString(n.platform),i["common.nodePlatform"]=process.platform,i["common.nodeArch"]=process.arch,i["common.product"]=c||"desktop";let u=0;const h=Date.now();Object.defineProperties(i,{timestamp:{get:()=>new Date,enumerable:!0},"common.timesincesessionstart":{get:()=>Date.now()-h,enumerable:!0},"common.sequence":{get:()=>u++,enumerable:!0}}),"linux"===process.platform&&process.env.SNAP&&process.env.SNAP_REVISION&&(i["common.snap"]="true");try{const e=yield o.readFile(l,"utf8");i["common.source"]=e.slice(0,30)}catch(e){}return i})}}),define(e[113],t([0,1,5,14,3]),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}}).forEach(n=>{1===i.readdirSync(r.join(t,n)).filter(e=>"telemetry.json"===e).length&&e.push(n)}),e.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[43],t([0,1,85,3,14,12,5,115,116,6]),function(e,t,i,n,r,s,o,a,l,c){"use strict";function u(e){if(e instanceof p)return e;let t=void 0;return/end of central directory record signature not found/.test(e.message)&&(t="CorruptZip"),new p(t,e)}function h(e,t,a,l){let u=s.createCancelablePromise(()=>Promise.resolve()),h=0;return c.Event.once(l.onCancellationRequested)(()=>{u.cancel(),e.close()
}),new Promise((d,g)=>{const m=new s.Sequencer,v=t=>{t.isCancellationRequested||(h++,e.readEntry())};e.once("error",g),e.once("close",()=>u.then(()=>{l.isCancellationRequested||e.entryCount===h?d():g(new p("Incomplete",new Error(i.localize(1,null,h,e.entryCount))))},g)),e.readEntry(),e.on("entry",h=>{if(l.isCancellationRequested)return;if(!a.sourcePathRegex.test(h.fileName))return void v(l);const d=h.fileName.replace(a.sourcePathRegex,"");if(/\/$/.test(d)){const e=n.join(t,d);return void(u=s.createCancelablePromise(t=>o.mkdirp(e,void 0,t).then(()=>v(t)).then(void 0,g)))}const p=f(e,h),y=function(e){const t=e.externalFileAttributes>>16||33188;return[448,56,7].map(e=>t&e).reduce((e,t)=>e+t,61440&t)}(h);u=s.createCancelablePromise(e=>m.queue(()=>p.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,void 0,u)).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,g))})})}function d(e,t=!1){return new Promise((i,n)=>{a.open(e,t?{lazyEntries:!0}:void 0,(e,t)=>{e?n(u(e)):i(t)})})}function f(e,t){return new Promise((i,n)=>{e.openReadStream(t,(e,t)=>{e?n(u(e)):i(t)})})}function g(e,t){return function(e,t){return d(e).then(e=>new Promise((n,r)=>{e.on("entry",i=>{i.fileName===t&&f(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)))}))}Object.defineProperty(t,"__esModule",{value:!0});class p 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}}t.ExtractError=p,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=d(e,!0);return i.overwrite&&(s=s.then(e=>o.rimraf(t).then(()=>e))),s.then(e=>h(e,t,{sourcePathRegex:r},n))},t.buffer=g}),define(e[56],t([0,1,43,93]),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[66],t([0,1,90,3,5,10,2,30,43,28,27,109,23,12,6,61,22,32,13,8,60,111,38,37,47,46,54,70,4,21,24,19,56]),function(e,t,s,o,a,l,c,u,h,d,f,g,p,m,v,y,S,E,b,C,w,P,x,_,I,L,D,O,k,R,F,T,M){"use strict";function j(e){return new Promise((t,i)=>{try{const n=JSON.parse(e),r=n.__metadata||null;delete n.__metadata,t({manifest:n,metadata:r})}catch(e){i(new Error(s.localize(0,null)))}})}Object.defineProperty(t,"__esModule",{value:!0});class A extends Error{constructor(e,t){super(e),this.code=t}}t.ExtensionManagementError=A;let U=class extends c.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 v.Emitter),this.onInstallExtension=this._onInstallExtension.event,this._onDidInstallExtension=this._register(new v.Emitter),this.onDidInstallExtension=this._onDidInstallExtension.event,
this._onUninstallExtension=this._register(new v.Emitter),this.onUninstallExtension=this._onUninstallExtension.event,this._onDidUninstallExtension=this._register(new v.Emitter),this.onDidUninstallExtension=this._onDidUninstallExtension.event,this._devSystemExtensionsPath=null,this._devSystemExtensionsFilePath=null,this.systemExtensionsPath=e.builtinExtensionsPath,this.extensionsPath=e.extensionsPath,this.uninstalledPath=o.join(this.extensionsPath,".obsolete"),this.uninstalledFileLimiter=new m.Queue,this.manifestCache=this._register(new w.ExtensionsManifestCache(e,this)),this.extensionLifecycle=this._register(new P.ExtensionsLifecycle(e,this.logService)),this._register(c.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=>h.zip(o.join(L.tmpdir(),D.generateUuid()),e)).then(e=>S.URI.file(e))}unzip(e,t){return this.logService.trace("ExtensionManagementService#unzip",e.toString()),this.install(e,t).then(e=>e.identifier)}collectFiles(e){const t=e=>i(this,void 0,void 0,function*(){let i=yield a.readdir(e);i=i.map(t=>o.join(e,t));const n=yield Promise.all(i.map(e=>a.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/${o.relative(e.location.fsPath,t)}`,localPath:t})))}install(e,t=1){return this.logService.trace("ExtensionManagementService#install",e.toString()),m.createCancelablePromise(i=>this.downloadVsix(e).then(e=>{const n=o.resolve(e.fsPath);return M.getManifest(n).then(e=>{const r={id:f.getGalleryExtensionId(e.publisher,e.name)};let o=1
;if(e.engines&&e.engines.vscode&&!I.isEngineValid(e.engines.vscode,E.default.version))return Promise.reject(new Error(s.localize(1,null,r.id,E.default.version)));const a=new f.ExtensionIdentifierWithVersion(r,e.version);return this.getInstalled(1).then(t=>{const i=t.filter(e=>f.areSameExtensions(r,e.identifier))[0];if(i){if(o=2,a.equals(new f.ExtensionIdentifierWithVersion(i.identifier,i.manifest.version)))return this.removeExtension(i,"existing").then(null,t=>Promise.reject(new Error(s.localize(2,null,e.displayName||e.name))));if(y.gt(i.manifest.version,e.version))return this.uninstall(i,!0)}}).then(()=>(this.logService.info("Installing the extension:",r.id),this._onInstallExtension.fire({identifier:r,zipPath:n}),this.getMetadata(f.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:",r.id),
e),e=>(this.logService.error("Failed to install the extension:",r.id,e.message),Promise.reject(e)))))})}))}downloadVsix(e){if(e.scheme===R.Schemas.file)return Promise.resolve(e);if(!this.downloadService)throw new Error("Download service is not available");const t=o.join(L.tmpdir(),D.generateUuid());return this.downloadService.download(e,S.URI.file(t)).then(()=>S.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=>(u.isNonEmptyArray(e.manifest.extensionDependencies)&&this.logService.warn("Cannot install dependencies of extension:",e.identifier.id,t.message),u.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))))}installFromGallery(e){return i(this,void 0,void 0,function*(){if(!this.galleryService.isEnabled())return Promise.reject(new Error(s.localize(3,null)));const t=(new Date).getTime(),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),f.getGalleryExtensionTelemetryData(e),(new Date).getTime()-t,n),n instanceof Error&&(n.name=r)};try{e=yield this.checkAndGetCompatibleVersion(e)}catch(t){return n(e,1,t),Promise.reject(t)}const r=new f.ExtensionIdentifierWithVersion(e.identifier,e.version).key();let o=this.installingExtensions.get(r);if(!o){this.logService.info("Installing extension:",e.identifier.id),this._onInstallExtension.fire({identifier:e.identifier,gallery:e});let s,l,c,u=1
;o=m.createCancelablePromise(e=>(s=e,new Promise((e,t)=>{l=e,c=t}))),this.installingExtensions.set(r,o);try{const o=(yield this.getInstalled(1)).filter(t=>f.areSameExtensions(t.identifier,e.identifier))[0];o&&(u=2),this.downloadInstallableExtension(e,u).then(e=>this.installExtension(e,1,s).then(t=>a.rimraf(e.zipPath).finally(()=>null).then(()=>t))).then(e=>this.installDependenciesAndPackExtensions(e,o).then(()=>e,t=>this.uninstall(e,!0).then(()=>Promise.reject(t),()=>Promise.reject(t)))).then(n=>i(this,void 0,void 0,function*(){o&&y.neq(o.manifest.version,e.version)&&(yield this.setUninstalled(o)),this.installingExtensions.delete(r),((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),f.getGalleryExtensionTelemetryData(e),(new Date).getTime()-t,void 0)})(e,u,n),l(n)}),t=>{this.installingExtensions.delete(r),n(e,u,t),c(t)})}catch(t){
return this.installingExtensions.delete(r),n(e,u,t),Promise.reject(t)}}return o})}checkAndGetCompatibleVersion(e){return i(this,void 0,void 0,function*(){if(yield this.isMalicious(e))return Promise.reject(new A(s.localize(4,null),d.INSTALL_ERROR_MALICIOUS));const t=yield this.galleryService.getCompatibleExtension(e);return t||Promise.reject(new A(s.localize(5,null,e.identifier.id,E.default.version),d.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),e=>Promise.reject(new Error(s.localize(7,null,x.toErrorMessage(e)))))):Promise.reject(new Error(s.localize(8,null)))):Promise.reject(new Error(s.localize(6,null)))}getTelemetryEvent(e){return 2===e?"extensionGallery:update":"extensionGallery:install"}isMalicious(e){
return this.getExtensionsReport().then(t=>f.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,S.URI.file(L.tmpdir()),t).then(t=>{const n=t.fsPath;return this.logService.info("Downloaded extension:",e.identifier.id,n),M.getManifest(n).then(t=>({zipPath:n,identifierWithVersion:new f.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=>b.isMacintosh?Promise.reject(new A(s.localize(9,null),"unsetUninstalled")):Promise.reject(new A(s.localize(10,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 f.ExtensionIdentifierWithVersion(t.identifier,t.manifest.version).equals(e))[0])):null)}extractAndInstall({zipPath:e,identifierWithVersion:t,metadata:i},n,r){const{identifier:l}=t,c=1===n?this.extensionsPath:this.systemExtensionsPath,u=t.key(),h=o.join(c,`.${u}`),d=o.join(c,u);return a.rimraf(d).then(()=>this.extractAndRename(l,e,h,d,r),e=>Promise.reject(new A(s.localize(11,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(s.localize(12,null,c)),e=>a.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),a.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}`),a.rimraf(i).then(()=>h.extract(t,i,{sourcePath:"extension",overwrite:!0},n).then(()=>this.logService.info(`Extracted extension to ${i}:`,e.id),e=>a.rimraf(i).finally(()=>null).then(()=>Promise.reject(new A(e.message,e instanceof h.ExtractError&&e.type?e.type:"extracting")))),e=>Promise.reject(new A(this.joinErrors(e).message,"deleting")))}rename(e,t,i,n){return a.rename(t,i).then(void 0,r=>b.isWindows&&r&&"EPERM"===r.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(r.message||s.localize(13,null,t,i),r.code||"renaming")))}
installDependenciesAndPackExtensions(e,t){return i(this,void 0,void 0,function*(){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=>f.areSameExtensions({id:e},{id:n}))||i.every(e=>!f.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})=>!f.areSameExtensions(e,{id:t})));return t.length?this.galleryService.query({names:t,pageSize:i.length},F.CancellationToken.None).then(e=>{const t=e.firstPage;return Promise.all(t.map(e=>this.installFromGallery(e))).then(()=>null,e=>this.rollback(t).then(()=>Promise.reject(e),()=>Promise.reject(e)))}):null})}return Promise.resolve(void 0)})}rollback(e){
return this.getInstalled(1).then(t=>Promise.all(t.filter(t=>e.some(e=>new f.ExtensionIdentifierWithVersion(t.identifier,t.manifest.version).equals(new f.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=>f.areSameExtensions(t.identifier,e.identifier))[0];return i?this.checkForDependenciesAndUninstall(i,t).then(()=>null,e=>Promise.reject(this.joinErrors(e))):Promise.reject(new Error(s.localize(14,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=o.join(e.location.fsPath,"package.json");return a.readFile(t,"utf8").then(e=>j(e)).then(({manifest:t})=>l.assign(t,{__metadata:e.metadata})).then(e=>a.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},F.CancellationToken.None).then(e=>e.firstPage[0])}findGalleryExtensionByName(e){return this.galleryService.query({names:[e],pageSize:1},F.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?s.localize(15,null,e.manifest.displayName||e.manifest.name,t[0].manifest.displayName||t[0].manifest.name):2===t.length?s.localize(16,null,e.manifest.displayName||e.manifest.name,t[0].manifest.displayName||t[0].manifest.name,t[1].manifest.displayName||t[1].manifest.name):s.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)}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=>f.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=>f.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(a.exists(e.location.fsPath)).then(e=>e?null:Promise.reject(new Error(s.localize(18,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=m.createCancelablePromise(t=>this.scanUserExtensions(!1).then(t=>this.setUninstalled(...t.filter(t=>f.areSameExtensions(t.identifier,e.identifier)))).then(()=>{this.uninstallingExtensions.delete(e.identifier.id)})),this.uninstallingExtensions.set(e.identifier.id,t)),t}postUninstallExtension(e,t){return i(this,void 0,void 0,function*(){
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&&(yield this.galleryService.reportStatistic(e.manifest.publisher,e.manifest.name,e.manifest.version,"uninstall"))),this.reportTelemetry("extensionGallery:uninstall",f.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(u.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=>f.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 f.ExtensionIdentifierWithVersion(e.identifier,e.manifest.version).key()]),e){i=f.groupByExtension(i,e=>e.identifier).map(e=>e.sort((e,t)=>y.rcompare(e.manifest.version,t.manifest.version))[0])}return this.logService.trace("Scanned user extensions:",i.length),i})}scanExtensions(e,t){const i=new m.Limiter(10)
;return a.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=o.join(t,e);return a.readdir(n).then(e=>(function(e){const t=[a.readFile(o.join(e,"package.json"),"utf8").then(e=>j(e)),a.readFile(o.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:g.localizeManifest(e,i),metadata:t}))})(n).then(({manifest:t,metadata:r})=>{const s=e.filter(e=>/^readme(\.txt|\.md|)$/i.test(e))[0],a=s?S.URI.file(o.join(n,s)):null,l=e.filter(e=>/^changelog(\.txt|\.md|)$/i.test(e))[0],c=l?S.URI.file(o.join(n,l)):null,u={id:f.getGalleryExtensionId(t.publisher,t.name)},h={type:i,identifier:u,manifest:t,metadata:r,location:S.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}removeDeprecatedExtensions(){return i(this,void 0,void 0,function*(){yield this.removeUninstalledExtensions(),yield this.removeOutdatedExtensions()})}removeUninstalledExtensions(){return i(this,void 0,void 0,function*(){const e=yield this.getUninstalledExtensions(),t=yield this.scanExtensions(this.extensionsPath,1),n=new Set;for(const i of t)e[new f.ExtensionIdentifierWithVersion(i.identifier,i.manifest.version).key()]||n.add(i.identifier.id.toLowerCase());const r=f.groupByExtension(t,e=>e.identifier);yield Promise.all(r.map(e=>i(this,void 0,void 0,function*(){const t=e.sort((e,t)=>y.rcompare(e.manifest.version,t.manifest.version))[0];n.has(t.identifier.id.toLowerCase())||(yield this.extensionLifecycle.postUninstall(t))})));const s=t.filter(t=>e[new f.ExtensionIdentifierWithVersion(t.identifier,t.manifest.version).key()]);yield Promise.all(s.map(e=>this.removeUninstalledExtension(e)))})}removeOutdatedExtensions(){return this.scanExtensions(this.extensionsPath,1).then(e=>{
const t=[],i=f.groupByExtension(e,e=>e.identifier);return t.push(...u.flatten(i.map(e=>e.sort((e,t)=>y.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 f.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),a.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 f.ExtensionIdentifierWithVersion(e.identifier,e.manifest.version))
;return this.withUninstalledExtensions(e=>l.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)}withUninstalledExtensions(e){return i(this,void 0,void 0,function*(){return yield this.uninstalledFileLimiter.queue(()=>{let t=null;return a.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 a.rimraf(this.uninstalledPath);{const t=JSON.stringify(e);return a.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=o.normalize(o.join(T.getPathFromAmdModule(e,""),"..",".build","builtInExtensions"))),this._devSystemExtensionsPath}get devSystemExtensionsFilePath(){return this._devSystemExtensionsFilePath||(this._devSystemExtensionsFilePath=o.normalize(o.join(T.getPathFromAmdModule(e,""),"..","build","builtInExtensions.json"))),this._devSystemExtensionsFilePath}getDevSystemExtensionsList(){return a.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,l.assign(t,{success:!n,duration:i,errorcode:r}))}};U=n([r(0,p.IEnvironmentService),r(1,d.IExtensionGalleryService),r(2,C.ILogService),r(3,k.optional(O.IDownloadService)),r(4,_.ITelemetryService)],U),t.ExtensionManagementService=U}),define(e[58],t([0,1,121,101,2,10,9,20,100,18,8,15]),function(e,t,s,o,a,l,c,u,h,d,f,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let p=class extends a.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}request(e,t){return i(this,void 0,void 0,function*(){this.logService.trace("RequestService#request",e.url)
;const{proxyUrl:i,strictSSL:n}=this,r=e.agent?e.agent:yield h.getProxyAgent(e.url||"",{proxyUrl:i,strictSSL:n});return e.agent=r,e.strictSSL=n,this.authorization&&(e.headers=l.assign(e.headers||{},{"Proxy-Authorization":this.authorization})),this._request(e,t)})}getNodeRequest(t){return i(this,void 0,void 0,function*(){return("https:"===o.parse(t.url).protocol?yield new Promise((t,i)=>{e(["https"],t,i)}):yield new Promise((t,i)=>{e(["http"],t,i)})).request})}_request(e,t){return new Promise((n,r)=>i(this,void 0,void 0,function*(){let i;const a=o.parse(e.url),h=e.getRawRequest?e.getRawRequest(e):yield this.getNodeRequest(e),d={hostname:a.hostname,port:a.port?parseInt(a.port):"https:"===a.protocol?443:80,protocol:a.protocol,path:a.path,method:e.type||"GET",headers:e.headers,agent:e.agent,rejectUnauthorized:!c.isBoolean(e.strictSSL)||e.strictSSL};e.user&&e.password&&(d.auth=e.user+":"+e.password),(i=h(d,i=>{const o=c.isNumber(e.followRedirects)?e.followRedirects:3
;if(i.statusCode&&i.statusCode>=300&&i.statusCode<400&&o>0&&i.headers.location)this._request(l.assign({},e,{url:i.headers.location,followRedirects:o-1}),t).then(n,r);else{let e=i;"gzip"===i.headers["content-encoding"]&&(e=e.pipe(s.createGunzip())),n({res:i,stream:g.toVSBufferReadableStream(e)})}})).on("error",r),e.timeout&&i.setTimeout(e.timeout),e.data&&"string"==typeof e.data&&i.write(e.data),i.end(),t.onCancellationRequested(()=>{i.abort(),r(u.canceled())})}))}};p=n([r(0,d.IConfigurationService),r(1,f.ILogService)],p),t.RequestService=p}),define(e[122],t([0,1,7,33,32,3,61,42,51,4,78,23,86,28,66,106,37,55,108,112,52,58,18,98,110,5,41,102,103,8,20,27,22,56,34,24,91,21,84,113,81,29,83,2,45,92]),function(e,t,s,o,a,l,c,u,h,d,f,g,p,m,v,y,S,E,b,C,w,P,x,_,I,L,D,O,k,R,F,T,M,j,A,U,z,N,B,W,V,$,q,G,H,K){"use strict";function Q(e,t){return t?`${e.publisher}.${e.name}@${e.version}`:`${e.publisher}.${e.name}`}function J(e){const t=Z.exec(e)
;return t&&t[1]?[T.adoptToGalleryExtensionId(t[1]),t[2]]:[T.adoptToGalleryExtensionId(e),void 0]}Object.defineProperty(t,"__esModule",{value:!0});const X=e=>s.localize(1,null,e),Y=s.localize(2,null,"ms-vscode.csharp"),Z=/^([^.]+\..+)@(\d+\.\d+\.\d+(-.*)?)$/;t.getIdAndVersion=J;let ee=class{constructor(e,t,i,n){this.instantiationService=e,this.environmentService=t,this.extensionManagementService=i,this.extensionGalleryService=n}run(e){return i(this,void 0,void 0,function*(){if(e["install-source"])yield this.setInstallSource(e["install-source"]);else if(e["list-extensions"])yield this.listExtensions(!!e["show-versions"],e.category);else if(e["install-extension"]){const t=e["install-extension"],i="string"==typeof t?[t]:t;yield this.installExtensions(i,!!e.force)}else if(e["uninstall-extension"]){const t=e["uninstall-extension"],i="string"==typeof t?[t]:t;yield this.uninstallExtension(i)}else if(e["locate-extension"]){const t=e["locate-extension"],i="string"==typeof t?[t]:t;yield this.locateExtension(i)
}else e.telemetry&&console.log(W.buildTelemetryMessage(this.environmentService.appRoot,this.environmentService.extensionsPath?this.environmentService.extensionsPath:void 0))})}setInstallSource(e){return L.writeFile(this.environmentService.installSourcePath,e.slice(0,30))}listExtensions(e,t){return i(this,void 0,void 0,function*(){let i=yield 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(Q(t.manifest,e)))})}
installExtensions(e,t){return i(this,void 0,void 0,function*(){const i=[],n=[];e.length&&console.log(s.localize(3,null));for(const r of e)try{const e=yield 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))&&(yield this.updateLocalizationsCache()),i.length?Promise.reject(s.localize(4,null,i.join(", "))):Promise.resolve()})}installExtension(e,t){return i(this,void 0,void 0,function*(){if(/\.vsix$/i.test(e)){e=l.isAbsolute(e)?e:l.join(process.cwd(),e);const i=yield j.getManifest(e);return(yield this.validate(i,t))?this.extensionManagementService.install(M.URI.file(e)).then(t=>(console.log(s.localize(5,null,D.getBaseLabel(e))),i),t=>F.isPromiseCanceledError(t)?(console.log(s.localize(6,null,D.getBaseLabel(e))),null):Promise.reject(t)):null}const[n,r]=J(e);return this.extensionManagementService.getInstalled(1).then(e=>this.extensionGalleryService.getCompatibleExtension({id:n},r).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(o=>i(this,void 0,void 0,function*(){if(!o)return Promise.reject(new Error(`${(e=>s.localize(0,null,e))(r?`${n}@${r}`:n)}\n${Y}`));const i=yield this.extensionGalleryService.getManifest(o,U.CancellationToken.None),[a]=e.filter(e=>T.areSameExtensions(e.identifier,{id:n}));if(a){if(o.version===a.manifest.version)return console.log(s.localize(7,null,r?`${n}@${r}`:n)),Promise.resolve(null);if(!r&&!t)return console.log(s.localize(8,null,n,a.manifest.version,o.version)),Promise.resolve(null);console.log(s.localize(9,null,n,o.version))}return yield this.installFromGallery(n,o),i})))})}validate(e,t){return i(this,void 0,void 0,function*(){if(!e)throw new Error("Invalid vsix");const i={id:T.getGalleryExtensionId(e.publisher,e.name)},n=(yield this.extensionManagementService.getInstalled(1)).filter(t=>T.areSameExtensions(i,t.identifier)&&c.gt(t.manifest.version,e.version))[0]
;return!(n&&!t)||(console.log(s.localize(10,null,n.identifier.id,n.manifest.version,e.version)),!1)})}installFromGallery(e,t){return i(this,void 0,void 0,function*(){console.log(s.localize(11,null,e,t.version));try{yield this.extensionManagementService.installFromGallery(t),console.log(s.localize(12,null,e,t.version))}catch(t){if(!F.isPromiseCanceledError(t))throw t;console.log(s.localize(13,null,e))}})}uninstallExtension(e){return i(this,void 0,void 0,function*(){function t(e){return i(this,void 0,void 0,function*(){if(!/\.vsix$/i.test(e))return e;const t=l.isAbsolute(e)?e:l.join(process.cwd(),e);return Q(yield j.getManifest(t))})}const n=[];for(const i of e){const e=yield t(i),r=yield this.extensionManagementService.getInstalled(1),[o]=r.filter(t=>T.areSameExtensions(t.identifier,{id:e}));if(!o)return Promise.reject(new Error(`${X(e)}\n${Y}`));console.log(s.localize(14,null,e)),yield this.extensionManagementService.uninstall(o,!0),n.push(o),console.log(s.localize(15,null,e))}
n.some(e=>A.isLanguagePackExtension(e.manifest))&&(yield this.updateLocalizationsCache())})}locateExtension(e){return i(this,void 0,void 0,function*(){const t=yield this.extensionManagementService.getInstalled();e.forEach(e=>{t.forEach(t=>{t.identifier.id!==e||t.location.scheme!==N.Schemas.file||console.log(t.location.fsPath)})})})}updateLocalizationsCache(){return i(this,void 0,void 0,function*(){const e=this.instantiationService.createInstance(z.LocalizationsService);yield e.update(),e.dispose()})}};ee=n([r(0,d.IInstantiationService),r(1,g.IEnvironmentService),r(2,m.IExtensionManagementService),r(3,m.IExtensionGalleryService)],ee),t.Main=ee;const te="monacoworkbench";t.main=function(e){return i(this,void 0,void 0,function*(){const t=new u.ServiceCollection,n=new G.DisposableStore,r=new p.EnvironmentService(e,process.execPath),s=new B.SpdLogService("cli",r.logsPath,R.getLogLevel(r));process.once("exit",()=>s.dispose()),s.info("main",e),
yield Promise.all([r.appSettingsHome.fsPath,r.extensionsPath].map(e=>e?L.mkdirp(e):void 0));const l=new _.ConfigurationService(r.settingsResource);n.add(l),yield l.initialize(),t.set(g.IEnvironmentService,r),t.set(R.ILogService,s),t.set(x.IConfigurationService,l),t.set(O.IStateService,new h.SyncDescriptor(k.StateService)),t.set(H.IProductService,new h.SyncDescriptor(K.ProductService));const c=new V.FileService(s);n.add(c),t.set($.IFileService,c);const d=new q.DiskFileSystemProvider(s);n.add(d),c.registerProvider(N.Schemas.file,d);const D=new f.InstantiationService(t);return D.invokeFunction(t=>i(this,void 0,void 0,function*(){const i=t.get(g.IEnvironmentService),r=t.get(O.IStateService),{appRoot:l,extensionsPath:c,extensionDevelopmentLocationURI:d,isBuilt:f,installSourcePath:p}=i,x=new u.ServiceCollection;x.set(w.IRequestService,new h.SyncDescriptor(P.RequestService)),x.set(m.IExtensionManagementService,new h.SyncDescriptor(v.ExtensionManagementService)),
x.set(m.IExtensionGalleryService,new h.SyncDescriptor(y.ExtensionGalleryService));const _=[];if(f&&!d&&!i.args["disable-telemetry"]&&o.default.enableTelemetry){o.default.aiConfig&&o.default.aiConfig.asimovKey&&_.push(new I.AppInsightsAppender(te,null,o.default.aiConfig.asimovKey,s));const e={appender:E.combinedAppender(..._),commonProperties:C.resolveCommonProperties(o.default.commit,a.default.version,r.getItem("telemetry.machineId"),p),piiPaths:c?[l,c]:[l]};x.set(S.ITelemetryService,new h.SyncDescriptor(b.TelemetryService,[e]))}else x.set(S.ITelemetryService,E.NullTelemetryService);const L=D.createChild(x).createInstance(ee);try{yield L.run(e),yield E.combinedAppender(..._).flush()}finally{n.dispose()}}))})}})}).call(this);
//# sourceMappingURL=https://ticino.blob.core.windows.net/sourcemaps/036a6b1d3ac84e5ca96a17a44e63a87971f8fcc8/core/vs/code/node/cliProcessMain.js.map
