/*!--------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
(function(){
var e=["require","exports","vs/platform/instantiation/common/instantiation","vs/base/common/types","path","vs/base/common/objects","vs/nls!vs/code/node/cliProcessMain","vs/platform/log/common/log","vs/base/common/event","vs/nls","vs/platform/configuration/common/configuration","vs/base/node/pfs","vs/base/common/strings","vs/base/common/lifecycle","vs/base/common/arrays","vs/platform/registry/common/platform","vs/platform/configuration/common/configurationRegistry","vs/platform/extensionManagement/common/extensionManagementUtil","vs/base/common/platform","vs/platform/environment/common/environment","vs/base/common/errors","vs/platform/node/package","vs/base/common/uri","vs/base/common/async","vs/platform/extensionManagement/common/extensionManagement","fs","os","vs/platform/node/product","vs/base/common/paths","vs/platform/telemetry/common/telemetry","vs/base/common/errorMessage","vs/base/common/map","vs/platform/extensions/node/extensionValidator","vs/base/common/amd","vs/base/node/request","vs/base/common/json","vs/platform/instantiation/common/descriptors","vs/base/node/extfs","vs/platform/extensions/common/extensions","vs/base/common/network","vs/platform/configuration/common/configurationModels","vs/platform/request/node/request","vs/platform/instantiation/common/serviceCollection","vs/base/common/uuid","vs/platform/node/zip","vs/platform/extensionManagement/node/extensionManagementUtil","vs/platform/extensionManagement/node/extensionGalleryService","vs/base/common/collections","vs/base/node/config","vs/platform/extensionManagement/node/extensionsManifestCache","vs/base/common/mime","vs/platform/instantiation/common/graph","vs/platform/download/common/download","vs/base/common/labels","vs/base/common/glob","vs/base/common/decorators","vs/base/common/assert","vs/platform/instantiation/common/instantiationService","vs/platform/request/node/requestService","vs/nls!vs/base/common/errorMessage","vs/platform/log/node/spdlogService","vs/base/node/paths","vs/base/common/date","vs/platform/environment/node/environmentService","vs/base/node/proxy","vs/nls!vs/platform/configuration/common/configurationRegistry","vs/nls!vs/platform/extensionManagement/common/extensionManagement","vs/platform/extensions/node/extensionsUtil","vs/nls!vs/platform/extensionManagement/node/extensionManagementService","vs/platform/jsonschemas/common/jsonContributionRegistry","vs/nls!vs/platform/extensionManagement/node/extensionManagementUtil","vs/nls!vs/platform/extensions/node/extensionValidator","vs/nls!vs/platform/node/zip","vs/platform/configuration/node/configuration","vs/platform/configuration/node/configurationService","vs/nls!vs/platform/request/node/request","vs/platform/state/common/state","vs/platform/state/node/stateService","vs/nls!vs/platform/telemetry/common/telemetryService","vs/platform/telemetry/common/telemetryService","vs/platform/telemetry/common/telemetryUtils","vs/platform/telemetry/node/appInsightsAppender","vs/base/common/cancellation","vs/platform/telemetry/node/commonProperties","url","vs/platform/extensionManagement/common/extensionNls","semver","vs/platform/extensionManagement/node/extensionManagementService","vs/platform/extensionManagement/node/extensionLifecycle","yazl","yauzl","applicationinsights","crypto","zlib","child_process","vs/base/common/resources","vs/code/node/cliProcessMain"],t=function(t){
for(var n=[],r=0,i=t.length;r<i;r++)n[r]=e[t[r]];return n};define(e[56],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[47],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.prototype.hasOwnProperty;t.values=function(e){var t=[];for(var r in e)n.call(e,r)&&t.push(e[r]);return t},t.size=function(e){var t=0;for(var r in e)n.call(e,r)&&(t+=1);return t},t.first=function(e){for(var t in e)if(n.call(e,t))return e[t]},t.forEach=function(e,t){var r=function(r){if(n.call(e,r)&&!1===t({key:r,value:e[r]},function(){delete e[r]}))return{value:void 0}};for(var i in e){var o=r(i);if("object"==typeof o)return o.value}},t.groupBy=function(e,t){for(var n=Object.create(null),r=0,i=e;r<i.length;r++){var o=i[r],s=t(o),a=n[s];a||(a=n[s]=[]),a.push(o)}return n},t.fromMap=function(e){var t=Object.create(null);return e&&e.forEach(function(e,n){
t[n]=e}),t}}),define(e[55],t([0,1]),function(e,t){"use strict";function n(e){return function(t,n,r){var i=null,o=null;if("function"==typeof r.value?(i="value",o=r.value):"function"==typeof r.get&&(i="get",o=r.get),!o)throw new Error("not supported");r[i]=e(o,n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.createDecorator=n,t.memoize=function(e,t,n){var r=null,i=null;if("function"==typeof n.value?(r="value",0!==(i=n.value).length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"==typeof n.get&&(r="get",i=n.get),!i)throw new Error("not supported");var o="$memoize$"+t;n[r]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.hasOwnProperty(o)||Object.defineProperty(this,o,{configurable:!1,enumerable:!1,writable:!1,value:i.apply(this,e)}),this[o]}},t.debounce=function(e,t,r){return n(function(n,i){var o="$debounce$"+i,s="$debounce$result$"+i;return function(){for(var i=this,a=[],u=0;u<arguments.length;u++)a[u]=arguments[u]
;this[s]||(this[s]=r?r():void 0),clearTimeout(this[o]),t&&(this[s]=t.apply(void 0,[this[s]].concat(a)),a=[this[s]]),this[o]=setTimeout(function(){n.apply(i,a),i[s]=r?r():void 0},e)}})}}),define(e[35],t([0,1]),function(e,t){"use strict";function n(e,t){function n(t){for(var n=0,r=0;n<t;){var i=e.charCodeAt(a);if(i>=48&&i<=57)r=16*r+i-48;else if(i>=65&&i<=70)r=16*r+i-65+10;else{if(!(i>=97&&i<=102))break;r=16*r+i-97+10}a++,n++}return n<t&&(r=-1),r}function s(){if(c="",p=0,l=a,a>=u)return l=u,f=17;var t=e.charCodeAt(a);if(r(t)){do{a++,c+=String.fromCharCode(t),t=e.charCodeAt(a)}while(r(t));return f=15}if(i(t))return a++,c+=String.fromCharCode(t),13===t&&10===e.charCodeAt(a)&&(a++,c+="\n"),f=14;switch(t){case 123:return a++,f=1;case 125:return a++,f=2;case 91:return a++,f=3;case 93:return a++,f=4;case 58:return a++,f=6;case 44:return a++,f=5;case 34:return a++,c=function(){for(var t="",r=a;;){if(a>=u){t+=e.substring(r,a),p=2;break}var o=e.charCodeAt(a);if(34===o){t+=e.substring(r,a),a++;break}if(92!==o){
if(o>=0&&o<=31){if(i(o)){t+=e.substring(r,a),p=2;break}p=6}a++}else{if(t+=e.substring(r,a),++a>=u){p=2;break}switch(o=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:var s=n(4);s>=0?t+=String.fromCharCode(s):p=4;break;default:p=5}r=a}}return t}(),f=10;case 47:var s=a-1;if(47===e.charCodeAt(a+1)){for(a+=2;a<u&&!i(e.charCodeAt(a));)a++;return c=e.substring(s,a),f=12}if(42===e.charCodeAt(a+1)){a+=2;for(var d=u-1,h=!1;a<d;){if(42===e.charCodeAt(a)&&47===e.charCodeAt(a+1)){a+=2,h=!0;break}a++}return h||(a++,p=1),c=e.substring(s,a),f=13}return c+=String.fromCharCode(t),a++,f=16;case 45:if(c+=String.fromCharCode(t),++a===u||!o(e.charCodeAt(a)))return f=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return c+=function(){var t=a;if(48===e.charCodeAt(a))a++;else for(a++;a<e.length&&o(e.charCodeAt(a));)a++
;if(a<e.length&&46===e.charCodeAt(a)){if(!(++a<e.length&&o(e.charCodeAt(a))))return p=3,e.substring(t,a);for(a++;a<e.length&&o(e.charCodeAt(a));)a++}var n=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&&o(e.charCodeAt(a))){for(a++;a<e.length&&o(e.charCodeAt(a));)a++;n=a}else p=3;return e.substring(t,n)}(),f=11;default:for(;a<u&&function(e){if(r(e)||i(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}(t);)a++,t=e.charCodeAt(a);if(l!==a){switch(c=e.substring(l,a)){case"true":return f=8;case"false":return f=9;case"null":return f=7}return f=16}return c+=String.fromCharCode(t),a++,f=16}}void 0===t&&(t=!1);var a=0,u=e.length,c="",l=0,f=16,p=0;return{setPosition:function(e){a=e,c="",l=0,f=16,p=0},getPosition:function(){return a},scan:t?function(){var e;do{e=s()}while(e>=12&&e<=15);return e}:s,getToken:function(){return f},getTokenValue:function(){return c},
getTokenOffset:function(){return l},getTokenLength:function(){return a-l},getTokenError:function(){return p}}}function r(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 i(e){return 10===e||13===e||8232===e||8233===e}function o(e){return e>=48&&e<=57}function s(e){if(!e.parent||!e.parent.children)return[];var t=s(e.parent);if("property"===e.parent.type){var n=e.parent.children[0].value;t.push(n)}else if("array"===e.parent.type){var r=e.parent.children.indexOf(e);-1!==r&&t.push(r)}return t}function a(e){switch(e.type){case"array":return e.children.map(a);case"object":for(var t=Object.create(null),n=0,r=e.children;n<r.length;n++){var i=r[n],o=i.children[1];o&&(t[i.children[0].value]=a(o))}return t;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function u(e,t,n){return void 0===n&&(n=!1),t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}function c(e,t,n){if(void 0===n&&(n=!1),u(e,t,n)){
var r=e.children;if(Array.isArray(r))for(var i=0;i<r.length&&r[i].offset<=t;i++){var o=c(r[i],t,n);if(o)return o}return e}}function l(e,t,r){function i(e){return e?function(){return e(f.getTokenOffset(),f.getTokenLength())}:function(){return!0}}function o(e){return e?function(t){return e(t,f.getTokenOffset(),f.getTokenLength())}:function(){return!0}}function s(){for(;;){var e=f.scan();switch(f.getTokenError()){case 4:a(14);break;case 5:a(15);break;case 3:a(13);break;case 1:x||a(11);break;case 2:a(12);break;case 6:a(16)}switch(e){case 12:case 13:x?a(10):E();break;case 16:a(1);break;case 15:case 14:break;default:return e}}}function a(e,t,n){if(void 0===t&&(t=[]),void 0===n&&(n=[]),S(e),t.length+n.length>0)for(var r=f.getToken();17!==r;){if(-1!==t.indexOf(r)){s();break}if(-1!==n.indexOf(r))break;r=s()}}function u(e){var t=f.getTokenValue();return e?y(t):h(t),s(),!0}function c(){return 10!==f.getToken()?(a(3,[],[2,5]),!1):(u(!1),6===f.getToken()?(b(":"),s(),l()||a(4,[],[2,5])):a(5,[],[2,5]),!0)}function l(){
switch(f.getToken()){case 3:return function(){v(),s();for(var e=!1;4!==f.getToken()&&17!==f.getToken();){if(5===f.getToken()){if(e||a(4,[],[]),b(","),s(),4===f.getToken()&&C)break}else e&&a(6,[],[]);l()||a(4,[],[4,5]),e=!0}return m(),4!==f.getToken()?a(8,[4],[]):s(),!0}();case 1:return function(){d(),s();for(var e=!1;2!==f.getToken()&&17!==f.getToken();){if(5===f.getToken()){if(e||a(4,[],[]),b(","),s(),2===f.getToken()&&C)break}else e&&a(6,[],[]);c()||a(4,[],[2,5]),e=!0}return g(),2!==f.getToken()?a(7,[2],[]):s(),!0}();case 10:return u(!0);default:return function(){switch(f.getToken()){case 11:var e=0;try{"number"!=typeof(e=JSON.parse(f.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 s(),!0}()}}void 0===r&&(r=p.DEFAULT)
;var f=n(e,!1),d=i(t.onObjectBegin),h=o(t.onObjectProperty),g=i(t.onObjectEnd),v=i(t.onArrayBegin),m=i(t.onArrayEnd),y=o(t.onLiteralValue),b=o(t.onSeparator),E=i(t.onComment),S=o(t.onError),x=r&&r.disallowComments,C=r&&r.allowTrailingComma;return s(),17===f.getToken()||(l()?(17!==f.getToken()&&a(9,[],[]),!0):(a(4,[],[]),!1))}function f(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 p;!function(e){e.DEFAULT={allowTrailingComma:!0}}(p=t.ParseOptions||(t.ParseOptions={})),t.createScanner=n;var d;!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"}(d||(d={})),t.getLocation=function(e,t){function n(e,t,n,r){s.value=e,s.offset=t,s.length=n,s.type=r,s.colonOffset=void 0,o=s}var r=[],i=new Object,o=void 0,s={value:{},offset:0,length:0,type:"object",parent:void 0},a=!1;try{l(e,{onObjectBegin:function(e,n){if(t<=e)throw i;o=void 0,a=t>e,r.push("")},onObjectProperty:function(e,o,s){if(t<o)throw i;if(n(e,o,s,"property"),r[r.length-1]=e,t<=o+s)throw i},onObjectEnd:function(e,n){if(t<=e)throw i;o=void 0,r.pop()},onArrayBegin:function(e,n){if(t<=e)throw i;o=void 0,r.push(0)},onArrayEnd:function(e,n){if(t<=e)throw i;o=void 0,r.pop()},onLiteralValue:function(e,r,o){if(t<r)throw i;if(n(e,r,o,f(e)),t<=r+o)throw i},onSeparator:function(e,n,s){if(t<=n)throw i;if(":"===e&&o&&"property"===o.type)o.colonOffset=n,a=!1,o=void 0;else if(","===e){
var u=r[r.length-1];"number"==typeof u?r[r.length-1]=u+1:(a=!0,r[r.length-1]=""),o=void 0}}})}catch(e){if(e!==i)throw e}return{path:r,previousNode:o,isAtPropertyKey:a,matches:function(e){for(var t=0,n=0;t<e.length&&n<r.length;n++)if(e[t]===r[n]||"*"===e[t])t++;else if("**"!==e[t])return!1;return t===e.length}}},t.parse=function(e,t,n){function r(e){Array.isArray(o)?o.push(e):i&&(o[i]=e)}void 0===t&&(t=[]),void 0===n&&(n=p.DEFAULT);var i=null,o=[],s=[];return l(e,{onObjectBegin:function(){var e={};r(e),s.push(o),o=e,i=null},onObjectProperty:function(e){i=e},onObjectEnd:function(){o=s.pop()},onArrayBegin:function(){var e=[];r(e),s.push(o),o=e,i=null},onArrayEnd:function(){o=s.pop()},onLiteralValue:r,onError:function(e,n,r){t.push({error:e,offset:n,length:r})}},n),o[0]},t.parseTree=function(e,t,n){function r(e){"property"===o.type&&(o.length=e-o.offset,o=o.parent)}function i(e){return o.children.push(e),e}void 0===t&&(t=[]),void 0===n&&(n=p.DEFAULT);var o={type:"array",offset:-1,length:-1,children:[],
parent:void 0};l(e,{onObjectBegin:function(e){o=i({type:"object",offset:e,length:-1,parent:o,children:[]})},onObjectProperty:function(e,t,n){(o=i({type:"property",offset:t,length:-1,parent:o,children:[]})).children.push({type:"string",value:e,offset:t,length:n,parent:o})},onObjectEnd:function(e,t){o.length=e+t-o.offset,o=o.parent,r(e+t)},onArrayBegin:function(e,t){o=i({type:"array",offset:e,length:-1,parent:o,children:[]})},onArrayEnd:function(e,t){o.length=e+t-o.offset,o=o.parent,r(e+t)},onLiteralValue:function(e,t,n){i({type:f(e),offset:t,length:n,parent:o,value:e}),r(t+n)},onSeparator:function(e,t,n){"property"===o.type&&(":"===e?o.colonOffset=t:","===e&&r(t))},onError:function(e,n,r){t.push({error:e,offset:n,length:r})}},n);var s=o.children[0];return s&&delete s.parent,s},t.findNodeAtLocation=function(e,t){if(e){for(var n=e,r=0,i=t;r<i.length;r++){var o=i[r];if("string"==typeof o){if("object"!==n.type||!Array.isArray(n.children))return;for(var s=!1,a=0,u=n.children;a<u.length;a++){var c=u[a]
;if(Array.isArray(c.children)&&c.children[0].value===o){n=c.children[1],s=!0;break}}if(!s)return}else{var l=o;if("array"!==n.type||l<0||!Array.isArray(n.children)||l>=n.children.length)return;n=n.children[l]}}return n}},t.getNodePath=s,t.getNodeValue=a,t.contains=u,t.findNodeAtOffset=c,t.visit=l,t.stripComments=function(e,t){var r,i,o=n(e),s=[],a=0;do{switch(i=o.getPosition(),r=o.scan()){case 12:case 13:case 17:a!==i&&s.push(e.substring(a,i)),void 0!==t&&s.push(o.getTokenValue().replace(/[^\r\n]/g,t)),a=o.getPosition()}}while(17!==r);return s.join("")}}),define(e[62],t([0,1,12]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toLocalISOString=function(e){return e.getFullYear()+"-"+n.pad(e.getMonth()+1,2)+"-"+n.pad(e.getDate(),2)+"T"+n.pad(e.getHours(),2)+":"+n.pad(e.getMinutes(),2)+":"+n.pad(e.getSeconds(),2)+"."+(e.getMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"}}),define(e[54],t([0,1,14,12,28,31,23]),function(e,t,n,r,i,o,s){"use strict";function a(e){switch(e){case 0:
return"";case 1:return S+"*?";default:return"(?:"+E+"|"+S+"+"+E+"|"+E+S+"+)*?"}}function u(e,t){if(!e)return[];for(var n=[],r=!1,i=!1,o="",s=0,a=e;s<a.length;s++){var u=a[s];switch(u){case t:if(!r&&!i){n.push(o),o="";continue}break;case"{":r=!0;break;case"}":r=!1;break;case"[":i=!0;break;case"]":i=!1}o+=u}return o&&n.push(o),n}function c(e){if(!e)return"";var t="",n=u(e,b);if(n.every(function(e){return e===y}))t=".*";else{var i=!1;n.forEach(function(e,o){if(e!==y){for(var s=!1,l="",f=!1,p="",d=0,h=e;d<h.length;d++){var g=h[d];if("}"!==g&&s)l+=g;else if(!f||"]"===g&&p)switch(g){case"{":s=!0;continue;case"[":f=!0;continue;case"}":var v="(?:"+u(l,",").map(function(e){return c(e)}).join("|")+")";t+=v,s=!1,l="";break;case"]":t+="["+p+"]",f=!1,p="";break;case"?":t+=S;continue;case"*":t+=a(1);continue;default:t+=r.escapeRegExpCharacters(g)}else{p+="-"===g?g:"^"!==g&&"!"!==g||p?g===b?"":r.escapeRegExpCharacters(g):"^"}}o<n.length-1&&(n[o+1]!==y||o+2<n.length)&&(t+=E),i=!1}else i||(t+=a(2),i=!0)})}return t}
function l(e,t){if(!e)return T;var i;i="string"!=typeof e?e.pattern:e;var o=(i=i.trim())+"_"+!!t.trimForExclusions,s=k.get(o);if(s)return f(s,e);var a;if(C.test(i)){var u=i.substr(4);s=function(e,t){return e&&r.endsWith(e,u)?i:null}}else s=(a=P.exec(p(i,t)))?function(e,t){var n="/"+e,i="\\"+e,o=function(o,s){return o?s?s===e?t:null:o===e||r.endsWith(o,n)||r.endsWith(o,i)?t:null:null},s=[e];return o.basenames=s,o.patterns=[t],o.allBasenames=s,o}(a[1],i):(t.trimForExclusions?w:_).test(i)?function(e,t){var r=m(e.slice(1,-1).split(",").map(function(e){return l(e,t)}).filter(function(e){return e!==T}),e),i=r.length;if(!i)return T;if(1===i)return r[0];var o=function(t,n){for(var i=0,o=r.length;i<o;i++)if(r[i](t,n))return e;return null},s=n.first(r,function(e){return!!e.allBasenames});s&&(o.allBasenames=s.allBasenames);var a=r.reduce(function(e,t){return t.allPaths?e.concat(t.allPaths):e},[]);a.length&&(o.allPaths=a);return o
}(i,t):(a=O.exec(p(i,t)))?d(a[1].substr(1),i,!0):(a=I.exec(p(i,t)))?d(a[1],i,!1):function(e){try{var t=new RegExp("^"+c(e)+"$");return function(n,r){return t.lastIndex=0,n&&t.test(n)?e:null}}catch(e){return T}}(i);return k.set(o,s),f(s,e)}function f(e,t){return"string"==typeof t?e:function(n,r){return i.isEqualOrParent(n,t.base)?e(t.pathToRelative(t.base,n),r):null}}function p(e,t){return t.trimForExclusions&&r.endsWith(e,"/**")?e.substr(0,e.length-2):e}function d(e,t,n){var o=i.nativeSep!==i.sep?e.replace(x,i.nativeSep):e,s=i.nativeSep+o,a=n?function(e,n){return e&&(e===o||r.endsWith(e,s))?t:null}:function(e,n){return e&&e===o?t:null};return a.allPaths=[(n?"*/":"./")+e],a}function h(e,t){if(void 0===t&&(t={}),!e)return j;if("string"==typeof e||v(e)){var r=l(e,t);if(r===T)return j;var o=function(e,t){return!!r(e,t)};return r.allBasenames&&(o.allBasenames=r.allBasenames),r.allPaths&&(o.allPaths=r.allPaths),o}return function(e,t){var r=m(Object.getOwnPropertyNames(e).map(function(n){return function(e,t,n){
if(!1===t)return T;var r=l(e,n);if(r===T)return T;if("boolean"==typeof t)return r;if(t){var i=t.when;if("string"==typeof i){var o=function(t,n,o,a){if(!a||!r(t,n))return null;var u=i.replace("$(basename)",o),c=a(u);return s.isThenable(c)?c.then(function(t){return t?e:null}):c?e:null};return o.requiresSiblings=!0,o}}return r}(n,e[n],t)}).filter(function(e){return e!==T})),o=r.length;if(!o)return T;if(!r.some(function(e){return!!e.requiresSiblings})){if(1===o)return r[0];var a=function(e,t){for(var n=0,i=r.length;n<i;n++){var o=r[n](e,t);if(o)return o}return null},u=n.first(r,function(e){return!!e.allBasenames});u&&(a.allBasenames=u.allBasenames);var c=r.reduce(function(e,t){return t.allPaths?e.concat(t.allPaths):e},[]);return c.length&&(a.allPaths=c),a}var f=function(e,t,n){for(var o=void 0,s=0,a=r.length;s<a;s++){var u=r[s];u.requiresSiblings&&n&&(t||(t=i.basename(e)),o||(o=t.substr(0,t.length-i.extname(e).length)));var c=u(e,t,o,n);if(c)return c}return null},p=n.first(r,function(e){return!!e.allBasenames})
;p&&(f.allBasenames=p.allBasenames);var d=r.reduce(function(e,t){return t.allPaths?e.concat(t.allPaths):e},[]);d.length&&(f.allPaths=d);return f}(e,t)}function g(e){for(var t={},n=0,r=e;n<r.length;n++){t[r[n]]=!0}return t}function v(e){var t=e;return t&&"string"==typeof t.base&&"string"==typeof t.pattern&&"function"==typeof t.pathToRelative}function m(e,t){var n=e.filter(function(e){return!!e.basenames});if(n.length<2)return e;var r,i=n.reduce(function(e,t){var n=t.basenames;return n?e.concat(n):e},[]);if(t){r=[];for(var o=0,s=i.length;o<s;o++)r.push(t)}else r=n.reduce(function(e,t){var n=t.patterns;return n?e.concat(n):e},[]);var a=function(e,t){if(!e)return null;if(!t){var n=void 0;for(n=e.length;n>0;n--){var o=e.charCodeAt(n-1);if(47===o||92===o)break}t=e.substr(n)}var s=i.indexOf(t);return-1!==s?r[s]:null};a.basenames=i,a.patterns=r,a.allBasenames=i;var u=e.filter(function(e){return!e.basenames});return u.push(a),u}Object.defineProperty(t,"__esModule",{value:!0}),t.getEmptyExpression=function(){
return Object.create(null)};var y="**",b="/",E="[/\\\\]",S="[^/\\\\]",x=/\//g;t.splitGlobAware=u;var C=/^\*\*\/\*\.[\w\.-]+$/,P=/^\*\*\/([\w\.-]+)\/?$/,_=/^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/,w=/^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/,O=/^\*\*((\/[\w\.-]+)+)\/?$/,I=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,k=new o.LRUCache(1e4),j=function(){return!1},T=function(){return null};t.match=function(e,t,n){return!(!e||!t)&&h(e)(t,void 0,n)},t.parse=h,t.hasSiblingPromiseFn=function(e){if(e){var t;return function(n){return t||(t=(e()||Promise.resolve([])).then(function(e){return e?g(e):{}})),t.then(function(e){return!!e[n]})}}},t.hasSiblingFn=function(e){if(e){var t;return function(n){if(!t){var r=e();t=r?g(r):{}}return!!t[n]}}},t.isRelativePattern=v,t.parseToAsync=function(e,t){var n=h(e,t);return function(e,t,r){var i=n(e,t,r);return s.isThenable(i)?i:Promise.resolve(i)}},t.getBasenameTerms=function(e){return e.allBasenames||[]},t.getPathTerms=function(e){
return e.allPaths||[]}}),define(e[50],t([0,1,28,12,14,54]),function(e,t,n,r,i,o){"use strict";function s(e,t){void 0===t&&(t=!1);var r=function(e){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:e.userConfigured,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?e.filepattern.toLowerCase():void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(n.sep)>=0}}(e);l.push(r),r.userConfigured?p.push(r):f.push(r),t&&!r.userConfigured&&l.forEach(function(e){e.mime===r.mime||e.userConfigured||(r.extension&&e.extension===r.extension&&console.warn("Overwriting extension <<"+r.extension+">> to now point to mime <<"+r.mime+">>"),r.filename&&e.filename===r.filename&&console.warn("Overwriting filename <<"+r.filename+">> to now point to mime <<"+r.mime+">>"),
r.filepattern&&e.filepattern===r.filepattern&&console.warn("Overwriting filepattern <<"+r.filepattern+">> to now point to mime <<"+r.mime+">>"),r.firstline&&e.firstline===r.firstline&&console.warn("Overwriting firstline <<"+r.firstline+">> to now point to mime <<"+r.mime+">>"))})}function a(e,i){if(!e)return[t.MIME_UNKNOWN];e=e.toLowerCase();var o=n.basename(e),s=u(e,o,p);if(s)return[s,t.MIME_TEXT];var a=u(e,o,f);if(a)return[a,t.MIME_TEXT];if(i){var c=function(e){r.startsWithUTF8BOM(e)&&(e=e.substr(1));if(e.length>0)for(var t=0,n=l;t<n.length;t++){var i=n[t];if(i.firstline){var o=e.match(i.firstline);if(o&&o.length>0)return i.mime}}return null}(i);if(c)return[c,t.MIME_TEXT]}return[t.MIME_UNKNOWN]}function u(e,t,n){for(var i=null,s=null,a=null,u=n.length-1;u>=0;u--){var c=n[u];if(t===c.filenameLowercase){i=c;break}if(c.filepattern&&(!s||c.filepattern.length>s.filepattern.length)){var l=c.filepatternOnPath?e:t;o.match(c.filepatternLowercase,l)&&(s=c)}
c.extension&&(!a||c.extension.length>a.extension.length)&&r.endsWith(t,c.extensionLowercase)&&(a=c)}return i?i.mime:s?s.mime:a?a.mime:null}function c(e){return!e||("string"==typeof e?e===t.MIME_BINARY||e===t.MIME_TEXT||e===t.MIME_UNKNOWN:1===e.length&&c(e[0]))}Object.defineProperty(t,"__esModule",{value:!0}),t.MIME_TEXT="text/plain",t.MIME_BINARY="application/octet-stream",t.MIME_UNKNOWN="application/unknown";var l=[],f=[],p=[];t.registerTextMime=s,t.clearTextMimes=function(e){e?(l=l.filter(function(e){return!e.userConfigured}),p=[]):(l=[],f=[],p=[])},t.guessMimeTypes=a,t.isUnspecific=c,t.suggestFilename=function(e,t){var n=l.filter(function(t){return!t.userConfigured&&t.extension&&t.id===e}).map(function(e){return e.extension}),o=i.coalesce(n).filter(function(e){return r.startsWith(e,".")});return o.length>0?t+o[0]:n[0]||t};var d={".bmp":"image/bmp",".gif":"image/gif",".jpg":"image/jpg",".jpeg":"image/jpg",".jpe":"image/jpg",".png":"image/png",".tiff":"image/tiff",".tif":"image/tiff",".ico":"image/x-icon",
".tga":"image/x-tga",".psd":"image/vnd.adobe.photoshop",".webp":"image/webp",".mid":"audio/midi",".midi":"audio/midi",".mp4a":"audio/mp4",".mpga":"audio/mpeg",".mp2":"audio/mpeg",".mp2a":"audio/mpeg",".mp3":"audio/mpeg",".m2a":"audio/mpeg",".m3a":"audio/mpeg",".oga":"audio/ogg",".ogg":"audio/ogg",".spx":"audio/ogg",".aac":"audio/x-aac",".wav":"audio/x-wav",".wma":"audio/x-ms-wma",".mp4":"video/mp4",".mp4v":"video/mp4",".mpg4":"video/mp4",".mpeg":"video/mpeg",".mpg":"video/mpeg",".mpe":"video/mpeg",".m1v":"video/mpeg",".m2v":"video/mpeg",".ogv":"video/ogg",".qt":"video/quicktime",".mov":"video/quicktime",".webm":"video/webm",".mkv":"video/x-matroska",".mk3d":"video/x-matroska",".mks":"video/x-matroska",".wmv":"video/x-ms-wmv",".flv":"video/x-flv",".avi":"video/x-msvideo",".movie":"video/x-sgi-movie"};t.getMediaMime=function(e){var t=n.extname(e);return d[t.toLowerCase()]}}),define(e[53],t([0,1,22,28,12,39,18,95]),function(e,t,n,r,i,o,s,a){"use strict";function u(e){return!(!s.isWindows||!e||":"!==e[1])}
function c(e){return u(e)?e.charAt(0).toUpperCase()+e.slice(1):e}function l(e,t){if(s.isWindows||!e||!t)return e;var n=f.original===t?f.normalized:void 0;return n||(n=""+i.rtrim(t,r.sep)+r.sep,f={original:t,normalized:n}),(s.isLinux?i.startsWith(e,n):i.startsWithIgnoreCase(e,n))&&(e="~/"+e.substr(n.length)),e}Object.defineProperty(t,"__esModule",{value:!0}),t.getPathLabel=function(e,t,f){if("string"==typeof e&&(e=n.URI.file(e)),f){var p=f.getWorkspaceFolder(e);if(p){var d=f.getWorkspace().folders.length>1,h=void 0;if(h=a.isEqual(p.uri,e,!s.isLinux)?"":r.normalize(i.ltrim(e.path.substr(p.uri.path.length),r.sep),!0),d){var g=p&&p.name?p.name:r.basename(p.uri.fsPath);h=h?g+" • "+h:g}return h}}if(e.scheme!==o.Schemas.file&&e.scheme!==o.Schemas.untitled)return e.with({query:null,fragment:null}).toString(!0);if(u(e.fsPath))return r.normalize(c(e.fsPath),!0);var v=r.normalize(e.fsPath,!0);return!s.isWindows&&t&&(v=l(v,t.userHome)),v},t.getBaseLabel=function(e){if(e){"string"==typeof e&&(e=n.URI.file(e))
;var t=r.basename(e.path)||(e.scheme===o.Schemas.file?e.fsPath:e.path);return u(t)?c(t):t}},t.normalizeDriveLetter=c;var f=Object.create(null);t.tildify=l,t.untildify=function(e,t){return e.replace(/^~($|\/|\\)/,t+"$1")};var p="…",d="\\\\",h="~";t.shorten=function(e){for(var t=new Array(e.length),n=!1,o=0;o<e.length;o++){var s=e[o];if(""!==s)if(s){n=!0;var a="";0===s.indexOf(d)?(a=s.substr(0,s.indexOf(d)+d.length),s=s.substr(s.indexOf(d)+d.length)):0===s.indexOf(r.nativeSep)?(a=s.substr(0,s.indexOf(r.nativeSep)+r.nativeSep.length),s=s.substr(s.indexOf(r.nativeSep)+r.nativeSep.length)):0===s.indexOf(h)&&(a=s.substr(0,s.indexOf(h)+h.length),s=s.substr(s.indexOf(h)+h.length));for(var u=s.split(r.nativeSep),c=1;n&&c<=u.length;c++)for(var l=u.length-c;n&&l>=0;l--){n=!1;for(var f=u.slice(l,l+c).join(r.nativeSep),g=0;!n&&g<e.length;g++)if(g!==o&&e[g]&&e[g].indexOf(f)>-1){var v=l+c===u.length,m=l>0&&e[g].indexOf(r.nativeSep)>-1?r.nativeSep+f:f,y=i.endsWith(e[g],m);n=!v||y}if(!n){var b=""
;(i.endsWith(u[0],":")||""!==a)&&(1===l&&(l=0,c++,f=u[0]+r.nativeSep+f),l>0&&(b=u[0]+r.nativeSep),b=a+b),l>0&&(b=b+p+r.nativeSep),b+=f,l+c<u.length&&(b=b+r.nativeSep+p),t[o]=b}}n&&(t[o]=s)}else t[o]=s;else t[o]="."+r.nativeSep}return t};var g;!function(e){e[e.TEXT=0]="TEXT",e[e.VARIABLE=1]="VARIABLE",e[e.SEPARATOR=2]="SEPARATOR"}(g||(g={})),t.template=function(e,t){void 0===t&&(t=Object.create(null));for(var n=[],r=!1,i="",o=0,s=e;o<s.length;o++){var a=s[o];if("$"===a||r&&"{"===a)i&&n.push({value:i,type:g.TEXT}),i="",r=!0;else if("}"===a&&r){var u=t[i];if("string"==typeof u)u.length&&n.push({value:u,type:g.VARIABLE});else if(u){var c=n[n.length-1];c&&c.type===g.SEPARATOR||n.push({value:u.label,type:g.SEPARATOR})}i="",r=!1}else i+=a}return i&&!r&&n.push({value:i,type:g.TEXT}),n.filter(function(e,t){return e.type!==g.SEPARATOR||[n[t-1],n[t+1]].every(function(e){return e&&(e.type===g.VARIABLE||e.type===g.TEXT)&&e.value.length>0})}).map(function(e){return e.value}).join("")},t.mnemonicMenuLabel=function(e,t){
return s.isMacintosh||t?e.replace(/\(&&\w\)|&&/g,""):e.replace(/&&/g,"&")},t.mnemonicButtonLabel=function(e){return s.isMacintosh?e.replace(/\(&&\w\)|&&/g,""):s.isWindows?e.replace(/&&|&/g,function(e){return"&"===e?"&&":"&"}):e.replace(/&&/g,"_")},t.unmnemonicLabel=function(e){return e.replace(/&/g,"&&")}}),define(e[61],t([0,1,33]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n.getPathFromAmdModule(e,"paths"),i=e.__$__nodeRequire(r);t.getAppDataPath=i.getAppDataPath,t.getDefaultUserDataPath=i.getDefaultUserDataPath});var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){function n(n){return function(s){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,
i&&(o=2&n[0]?i.return:n[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,n[1])).done)return o;switch(i=0,o&&(n=[2&n[0],o.value]),n[0]){case 0:case 1:o=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,i=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===n[0]||2===n[0])){a=0;continue}if(3===n[0]&&(!o||n[1]>o[0]&&n[1]<o[3])){a.label=n[1];break}if(6===n[0]&&a.label<o[1]){a.label=o[1],o=n;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(n);break}o[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(e){n=[6,e],i=0}finally{r=o=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}var r,i,o,s,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};define(e[64],t([0,1,84,3]),function(e,t,i,o){"use strict";function s(t,s){return void 0===s&&(s={}),
n(this,void 0,void 0,function(){var n,a,u,c,l,f;return r(this,function(r){switch(r.label){case 0:return n=i.parse(t),(a=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}(n))?(u=i.parse(a),/^https?:$/.test(u.protocol||"")?(c={host:u.hostname||"",port:Number(u.port),auth:u.auth,rejectUnauthorized:!o.isBoolean(s.strictSSL)||s.strictSSL},"http:"!==n.protocol?[3,2]:[4,new Promise(function(t,n){e(["http-proxy-agent"],t,n)})]):[2,null]):[2,null];case 1:return f=r.sent(),[3,4];case 2:return[4,new Promise(function(t,n){e(["https-proxy-agent"],t,n)})];case 3:f=r.sent(),r.label=4;case 4:return l=f,[2,new l(c)]}})})}Object.defineProperty(t,"__esModule",{value:!0}),t.getProxyAgent=s}),define(e[48],t([0,1,25,4,5,13,8,35,37,18]),function(e,t,n,r,i,o,s,a,u,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(){
function e(e,t){void 0===t&&(t={defaultConfig:Object.create(null),onError:function(e){return console.error(e)}}),this._path=e,this.options=t,this.disposables=[],this.configName=r.basename(this._path),this._onDidUpdateConfiguration=new s.Emitter,this.disposables.push(this._onDidUpdateConfiguration),this.registerWatcher(),this.initAsync()}return Object.defineProperty(e.prototype,"path",{get:function(){return this._path},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasParseErrors",{get:function(){return this.parseErrors&&this.parseErrors.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidUpdateConfiguration",{get:function(){return this._onDidUpdateConfiguration.event},enumerable:!0,configurable:!0}),e.prototype.initAsync=function(){var e=this;this.loadAsync(function(t){e.loaded||e.updateCache(t),e.options.initCallback&&e.options.initCallback(e.getConfig())})},e.prototype.updateCache=function(e){this.cache=e,this.loaded=!0},e.prototype.loadSync=function(){try{
return this.parse(n.readFileSync(this._path).toString())}catch(e){return this.options.defaultConfig}},e.prototype.loadAsync=function(e){var t=this;n.readFile(this._path,function(n,r){return e(n?t.options.defaultConfig:t.parse(r.toString()))})},e.prototype.parse=function(e){try{return this.parseErrors=[],(this.options.parse?this.options.parse(e,this.parseErrors):a.parse(e,this.parseErrors))||this.options.defaultConfig}catch(e){return this.options.defaultConfig}},e.prototype.registerWatcher=function(){var e=this,t=r.dirname(this._path);this.watch(t,!0),n.lstat(this._path,function(t,r){t||r.isDirectory()||r.isSymbolicLink()&&n.readlink(e._path,function(t,n){t||e.watch(n,!1)})})},e.prototype.watch=function(e,t){var n=this;this.disposed||this.disposables.push(u.watch(e,function(e,r){return n.onConfigFileChange(e,r,t)},function(e){return n.options.onError(e)}))},e.prototype.onConfigFileChange=function(e,t,n){var i=this;n&&(c.isWindows&&t&&t!==this.configName&&(t=r.basename(t)),
t!==this.configName)||(this.timeoutHandle&&(global.clearTimeout(this.timeoutHandle),this.timeoutHandle=null),this.timeoutHandle=global.setTimeout(function(){return i.reload()},this.options.changeBufferDelay||0))},e.prototype.reload=function(e){var t=this;this.loadAsync(function(n){if(i.equals(n,t.cache)||(t.updateCache(n),t._onDidUpdateConfiguration.fire({config:t.cache})),e)return e(n)})},e.prototype.getConfig=function(){return this.ensureLoaded(),this.cache},e.prototype.ensureLoaded=function(){this.loaded||this.updateCache(this.loadSync())},e.prototype.dispose=function(){this.disposed=!0,this.disposables=o.dispose(this.disposables)},e}();t.ConfigWatcher=l}),define(e[59],t([9,6]),function(e,t){return e.create("vs/base/common/errorMessage",t)}),define(e[30],t([0,1,59,3,14]),function(e,t,n,r,i){"use strict";function o(e,t){return e.message?t&&(e.stack||e.stacktrace)?n.localize(0,null,s(e),e.stack||e.stacktrace):s(e):n.localize(1,null)}function s(e){
return"string"==typeof e.code&&"number"==typeof e.errno&&"string"==typeof e.syscall?n.localize(2,null,e.message):e.message}function a(e,t){if(void 0===e&&(e=null),void 0===t&&(t=!1),!e)return n.localize(3,null);if(Array.isArray(e)){var s=i.coalesce(e),u=a(s[0],t);return s.length>1?n.localize(4,null,u,s.length):u}if(r.isString(e))return e;if(e.detail){var c=e.detail;if(c.error)return o(c.error,t);if(c.exception)return o(c.exception,t)}return e.stack?o(e,t):e.message?e.message:n.localize(5,null)}Object.defineProperty(t,"__esModule",{value:!0}),t.toErrorMessage=a}),define(e[65],t([9,6]),function(e,t){return e.create("vs/platform/configuration/common/configurationRegistry",t)}),define(e[66],t([9,6]),function(e,t){return e.create("vs/platform/extensionManagement/common/extensionManagement",t)}),define(e[68],t([9,6]),function(e,t){return e.create("vs/platform/extensionManagement/node/extensionManagementService",t)}),define(e[70],t([9,6]),function(e,t){
return e.create("vs/platform/extensionManagement/node/extensionManagementUtil",t)}),define(e[71],t([9,6]),function(e,t){return e.create("vs/platform/extensions/node/extensionValidator",t)}),define(e[72],t([9,6]),function(e,t){return e.create("vs/platform/node/zip",t)}),define(e[75],t([9,6]),function(e,t){return e.create("vs/platform/request/node/request",t)}),define(e[78],t([9,6]),function(e,t){return e.create("vs/platform/telemetry/common/telemetryService",t)});var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e}).apply(this,arguments)};define(e[17],t([0,1,12]),function(e,t,n){"use strict";function r(e,t){return e.uuid&&t.uuid?e.uuid===t.uuid:e.id===t.id||0===n.compareIgnoreCase(e.id,t.id)}Object.defineProperty(t,"__esModule",{value:!0}),t.areSameExtensions=r,t.adoptToGalleryExtensionId=function(e){return e.toLocaleLowerCase()},
t.getGalleryExtensionId=function(e,t){return e.toLocaleLowerCase()+"."+t.toLocaleLowerCase()},t.groupByExtension=function(e,t){for(var n=[],i=function(e){for(var i=0,o=n;i<o.length;i++){var s=o[i];if(s.some(function(n){return r(t(n),t(e))}))return s}return null},o=0,s=e;o<s.length;o++){var a=s[o],u=i(a);u?u.push(a):n.push([a])}return n},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 i({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="pprice.better-merge",t.getMaliciousExtensionsSet=function(e){for(var t=new Set,n=0,r=e;n<r.length;n++){var i=r[n];i.malicious&&t.add(i.id.id)}return t}}),define(e[85],t([0,1,5]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=/^%([\w\d.-]+)%$/i;t.localizeManifest=function(e,t){return n.cloneAndChange(e,function(e){if("string"==typeof e){var n=r.exec(e);if(n)return t[n[1]]||e}})}});var o=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();define(e[88],t([0,1,13,94,30,4,23,8,39,11]),function(e,t,i,s,a,u,c,l,f,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(e){function t(t,n){var r=e.call(this)||this;return r.environmentService=t,
r.logService=n,r.processesLimiter=new c.Limiter(5),r}return o(t,e),t.prototype.postUninstall=function(e){return n(this,void 0,void 0,function(){var t,n=this;return r(this,function(r){switch(r.label){case 0:return(t=this.parseScript(e,"uninstall"))?(this.logService.info(e.identifier.id,e.manifest.version,"Running post uninstall script"),[4,this.processesLimiter.queue(function(){return n.runLifecycleHook(t.script,"uninstall",t.args,!0,e).then(function(){return n.logService.info(e.identifier.id,e.manifest.version,"Finished running post uninstall script")},function(t){return n.logService.error(e.identifier.id,e.manifest.version,"Failed to run post uninstall script: "+t)})})]):[3,2];case 1:r.sent(),r.label=2;case 2:return[2,p.rimraf(this.getExtensionStoragePath(e)).then(void 0,function(e){return n.logService.error("Error while removing extension storage path",e)})]}})})},t.prototype.parseScript=function(e,t){var n="vscode:"+t
;if(e.location.scheme===f.Schemas.file&&e.manifest&&e.manifest.scripts&&"string"==typeof e.manifest.scripts[n]){var r=e.manifest.scripts[n].split(" ");return r.length<2||"node"!==r[0]||!r[1]?(this.logService.warn(e.identifier.id,e.manifest.version,n+" should be a node script"),null):{script:u.posix.join(e.location.fsPath,r[1]),args:r.slice(2)||[]}}return null},t.prototype.runLifecycleHook=function(e,t,n,r,i){var o=this;return new Promise(function(s,u){var c,l=o.start(e,t,n,i),f=function(e){c&&(clearTimeout(c),c=null),e?u(e):s(void 0)};l.on("error",function(e){f(a.toErrorMessage(e)||"Unknown")}),l.on("exit",function(e,n){f(e?"post-"+t+" process exited with code "+e:void 0)}),r&&(c=setTimeout(function(){c=null,l.kill(),u("timed out")},5e3))})},t.prototype.start=function(e,t,n,r){var i=this,o={silent:!0,execArgv:void 0},a=s.fork(e,["--type=extension-post-"+t].concat(n),o);a.stdout.setEncoding("utf8"),a.stderr.setEncoding("utf8")
;var u=l.Event.fromNodeEventEmitter(a.stdout,"data"),c=l.Event.fromNodeEventEmitter(a.stderr,"data");u(function(e){return i.logService.info(r.identifier.id,r.manifest.version,"post-"+t,e)}),c(function(e){return i.logService.error(r.identifier.id,r.manifest.version,"post-"+t,e)});var f=l.Event.any(l.Event.map(u,function(e){return{data:"%c"+e,format:[""]}}),l.Event.map(c,function(e){return{data:"%c"+e,format:["color: red"]}}));return l.Event.debounce(f,function(e,t){return e?{data:e.data+t.data,format:e.format.concat(t.format)}:{data:t.data,format:t.format}},100)(function(e){console.group(r.identifier.id),console.log.apply(console,[e.data].concat(e.format)),console.groupEnd()}),a},t.prototype.getExtensionStoragePath=function(e){return u.posix.join(this.environmentService.globalStorageHome,e.identifier.id.toLowerCase())},t}(i.Disposable);t.ExtensionsLifecycle=d}),define(e[38],t([0,1,17,12]),function(e,t,n,r){"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";var i=function(){function e(e,t){this.identifier=e,this.version=t}return e.prototype.key=function(){return this.identifier.id+"-"+this.version},e.prototype.equals=function(t){return t instanceof e&&(n.areSameExtensions(this.identifier,t.identifier)&&this.version===t.version)},e}();t.ExtensionIdentifierWithVersion=i,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={}));var o=function(){function e(e){this.value=e,this._lower=e.toLowerCase()}return e.equals=function(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){var n="string"==typeof e?e:e.value,i="string"==typeof t?t:t.value;return r.equalsIgnoreCase(n,i)}return e._lower===t._lower},e.toKey=function(e){
return"string"==typeof e?e.toLowerCase():e._lower},e}();t.ExtensionIdentifier=o}),define(e[49],t([0,1,13,4,38,11]),function(e,t,n,r,i,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t,n){var o=e.call(this)||this;return o.environmentService=t,o.extensionsManifestCache=r.join(o.environmentService.userDataPath,i.MANIFEST_CACHE_FOLDER,i.USER_MANIFEST_CACHE_FILE),o._register(n.onDidInstallExtension(function(e){return o.onDidInstallExtension(e)})),o._register(n.onDidUninstallExtension(function(e){return o.onDidUnInstallExtension(e)})),o}return o(t,e),t.prototype.onDidInstallExtension=function(e){e.error||this.invalidate()},t.prototype.onDidUnInstallExtension=function(e){e.error||this.invalidate()},t.prototype.invalidate=function(){s.del(this.extensionsManifestCache).then(function(){},function(){})},t}(n.Disposable);t.ExtensionsManifestCache=a}),define(e[36],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){
return function(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=!1),this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=n}}();t.SyncDescriptor=n,t.createSyncDescriptor=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new n(e,t)}}),define(e[51],t([0,1,3,47]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this._hashFn=e,this._nodes=Object.create(null)}return e.prototype.roots=function(){var e=[];return r.forEach(this._nodes,function(t){n.isEmptyObject(t.value.outgoing)&&e.push(t.value)}),e},e.prototype.insertEdge=function(e,t){var n=this.lookupOrInsertNode(e),r=this.lookupOrInsertNode(t);n.outgoing[this._hashFn(t)]=r,r.incoming[this._hashFn(e)]=n},e.prototype.removeNode=function(e){var t=this._hashFn(e);delete this._nodes[t],r.forEach(this._nodes,function(e){delete e.value.outgoing[t],delete e.value.incoming[t]})},e.prototype.lookupOrInsertNode=function(e){var t=this._hashFn(e),n=this._nodes[t]
;return n||(n=function(e){return{data:e,incoming:Object.create(null),outgoing:Object.create(null)}}(e),this._nodes[t]=n),n},e.prototype.lookup=function(e){return this._nodes[this._hashFn(e)]},e.prototype.isEmpty=function(){for(var e in this._nodes)return!1;return!0},e.prototype.toString=function(){var e=[];return r.forEach(this._nodes,function(t){e.push(t.key+", (incoming)["+Object.keys(t.value.incoming).join(", ")+"], (outgoing)["+Object.keys(t.value.outgoing).join(",")+"]")}),e.join("\n")},e}();t.Graph=i}),define(e[52],t([0,1,2]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDownloadService=n.createDecorator("downloadService")}),define(e[19],t([0,1,2]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IEnvironmentService=n.createDecorator("environmentService")}),define(e[24],t([0,1,66,2]),function(e,t,n,r){"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=r.createDecorator("extensionManagementService"),t.IExtensionGalleryService=r.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.IExtensionManagementServerService=r.createDecorator("extensionManagementServerService");!function(e){e[e.Disabled=0]="Disabled",e[e.WorkspaceDisabled=1]="WorkspaceDisabled",e[e.Enabled=2]="Enabled",e[e.WorkspaceEnabled=3]="WorkspaceEnabled"}(t.EnablementState||(t.EnablementState={})),t.IExtensionEnablementService=r.createDecorator("extensionEnablementService"),t.IExtensionTipsService=r.createDecorator("extensionTipsService");!function(e){e[e.Workspace=0]="Workspace",e[e.File=1]="File",e[e.Executable=2]="Executable",e[e.DynamicWorkspace=3]="DynamicWorkspace",e[e.Experimental=4]="Experimental"}(t.ExtensionRecommendationReason||(t.ExtensionRecommendationReason={})),t.ExtensionsLabel=n.localize(0,null),t.ExtensionsChannelId="extensions",t.PreferencesLabel=n.localize(1,null)}),define(e[42],t([0,1]),function(e,t){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._entries=new Map;for(var n=0,r=e;n<r.length;n++){var i=r[n],o=i[0],s=i[1];this.set(o,s)}}return e.prototype.set=function(e,t){var n=this._entries.get(e);return this._entries.set(e,t),n},e.prototype.forEach=function(e){this._entries.forEach(function(t,n){return e(n,t)})},e.prototype.has=function(e){return this._entries.has(e)},e.prototype.get=function(e){return this._entries.get(e)},e}();t.ServiceCollection=n}),define(e[57],t([0,1,20,3,51,36,2,42]),function(e,t,n,r,i,s,a,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t,n){void 0===e&&(e=new u.ServiceCollection),void 0===t&&(t=!1),this._services=e,this._strict=t,this._parent=n,this._services.set(a.IInstantiationService,this)}return e.prototype.createChild=function(t){return new e(t,this._strict,this)},e.prototype.invokeFunction=function(e){
for(var t=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var o=f.traceInvocation(e),s=!1;try{var u={get:function(e,r){if(s)throw n.illegalState("service accessor is only valid during the invocation of its target method");var i=t._getOrCreateServiceInstance(e,o);if(!i&&r!==a.optional)throw new Error("[invokeFunction] unknown service '"+e+"'");return i}};return e.apply(void 0,[u].concat(r))}finally{s=!0,o.stop()}},e.prototype.createInstance=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r,i;return e instanceof s.SyncDescriptor?(r=f.traceCreation(e.ctor),i=this._createInstance(e.ctor,e.staticArguments.concat(t),r)):(r=f.traceCreation(e),i=this._createInstance(e,t,r)),r.stop(),i},e.prototype._createInstance=function(e,t,n){void 0===t&&(t=[]);for(var i=a._util.getServiceDependencies(e).sort(function(e,t){return e.index-t.index}),o=[],s=0,u=i;s<u.length;s++){var c=u[s],l=this._getOrCreateServiceInstance(c.id,n)
;if(!l&&this._strict&&!c.optional)throw new Error("[createInstance] "+e.name+" depends on UNKNOWN service "+c.id+".");o.push(l)}var f=i.length>0?i[0].index:t.length;if(t.length!==f){console.warn("[createInstance] First service dependency of "+e.name+" at position "+(f+1)+" conflicts with "+t.length+" static arguments");var p=f-t.length;t=p>0?t.concat(new Array(p)):t.slice(0,f)}return r.create.apply(null,[e].concat(t,o))},e.prototype._setServiceInstance=function(e,t){if(this._services.get(e)instanceof s.SyncDescriptor)this._services.set(e,t);else{if(!this._parent)throw new Error("illegalState - setting UNKNOWN service instance");this._parent._setServiceInstance(e,t)}},e.prototype._getServiceInstanceOrDescriptor=function(e){var t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t},e.prototype._getOrCreateServiceInstance=function(e,t){var n=this._getServiceInstanceOrDescriptor(e)
;return n instanceof s.SyncDescriptor?this._createAndCacheServiceInstance(e,n,t.branch(e,!0)):(t.branch(e,!1),n)},e.prototype._createAndCacheServiceInstance=function(e,t,n){function r(){var e=new Error("[createInstance] cyclic dependency between services");throw e.message=o.toString(),e}for(var o=new i.Graph(function(e){return e.id.toString()}),u=0,c=[{id:e,desc:t,_trace:n}];c.length;){var l=c.pop();o.lookupOrInsertNode(l),u++>100&&r();for(var f=0,p=a._util.getServiceDependencies(l.desc.ctor);f<p.length;f++){var d=p[f],h=this._getServiceInstanceOrDescriptor(d.id);if(h||d.optional||console.warn("[createInstance] "+e+" depends on "+d.id+" which is NOT registered."),h instanceof s.SyncDescriptor){var g={id:d.id,desc:h,_trace:l._trace.branch(d.id,!0)};o.insertEdge(l,g),c.push(g)}}}for(;;){var v=o.roots();if(0===v.length){o.isEmpty()||r();break}for(var m=0,y=v;m<y.length;m++){var b=y[m].data,E=this._createServiceInstanceWithOwner(b.id,b.desc.ctor,b.desc.staticArguments,b.desc.supportsDelayedInstantiation,b._trace)
;this._setServiceInstance(b.id,E),o.removeNode(b)}}return this._getServiceInstanceOrDescriptor(e)},e.prototype._createServiceInstanceWithOwner=function(e,t,n,r,i){if(void 0===n&&(n=[]),this._services.get(e)instanceof s.SyncDescriptor)return this._createServiceInstance(t,n,r,i);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,n,r,i);throw new Error("illegalState - creating UNKNOWN service instance")},e.prototype._createServiceInstance=function(e,t,n,r){return void 0===t&&(t=[]),this._createInstance(e,t,r)},e}();t.InstantiationService=c;var l;!function(e){e[e.Creation=0]="Creation",e[e.Invocation=1]="Invocation",e[e.Branch=2]="Branch"}(l||(l={}));var f=function(){function e(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}return e.traceInvocation=function(t){return e._None},e.traceCreation=function(t){return e._None},e.prototype.branch=function(t,n){var r=new e(2,t.toString());return this._dep.push([t,n,r]),r},e.prototype.stop=function(){function t(e,n){
for(var i=[],o=new Array(e+1).join("\t"),s=0,a=n._dep;s<a.length;s++){var u=a[s],c=u[0],l=u[1],f=u[2];if(l&&f){r=!0,i.push(o+"CREATES -> "+c);var p=t(e+1,f);p&&i.push(p)}else i.push(o+"uses -> "+c)}return i.join("\n")}var n=Date.now()-this._start;e._totals+=n;var r=!1,i=[(0===this.type?"CREATE":"CALL")+" "+this.name,""+t(1,this),"DONE, took "+n.toFixed(2)+"ms (grand total "+e._totals.toFixed(2)+"ms)"];(n>2||r)&&console.log(i.join("\n"))},e._None=new(function(e){function t(){return e.call(this,-1,null)||this}return o(t,e),t.prototype.stop=function(){},t.prototype.branch=function(){return this},t}(e)),e._totals=0,e}()}),define(e[7],t([0,1,2,13,18,8]),function(e,t,n,r,i,s){"use strict";function a(){return(new Date).toISOString()}Object.defineProperty(t,"__esModule",{value:!0}),t.ILogService=n.createDecorator("logService");var u;!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"
}(u=t.LogLevel||(t.LogLevel={})),t.DEFAULT_LOG_LEVEL=u.Info;var c=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.level=t.DEFAULT_LOG_LEVEL,n._onDidChangeLogLevel=n._register(new s.Emitter),n.onDidChangeLogLevel=n._onDidChangeLogLevel.event,n}return o(n,e),n.prototype.setLevel=function(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))},n.prototype.getLevel=function(){return this.level},n}(r.Disposable);t.AbstractLogService=c;var l=function(e){function n(n){void 0===n&&(n=t.DEFAULT_LOG_LEVEL);var r=e.call(this)||this;return r.setLevel(n),r.useColors=!i.isWindows,r}return o(n,e),n.prototype.trace=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=u.Trace&&(this.useColors?console.log.apply(console,["[90m[main "+a()+"][0m",e].concat(t)):console.log.apply(console,["[main "+a()+"]",e].concat(t)))},n.prototype.debug=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]
;this.getLevel()<=u.Debug&&(this.useColors?console.log.apply(console,["[90m[main "+a()+"][0m",e].concat(t)):console.log.apply(console,["[main "+a()+"]",e].concat(t)))},n.prototype.info=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=u.Info&&(this.useColors?console.log.apply(console,["[90m[main "+a()+"][0m",e].concat(t)):console.log.apply(console,["[main "+a()+"]",e].concat(t)))},n.prototype.warn=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=u.Warning&&(this.useColors?console.warn.apply(console,["[93m[main "+a()+"][0m",e].concat(t)):console.warn.apply(console,["[main "+a()+"]",e].concat(t)))},n.prototype.error=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=u.Error&&(this.useColors?console.error.apply(console,["[91m[main "+a()+"][0m",e].concat(t)):console.error.apply(console,["[main "+a()+"]",e].concat(t)))},n.prototype.critical=function(e){
for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=u.Critical&&(this.useColors?console.error.apply(console,["[90m[main "+a()+"][0m",e].concat(t)):console.error.apply(console,["[main "+a()+"]",e].concat(t)))},n.prototype.dispose=function(){},n}(c);t.ConsoleLogMainService=l;var f=function(e){function n(n){void 0===n&&(n=t.DEFAULT_LOG_LEVEL);var r=e.call(this)||this;return r.setLevel(n),r}return o(n,e),n.prototype.trace=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=u.Trace&&console.log.apply(console,["%cTRACE","color: #888",e].concat(t))},n.prototype.debug=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=u.Debug&&console.log.apply(console,["%cDEBUG","background: #eee; color: #888",e].concat(t))},n.prototype.info=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=u.Info&&console.log.apply(console,["%c INFO","color: #33f",e].concat(t))},n.prototype.warn=function(e){
for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=u.Warning&&console.log.apply(console,["%c WARN","color: #993",e].concat(t))},n.prototype.error=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=u.Error&&console.log.apply(console,["%c  ERR","color: #f33",e].concat(t))},n.prototype.critical=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=u.Critical&&console.log.apply(console,["%cCRITI","background: #f33; color: white",e].concat(t))},n.prototype.dispose=function(){},n}(c);t.ConsoleLogService=f;var p=function(e){function t(t){var n=e.call(this)||this;return n.logServices=t,t.length&&n.setLevel(t[0].getLevel()),n}return o(t,e),t.prototype.setLevel=function(t){for(var n=0,r=this.logServices;n<r.length;n++){r[n].setLevel(t)}e.prototype.setLevel.call(this,t)},t.prototype.trace=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,i=this.logServices;r<i.length;r++){var o=i[r]
;o.trace.apply(o,[e].concat(t))}},t.prototype.debug=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,i=this.logServices;r<i.length;r++){var o=i[r];o.debug.apply(o,[e].concat(t))}},t.prototype.info=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,i=this.logServices;r<i.length;r++){var o=i[r];o.info.apply(o,[e].concat(t))}},t.prototype.warn=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,i=this.logServices;r<i.length;r++){var o=i[r];o.warn.apply(o,[e].concat(t))}},t.prototype.error=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,i=this.logServices;r<i.length;r++){var o=i[r];o.error.apply(o,[e].concat(t))}},t.prototype.critical=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,i=this.logServices;r<i.length;r++){var o=i[r];o.critical.apply(o,[e].concat(t))}},t.prototype.dispose=function(){for(var e=0,t=this.logServices;e<t.length;e++){
t[e].dispose()}},t}(c);t.MultiplexLogService=p;var d=function(e){function t(t){var n=e.call(this)||this;return n.logService=t,n._register(t),n}return o(t,e),Object.defineProperty(t.prototype,"onDidChangeLogLevel",{get:function(){return this.logService.onDidChangeLogLevel},enumerable:!0,configurable:!0}),t.prototype.setLevel=function(e){this.logService.setLevel(e)},t.prototype.getLevel=function(){return this.logService.getLevel()},t.prototype.trace=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r;(r=this.logService).trace.apply(r,[e].concat(t))},t.prototype.debug=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r;(r=this.logService).debug.apply(r,[e].concat(t))},t.prototype.info=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r;(r=this.logService).info.apply(r,[e].concat(t))},t.prototype.warn=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r;(r=this.logService).warn.apply(r,[e].concat(t))},
t.prototype.error=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r;(r=this.logService).error.apply(r,[e].concat(t))},t.prototype.critical=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r;(r=this.logService).critical.apply(r,[e].concat(t))},t}(r.Disposable);t.DelegatedLogService=d;var h=function(){function e(){this.onDidChangeLogLevel=(new s.Emitter).event}return e.prototype.setLevel=function(e){},e.prototype.getLevel=function(){return u.Info},e.prototype.trace=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]},e.prototype.debug=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]},e.prototype.info=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]},e.prototype.warn=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]},e.prototype.error=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]},e.prototype.critical=function(e){
for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]},e.prototype.dispose=function(){},e}();t.NullLogService=h,t.getLogLevel=function(e){if(e.verbose)return u.Trace;if("string"==typeof e.args.log)switch(e.args.log.toLowerCase()){case"trace":return u.Trace;case"debug":return u.Debug;case"info":return u.Info;case"warn":return u.Warning;case"error":return u.Error;case"critical":return u.Critical;case"off":return u.Off}return t.DEFAULT_LOG_LEVEL}}),define(e[60],t([0,1,4,7]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSpdLogService=function(t,o,s){try{var a=e.__$__nodeRequire("spdlog");a.setAsyncMode(8192,500);var u=n.join(s,t+".log"),c=new a.RotatingLogger(t,u,5242880,6);return c.setLevel(0),new i(c,o)}catch(e){console.error(e)}return new r.NullLogService},t.createRotatingLogger=function(t,n,r,i){return new(e.__$__nodeRequire("spdlog").RotatingLogger)(t,n,r,i)};var i=function(e){function t(t,n){void 0===n&&(n=r.LogLevel.Error);var i=e.call(this)||this
;return i.logger=t,i.setLevel(n),i}return o(t,e),t.prototype.trace=function(){this.getLevel()<=r.LogLevel.Trace&&this.logger.trace(this.format(arguments))},t.prototype.debug=function(){this.getLevel()<=r.LogLevel.Debug&&this.logger.debug(this.format(arguments))},t.prototype.info=function(){this.getLevel()<=r.LogLevel.Info&&this.logger.info(this.format(arguments))},t.prototype.warn=function(){this.getLevel()<=r.LogLevel.Warning&&this.logger.warn(this.format(arguments))},t.prototype.error=function(){if(this.getLevel()<=r.LogLevel.Error){var e=arguments[0];if(e instanceof Error){var t=Array.prototype.slice.call(arguments);t[0]=e.stack,this.logger.error(this.format(t))}else this.logger.error(this.format(arguments))}},t.prototype.critical=function(){this.getLevel()<=r.LogLevel.Critical&&this.logger.critical(this.format(arguments))},t.prototype.dispose=function(){this.logger.drop()},t.prototype.format=function(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if("object"==typeof r)try{r=JSON.stringify(r)}catch(e){}
t+=(n>0?" ":"")+r}return t},t}(r.AbstractLogService)}),define(e[32],t([0,1,71,21]),function(e,t,n,r){"use strict";function i(e){return"*"===(e=e.trim())||c.test(e)}function o(e){if(!i(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};var t=e.match(c);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;var t=e.majorBase,n=e.majorMustEqual,r=e.minorBase,i=e.minorMustEqual,o=e.patchBase,s=e.patchMustEqual;return e.hasCaret&&(0===t?s=!1:(i=!1,s=!1)),{majorBase:t,majorMustEqual:n,minorBase:r,minorMustEqual:i,patchBase:o,patchMustEqual:s,isMinimum:e.hasGreaterEquals}}function a(e,t){var n;n="string"==typeof e?s(o(e)):e
;var r;if(r="string"==typeof t?s(o(t)):t,!n||!r)return!1;var i=n.majorBase,a=n.minorBase,u=n.patchBase,c=r.majorBase,l=r.minorBase,f=r.patchBase,p=r.majorMustEqual,d=r.minorMustEqual,h=r.patchMustEqual;return r.isMinimum?i>c||!(i<c)&&(a>l||!(a<l)&&u>=f):(1!==i||0!==c||p&&d&&h||(c=1,l=0,f=0,p=!0,d=!1,h=!1),!(i<c)&&(i>c?!p:!(a<l)&&(a>l?!d:!(u<f)&&(!(u>f)||!h))))}function u(e,t,r){void 0===r&&(r=[]);var i=s(o(t));if(!i)return r.push(n.localize(0,null,t)),!1;if(0===i.majorBase){if(!i.majorMustEqual||!i.minorMustEqual)return r.push(n.localize(1,null,t)),!1}else if(!i.majorMustEqual)return r.push(n.localize(2,null,t)),!1;return!!a(e,i)||(r.push(n.localize(3,null,e,t)),!1)}Object.defineProperty(t,"__esModule",{value:!0});var c=/^(\^|>=)?((\d+)|x)\.((\d+)|x)\.((\d+)|x)(\-.*)?$/;t.isValidVersionStr=i,t.parseVersion=o,t.normalizeVersion=s,t.isValidVersion=a,t.isValidExtensionVersion=function(e,t,n){return!(!t.isBuiltin&&void 0!==t.main)||u(e,t.engines.vscode,n)},t.isEngineValid=function(e){
return"*"===e||u(r.default.version,e)},t.isVersionValid=u});var s=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s};define(e[63],t([0,1,92,61,26,4,55,21,27,62,18,33,22]),function(e,t,n,r,i,o,a,u,c,l,f,p,d){"use strict";function h(e,t){return f.isWindows?function(e,t){return"\\\\.\\pipe\\"+n.createHash("md5").update(e).digest("hex")+"-"+u.default.version+"-"+t+"-sock"}(e,t):function(e,t){if(E){var r=n.createHash("md5").update(e).digest("hex").substr(0,8);return o.join(E,"vscode-"+r+"-"+u.default.version+"-"+t+".sock")}return o.join(e,u.default.version+"-"+t+".sock")}(e,t)}function g(e,t){return m(e.debugPluginHost,e.debugBrkPluginHost,5870,t,e.debugId)}function v(e,t){return m(e.debugSearch,e.debugBrkSearch,5876,t)}
function m(e,t,n,r,i){var o=t||e,s=Number(o)||(r?null:n);return{port:s,break:!!s&&Boolean(!!t),debugId:i}}function y(e,t){if(e){var n=o.resolve(e);return o.normalize(e)===n?n:o.resolve(t.env.VSCODE_CWD||t.cwd(),e)}}function b(e,t){return y(e["user-data-dir"],t)||o.resolve(r.getDefaultUserDataPath(t.platform))}Object.defineProperty(t,"__esModule",{value:!0});var E=process.env.XDG_RUNTIME_DIR,S=function(){function t(e,t){if(this._args=e,this._execPath=t,!process.env.VSCODE_LOGS){var n=l.toLocalISOString(new Date).replace(/-|:|\.\d+Z$/g,"");process.env.VSCODE_LOGS=o.join(this.userDataPath,"logs",n)}this.logsPath=process.env.VSCODE_LOGS}return Object.defineProperty(t.prototype,"args",{get:function(){return this._args},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"appRoot",{get:function(){return o.dirname(p.getPathFromAmdModule(e,""))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"execPath",{get:function(){return this._execPath},enumerable:!0,configurable:!0}),
Object.defineProperty(t.prototype,"cliPath",{get:function(){return function(e,t,n){return f.isWindows?n?o.join(o.dirname(e),"bin",c.default.applicationName+".cmd"):o.join(t,"scripts","code-cli.bat"):f.isLinux?n?o.join(o.dirname(e),"bin",""+c.default.applicationName):o.join(t,"scripts","code-cli.sh"):n?o.join(t,"bin","code"):o.join(t,"scripts","code-cli.sh")}(this.execPath,this.appRoot,this.isBuilt)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"userHome",{get:function(){return i.homedir()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"userDataPath",{get:function(){var e=process.env.VSCODE_PORTABLE;return e?o.join(e,"user-data"):b(this._args,process)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"appNameLong",{get:function(){return c.default.nameLong},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"appQuality",{get:function(){return c.default.quality},enumerable:!0,configurable:!0}),
Object.defineProperty(t.prototype,"appSettingsHome",{get:function(){return o.join(this.userDataPath,"User")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"appSettingsPath",{get:function(){return o.join(this.appSettingsHome,"settings.json")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"globalStorageHome",{get:function(){return o.join(this.appSettingsHome,"globalStorage")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"workspaceStorageHome",{get:function(){return o.join(this.appSettingsHome,"workspaceStorage")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"settingsSearchBuildId",{get:function(){return c.default.settingsSearchBuildId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"settingsSearchUrl",{get:function(){return c.default.settingsSearchUrl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"appKeybindingsPath",{get:function(){return o.join(this.appSettingsHome,"keybindings.json")},
enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isExtensionDevelopment",{get:function(){return!!this._args.extensionDevelopmentPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"backupHome",{get:function(){return o.join(this.userDataPath,"Backups")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"backupWorkspacesPath",{get:function(){return o.join(this.backupHome,"workspaces.json")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"workspacesHome",{get:function(){return o.join(this.userDataPath,"Workspaces")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"installSourcePath",{get:function(){return o.join(this.userDataPath,"installSource")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"builtinExtensionsPath",{get:function(){var t=y(this._args["builtin-extensions-dir"],process);return t||o.normalize(o.join(p.getPathFromAmdModule(e,""),"..","extensions"))},enumerable:!0,configurable:!0}),
Object.defineProperty(t.prototype,"extensionsPath",{get:function(){var e=y(this._args["extensions-dir"],process);if(e)return e;var t=process.env.VSCODE_EXTENSIONS;if(t)return t;var n=process.env.VSCODE_PORTABLE;return n?o.join(n,"extensions"):o.join(this.userHome,c.default.dataFolderName,"extensions")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"extensionDevelopmentLocationURI",{get:function(){var e=this._args.extensionDevelopmentPath;if(e)return/^[^:/?#]+?:\/\//.test(e)?d.URI.parse(e):d.URI.file(o.normalize(e))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"extensionTestsPath",{get:function(){return this._args.extensionTestsPath?o.normalize(this._args.extensionTestsPath):this._args.extensionTestsPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disableExtensions",{get:function(){if(this._args["disable-extensions"])return!0;var e=this._args["disable-extension"];if(e){if("string"==typeof e)return[e];if(Array.isArray(e)&&e.length>0)return e}
return!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"skipGettingStarted",{get:function(){return!!this._args["skip-getting-started"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"skipReleaseNotes",{get:function(){return!!this._args["skip-release-notes"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"skipAddToRecentlyOpened",{get:function(){return!!this._args["skip-add-to-recently-opened"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"debugExtensionHost",{get:function(){return g(this._args,this.isBuilt)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"debugSearch",{get:function(){return v(this._args,this.isBuilt)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isBuilt",{get:function(){return!process.env.VSCODE_DEV},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"verbose",{get:function(){return!!this._args.verbose},enumerable:!0,configurable:!0}),
Object.defineProperty(t.prototype,"log",{get:function(){return this._args.log},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wait",{get:function(){return!!this._args.wait},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"logExtensionHostCommunication",{get:function(){return!!this._args.logExtensionHostCommunication},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return!!this._args.status},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mainIPCHandle",{get:function(){return h(this.userDataPath,"main")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sharedIPCHandle",{get:function(){return h(this.userDataPath,"shared")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nodeCachedDataDir",{get:function(){return process.env.VSCODE_NODE_CACHED_DATA_DIR||void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disableUpdates",{get:function(){
return!!this._args["disable-updates"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disableCrashReporter",{get:function(){return!!this._args["disable-crash-reporter"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"driverHandle",{get:function(){return this._args.driver},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"driverVerbose",{get:function(){return!!this._args["driver-verbose"]},enumerable:!0,configurable:!0}),s([a.memoize],t.prototype,"appRoot",null),s([a.memoize],t.prototype,"cliPath",null),s([a.memoize],t.prototype,"userHome",null),s([a.memoize],t.prototype,"userDataPath",null),s([a.memoize],t.prototype,"appSettingsHome",null),s([a.memoize],t.prototype,"appSettingsPath",null),s([a.memoize],t.prototype,"globalStorageHome",null),s([a.memoize],t.prototype,"workspaceStorageHome",null),s([a.memoize],t.prototype,"settingsSearchBuildId",null),s([a.memoize],t.prototype,"settingsSearchUrl",null),s([a.memoize],t.prototype,"appKeybindingsPath",null),
s([a.memoize],t.prototype,"isExtensionDevelopment",null),s([a.memoize],t.prototype,"backupHome",null),s([a.memoize],t.prototype,"backupWorkspacesPath",null),s([a.memoize],t.prototype,"workspacesHome",null),s([a.memoize],t.prototype,"installSourcePath",null),s([a.memoize],t.prototype,"builtinExtensionsPath",null),s([a.memoize],t.prototype,"extensionsPath",null),s([a.memoize],t.prototype,"extensionDevelopmentLocationURI",null),s([a.memoize],t.prototype,"extensionTestsPath",null),s([a.memoize],t.prototype,"debugExtensionHost",null),s([a.memoize],t.prototype,"debugSearch",null),s([a.memoize],t.prototype,"mainIPCHandle",null),s([a.memoize],t.prototype,"sharedIPCHandle",null),s([a.memoize],t.prototype,"nodeCachedDataDir",null),t}();t.EnvironmentService=S,t.parseExtensionHostPort=g,t.parseSearchPort=v,t.parseDebugPort=m,t.parseUserDataDir=b}),define(e[67],t([0,1,17,14,27]),function(e,t,n,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isUIExtension=function(e,t){
var o=n.getGalleryExtensionId(e.publisher,e.name),s=t.getValue("_workbench.uiExtensions")||[];if(s.length){if(-1!==s.indexOf(o))return!0;if(-1!==s.indexOf("-"+o))return!1}switch(e.extensionKind){case"ui":return!0;case"workspace":return!1;default:return!((!r.isNonEmptyArray(i.default.uiExtensions)||!i.default.uiExtensions.some(function(e){return n.areSameExtensions({id:e},{id:o})}))&&(e.main||e.contributes&&r.isNonEmptyArray(e.contributes.debuggers)))}}}),define(e[15],t([0,1,3,56]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){this.data={}}return e.prototype.add=function(e,t){r.ok(n.isString(e)),r.ok(n.isObject(t)),r.ok(!this.data.hasOwnProperty(e),"There is already an extension with this id"),this.data[e]=t},e.prototype.knows=function(e){return this.data.hasOwnProperty(e)},e.prototype.as=function(e){return this.data[e]||null},e}();t.Registry=new i}),define(e[69],t([0,1,15,8]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{
value:!0}),t.Extensions={JSONContribution:"base.contributions.json"};var i=new(function(){function e(){this._onDidChangeSchema=new r.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.schemasById={}}return e.prototype.registerSchema=function(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)},e.prototype.notifySchemaChanged=function(e){this._onDidChangeSchema.fire(e)},e.prototype.getSchemaContributions=function(){return{schemas:this.schemasById}},e}());n.Registry.add(t.Extensions.JSONContribution,i)}),define(e[16],t([0,1,65,8,15,3,12,69]),function(e,t,n,r,i,o,s,a){"use strict";function u(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)?n.localize(3,null,e):void 0!==g.getConfigurationProperties()[e]?n.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.WINDOW=2]="WINDOW",e[e.RESOURCE=3]="RESOURCE"}(t.ConfigurationScope||(t.ConfigurationScope={})),t.allSettings={properties:{},patternProperties:{}},t.applicationSettings={properties:{},patternProperties:{}},t.windowSettings={properties:{},patternProperties:{}},t.resourceSettings={properties:{},patternProperties:{}},t.editorConfigurationSchemaId="vscode://schemas/settings/editor";var l=i.Registry.as(a.Extensions.JSONContribution),f=function(){function e(){this.overrideIdentifiers=[],this._onDidSchemaChange=new r.Emitter,this.onDidSchemaChange=this._onDidSchemaChange.event,this._onDidUpdateConfiguration=new r.Emitter,this.onDidUpdateConfiguration=this._onDidUpdateConfiguration.event,
this.defaultOverridesConfigurationNode={id:"defaultOverrides",title:n.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(),l.registerSchema(t.editorConfigurationSchemaId,this.editorConfigurationSchema)}return e.prototype.registerConfiguration=function(e,t){void 0===t&&(t=!0),this.registerConfigurations([e],t)},e.prototype.registerConfigurations=function(e,t){var n=this;void 0===t&&(t=!0);var r=[];e.forEach(function(e){r.push.apply(r,n.validateAndRegisterProperties(e,t)),n.configurationContributors.push(e),n.registerJSONConfiguration(e),n.updateSchemaForOverrideSettingsConfiguration(e)}),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(r)},e.prototype.deregisterConfigurations=function(e){
for(var n=this,r=[],i=function(e){if(e.properties)for(var o in e.properties)switch(r.push(o),delete n.configurationProperties[o],delete n.editorConfigurationSchema.properties[o],delete t.allSettings.properties[o],e.properties[o].scope){case 1:delete t.applicationSettings.properties[o];break;case 2:delete t.windowSettings.properties[o];break;case 3:delete t.resourceSettings.properties[o]}e.allOf&&e.allOf.forEach(function(e){return i(e)})},o=0,s=e;o<s.length;o++){var a=s[o];i(a);var u=this.configurationContributors.indexOf(a);-1!==u&&this.configurationContributors.splice(u,1)}l.registerSchema(t.editorConfigurationSchemaId,this.editorConfigurationSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(r)},e.prototype.registerDefaultConfigurations=function(e){for(var r=[],i=0,o=e;i<o.length;i++){var s=o[i];for(var a in s.defaults){var u=s.defaults[a];if(t.OVERRIDE_PROPERTY_PATTERN.test(a)&&"object"==typeof u){var c={type:"object",default:u,description:n.localize(1,null,a),
$ref:t.editorConfigurationSchemaId};t.allSettings.properties[a]=c,this.defaultOverridesConfigurationNode.properties[a]=c,this.configurationProperties[a]=c,r.push(a)}}}this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(r)},e.prototype.deregisterDefaultConfigurations=function(e){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];for(var s in o.defaults)n.push(s),delete t.allSettings.properties[s],delete this.defaultOverridesConfigurationNode.properties[s],delete this.configurationProperties[s]}this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(n)},e.prototype.notifyConfigurationSchemaUpdated=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._onDidSchemaChange.fire()},e.prototype.registerOverrideIdentifiers=function(e){var t;(t=this.overrideIdentifiers).push.apply(t,e),this.updateOverridePropertyPatternKey()},e.prototype.validateAndRegisterProperties=function(e,n,r,i){void 0===n&&(n=!0),void 0===r&&(r=2),void 0===i&&(i=!1),
r=o.isUndefinedOrNull(e.scope)?r:e.scope,i=e.overridable||i;var s=[],a=e.properties;if(a)for(var l in a){var f=void 0;if(n&&(f=c(l)))console.warn(f),delete a[l];else{var p=a[l],d=p.default;o.isUndefined(d)&&(p.default=u(p.type)),i&&(p.overridable=!0),t.OVERRIDE_PROPERTY_PATTERN.test(l)?p.scope=void 0:p.scope=o.isUndefinedOrNull(p.scope)?r:p.scope,!a[l].hasOwnProperty("included")||a[l].included?(this.configurationProperties[l]=a[l],s.push(l)):(this.excludedConfigurationProperties[l]=a[l],delete a[l])}}var h=e.allOf;if(h)for(var g=0,v=h;g<v.length;g++){var m=v[g];s.push.apply(s,this.validateAndRegisterProperties(m,n,r,i))}return s},e.prototype.getConfigurations=function(){return this.configurationContributors},e.prototype.getConfigurationProperties=function(){return this.configurationProperties},e.prototype.getExcludedConfigurationProperties=function(){return this.excludedConfigurationProperties},e.prototype.registerJSONConfiguration=function(e){function n(e){var r=e.properties
;if(r)for(var i in r)switch(t.allSettings.properties[i]=r[i],r[i].scope){case 1:t.applicationSettings.properties[i]=r[i];break;case 2:t.windowSettings.properties[i]=r[i];break;case 3:t.resourceSettings.properties[i]=r[i]}var o=e.allOf;o&&o.forEach(n)}n(e)},e.prototype.updateSchemaForOverrideSettingsConfiguration=function(e){e.id!==p&&(this.update(e),l.registerSchema(t.editorConfigurationSchemaId,this.editorConfigurationSchema))},e.prototype.updateOverridePropertyPatternKey=function(){var e=t.allSettings.patternProperties[this.overridePropertyPattern];e||(e={type:"object",description:n.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.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.windowSettings.patternProperties[this.overridePropertyPattern]=e,t.resourceSettings.patternProperties[this.overridePropertyPattern]=e,this._onDidSchemaChange.fire()},e.prototype.update=function(e){var t=this,n=e.properties;if(n)for(var r in n)n[r].overridable&&(this.editorConfigurationSchema.properties[r]=this.getConfigurationProperties()[r]);var i=e.allOf;i&&i.forEach(function(e){return t.update(e)})},e.prototype.computeOverridePropertyPattern=function(){this.overridePropertyPattern=this.overrideIdentifiers.length?h.replace("${0}",this.overrideIdentifiers.map(function(e){return s.createRegExp(e,!1).source}).join("|")):d},e}(),p="override",d="\\[.*\\]$",h="\\[(${0})\\]$";t.OVERRIDE_PROPERTY_PATTERN=new RegExp(d),t.getDefaultValue=u;var g=new f;i.Registry.add(t.Extensions.Configuration,g),t.validateProperty=c,t.getScopes=function(){
for(var e={},t=g.getConfigurationProperties(),n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];e[i]=t[i].scope}return e.launch=3,e.task=3,e}}),define(e[10],t([0,1,5,3,22,15,2,16]),function(e,t,n,r,i,o,s,a){"use strict";function u(e,t){var n=Object.create(null);for(var r in e)c(n,r,e[r],t);return n}function c(e,t,n,r){for(var i=t.split("."),o=i.pop(),s=e,a=0;a<i.length;a++){var u=i[a],c=s[u];switch(typeof c){case"undefined":c=s[u]=Object.create(null);break;case"object":break;default:return void r("Ignoring "+t+" as "+i.slice(0,a+1).join(".")+" is "+JSON.stringify(c))}s=c}"object"==typeof s?s[o]=n:r("Ignoring "+t+" as "+i.join(".")+" is "+JSON.stringify(s))}function l(e,t){var n=t.shift();if(0!==t.length){if(-1!==Object.keys(e).indexOf(n)){var r=e[n];"object"!=typeof r||Array.isArray(r)||(l(r,t),0===Object.keys(r).length&&delete e[n])}}else delete e[n]}function f(e,t,n){var r=function(e,t){for(var n=e,r=0,i=t;r<i.length;r++){var o=i[r];if("object"!=typeof n||null===n)return;n=n[o]}return n}(e,t.split("."))
;return void 0===r?n:r}function p(e,t,n){Object.keys(t).forEach(function(i){i in e?r.isObject(e[i])&&r.isObject(t[i])?p(e[i],t[i],n):n&&(e[i]=t[i]):e[i]=t[i]})}function d(e){return e.substring(1,e.length-1)}Object.defineProperty(t,"__esModule",{value:!0}),t.IConfigurationService=s.createDecorator("configurationService"),t.isConfigurationOverrides=function(e){return e&&"object"==typeof e&&(!e.overrideIdentifier||"string"==typeof e.overrideIdentifier)&&(!e.resource||e.resource instanceof i.URI)};!function(e){e[e.USER=1]="USER",e[e.WORKSPACE=2]="WORKSPACE",e[e.WORKSPACE_FOLDER=3]="WORKSPACE_FOLDER",e[e.DEFAULT=4]="DEFAULT",e[e.MEMORY=5]="MEMORY"}(t.ConfigurationTarget||(t.ConfigurationTarget={})),t.ConfigurationTargetToString=function(e){switch(e){case 1:return"USER";case 2:return"WORKSPACE";case 3:return"WORKSPACE_FOLDER";case 4:return"DEFAULT";case 5:return"MEMORY"}},t.compare=function(e,t){for(var r=t.keys.filter(function(t){return-1===e.keys.indexOf(t)}),i=e.keys.filter(function(e){
return-1===t.keys.indexOf(e)}),o=[],s=0,a=e.keys;s<a.length;s++){var u=a[s],c=f(e.contents,u),l=f(t.contents,u);n.equals(c,l)||o.push(u)}return{added:r,removed:i,updated:o}},t.toOverrides=function(e,t){for(var n=[],r=o.Registry.as(a.Extensions.Configuration).getConfigurationProperties(),i=0,s=Object.keys(e);i<s.length;i++){var c=s[i];if(a.OVERRIDE_PROPERTY_PATTERN.test(c)){var l={};for(var f in e[c])r[f]&&r[f].overridable&&(l[f]=e[c][f]);n.push({identifiers:[d(c).trim()],contents:u(l,t)})}}return n},t.toValuesTree=u,t.addToValueTree=c,t.removeFromValueTree=function(e,t){l(e,t.split("."))},t.getConfigurationValue=f,t.merge=p,t.getConfigurationKeys=function(){var e=o.Registry.as(a.Extensions.Configuration).getConfigurationProperties();return Object.keys(e)},t.getDefaultValues=function(){var e=Object.create(null),t=o.Registry.as(a.Extensions.Configuration).getConfigurationProperties();for(var n in t)c(e,n,t[n].default,function(e){return console.error("Conflict in default settings: "+e)});return e},
t.overrideIdentifierFromKey=d,t.keyFromOverrideIdentifier=function(e){return"["+e+"]"}}),define(e[40],t([0,1,35,31,14,3,5,16,10]),function(e,t,n,r,i,s,a,u,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t,n){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===n&&(n=[]),this._contents=e,this._keys=t,this._overrides=n,this.isFrozen=!1}return Object.defineProperty(e.prototype,"contents",{get:function(){return this.checkAndFreeze(this._contents)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"overrides",{get:function(){return this.checkAndFreeze(this._overrides)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"keys",{get:function(){return this.checkAndFreeze(this._keys)},enumerable:!0,configurable:!0}),e.prototype.getValue=function(e){return e?c.getConfigurationValue(this.contents,e):this.contents},e.prototype.override=function(t){var n=this.getContentsForOverrideIdentifer(t)
;if(!n||"object"!=typeof n||!Object.keys(n).length)return this;for(var r={},o=0,s=i.distinct(Object.keys(this.contents).concat(Object.keys(n)));o<s.length;o++){var u=s[o],c=this.contents[u],l=n[u];l&&("object"==typeof c&&"object"==typeof l?(c=a.deepClone(c),this.mergeContents(c,l)):c=l),r[u]=c}return new e(r)},e.prototype.merge=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=a.deepClone(this.contents),o=a.deepClone(this.overrides),s=this.keys.slice(),u=0,c=t;u<c.length;u++){var l=c[u];this.mergeContents(r,l.contents);for(var f=function(e){var t=o.filter(function(t){return i.equals(t.identifiers,e.identifiers)})[0];t?p.mergeContents(t.contents,e.contents):o.push(a.deepClone(e))},p=this,d=0,h=l.overrides;d<h.length;d++){f(h[d])}for(var g=0,v=l.keys;g<v.length;g++){var m=v[g];-1===s.indexOf(m)&&s.push(m)}}return new e(r,s,o)},e.prototype.freeze=function(){return this.isFrozen=!0,this},e.prototype.mergeContents=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n]
;i in e&&s.isObject(e[i])&&s.isObject(t[i])?this.mergeContents(e[i],t[i]):e[i]=a.deepClone(t[i])}},e.prototype.checkAndFreeze=function(e){return this.isFrozen&&!Object.isFrozen(e)?a.deepFreeze(e):e},e.prototype.getContentsForOverrideIdentifer=function(e){for(var t=0,n=this.overrides;t<n.length;t++){var r=n[t];if(-1!==r.identifiers.indexOf(e))return r.contents}return null},e.prototype.toJSON=function(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}},e.prototype.setValue=function(e,t){this.addKey(e),c.addToValueTree(this.contents,e,t,function(e){throw new Error(e)})},e.prototype.removeValue=function(e){this.removeKey(e)&&c.removeFromValueTree(this.contents,e)},e.prototype.addKey=function(e){for(var t=this.keys.length,n=0;n<t;n++)0===e.indexOf(this.keys[n])&&(t=n);this.keys.splice(t,1,e)},e.prototype.removeKey=function(e){var t=this.keys.indexOf(e);return-1!==t&&(this.keys.splice(t,1),!0)},e}();t.ConfigurationModel=l;var f=function(e){function t(){
for(var t=c.getDefaultValues(),n=c.getConfigurationKeys(),r=[],i=0,o=Object.keys(t);i<o.length;i++){var s=o[i];u.OVERRIDE_PROPERTY_PATTERN.test(s)&&r.push({identifiers:[c.overrideIdentifierFromKey(s).trim()],contents:c.toValuesTree(t[s],function(e){return console.error("Conflict in default settings file: "+e)})})}return e.call(this,t,n,r)||this}return o(t,e),t}(l);t.DefaultConfigurationModel=f;var p=function(){function e(e){this._name=e,this._configurationModel=null,this._parseErrors=[]}return Object.defineProperty(e.prototype,"configurationModel",{get:function(){return this._configurationModel||new l},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"errors",{get:function(){return this._parseErrors},enumerable:!0,configurable:!0}),e.prototype.parse=function(e){if(e){var t=this.parseContent(e),n=this.parseRaw(t);this._configurationModel=new l(n.contents,n.keys,n.overrides)}},e.prototype.parseContent=function(e){function t(e){Array.isArray(o)?o.push(e):i&&(o[i]=e)}
var r={},i=null,o=[],s=[],a=[],u={onObjectBegin:function(){var e={};t(e),s.push(o),o=e,i=null},onObjectProperty:function(e){i=e},onObjectEnd:function(){o=s.pop()},onArrayBegin:function(){var e=[];t(e),s.push(o),o=e,i=null},onArrayEnd:function(){o=s.pop()},onLiteralValue:t,onError:function(e,t,n){a.push({error:e,offset:t,length:n})}};if(e)try{n.visit(e,u),r=o[0]||{}}catch(e){console.error("Error while parsing settings file "+this._name+": "+e),this._parseErrors=[e]}return r},e.prototype.parseRaw=function(e){var t=this;return{contents:c.toValuesTree(e,function(e){return console.error("Conflict in settings file "+t._name+": "+e)}),keys:Object.keys(e),overrides:c.toOverrides(e,function(e){return console.error("Conflict in settings file "+t._name+": "+e)})}},e}();t.ConfigurationModelParser=p;var d=function(){function e(e,t,n,i,o,s,a){void 0===n&&(n=new l),void 0===i&&(i=new r.ResourceMap),void 0===o&&(o=new l),void 0===s&&(s=new r.ResourceMap),void 0===a&&(a=!0),this._defaultConfiguration=e,
this._userConfiguration=t,this._workspaceConfiguration=n,this._folderConfigurations=i,this._memoryConfiguration=o,this._memoryConfigurationByResource=s,this._freeze=a,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new r.ResourceMap}return e.prototype.getValue=function(e,t,n){return this.getConsolidateConfigurationModel(t,n).getValue(e)},e.prototype.updateValue=function(e,t,n){void 0===n&&(n={});var r;n.resource?(r=this._memoryConfigurationByResource.get(n.resource))||(r=new l,this._memoryConfigurationByResource.set(n.resource,r)):r=this._memoryConfiguration,void 0===t?r.removeValue(e):r.setValue(e,t),n.resource||(this._workspaceConsolidatedConfiguration=null)},e.prototype.inspect=function(e,t,n){var r=this.getConsolidateConfigurationModel(t,n),i=this.getFolderConfigurationModelForResource(t.resource,n),o=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),workspace:n?t.overrideIdentifier?this._workspaceConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this._workspaceConfiguration.freeze().getValue(e):void 0,workspaceFolder:i?t.overrideIdentifier?i.freeze().override(t.overrideIdentifier).getValue(e):i.freeze().getValue(e):void 0,memory:t.overrideIdentifier?o.freeze().override(t.overrideIdentifier).getValue(e):o.freeze().getValue(e),value:r.getValue(e)}},e.prototype.keys=function(e){var 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:[]}},
e.prototype.updateDefaultConfiguration=function(e){this._defaultConfiguration=e,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()},e.prototype.updateUserConfiguration=function(e){this._userConfiguration=e,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()},e.prototype.updateWorkspaceConfiguration=function(e){this._workspaceConfiguration=e,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()},e.prototype.updateFolderConfiguration=function(e,t){this._folderConfigurations.set(e,t),this._foldersConsolidatedConfigurations.delete(e)},e.prototype.deleteFolderConfiguration=function(e){this.folders.delete(e),this._foldersConsolidatedConfigurations.delete(e)},Object.defineProperty(e.prototype,"defaults",{get:function(){return this._defaultConfiguration},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"user",{get:function(){return this._userConfiguration},enumerable:!0,
configurable:!0}),Object.defineProperty(e.prototype,"workspace",{get:function(){return this._workspaceConfiguration},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"folders",{get:function(){return this._folderConfigurations},enumerable:!0,configurable:!0}),e.prototype.getConsolidateConfigurationModel=function(e,t){var n=this.getConsolidatedConfigurationModelForResource(e,t);return e.overrideIdentifier?n.override(e.overrideIdentifier):n},e.prototype.getConsolidatedConfigurationModelForResource=function(e,t){var n=e.resource,r=this.getWorkspaceConsolidatedConfiguration();if(t&&n){var i=t.getFolder(n);i&&(r=this.getFolderConsolidatedConfiguration(i.uri)||r);var o=this._memoryConfigurationByResource.get(n);o&&(r=r.merge(o))}return r},e.prototype.getWorkspaceConsolidatedConfiguration=function(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this._userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),
this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration},e.prototype.getFolderConsolidatedConfiguration=function(e){var t=this._foldersConsolidatedConfigurations.get(e);if(!t){var n=this.getWorkspaceConsolidatedConfiguration(),r=this._folderConfigurations.get(e);r?(t=n.merge(r),this._freeze&&(t=t.freeze()),this._foldersConsolidatedConfigurations.set(e,t)):t=n}return t},e.prototype.getFolderConfigurationModelForResource=function(e,t){if(t&&e){var n=t.getFolder(e);if(n)return this._folderConfigurations.get(n.uri)||null}return null},e.prototype.toData=function(){var e=this;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(function(t,n){var r=e._folderConfigurations.get(n),i=r.contents,o=r.overrides,s=r.keys;return t[n.toString()]={contents:i,overrides:o,keys:s},t},Object.create({})),isComplete:!0}},e.prototype.allKeys=function(e){var t=this.keys(e),n=t.default.slice(),r=function(e){for(var t=0,r=e;t<r.length;t++){var i=r[t];-1===n.indexOf(i)&&n.push(i)}};r(t.user),r(t.workspace);for(var i=0,o=this.folders.keys();i<o.length;i++){var s=o[i];r(this.folders.get(s).keys)}return n},e}();t.Configuration=d;var h=function(){function e(){}return e.prototype.doesConfigurationContains=function(e,t){for(var n,r,i=e.contents,o=c.toValuesTree((n={},n[t]=!0,n),function(){});"object"==typeof o&&(r=Object.keys(o)[0]);){if(!(i=i[r]))return!1;o=o[r]}return!0},e.prototype.updateKeys=function(e,t,n){for(var r=0,i=t;r<i.length;r++){var o=i[r];e.setValue(o,{})}},e}();t.AbstractConfigurationChangeEvent=h
;var g=function(e){function t(t,n){void 0===t&&(t=new l),void 0===n&&(n=new r.ResourceMap);var i=e.call(this)||this;return i._changedConfiguration=t,i._changedConfigurationByResource=n,i}return o(t,e),Object.defineProperty(t.prototype,"changedConfiguration",{get:function(){return this._changedConfiguration},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"changedConfigurationByResource",{get:function(){return this._changedConfigurationByResource},enumerable:!0,configurable:!0}),t.prototype.change=function(e,n){if(e instanceof t){this._changedConfiguration=this._changedConfiguration.merge(e._changedConfiguration);for(var r=0,i=e._changedConfigurationByResource.keys();r<i.length;r++){var o=i[r],s=this.getOrSetChangedConfigurationForResource(o);s=s.merge(e._changedConfigurationByResource.get(o)),this._changedConfigurationByResource.set(o,s)}}else this.changeWithKeys(e,n);return this},t.prototype.telemetryData=function(e,t){return this._source=e,this._sourceConfig=t,this},
Object.defineProperty(t.prototype,"affectedKeys",{get:function(){var e=this._changedConfiguration.keys.slice();return this._changedConfigurationByResource.forEach(function(t){return e.push.apply(e,t.keys)}),i.distinct(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"source",{get:function(){return this._source},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sourceConfig",{get:function(){return this._sourceConfig},enumerable:!0,configurable:!0}),t.prototype.affectsConfiguration=function(e,t){var n=[this._changedConfiguration];if(t){var r=this._changedConfigurationByResource.get(t);r&&n.push(r)}else n.push.apply(n,this._changedConfigurationByResource.values());for(var i=0,o=n;i<o.length;i++){var s=o[i];if(this.doesConfigurationContains(s,e))return!0}return!1},t.prototype.changeWithKeys=function(e,t){var n=t?this.getOrSetChangedConfigurationForResource(t):this._changedConfiguration;this.updateKeys(n,e)},t.prototype.getOrSetChangedConfigurationForResource=function(e){
var t=this._changedConfigurationByResource.get(e);return t||(t=new l,this._changedConfigurationByResource.set(e,t)),t},t}(h);t.ConfigurationChangeEvent=g}),define(e[73],t([0,1,13,20,40,48,8]),function(e,t,n,r,i,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){function t(t){var n=e.call(this)||this;return n.settingsPath=t,n._onDidChangeConfiguration=n._register(new a.Emitter),n.onDidChangeConfiguration=n._onDidChangeConfiguration.event,n}return o(t,e),t.prototype.initialize=function(){var e=this;return this.initializePromise||(this.initializePromise=new Promise(function(t,n){e.userConfigModelWatcher=new s.ConfigWatcher(e.settingsPath,{changeBufferDelay:300,onError:function(e){return r.onUnexpectedError(e)},defaultConfig:new i.ConfigurationModelParser(e.settingsPath),parse:function(t,n){var r=new i.ConfigurationModelParser(e.settingsPath);return r.parse(t),r.errors.slice(),r},initCallback:function(){return t(void 0)}}),e._register(e.userConfigModelWatcher),
e._register(e.userConfigModelWatcher.onDidUpdateConfiguration(function(){return e._onDidChangeConfiguration.fire(e.userConfigModelWatcher.getConfig().configurationModel)}))})),this.initializePromise.then(function(){return e.userConfigModelWatcher.getConfig().configurationModel})},t.prototype.initializeSync=function(){return this.initialize(),this.userConfigModelWatcher.getConfig().configurationModel},t.prototype.reload=function(){var e=this;return this.initialize().then(function(){return new Promise(function(t){return e.userConfigModelWatcher.reload(function(e){return t(e.configurationModel)})})})},t}(n.Disposable);t.UserConfiguration=u});var a=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};define(e[74],t([0,1,15,16,13,10,40,8,19,73]),function(e,t,n,r,i,u,c,l,f,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(e){function t(t){var i=e.call(this)||this;i._onDidChangeConfiguration=i._register(new l.Emitter),
i.onDidChangeConfiguration=i._onDidChangeConfiguration.event,i.userConfiguration=i._register(new p.UserConfiguration(t.appSettingsPath));var o=new c.DefaultConfigurationModel,s=i.userConfiguration.initializeSync();return i._configuration=new c.Configuration(o,s),i._register(i.userConfiguration.onDidChangeConfiguration(function(e){return i.onDidChangeUserConfiguration(e)})),i._register(n.Registry.as(r.Extensions.Configuration).onDidUpdateConfiguration(function(e){return i.onDidDefaultConfigurationChange(e)})),i}return o(t,e),Object.defineProperty(t.prototype,"configuration",{get:function(){return this._configuration},enumerable:!0,configurable:!0}),t.prototype.getConfigurationData=function(){return this.configuration.toData()},t.prototype.getValue=function(e,t){var n="string"==typeof e?e:void 0,r=u.isConfigurationOverrides(e)?e:u.isConfigurationOverrides(t)?t:{};return this.configuration.getValue(n,r,null)},t.prototype.updateValue=function(e,t,n,r){return Promise.reject(new Error("not supported"))},
t.prototype.inspect=function(e){return this.configuration.inspect(e,{},null)},t.prototype.keys=function(){return this.configuration.keys(null)},t.prototype.reloadConfiguration=function(e){var t=this;return e?Promise.resolve(void 0):this.userConfiguration.reload().then(function(e){return t.onDidChangeUserConfiguration(e)})},t.prototype.onDidChangeUserConfiguration=function(e){var t=u.compare(this._configuration.user,e),n=t.added,r=t.updated,i=t.removed,o=n.concat(r,i);o.length&&(this._configuration.updateUserConfiguration(e),this.trigger(o,1))},t.prototype.onDidDefaultConfigurationChange=function(e){this._configuration.updateDefaultConfiguration(new c.DefaultConfigurationModel),this.trigger(e,4)},t.prototype.trigger=function(e,t){this._onDidChangeConfiguration.fire((new c.ConfigurationChangeEvent).change(e).telemetryData(t,this.getTargetConfiguration(t)))},t.prototype.getTargetConfiguration=function(e){switch(e){case 4:return this._configuration.defaults.contents;case 1:return this._configuration.user.contents
}return{}},t=s([a(0,f.IEnvironmentService)],t)}(i.Disposable);t.ConfigurationService=d}),define(e[41],t([0,1,75,2,16,15]),function(e,t,n,r,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IRequestService=r.createDecorator("requestService2"),o.Registry.as(i.Extensions.Configuration).registerConfiguration({id:"http",order:15,title:n.localize(0,null),type:"object",properties:{"http.proxy":{type:"string",pattern:"^https?://([^:]*(:[^@]*)?@)?([^:]+)(:\\d+)?/?$|^$",description:n.localize(1,null)},"http.proxyStrictSSL":{type:"boolean",default:!0,description:n.localize(2,null)},"http.proxyAuthorization":{type:["null","string"],default:null,description: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)}}})}),define(e[76],t([0,1,2]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),
t.IStateService=n.createDecorator("stateService")}),define(e[77],t([0,1,4,25,19,37,3,7,11]),function(e,t,n,r,i,o,u,c,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=function(){function e(e,t){this.dbPath=e,this.onError=t,this._database=null,this.lastFlushedSerializedDatabase=null}return Object.defineProperty(e.prototype,"database",{get:function(){return this._database||(this._database=this.loadSync()),this._database},enumerable:!0,configurable:!0}),e.prototype.init=function(){var e=this;return l.readFile(this.dbPath).then(function(t){try{e.lastFlushedSerializedDatabase=t.toString(),e._database=JSON.parse(e.lastFlushedSerializedDatabase)}catch(t){e._database={}}},function(t){"ENOENT"!==t.code&&e.onError(t),e._database={}})},e.prototype.loadSync=function(){try{return this.lastFlushedSerializedDatabase=r.readFileSync(this.dbPath).toString(),JSON.parse(this.lastFlushedSerializedDatabase)}catch(e){return"ENOENT"!==e.code&&this.onError(e),{}}},e.prototype.getItem=function(e,t){
var n=this.database[e];return u.isUndefinedOrNull(n)?t:n},e.prototype.setItem=function(e,t){if(u.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())},e.prototype.removeItem=function(e){u.isUndefined(this.database[e])||(this.database[e]=void 0,this.saveSync())},e.prototype.saveSync=function(){var e=JSON.stringify(this.database,null,4);if(e!==this.lastFlushedSerializedDatabase)try{o.writeFileAndFlushSync(this.dbPath,e),this.lastFlushedSerializedDatabase=e}catch(e){this.onError(e)}},e}();t.FileStorage=f;var p=function(){function e(t,r){this.fileStorage=new f(n.join(t.userDataPath,e.STATE_FILE),function(e){return r.error(e)})}return e.prototype.init=function(){return this.fileStorage.init()},e.prototype.getItem=function(e,t){return this.fileStorage.getItem(e,t)},e.prototype.setItem=function(e,t){this.fileStorage.setItem(e,t)},e.prototype.removeItem=function(e){this.fileStorage.removeItem(e)},
e.STATE_FILE="storage.json",e=s([a(0,i.IEnvironmentService),a(1,c.ILogService)],e)}();t.StateService=p}),define(e[29],t([0,1,2]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITelemetryService=n.createDecorator("telemetryService")}),define(e[79],t([0,1,78,12,2,10,16,13,5,15]),function(e,t,n,r,i,o,u,c,l,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=function(){function e(e,t){var n=this;this._configurationService=t,this._disposables=[],this._cleanupPatterns=[],this._appender=e.appender,this._commonProperties=e.commonProperties||Promise.resolve({}),this._piiPaths=e.piiPaths||[],this._userOptIn=!0,this._cleanupPatterns=[/file:\/\/\/.*?\/resources\/app\//gi];for(var i=0,o=this._piiPaths;i<o.length;i++){var s=o[i];this._cleanupPatterns.push(new RegExp(r.escapeRegExpCharacters(s),"gi"))}this._configurationService&&(this._updateUserOptIn(),this._configurationService.onDidChangeConfiguration(this._updateUserOptIn,this,this._disposables),
this.publicLog("optInStatus",{optIn:this._userOptIn}),this._commonProperties.then(function(e){var t=/^[a-f0-9]+$/i.test(e["common.machineId"]);n.publicLog("machineIdFallback",{usingFallbackGuid:!t})}))}return e.prototype._updateUserOptIn=function(){var e=this._configurationService.getValue(d);this._userOptIn=e?e.enableTelemetry:this._userOptIn},Object.defineProperty(e.prototype,"isOptedIn",{get:function(){return this._userOptIn},enumerable:!0,configurable:!0}),e.prototype.getTelemetryInfo=function(){return this._commonProperties.then(function(e){return{sessionId:e.sessionID,instanceId:e["common.instanceId"],machineId:e["common.machineId"]}})},e.prototype.dispose=function(){this._disposables=c.dispose(this._disposables)},e.prototype.publicLog=function(e,t,n){var r=this;return this._userOptIn?this._commonProperties.then(function(i){t=l.mixin(t,i),t=l.cloneAndChange(t,function(e){if("string"==typeof e)return r._cleanupInfo(e,n)}),r._appender.log(e,t)},function(e){console.error(e)}):Promise.resolve(void 0)},
e.prototype._cleanupInfo=function(e,t){var n=e;if(t){for(var r=[],i=0,o=this._cleanupPatterns;i<o.length;i++)for(d=o[i];;){var s=d.exec(e);if(!s)break;r.push([s.index,d.lastIndex])}var a=/^[\\\/]?(node_modules|node_modules\.asar)[\\\/]/,u=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-\._]+(\\\\|\\|\/))+[\w-\._]*/g,c=0;n="";for(var l=function(){var t=u.exec(e);if(!t)return"break";!a.test(t[0])&&r.every(function(e){var n=e[0],r=e[1];return t.index<n||t.index>=r})&&(n+=e.substring(c,t.index)+"<REDACTED: user-file-path>",c=u.lastIndex)};;){if("break"===l())break}c<e.length&&(n+=e.substr(c))}for(var f=0,p=this._cleanupPatterns;f<p.length;f++){var d=p[f];n=n.replace(d,"")}return n},e.IDLE_START_EVENT_NAME="UserIdleStart",e.IDLE_STOP_EVENT_NAME="UserIdleStop",e=s([a(1,i.optional(o.IConfigurationService))],e)}();t.TelemetryService=p;var d="telemetry";f.Registry.as(u.Extensions.Configuration).registerConfiguration({id:d,order:110,type:"object",title:n.localize(0,null),properties:{"telemetry.enableTelemetry":{
type:"boolean",description:n.localize(1,null),default:!0,tags:["usesOnlineServices"]}}})}),define(e[80],t([0,1,50,28,10,7]),function(e,t,n,r,i,o){"use strict";function u(e,t){return t.onDidChangeConfiguration(function(t){4!==t.source&&(e.publicLog("updateConfiguration",{configurationSource:i.ConfigurationTargetToString(t.source),configurationKeys:function(e){if(!e)return[];var t=[];return c(t,"",e),t}(t.sourceConfig)}),e.publicLog("updateConfigurationValues",{configurationSource:i.ConfigurationTargetToString(t.source),configurationValues:function(e,t){if(!e)return[];return t.reduce(function(t,n){var r,i=n.split(".").reduce(function(e,t){return e&&"object"==typeof e?e[t]:void 0},e);return void 0!==i&&t.push((r={},r[n]=i,r)),t},[])}(t.sourceConfig,f)}))})}function c(e,t,n){n&&"object"==typeof n&&!Array.isArray(n)?Object.keys(n).forEach(function(r){return c(e,t?t+"."+r:r,n[r])}):e.push(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.NullTelemetryService=new(function(){function e(){}
return e.prototype.publicLog=function(e,t){return Promise.resolve(void 0)},e.prototype.getTelemetryInfo=function(){return Promise.resolve({instanceId:"someValue.instanceId",sessionId:"someValue.sessionId",machineId:"someValue.machineId"})},e}()),t.combinedAppender=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{log:function(t,n){return e.forEach(function(e){return e.log(t,n)})},dispose:function(){return Promise.all(e.map(function(e){return e.dispose()}))}}},t.NullAppender={log:function(){return null},dispose:function(){return Promise.resolve(null)}};var l=function(){function e(e){this._logService=e,this.commonPropertiesRegex=/^sessionID$|^version$|^timestamp$|^commitHash$|^common\./}return e.prototype.dispose=function(){return Promise.resolve(void 0)},e.prototype.log=function(e,t){var n=this,r={};Object.keys(t).forEach(function(e){n.commonPropertiesRegex.test(e)||(r[e]=t[e])}),this._logService.trace("telemetry/"+e,r)},e=s([a(0,o.ILogService)],e)}();t.LogAppender=l,
t.telemetryURIDescriptor=function(e,t){var i=e&&e.fsPath;return i?{mimeType:n.guessMimeTypes(i).join(", "),scheme:e.scheme,ext:r.extname(i),path:t(i)}:{}}
;var f=["editor.fontFamily","editor.fontWeight","editor.fontSize","editor.lineHeight","editor.letterSpacing","editor.lineNumbers","editor.rulers","editor.wordSeparators","editor.tabSize","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.zoomLevel","workbench.editor.enablePreview","workbench.editor.enablePreviewFromQuickOpen","workbench.editor.showTabs","workbench.editor.highlightModifiedTabs","workbench.editor.swipeToNavigate","workbench.sideBar.location","workbench.startupEditor","workbench.statusBar.visible","workbench.welcome.enabled"]
;t.configurationTelemetry=u,t.keybindingsTelemetry=function(e,t){return t.onDidUpdateKeybindings(function(t){2===t.source&&t.keybindings&&e.publicLog("updateKeybindings",{bindings:t.keybindings.map(function(e){return{key:e.key,command:e.command,when:e.when,args:!!e.args||void 0}})})})}}),define(e[81],t([0,1,91,3,5,7]),function(e,t,n,r,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t,r,i){this._eventPrefix=e,this._defaultData=t,this._logService=i,this._defaultData||(this._defaultData=Object.create(null)),"string"==typeof r?this._aiClient=function(e){var t;return n.defaultClient?(t=new n.TelemetryClient(e)).channel.setUseDiskRetryCaching(!0):(n.setup(e).setAutoCollectRequests(!1).setAutoCollectPerformance(!1).setAutoCollectExceptions(!1).setAutoCollectDependencies(!1).setAutoDependencyCorrelation(!1).setAutoCollectConsole(!1).setInternalLogging(!1,!1).setUseDiskRetryCaching(!0).start(),t=n.defaultClient),
0===e.indexOf("AIF-")&&(t.config.endpointUrl="https://vortex.data.microsoft.com/collect/v1"),t}(r):"function"==typeof r&&(this._aiClient=r())}return e._getData=function(t){var n=Object.create(null),r=Object.create(null),i=Object.create(null);e._flaten(t,i);for(var o in i){var s=i[o=o.length>150?o.substr(o.length-149):o];"number"==typeof s?r[o]=s:"boolean"==typeof s?r[o]=s?1:0:"string"==typeof s?n[o]=s.substring(0,1023):void 0!==s&&null!==s&&(n[o]=s)}return{properties:n,measurements:r}},e._flaten=function(t,n,o,s){if(void 0===o&&(o=0),t)for(var a=0,u=Object.getOwnPropertyNames(t);a<u.length;a++){var c=u[a],l=t[c],f=s?s+c:c;Array.isArray(l)?n[f]=i.safeStringify(l):l instanceof Date?n[f]=l.toISOString():r.isObject(l)?o<2?e._flaten(l,n,o+1,f+"."):n[f]=i.safeStringify(l):n[f]=l}},e.prototype.log=function(t,n){this._aiClient&&(n=i.mixin(n,this._defaultData),n=e._getData(n),this._logService&&this._logService.trace("telemetry/"+t,n),this._aiClient.trackEvent({name:this._eventPrefix+"/"+t,properties:n.properties,
measurements:n.measurements}))},e.prototype.dispose=function(){var e=this;if(this._aiClient)return new Promise(function(t){e._aiClient.flush({callback:function(){e._aiClient=void 0,t(void 0)}})})},e=s([a(3,o.ILogService)],e)}();t.AppInsightsAppender=u}),define(e[83],t([0,1,18,26,43,11]),function(e,t,n,r,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveCommonProperties=function(e,t,s,a){var u=Object.create(null);u["common.machineId"]=s,u.sessionID=i.generateUuid()+Date.now(),u.commitHash=e,u.version=t,u["common.platformVersion"]=(r.release()||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),u["common.platform"]=n.PlatformToString(n.platform),u["common.nodePlatform"]=process.platform,u["common.nodeArch"]=process.arch;var c=0,l=Date.now();return Object.defineProperties(u,{timestamp:{get:function(){return new Date},enumerable:!0},"common.timesincesessionstart":{get:function(){return Date.now()-l},enumerable:!0},"common.sequence":{get:function(){return c++},enumerable:!0}}),
o.readFile(a,"utf8").then(function(e){return u["common.source"]=e.slice(0,30),u},function(e){return u})}}),define(e[44],t([0,1,72,4,25,23,11,90,89,8]),function(e,t,n,r,i,s,a,u,c,l){"use strict";function f(e,t,o,u,c){var f=s.createCancelablePromise(function(){return Promise.resolve()}),p=0;return l.Event.once(c.onCancellationRequested)(function(){u.debug(t,"Cancelled."),f.cancel(),e.close()}),new Promise(function(u,d){var g=new s.Sequencer,v=function(t){t.isCancellationRequested||(p++,e.readEntry())};e.once("error",d),e.once("close",function(){return f.then(function(){c.isCancellationRequested||e.entryCount===p?u():d(new h("Incomplete",new Error(n.localize(1,null,p,e.entryCount))))},d)}),e.readEntry(),e.on("entry",function(u){if(!c.isCancellationRequested)if(o.sourcePathRegex.test(u.fileName)){var p=u.fileName.replace(o.sourcePathRegex,"");if(/\/$/.test(p)){var h=r.join(t,p);f=s.createCancelablePromise(function(e){return a.mkdirp(h,void 0,e).then(function(){return v(e)}).then(void 0,d)})}else{
var m=s.ninvoke(e,e.openReadStream,u),y=function(e){var t=e.externalFileAttributes>>16||33188;return[448,56,7].map(function(e){return t&e}).reduce(function(e,t){return e+t},61440&t)}(u);f=s.createCancelablePromise(function(e){return g.queue(function(){return m.then(function(o){return function(e,t,o,s,u,c){var f=r.dirname(t),p=r.join(s,f);if(0!==p.indexOf(s))return Promise.reject(new Error(n.localize(0,null,t)));var d,h=r.join(s,t);return l.Event.once(c.onCancellationRequested)(function(){d&&d.destroy()}),Promise.resolve(a.mkdirp(p,void 0,c)).then(function(){return new Promise(function(t,n){if(!c.isCancellationRequested)try{(d=i.createWriteStream(h,{mode:o})).once("close",function(){return t()}),d.once("error",n),e.once("error",n),e.pipe(d)}catch(e){n(e)}})})}(o,p,y,t,0,e).then(function(){return v(e)})})}).then(null,d)})}}else v(c)})})}function p(e,t){return void 0===t&&(t=!1),s.nfcall(u.open,e,t?{lazyEntries:!0}:void 0).then(void 0,function(e){return Promise.reject(function(e){if(e instanceof h)return e
;var t=void 0;return/end of central directory record signature not found/.test(e.message)&&(t="CorruptZip"),new h(t,e)}(e))})}function d(e,t){return function(e,t){return p(e).then(function(e){return new Promise(function(r,i){e.on("entry",function(n){n.fileName===t&&s.ninvoke(e,e.openReadStream,n).then(function(e){return r(e)},function(e){return i(e)})}),e.once("close",function(){return i(new Error(n.localize(2,null,t)))})})})}(e,t).then(function(e){return new Promise(function(t,n){var r=[];e.once("error",n),e.on("data",function(e){return r.push(e)}),e.on("end",function(){return t(Buffer.concat(r))})})})}Object.defineProperty(t,"__esModule",{value:!0});var h=function(e){function t(t,n){var r=this,i=n.message;switch(t){case"CorruptZip":i="Corrupt ZIP: "+i}return r=e.call(this,i)||this,r.type=t,r.cause=n,r}return o(t,e),t}(Error);t.ExtractError=h,t.zip=function(e,t){return new Promise(function(n,r){var o=new c.ZipFile;t.forEach(function(e){
e.contents?o.addBuffer("string"==typeof e.contents?Buffer.from(e.contents,"utf8"):e.contents,e.path):e.localPath&&o.addFile(e.localPath,e.path)}),o.end();var s=i.createWriteStream(e);o.outputStream.pipe(s),o.outputStream.once("error",r),s.once("error",r),s.once("finish",function(){return n(e)})})},t.extract=function(e,t,n,r,i){void 0===n&&(n={});var o=new RegExp(n.sourcePath?"^"+n.sourcePath:""),s=p(e,!0);return n.overwrite&&(s=s.then(function(e){return a.rimraf(t).then(function(){return e})})),s.then(function(e){return f(e,t,{sourcePathRegex:o},r,i)})},t.buffer=d}),define(e[45],t([0,1,44,70]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getManifest=function(e){return n.buffer(e,"extension/package.json").then(function(e){try{return JSON.parse(e.toString("utf8"))}catch(e){throw new Error(r.localize(0,null))}})}}),
define(e[87],t([0,1,68,4,11,5,13,14,44,24,17,85,19,23,8,86,22,21,18,7,49,88,30,29,32,26,43,52,2,39,82,33,45,38,10,67]),function(e,t,i,u,c,l,f,p,d,h,g,v,m,y,b,E,S,x,C,P,_,w,O,I,k,j,T,D,L,M,A,R,U,N,F,z){"use strict";function V(e){return new Promise(function(t,n){try{var r=JSON.parse(e),o=r.__metadata||null;delete r.__metadata,t({manifest:r,metadata:o})}catch(e){n(new Error(i.localize(0,null)))}})}Object.defineProperty(t,"__esModule",{value:!0});var B=function(e){function t(t,n){var r=e.call(this,t)||this;return r.code=n,r}return o(t,e),t}(Error);t.ExtensionManagementError=B;var W=function(t){function W(e,n,r,i,o,s,a){var c=t.call(this)||this;return c.remote=e,c.environmentService=n,c.configurationService=r,c.galleryService=i,c.logService=o,c.downloadService=s,c.telemetryService=a,c.lastReportTimestamp=0,c.installingExtensions=new Map,c.uninstallingExtensions=new Map,c._onInstallExtension=new b.Emitter,c.onInstallExtension=c._onInstallExtension.event,c._onDidInstallExtension=new b.Emitter,
c.onDidInstallExtension=c._onDidInstallExtension.event,c._onUninstallExtension=new b.Emitter,c.onUninstallExtension=c._onUninstallExtension.event,c._onDidUninstallExtension=new b.Emitter,c.onDidUninstallExtension=c._onDidUninstallExtension.event,c._devSystemExtensionsPath=null,c._devSystemExtensionsFilePath=null,c.systemExtensionsPath=n.builtinExtensionsPath,c.extensionsPath=n.extensionsPath,c.uninstalledPath=u.join(c.extensionsPath,".obsolete"),c.uninstalledFileLimiter=new y.Queue,c.manifestCache=c._register(new _.ExtensionsManifestCache(n,c)),c.extensionLifecycle=c._register(new w.ExtensionsLifecycle(n,c.logService)),c._register(f.toDisposable(function(){c.installingExtensions.forEach(function(e){return e.cancel()}),c.uninstallingExtensions.forEach(function(e){return e.cancel()}),c.installingExtensions.clear(),c.uninstallingExtensions.clear()})),c}return o(W,t),W.prototype.zip=function(e){return this.logService.trace("ExtensionManagementService#zip",e.identifier.id),this.collectFiles(e).then(function(e){
return d.zip(u.join(j.tmpdir(),T.generateUuid()),e)}).then(function(e){return S.URI.file(e)})},W.prototype.unzip=function(e,t){return this.logService.trace("ExtensionManagementService#unzip",e.toString()),this.install(e,t)},W.prototype.collectFiles=function(e){var t=this,i=function(e){return n(t,void 0,void 0,function(){var t,n,o;return r(this,function(r){switch(r.label){case 0:return[4,c.readdir(e)];case 1:return t=r.sent(),t=t.map(function(t){return u.join(e,t)}),[4,Promise.all(t.map(function(e){return c.stat(e)}))];case 2:return n=r.sent(),o=Promise.resolve([]),n.forEach(function(e,n){var r=t[n];e.isFile()&&(o=o.then(function(e){return e.concat([r])})),e.isDirectory()&&(o=o.then(function(e){return i(r).then(function(t){return e.concat(t)})}))}),[2,o]}})})};return i(e.location.fsPath).then(function(t){return t.map(function(t){return{path:"extension/"+u.relative(e.location.fsPath,t),localPath:t}})})},W.prototype.install=function(e,t){var n=this;return void 0===t&&(t=1),
this.logService.trace("ExtensionManagementService#install",e.toString()),y.createCancelablePromise(function(r){return n.downloadVsix(e).then(function(e){var o=u.resolve(e.fsPath);return U.getManifest(o).then(function(e){var s={id:g.getGalleryExtensionId(e.publisher,e.name)},a=1;if(e.engines&&e.engines.vscode&&!k.isEngineValid(e.engines.vscode))return Promise.reject(new Error(i.localize(1,null,s.id,x.default.version)));var u=new N.ExtensionIdentifierWithVersion(s,e.version);return n.getInstalled(1).then(function(t){var r=t.filter(function(e){return g.areSameExtensions(s,e.identifier)})[0];if(r){if(a=2,u.equals(new N.ExtensionIdentifierWithVersion(r.identifier,r.manifest.version)))return n.removeExtension(r,"existing").then(null,function(t){return Promise.reject(new Error(i.localize(2,null,e.displayName||e.name)))});if(E.gt(r.manifest.version,e.version))return n.uninstall(r,!0)}}).then(function(){return n.logService.info("Installing the extension:",s.id),n._onInstallExtension.fire({identifier:s,zipPath:o}),
n.getMetadata(g.getGalleryExtensionId(e.publisher,e.name)).then(function(e){return n.installFromZipPath(u,o,e,t,a,r)},function(){return n.installFromZipPath(u,o,null,t,a,r)}).then(function(){return n.logService.info("Successfully installed the extension:",s.id),s},function(e){return n.logService.error("Failed to install the extension:",s.id,e.message),Promise.reject(e)})})})})})},W.prototype.downloadVsix=function(e){if(e.scheme===M.Schemas.file)return Promise.resolve(e);if(!this.downloadService)throw new Error("Download service is not available");var t=u.join(j.tmpdir(),T.generateUuid());return this.downloadService.download(e,t).then(function(){return S.URI.file(t)})},W.prototype.installFromZipPath=function(e,t,n,r,i,o){var s=this;return this.toNonCancellablePromise(this.installExtension({zipPath:t,identifierWithVersion:e,metadata:n},r,o).then(function(e){return s.installDependenciesAndPackExtensions(e,null).then(function(){return e},function(t){return s.uninstall(e,!0).then(function(){
return Promise.reject(t)},function(){return Promise.reject(t)})})}).then(function(n){return s._onDidInstallExtension.fire({identifier:e.identifier,zipPath:t,local:n,operation:i}),n},function(n){return s._onDidInstallExtension.fire({identifier:e.identifier,zipPath:t,operation:i,error:n}),Promise.reject(n)}))},W.prototype.installFromGallery=function(e){return n(this,void 0,void 0,function(){var t,n,i,o,s,a,u,l,f,p,d,h,v,m=this;return r(this,function(r){switch(r.label){case 0:t=(new Date).getTime(),this.logService.info("Installing extension:",e.identifier.id),this._onInstallExtension.fire({identifier:e.identifier,gallery:e}),n=function(e,n,r){m.logService.info("Extensions installed successfully:",e.identifier.id),m._onDidInstallExtension.fire({identifier:e.identifier,gallery:e,local:r,operation:n}),m.reportTelemetry(m.getTelemetryEvent(n),g.getGalleryExtensionTelemetryData(e),(new Date).getTime()-t,void 0)},i=function(e,n,r){var i=r&&r.code?r.code:"unknown"
;m.logService.error("Failed to install extension:",e.identifier.id,r?r.message:i),m._onDidInstallExtension.fire({identifier:e.identifier,gallery:e,operation:n,error:i}),m.reportTelemetry(m.getTelemetryEvent(n),g.getGalleryExtensionTelemetryData(e),(new Date).getTime()-t,r),r instanceof Error&&(r.name=i)},r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.checkAndGetCompatibleVersion(e)];case 2:return e=r.sent(),[3,4];case 3:return o=r.sent(),i(e,1,o),[2,Promise.reject(o)];case 4:if(s=new N.ExtensionIdentifierWithVersion(e.identifier,e.version).key(),a=this.installingExtensions.get(s))return[3,10];u=1,a=y.createCancelablePromise(function(e){return l=e,new Promise(function(e,t){f=e,p=t})}),this.installingExtensions.set(s,a),r.label=5;case 5:return r.trys.push([5,9,,10]),[4,this.getInstalled(1)];case 6:return d=r.sent(),(h=d.filter(function(t){return g.areSameExtensions(t.identifier,e.identifier)})[0])?(u=2,E.gt(h.manifest.version,e.version)?[4,this.uninstall(h,!0)]:[3,8]):[3,8];case 7:r.sent(),r.label=8
;case 8:return this.downloadInstallableExtension(e,u).then(function(e){return m.installExtension(e,1,l).then(function(t){return y.always(c.rimraf(e.zipPath),function(){return null}).then(function(){return t})})}).then(function(e){return m.installDependenciesAndPackExtensions(e,h).then(function(){return e},function(t){return m.uninstall(e,!0).then(function(){return Promise.reject(t)},function(){return Promise.reject(t)})})}).then(function(t){m.installingExtensions.delete(s),n(e,u,t),f(null)},function(t){m.installingExtensions.delete(s),i(e,u,t),p(t)}),[3,10];case 9:return v=r.sent(),this.installingExtensions.delete(s),i(e,u,v),[2,Promise.reject(v)];case 10:return[2,a]}})})},W.prototype.checkAndGetCompatibleVersion=function(e){return n(this,void 0,void 0,function(){var t,n;return r(this,function(r){switch(r.label){case 0:return[4,this.isMalicious(e)];case 1:return r.sent()?[2,Promise.reject(new B(i.localize(3,null),h.INSTALL_ERROR_MALICIOUS))]:[4,this.galleryService.getCompatibleExtension(e)];case 2:
return(t=r.sent())?this.remote?[4,this.galleryService.getManifest(e,A.CancellationToken.None)]:[3,4]:[2,Promise.reject(new B(i.localize(4,null,e.identifier.id,x.default.version),h.INSTALL_ERROR_INCOMPATIBLE))];case 3:if((n=r.sent())&&z.isUIExtension(n,this.configurationService))return[2,Promise.reject(new Error(i.localize(5,null,e.identifier.id)))];r.label=4;case 4:return[2,t]}})})},W.prototype.reinstallFromGallery=function(e){var t=this;return this.logService.trace("ExtensionManagementService#reinstallFromGallery",e.identifier.id),this.galleryService.isEnabled()?this.findGalleryExtension(e).then(function(n){return n?t.setUninstalled(e).then(function(){return t.removeUninstalledExtension(e).then(function(){return t.installFromGallery(n)},function(e){return Promise.reject(new Error(i.localize(7,null,O.toErrorMessage(e))))})}):Promise.reject(new Error(i.localize(8,null)))}):Promise.reject(new Error(i.localize(6,null)))},W.prototype.getTelemetryEvent=function(e){
return 2===e?"extensionGallery:update":"extensionGallery:install"},W.prototype.isMalicious=function(e){return this.getExtensionsReport().then(function(t){return g.getMaliciousExtensionsSet(t).has(e.identifier.id)})},W.prototype.downloadInstallableExtension=function(e,t){var n=this,r={id:e.identifier.uuid,publisherId:e.publisherId,publisherDisplayName:e.publisherDisplayName};return this.logService.trace("Started downloading extension:",e.identifier.id),this.galleryService.download(e,t).then(function(t){return n.logService.info("Downloaded extension:",e.identifier.id,t),U.getManifest(t).then(function(n){return{zipPath:t,identifierWithVersion:new N.ExtensionIdentifierWithVersion(e.identifier,n.version),metadata:r}},function(e){return Promise.reject(new B(n.joinErrors(e).message,"validating"))})},function(e){return Promise.reject(new B(n.joinErrors(e).message,"downloading"))})},W.prototype.installExtension=function(e,t,n){var r=this
;return this.unsetUninstalledAndGetLocal(e.identifierWithVersion).then(function(i){return i||r.extractAndInstall(e,t,n)},function(e){return C.isMacintosh?Promise.reject(new B(i.localize(9,null),"unsetUninstalled")):Promise.reject(new B(i.localize(10,null),"unsetUninstalled"))})},W.prototype.unsetUninstalledAndGetLocal=function(e){var t=this;return this.isUninstalled(e).then(function(n){return n?(t.logService.trace("Removing the extension from uninstalled list:",e.identifier.id),t.unsetUninstalled(e).then(function(){return t.logService.info("Removed the extension from uninstalled list:",e.identifier.id),t.getInstalled(1)}).then(function(t){return t.filter(function(t){return new N.ExtensionIdentifierWithVersion(t.identifier,t.manifest.version).equals(e)})[0]})):null})},W.prototype.extractAndInstall=function(e,t,n){var r=this,o=e.zipPath,s=e.identifierWithVersion,a=e.metadata,l=s.identifier,f=1===t?this.extensionsPath:this.systemExtensionsPath,p=s.key(),d=u.join(f,"."+p),h=u.join(f,p)
;return c.rimraf(h).then(function(){return r.extractAndRename(l,o,d,h,n)},function(e){return Promise.reject(new B(i.localize(11,null,h,l.id),"deleting"))}).then(function(){return r.scanExtension(p,f,t)}).then(function(e){return e?(r.logService.info("Installation completed.",l.id),a?(e.metadata=a,r.saveMetadataForLocalExtension(e)):e):Promise.reject(i.localize(12,null,f))},function(e){return c.rimraf(h).then(function(){return Promise.reject(e)},function(){return Promise.reject(e)})})},W.prototype.extractAndRename=function(e,t,n,r,i){var o=this;return this.extract(e,t,n,i).then(function(){return o.rename(e,n,r,Date.now()+12e4).then(function(){return o.logService.info("Renamed to",r)},function(e){return o.logService.info("Rename failed. Deleting from extracted location",n),y.always(c.rimraf(n),function(){return null}).then(function(){return Promise.reject(e)})})})},W.prototype.extract=function(e,t,n,r){var i=this;return this.logService.trace("Started extracting the extension from "+t+" to "+n),
c.rimraf(n).then(function(){return d.extract(t,n,{sourcePath:"extension",overwrite:!0},i.logService,r).then(function(){return i.logService.info("Extracted extension to "+n+":",e.id)},function(e){return y.always(c.rimraf(n),function(){return null}).then(function(){return Promise.reject(new B(e.message,e instanceof d.ExtractError&&e.type?e.type:"extracting"))})})},function(e){return Promise.reject(new B(i.joinErrors(e).message,"deleting"))})},W.prototype.rename=function(e,t,n,r){var o=this;return c.rename(t,n).then(void 0,function(s){return C.isWindows&&s&&"EPERM"===s.code&&Date.now()<r?(o.logService.info("Failed renaming "+t+" to "+n+" with 'EPERM' error. Trying again...",e.id),o.rename(e,t,n,r)):Promise.reject(new B(s.message||i.localize(13,null,t,n),s.code||"renaming"))})},W.prototype.installDependenciesAndPackExtensions=function(e,t){return n(this,void 0,void 0,function(){var i,o,s,a,u,c=this;return r(this,function(l){if(this.galleryService.isEnabled()){if(i=e.manifest.extensionDependencies||[],
e.manifest.extensionPack)for(o=function(e){t&&t.manifest.extensionPack&&t.manifest.extensionPack.some(function(t){return g.areSameExtensions({id:t},{id:e})})||i.every(function(t){return!g.areSameExtensions({id:t},{id:e})})&&i.push(e)},s=0,a=e.manifest.extensionPack;s<a.length;s++)u=a[s],o(u);if(i.length)return[2,this.getInstalled().then(function(e){var t=i.filter(function(t){return e.every(function(e){var n=e.identifier;return!g.areSameExtensions(n,{id:t})})});return t.length?c.galleryService.query({names:t,pageSize:i.length}).then(function(e){var t=e.firstPage;return Promise.all(t.map(function(e){return n(c,void 0,void 0,function(){var t;return r(this,function(n){switch(n.label){case 0:return this.remote?[4,this.galleryService.getManifest(e,A.CancellationToken.None)]:[3,2];case 1:if((t=n.sent())&&z.isUIExtension(t,this.configurationService))return this.logService.info("Ignored installing the UI dependency",e.identifier.id),[2];n.label=2;case 2:return[2,this.installFromGallery(e)]}})})})).then(function(){
return null},function(e){return c.rollback(t).then(function(){return Promise.reject(e)},function(){return Promise.reject(e)})})}):null})]}return[2,Promise.resolve(void 0)]})})},W.prototype.rollback=function(e){var t=this;return this.getInstalled(1).then(function(n){return Promise.all(n.filter(function(t){return e.some(function(e){return new N.ExtensionIdentifierWithVersion(t.identifier,t.manifest.version).equals(new N.ExtensionIdentifierWithVersion(e.identifier,e.version))})}).map(function(e){return t.uninstall(e,!0)}))}).then(function(){},function(){})},W.prototype.uninstall=function(e,t){var n=this;return void 0===t&&(t=!1),this.logService.trace("ExtensionManagementService#uninstall",e.identifier.id),this.toNonCancellablePromise(this.getInstalled(1).then(function(t){var r=t.filter(function(t){return g.areSameExtensions(t.identifier,e.identifier)})[0];return r?n.checkForDependenciesAndUninstall(r,t).then(function(){return null},function(e){return Promise.reject(n.joinErrors(e))
}):Promise.reject(new Error(i.localize(14,null,e.manifest.displayName||e.manifest.name)))}))},W.prototype.updateMetadata=function(e,t){var n=this;return this.logService.trace("ExtensionManagementService#updateMetadata",e.identifier.id),e.metadata=t,this.saveMetadataForLocalExtension(e).then(function(e){return n.manifestCache.invalidate(),e})},W.prototype.saveMetadataForLocalExtension=function(e){if(!e.metadata)return Promise.resolve(e);var t=u.join(e.location.fsPath,"package.json");return c.readFile(t,"utf8").then(function(e){return V(e)}).then(function(t){var n=t.manifest;return l.assign(n,{__metadata:e.metadata})}).then(function(e){return c.writeFile(t,JSON.stringify(e,null,"\t"))}).then(function(){return e})},W.prototype.getMetadata=function(e){return this.findGalleryExtensionByName(e).then(function(e){return e?{id:e.identifier.uuid,publisherDisplayName:e.publisherDisplayName,publisherId:e.publisherId}:null})},W.prototype.findGalleryExtension=function(e){var t=this
;return e.identifier.uuid?this.findGalleryExtensionById(e.identifier.uuid).then(function(n){return n||t.findGalleryExtensionByName(e.identifier.id)}):this.findGalleryExtensionByName(e.identifier.id)},W.prototype.findGalleryExtensionById=function(e){return this.galleryService.query({ids:[e],pageSize:1}).then(function(e){return e.firstPage[0]})},W.prototype.findGalleryExtensionByName=function(e){return this.galleryService.query({names:[e],pageSize:1}).then(function(e){return e.firstPage[0]})},W.prototype.joinErrors=function(e){var t=Array.isArray(e)?e:[e];return 1===t.length?t[0]instanceof Error?t[0]:new Error(t[0]):t.reduce(function(e,t){return new Error(e.message+(e.message?",":"")+(t instanceof Error?t.message:t))},new Error(""))},W.prototype.checkForDependenciesAndUninstall=function(e,t){var n=this;return this.preUninstallExtension(e).then(function(){var r=n.getAllPackExtensionsToUninstall(e,t);return r.length?n.uninstallExtensions(e,r,t):n.uninstallExtensions(e,[],t)}).then(function(){
return n.postUninstallExtension(e)},function(t){return n.postUninstallExtension(e,new B(t instanceof Error?t.message:t,"local")),Promise.reject(t)})},W.prototype.uninstallExtensions=function(e,t,n){var r=this,i=this.getDependents(e,n);if(i.length){var o=i.filter(function(n){return e!==n&&-1===t.indexOf(n)});if(o.length)return Promise.reject(new Error(this.getDependentsErrorMessage(e,o)))}return Promise.all([this.uninstallExtension(e)].concat(t.map(function(e){return r.doUninstall(e)}))).then(function(){})},W.prototype.getDependentsErrorMessage=function(e,t){return 1===t.length?i.localize(15,null,e.manifest.displayName||e.manifest.name,t[0].manifest.displayName||t[0].manifest.name):2===t.length?i.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):i.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)},
W.prototype.getAllPackExtensionsToUninstall=function(e,t,n){if(void 0===n&&(n=[]),-1!==n.indexOf(e))return[];n.push(e);var r=e.manifest.extensionPack?e.manifest.extensionPack:[];if(r.length){for(var i=t.filter(function(e){return r.some(function(t){return g.areSameExtensions({id:t},e.identifier)})}),o=[],s=0,a=i;s<a.length;s++){var u=a[s];o.push.apply(o,this.getAllPackExtensionsToUninstall(u,t,n))}return i.concat(o)}return[]},W.prototype.getDependents=function(e,t){return t.filter(function(t){return t.manifest.extensionDependencies&&t.manifest.extensionDependencies.some(function(t){return g.areSameExtensions({id:t},e.identifier)})})},W.prototype.doUninstall=function(e){var t=this;return this.preUninstallExtension(e).then(function(){return t.uninstallExtension(e)}).then(function(){return t.postUninstallExtension(e)},function(n){return t.postUninstallExtension(e,new B(n instanceof Error?n.message:n,"local")),Promise.reject(n)})},W.prototype.preUninstallExtension=function(e){var t=this
;return Promise.resolve(c.exists(e.location.fsPath)).then(function(e){return e?null:Promise.reject(new Error(i.localize(18,null)))}).then(function(){t.logService.info("Uninstalling extension:",e.identifier.id),t._onUninstallExtension.fire(e.identifier)})},W.prototype.uninstallExtension=function(e){var t=this,n=this.uninstallingExtensions.get(e.identifier.id);return n||(n=y.createCancelablePromise(function(n){return t.scanUserExtensions(!1).then(function(n){return t.setUninstalled.apply(t,n.filter(function(t){return g.areSameExtensions(t.identifier,e.identifier)}))}).then(function(){t.uninstallingExtensions.delete(e.identifier.id)})}),this.uninstallingExtensions.set(e.identifier.id,n)),n},W.prototype.postUninstallExtension=function(e,t){return n(this,void 0,void 0,function(){var n;return r(this,function(r){switch(r.label){case 0:return t?(this.logService.error("Failed to uninstall extension:",e.identifier.id,t.message),[3,3]):[3,1];case 1:
return this.logService.info("Successfully uninstalled extension:",e.identifier.id),e.identifier.uuid?[4,this.galleryService.reportStatistic(e.manifest.publisher,e.manifest.name,e.manifest.version,"uninstall")]:[3,3];case 2:r.sent(),r.label=3;case 3:return this.reportTelemetry("extensionGallery:uninstall",g.getLocalExtensionTelemetryData(e),void 0,t),n=t?t instanceof B?t.code:"unknown":void 0,this._onDidUninstallExtension.fire({identifier:e.identifier,error:n}),[2]}})})},W.prototype.getInstalled=function(e){var t=this;void 0===e&&(e=null);var n=[];return null!==e&&0!==e||n.push(this.scanSystemExtensions().then(null,function(e){return Promise.reject(new B(t.joinErrors(e).message,"scanningSystem"))})),null!==e&&1!==e||n.push(this.scanUserExtensions(!0).then(null,function(e){return Promise.reject(new B(t.joinErrors(e).message,"scanningUser"))})),Promise.all(n).then(p.flatten,function(e){return Promise.reject(t.joinErrors(e))})},W.prototype.scanSystemExtensions=function(){var e=this
;this.logService.trace("Started scanning system extensions");var t=this.scanExtensions(this.systemExtensionsPath,0).then(function(t){return e.logService.info("Scanned system extensions:",t.length),t});if(this.environmentService.isBuilt)return t;var n=this.getDevSystemExtensionsList().then(function(t){return t.length?e.scanExtensions(e.devSystemExtensionsPath,0).then(function(n){return e.logService.info("Scanned dev system extensions:",n.length),n.filter(function(e){return t.some(function(t){return g.areSameExtensions(e.identifier,{id:t})})})}):[]});return Promise.all([t,n]).then(function(e){var t=e[0],n=e[1];return t.concat(n)})},W.prototype.scanUserExtensions=function(e){var t=this;return this.logService.trace("Started scanning user extensions"),Promise.all([this.getUninstalledExtensions(),this.scanExtensions(this.extensionsPath,1)]).then(function(n){var r=n[0],i=n[1];if(i=i.filter(function(e){return!r[new N.ExtensionIdentifierWithVersion(e.identifier,e.manifest.version).key()]}),e){
i=g.groupByExtension(i,function(e){return e.identifier}).map(function(e){return e.sort(function(e,t){return E.rcompare(e.manifest.version,t.manifest.version)})[0]})}return t.logService.info("Scanned user extensions:",i.length),i})},W.prototype.scanExtensions=function(e,t){var n=this,r=new y.Limiter(10);return c.readdir(e).then(function(i){return Promise.all(i.map(function(i){return r.queue(function(){return n.scanExtension(i,e,t)})}))}).then(function(e){return e.filter(function(e){return e&&e.identifier})})},W.prototype.scanExtension=function(e,t,n){if(1===n&&0===e.indexOf("."))return Promise.resolve(null);var r=u.join(t,e);return c.readdir(r).then(function(e){return function(e){var t=[c.readFile(u.join(e,"package.json"),"utf8").then(function(e){return V(e)}),c.readFile(u.join(e,"package.nls.json"),"utf8").then(void 0,function(e){return"ENOENT"!==e.code?Promise.reject(e):"{}"}).then(function(e){return JSON.parse(e)})];return Promise.all(t).then(function(e){var t=e[0],n=t.manifest,r=t.metadata,i=e[1];return{
manifest:v.localizeManifest(n,i),metadata:r}})}(r).then(function(t){var i=t.manifest,o=t.metadata,s=e.filter(function(e){return/^readme(\.txt|\.md|)$/i.test(e)})[0],a=s?S.URI.file(u.join(r,s)):null,c=e.filter(function(e){return/^changelog(\.txt|\.md|)$/i.test(e)})[0],l=c?S.URI.file(u.join(r,c)):null,f={id:g.getGalleryExtensionId(i.publisher,i.name),uuid:o?o.id:null};return{type:n,identifier:f,manifest:i,metadata:o,location:S.URI.file(r),readmeUrl:a,changelogUrl:l}})}).then(void 0,function(){return null})},W.prototype.removeDeprecatedExtensions=function(){var e=this;return this.removeUninstalledExtensions().then(function(){return e.removeOutdatedExtensions()})},W.prototype.removeUninstalledExtensions=function(){var e=this;return this.getUninstalledExtensions().then(function(t){return e.scanExtensions(e.extensionsPath,1).then(function(n){var r=n.filter(function(e){return t[new N.ExtensionIdentifierWithVersion(e.identifier,e.manifest.version).key()]});return Promise.all(r.map(function(t){
return e.extensionLifecycle.postUninstall(t).then(function(){return e.removeUninstalledExtension(t)})}))})}).then(function(){})},W.prototype.removeOutdatedExtensions=function(){var e=this;return this.scanExtensions(this.extensionsPath,1).then(function(t){var n=[],r=g.groupByExtension(t,function(e){return e.identifier});return n.push.apply(n,p.flatten(r.map(function(e){return e.sort(function(e,t){return E.rcompare(e.manifest.version,t.manifest.version)}).slice(1)}))),Promise.all(n.map(function(t){return e.removeExtension(t,"outdated")}))}).then(function(){})},W.prototype.removeUninstalledExtension=function(e){var t=this;return this.removeExtension(e,"uninstalled").then(function(){return t.withUninstalledExtensions(function(t){return delete t[new N.ExtensionIdentifierWithVersion(e.identifier,e.manifest.version).key()]})}).then(function(){})},W.prototype.removeExtension=function(e,t){var n=this;return this.logService.trace("Deleting "+t+" extension from disk",e.identifier.id,e.location.fsPath),
c.rimraf(e.location.fsPath).then(function(){return n.logService.info("Deleted from disk",e.identifier.id,e.location.fsPath)})},W.prototype.isUninstalled=function(e){return this.filterUninstalled(e).then(function(e){return 1===e.length})},W.prototype.filterUninstalled=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.withUninstalledExtensions(function(t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];t[o.key()]&&n.push(o.key())}return n})},W.prototype.setUninstalled=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.map(function(e){return new N.ExtensionIdentifierWithVersion(e.identifier,e.manifest.version)});return this.withUninstalledExtensions(function(e){return l.assign(e,n.reduce(function(e,t){return e[t.key()]=!0,e},{}))})},W.prototype.unsetUninstalled=function(e){return this.withUninstalledExtensions(function(t){return delete t[e.key()]})},W.prototype.getUninstalledExtensions=function(){return this.withUninstalledExtensions(function(e){return e})
},W.prototype.withUninstalledExtensions=function(e){return n(this,void 0,void 0,function(){var t=this;return r(this,function(n){switch(n.label){case 0:return[4,this.uninstalledFileLimiter.queue(function(){var n=null;return c.readFile(t.uninstalledPath,"utf8").then(void 0,function(e){return"ENOENT"===e.code?Promise.resolve("{}"):Promise.reject(e)}).then(function(e){try{return JSON.parse(e)}catch(e){return{}}}).then(function(t){return n=e(t),t}).then(function(e){if(0===Object.keys(e).length)return c.rimraf(t.uninstalledPath);var n=JSON.stringify(e);return c.writeFile(t.uninstalledPath,n)}).then(function(){return n})})];case 1:return[2,n.sent()]}})})},W.prototype.getExtensionsReport=function(){var e=(new Date).getTime();return(!this.reportedExtensions||e-this.lastReportTimestamp>3e5)&&(this.reportedExtensions=this.updateReportCache(),this.lastReportTimestamp=e),this.reportedExtensions},W.prototype.updateReportCache=function(){var e=this
;return this.logService.trace("ExtensionManagementService.refreshReportedCache"),this.galleryService.getExtensionsReport().then(function(t){return e.logService.trace("ExtensionManagementService.refreshReportedCache - got "+t.length+" reported extensions from service"),t},function(t){return e.logService.trace("ExtensionManagementService.refreshReportedCache - failed to get extension report"),[]})},Object.defineProperty(W.prototype,"devSystemExtensionsPath",{get:function(){return this._devSystemExtensionsPath||(this._devSystemExtensionsPath=u.normalize(u.join(R.getPathFromAmdModule(e,""),"..",".build","builtInExtensions"))),this._devSystemExtensionsPath},enumerable:!0,configurable:!0}),Object.defineProperty(W.prototype,"devSystemExtensionsFilePath",{get:function(){return this._devSystemExtensionsFilePath||(this._devSystemExtensionsFilePath=u.normalize(u.join(R.getPathFromAmdModule(e,""),"..","build","builtInExtensions.json"))),this._devSystemExtensionsFilePath},enumerable:!0,configurable:!0}),
W.prototype.getDevSystemExtensionsList=function(){return c.readFile(this.devSystemExtensionsFilePath,"utf8").then(function(e){return JSON.parse(e).map(function(e){return e.name})})},W.prototype.toNonCancellablePromise=function(e){return new Promise(function(t,n){return e.then(function(e){return t(e)},function(e){return n(e)})})},W.prototype.reportTelemetry=function(e,t,n,r){var i=r?r instanceof B?r.code:"unknown":void 0;this.telemetryService.publicLog(e,l.assign(t,{success:!r,duration:n,errorcode:i}))},W=s([a(1,m.IEnvironmentService),a(2,F.IConfigurationService),a(3,h.IExtensionGalleryService),a(4,P.ILogService),a(5,L.optional(D.IDownloadService)),a(6,I.ITelemetryService)],W)}(f.Disposable);t.ExtensionManagementService=W}),define(e[34],t([0,1,3,84,25,5,93,20]),function(e,t,i,o,s,a,u,c){"use strict";function l(t,s){var f;return(t.getRawRequest?Promise.resolve(t.getRawRequest(t)):Promise.resolve(function(t){return n(this,void 0,void 0,function(){var n,i,s;return r(this,function(r){switch(r.label){case 0:
return"https:"!==(n=o.parse(t.url)).protocol?[3,2]:[4,new Promise(function(t,n){e(["https"],t,n)})];case 1:return s=r.sent(),[3,4];case 2:return[4,new Promise(function(t,n){e(["http"],t,n)})];case 3:s=r.sent(),r.label=4;case 4:return i=s,[2,i.request]}})})}(t))).then(function(e){return new Promise(function(n,r){var p=o.parse(t.url),d={hostname:p.hostname,port:p.port?parseInt(p.port):"https:"===p.protocol?443:80,protocol:p.protocol,path:p.path,method:t.type||"GET",headers:t.headers,agent:t.agent,rejectUnauthorized:!i.isBoolean(t.strictSSL)||t.strictSSL};if(t.user&&t.password&&(d.auth=t.user+":"+t.password),(f=e(d,function(e){var o=i.isNumber(t.followRedirects)?t.followRedirects:3;if(e.statusCode&&e.statusCode>=300&&e.statusCode<400&&o>0&&e.headers.location)l(a.assign({},t,{url:e.headers.location,followRedirects:o-1}),s).then(n,r);else{var c=e;"gzip"===e.headers["content-encoding"]&&(c=c.pipe(u.createGunzip())),n({res:e,stream:c})}})).on("error",r),t.timeout&&f.setTimeout(t.timeout),t.data){
if("string"!=typeof t.data)return void t.data.pipe(f);f.write(t.data)}f.end(),s.onCancellationRequested(function(){f.abort(),r(c.canceled())})})})}function f(e){return e.res.statusCode&&e.res.statusCode>=200&&e.res.statusCode<300||1223===e.res.statusCode}function p(e){return 204===e.res.statusCode}Object.defineProperty(t,"__esModule",{value:!0}),t.request=l,t.download=function(e,t){return new Promise(function(n,r){var i=s.createWriteStream(e);i.once("finish",function(){return n(void 0)}),t.stream.once("error",r),t.stream.pipe(i)})},t.asText=function(e){return new Promise(function(t,n){if(!f(e))return n("Server returned "+e.res.statusCode);if(p(e))return t(null);var r=[];e.stream.on("data",function(e){return r.push(e)}),e.stream.on("end",function(){return t(r.join(""))}),e.stream.on("error",n)})},t.asJson=function(e){return new Promise(function(t,n){if(!f(e))return n("Server returned "+e.res.statusCode);if(p(e))return t(null);var r=[];e.stream.on("data",function(e){return r.push(e)}),
e.stream.on("end",function(){try{t(JSON.parse(r.join("")))}catch(e){n(e)}}),e.stream.on("error",n)})}}),define(e[46],t([0,1,26,4,14,20,24,17,5,41,29,34,21,27,32,19,11,37,43,31,82,7]),function(e,t,n,r,o,u,c,l,f,p,d,h,g,v,m,y,b,E,S,x,C,P){"use strict";function _(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return String(e.reduce(function(e,t){return e|t},0))}function w(e,t){var n=(e||[]).filter(function(e){return e.statisticName===t})[0];return n?n.value:0}function O(e,t){return e.files.filter(function(e){return e.assetType===t})[0]?{uri:e.assetUri+"/"+t,fallbackUri:e.fallbackAssetUri+"/"+t}:null}function I(e,t){var n=e.properties?e.properties.filter(function(e){return e.key===t}):[],r=n.length>0&&n[0].value;return r?r.split(",").map(function(e){return l.adoptToGalleryExtensionId(e)}):[]}function k(e){var t=e.properties?e.properties.filter(function(e){return e.key===A.Engine}):[];return t.length>0&&t[0].value||""}function j(t,n,r,i,o){var s={manifest:O(n,M.Manifest),readme:O(n,M.Details),
changelog:O(n,M.Changelog),license:O(n,M.License),repository:function(e){if(e.properties){var t=e.properties.filter(function(e){return e.key===M.Repository}),n=new RegExp("((git|ssh|http(s)?)|(git@[w.]+))(:(//)?)([w.@:/-~]+)(.git)(/)?"),r=t.filter(function(e){return n.test(e.value)})[0];return r?{uri:r.value,fallbackUri:r.value}:null}return O(e,M.Repository)}(n),download:function(e){return{uri:e.fallbackAssetUri+"/"+M.VSIX+"?redirect=true",fallbackUri:e.fallbackAssetUri+"/"+M.VSIX}}(n),icon:function(t){var n=O(t,M.Icon);if(n)return n;var r=e.toUrl("./media/defaultIcon.png");return{uri:r,fallbackUri:r}}(n),coreTranslations:function(e){return e.files.filter(function(e){return 0===e.assetType.indexOf("Microsoft.VisualStudio.Code.Translation.")}).reduce(function(t,n){return t[n.assetType.substring("Microsoft.VisualStudio.Code.Translation.".length)]=O(e,n.assetType),t},{})}(n)};return{identifier:{id:l.getGalleryExtensionId(t.publisher.publisherName,t.extensionName),uuid:t.extensionId},name:t.extensionName,
version:n.version,date:n.lastUpdated,displayName:t.displayName,publisherId:t.publisher.publisherId,publisher:t.publisher.publisherName,publisherDisplayName:t.publisher.displayName,description:t.shortDescription||"",installCount:w(t.statistics,"install")+w(t.statistics,"updateCount"),rating:w(t.statistics,"averagerating"),ratingCount:w(t.statistics,"ratingcount"),assets:s,properties:{dependencies:I(n,A.Dependency),extensionPack:I(n,A.ExtensionPack),engine:k(n),localizedLanguages:function(e){var t=e.properties?e.properties.filter(function(e){return e.key===A.LocalizedLanguages}):[],n=t.length>0&&t[0].value||"";return n?n.split(","):[]}(n)},telemetryData:{index:(i.pageNumber-1)*i.pageSize+r,searchText:i.searchText,querySource:o},preview:function(e){return-1!==e.indexOf("preview")}(t.flags)}}function T(e){var t=r.join(e.userDataPath,"machineid");return b.readFile(t,"utf8").then(function(e){return S.isUUID(e)?e:Promise.resolve(null)},function(){return Promise.resolve(null)}).then(function(e){if(!e){
e=S.generateUuid();try{E.writeFileAndFlushSync(t,e)}catch(e){}}return{"X-Market-Client-Id":"VSCode "+g.default.version,"User-Agent":"VSCode "+g.default.version,"X-Market-User-Id":e}})}Object.defineProperty(t,"__esModule",{value:!0});var D;!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"}(D||(D={}));var L;!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"}(L||(L={}));var M={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"},A={Dependency:"Microsoft.VisualStudio.Code.ExtensionDependencies",ExtensionPack:"Microsoft.VisualStudio.Code.ExtensionPack",Engine:"Microsoft.VisualStudio.Code.Engine",LocalizedLanguages:"Microsoft.VisualStudio.Code.LocalizedLanguages"},R={pageNumber:1,pageSize:10,sortBy:0,sortOrder:0,flags:D.None,criteria:[],assetTypes:[]},U=function(){function e(e){void 0===e&&(e=R),this.state=e}return Object.defineProperty(e.prototype,"pageNumber",{get:function(){return this.state.pageNumber},enumerable:!0,configurable:!0}),
Object.defineProperty(e.prototype,"pageSize",{get:function(){return this.state.pageSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sortBy",{get:function(){return this.state.sortBy},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sortOrder",{get:function(){return this.state.sortOrder},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"flags",{get:function(){return this.state.flags},enumerable:!0,configurable:!0}),e.prototype.withPage=function(t,n){return void 0===n&&(n=this.state.pageSize),new e(f.assign({},this.state,{pageNumber:t,pageSize:n}))},e.prototype.withFilter=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this.state.criteria.concat(n.map(function(e){return{filterType:t,value:e}}));return new e(f.assign({},this.state,{criteria:i}))},e.prototype.withSortBy=function(t){return new e(f.assign({},this.state,{sortBy:t}))},e.prototype.withSortOrder=function(t){return new e(f.assign({},this.state,{sortOrder:t}))},
e.prototype.withFlags=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new e(f.assign({},this.state,{flags:t.reduce(function(e,t){return e|t},0)}))},e.prototype.withAssetTypes=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new e(f.assign({},this.state,{assetTypes:t}))},Object.defineProperty(e.prototype,"raw",{get:function(){var e=this.state,t=e.criteria,n=e.pageNumber,r=e.pageSize,i=e.sortBy,o=e.sortOrder,s=e.flags;return{filters:[{criteria:t,pageNumber:n,pageSize:r,sortBy:i,sortOrder:o}],assetTypes:e.assetTypes,flags:s}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"searchText",{get:function(){var e=this.state.criteria.filter(function(e){return e.filterType===L.SearchText})[0];return e&&e.value?e.value:""},enumerable:!0,configurable:!0}),e}(),N=function(){function e(e,t,n,r){this.requestService=e,this.logService=t,this.environmentService=n,this.telemetryService=r;var i=v.default.extensionsGallery
;this.extensionsGalleryUrl=i&&i.serviceUrl,this.extensionsControlUrl=i&&i.controlUrl,this.commonHeadersPromise=T(this.environmentService)}return e.prototype.api=function(e){return void 0===e&&(e=""),""+this.extensionsGalleryUrl+e},e.prototype.isEnabled=function(){return!!this.extensionsGalleryUrl},e.prototype.getCompatibleExtension=function(e,t){var n=this,r=c.isIExtensionIdentifier(e)?null:e;if(r&&r.properties.engine&&m.isEngineValid(r.properties.engine))return Promise.resolve(r);var i=r?r.identifier:e,o=i.id,s=i.uuid,a=(new U).withFlags(D.IncludeAssetUri,D.IncludeStatistics,D.IncludeFiles,D.IncludeVersionProperties,D.ExcludeNonValidated).withPage(1,1).withFilter(L.Target,"Microsoft.VisualStudio.Code").withFilter(L.ExcludeWithFlags,_(D.Unpublished)).withAssetTypes(M.Manifest,M.VSIX);return a=s?a.withFilter(L.ExtensionId,s):a.withFilter(L.ExtensionName,o),this.queryGallery(a,C.CancellationToken.None).then(function(e){var r=e.galleryExtensions[0];if(!r||!r.versions.length)return null;if(t){
var i=r.versions.filter(function(e){return e.version===t})[0];if(i){var o=j(r,i,0,a);if(o.properties.engine&&m.isEngineValid(o.properties.engine))return o}return null}return n.getLastValidExtensionVersion(r,r.versions).then(function(e){return e?j(r,e,0,a):null})})},e.prototype.query=function(e){var t=this;if(void 0===e&&(e={}),!this.isEnabled())return Promise.reject(new Error("No extension gallery service configured."));var n=e.names?"ids":e.text?"text":"all",r=e.text||"",i=f.getOrDefault(e,function(e){return e.pageSize},50);this.telemetryService.publicLog("galleryService:query",{type:n,text:r});var o=(new U).withFlags(D.IncludeLatestVersionOnly,D.IncludeAssetUri,D.IncludeStatistics,D.IncludeFiles,D.IncludeVersionProperties).withPage(1,i).withFilter(L.Target,"Microsoft.VisualStudio.Code").withFilter(L.ExcludeWithFlags,_(D.Unpublished));return r?((r=(r=(r=r.replace(/\bcategory:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g,function(e,t,n){return o=o.withFilter(L.Category,n||t),""
})).replace(/\btag:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g,function(e,t,n){return o=o.withFilter(L.Tag,n||t),""})).trim())&&(r=r.length<200?r:r.substring(0,200),o=o.withFilter(L.SearchText,r)),o=o.withSortBy(0)):o=e.ids?o.withFilter.apply(o,[L.ExtensionId].concat(e.ids)):e.names?o.withFilter.apply(o,[L.ExtensionName].concat(e.names)):o.withSortBy(4),"number"==typeof e.sortBy&&(o=o.withSortBy(e.sortBy)),"number"==typeof e.sortOrder&&(o=o.withSortOrder(e.sortOrder)),this.queryGallery(o,C.CancellationToken.None).then(function(n){var r=n.galleryExtensions,i=n.total;return{firstPage:r.map(function(t,n){return j(t,t.versions[0],n,o,e.source)}),total:i,pageSize:o.pageSize,getPage:function(n,r){if(r.isCancellationRequested)return Promise.reject(u.canceled());var i=o.withPage(n+1);return t.queryGallery(i,r).then(function(t){return t.galleryExtensions.map(function(t,n){return j(t,t.versions[0],n,i,e.source)})})}}})},e.prototype.queryGallery=function(e,t){var n=this
;return this.isEnabled()?this.commonHeadersPromise.then(function(r){var i=JSON.stringify(e.raw),o=f.assign({},r,{"Content-Type":"application/json",Accept:"application/json;api-version=3.0-preview.1","Accept-Encoding":"gzip","Content-Length":i.length});return n.requestService.request({type:"POST",url:n.api("/extensionquery"),data:i,headers:o},t).then(function(e){return e.res.statusCode&&e.res.statusCode>=400&&e.res.statusCode<500?{galleryExtensions:[],total:0}:h.asJson(e).then(function(e){if(e){var t=e.results[0],n=t.extensions,r=t.resultMetadata&&t.resultMetadata.filter(function(e){return"ResultCount"===e.metadataType})[0];return{galleryExtensions:n,total:r&&r.metadataItems.filter(function(e){return"TotalCount"===e.name})[0].count||0}}return{galleryExtensions:[],total:0}})})}):Promise.reject(new Error("No extension gallery service configured."))},e.prototype.reportStatistic=function(e,t,n,r){var o=this;return this.isEnabled()?this.commonHeadersPromise.then(function(s){var a=i({},s,{
Accept:"*/*;api-version=4.0-preview.1"});return o.requestService.request({type:"POST",url:o.api("/publishers/"+e+"/extensions/"+t+"/"+n+"/stats?statType="+r),headers:a},C.CancellationToken.None).then(void 0,function(){})}):Promise.resolve(void 0)},e.prototype.download=function(e,t){var i=this;this.logService.trace("ExtensionGalleryService#download",e.identifier.id);var o=r.join(n.tmpdir(),S.generateUuid()),s=l.getGalleryExtensionTelemetryData(e),a=(new Date).getTime(),u=1===t?"install":2===t?"update":"",c=u?{uri:e.assets.download.uri+"&"+u+"=true",fallbackUri:e.assets.download.fallbackUri+"?"+u+"=true"}:e.assets.download;return this.getAsset(c).then(function(e){return h.download(o,e)}).then(function(){return function(e){return i.telemetryService.publicLog("galleryService:downloadVSIX",f.assign(s,{duration:e}))}((new Date).getTime()-a)}).then(function(){return o})},e.prototype.getReadme=function(e,t){return e.assets.readme?this.getAsset(e.assets.readme,{},t).then(function(e){return h.asText(e)
}).then(function(e){return e||""}):Promise.resolve("")},e.prototype.getManifest=function(e,t){return e.assets.manifest?this.getAsset(e.assets.manifest,{},t).then(h.asText).then(JSON.parse):Promise.resolve(null)},e.prototype.getCoreTranslation=function(e,t){var n=e.assets.coreTranslations[t.toUpperCase()];return n?this.getAsset(n).then(h.asText).then(JSON.parse):Promise.resolve(null)},e.prototype.getChangelog=function(e,t){return e.assets.changelog?this.getAsset(e.assets.changelog,{},t).then(function(e){return h.asText(e)}).then(function(e){return e||""}):Promise.resolve("")},e.prototype.loadAllDependencies=function(e,t){return this.getDependenciesReccursively(e.map(function(e){return e.id}),[],t)},e.prototype.getAllVersions=function(e,t){var n=this,r=(new U).withFlags(D.IncludeVersions,D.IncludeFiles,D.IncludeVersionProperties,D.ExcludeNonValidated).withPage(1,1).withFilter(L.Target,"Microsoft.VisualStudio.Code").withFilter(L.ExcludeWithFlags,_(D.Unpublished))
;return r=e.identifier.uuid?r.withFilter(L.ExtensionId,e.identifier.uuid):r.withFilter(L.ExtensionName,e.identifier.id),this.queryGallery(r,C.CancellationToken.None).then(function(e){var r=e.galleryExtensions;return r.length?t?Promise.all(r[0].versions.map(function(e){return n.getEngine(e).then(function(t){return m.isEngineValid(t)?e:null})})).then(function(e){return e.filter(function(e){return!!e}).map(function(e){return{version:e.version,date:e.lastUpdated}})}):r[0].versions.map(function(e){return{version:e.version,date:e.lastUpdated}}):[]})},e.prototype.loadDependencies=function(e,t){var n;if(!e||0===e.length)return Promise.resolve([]);var r=(n=(new U).withFlags(D.IncludeLatestVersionOnly,D.IncludeAssetUri,D.IncludeStatistics,D.IncludeFiles,D.IncludeVersionProperties).withPage(1,e.length).withFilter(L.Target,"Microsoft.VisualStudio.Code").withFilter(L.ExcludeWithFlags,_(D.Unpublished)).withAssetTypes(M.Icon,M.License,M.Details,M.Manifest,M.VSIX)).withFilter.apply(n,[L.ExtensionName].concat(e))
;return this.queryGallery(r,t).then(function(e){for(var t=[],n=[],i=0;i<e.galleryExtensions.length;i++){var o=e.galleryExtensions[i];-1===n.indexOf(o.extensionId)&&(t.push(j(o,o.versions[0],i,r,"dependencies")),n.push(o.extensionId))}return t})},e.prototype.getDependenciesReccursively=function(t,n,r){var i=this;return t&&t.length&&(t=n.length?t.filter(function(t){return!e.hasExtensionByName(n,t)}):t).length?this.loadDependencies(t,r).then(function(t){for(var s=new Set,a=0,u=t;a<u.length;a++){var c=u[a];c.properties.dependencies&&c.properties.dependencies.forEach(function(e){return s.add(e)})}n=o.distinct(n.concat(t),function(e){return e.identifier.uuid});var l=[];return s.forEach(function(t){return!e.hasExtensionByName(n,t)&&l.push(t)}),i.getDependenciesReccursively(l,n,r)}):Promise.resolve(n)},e.prototype.getAsset=function(e,t,n){var r=this;return void 0===t&&(t={}),void 0===n&&(n=C.CancellationToken.None),this.commonHeadersPromise.then(function(i){var o=f.assign({},i,t.headers||{});t=f.assign({},t,{
type:"GET"},{headers:o});var s=e.uri,a=e.fallbackUri,c=f.assign({},t,{url:s});return r.requestService.request(c,n).then(function(e){return 200===e.res.statusCode?Promise.resolve(e):h.asText(e).then(function(t){return Promise.reject(new Error("Expected 200, got back "+e.res.statusCode+" instead.\n\n"+t))})}).then(void 0,function(e){if(u.isPromiseCanceledError(e))return Promise.reject(e);var i=u.getErrorMessage(e);r.telemetryService.publicLog("galleryService:requestError",{url:s,cdn:!0,message:i}),r.telemetryService.publicLog("galleryService:cdnFallback",{url:s,message:i});var o=f.assign({},t,{url:a});return r.requestService.request(o,n).then(void 0,function(e){if(u.isPromiseCanceledError(e))return Promise.reject(e);var t=u.getErrorMessage(e);return r.telemetryService.publicLog("galleryService:requestError",{url:a,cdn:!1,message:t}),Promise.reject(e)})})})},e.prototype.getLastValidExtensionVersion=function(e,t){var n=this.getLastValidExtensionVersionFromProperties(e,t)
;return n||this.getLastValidExtensionVersionReccursively(e,t)},e.prototype.getLastValidExtensionVersionFromProperties=function(e,t){for(var n=0,r=t;n<r.length;n++){var i=r[n],o=k(i);if(!o)return null;if(m.isEngineValid(o))return Promise.resolve(i)}return null},e.prototype.getEngine=function(e){var t=k(e);if(t)return Promise.resolve(t);var n=O(e,M.Manifest);if(!n)return Promise.reject("Manifest was not found");return this.getAsset(n,{headers:{"Accept-Encoding":"gzip"}}).then(function(e){return h.asJson(e)}).then(function(e){return e?e.engines.vscode:Promise.reject("Error while reading manifest")})},e.prototype.getLastValidExtensionVersionReccursively=function(e,t){var n=this;if(!t.length)return Promise.resolve(null);var r=t[0];return this.getEngine(r).then(function(i){return m.isEngineValid(i)?(r.properties=r.properties||[],r.properties.push({key:A.Engine,value:i}),r):n.getLastValidExtensionVersionReccursively(e,t.slice(1))})},e.hasExtensionByName=function(e,t){for(var n=0,r=e;n<r.length;n++){var i=r[n]
;if(i.publisher+"."+i.name===t)return!0}return!1},e.prototype.getExtensionsReport=function(){return this.isEnabled()?this.extensionsControlUrl?this.requestService.request({type:"GET",url:this.extensionsControlUrl},C.CancellationToken.None).then(function(e){return 200!==e.res.statusCode?Promise.reject(new Error("Could not get extensions report.")):h.asJson(e).then(function(e){var t=new Map;if(e)for(var n=0,r=e.malicious;n<r.length;n++){var i=r[n],o=t.get(i)||{id:{id:i},malicious:!0,slow:!1};o.malicious=!0,t.set(i,o)}return Promise.resolve(x.values(t))})}):Promise.resolve([]):Promise.reject(new Error("No extension gallery service configured."))},e=s([a(0,p.IRequestService),a(1,P.ILogService),a(2,y.IEnvironmentService),a(3,d.ITelemetryService)],e)}();t.ExtensionGalleryService=N,t.resolveMarketplaceHeaders=T}),define(e[58],t([0,1,5,34,64,10,7]),function(e,t,n,r,i,o,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){var n=this;this.logService=t,this.disposables=[],
this.configure(e.getValue()),e.onDidChangeConfiguration(function(){return n.configure(e.getValue())},this,this.disposables)}return e.prototype.configure=function(e){this.proxyUrl=e.http&&e.http.proxy,this.strictSSL=!(!e.http||!e.http.proxyStrictSSL),this.authorization=e.http&&e.http.proxyAuthorization},e.prototype.request=function(e,t,o){var s=this;void 0===o&&(o=r.request),this.logService.trace("RequestService#request",e.url);var a=this.proxyUrl,u=this.strictSSL;return(e.agent?Promise.resolve(e.agent):Promise.resolve(i.getProxyAgent(e.url||"",{proxyUrl:a,strictSSL:u}))).then(function(r){return e.agent=r,e.strictSSL=u,s.authorization&&(e.headers=n.assign(e.headers||{},{"Proxy-Authorization":s.authorization})),o(e,t)})},e=s([a(0,o.IConfigurationService),a(1,u.ILogService)],e)}();t.RequestService=c}),define(e[96],t([0,1,6,27,21,4,86,23,42,36,57,19,63,24,87,46,29,80,79,83,41,58,10,74,81,11,53,76,77,60,7,20,17,22,45]),function(e,t,i,o,u,c,l,f,p,d,h,g,v,m,y,b,E,S,x,C,P,_,w,O,I,k,j,T,D,L,M,A,R,U,N){"use strict"
;function F(e,t){return t?e.publisher+"."+e.name+"@"+e.version:e.publisher+"."+e.name}function z(e){var t=B.exec(e);return t&&t[1]?[R.adoptToGalleryExtensionId(t[1]),t[2]]:[R.adoptToGalleryExtensionId(e),void 0]}Object.defineProperty(t,"__esModule",{value:!0});var V=i.localize(2,null,"ms-vscode.csharp"),B=/^([^.]+\..+)@(\d+\.\d+\.\d+(-.*)?)$/;t.getIdAndVersion=z;var W=function(){function e(e,t,n){this.environmentService=e,this.extensionManagementService=t,this.extensionGalleryService=n}return e.prototype.run=function(e){return n(this,void 0,void 0,function(){var t,n,i;return r(this,function(r){switch(r.label){case 0:return e["install-source"]?[4,this.setInstallSource(e["install-source"])]:[3,2];case 1:return r.sent(),[3,8];case 2:return e["list-extensions"]?[4,this.listExtensions(!!e["show-versions"])]:[3,4];case 3:return r.sent(),[3,8];case 4:return e["install-extension"]?(n=e["install-extension"],t="string"==typeof n?[n]:n,[4,this.installExtensions(t,e.force)]):[3,6];case 5:return r.sent(),[3,8];case 6:
return e["uninstall-extension"]?(n=e["uninstall-extension"],i="string"==typeof n?[n]:n,[4,this.uninstallExtension(i)]):[3,8];case 7:r.sent(),r.label=8;case 8:return[2]}})})},e.prototype.setInstallSource=function(e){return k.writeFile(this.environmentService.installSourcePath,e.slice(0,30))},e.prototype.listExtensions=function(e){return n(this,void 0,void 0,function(){var t;return r(this,function(n){switch(n.label){case 0:return[4,this.extensionManagementService.getInstalled(1)];case 1:return(t=n.sent()).forEach(function(t){return console.log(F(t.manifest,e))}),[2]}})})},e.prototype.installExtensions=function(e,t){return n(this,void 0,void 0,function(){var n,o,s,a,u;return r(this,function(r){switch(r.label){case 0:n=[],o=0,s=e,r.label=1;case 1:if(!(o<s.length))return[3,6];a=s[o],r.label=2;case 2:return r.trys.push([2,4,,5]),[4,this.installExtension(a,t)];case 3:return r.sent(),[3,5];case 4:return u=r.sent(),console.error(u.message||u.stack||u),n.push(a),[3,5];case 5:return o++,[3,1];case 6:
return[2,n.length?Promise.reject(i.localize(3,null,n.join(", "))):Promise.resolve()]}})})},e.prototype.installExtension=function(e,t){var n=this;if(/\.vsix$/i.test(e))return e=c.isAbsolute(e)?e:c.join(process.cwd(),e),this.validate(e,t).then(function(t){return t?n.extensionManagementService.install(U.URI.file(e)).then(function(){console.log(i.localize(4,null,j.getBaseLabel(e)))},function(t){return A.isPromiseCanceledError(t)?(console.log(i.localize(5,null,j.getBaseLabel(e))),null):Promise.reject(t)}):null});var r=z(e),o=r[0],s=r[1];return this.extensionManagementService.getInstalled(1).then(function(e){return n.extensionGalleryService.getCompatibleExtension({id:o},s).then(null,function(e){if(e.responseText)try{var t=JSON.parse(e.responseText);return Promise.reject(t.message)}catch(e){}return Promise.reject(e)}).then(function(r){if(!r)return Promise.reject(new Error(function(e){return i.localize(0,null,e)}(s?o+"@"+s:o)+"\n"+V));var a=e.filter(function(e){return R.areSameExtensions(e.identifier,{id:o})})[0]
;return a?r.version!==a.manifest.version?s||t?(console.log(i.localize(6,null,o,r.version)),n.installFromGallery(o,r)):(console.log(i.localize(7,null,o,a.manifest.version,r.version)),Promise.resolve(null)):(console.log(i.localize(8,null,s?o+"@"+s:o)),Promise.resolve(null)):(console.log(i.localize(9,null,o)),n.installFromGallery(o,r))})})},e.prototype.validate=function(e,t){return n(this,void 0,void 0,function(){var n,o,s,a;return r(this,function(r){switch(r.label){case 0:return[4,N.getManifest(e)];case 1:if(!(n=r.sent()))throw new Error("Invalid vsix");return o={id:R.getGalleryExtensionId(n.publisher,n.name)},[4,this.extensionManagementService.getInstalled(1)];case 2:return s=r.sent(),(a=s.filter(function(e){return R.areSameExtensions(o,e.identifier)&&l.gt(e.manifest.version,n.version)})[0])&&!t?(console.log(i.localize(10,null,a.identifier.id,a.manifest.version,n.version)),[2,!1]):[2,!0]}})})},e.prototype.installFromGallery=function(e,t){return n(this,void 0,void 0,function(){var n;return r(this,function(r){
switch(r.label){case 0:console.log(i.localize(11,null)),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.extensionManagementService.installFromGallery(t)];case 2:return r.sent(),console.log(i.localize(12,null,e,t.version)),[3,4];case 3:if(n=r.sent(),!A.isPromiseCanceledError(n))throw n;return console.log(i.localize(13,null,e)),[3,4];case 4:return[2]}})})},e.prototype.uninstallExtension=function(e){var t=this;return f.sequence(e.map(function(e){return function(){return function(e){return n(this,void 0,void 0,function(){var t,n;return r(this,function(r){switch(r.label){case 0:return/\.vsix$/i.test(e)?(t=c.isAbsolute(e)?e:c.join(process.cwd(),e),[4,N.getManifest(t)]):[2,e];case 1:return n=r.sent(),[2,F(n)]}})})}(e).then(function(e){return t.extensionManagementService.getInstalled(1).then(function(n){var r=n.filter(function(t){return R.areSameExtensions(t.identifier,{id:e})})[0];return r?(console.log(i.localize(14,null,e)),t.extensionManagementService.uninstall(r,!0).then(function(){
return console.log(i.localize(15,null,e))})):Promise.reject(new Error(function(e){return i.localize(1,null,e)}(e)+"\n"+V))})})}}))},e=s([a(0,g.IEnvironmentService),a(1,m.IExtensionManagementService),a(2,m.IExtensionGalleryService)],e)}();t.Main=W;var q="monacoworkbench";t.main=function(e){var t=new p.ServiceCollection,n=new v.EnvironmentService(e,process.execPath),r=L.createSpdLogService("cli",M.getLogLevel(n),n.logsPath);process.once("exit",function(){return r.dispose()}),r.info("main",e),t.set(g.IEnvironmentService,n),t.set(M.ILogService,r),t.set(T.IStateService,new d.SyncDescriptor(D.StateService));var i=new h.InstantiationService(t);return i.invokeFunction(function(t){var n=t.get(g.IEnvironmentService),s=t.get(T.IStateService);return Promise.all([n.appSettingsHome,n.extensionsPath].map(function(e){return k.mkdirp(e)})).then(function(){var t=n.appRoot,a=n.extensionsPath,c=n.extensionDevelopmentLocationURI,l=n.isBuilt,f=n.installSourcePath,h=new p.ServiceCollection
;h.set(w.IConfigurationService,new d.SyncDescriptor(O.ConfigurationService)),h.set(P.IRequestService,new d.SyncDescriptor(_.RequestService)),h.set(m.IExtensionManagementService,new d.SyncDescriptor(y.ExtensionManagementService,[!1])),h.set(m.IExtensionGalleryService,new d.SyncDescriptor(b.ExtensionGalleryService));var g=[];if(l&&!c&&!n.args["disable-telemetry"]&&o.default.enableTelemetry){o.default.aiConfig&&o.default.aiConfig.asimovKey&&g.push(new I.AppInsightsAppender(q,null,o.default.aiConfig.asimovKey,r));var v={appender:S.combinedAppender.apply(void 0,g),commonProperties:C.resolveCommonProperties(o.default.commit,u.default.version,s.getItem("telemetry.machineId"),f),piiPaths:[t,a]};h.set(E.ITelemetryService,new d.SyncDescriptor(x.TelemetryService,[v]))}else h.set(E.ITelemetryService,S.NullTelemetryService);return i.createChild(h).createInstance(W).run(e).then(function(){return S.combinedAppender.apply(void 0,g).dispose()})})})}})}).call(this);
//# sourceMappingURL=https://ticino.blob.core.windows.net/sourcemaps/bb1e228e30ce43ebb361c84fdf2f0d4fb7fda6ce/core/vs/code/node/cliProcessMain.js.map
