/*!--------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
(function(){
var e=["require","exports","vs/base/common/winjs.base","vs/base/common/event","vs/base/common/lifecycle","path","vs/platform/instantiation/common/instantiation","vs/base/common/types","vs/base/common/platform","vs/base/common/objects","vs/base/common/async","vs/platform/log/common/log","vs/nls!vs/code/electron-browser/sharedProcess/sharedProcessMain","vs/nls","vs/base/node/pfs","vs/base/common/strings","vs/base/common/errors","vs/base/common/uri","vs/platform/environment/common/environment","fs","vs/base/common/arrays","vs/platform/configuration/common/configuration","vs/platform/node/product","vs/platform/registry/common/platform","vs/base/common/uuid","vs/platform/node/package","vs/platform/configuration/common/configurationRegistry","os","vs/platform/extensionManagement/common/extensionManagement","vs/base/common/map","vs/base/common/amd","vs/base/common/paths","vs/base/common/network","vs/platform/extensionManagement/common/extensionManagementUtil","vs/platform/telemetry/common/telemetry","vs/platform/dialogs/common/dialogs","vs/base/node/extfs","vs/platform/localizations/common/localizations","vs/platform/instantiation/common/descriptors","vs/base/common/functional","vs/platform/extensions/node/extensionValidator","vs/base/common/errorMessage","vs/platform/download/common/download","vs/base/common/json","vs/base/common/assert","vs/platform/configuration/common/configurationModels","vs/platform/request/node/request","vs/platform/instantiation/common/serviceCollection","vs/base/node/request","vs/platform/extensionManagement/node/extensionGalleryService","vs/nls!vs/base/common/errorMessage","vs/base/common/decorators","vs/base/common/date","vs/base/common/cancellation","vs/nls!vs/base/common/severity","vs/base/common/severity","vs/nls!vs/base/node/zip","vs/nls!vs/platform/configuration/common/configurationRegistry","vs/nls!vs/platform/dialogs/common/dialogs","vs/nls!vs/platform/extensionManagement/common/extensionManagement","vs/nls!vs/platform/extensionManagement/node/extensionManagementService","vs/nls!vs/platform/extensions/node/extensionValidator","vs/nls!vs/platform/request/node/request","vs/base/common/linkedList","vs/nls!vs/platform/workspaces/common/workspaces","vs/platform/download/node/downloadIpc","vs/base/common/glob","vs/platform/extensionManagement/common/extensionNls","vs/platform/extensionManagement/node/extensionManagementIpc","vs/platform/extensions/common/extensions","vs/platform/extensionManagement/node/extensionsManifestCache","vs/base/common/mime","vs/base/node/flow","vs/platform/request/electron-browser/requestService","vs/platform/dialogs/node/dialogIpc","vs/base/node/paths","vs/base/node/proxy","url","vs/base/node/stream","vs/platform/instantiation/common/instantiationService","vs/platform/keybinding/common/keybinding","vs/base/common/normalization","vs/platform/localizations/node/localizationsIpc","vs/base/node/encoding","vs/platform/extensionManagement/node/extensionLifecycle","vs/platform/log/node/logIpc","vs/platform/log/node/spdlogService","vs/platform/request/node/requestService","child_process","stream","vs/code/electron-browser/sharedProcess/contrib/languagePackCachedDataCleaner","vs/code/electron-browser/sharedProcess/contrib/nodeCachedDataCleaner","vs/code/electron-browser/sharedProcess/contrib/contributions","vs/platform/environment/node/environmentService","crypto","vs/platform/localizations/node/localizations","vs/base/common/uriIpc","vs/platform/jsonschemas/common/jsonContributionRegistry","vs/nls!vs/platform/telemetry/common/telemetryService","vs/base/node/config","vs/base/common/graph","vs/platform/configuration/node/configuration","vs/platform/configuration/node/configurationService","vs/base/common/collections","vs/base/parts/ipc/node/ipc","vs/platform/telemetry/common/telemetryService","vs/platform/telemetry/common/telemetryUtils","vs/platform/telemetry/node/appInsightsAppender","vs/base/parts/ipc/node/ipc.net","vs/platform/telemetry/node/commonProperties","vs/platform/telemetry/node/telemetryIpc","vs/platform/windows/common/windows","vs/platform/workspaces/common/workspaces","vs/platform/windows/node/windowsIpc","vs/base/node/zip","vs/platform/extensionManagement/node/extensionManagementService","yazl","yauzl","semver","applicationinsights","zlib","net","iconv-lite","assert","vs/code/electron-browser/sharedProcess/sharedProcessMain","electron"],t=function(t){
for(var n=[],r=0,i=t.length;r<i;r++)n[r]=e[t[r]];return n};define(e[44],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ok=function(e,t){if(!e||null===e)throw new Error(t?"Assertion failed ("+t+")":"Assertion Failed")}}),define(e[103],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.remove=function(e,t){return!!n.call(e,t)&&(delete e[t],!0)},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}}),
define(e[51],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[39],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.once=function(e){var t,n=this,r=!1;return function(){return r?t:(r=!0,t=e.apply(n,arguments))}}}),define(e[43],t([0,1]),function(e,t){"use strict";function n(e,t){function n(t,n){for(var r=0,i=0;r<t||!n;){var o=e.charCodeAt(a);if(o>=48&&o<=57)i=16*i+o-48;else if(o>=65&&o<=70)i=16*i+o-65+10;else{if(!(o>=97&&o<=102))break;i=16*i+o-97+10}a++,r++}return r<t&&(i=-1),i}function s(){if(f="",h=u.None,d=a,a>=l)return d=l,p=c.EOF;var t=e.charCodeAt(a);if(r(t)){do{a++,f+=String.fromCharCode(t),t=e.charCodeAt(a)}while(r(t));return p=c.Trivia}if(i(t))return a++,f+=String.fromCharCode(t),13===t&&10===e.charCodeAt(a)&&(a++,f+="\n"),p=c.LineBreakTrivia;switch(t){case 123:return a++,p=c.OpenBraceToken;case 125:return a++,p=c.CloseBraceToken
;case 91:return a++,p=c.OpenBracketToken;case 93:return a++,p=c.CloseBracketToken;case 58:return a++,p=c.ColonToken;case 44:return a++,p=c.CommaToken;case 34:return a++,f=function(){for(var t="",r=a;;){if(a>=l){t+=e.substring(r,a),h=u.UnexpectedEndOfString;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),h=u.UnexpectedEndOfString;break}h=u.InvalidCharacter}a++}else{if(t+=e.substring(r,a),++a>=l){h=u.UnexpectedEndOfString;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,!0);s>=0?t+=String.fromCharCode(s):h=u.InvalidUnicode;break;default:h=u.InvalidEscapeCharacter}r=a}}return t}(),p=c.StringLiteral;case 47:var s=a-1;if(47===e.charCodeAt(a+1)){for(a+=2;a<l&&!i(e.charCodeAt(a));)a++;return f=e.substring(s,a),p=c.LineCommentTrivia}if(42===e.charCodeAt(a+1)){
a+=2;for(var g=l-1,v=!1;a<g;){if(42===e.charCodeAt(a)&&47===e.charCodeAt(a+1)){a+=2,v=!0;break}a++}return v||(a++,h=u.UnexpectedEndOfComment),f=e.substring(s,a),p=c.BlockCommentTrivia}return f+=String.fromCharCode(t),a++,p=c.Unknown;case 45:if(f+=String.fromCharCode(t),++a===l||!o(e.charCodeAt(a)))return p=c.Unknown;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return f+=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 h=u.UnexpectedEndOfNumber,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 h=u.UnexpectedEndOfNumber;return e.substring(t,n)}(),p=c.NumericLiteral;default:for(;a<l&&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(d!==a){switch(f=e.substring(d,a)){case"true":return p=c.TrueKeyword;case"false":return p=c.FalseKeyword;case"null":return p=c.NullKeyword}return p=c.Unknown}return f+=String.fromCharCode(t),a++,p=c.Unknown}}void 0===t&&(t=!1);var a=0,l=e.length,f="",d=0,p=c.Unknown,h=u.None;return{setPosition:function(e){a=e,f="",d=0,p=c.Unknown,h=u.None},getPosition:function(){return a},scan:t?function(){var e;do{e=s()}while(e>=c.LineCommentTrivia&&e<=c.Trivia);return e}:s,getToken:function(){return p},getTokenValue:function(){return f},getTokenOffset:function(){return d},getTokenLength:function(){return a-d},getTokenError:function(){return h}}}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("array"===e.type)return e.children.map(s);if("object"===e.type){for(var t={},n=0,r=e.children;n<r.length;n++){var i=r[n];t[i.children[0].value]=s(i.children[1])}return t}return e.value}function a(e,t,r){function i(e){return e?function(){return e(p.getTokenOffset(),p.getTokenLength())}:function(){return!0}}function o(e){return e?function(t){return e(t,p.getTokenOffset(),p.getTokenLength())}:function(){return!0}}function s(){for(;;){var e=p.scan();switch(e){case c.LineCommentTrivia:case c.BlockCommentTrivia:w&&a(f.InvalidSymbol);break;case c.Unknown:a(f.InvalidSymbol);break;case c.Trivia:case c.LineBreakTrivia:break;default:return e}}}function a(e,t,n){if(void 0===t&&(t=[]),void 0===n&&(n=[]),E(e),t.length+n.length>0)for(var r=p.getToken();r!==c.EOF;){if(-1!==t.indexOf(r)){s();break}if(-1!==n.indexOf(r))break;r=s()}}function u(e){var t=p.getTokenValue();return e?b(t):g(t),s(),!0}function l(){return p.getToken()!==c.StringLiteral?(a(f.PropertyNameExpected,[],[c.CloseBraceToken,c.CommaToken]),!1):(u(!1),
p.getToken()===c.ColonToken?(_(":"),s(),d()||a(f.ValueExpected,[],[c.CloseBraceToken,c.CommaToken])):a(f.ColonExpected,[],[c.CloseBraceToken,c.CommaToken]),!0)}function d(){switch(p.getToken()){case c.OpenBracketToken:return function(){m(),s();for(var e=!1;p.getToken()!==c.CloseBracketToken&&p.getToken()!==c.EOF;){if(p.getToken()===c.CommaToken){if(e||a(f.ValueExpected,[],[]),_(","),s(),p.getToken()===c.CloseBracketToken&&!C)break}else e&&a(f.CommaExpected,[],[]);d()||a(f.ValueExpected,[],[c.CloseBracketToken,c.CommaToken]),e=!0}return y(),p.getToken()!==c.CloseBracketToken?a(f.CloseBracketExpected,[c.CloseBracketToken],[]):s(),!0}();case c.OpenBraceToken:return function(){h(),s();for(var e=!1;p.getToken()!==c.CloseBraceToken&&p.getToken()!==c.EOF;){if(p.getToken()===c.CommaToken){if(e||a(f.ValueExpected,[],[]),_(","),s(),p.getToken()===c.CloseBraceToken&&!C)break}else e&&a(f.CommaExpected,[],[]);l()||a(f.ValueExpected,[],[c.CloseBraceToken,c.CommaToken]),e=!0}return v(),
p.getToken()!==c.CloseBraceToken?a(f.CloseBraceExpected,[c.CloseBraceToken],[]):s(),!0}();case c.StringLiteral:return u(!0);default:return function(){switch(p.getToken()){case c.NumericLiteral:var e=0;try{"number"!=typeof(e=JSON.parse(p.getTokenValue()))&&(a(f.InvalidNumberFormat),e=0)}catch(e){a(f.InvalidNumberFormat)}b(e);break;case c.NullKeyword:b(null);break;case c.TrueKeyword:b(!0);break;case c.FalseKeyword:b(!1);break;default:return!1}return s(),!0}()}}var p=n(e,!1),h=i(t.onObjectBegin),g=o(t.onObjectProperty),v=i(t.onObjectEnd),m=i(t.onArrayBegin),y=i(t.onArrayEnd),b=o(t.onLiteralValue),_=o(t.onSeparator),E=o(t.onError),w=r&&r.disallowComments,C=r&&r.disallowTrailingComma;return s(),p.getToken()===c.EOF||(d()?(p.getToken()!==c.EOF&&a(f.EndOfFileExpected,[],[]),!0):(a(f.ValueExpected,[],[]),!1))}Object.defineProperty(t,"__esModule",{value:!0});var u;!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"}(u=t.ScanError||(t.ScanError={}));var c;!function(e){e[e.Unknown=0]="Unknown",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.EOF=16]="EOF"}(c=t.SyntaxKind||(t.SyntaxKind={})),t.createScanner=n;var l;!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"}(l||(l={}));var f;!function(e){e[e.InvalidSymbol=0]="InvalidSymbol",e[e.InvalidNumberFormat=1]="InvalidNumberFormat",e[e.PropertyNameExpected=2]="PropertyNameExpected",e[e.ValueExpected=3]="ValueExpected",e[e.ColonExpected=4]="ColonExpected",e[e.CommaExpected=5]="CommaExpected",e[e.CloseBraceExpected=6]="CloseBraceExpected",
e[e.CloseBracketExpected=7]="CloseBracketExpected",e[e.EndOfFileExpected=8]="EndOfFileExpected"}(f=t.ParseErrorCode||(t.ParseErrorCode={})),t.parse=function(e,t,n){function r(e){Array.isArray(o)?o.push(e):i&&(o[i]=e)}void 0===t&&(t=[]);var i=null,o=[],s=[];return a(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){t.push({error:e})}},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=[]);var o={type:"array",offset:-1,length:-1,children:[]};a(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:function(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";default:return"null"}}(e),offset:t,length:n,parent:o,value:e}),r(t+n)},onSeparator:function(e,t,n){"property"===o.type&&(":"===e?o.columnOffset=t:","===e&&r(t))},onError:function(e){t.push({error:e})}},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)return;for(var s=!1,a=0,u=n.children;a<u.length;a++){var c=u[a];if(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||l>=n.children.length)return;n=n.children[l]}}return n}},t.getNodeValue=s,t.visit=a}),
define(e[4],t([0,1,39]),function(e,t,n){"use strict";function r(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return Array.isArray(e)?(e.forEach(function(e){return e&&e.dispose()}),[]):0!==t.length?(r(e),r(t),[]):e?(e.dispose(),e):void 0}Object.defineProperty(t,"__esModule",{value:!0}),t.isDisposable=function(e){return"function"==typeof e.dispose&&0===e.dispose.length},t.dispose=r,t.combinedDisposable=function(e){return{dispose:function(){return r(e)}}},t.toDisposable=function(e){return{dispose:function(){e()}}};var i=function(){function e(){this._toDispose=[]}return Object.defineProperty(e.prototype,"toDispose",{get:function(){return this._toDispose},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._toDispose=r(this._toDispose)},e.prototype._register=function(e){return this._toDispose.push(e),e},e.None=Object.freeze({dispose:function(){}}),e}();t.Disposable=i;var o=function(){function e(){this.references=Object.create(null)}return e.prototype.acquire=function(e){
var t=this,r=this.references[e];r||(r=this.references[e]={counter:0,object:this.createReferencedObject(e)});var i=r.object,o=n.once(function(){0==--r.counter&&(t.destroyReferencedObject(r.object),delete t.references[e])});return r.counter++,{object:i,dispose:o}},e}();t.ReferenceCollection=o;var s=function(){function e(e){this.object=e}return e.prototype.dispose=function(){},e}();t.ImmortalReference=s}),define(e[63],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(e){this.element=e}}(),r=function(){function e(){}return e.prototype.isEmpty=function(){return!this._first},e.prototype.clear=function(){this._first=void 0,this._last=void 0},e.prototype.unshift=function(e){return this.insert(e,!1)},e.prototype.push=function(e){return this.insert(e,!0)},e.prototype.insert=function(e,t){var r=this,i=new n(e);if(this._first)if(t){var o=this._last;this._last=i,i.prev=o,o.next=i}else{var s=this._first;this._first=i,i.next=s,s.prev=i}else this._first=i,
this._last=i;return function(){for(var e=r._first;e instanceof n;e=e.next)if(e===i){if(e.prev&&e.next){var t=e.prev;t.next=e.next,e.next.prev=t}else e.prev||e.next?e.next?e.prev||(r._first=r._first.next,r._first.prev=void 0):(r._last=r._last.prev,r._last.next=void 0):(r._first=void 0,r._last=void 0);break}}},e.prototype.iterator=function(){var e={done:void 0,value:void 0},t=this._first;return{next:function(){return t?(e.done=!1,e.value=t.element,t=t.next):(e.done=!0,e.value=void 0),e}}},e.prototype.toArray=function(){for(var e=[],t=this._first;t instanceof n;t=t.next)e.push(t.element);return e},e}();t.LinkedList=r}),define(e[32],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data"}(t.Schemas||(t.Schemas={}))}),
define(e[8],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=!1,r=!1,i=!1,o=!1,s=!1,a=void 0,u=void 0,c=void 0;if(t.LANGUAGE_DEFAULT="en","object"==typeof process&&"function"==typeof process.nextTick&&"string"==typeof process.platform){n="win32"===process.platform,r="darwin"===process.platform,i="linux"===process.platform,a=t.LANGUAGE_DEFAULT,u=t.LANGUAGE_DEFAULT;var l=process.env.VSCODE_NLS_CONFIG;if(l)try{var f=JSON.parse(l),d=f.availableLanguages["*"];a=f.locale,u=d||t.LANGUAGE_DEFAULT,c=f._translationsConfigFile}catch(e){}o=!0}else if("object"==typeof navigator){var p=navigator.userAgent;n=p.indexOf("Windows")>=0,r=p.indexOf("Macintosh")>=0,i=p.indexOf("Linux")>=0,s=!0,u=a=navigator.language}var h;!function(e){e[e.Web=0]="Web",e[e.Mac=1]="Mac",e[e.Linux=2]="Linux",e[e.Windows=3]="Windows"}(h=t.Platform||(t.Platform={}));var g=h.Web;o&&(r?g=h.Mac:n?g=h.Windows:i&&(g=h.Linux)),t.isWindows=n,t.isMacintosh=r,t.isLinux=i,t.isNative=o,t.isWeb=s,t.platform=g,
t.isRootUser=function(){return o&&!n&&0===process.getuid()},t.language=u,t.locale=a,t.translationsConfigFile=c;var v="object"==typeof self?self:"object"==typeof global?global:{};t.globals=v;var m=null;t.setImmediate=function(e){return null===m&&(m=t.globals.setImmediate?t.globals.setImmediate.bind(t.globals):"undefined"!=typeof process&&"function"==typeof process.nextTick?process.nextTick.bind(process):t.globals.setTimeout.bind(t.globals)),m(e)};!function(e){e[e.Windows=1]="Windows",e[e.Macintosh=2]="Macintosh",e[e.Linux=3]="Linux"}(t.OperatingSystem||(t.OperatingSystem={})),t.OS=r?2:n?1:3;!function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"}(t.AccessibilitySupport||(t.AccessibilitySupport={}))}),define(e[15],t([0,1]),function(e,t){"use strict";function n(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\[\]\(\)\#]/g,"\\$&")}function r(e,t){if(!e||!t)return e;var n=t.length;if(0===n||0===e.length)return e;for(var r=0;e.indexOf(t,r)===r;)r+=n;return e.substring(r)}
function i(e,t){if(!e||!t)return e;var n=t.length,r=e.length;if(0===n||0===r)return e;for(var i=r,o=-1;;){if(-1===(o=e.lastIndexOf(t,i-1))||o+n!==i)break;if(0===o)return"";i=o}return e.substring(0,i)}function o(e,t){return e<t?-1:e>t?1:0}function s(e){return e>=97&&e<=122}function a(e){return e>=65&&e<=90}function u(e){return s(e)||a(e)}function c(e,t,n){if(void 0===n&&(n=e.length),"string"!=typeof e||"string"!=typeof t)return!1;for(var r=0;r<n;r++){var i=e.charCodeAt(r),o=t.charCodeAt(r);if(i!==o)if(u(i)&&u(o)){var s=Math.abs(i-o);if(0!==s&&32!==s)return!1}else if(String.fromCharCode(i).toLowerCase()!==String.fromCharCode(o).toLowerCase())return!1}return!0}function l(e,t,n,r,i,o){for(;t<n&&i<o;){if(e[t]!==r[i])return!1;t+=1,i+=1}return!0}function f(e){return(e=+e)>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function d(e){return e&&e.length>0&&65279===e.charCodeAt(0)}Object.defineProperty(t,"__esModule",{value:!0}),t.empty="",t.isFalsyOrWhitespace=function(e){
return!e||"string"!=typeof e||0===e.trim().length},t.pad=function(e,t,n){void 0===n&&(n="0");for(var r=""+e,i=[r],o=r.length;o<t;o++)i.push(n);return i.reverse().join("")};var p=/{(\d+)}/g;t.format=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return 0===t.length?e:e.replace(p,function(e,n){var r=parseInt(n,10);return isNaN(r)||r<0||r>=t.length?e:t[r]})},t.escape=function(e){return e.replace(/[<|>|&]/g,function(e){switch(e){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return e}})},t.escapeRegExpCharacters=n,t.trim=function(e,t){return void 0===t&&(t=" "),i(r(e,t),t)},t.ltrim=r,t.rtrim=i,t.convertSimple2RegExpPattern=function(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")},t.stripWildcards=function(e){return e.replace(/\*/g,"")},t.startsWith=function(e,t){if(e.length<t.length)return!1;if(e===t)return!0;for(var n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0},t.endsWith=function(e,t){var n=e.length-t.length
;return n>0?e.indexOf(t,n)===n:0===n&&e===t},t.createRegExp=function(e,t,r){if(void 0===r&&(r={}),!e)throw new Error("Cannot create regex from empty string");t||(e=n(e)),r.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));var i="";return r.global&&(i+="g"),r.matchCase||(i+="i"),r.multiline&&(i+="m"),new RegExp(e,i)},t.regExpLeadsToEndlessLoop=function(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&e.exec("")&&0===e.lastIndex},t.regExpContainsBackreference=function(e){return!!e.match(/([^\\]|^)(\\\\)*\\\d+/)},t.firstNonWhitespaceIndex=function(e){for(var t=0,n=e.length;t<n;t++){var r=e.charCodeAt(t);if(32!==r&&9!==r)return t}return-1},t.getLeadingWhitespace=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=e.length);for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(32!==i&&9!==i)return e.substring(t,r)}return e.substring(t,n)},t.lastNonWhitespaceIndex=function(e,t){void 0===t&&(t=e.length-1);for(var n=t;n>=0;n--){var r=e.charCodeAt(n)
;if(32!==r&&9!==r)return n}return-1},t.compare=o,t.compareIgnoreCase=function(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){var i=e.charCodeAt(r),u=t.charCodeAt(r);if(i!==u){a(i)&&(i+=32),a(u)&&(u+=32);var c=i-u;if(0!==c)return s(i)&&s(u)?c:o(e.toLowerCase(),t.toLowerCase())}}return e.length<t.length?-1:e.length>t.length?1:0},t.isLowerAsciiLetter=s,t.isUpperAsciiLetter=a,t.equalsIgnoreCase=function(e,t){return(e?e.length:0)===(t?t.length:0)&&c(e,t)},t.startsWithIgnoreCase=function(e,t){var n=t.length;return!(t.length>e.length)&&c(e,t,n)},t.commonPrefixLength=function(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n++)if(e.charCodeAt(n)!==t.charCodeAt(n))return n;return r},t.commonSuffixLength=function(e,t){var n,r=Math.min(e.length,t.length),i=e.length-1,o=t.length-1;for(n=0;n<r;n++)if(e.charCodeAt(i-n)!==t.charCodeAt(o-n))return n;return r},t.overlap=function(e,t){var n=e.length,r=t.length,i=n-r;if(0===i)return e===t?n:0;for(i<0&&(r+=i,i=0);i<n&&r>0;){if(l(e,i,n,t,0,r))return r;r-=1,i+=1}
return 0},t.isHighSurrogate=function(e){return 55296<=e&&e<=56319},t.isLowSurrogate=function(e){return 56320<=e&&e<=57343};var h=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;t.containsRTL=function(e){return h.test(e)};var g=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEF8]|\uD83E[\uDD00-\uDDE6])/;t.containsEmoji=function(e){return g.test(e)};var v=/^[\t\n\r\x20-\x7E]*$/;t.isBasicASCII=function(e){return v.test(e)},t.containsFullWidthCharacter=function(e){
for(var t=0,n=e.length;t<n;t++)if(f(e.charCodeAt(t)))return!0;return!1},t.isFullWidthCharacter=f,t.lcut=function(e,n){if(e.length<n)return e;for(var r=/\b/g,i=0;r.test(e)&&!(e.length-r.lastIndex<n);)i=r.lastIndex,r.lastIndex+=1;return e.substring(i).replace(/^\s/,t.empty)};var m=/\x1B\x5B[12]?K/g,y=/\x1b\[\d+m/g,b=/\x1b\[0?m/g;t.removeAnsiEscapeCodes=function(e){return e&&(e=(e=(e=e.replace(m,"")).replace(y,"")).replace(b,"")),e},t.UTF8_BOM_CHARACTER=String.fromCharCode(65279),t.startsWithUTF8BOM=d,t.stripUTF8BOM=function(e){return d(e)?e.substr(1):e},t.safeBtoa=function(e){return btoa(encodeURIComponent(e))},t.repeat=function(e,t){for(var n="",r=0;r<t;r++)n+=e;return n},t.fuzzyContains=function(e,t){if(!e||!t)return!1;if(e.length<t.length)return!1;for(var n=t.length,r=e.toLowerCase(),i=0,o=-1;i<n;){var s=r.indexOf(t[i],o+1);if(s<0)return!1;o=s,i++}return!0},t.containsUppercaseCharacter=function(e,t){return void 0===t&&(t=!1),!!e&&(t&&(e=e.replace(/\\./g,"")),e.toLowerCase()!==e)},
t.uppercaseFirstLetter=function(e){return e.charAt(0).toUpperCase()+e.slice(1)}}),define(e[52],t([0,1,15]),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[31],t([0,1,8,15]),function(e,t,n,r){"use strict";function i(e,r){void 0===r&&(r=t.nativeSep);var o=~e.lastIndexOf("/")||~e.lastIndexOf("\\");if(0===o)return".";if(0==~o)return e[0];if(~o==e.length-1)return i(e.substring(0,e.length-1));var s=e.substring(0,~o);return n.isWindows&&":"===s[s.length-1]&&(s+=r),s}function o(e){var t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?e:~t==e.length-1?o(e.substring(0,e.length-1)):e.substr(1+~t)}function s(e,t){if(null===e||void 0===e)return e;var r=e.length;if(0===r)return".";var i=n.isWindows&&t;if(function(e,t){
return t?!d.test(e):!f.test(e)}(e,i))return e;for(var o=i?"\\":"/",s=u(e,o),c=s.length,l=!1,p="",h=s.length;h<=r;h++)if(h===r||47===e.charCodeAt(h)||92===e.charCodeAt(h)){if(a(e,c,h,"..")){var g=p.lastIndexOf(o),v=p.slice(g+1);(s||v.length>0)&&".."!==v&&(p=-1===g?"":p.slice(0,g),l=!0)}else a(e,c,h,".")&&(s||p||h<r-1)&&(l=!0);if(!l){var m=e.slice(c,h);""!==p&&p[p.length-1]!==o&&(p+=o),p+=m}c=h+1,l=!1}return s+p}function a(e,t,n,r){return t+r.length===n&&e.indexOf(r,t)===t}function u(e,t){if(void 0===t&&(t="/"),!e)return"";var n=e.length,r=e.charCodeAt(0);if(47===r||92===r){if((47===(r=e.charCodeAt(1))||92===r)&&47!==(r=e.charCodeAt(2))&&92!==r){for(var i=3,o=i;i<n&&(47!==(r=e.charCodeAt(i))&&92!==r);i++);if(r=e.charCodeAt(i+1),o!==i&&47!==r&&92!==r)for(i+=1;i<n;i++)if(47===(r=e.charCodeAt(i))||92===r)return e.slice(0,i+1).replace(/[\\/]/g,t)}return t}if((r>=65&&r<=90||r>=97&&r<=122)&&58===e.charCodeAt(1))return 47===(r=e.charCodeAt(2))||92===r?e.slice(0,2)+t:e.slice(0,2);var s=e.indexOf("://")
;if(-1!==s)for(s+=3;s<n;s++)if(47===(r=e.charCodeAt(s))||92===r)return e.slice(0,s+1);return""}function c(e){if(!e)return!1;var t=e.charCodeAt(0);if(47===t||92===t)return!0;if((t>=65&&t<=90||t>=97&&t<=122)&&e.length>2&&58===e.charCodeAt(1)){var n=e.charCodeAt(2);if(47===n||92===n)return!0}return!1}function l(e){return e&&47===e.charCodeAt(0)}Object.defineProperty(t,"__esModule",{value:!0}),t.sep="/",t.nativeSep=n.isWindows?"\\":"/",t.dirname=i,t.basename=o,t.extname=function(e){var t=~(e=o(e)).lastIndexOf(".");return t?e.substring(~t):""};var f=/(\/\.\.?\/)|(\/\.\.?)$|^(\.\.?\/)|(\/\/+)|(\\)/,d=/(\\\.\.?\\)|(\\\.\.?)$|^(\.\.?\\)|(\\\\+)|(\/)/;t.normalize=s,t.getRoot=u,t.join=function(){for(var e="",n=0;n<arguments.length;n++){var r=arguments[n];if(n>0){var i=e.charCodeAt(e.length-1);if(47!==i&&92!==i){var o=r.charCodeAt(0);47!==o&&92!==o&&(e+=t.sep)}}e+=r}return s(e)},t.isUNC=function(e){if(!n.isWindows)return!1;if(!e||e.length<5)return!1;var t=e.charCodeAt(0);if(92!==t)return!1
;if(92!==(t=e.charCodeAt(1)))return!1;for(var r=2,i=r;r<e.length&&92!==(t=e.charCodeAt(r));r++);return i!==r&&(t=e.charCodeAt(r+1),!isNaN(t)&&92!==t)};var p=n.isWindows?/[\\/:\*\?"<>\|]/g:/[\\/]/g,h=/^(con|prn|aux|clock\$|nul|lpt[0-9]|com[0-9])$/i;t.isValidBasename=function(e){return!(!e||0===e.length||/^\s+$/.test(e)||(p.lastIndex=0,p.test(e)||n.isWindows&&h.test(e)||"."===e||".."===e||n.isWindows&&"."===e[e.length-1]||n.isWindows&&e.length!==e.trim().length))},t.isEqual=function(e,t,n){var i=e===t;return!n||i?i:!(!e||!t)&&r.equalsIgnoreCase(e,t)},t.isEqualOrParent=function(e,n,i,o){if(void 0===o&&(o=t.nativeSep),e===n)return!0;if(!e||!n)return!1;if(n.length>e.length)return!1;if(i){if(!r.startsWithIgnoreCase(e,n))return!1;if(n.length===e.length)return!0;var s=n.length;return n.charAt(n.length-1)===o&&s--,e.charAt(s)===o}return n.charAt(n.length-1)!==o&&(n+=o),0===e.indexOf(n)},t.isAbsolute=function(e){return n.isWindows?c(e):l(e)},t.isAbsolute_win32=c,t.isAbsolute_posix=l}),
define(e[7],t([0,1]),function(e,t){"use strict";function n(e){return Array.isArray?Array.isArray(e):!(!e||typeof e.length!==c.number||e.constructor!==Array)}function r(e){return typeof e===c.string||e instanceof String}function i(e){return!(typeof e!==c.object||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function o(e){return typeof e===c.undefined}function s(e){return o(e)||null===e}function a(e){return typeof e===c.function}function u(e,t){if(r(t)){if(typeof e!==t)throw new Error("argument does not match constraint: typeof "+t)}else if(a(t)){if(e instanceof t)return;if(!s(e)&&e.constructor===t)return;if(1===t.length&&!0===t.call(void 0,e))return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}Object.defineProperty(t,"__esModule",{value:!0});var c={number:"number",string:"string",undefined:"undefined",object:"object",function:"function"};t.isArray=n,t.isString=r,
t.isStringArray=function(e){return n(e)&&e.every(function(e){return r(e)})},t.isObject=i,t.isNumber=function(e){return(typeof e===c.number||e instanceof Number)&&!isNaN(e)},t.isBoolean=function(e){return!0===e||!1===e},t.isUndefined=o,t.isUndefinedOrNull=s;var l=Object.prototype.hasOwnProperty;t.isEmptyObject=function(e){if(!i(e))return!1;for(var t in e)if(l.call(e,t))return!1;return!0},t.isFunction=a,t.areFunctions=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e&&e.length>0&&e.every(a)},t.validateConstraints=function(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++)u(e[r],t[r])},t.validateConstraint=u,t.create=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Object.create(e.prototype);return e.apply(r,t),r}}),define(e[100],t([0,1,7,103]),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.traverse=function(e,t,n){var r=this.lookup(e);r&&this._traverse(r,t,Object.create(null),n)},e.prototype._traverse=function(e,t,n,i){var o=this,s=this._hashFn(e.data);if(!n[s]){n[s]=!0,i(e.data);var a=t?e.outgoing:e.incoming;r.forEach(a,function(e){return o._traverse(e.value,t,n,i)})}},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)]},
Object.defineProperty(e.prototype,"length",{get:function(){return Object.keys(this._nodes).length},enumerable:!0,configurable:!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[9],t([0,1,7]),function(e,t,n){"use strict";function r(e){if(!e||"object"!=typeof e)return e;if(e instanceof RegExp)return e;var t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(function(n){e[n]&&"object"==typeof e[n]?t[n]=r(e[n]):t[n]=e[n]}),t}function i(e,t,r){if(n.isUndefinedOrNull(e))return e;var o=t(e);if(void 0!==o)return o;if(n.isArray(e)){for(var s=[],a=0;a<e.length;a++)s.push(i(e[a],t,r));return s}if(n.isObject(e)){if(r.indexOf(e)>=0)throw new Error("Cannot clone recursive data-structure");r.push(e);var c={};for(var l in e)u.call(e,l)&&(c[l]=i(e[l],t,r));return r.pop(),c}return e}function o(e,t,r){
return void 0===r&&(r=!0),n.isObject(e)?(n.isObject(t)&&Object.keys(t).forEach(function(i){i in e?r&&(n.isObject(e[i])&&n.isObject(t[i])?o(e[i],t[i],r):e[i]=t[i]):e[i]=t[i]}),e):t}function s(e,t){if(e===t)return!0;if(null===e||void 0===e||null===t||void 0===t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;var n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!s(e[n],t[n]))return!1}else{var i=[];for(r in e)i.push(r);i.sort();var o=[];for(r in t)o.push(r);if(o.sort(),!s(i,o))return!1;for(n=0;n<i.length;n++)if(!s(e[i[n]],t[i[n]]))return!1}return!0}function a(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=!0;return t}Object.defineProperty(t,"__esModule",{value:!0}),t.deepClone=r,t.deepFreeze=function(e){if(!e||"object"!=typeof e)return e;for(var t=[e];t.length>0;){var n=t.shift();Object.freeze(n);for(var r in n)if(u.call(n,r)){var i=n[r];"object"!=typeof i||Object.isFrozen(i)||t.push(i)}}return e}
;var u=Object.prototype.hasOwnProperty;t.cloneAndChange=function(e,t){return i(e,t,[])},t.mixin=o,t.assign=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.forEach(function(t){return Object.keys(t).forEach(function(n){return e[n]=t[n]})}),e},t.equals=s,t.arrayToHash=a,t.createKeywordMatcher=function(e,t){void 0===t&&(t=!1),t&&(e=e.map(function(e){return e.toLowerCase()}));var n=a(e);return t?function(e){return void 0!==n[e.toLowerCase()]&&n.hasOwnProperty(e.toLowerCase())}:function(e){return void 0!==n[e]&&n.hasOwnProperty(e)}},t.safeStringify=function(e){var t=[];return JSON.stringify(e,function(e,r){if(n.isObject(r)||Array.isArray(r)){if(-1!==t.indexOf(r))return"[Circular]";t.push(r)}return r})},t.getOrDefault=function(e,t,n){void 0===n&&(n=null);var r=t(e);return void 0===r?n:r},t.distinct=function(e,t){var n=Object.create(null);return e&&t?(Object.keys(t).forEach(function(r){var i=e[r],o=t[r];s(i,o)||(n[r]=o)}),n):n}});var n=this&&this.__extends||function(){
var 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])};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[17],t([0,1,8]),function(e,t,r){"use strict";function i(e,t){for(var n=void 0,r=-1,i=0;i<e.length;i++){var o=e.charCodeAt(i);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o)-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),void 0!==n&&(n+=e.charAt(i));else{void 0===n&&(n=e.substr(0,i));var s=v[o];void 0!==s?(-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),n+=s):-1===r&&(r=i)}}return-1!==r&&(n+=encodeURIComponent(e.substring(r))),void 0!==n?n:e}function o(e){var t
;return t=e.authority&&e.path.length>1&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?e.path[1].toLowerCase()+e.path.substr(2):e.path,r.isWindows&&(t=t.replace(/\//g,"\\")),t}function s(e,t){var n=t?function(e){for(var t=void 0,n=0;n<e.length;n++){var r=e.charCodeAt(n);35===r||63===r?(void 0===t&&(t=e.substr(0,n)),t+=v[r]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}:i,r="",o=e.scheme,s=e.authority,a=e.path,u=e.query,c=e.fragment;if(o&&(r+=o,r+=":"),(s||"file"===o)&&(r+=d,r+=d),s){var l=s.indexOf("@");if(-1!==l){var f=s.substr(0,l);s=s.substr(l+1),-1===(l=f.indexOf(":"))?r+=n(f,!1):(r+=n(f.substr(0,l),!1),r+=":",r+=n(f.substr(l+1),!1)),r+="@"}-1===(l=(s=s.toLowerCase()).indexOf(":"))?r+=n(s,!1):(r+=n(s.substr(0,l),!1),r+=s.substr(l))}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2)){
(p=a.charCodeAt(1))>=65&&p<=90&&(a="/"+String.fromCharCode(p+32)+":"+a.substr(3))}else if(a.length>=2&&58===a.charCodeAt(1)){var p=a.charCodeAt(0);p>=65&&p<=90&&(a=String.fromCharCode(p+32)+":"+a.substr(2))}r+=n(a,!0)}return u&&(r+="?",r+=n(u,!1)),c&&(r+="#",r+=t?c:i(c,!1)),r}Object.defineProperty(t,"__esModule",{value:!0});var a,u=/^\w[\w\d+.-]*$/,c=/^\//,l=/^\/\//,f="",d="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,h=function(){function e(e,t,n,r,i){"object"==typeof e?(this.scheme=e.scheme||f,this.authority=e.authority||f,this.path=e.path||f,this.query=e.query||f,this.fragment=e.fragment||f):(this.scheme=e||f,this.authority=t||f,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==d&&(t=d+t):t=d}return t}(this.scheme,n||f),this.query=r||f,this.fragment=i||f,function(e){if(e.scheme||console.warn('[UriError]: Scheme is missing: {scheme: "", authority: "'+e.authority+'", path: "'+e.path+'", query: "'+e.query+'", fragment: "'+e.fragment+'"}'),
e.scheme&&!u.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!c.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(l.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this))}return e.isUri=function(t){return t instanceof e||!!t&&("string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme)},Object.defineProperty(e.prototype,"fsPath",{get:function(){return o(this)},enumerable:!0,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,n=e.authority,r=e.path,i=e.query,o=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=f),void 0===n?n=this.authority:null===n&&(n=f),void 0===r?r=this.path:null===r&&(r=f),
void 0===i?i=this.query:null===i&&(i=f),void 0===o?o=this.fragment:null===o&&(o=f),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&o===this.fragment?this:new g(t,n,r,i,o)},e.parse=function(e){var t=p.exec(e);return t?new g(t[2]||f,decodeURIComponent(t[4]||f),decodeURIComponent(t[5]||f),decodeURIComponent(t[7]||f),decodeURIComponent(t[9]||f)):new g(f,f,f,f,f)},e.file=function(e){var t=f;if(r.isWindows&&(e=e.replace(/\\/g,d)),e[0]===d&&e[1]===d){var n=e.indexOf(d,2);-1===n?(t=e.substring(2),e=d):(t=e.substring(2,n),e=e.substring(n)||d)}return new g("file",t,e,f,f)},e.from=function(e){return new g(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),s(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var n=new g(t);return n._fsPath=t.fsPath,n._formatted=t.external,n}return t},e}();t.URI=h,t.default=h;var g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this
;return t._formatted=null,t._fsPath=null,t}return n(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=o(this)),this._fsPath},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?s(this,!0):(this._formatted||(this._formatted=s(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e},t}(h),v=(a={},a[58]="%3A",a[47]="%2F",a[63]="%3F",a[35]="%23",a[91]="%5B",a[93]="%5D",a[64]="%40",a[33]="%21",a[36]="%24",a[38]="%26",a[39]="%27",a[40]="%28",a[41]="%29",a[42]="%2A",a[43]="%2B",a[44]="%2C",a[59]="%3B",a[61]="%3D",a[32]="%20",a)}),define(e[30],t([0,1,17]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),
t.getPathFromAmdModule=function(e,t){return n.default.parse(e.toUrl(t)).fsPath}}),define(e[29],t([0,1,17]),function(e,t,r){"use strict";function i(e){var t=[];return e.forEach(function(e){return t.push(e)}),t}function o(e){var t=[];return e.forEach(function(e,n){return t.push(n)}),t}Object.defineProperty(t,"__esModule",{value:!0}),t.values=i,t.keys=o,t.getOrSet=function(e,t,n){var r=e.get(t);return void 0===r&&(r=n,e.set(t,r)),r};var s=function(){function e(){this._value="",this._pos=0}return e.prototype.reset=function(e){return this._value=e,this._pos=0,this},e.prototype.next=function(){return this._pos+=1,this},e.prototype.hasNext=function(){return this._pos<this._value.length-1},e.prototype.cmp=function(e){return e.charCodeAt(0)-this._value.charCodeAt(this._pos)},e.prototype.value=function(){return this._value[this._pos]},e}();t.StringIterator=s;var a=function(){function e(){}return e.prototype.reset=function(e){return this._value=e.replace(/\\$|\/$/,""),this._from=0,this._to=0,this.next()},
e.prototype.hasNext=function(){return this._to<this._value.length},e.prototype.next=function(){this._from=this._to;for(var e=!0;this._to<this._value.length;this._to++){var t=this._value.charCodeAt(this._to);if(47===t||92===t){if(!e)break;this._from++}else e=!1}return this},e.prototype.cmp=function(e){for(var t=0,n=e.length,r=this._from;t<n&&r<this._to;){var i=e.charCodeAt(t)-this._value.charCodeAt(r);if(0!==i)return i;t+=1,r+=1}return n===this._to-this._from?0:t<n?-1:1},e.prototype.value=function(){return this._value.substring(this._from,this._to)},e}();t.PathIterator=a;var u=function(){function e(){}return e.prototype.isEmpty=function(){return!(this.left||this.mid||this.right||this.value)},e}(),c=function(){function e(e){this._iter=e}return e.forPaths=function(){return new e(new a)},e.forStrings=function(){return new e(new s)},e.prototype.clear=function(){this._root=void 0},e.prototype.set=function(e,t){var n,r=this._iter.reset(e);for(this._root||(this._root=new u,this._root.segment=r.value()),
n=this._root;;){var i=r.cmp(n.segment);if(i>0)n.left||(n.left=new u,n.left.segment=r.value()),n=n.left;else if(i<0)n.right||(n.right=new u,n.right.segment=r.value()),n=n.right;else{if(!r.hasNext())break;r.next(),n.mid||(n.mid=new u,n.mid.segment=r.value()),n=n.mid}}var o=n.value;return n.value=t,n.key=e,o},e.prototype.get=function(e){for(var t=this._iter.reset(e),n=this._root;n;){var r=t.cmp(n.segment);if(r>0)n=n.left;else if(r<0)n=n.right;else{if(!t.hasNext())break;t.next(),n=n.mid}}return n?n.value:void 0},e.prototype.delete=function(e){for(var t=this._iter.reset(e),n=[],r=this._root;r;){var i=t.cmp(r.segment);if(i>0)n.push([1,r]),r=r.left;else if(i<0)n.push([-1,r]),r=r.right;else{if(!t.hasNext()){for(r.value=void 0;n.length>0&&r.isEmpty();){var o=n.pop(),s=o[0],a=o[1];switch(s){case 1:a.left=void 0;break;case 0:a.mid=void 0;break;case-1:a.right=void 0}r=a}break}t.next(),n.push([0,r]),r=r.mid}}},e.prototype.findSubstr=function(e){for(var t,n=this._iter.reset(e),r=this._root;r;){var i=n.cmp(r.segment)
;if(i>0)r=r.left;else if(i<0)r=r.right;else{if(!n.hasNext())break;n.next(),t=r.value||t,r=r.mid}}return r&&r.value||t},e.prototype.findSuperstr=function(e){for(var t=this._iter.reset(e),n=this._root;n;){var r=t.cmp(n.segment);if(r>0)n=n.left;else if(r<0)n=n.right;else{if(!t.hasNext())return n.mid?this._nodeIterator(n.mid):void 0;t.next(),n=n.mid}}},e.prototype._nodeIterator=function(e){var t,n,r=this,i={done:!1,value:void 0};return{next:function(){return n||(n=[],t=0,r._forEach(e,function(e){return n.push(e)})),t>=n.length?(i.done=!0,i.value=void 0):(i.done=!1,i.value=n[t++]),i}}},e.prototype.forEach=function(e){this._forEach(this._root,e)},e.prototype._forEach=function(e,t){e&&(this._forEach(e.left,t),e.value&&t(e.value,e.key),this._forEach(e.mid,t),this._forEach(e.right,t))},e}();t.TernarySearchTree=c;var l=function(){function e(){this.map=new Map,this.ignoreCase=!1}return e.prototype.set=function(e,t){this.map.set(this.toKey(e),t)},e.prototype.get=function(e){return this.map.get(this.toKey(e))},
e.prototype.has=function(e){return this.map.has(this.toKey(e))},Object.defineProperty(e.prototype,"size",{get:function(){return this.map.size},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this.map.clear()},e.prototype.delete=function(e){return this.map.delete(this.toKey(e))},e.prototype.forEach=function(e){this.map.forEach(e)},e.prototype.values=function(){return i(this.map)},e.prototype.toKey=function(e){var t=e.toString();return this.ignoreCase&&(t=t.toLowerCase()),t},e.prototype.keys=function(){return o(this.map).map(r.default.parse)},e.prototype.clone=function(){var t=new e;return this.map.forEach(function(e,n){return t.map.set(n,e)}),t},e}();t.ResourceMap=l;var f;!function(e){e[e.None=0]="None",e[e.AsOld=1]="AsOld",e[e.AsNew=2]="AsNew"}(f=t.Touch||(t.Touch={}));var d=function(){function e(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}return e.prototype.clear=function(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0},
e.prototype.isEmpty=function(){return!this._head&&!this._tail},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.get=function(e,t){void 0===t&&(t=f.None);var n=this._map.get(e);if(n)return t!==f.None&&this.touch(n,t),n.value},e.prototype.set=function(e,t,n){void 0===n&&(n=f.None);var r=this._map.get(e);if(r)r.value=t,n!==f.None&&this.touch(r,n);else{switch(r={key:e,value:t,next:void 0,previous:void 0},n){case f.None:this.addItemLast(r);break;case f.AsOld:this.addItemFirst(r);break;case f.AsNew:default:this.addItemLast(r)}this._map.set(e,r),this._size++}},e.prototype.delete=function(e){return!!this.remove(e)},e.prototype.remove=function(e){var t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value},e.prototype.shift=function(){if(this._head||this._tail){if(!this._head||!this._tail)throw new Error("Invalid list");var e=this._head
;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}},e.prototype.forEach=function(e,t){for(var n=this._head;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.next},e.prototype.values=function(){for(var e=[],t=this._head;t;)e.push(t.value),t=t.next;return e},e.prototype.keys=function(){for(var e=[],t=this._head;t;)e.push(t.key),t=t.next;return e},e.prototype.trimOld=function(e){if(!(e>=this.size))if(0!==e){for(var t=this._head,n=this.size;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t.previous=void 0}else this.clear()},e.prototype.addItemFirst=function(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e},e.prototype.addItemLast=function(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e},e.prototype.removeItem=function(e){
if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head)this._head=e.next;else if(e===this._tail)this._tail=e.previous;else{var t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}},e.prototype.touch=function(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===f.AsOld||t===f.AsNew)if(t===f.AsOld){if(e===this._head)return;var n=e.next,r=e.previous;e===this._tail?(r.next=void 0,this._tail=r):(n.previous=r,r.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e}else if(t===f.AsNew){if(e===this._tail)return;var n=e.next,r=e.previous;e===this._head?(n.previous=void 0,this._head=n):(n.previous=r,r.next=n),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e}},e.prototype.toJSON=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),e},e.prototype.fromJSON=function(e){this.clear();for(var t=0,n=e;t<n.length;t++){var r=n[t],i=r[0],o=r[1];this.set(i,o)}},e}();t.LinkedMap=d
;var p=function(e){function t(t,n){void 0===n&&(n=1);var r=e.call(this)||this;return r._limit=t,r._ratio=Math.min(Math.max(0,n),1),r}return n(t,e),Object.defineProperty(t.prototype,"limit",{get:function(){return this._limit},set:function(e){this._limit=e,this.checkTrim()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ratio",{get:function(){return this._ratio},set:function(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()},enumerable:!0,configurable:!0}),t.prototype.get=function(t){return e.prototype.get.call(this,t,f.AsNew)},t.prototype.peek=function(t){return e.prototype.get.call(this,t,f.None)},t.prototype.set=function(t,n){e.prototype.set.call(this,t,n,f.AsNew),this.checkTrim()},t.prototype.checkTrim=function(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))},t}(d);t.LRUCache=p}),define(e[81],t([0,1,29]),function(e,t,n){"use strict";function r(e,n,r){if(!t.canNormalize||!e)return e;var i=r.get(e);if(i)return i;var o;return o=s.test(e)?e.normalize(n):e,
r.set(e,o),o}Object.defineProperty(t,"__esModule",{value:!0}),t.canNormalize="function"==typeof"".normalize;var i=new n.LRUCache(1e4);t.normalizeNFC=function(e){return r(e,"NFC",i)};var o=new n.LRUCache(1e4);t.normalizeNFD=function(e){return r(e,"NFD",o)};var s=/[^\u0000-\u0080]/}),define(e[96],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultURITransformer={transformIncoming:function(e){return e},transformOutgoing:function(e){return e}}}),define(e[24],t([0,1]),function(e,t){"use strict";function r(){return new s}function i(e){return a.test(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){this._value=e}return e.prototype.asHex=function(){return this._value},e}(),s=function(e){function t(){
return e.call(this,[t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-","4",t._randomHex(),t._randomHex(),t._randomHex(),"-",t._oneOf(t._timeHighBits),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex()].join(""))||this}return n(t,e),t._oneOf=function(e){return e[Math.floor(e.length*Math.random())]},t._randomHex=function(){return t._oneOf(t._chars)},t._chars=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],t._timeHighBits=["8","9","a","b"],t}(o);t.v4=r;var a=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;t.isUUID=i,t.parse=function(e){if(!i(e))throw new Error("invalid uuid");return new o(e)},t.generateUuid=function(){return r().asHex()}});var r;!function(){
var e=Object.create(null);e["WinJS/Core/_WinJS"]={};var t=function(t,n,r){var i={},o=!1,s=n.map(function(t){return"exports"===t?(o=!0,i):e[t]}),a=r.apply({},s);e[t]=o?i:a};t("WinJS/Core/_Global",[],function(){"use strict";return"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:{}}),t("WinJS/Core/_BaseCoreUtils",["WinJS/Core/_Global"],function(e){"use strict";var t=null;return{hasWinRT:!!e.Windows,markSupportedForProcessing:function(e){return e.supportedForProcessing=!0,e},_setImmediate:function(n){null===t&&(t=e.setImmediate?e.setImmediate.bind(e):"undefined"!=typeof process&&"function"==typeof process.nextTick?process.nextTick.bind(process):e.setTimeout.bind(e)),t(n)}}}),t("WinJS/Core/_WriteProfilerMark",["WinJS/Core/_Global"],function(e){"use strict";return e.msWriteProfilerMark||function(){}}),t("WinJS/Core/_Base",["WinJS/Core/_WinJS","WinJS/Core/_Global","WinJS/Core/_BaseCoreUtils","WinJS/Core/_WriteProfilerMark"],function(e,t,n,r){"use strict"
;function i(e,t,n){var r,i,o,s=Object.keys(t),a=Array.isArray(e);for(i=0,o=s.length;i<o;i++){var u=s[i],c=95!==u.charCodeAt(0),l=t[u];!l||"object"!=typeof l||void 0===l.value&&"function"!=typeof l.get&&"function"!=typeof l.set?c?a?e.forEach(function(e){e[u]=l}):e[u]=l:(r=r||{})[u]={value:l,enumerable:c,configurable:!0,writable:!0}:(void 0===l.enumerable&&(l.enumerable=c),n&&l.setName&&"function"==typeof l.setName&&l.setName(n+"."+u),(r=r||{})[u]=l)}r&&(a?e.forEach(function(e){Object.defineProperties(e,r)}):Object.defineProperties(e,r))}return function(){function n(n,r){var i=n||{};if(r){var o=r.split(".");i===t&&"WinJS"===o[0]&&(i=e,o.splice(0,1));for(var s=0,a=o.length;s<a;s++){var u=o[s];i[u]||Object.defineProperty(i,u,{value:{},writable:!1,enumerable:!0,configurable:!0}),i=i[u]}}return i}function o(e,t,r){var o=n(e,t);return r&&i(o,r,t||"<ANONYMOUS>"),o}var s=e;s.Namespace||(s.Namespace=Object.create(Object.prototype));var a={uninitialized:1,working:2,initialized:3};Object.defineProperties(s.Namespace,{
defineWithParent:{value:o,writable:!0,enumerable:!0,configurable:!0},define:{value:function(e,n){return o(t,e,n)},writable:!0,enumerable:!0,configurable:!0},_lazy:{value:function(e){var t,n,i=a.uninitialized;return{setName:function(e){t=e},get:function(){switch(i){case a.initialized:return n;case a.uninitialized:i=a.working;try{r("WinJS.Namespace._lazy:"+t+",StartTM"),n=e()}finally{r("WinJS.Namespace._lazy:"+t+",StopTM"),i=a.uninitialized}return e=null,i=a.initialized,n;case a.working:throw"Illegal: reentrancy on initialization";default:throw"Illegal"}},set:function(e){switch(i){case a.working:throw"Illegal: reentrancy on initialization";default:i=a.initialized,n=e}},enumerable:!0,configurable:!0}},writable:!0,enumerable:!0,configurable:!0},_moduleDefine:{value:function(e,r,o){var s=[e],a=null;return r&&(a=n(t,r),s.push(a)),i(s,o,r||"<ANONYMOUS>"),a},writable:!0,enumerable:!0,configurable:!0}})}(),function(){function t(e,t,r){return e=e||function(){},n.markSupportedForProcessing(e),t&&i(e.prototype,t),
r&&i(e,r),e}e.Namespace.define("WinJS.Class",{define:t,derive:function(e,r,o,s){if(e){r=r||function(){};var a=e.prototype;return r.prototype=Object.create(a),n.markSupportedForProcessing(r),Object.defineProperty(r.prototype,"constructor",{value:r,writable:!0,configurable:!0,enumerable:!0}),o&&i(r.prototype,o),s&&i(r,s),r}return t(r,o,s)},mix:function(e){e=e||function(){};var t,n;for(t=1,n=arguments.length;t<n;t++)i(e.prototype,arguments[t]);return e}})}(),{Namespace:e.Namespace,Class:e.Class}}),t("WinJS/Core/_ErrorFromName",["WinJS/Core/_Base"],function(e){"use strict";var t=e.Class.derive(Error,function(e,t){this.name=e,this.message=t||e},{},{supportedForProcessing:!1});return e.Namespace.define("WinJS",{ErrorFromName:t}),t}),t("WinJS/Core/_Events",["exports","WinJS/Core/_Base"],function(e,t){"use strict";function n(e){var t="_on"+e+"state";return{get:function(){var e=this[t];return e&&e.userHandler},set:function(n){var r=this[t];n?(r||(r={wrapper:function(e){return r.userHandler(e)},userHandler:n},
Object.defineProperty(this,t,{value:r,enumerable:!1,writable:!0,configurable:!0}),this.addEventListener(e,r.wrapper,!1)),r.userHandler=n):r&&(this.removeEventListener(e,r.wrapper,!1),this[t]=null)},enumerable:!0}}var r=t.Class.define(function(e,t,n){this.detail=t,this.target=n,this.timeStamp=Date.now(),this.type=e},{bubbles:{value:!1,writable:!1},cancelable:{value:!1,writable:!1},currentTarget:{get:function(){return this.target}},defaultPrevented:{get:function(){return this._preventDefaultCalled}},trusted:{value:!1,writable:!1},eventPhase:{value:0,writable:!1},target:null,timeStamp:null,type:null,preventDefault:function(){this._preventDefaultCalled=!0},stopImmediatePropagation:function(){this._stopImmediatePropagationCalled=!0},stopPropagation:function(){}},{supportedForProcessing:!1}),i={_listeners:null,addEventListener:function(e,t,n){n=n||!1,this._listeners=this._listeners||{};for(var r=this._listeners[e]=this._listeners[e]||[],i=0,o=r.length;i<o;i++){var s=r[i];if(s.useCapture===n&&s.listener===t)return}
r.push({listener:t,useCapture:n})},dispatchEvent:function(e,t){var n=this._listeners&&this._listeners[e];if(n){for(var i=new r(e,t,this),o=0,s=(n=n.slice(0,n.length)).length;o<s&&!i._stopImmediatePropagationCalled;o++)n[o].listener(i);return i.defaultPrevented||!1}return!1},removeEventListener:function(e,t,n){n=n||!1;var r=this._listeners&&this._listeners[e];if(r)for(var i=0,o=r.length;i<o;i++){var s=r[i];if(s.listener===t&&s.useCapture===n){r.splice(i,1),0===r.length&&delete this._listeners[e];break}}}};t.Namespace._moduleDefine(e,"WinJS.Utilities",{_createEventProperty:n,createEventProperties:function(){for(var e={},t=0,r=arguments.length;t<r;t++){var i=arguments[t];e["on"+i]=n(i)}return e},eventMixin:i})}),t("WinJS/Core/_Trace",["WinJS/Core/_Global"],function(e){"use strict";function t(e){return e}return{_traceAsyncOperationStarting:e.Debug&&e.Debug.msTraceAsyncOperationStarting&&e.Debug.msTraceAsyncOperationStarting.bind(e.Debug)||t,
_traceAsyncOperationCompleted:e.Debug&&e.Debug.msTraceAsyncOperationCompleted&&e.Debug.msTraceAsyncOperationCompleted.bind(e.Debug)||t,_traceAsyncCallbackStarting:e.Debug&&e.Debug.msTraceAsyncCallbackStarting&&e.Debug.msTraceAsyncCallbackStarting.bind(e.Debug)||t,_traceAsyncCallbackCompleted:e.Debug&&e.Debug.msTraceAsyncCallbackCompleted&&e.Debug.msTraceAsyncCallbackCompleted.bind(e.Debug)||t}}),t("WinJS/Promise/_StateMachine",["WinJS/Core/_Global","WinJS/Core/_BaseCoreUtils","WinJS/Core/_Base","WinJS/Core/_ErrorFromName","WinJS/Core/_Events","WinJS/Core/_Trace"],function(e,t,n,r,i,o){"use strict";function s(){}function a(e,t){var n;n=t&&"object"==typeof t&&"function"==typeof t.then?D:F,e._value=t,e._setState(n)}function u(e,t,n,r,i,o){return{exception:e,error:t,promise:n,handler:o,id:r,parent:i}}function c(e,t,n,r){var i=n._isException,o=n._errorId;return u(i?t:null,i?null:t,e,o,n,r)}function l(e,t,n){var r=n._isException,i=n._errorId;return _(e,i,r),u(r?t:null,r?null:t,e,i,n)}function f(e,t){var n=++U
;return _(e,n),u(null,t,e,n)}function d(e,t){var n=++U;return _(e,n,!0),u(t,null,e,n)}function p(e,t,n,r){b(e,{c:t,e:n,p:r,asyncOpID:o._traceAsyncOperationStarting("WinJS.Promise.done")})}function h(e,t,n,r){e._value=t,m(e,t,n,r),e._setState(M)}function g(t,n){var r=t._value,i=t._listeners;if(i){t._listeners=null;var s,a;for(s=0,a=Array.isArray(i)?i.length:1;s<a;s++){var u=1===a?i:i[s],c=u.c,l=u.promise;if(o._traceAsyncOperationCompleted(u.asyncOpID,e.Debug&&e.Debug.MS_ASYNC_OP_STATUS_SUCCESS),l){o._traceAsyncCallbackStarting(u.asyncOpID);try{l._setCompleteValue(c?c(r):r)}catch(e){l._setExceptionValue(e)}finally{o._traceAsyncCallbackCompleted()}l._state!==D&&l._listeners&&n.push(l)}else H.prototype.done.call(t,c)}}}function v(t,n){var r=t._value,i=t._listeners;if(i){t._listeners=null;var s,a;for(s=0,a=Array.isArray(i)?i.length:1;s<a;s++){var u=1===a?i:i[s],l=u.e,f=u.promise,d=e.Debug&&(r&&r.name===P?e.Debug.MS_ASYNC_OP_STATUS_CANCELED:e.Debug.MS_ASYNC_OP_STATUS_ERROR)
;if(o._traceAsyncOperationCompleted(u.asyncOpID,d),f){var p=!1;try{l?(o._traceAsyncCallbackStarting(u.asyncOpID),p=!0,l.handlesOnError||m(f,r,c,t,l),f._setCompleteValue(l(r))):f._setChainedErrorValue(r,t)}catch(e){f._setExceptionValue(e)}finally{p&&o._traceAsyncCallbackCompleted()}f._state!==D&&f._listeners&&n.push(f)}else q.prototype.done.call(t,null,l)}}}function m(e,t,n,r,i){if(S._listeners[x]){if(t instanceof Error&&t.message===P)return;S.dispatchEvent(x,n(e,t,r,i))}}function y(e,t){var n=e._listeners;if(n){var r,i;for(r=0,i=Array.isArray(n)?n.length:1;r<i;r++){var o=1===i?n:n[r],s=o.p;if(s)try{s(t)}catch(e){}o.c||o.e||!o.promise||o.promise._progress(t)}}}function b(e,t){var n=e._listeners;n?(n=Array.isArray(n)?n:[n]).push(t):n=t,e._listeners=n}function _(e,t,n){e._isException=n||!1,e._errorId=t}function E(e,t,n,r){e._value=t,m(e,t,n,r),e._setState(N)}function w(e,t){var n;n=t&&"object"==typeof t&&"function"==typeof t.then?D:R,e._value=t,e._setState(n)}function C(e,t,n,r){var i=new z(e);return b(e,{
promise:i,c:t,e:n,p:r,asyncOpID:o._traceAsyncOperationStarting("WinJS.Promise.then")}),i}e.Debug&&(e.Debug.setNonUserCodeExceptions=!0);var S=new(n.Class.mix(n.Class.define(null,{},{supportedForProcessing:!1}),i.eventMixin));S._listeners={};var x="error",P="Canceled",O=!1,k={promise:1,thenPromise:2,errorPromise:4,exceptionPromise:8,completePromise:16};k.all=k.promise|k.thenPromise|k.errorPromise|k.exceptionPromise|k.completePromise;var T,I,D,L,j,A,F,R,M,N,U=1;T={name:"created",enter:function(e){e._setState(I)},cancel:s,done:s,then:s,_completed:s,_error:s,_notify:s,_progress:s,_setCompleteValue:s,_setErrorValue:s},I={name:"working",enter:s,cancel:function(e){e._setState(j)},done:p,then:C,_completed:a,_error:h,_notify:s,_progress:y,_setCompleteValue:w,_setErrorValue:E},D={name:"waiting",enter:function(e){var t=e._value;if(t instanceof z&&t._state!==N&&t._state!==R)b(t,{promise:e});else{var n=function(r){t._errorId?e._chainedError(r,t):(m(e,r,c,t,n),e._error(r))};n.handlesOnError=!0,
t.then(e._completed.bind(e),n,e._progress.bind(e))}},cancel:function(e){e._setState(L)},done:p,then:C,_completed:a,_error:h,_notify:s,_progress:y,_setCompleteValue:w,_setErrorValue:E},L={name:"waiting_canceled",enter:function(e){e._setState(A);var t=e._value;t.cancel&&t.cancel()},cancel:s,done:p,then:C,_completed:a,_error:h,_notify:s,_progress:y,_setCompleteValue:w,_setErrorValue:E},j={name:"canceled",enter:function(e){e._setState(A),e._cancelAction()},cancel:s,done:p,then:C,_completed:a,_error:h,_notify:s,_progress:y,_setCompleteValue:w,_setErrorValue:E},A={name:"canceling",enter:function(e){var t=new Error(P);t.name=t.message,e._value=t,e._setState(M)},cancel:s,done:s,then:s,_completed:s,_error:s,_notify:s,_progress:s,_setCompleteValue:s,_setErrorValue:s},F={name:"complete_notify",enter:function(e){if(e.done=H.prototype.done,e.then=H.prototype.then,e._listeners)for(var t,n=[e];n.length;)(t=n.shift())._state._notify(t,n);e._setState(R)},cancel:s,done:null,then:null,_completed:s,_error:s,_notify:g,
_progress:s,_setCompleteValue:s,_setErrorValue:s},R={name:"success",enter:function(e){e.done=H.prototype.done,e.then=H.prototype.then,e._cleanupAction()},cancel:s,done:null,then:null,_completed:s,_error:s,_notify:g,_progress:s,_setCompleteValue:s,_setErrorValue:s},M={name:"error_notify",enter:function(e){if(e.done=q.prototype.done,e.then=q.prototype.then,e._listeners)for(var t,n=[e];n.length;)(t=n.shift())._state._notify(t,n);e._setState(N)},cancel:s,done:null,then:null,_completed:s,_error:s,_notify:v,_progress:s,_setCompleteValue:s,_setErrorValue:s},N={name:"error",enter:function(e){e.done=q.prototype.done,e.then=q.prototype.then,e._cleanupAction()},cancel:s,done:null,then:null,_completed:s,_error:s,_notify:v,_progress:s,_setCompleteValue:s,_setErrorValue:s};var W,B=n.Class.define(null,{_listeners:null,_nextState:null,_state:null,_value:null,cancel:function(){this._state.cancel(this),this._run()},done:function(e,t,n){this._state.done(this,e,t,n)},then:function e(t,n,r){
if(this.then===e)return this._state.then(this,t,n,r);this.then(t,n,r)},_chainedError:function(e,t){var n=this._state._error(this,e,l,t);return this._run(),n},_completed:function(e){var t=this._state._completed(this,e);return this._run(),t},_error:function(e){var t=this._state._error(this,e,f);return this._run(),t},_progress:function(e){this._state._progress(this,e)},_setState:function(e){this._nextState=e},_setCompleteValue:function(e){this._state._setCompleteValue(this,e),this._run()},_setChainedErrorValue:function(e,t){var n=this._state._setErrorValue(this,e,l,t);return this._run(),n},_setExceptionValue:function(e){var t=this._state._setErrorValue(this,e,d);return this._run(),t},_run:function(){for(;this._nextState;)this._state=this._nextState,this._nextState=null,this._state.enter(this)}},{supportedForProcessing:!1}),z=n.Class.derive(B,function(e){O&&(!0===O||O&k.thenPromise)&&(this._stack=G._getStack()),this._creator=e,this._setState(T),this._run()},{_creator:null,_cancelAction:function(){
this._creator&&this._creator.cancel()},_cleanupAction:function(){this._creator=null}},{supportedForProcessing:!1}),q=n.Class.define(function(e){O&&(!0===O||O&k.errorPromise)&&(this._stack=G._getStack()),this._value=e,m(this,e,f)},{cancel:function(){},done:function(e,t){var n=this._value;if(t)try{t.handlesOnError||m(null,n,c,this,t);var r=t(n);return void(r&&"object"==typeof r&&"function"==typeof r.done&&r.done())}catch(e){n=e}n instanceof Error&&n.message===P||G._doneHandler(n)},then:function(e,t){if(!t)return this;var n,r=this._value;try{t.handlesOnError||m(null,r,c,this,t),n=new H(t(r))}catch(e){n=e===r?this:new V(e)}return n}},{supportedForProcessing:!1}),V=n.Class.derive(q,function(e){O&&(!0===O||O&k.exceptionPromise)&&(this._stack=G._getStack()),this._value=e,m(this,e,d)},{},{supportedForProcessing:!1}),H=n.Class.define(function(e){if(O&&(!0===O||O&k.completePromise)&&(this._stack=G._getStack()),e&&"object"==typeof e&&"function"==typeof e.then){var t=new z(null);return t._setCompleteValue(e),t}
this._value=e},{cancel:function(){},done:function(e){if(e)try{var t=e(this._value);t&&"object"==typeof t&&"function"==typeof t.done&&t.done()}catch(e){G._doneHandler(e)}},then:function(e){try{var t=e?e(this._value):this._value;return t===this._value?this:new H(t)}catch(e){return new V(e)}}},{supportedForProcessing:!1}),G=n.Class.derive(B,function(e,t){O&&(!0===O||O&k.promise)&&(this._stack=G._getStack()),this._oncancel=t,this._setState(T),this._run();try{e(this._completed.bind(this),this._error.bind(this),this._progress.bind(this))}catch(e){this._setExceptionValue(e)}},{_oncancel:null,_cancelAction:function(){try{if(!this._oncancel)throw new Error("Promise did not implement oncancel");this._oncancel()}catch(e){e.message,e.stack;S.dispatchEvent("error",e)}},_cleanupAction:function(){this._oncancel=null}},{addEventListener:function(e,t,n){S.addEventListener(e,t,n)},any:function(e){return new G(function(t,n){var r=Object.keys(e);0===r.length&&t();var i=0;r.forEach(function(o){G.as(e[o]).then(function(){t({key:o,
value:e[o]})},function(s){s instanceof Error&&s.name===P?++i===r.length&&t(G.cancel):n({key:o,value:e[o]})})})},function(){Object.keys(e).forEach(function(t){var n=G.as(e[t]);"function"==typeof n.cancel&&n.cancel()})})},as:function(e){return e&&"object"==typeof e&&"function"==typeof e.then?e:new H(e)},cancel:{get:function(){return W=W||new q(new r(P))}},dispatchEvent:function(e,t){return S.dispatchEvent(e,t)},is:function(e){return e&&"object"==typeof e&&"function"==typeof e.then},join:function(e){return new G(function(t,n,r){var i=Object.keys(e),o=Array.isArray(e)?[]:{},s=Array.isArray(e)?[]:{},a=0,u=i.length,c=function(e){if(0==--u){var a=Object.keys(o).length;if(0===a)t(s);else{var c=0;i.forEach(function(e){var t=o[e];t instanceof Error&&t.name===P&&c++}),c===a?t(G.cancel):n(o)}}else r({Key:e,Done:!0})};i.forEach(function(t){var n=e[t];void 0===n?a++:G.then(n,function(e){s[t]=e,c(t)},function(e){o[t]=e,c(t)})}),0!==(u-=a)||t(s)},function(){Object.keys(e).forEach(function(t){var n=G.as(e[t])
;"function"==typeof n.cancel&&n.cancel()})})},removeEventListener:function(e,t,n){S.removeEventListener(e,t,n)},supportedForProcessing:!1,then:function(e,t,n,r){return G.as(e).then(t,n,r)},thenEach:function(e,t,n,r){var i=Array.isArray(e)?[]:{};return Object.keys(e).forEach(function(o){i[o]=G.as(e[o]).then(t,n,r)}),G.join(i)},timeout:function(n,r){var i=function(n){var r;return new G(function(i){n?r=e.setTimeout(i,n):t._setImmediate(i)},function(){r&&e.clearTimeout(r)})}(n);return r?function(e,t){var n=function(){e.cancel()};return e.then(function(){t.cancel()}),t.then(n,n),t}(i,r):i},wrap:function(e){return new H(e)},wrapError:function(e){return new q(e)},_veryExpensiveTagWithStack:{get:function(){return O},set:function(e){O=e}},_veryExpensiveTagWithStack_tag:k,_getStack:function(){if(e.Debug&&e.Debug.debuggerEnabled)try{throw new Error}catch(e){return e.stack}},_cancelBlocker:function(e,t){if(!G.is(e))return G.wrap(e);var n,r,i=new G(function(e,t){n=e,r=t},function(){n=null,r=null,t&&t()})
;return e.then(function(e){n&&n(e)},function(e){r&&r(e)}),i}});return Object.defineProperties(G,i.createEventProperties(x)),G._doneHandler=function(e){t._setImmediate(function(){throw e})},{PromiseStateMachine:B,Promise:G,state_created:T}}),t("WinJS/Promise",["WinJS/Core/_Base","WinJS/Promise/_StateMachine"],function(e,t){"use strict";return e.Namespace.define("WinJS",{Promise:t.Promise}),t.Promise}),(r=e["WinJS/Core/_WinJS"]).TPromise=r.Promise,r.PPromise=r.Promise,"undefined"==typeof exports&&"function"==typeof define&&define.amd?define("vs/base/common/winjs.base",[],r):module.exports=r}(),define(e[16],t([0,1,2]),function(e,t,n){"use strict";function r(e){i(e)||t.errorHandler.onUnexpectedError(e)}function i(e){return e instanceof Error&&e.name===a&&e.message===a}Object.defineProperty(t,"__esModule",{value:!0});var o={};n.TPromise.addEventListener("error",function(e){var t=e.detail,n=t.id;t.parent?t.handler&&o&&delete o[n]:(o[n]=t,1===Object.keys(o).length&&setTimeout(function(){var e=o;o={},
Object.keys(e).forEach(function(t){var n=e[t];n.exception?r(n.exception):n.error&&r(n.error),console.log("WARNING: Promise with no error callback:"+n.id),console.log(n),n.exception&&console.log(n.exception.stack)})},0))});var s=function(){function e(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(function(){if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e},0)}}return e.prototype.addListener=function(e){var t=this;return this.listeners.push(e),function(){t._removeListener(e)}},e.prototype.emit=function(e){this.listeners.forEach(function(t){t(e)})},e.prototype._removeListener=function(e){this.listeners.splice(this.listeners.indexOf(e),1)},e.prototype.setUnexpectedErrorHandler=function(e){this.unexpectedErrorHandler=e},e.prototype.getUnexpectedErrorHandler=function(){return this.unexpectedErrorHandler},e.prototype.onUnexpectedError=function(e){this.unexpectedErrorHandler(e),this.emit(e)},e.prototype.onUnexpectedExternalError=function(e){this.unexpectedErrorHandler(e)},e}()
;t.ErrorHandler=s,t.errorHandler=new s,t.setUnexpectedErrorHandler=function(e){t.errorHandler.setUnexpectedErrorHandler(e)},t.onUnexpectedError=r,t.onUnexpectedExternalError=function(e){i(e)||t.errorHandler.onUnexpectedExternalError(e)},t.transformErrorForSerialization=function(e){if(e instanceof Error)return{$isError:!0,name:e.name,message:e.message,stack:e.stacktrace||e.stack};return e};var a="Canceled";t.isPromiseCanceledError=i,t.canceled=function(){var e=new Error(a);return e.name=e.message,e},t.illegalArgument=function(e){return e?new Error("Illegal argument: "+e):new Error("Illegal argument")},t.illegalState=function(e){return e?new Error("Illegal state: "+e):new Error("Illegal state")},t.readonly=function(e){return e?new Error("readonly property '"+e+" cannot be changed'"):new Error("readonly property cannot be changed")},t.disposed=function(e){var t=new Error(e+" has been disposed");return t.name="DISPOSED",t},t.isErrorWithActions=function(e){return e instanceof Error&&Array.isArray(e.actions)},
t.create=function(e,t){void 0===t&&(t=Object.create(null));var n=new Error(e);return t.actions&&(n.actions=t.actions),n},t.getErrorMessage=function(e){return e?e.message?e.message:e.stack?e.stack.split("\n")[0]:String(e):"Error"}});var i=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())})},o=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[20],t([0,1,16,2]),function(e,t,n,r){"use strict";function s(e,t){var n=0,r=e.length;if(0===r)return 0;for(;n<r;){var i=Math.floor((n+r)/2);t(e[i])?r=i:n=i+1}return n}function a(e,t){return u(e,t,0,e.length-1,[]),e}function u(e,t,n,r,i){if(!(r<=n)){var o=n+(r-n)/2|0;u(e,t,n,o,i),u(e,t,o+1,r,i),t(e[o],e[o+1])<=0||function(e,t,n,r,i,o){for(var s=n,a=r+1,u=n;u<=i;u++)o[u]=e[u]
;for(u=n;u<=i;u++)s>r?e[u]=o[a++]:a>i?e[u]=o[s++]:t(o[a],o[s])<0?e[u]=o[a++]:e[u]=o[s++]}(e,t,n,o,r,i)}}function c(e,t,n){function r(e,t,n){var r;if(0!==t||0!==n.length){var o=i[i.length-1];o&&o.start+o.deleteCount===e?(o.deleteCount+=t,(r=o.toInsert).push.apply(r,n)):i.push({start:e,deleteCount:t,toInsert:n})}}for(var i=[],o=0,s=0;;){if(o===e.length){r(o,0,t.slice(s));break}if(s===t.length){r(o,e.length-o,[]);break}var a=e[o],u=t[s],c=n(a,u);0===c?(o+=1,s+=1):c<0?(r(o,1,[]),o+=1):c>0&&(r(o,0,[u]),s+=1)}return i}function l(e,t,n,r,i){for(var o=function(i){var o=e[r];if(t(o,n[i-1])<0){n.pop();var a=s(n,function(e){return t(o,e)<0});n.splice(a,0,o)}},a=n.length;r<i;r++)o(a)}function f(e,t){for(var n=0;n<e.length;n++){if(t(e[n]))return n}return-1}Object.defineProperty(t,"__esModule",{value:!0}),t.tail=function(e,t){return void 0===t&&(t=0),e[e.length-(1+t)]},t.tail2=function(e){if(0===e.length)throw new Error("Invalid tail call");return[e.slice(0,e.length-1),e[e.length-1]]},t.equals=function(e,t,n){
if(void 0===n&&(n=function(e,t){return e===t}),e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r++)if(!n(e[r],t[r]))return!1;return!0},t.binarySearch=function(e,t,n){for(var r=0,i=e.length-1;r<=i;){var o=(r+i)/2|0,s=n(e[o],t);if(s<0)r=o+1;else{if(!(s>0))return o;i=o-1}}return-(r+1)},t.findFirstInSorted=s,t.mergeSort=a,t.groupBy=function(e,t){for(var n,r=[],i=0,o=a(e.slice(0),t);i<o.length;i++){var s=o[i];n&&0===t(n[0],s)?n.push(s):(n=[s],r.push(n))}return r},t.sortedDiff=c,t.delta=function(e,t,n){for(var r=[],i=[],o=0,s=c(e,t,n);o<s.length;o++){var a=s[o];r.push.apply(r,e.slice(a.start,a.start+a.deleteCount)),i.push.apply(i,a.toInsert)}return{removed:r,added:i}},t.top=function(e,t,n){if(0===n)return[];var r=e.slice(0,n).sort(t);return l(e,t,r,n,e.length),r},t.topAsync=function(e,t,s,a,u){var c=this;return 0===s?r.TPromise.as([]):new r.TPromise(function(r,f){i(c,void 0,void 0,function(){var r,i,c,f;return o(this,function(o){switch(o.label){case 0:r=e.length,i=e.slice(0,s).sort(t),c=s,f=Math.min(s+a,r),
o.label=1;case 1:return c<r?c>s?[4,new Promise(function(e){return setTimeout(e)})]:[3,3]:[3,5];case 2:o.sent(),o.label=3;case 3:if(u&&u.isCancellationRequested)throw n.canceled();l(e,t,i,c,f),o.label=4;case 4:return c=f,f=Math.min(f+a,r),[3,1];case 5:return[2,i]}})}).then(r,f)})},t.coalesce=function(e,t){if(!e&&!t)return e;if(!t)return e.filter(function(e){return!!e});for(var n=0,r=0;r<e.length;r++)e[r]&&(e[n]=e[r],n+=1);e.length=n},t.move=function(e,t,n){e.splice(n,0,e.splice(t,1)[0])},t.isFalsyOrEmpty=function(e){return!Array.isArray(e)||0===e.length},t.distinct=function(e,t){if(!t)return e.filter(function(t,n){return e.indexOf(t)===n});var n=Object.create(null);return e.filter(function(e){var r=t(e);return!n[r]&&(n[r]=!0,!0)})},t.uniqueFilter=function(e){var t=Object.create(null);return function(n){var r=e(n);return!t[r]&&(t[r]=!0,!0)}},t.firstIndex=f,t.first=function(e,t,n){void 0===n&&(n=null);var r=f(e,t);return r<0?n:e[r]},t.commonPrefixLength=function(e,t,n){void 0===n&&(n=function(e,t){return e===t})
;for(var r=0,i=0,o=Math.min(e.length,t.length);i<o&&n(e[i],t[i]);i++)r++;return r},t.flatten=function(e){return[].concat.apply([],e)},t.range=function(e,t){var n="number"==typeof t?e:0;"number"==typeof t?n=e:(n=0,t=e);var r=[];if(n<=t)for(i=n;i<t;i++)r.push(i);else for(var i=n;i>t;i--)r.push(i);return r},t.fill=function(e,t,n){void 0===n&&(n=[]);for(var r=0;r<e;r++)n[r]=t();return n},t.index=function(e,t,n){return void 0===n&&(n=function(e){return e}),e.reduce(function(e,r){var i=t(r);return e[i]=n(r,e[i]),e},Object.create(null))},t.insert=function(e,t){return e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}},t.arrayInsert=function(e,t,n){var r=e.slice(0,t),i=e.slice(t);return r.concat(n,i)},t.shuffle=function(e,t){for(var n="number"==typeof t?function(){var e=179426549*Math.sin(t++);return e-Math.floor(e)}:Math.random,r=e.length-1;r>0;r-=1){var i=Math.floor(n()*(r+1)),o=e[r];e[r]=e[i],e[i]=o}},t.pushToStart=function(e,t){var n=e.indexOf(t);n>-1&&(e.splice(n,1),e.unshift(t))},
t.pushToEnd=function(e,t){var n=e.indexOf(t);n>-1&&(e.splice(n,1),e.push(t))}}),define(e[3],t([0,1,16,39,4,63,2]),function(e,t,r,s,a,u,c){"use strict";function l(e){return function(t,n,r){void 0===n&&(n=null);var i=e(function(e){return i.dispose(),t.call(n,e)},null,r);return i}}function f(e,t){return function(n,r,i){return void 0===r&&(r=null),e(function(e){return n.call(r,t(e))},null,i)}}function d(e,t){return function(n,r,i){return void 0===r&&(r=null),e(function(e){t(e),n.call(r,e)},null,i)}}function p(e,t){return function(n,r,i){return void 0===r&&(r=null),e(function(e){return t(e)&&n.call(r,e)},null,i)}}function h(e){var t,n=!0;return p(e,function(e){var r=n||e!==t;return n=!1,t=e,r})}Object.defineProperty(t,"__esModule",{value:!0});!function(e){var t={dispose:function(){}};e.None=function(){return t}}(t.Event||(t.Event={}));var g=function(){function e(e){this._options=e}return Object.defineProperty(e.prototype,"event",{get:function(){var t=this;return this._event||(this._event=function(n,r,i){
t._listeners||(t._listeners=new u.LinkedList);var o=t._listeners.isEmpty();o&&t._options&&t._options.onFirstListenerAdd&&t._options.onFirstListenerAdd(t);var s=t._listeners.push(r?[n,r]:n);o&&t._options&&t._options.onFirstListenerDidAdd&&t._options.onFirstListenerDidAdd(t),t._options&&t._options.onListenerDidAdd&&t._options.onListenerDidAdd(t,n,r);var a;return a={dispose:function(){a.dispose=e._noop,t._disposed||(s(),t._options&&t._options.onLastListenerRemove&&t._listeners.isEmpty()&&t._options.onLastListenerRemove(t))}},Array.isArray(i)&&i.push(a),a}),this._event},enumerable:!0,configurable:!0}),e.prototype.fire=function(e){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=[]);for(var t=this._listeners.iterator(),n=t.next();!n.done;n=t.next())this._deliveryQueue.push([n.value,e]);for(;this._deliveryQueue.length>0;){var i=this._deliveryQueue.shift(),o=i[0],s=i[1];try{"function"==typeof o?o.call(void 0,s):o[0].call(o[1],s)}catch(n){r.onUnexpectedError(n)}}}},e.prototype.dispose=function(){
this._listeners&&(this._listeners=void 0),this._deliveryQueue&&(this._deliveryQueue.length=0),this._disposed=!0},e._noop=function(){},e}();t.Emitter=g;var v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.fireAsync=function(e){return i(this,void 0,void 0,function(){var t,n,i,s,a,u;return o(this,function(o){switch(o.label){case 0:if(!this._listeners)return[2];for(this._asyncDeliveryQueue||(this._asyncDeliveryQueue=[]),t=this._listeners.iterator(),n=t.next();!n.done;n=t.next())u=[],this._asyncDeliveryQueue.push([n.value,e(u,"function"==typeof n.value?n.value:n.value[0]),u]);o.label=1;case 1:if(!(this._asyncDeliveryQueue.length>0))return[3,3];i=this._asyncDeliveryQueue.shift(),s=i[0],a=i[1],u=i[2];try{"function"==typeof s?s.call(void 0,a):s[0].call(s[1],a)}catch(e){return r.onUnexpectedError(e),[3,1]}return Object.freeze(u),[4,Promise.all(u)];case 2:return o.sent(),[3,1];case 3:return[2]}})})},t}(g);t.AsyncEmitter=v;var m=function(){function e(){var e=this
;this.hasListeners=!1,this.events=[],this.emitter=new g({onFirstListenerAdd:function(){return e.onFirstListenerAdd()},onLastListenerRemove:function(){return e.onLastListenerRemove()}})}return Object.defineProperty(e.prototype,"event",{get:function(){return this.emitter.event},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=this,n={event:e,listener:null};this.events.push(n),this.hasListeners&&this.hook(n);return a.toDisposable(s.once(function(){t.hasListeners&&t.unhook(n);var e=t.events.indexOf(n);t.events.splice(e,1)}))},e.prototype.onFirstListenerAdd=function(){var e=this;this.hasListeners=!0,this.events.forEach(function(t){return e.hook(t)})},e.prototype.onLastListenerRemove=function(){var e=this;this.hasListeners=!1,this.events.forEach(function(t){return e.unhook(t)})},e.prototype.hook=function(e){var t=this;e.listener=e.event(function(e){return t.emitter.fire(e)})},e.prototype.unhook=function(e){e.listener.dispose(),e.listener=null},e.prototype.dispose=function(){this.emitter.dispose()},
e}();t.EventMultiplexer=m,t.fromCallback=function(e){var t,n=new g({onFirstListenerAdd:function(){return t=e(function(e){return n.fire(e)})},onLastListenerRemove:function(){return t.dispose()}});return n.event},t.fromPromise=function(e){var t=new g,n=!1;return e.then(null,function(){return null}).then(function(){n?t.fire():setTimeout(function(){return t.fire()},0)}),n=!0,t.event},t.toPromise=function(e){return new c.TPromise(function(t){var n=e(function(e){n.dispose(),t(e)})})},t.once=l,t.anyEvent=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t,n,r){return void 0===n&&(n=null),a.combinedDisposable(e.map(function(e){return e(function(e){return t.call(n,e)},null,r)}))}},t.debounceEvent=function(e,t,n,r){void 0===n&&(n=100),void 0===r&&(r=!1);var i,o=void 0,s=void 0,a=0,u=new g({onFirstListenerAdd:function(){i=e(function(e){a++,o=t(o,e),r&&!s&&u.fire(o),clearTimeout(s),s=setTimeout(function(){var e=o;o=void 0,s=void 0,(!r||a>1)&&u.fire(e),a=0},n)})},
onLastListenerRemove:function(){i.dispose()}});return u.event};var y=function(){function e(){this.buffers=[]}return e.prototype.wrapEvent=function(e){var t=this;return function(n,r,i){return e(function(e){var i=t.buffers[t.buffers.length-1];i?i.push(function(){return n.call(r,e)}):n.call(r,e)},void 0,i)}},e.prototype.bufferEvents=function(e){var t=[];this.buffers.push(t),e(),this.buffers.pop(),t.forEach(function(e){return e()})},e}();t.EventBufferer=y,t.mapEvent=f,t.forEach=d,t.filterEvent=p;var b=function(){function e(e){this._event=e}return Object.defineProperty(e.prototype,"event",{get:function(){return this._event},enumerable:!0,configurable:!0}),e.prototype.map=function(t){return new e(f(this._event,t))},e.prototype.forEach=function(t){return new e(d(this._event,t))},e.prototype.filter=function(t){return new e(p(this._event,t))},e.prototype.latch=function(){return new e(h(this._event))},e.prototype.on=function(e,t,n){return this._event(e,t,n)},e.prototype.once=function(e,t,n){return l(this._event)(e,t,n)
},e}();t.chain=function(e){return new b(e)},t.stopwatch=function(e){var t=(new Date).getTime();return f(l(e),function(e){return(new Date).getTime()-t})},t.buffer=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=[]),n=n.slice();var r=e(function(e){n?n.push(e):o.fire(e)}),i=function(){n.forEach(function(e){return o.fire(e)}),n=null},o=new g({onFirstListenerAdd:function(){r||(r=e(function(e){return o.fire(e)}))},onFirstListenerDidAdd:function(){n&&(t?setTimeout(i):i())},onLastListenerRemove:function(){r.dispose(),r=null}});return o.event},t.echo=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=[]),n=n.slice(),e(function(e){n.push(e),i.fire(e)});var r=function(e,t){return n.forEach(function(n){return e.call(t,n)})},i=new g({onListenerDidAdd:function(e,n,i){t?setTimeout(function(){return r(n,i)}):r(n,i)}});return i.event};var _=function(){function e(){this.emitter=new g,this.event=this.emitter.event,this.disposable=a.Disposable.None}return Object.defineProperty(e.prototype,"input",{set:function(e){
this.disposable.dispose(),this.disposable=e(this.emitter.fire,this.emitter)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.disposable.dispose(),this.emitter.dispose()},e}();t.Relay=_,t.fromNodeEventEmitter=function(e,t,n){void 0===n&&(n=function(e){return e});var r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i.fire(n.apply(void 0,e))},i=new g({onFirstListenerAdd:function(){return e.on(t,r)},onLastListenerRemove:function(){return e.removeListener(t,r)}});return i.event},t.latch=h}),define(e[53],t([0,1,3]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=Object.freeze(function(e,t){var n=setTimeout(e.bind(t),0);return{dispose:function(){clearTimeout(n)}}});!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:i})}(r=t.CancellationToken||(t.CancellationToken={}));var o=function(){function e(){
this._isCancelled=!1}return e.prototype.cancel=function(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))},Object.defineProperty(e.prototype,"isCancellationRequested",{get:function(){return this._isCancelled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onCancellationRequested",{get:function(){return this._isCancelled?i:(this._emitter||(this._emitter=new n.Emitter),this._emitter.event)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)},e}(),s=function(){function e(){}return Object.defineProperty(e.prototype,"token",{get:function(){return this._token||(this._token=new o),this._token},enumerable:!0,configurable:!0}),e.prototype.cancel=function(){this._token?this._token instanceof o&&this._token.cancel():this._token=r.Cancelled},e.prototype.dispose=function(){this._token?this._token instanceof o&&this._token.dispose():this._token=r.None},e}()
;t.CancellationTokenSource=s}),define(e[10],t([0,1,16,2,53,4,3]),function(e,t,r,i,o,s,a){"use strict";function u(e){return e&&"function"==typeof e.then}function c(e){var t=new o.CancellationTokenSource,n=e(t.token),i=new Promise(function(e,i){t.token.onCancellationRequested(function(){i(r.canceled())}),Promise.resolve(n).then(function(n){t.dispose(),e(n)},function(e){t.dispose(),i(e)})});return new(function(){function e(){}return e.prototype.cancel=function(){t.cancel()},e.prototype.then=function(e,t){return i.then(e,t)},e.prototype.catch=function(e){return this.then(void 0,e)},e}())}function l(e){return u(e)&&"function"==typeof e.done}function f(e,t){return l(e)?new i.TPromise(function(n,i){e.done(function(e){try{t(e)}catch(e){r.onUnexpectedError(e)}n(e)},function(e){try{t(e)}catch(e){r.onUnexpectedError(e)}i(e)})},function(){e.cancel()}):(e.then(function(e){return t()},function(e){return t()}),e)}function d(e){function t(s){void 0!==s&&null!==s&&n.push(s);var a=r<o?e[r++]():null
;return a?a.then(t):i.TPromise.as(n)}var n=[],r=0,o=e.length;return i.TPromise.as(null).then(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.isThenable=u,t.toThenable=function(e){return u(e)?e:i.TPromise.as(e)},t.toWinJsPromise=function(e){return e instanceof i.TPromise?e:new i.TPromise(function(t,n){return e.then(t,n)})},t.createCancelablePromise=c,t.asWinJsPromise=function(e){var t=new o.CancellationTokenSource;return new i.TPromise(function(n,r){var o=e(t.token);o instanceof i.TPromise?o.then(function(e){t.dispose(),n(e)},function(e){t.dispose(),r(e)}):u(o)?o.then(function(e){t.dispose(),n(e)},function(e){t.dispose(),r(e)}):(t.dispose(),n(o))},function(){t.cancel()})},t.wireCancellationToken=function(e,t,n){var o=e.onCancellationRequested(function(){return t.cancel()});return n&&(t=t.then(void 0,function(e){if(!r.isPromiseCanceledError(e))return i.TPromise.wrapError(e)})),f(t,function(){return o.dispose()})},t.asDisposablePromise=function(e,t,n){var o,s={promise:new i.TPromise(function(n,i){
o=function(){n(t),l(e)&&e.cancel()},e.then(n,function(e){r.isPromiseCanceledError(e)?n(t):i(e)})}),dispose:o};return Array.isArray(n)&&n.push(s),s};var p=function(){function e(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}return e.prototype.queue=function(e){var t=this;if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){var n=function(){t.queuedPromise=null;var e=t.queue(t.queuedPromiseFactory);return t.queuedPromiseFactory=null,e};this.queuedPromise=new i.TPromise(function(e){t.activePromise.then(n,n).done(e)},function(){t.activePromise.cancel()})}return new i.TPromise(function(e,n){t.queuedPromise.then(e,n)},function(){})}return this.activePromise=e(),new i.TPromise(function(e,n){t.activePromise.done(function(n){t.activePromise=null,e(n)},function(e){t.activePromise=null,n(e)})},function(){t.activePromise.cancel()})},e}();t.Throttler=p;var h=function(){function e(){this.current=i.TPromise.wrap(null)}return e.prototype.queue=function(e){
return this.current=this.current.then(function(){return e()})},e}();t.SimpleThrottler=h;var g=function(){function e(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.onSuccess=null,this.task=null}return e.prototype.trigger=function(e,t){var n=this;return void 0===t&&(t=this.defaultDelay),this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new i.TPromise(function(e){n.onSuccess=e},function(){}).then(function(){n.completionPromise=null,n.onSuccess=null;var e=n.task;return n.task=null,e()})),this.timeout=setTimeout(function(){n.timeout=null,n.onSuccess(null)},t),this.completionPromise},e.prototype.isTriggered=function(){return null!==this.timeout},e.prototype.cancel=function(){this.cancelTimeout(),this.completionPromise&&(this.completionPromise.cancel(),this.completionPromise=null)},e.prototype.cancelTimeout=function(){null!==this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},e}();t.Delayer=g;var v=function(e){function t(t){
var n=e.call(this,t)||this;return n.throttler=new p,n}return n(t,e),t.prototype.trigger=function(t,n){var r=this;return e.prototype.trigger.call(this,function(){return r.throttler.queue(t)},n)},t}(g);t.ThrottledDelayer=v;var m=function(){function e(){var e=this;this._isOpen=!1,this._promise=new i.TPromise(function(t,n){e._completePromise=t},function(){console.warn("You should really not try to cancel this ready promise!")})}return e.prototype.isOpen=function(){return this._isOpen},e.prototype.open=function(){this._isOpen=!0,this._completePromise(!0)},e.prototype.wait=function(){return this._promise},e}();t.Barrier=m;var y=function(e){function t(t){var n,i,o=this;return o=e.call(this,function(e,t){n=e,i=t},function(){i(r.canceled())})||this,t.then(n,i),o}return n(t,e),t}(i.TPromise);t.ShallowCancelThenPromise=y,t.timeout=function(e){return c(function(t){return new Promise(function(n,i){var o=setTimeout(n,e);t.onCancellationRequested(function(e){clearTimeout(o),i(r.canceled())})})})},t.isWinJSPromise=l,
t.always=f,t.sequence=d,t.first2=function(e,t,n){void 0===t&&(t=function(e){return!!e}),void 0===n&&(n=null);var r=0,i=e.length,o=function(){return r>=i?Promise.resolve(n):(0,e[r++])().then(function(e){return t(e)?Promise.resolve(e):o()})};return o()},t.first=function(e,t,n){void 0===t&&(t=function(e){return!!e}),void 0===n&&(n=null);var r=0,o=e.length,s=function(){return r>=o?i.TPromise.as(n):(0,e[r++])().then(function(e){return t(e)?i.TPromise.as(e):s()})};return s()};var b=function(){function e(e){this.maxDegreeOfParalellism=e,this.outstandingPromises=[],this.runningPromises=0,this._onFinished=new a.Emitter}return Object.defineProperty(e.prototype,"onFinished",{get:function(){return this._onFinished.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this.runningPromises+this.outstandingPromises.length},enumerable:!0,configurable:!0}),e.prototype.queue=function(e){var t=this;return new i.TPromise(function(n,r){t.outstandingPromises.push({factory:e,c:n,e:r
}),t.consume()})},e.prototype.consume=function(){for(var e=this;this.outstandingPromises.length&&this.runningPromises<this.maxDegreeOfParalellism;){var t=this.outstandingPromises.shift();this.runningPromises++;var n=t.factory();n.done(t.c,t.e),n.done(function(){return e.consumed()},function(){return e.consumed()})}},e.prototype.consumed=function(){this.runningPromises--,this.outstandingPromises.length>0?this.consume():this._onFinished.fire()},e.prototype.dispose=function(){this._onFinished.dispose()},e}();t.Limiter=b;var _=function(e){function t(){return e.call(this,1)||this}return n(t,e),t}(b);t.Queue=_;var E=function(){function e(){this.queues=Object.create(null)}return e.prototype.queueFor=function(e){var t=this,n=e.toString();if(!this.queues[n]){var r=new _;r.onFinished(function(){r.dispose(),delete t.queues[n]}),this.queues[n]=r}return this.queues[n]},e}();t.ResourceQueue=E,t.setDisposableTimeout=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r]
;var i=setTimeout.apply(void 0,[e,t].concat(n));return{dispose:function(){clearTimeout(i)}}};var w=function(e){function t(){var t=e.call(this)||this;return t._token=-1,t}return n(t,e),t.prototype.dispose=function(){this.cancel(),e.prototype.dispose.call(this)},t.prototype.cancel=function(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)},t.prototype.cancelAndSet=function(e,t){var n=this;this.cancel(),this._token=setTimeout(function(){n._token=-1,e()},t)},t.prototype.setIfNotSet=function(e,t){var n=this;-1===this._token&&(this._token=setTimeout(function(){n._token=-1,e()},t))},t}(s.Disposable);t.TimeoutTimer=w;var C=function(e){function t(){var t=e.call(this)||this;return t._token=-1,t}return n(t,e),t.prototype.dispose=function(){this.cancel(),e.prototype.dispose.call(this)},t.prototype.cancel=function(){-1!==this._token&&(clearInterval(this._token),this._token=-1)},t.prototype.cancelAndSet=function(e,t){this.cancel(),this._token=setInterval(function(){e()},t)},t}(s.Disposable);t.IntervalTimer=C
;var S=function(){function e(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}return e.prototype.dispose=function(){this.cancel(),this.runner=null},e.prototype.cancel=function(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)},e.prototype.schedule=function(e){void 0===e&&(e=this.timeout),this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)},e.prototype.isScheduled=function(){return-1!==this.timeoutToken},e.prototype.onTimeout=function(){this.timeoutToken=-1,this.runner&&this.doRun()},e.prototype.doRun=function(){this.runner()},e}();t.RunOnceScheduler=S;var x=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.units=[],r}return n(t,e),t.prototype.work=function(e){this.units.push(e),this.isScheduled()||this.schedule()},t.prototype.doRun=function(){var e=this.units;this.units=[],this.runner(e)},t.prototype.dispose=function(){this.units=[],e.prototype.dispose.call(this)},t}(S);t.RunOnceWorker=x,
t.nfcall=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return new i.TPromise(function(n,r){return e.apply(void 0,t.concat([function(e,t){return e?r(e):n(t)}]))},function(){return null})},t.ninvoke=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return new i.TPromise(function(r,i){return t.call.apply(t,[e].concat(n,[function(e,t){return e?i(e):r(t)}]))},function(){return null})}}),define(e[66],t([0,1,20,15,31,29,2,10]),function(e,t,n,r,i,o,s,a){"use strict";function u(e){switch(e){case 0:return"";case 1:return w+"*?";default:return"(?:"+E+"|"+w+"+"+E+"|"+E+w+"+)*?"}}function c(e,t){if(!e)return[];for(var n,r=[],i=!1,o=!1,s="",a=0;a<e.length;a++){switch(n=e[a]){case t:if(!i&&!o){r.push(s),s="";continue}break;case"{":i=!0;break;case"}":i=!1;break;case"[":o=!0;break;case"]":o=!1}s+=n}return s&&r.push(s),r}function l(e){if(!e)return"";var t="",n=c(e,_);if(n.every(function(e){return e===b}))t=".*";else{var i=!1;n.forEach(function(e,o){if(e!==b){
for(var s,a=!1,f="",d=!1,p="",h=0;h<e.length;h++)if("}"!==(s=e[h])&&a)f+=s;else if(!d||"]"===s&&p)switch(s){case"{":a=!0;continue;case"[":d=!0;continue;case"}":var g="(?:"+c(f,",").map(function(e){return l(e)}).join("|")+")";t+=g,a=!1,f="";break;case"]":t+="["+p+"]",d=!1,p="";break;case"?":t+=w;continue;case"*":t+=u(1);continue;default:t+=r.escapeRegExpCharacters(s)}else{p+="-"===s?s:"^"!==s&&"!"!==s||p?s===_?"":r.escapeRegExpCharacters(s):"^"}o<n.length-1&&(n[o+1]!==b||o+2<n.length)&&(t+=E),i=!1}else i||(t+=u(2),i=!0)})}return t}function f(e,t){if(!e)return L;var i;i="string"!=typeof e?e.pattern:e;var o=(i=i.trim())+"_"+!!t.trimForExclusions,s=I.get(o);if(s)return d(s,e);var a;if(S.test(i)){var u=i.substr(4);s=function(e,t){return e&&r.endsWith(e,u)?i:null}}else s=(a=x.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?O:P).test(i)?function(e,t){var r=y(e.slice(1,-1).split(",").map(function(e){return f(e,t)}).filter(function(e){return e!==L}),e),i=r.length;if(!i)return L;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=k.exec(p(i,t)))?h(a[1].substr(1),i,!0):(a=T.exec(p(i,t)))?h(a[1],i,!1):function(e){try{var t=new RegExp("^"+l(e)+"$");return function(n,r){return t.lastIndex=0,n&&t.test(n)?e:null}}catch(e){return L}}(i);return I.set(o,s),d(s,e)}function d(e,t){return"string"==typeof t?e:function(n,r){return i.isEqualOrParent(n,t.base)?e(i.normalize(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 h(e,t,n){
var o=i.nativeSep!==i.sep?e.replace(C,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 g(e,t){if(void 0===t&&(t={}),!e)return D;if("string"==typeof e||m(e)){var r=f(e,t);if(r===L)return D;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=y(Object.getOwnPropertyNames(e).map(function(n){return function(e,t,n){if(!1===t)return L;var r=f(e,n);if(r===L)return L;if("boolean"==typeof t)return r;if(t){var i=t.when;if("string"==typeof i){var o=function(t,n,o,s){if(!s||!r(t,n))return null;var u=i.replace("$(basename)",o),c=s(u);return a.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!==L})),o=r.length;if(!o)return L;if(!r.some(function(e){return e.requiresSiblings})){if(1===o)return r[0]
;var s=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&&(s.allBasenames=u.allBasenames);var c=r.reduce(function(e,t){return t.allPaths?e.concat(t.allPaths):e},[]);return c.length&&(s.allPaths=c),s}var l=function(e,t,n){for(var o,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},d=n.first(r,function(e){return!!e.allBasenames});d&&(l.allBasenames=d.allBasenames);var p=r.reduce(function(e,t){return t.allPaths?e.concat(t.allPaths):e},[]);p.length&&(l.allPaths=p);return l}(e,t)}function v(e){for(var t={},n=0,r=e;n<r.length;n++){t[r[n]]=!0}return t}function m(e){var t=e;return t&&"string"==typeof t.base&&"string"==typeof t.pattern&&"function"==typeof t.pathToRelative}function y(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){
return e.concat(t.basenames)},[]);if(t){r=[];for(var o=0,s=i.length;o<s;o++)r.push(t)}else r=n.reduce(function(e,t){return e.concat(t.patterns)},[]);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 b="**",_="/",E="[/\\\\]",w="[^/\\\\]",C=/\//g;t.splitGlobAware=c;var S=/^\*\*\/\*\.[\w\.-]+$/,x=/^\*\*\/([\w\.-]+)\/?$/,P=/^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/,O=/^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/,k=/^\*\*((\/[\w\.-]+)+)\/?$/,T=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,I=new o.LRUCache(1e4),D=function(){return!1},L=function(){return null};t.match=function(e,t,n){return!(!e||!t)&&g(e)(t,void 0,n)},t.parse=g,
t.hasSiblingPromiseFn=function(e){if(e){var t;return function(n){return t||(t=(e()||s.TPromise.as([])).then(function(e){return e?v(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?v(r):{}}return!!t[n]}}},t.isRelativePattern=m,t.parseToAsync=function(e,t){var n=g(e,t);return function(e,t,r){var i=n(e,t,r);return i instanceof s.TPromise?i:s.TPromise.as(i)}},t.getBasenameTerms=function(e){return e.allBasenames||[]},t.getPathTerms=function(e){return e.allPaths||[]}}),define(e[71],t([0,1,31,15,66]),function(e,t,n,r,i){"use strict";function o(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);c.push(r),r.userConfigured?f.push(r):l.push(r),t&&!r.userConfigured&&c.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 s(e,i){if(!e)return[t.MIME_UNKNOWN];e=e.toLowerCase();var o=n.basename(e),s=a(e,o,f);if(s)return[s,t.MIME_TEXT];var u=a(e,o,l);if(u)return[u,t.MIME_TEXT];if(i){var d=function(e){r.startsWithUTF8BOM(e)&&(e=e.substr(1));if(e.length>0)for(var t=0;t<c.length;++t){var n=c[t]
;if(n.firstline){var i=e.match(n.firstline);if(i&&i.length>0)return n.mime}}return null}(i);if(d)return[d,t.MIME_TEXT]}return[t.MIME_UNKNOWN]}function a(e,t,n){for(var o,s,a,u=n.length-1;u>=0;u--){var c=n[u];if(t===c.filenameLowercase){o=c;break}if(c.filepattern&&(!s||c.filepattern.length>s.filepattern.length)){var l=c.filepatternOnPath?e:t;i.match(c.filepatternLowercase,l)&&(s=c)}c.extension&&(!a||c.extension.length>a.extension.length)&&r.endsWith(t,c.extensionLowercase)&&(a=c)}return o?o.mime:s?s.mime:a?a.mime:null}function u(e){return!e||("string"==typeof e?e===t.MIME_BINARY||e===t.MIME_TEXT||e===t.MIME_UNKNOWN:1===e.length&&u(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 c=[],l=[],f=[];t.registerTextMime=o,t.clearTextMimes=function(e){e?(c=c.filter(function(e){return!e.userConfigured}),f=[]):(c=[],l=[],f=[])},t.guessMimeTypes=s,t.isUnspecific=u,t.suggestFilename=function(e,t){
for(var n=0;n<c.length;n++){var r=c[n];if(!r.userConfigured&&r.id===e&&r.extension)return t+r.extension}return 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[72],t([0,1,123]),function(e,t,n){"use strict";function r(e,t,i){if(n.ok(e,"Missing first parameter"),n.ok("function"==typeof t,"Second parameter must be a function that is called for each element"),n.ok("function"==typeof i,"Third parameter must be a function that is called on error and success"),"function"==typeof e)try{e(function(e,n){e?i(e,null):r(n,t,i)})}catch(e){i(e,null)}else{var o=[],s=function(n){if(n<e.length)try{t(e[n],function(e,t){!0!==e&&!1!==e||(t=e,e=null),e?i(e,null):(t&&o.push(t),process.nextTick(function(){s(n+1)}))},n,e.length)}catch(e){i(e,null)}else i(null,o)};s(0)}}function i(e){!function(e){n.ok(e.length>1,"Need at least one error handler and one function to process sequence"),e.forEach(function(e){n.ok("function"==typeof e)});var t=e.splice(0,1)[0],i=null;r(e,function(e,t){var n=function(e,n){
!0!==e&&!1!==e||(n=e,e=null),e?t(e,null):(i=n,t(null,null))};try{e.call(n,i)}catch(e){t(e,null)}},function(e,n){e&&t(e)})}(Array.isArray(e)?e:Array.prototype.slice.call(arguments))}Object.defineProperty(t,"__esModule",{value:!0}),t.parallel=function(e,t,n){var r=new Array(e.length),i=new Array(e.length),o=!1,s=0;if(0===e.length)return n(null,[]);e.forEach(function(a,u){t(a,function(t,a){if(t?(o=!0,r[u]=null,i[u]=t):(r[u]=a,i[u]=null),++s===e.length)return n(o?i:null,r)})})},t.loop=r,t.sequence=i}),define(e[75],t([0,1,30]),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}),define(e[76],t([0,1,77,7]),function(e,t,n,r){"use strict";function s(t,s){return void 0===s&&(s={}),i(this,void 0,void 0,function(){var i,a,u,c,l,f;return o(this,function(o){switch(o.label){case 0:return i=n.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}(i))?(u=n.parse(a),/^https?:$/.test(u.protocol)?(c={host:u.hostname,port:Number(u.port),auth:u.auth,rejectUnauthorized:!r.isBoolean(s.strictSSL)||s.strictSSL},"http:"!==i.protocol?[3,2]:[4,new Promise(function(t,n){e(["http-proxy-agent"],t,n)})]):[2,null]):[2,null];case 1:return f=o.sent(),[3,4];case 2:return[4,new Promise(function(t,n){e(["https-proxy-agent"],t,n)})];case 3:f=o.sent(),o.label=4;case 4:return l=f,[2,new l(c)]}})})}Object.defineProperty(t,"__esModule",{value:!0}),t.getProxyAgent=s}),define(e[78],t([0,1,19,2]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readExactlyByFile=function(e,t){return new r.TPromise(function(r,i){n.open(e,"r",null,function(e,o){function s(e,t,s){n.close(o,function(n){return n?i(n):e&&"EISDIR"===e.code?i(e):r({buffer:t,
bytesRead:s})})}function a(){n.read(o,u,c,t-c,null,function(e,n){return e?s(e,null,0):0===n?s(null,u,c):(c+=n)===t?s(null,u,c):a()})}if(e)return i(e);var u=Buffer.allocUnsafe(t),c=0;a()})})},t.readToMatchingString=function(e,t,i,o){return new r.TPromise(function(r,s){return n.open(e,"r",null,function(a,u){function c(e,t){n.close(u,function(n){return n?s(n):e&&"EISDIR"===e.code?s(e):r(t)})}function l(){n.read(u,f,d,i,null,function(n,r){if(n)return c(n,null);if(0===r)return c(null,null);d+=r;var i=f.indexOf(t);return i>=0?c(null,f.toString("utf8").substr(0,i)):d>=o?c(new Error("Could not find "+t+" in first "+o+" bytes of "+e),null):l()})}if(a)return s(a);var f=Buffer.allocUnsafe(o),d=0;l()})})}}),define(e[83],t([0,1,78,122,2,8,88,89,10]),function(e,t,r,i,o,s,a,u,c){"use strict";function l(e){return i.decodeStream(f(e))}function f(e){return e===t.UTF8_with_bom?t.UTF8:e}function d(e,n){if(!e||n<2)return null;var r=e.readUInt8(0),i=e.readUInt8(1);if(254===r&&255===i)return t.UTF16be
;if(255===r&&254===i)return t.UTF16le;if(n<3)return null;var o=e.readUInt8(2);return 239===r&&187===i&&191===o?t.UTF8:null}function p(t){return c.toWinJsPromise(new Promise(function(t,n){e(["jschardet"],t,n)})).then(function(e){e.Constants.MINIMUM_THRESHOLD=v;var n=e.detect(t);if(!n||!n.encoding)return null;var r=n.encoding.toLowerCase();return 0<=m.indexOf(r)?null:h(n.encoding)})}function h(e){var t=e.replace(/[^a-zA-Z0-9]/g,"").toLowerCase();return y[t]||t}function g(e,n){var r=e.buffer,i=e.bytesRead,o=d(r,i),s=!1;if(o!==t.UTF16be&&o!==t.UTF16le){for(var a=!0,u=!0,c=!1,l=0;l<i&&l<b;l++){var f=l%2==1,h=0===r.readInt8(l);if(h&&(c=!0),a&&(f&&!h||!f&&h)&&(a=!1),u&&(f&&h||!f&&!h)&&(u=!1),h&&!a&&!u)break}c&&(a?o=t.UTF16le:u?o=t.UTF16be:s=!0)}return!n||s||o?{seemsBinary:s,encoding:o}:p(r.slice(0,i)).then(function(e){return{seemsBinary:!1,encoding:e}})}Object.defineProperty(t,"__esModule",{value:!0}),t.UTF8="utf8",t.UTF8_with_bom="utf8bom",t.UTF16be="utf16be",t.UTF16le="utf16le",t.toDecodeStream=function(e,r){
return r.minBytesRequiredForDetection||(r.minBytesRequiredForDetection=r.guessEncoding?E:_),r.overwriteEncoding||(r.overwriteEncoding=function(e){return e||t.UTF8}),new o.TPromise(function(t,i){e.pipe(new(function(e){function i(t){var n=e.call(this,t)||this;return n._buffer=[],n._bytesBuffered=0,n.once("finish",function(){return n._finish()}),n}return n(i,e),i.prototype._write=function(e,t,n){Buffer.isBuffer(e)||n(new Error("data must be a buffer")),this._decodeStream?this._decodeStream.write(e,n):(this._buffer.push(e),this._bytesBuffered+=e.length,this._decodeStreamConstruction?this._decodeStreamConstruction.then(function(e){return n()},function(e){return n(e)}):this._bytesBuffered>=r.minBytesRequiredForDetection?this._startDecodeStream(n):n())},i.prototype._startDecodeStream=function(e){var n=this;this._decodeStreamConstruction=o.TPromise.as(g({buffer:Buffer.concat(this._buffer),bytesRead:this._bytesBuffered},r.guessEncoding)).then(function(i){i.encoding=r.overwriteEncoding(i.encoding),
n._decodeStream=l(i.encoding);for(var o=0,s=n._buffer;o<s.length;o++){var a=s[o];n._decodeStream.write(a)}e(),t({detected:i,stream:n._decodeStream})},function(t){n.emit("error",t),e(t)})},i.prototype._finish=function(){var e=this;this._decodeStream?this._decodeStream.end():this._startDecodeStream(function(){return e._decodeStream.end()})},i}(u.Writable)))})},t.bomLength=function(e){switch(e){case t.UTF8:return 3;case t.UTF16be:case t.UTF16le:return 2}return 0},t.decode=function(e,t){return i.decode(e,f(t))},t.encode=function(e,t,n){return i.encode(e,f(t),n)},t.encodingExists=function(e){return i.encodingExists(f(e))},t.decodeStream=l,t.encodeStream=function(e,t){return i.encodeStream(f(e),t)},t.detectEncodingByBOMFromBuffer=d,t.detectEncodingByBOM=function(e){return r.readExactlyByFile(e,3).then(function(e){return d(e.buffer,e.bytesRead)})};var v=.2,m=["ascii","utf-8","utf-16","utf-32"];t.guessEncodingByBuffer=p;var y={ibm866:"cp866",big5:"cp950"};t.toCanonicalName=function(e){switch(e){case"shiftjis":
return"shift-jis";case"utf16le":return"utf-16le";case"utf16be":return"utf-16be";case"big5hkscs":return"big5-hkscs";case"eucjp":return"euc-jp";case"euckr":return"euc-kr";case"koi8r":return"koi8-r";case"koi8u":return"koi8-u";case"macroman":return"x-mac-roman";case"utf8bom":return"utf8";default:var t=e.match(/windows(\d+)/);return t?"windows-"+t[1]:e}};var b=512,_=512,E=4096;t.detectEncodingFromBuffer=g;var w={437:"cp437",850:"cp850",852:"cp852",855:"cp855",857:"cp857",860:"cp860",861:"cp861",863:"cp863",865:"cp865",866:"cp866",869:"cp869",936:"cp936",1252:"cp1252"};t.resolveTerminalEncoding=function(e){var n,r=process.env.VSCODE_CLI_ENCODING;return r?(e&&console.log("Found VSCODE_CLI_ENCODING variable: "+r),n=o.TPromise.as(r)):n=s.isLinux||s.isMacintosh?new o.TPromise(function(t){e&&console.log('Running "locale charmap" to detect terminal encoding...'),a.exec("locale charmap",function(e,n,r){return t(n)})}):new o.TPromise(function(t){e&&console.log('Running "chcp" to detect terminal encoding...'),
a.exec("chcp",function(e,n,r){if(n)for(var i=Object.keys(w),o=0;o<i.length;o++){var s=i[o];if(n.indexOf(s)>=0)return t(w[s])}return t(void 0)})}),n.then(function(n){if(e&&console.log("Detected raw terminal encoding: "+n),!n||"utf-8"===n.toLowerCase()||n.toLowerCase()===t.UTF8)return t.UTF8;var r=h(n);return i.encodingExists(r)?r:(e&&console.log("Unsupported terminal encoding, falling back to UTF-8."),t.UTF8)})}}),define(e[36],t([0,1,19,5,10,81,8,15,24,2,83,72]),function(e,t,n,r,i,o,s,a,u,c,l,f){"use strict";function d(e){return s.isMacintosh?n.readdirSync(e).map(function(e){return o.normalizeNFC(e)}):n.readdirSync(e)}function p(e,t){return s.isMacintosh?n.readdir(e,function(e,n){return e?t(e,null):t(null,n.map(function(e){return o.normalizeNFC(e)}))}):n.readdir(e,t)}function h(e,t,i,o){o||(o=Object.create(null)),n.stat(e,function(s,a){if(s)return i(s);if(!a.isDirectory())return function(e,t,r,i){var o=n.createReadStream(e),s=n.createWriteStream(t,{mode:r}),a=!1,u=function(e){a||(a=!0,e?i(e):n.chmod(t,r,i))}
;o.once("error",function(e){return u(e)}),s.once("error",function(e){return u(e)}),s.once("close",function(){return u()}),o.pipe(s)}(e,t,511&a.mode,i);if(o[e])return i(null);o[e]=!0;var u=function(){p(e,function(n,s){w(s,function(n,i){h(r.join(e,n),r.join(t,n),function(e){return i(e,void 0)},o)},i)})};g(t,511&a.mode).done(u,u)})}function g(e,t,o){var s=function(){return i.nfcall(n.mkdir,e,t).then(null,function(t){return"ENOENT"===t.code?c.TPromise.wrapError(t):i.nfcall(n.stat,e).then(function(t){return t.isDirectory()?null:c.TPromise.wrapError(new Error("'"+e+"' exists and is not a directory."))},function(e){return c.TPromise.wrapError(t)})})};return e===r.dirname(e)?c.TPromise.as(!0):s().then(null,function(n){return o&&o.isCancellationRequested?c.TPromise.as(!1):"ENOENT"===n.code?g(r.dirname(e),t).then(s):c.TPromise.wrapError(n)})}function v(e,t){if("\\"===e||"/"===e)return t(new Error("Will not delete root!"));n.exists(e,function(i){i?n.lstat(e,function(i,o){
if(i||!o)t(i);else if(!o.isDirectory()||o.isSymbolicLink()){var s=o.mode;128&s?n.unlink(e,t):n.chmod(e,128|s,function(r){r?t(r):n.unlink(e,t)})}else p(e,function(i,o){if(i||!o)t(i);else if(0===o.length)n.rmdir(e,t);else{var s=null,a=o.length;o.forEach(function(i){v(r.join(e,i),function(r){a--,r&&(s=s||r),0===a&&(s?t(s):n.rmdir(e,t))})})}})}):t(null)})}function m(e){try{var t=n.lstatSync(e);t.isDirectory()&&!t.isSymbolicLink()?(d(e).forEach(function(t){return m(r.join(e,t))}),n.rmdirSync(e)):n.unlinkSync(e)}catch(e){if("ENOENT"===e.code)return;throw e}}function y(e,t,r,i){r=b(r),"string"==typeof t||Buffer.isBuffer(t)?function(e,t,r,i){r.encoding&&(t=l.encode(t,r.encoding.charset,{addBOM:r.encoding.addBOM}));if(!C)return n.writeFile(e,t,{mode:r.mode,flag:r.flag},i);n.open(e,r.flag,r.mode,function(e,r){if(e)return i(e);n.writeFile(r,t,function(e){if(e)return n.close(r,function(){return i(e)});n.fdatasync(r,function(e){
return e&&(console.warn("[node.js fs] fdatasync is now disabled for this session because it failed: ",e),C=!1),n.close(r,function(e){return i(e)})})})})}(e,t,r,i):function(e,t,r,i){var o,s,a=!1,u=function(e){a||(a=!0,e?s?(c.once("close",function(){return i(e)}),c.close()):i(e):i())},c=n.createWriteStream(e,{mode:r.mode,flags:r.flag,autoClose:!1});c.once("open",function(e){o=e,s=!0,r.encoding&&(t=t.pipe(l.encodeStream(r.encoding.charset,{addBOM:r.encoding.addBOM}))),t.pipe(c)}),t.once("error",function(e){return u(e)}),c.once("error",function(e){return u(e)}),c.once("finish",function(){C&&s?n.fdatasync(o,function(e){e&&(console.warn("[node.js fs] fdatasync is now disabled for this session because it failed: ",e),C=!1),c.close()}):c.close()}),c.once("close",function(){return u()})}(e,t,r,i)}function b(e){if(!e)return{mode:438,flag:"w"};var t={mode:e.mode,flag:e.flag,encoding:e.encoding};return"number"!=typeof t.mode&&(t.mode=438),"string"!=typeof t.flag&&(t.flag="w"),t}function _(e){var t=r.dirname(e)
;if(e===t)return e;var n=(r.basename(e)||e).toLowerCase();try{var i=d(t).filter(function(e){return e.toLowerCase()===n});if(1===i.length){if(s=_(t))return r.join(s,i[0])}else if(i.length>1){var o=i.indexOf(n);if(o>=0){var s=_(t);if(s)return r.join(s,i[o])}}}catch(e){}return null}function E(e){return a.rtrim(r.normalize(e),r.sep)}Object.defineProperty(t,"__esModule",{value:!0});var w=f.loop;t.readdirSync=d,t.readdir=p,t.statLink=function(e,t){n.lstat(e,function(r,i){r||i.isSymbolicLink()?n.stat(e,function(e,n){if(e)return t(e,null);t(null,{stat:n,isSymbolicLink:i&&i.isSymbolicLink()})}):t(null,{stat:i,isSymbolicLink:!1})})},t.copy=h,t.mkdirp=g,t.del=function(e,t,i,o){n.exists(e,function(s){if(!s)return i(null);n.stat(e,function(s,c){if(s||!c)return i(s);if("."===e[e.length-1]||a.endsWith(e,"./")||a.endsWith(e,".\\"))return v(e,i);var l=r.join(t,u.generateUuid());n.rename(e,l,function(t){if(t)return v(e,i);i(null),v(l,function(e){e&&console.error(e),o&&o(e)})})})})},t.delSync=m,t.mv=function(e,t,r){
function i(e){if(e)return r(e);n.stat(t,function(e,i){return e?r(e):i.isDirectory()?r(null):void n.open(t,"a",null,function(e,t){if(e)return r(e);n.futimes(t,i.atime,new Date,function(e){if(e)return r(e);n.close(t,r)})})})}if(e===t)return r(null);n.rename(e,t,function(n){return n?n&&e.toLowerCase()!==t.toLowerCase()&&"EXDEV"===n.code||a.endsWith(e,".")?h(e,t,function(t){if(t)return r(t);v(e,i)}):r(n):i(null)})};var C=!0;t.writeFileAndFlush=y,t.writeFileAndFlushSync=function(e,t,r){if((r=b(r)).encoding&&(t=l.encode(t,r.encoding.charset,{addBOM:r.encoding.addBOM})),!C)return n.writeFileSync(e,t,{mode:r.mode,flag:r.flag});var i=n.openSync(e,r.flag,r.mode);try{n.writeFileSync(i,t);try{n.fdatasyncSync(i)}catch(e){console.warn("[node.js fs] fdatasyncSync is now disabled for this session because it failed: ",e),C=!1}}finally{n.closeSync(i)}},t.realcaseSync=_,t.realpathSync=function(e){try{return n.realpathSync(e)}catch(r){var t=E(e);return n.accessSync(t,n.constants.R_OK),t}},t.realpath=function(e,t){
return n.realpath(e,function(r,i){if(!r)return t(null,i);var o=E(e);return n.access(o,n.constants.R_OK,function(e){return t(e,o)})})},t.watch=function(e,t,r){try{var i=n.watch(e);return i.on("change",function(e,n){var r=null;n&&(r=n.toString(),s.isMacintosh&&(r=o.normalizeNFC(r))),t(e,r)}),i.on("error",function(t,n){return r("Failed to watch "+e+" for changes ("+t+", "+n+")")}),i}catch(t){n.exists(e,function(n){n&&r("Failed to watch "+e+" for changes ("+t.toString()+")")})}}}),define(e[99],t([0,1,19,5,9,4,3,43,36,8]),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={changeBufferDelay:0,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){var t;try{this.parseErrors=[],
t=this.options.parse?this.options.parse(e,this.parseErrors):a.parse(e,this.parseErrors)}catch(e){}return t||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;if(!this.disposed){var r=u.watch(e,function(e,r){return n.onConfigFileChange(e,r,t)},function(e){return n.options.onError(e)});r&&this.disposables.push(o.toDisposable(function(){r.removeAllListeners(),r.close()}))}},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))},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.getValue=function(e,t){if(this.ensureLoaded(),!e)return t;var n=this.cache?this.cache[e]:void 0;return void 0!==n?n:t},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[14],t([0,1,2,36,5,10,19,27,8,3]),function(e,t,n,r,i,o,s,a,u,c){"use strict";function l(e){return o.nfcall(r.readdir,e)}function f(e){return p(e).then(function(t){return t.isDirectory()&&!t.isSymbolicLink()?l(e).then(function(t){return n.TPromise.join(t.map(function(t){return f(i.join(e,t))}))}).then(function(){return h(e)}):g(e)},function(e){if("ENOENT"!==e.code)return n.TPromise.wrapError(e)})}function d(e){return o.nfcall(s.stat,e)}function p(e){return o.nfcall(s.lstat,e)}function h(e){
return o.nfcall(s.rmdir,e)}function g(e){return o.nfcall(s.unlink,e)}function v(e,t,n){return function(e){var t=b[e];if(!t){t=new o.Queue,b[e]=t;c.once(t.onFinished)(function(){delete b[e],t.dispose()})}return t}(function(e){var t=e;(u.isWindows||u.isMacintosh)&&(t=t.toLowerCase());return t}(e)).queue(function(){return o.nfcall(r.writeFileAndFlush,e,t,n)})}function m(e){return d(e).then(function(e){return e.isDirectory()},function(){return!1})}function y(e,t){return void 0===t&&(_||(_=a.tmpdir()),t=_),o.nfcall(r.del,e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.readdir=l,t.exists=function(e){return new n.TPromise(function(t){return s.exists(e,t)},function(){})},t.chmod=function(e,t){return o.nfcall(s.chmod,e,t)},t.mkdirp=r.mkdirp,t.rimraf=f,t.realpath=function(e){return o.nfcall(r.realpath,e)},t.stat=d,t.statLink=function(e){return o.nfcall(r.statLink,e)},t.lstat=p,t.rename=function(e,t){return o.nfcall(s.rename,e,t)},t.rmdir=h,t.unlink=g,t.symlink=function(e,t,n){return o.nfcall(s.symlink,e,t,n)},
t.readlink=function(e){return o.nfcall(s.readlink,e)},t.truncate=function(e,t){return o.nfcall(s.truncate,e,t)},t.readFile=function(e,t){return o.nfcall(s.readFile,e,t)};var b=Object.create(null);t.writeFile=v,t.readDirsInDir=function(e){return l(e).then(function(t){return n.TPromise.join(t.map(function(t){return m(i.join(e,t))})).then(function(e){return t.filter(function(t,n){return e[n]})})})},t.dirExists=m,t.fileExists=function(e){return d(e).then(function(e){return e.isFile()},function(){return!1})};var _=null;t.del=y,t.whenDeleted=function(e){return new n.TPromise(function(t){var n=!1,r=setInterval(function(){n||(n=!0,s.exists(e,function(e){n=!1,e||(clearInterval(r),t(null))}))},1e3)})},t.copy=function(e,t){return o.nfcall(r.copy,e,t)}}),define(e[104],t([0,1,2,4,3]),function(e,t,n,r,i){"use strict";function o(e,t){void 0===t&&(t=void 0);var n=Buffer.allocUnsafe(4),r=function(e){return void 0===e?{buffer:d,type:f.Undefined}:"string"==typeof e?{buffer:Buffer.from(e),type:f.String}:Buffer.isBuffer(e)?{
buffer:e,type:f.Buffer}:{buffer:Buffer.from(JSON.stringify(e)),type:f.Object}}(t),i=r.buffer,o=r.type,s=Buffer.from(JSON.stringify([e,o]));return n.writeUInt32BE(s.byteLength,0),Buffer.concat([n,s,i])}function s(e){var t=e.readUInt32BE(0),n=e.slice(4,4+t),r=e.slice(4+t),i=JSON.parse(n.toString());return{header:i[0],body:function(e,t){switch(t){case f.Undefined:return;case f.String:return e.toString();case f.Buffer:return e;case f.Object:return JSON.parse(e.toString())}}(r,i[1])}}function a(e){return{call:function(t,n){return e.then(function(e){return e.call(t,n)})},listen:function(t,n){var r=new i.Relay;return e.then(function(e){return r.input=e.listen(t,n)}),r.event}}}Object.defineProperty(t,"__esModule",{value:!0});var u;!function(e){e[e.Promise=100]="Promise",e[e.PromiseCancel=101]="PromiseCancel",e[e.EventListen=102]="EventListen",e[e.EventDispose=103]="EventDispose"}(u=t.RequestType||(t.RequestType={}));var c;!function(e){e[e.Initialize=200]="Initialize",e[e.PromiseSuccess=201]="PromiseSuccess",
e[e.PromiseError=202]="PromiseError",e[e.PromiseErrorObj=203]="PromiseErrorObj",e[e.EventFire=204]="EventFire"}(c=t.ResponseType||(t.ResponseType={}));var l;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Idle=1]="Idle"}(l||(l={}));var f;!function(e){e[e.Undefined=0]="Undefined",e[e.String=1]="String",e[e.Buffer=2]="Buffer",e[e.Object=3]="Object"}(f||(f={}));var d=Buffer.allocUnsafe(0),p=function(){function e(e){var t=this;this.protocol=e,this.channels=Object.create(null),this.activeRequests=Object.create(null),this.protocolListener=this.protocol.onMessage(function(e){return t.onRawMessage(e)}),this.sendResponse({type:c.Initialize})}return e.prototype.registerChannel=function(e,t){this.channels[e]=t},e.prototype.onPromise=function(e){var t,i=this,o=this.channels[e.channelName];try{t=o.call(e.name,e.arg)}catch(e){t=n.TPromise.wrapError(e)}var s=e.id,a=t.then(function(t){i.sendResponse({id:s,data:t,type:c.PromiseSuccess}),delete i.activeRequests[e.id]},function(t){t instanceof Error?i.sendResponse({id:s,
data:{message:t.message,name:t.name,stack:t.stack?t.stack.split?t.stack.split("\n"):t.stack:void 0},type:c.PromiseError}):i.sendResponse({id:s,data:t,type:c.PromiseErrorObj}),delete i.activeRequests[e.id]});this.activeRequests[e.id]=r.toDisposable(function(){return a.cancel()})},e.prototype.onEventListen=function(e){var t=this,n=this.channels[e.channelName],r=e.id,i=n.listen(e.name,e.arg)(function(e){return t.sendResponse({id:r,data:e,type:c.EventFire})});this.activeRequests[e.id]=i},e.prototype.disposeActiveRequest=function(e){var t=this.activeRequests[e.id];t&&(t.dispose(),delete this.activeRequests[e.id])},e.prototype.onRawMessage=function(e){var t,n=s(e),r=n.header,i=n.body;switch(r[0]){case u.Promise:case u.EventListen:t={type:r[0],id:r[1],channelName:r[2],name:r[3],arg:i};break;case u.PromiseCancel:case u.EventDispose:t={type:r[0],id:r[1]};break;default:return}this.onRequest(t)},e.prototype.onRequest=function(e){switch(e.type){case u.Promise:this.onPromise(e);break;case u.EventListen:
this.onEventListen(e);break;case u.PromiseCancel:case u.EventDispose:this.disposeActiveRequest(e)}},e.prototype.sendResponse=function(e){var t;switch(e.type){case c.Initialize:t=o([e.type]);break;case c.PromiseSuccess:case c.PromiseError:case c.EventFire:case c.PromiseErrorObj:t=o([e.type,e.id],e.data)}this.sendRawMessage(t)},e.prototype.sendRawMessage=function(e){try{this.protocol.send(e)}catch(e){}},e.prototype.dispose=function(){var e=this;this.protocolListener.dispose(),this.protocolListener=null,Object.keys(this.activeRequests).forEach(function(t){e.activeRequests[t].dispose()}),this.activeRequests=null},e}();t.ChannelServer=p;var h=function(){function e(e){var t=this;this.protocol=e,this.state=l.Uninitialized,this.activeRequests=[],this.bufferedRequests=[],this.handlers=Object.create(null),this.lastRequestId=0,this._onDidInitialize=new i.Emitter,this.onDidInitialize=this._onDidInitialize.event,this.protocolListener=this.protocol.onMessage(function(e){return t.onRawMessage(e)})}
return e.prototype.getChannel=function(e){var t=this;return{call:function(n,r){return t.requestPromise(e,n,r)},listen:function(n,r){return t.requestEvent(e,n,r)}}},e.prototype.requestPromise=function(e,t,n){var i=this,o={raw:{id:this.lastRequestId++,type:u.Promise,channelName:e,name:t,arg:n}},s=this.state===l.Uninitialized?this.bufferRequest(o):this.doRequest(o),a=r.toDisposable(function(){return s.cancel()});return this.activeRequests.push(a),s.then(null,function(e){return null}).done(function(){return i.activeRequests=i.activeRequests.filter(function(e){return e!==a})}),s},e.prototype.requestEvent=function(e,t,n){var r=this,o=this.lastRequestId++,s={raw:{id:o,type:u.EventListen,channelName:e,name:t,arg:n}},a=null,c=new i.Emitter({onFirstListenerAdd:function(){(a=r.whenInitialized()).then(function(){a=null,r.sendRequest(s.raw)})},onLastListenerRemove:function(){a?(a.cancel(),a=null):r.sendRequest({id:o,type:u.EventDispose})}});return this.handlers[o]=function(e){return c.fire(e.data)},c.event},
e.prototype.doRequest=function(e){var t=this,r=e.raw.id;return new n.TPromise(function(n,i){t.handlers[r]=function(e){switch(e.type){case c.PromiseSuccess:delete t.handlers[r],n(e.data);break;case c.PromiseError:delete t.handlers[r];var o=new Error(e.data.message);o.stack=e.data.stack,o.name=e.data.name,i(o);break;case c.PromiseErrorObj:delete t.handlers[r],i(e.data)}},t.sendRequest(e.raw)},function(){return t.sendRequest({id:r,type:u.PromiseCancel})})},e.prototype.bufferRequest=function(e){var t=this,r=null;return new n.TPromise(function(n,i){t.bufferedRequests.push(e),e.flush=function(){e.flush=null,r=t.doRequest(e).then(n,i)}},function(){if(e.flush=null,t.state===l.Uninitialized){var n=t.bufferedRequests.indexOf(e);-1!==n&&t.bufferedRequests.splice(n,1)}else r&&(r.cancel(),r=null)})},e.prototype.onRawMessage=function(e){var t,n=s(e),r=n.header,i=n.body;switch(r[0]){case c.Initialize:t={type:r[0]};break;case c.PromiseSuccess:case c.PromiseError:case c.EventFire:case c.PromiseErrorObj:t={type:r[0],id:r[1],
data:i};break;default:return}this.onResponse(t)},e.prototype.onResponse=function(e){if(e.type===c.Initialize)return this.state=l.Idle,this._onDidInitialize.fire(),this.bufferedRequests.forEach(function(e){return e.flush&&e.flush()}),void(this.bufferedRequests=null);var t=this.handlers[e.id];t&&t(e)},e.prototype.sendRequest=function(e){var t;switch(e.type){case u.Promise:case u.EventListen:t=o([e.type,e.id,e.channelName,e.name],e.arg);break;case u.PromiseCancel:case u.EventDispose:t=o([e.type,e.id])}this.sendRawMessage(t)},e.prototype.sendRawMessage=function(e){try{this.protocol.send(e)}catch(e){}},e.prototype.whenInitialized=function(){return this.state===l.Idle?n.TPromise.as(null):n.TPromise.wrap(i.toPromise(this.onDidInitialize))},e.prototype.dispose=function(){this.protocolListener.dispose(),this.protocolListener=null,this.activeRequests=r.dispose(this.activeRequests)},e}();t.ChannelClient=h;var g=function(){function e(e){var t=this;this.channels=Object.create(null),this.channelClients=Object.create(null),
this.onClientAdded=new i.Emitter,e(function(e){var n=e.protocol,r=e.onDidClientDisconnect;i.once(n.onMessage)(function(e){var i=new p(n),o=new h(n);Object.keys(t.channels).forEach(function(e){return i.registerChannel(e,t.channels[e])});var s=e.toString();t.channelClients[s]=o,t.onClientAdded.fire(s),r(function(){i.dispose(),o.dispose(),delete t.channelClients[s]})})})}return e.prototype.getChannel=function(e,t){var n=this;return{call:function(r,i){return a(t.routeCall(r,i).then(function(e){return n.getClient(e)}).then(function(t){return t.getChannel(e)})).call(r,i)},listen:function(r,i){return a(t.routeEvent(r,i).then(function(e){return n.getClient(e)}).then(function(t){return t.getChannel(e)})).listen(r,i)}}},e.prototype.registerChannel=function(e,t){this.channels[e]=t},e.prototype.getClient=function(e){var t=this;if(!e)return n.TPromise.wrapError(new Error("Client id should be provided"));var r=this.channelClients[e];return r?n.TPromise.as(r):new n.TPromise(function(n){
i.once(i.filterEvent(t.onClientAdded.event,function(t){return t===e}))(function(){return n(t.channelClients[e])})})},e.prototype.dispose=function(){this.channels=Object.create(null),this.channelClients=Object.create(null),this.onClientAdded.dispose()},e}();t.IPCServer=g;var v=function(){function e(e,t){e.send(Buffer.from(t)),this.channelClient=new h(e),this.channelServer=new p(e)}return e.prototype.getChannel=function(e){return this.channelClient.getChannel(e)},e.prototype.registerChannel=function(e,t){this.channelServer.registerChannel(e,t)},e.prototype.dispose=function(){this.channelClient.dispose(),this.channelClient=null,this.channelServer.dispose(),this.channelServer=null},e}();t.IPCClient=v,t.getDelayedChannel=a,t.getNextTickChannel=function(e){var t=!1;return{call:function(r,i){return t?e.call(r,i):n.TPromise.timeout(0).then(function(){return t=!0}).then(function(){return e.call(r,i)})},listen:function(r,o){if(t)return e.listen(r,o);var s=new i.Relay;return n.TPromise.timeout(0).then(function(){
return t=!0}).then(function(){return s.input=e.listen(r,o)}),s.event}}}}),define(e[108],t([0,1,121,2,3,104,5,27,24,10]),function(e,t,r,i,o,s,a,u,c,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateRandomPipeName=function(){var e=c.generateUuid();return"win32"===process.platform?"\\\\.\\pipe\\vscode-ipc-"+e+"-sock":a.join(u.tmpdir(),"vscode-ipc-"+e+".sock")};var f=function(){function e(t,n){var r=this;this._socket=t,this._onMessage=new o.Emitter,this.onMessage=this._onMessage.event,this._onClose=new o.Emitter,this.onClose=this._onClose.event,this._writeBuffer=new(function(){function e(){this._data=[],this._totalLength=0}return e.prototype.add=function(e,t){var n=0===this._totalLength;return this._data.push(e,t),this._totalLength+=e.length+t.length,n},e.prototype.take=function(){var e=Buffer.concat(this._data,this._totalLength);return this._data.length=0,this._totalLength=0,e},e}()),this._isDisposed=!1,this._chunks=[];var i=0,s={readHead:!0,bodyLen:-1},a=function(t){
for(r._chunks.push(t),i+=t.length;i>0;){if(s.readHead){if(!(i>=e._headerLen))break;n=Buffer.concat(r._chunks);s.bodyLen=n.readUInt32BE(0),s.readHead=!1;a=n.slice(e._headerLen);i=a.length,r._chunks=[a]}if(!s.readHead){if(!(i>=s.bodyLen))break;var n,o=(n=Buffer.concat(r._chunks)).slice(0,s.bodyLen),a=n.slice(s.bodyLen);if(i=a.length,r._chunks=[a],s.bodyLen=-1,s.readHead=!0,r._onMessage.fire(o),r._isDisposed)break}}},u=function(){if(n&&n.length>0){var e=n;n=null,a(e)}};this._firstChunkTimer=new l.TimeoutTimer,this._firstChunkTimer.setIfNotSet(function(){u()},0),this._socketDataListener=function(e){u(),a(e)},t.on("data",this._socketDataListener),this._socketEndListener=function(){u()},t.on("end",this._socketEndListener),this._socketCloseListener=function(){r._onClose.fire()},t.once("close",this._socketCloseListener)}return e.prototype.dispose=function(){this._isDisposed=!0,this._firstChunkTimer.dispose(),this._socket.removeListener("data",this._socketDataListener),
this._socket.removeListener("end",this._socketEndListener),this._socket.removeListener("close",this._socketCloseListener)},e.prototype.end=function(){this._socket.end()},e.prototype.getBuffer=function(){return Buffer.concat(this._chunks)},e.prototype.send=function(t){var n=Buffer.allocUnsafe(e._headerLen);n.writeUInt32BE(t.length,0,!0),this._writeSoon(n,t)},e.prototype._writeSoon=function(e,t){var n=this;this._writeBuffer.add(e,t)&&setImmediate(function(){n._socket.destroyed||n._socket.write(n._writeBuffer.take())})},e._headerLen=4,e}();t.Protocol=f;var d=function(e){function t(n){var r=e.call(this,t.toClientConnectionEvent(n))||this;return r.server=n,r}return n(t,e),t.toClientConnectionEvent=function(e){var t=o.fromNodeEventEmitter(e,"connection");return o.mapEvent(t,function(e){return{protocol:new f(e),onDidClientDisconnect:o.once(o.fromNodeEventEmitter(e,"close"))}})},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.server.close(),this.server=null},t}(s.IPCServer);t.Server=d
;var p=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.protocol=t,r}return n(t,e),t.fromSocket=function(e,n){return new t(new f(e),n)},Object.defineProperty(t.prototype,"onClose",{get:function(){return this.protocol.onClose},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.protocol.end()},t}(s.IPCClient);t.Client=p,t.serve=function(e){return new i.TPromise(function(t,n){var i=r.createServer();i.on("error",n),i.listen(e,function(){i.removeListener("error",n),t(new d(i))})})},t.connect=function(e,t){return new i.TPromise(function(n,i){var o=r.createConnection(e,function(){o.removeListener("error",i),n(p.fromSocket(o,t))});o.once("error",i)})}}),define(e[50],t([13,12]),function(e,t){return e.create("vs/base/common/errorMessage",t)}),define(e[41],t([0,1,50,7,20]),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[54],t([13,12]),function(e,t){return e.create("vs/base/common/severity",t)}),define(e[55],t([0,1,54,15]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i;!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(i||(i={})),function(e){var t="error",i="warning",o="warn",s="info",a=Object.create(null);a[e.Error]=n.localize(0,null),a[e.Warning]=n.localize(1,null),
a[e.Info]=n.localize(2,null),e.fromValue=function(n){return n?r.equalsIgnoreCase(t,n)?e.Error:r.equalsIgnoreCase(i,n)||r.equalsIgnoreCase(o,n)?e.Warning:r.equalsIgnoreCase(s,n)?e.Info:e.Ignore:e.Ignore}}(i||(i={})),t.default=i}),define(e[56],t([13,12]),function(e,t){return e.create("vs/base/node/zip",t)}),define(e[57],t([13,12]),function(e,t){return e.create("vs/platform/configuration/common/configurationRegistry",t)}),define(e[58],t([13,12]),function(e,t){return e.create("vs/platform/dialogs/common/dialogs",t)}),define(e[59],t([13,12]),function(e,t){return e.create("vs/platform/extensionManagement/common/extensionManagement",t)}),define(e[60],t([13,12]),function(e,t){return e.create("vs/platform/extensionManagement/node/extensionManagementService",t)}),define(e[61],t([13,12]),function(e,t){return e.create("vs/platform/extensions/node/extensionValidator",t)}),define(e[62],t([13,12]),function(e,t){return e.create("vs/platform/request/node/request",t)}),define(e[98],t([13,12]),function(e,t){
return e.create("vs/platform/telemetry/common/telemetryService",t)}),define(e[64],t([13,12]),function(e,t){return e.create("vs/platform/workspaces/common/workspaces",t)}),define(e[65],t([0,1,17,5,19,2,3,14]),function(e,t,n,r,i,o,s,a){"use strict";function u(e){var t=new s.Emitter,n=i.createReadStream(e.fsPath);return n.on("data",function(e){return t.fire(e)}),n.on("error",function(e){return t.fire(e.toString())}),n.on("close",function(){return t.fire()}),t.event}Object.defineProperty(t,"__esModule",{value:!0}),t.upload=u;var c=function(){function e(){}return e.prototype.listen=function(e,t){switch(e){case"upload":return s.buffer(u(n.default.revive(t)))}},e.prototype.call=function(e,t){throw new Error("No calls")},e}();t.DownloadServiceChannel=c;var l=function(){function e(e,t){this.channel=e,this.uriTransformer=t}return e.prototype.download=function(e,t){var n=this;e=this.uriTransformer.transformOutgoing(e);var s,u=r.dirname(t);return new o.TPromise(function(r,o){return a.mkdirp(u).then(function(){
(s=i.createWriteStream(t)).once("close",function(){return r(null)}),s.once("error",o);var a=n.channel.listen("upload",e)(function(e){void 0===e?(s.end(),a.dispose(),r(null)):Buffer.isBuffer(e)?s.write(e):"string"==typeof e&&(s.close(),a.dispose(),o(e))})})})},e}();t.DownloadServiceChannelClient=l});var s=this&&this.__assign||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};define(e[33],t([0,1,15]),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)}function i(e){return e.toLocaleLowerCase()}function o(e,t){return e.toLocaleLowerCase()+"."+t.toLocaleLowerCase()}function a(e){return e.manifest?o(e.manifest.publisher,e.manifest.name):e.identifier.id}Object.defineProperty(t,"__esModule",{value:!0}),t.areSameExtensions=r,t.adoptToGalleryExtensionId=i,t.getGalleryExtensionId=o,t.getGalleryExtensionIdFromLocal=a,
t.LOCAL_EXTENSION_ID_REGEX=/^([^.]+\..+)-(\d+\.\d+\.\d+(-.*)?)$/,t.getIdFromLocalExtensionId=function(e){var n=t.LOCAL_EXTENSION_ID_REGEX.exec(e);return i(n&&n[1]?n[1]:e)},t.getLocalExtensionId=function(e,t){return e+"-"+t},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:a(e),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 s({id:e.identifier.id,name:e.name,galleryId:e.identifier.uuid,publisherId:e.publisherId,publisherName:e.publisher,publisherDisplayName:e.publisherDisplayName,
dependencies:e.properties.dependencies.length>0},e.telemetryData)},t.BetterMergeDisabledNowKey="extensions/bettermergedisablednow",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};var u=new Set;["vscode.extension-editing","vscode.configuration-editing","vscode.search-rg","vscode.css-language-features","vscode.git","vscode.grunt","vscode.gulp","vscode.html-language-features","vscode.json-language-features","vscode.markdown-language-features","vscode.npm","vscode.php-language-features","vscode.typescript-language-features","ms-vscode.node-debug","ms-vscode.node-debug2","ms-python.python","eg2.tslint","dbaeumer.vscode-eslint","eamodio.gitlens"].forEach(function(e){return u.add(e)}),t.isWorkspaceExtension=function(e,t){var n=o(e.publisher,e.name),r=t.getValue("_workbench.workspaceExtensions")||[];if(r.length){if(-1!==r.indexOf(n))return!0;if(-1!==r.indexOf("-"+n))return!1}
return!!e.main&&(-1!==(e.categories||[]).indexOf("Workspace Extension")||u.has(n))}}),define(e[67],t([0,1,9]),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}})}}),define(e[68],t([0,1,3,17]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this.service=e,this.onInstallExtension=n.buffer(e.onInstallExtension,!0),this.onDidInstallExtension=n.buffer(e.onDidInstallExtension,!0),this.onUninstallExtension=n.buffer(e.onUninstallExtension,!0),this.onDidUninstallExtension=n.buffer(e.onDidUninstallExtension,!0)}return e.prototype.listen=function(e){switch(e){case"onInstallExtension":return this.onInstallExtension;case"onDidInstallExtension":return this.onDidInstallExtension;case"onUninstallExtension":return this.onUninstallExtension;case"onDidUninstallExtension":
return this.onDidUninstallExtension}throw new Error("Invalid listen")},e.prototype.call=function(e,t){switch(e){case"zip":return this.service.zip(this._transform(t[0]));case"unzip":return this.service.unzip(r.default.revive(t[0]),t[1]);case"install":return this.service.install(r.default.revive(t[0]));case"installFromGallery":return this.service.installFromGallery(t[0]);case"uninstall":return this.service.uninstall(this._transform(t[0]),t[1]);case"reinstallFromGallery":return this.service.reinstallFromGallery(this._transform(t[0]));case"getInstalled":return this.service.getInstalled(t[0]);case"updateMetadata":return this.service.updateMetadata(this._transform(t[0]),t[1]);case"getExtensionsReport":return this.service.getExtensionsReport()}throw new Error("Invalid call")},e.prototype._transform=function(e){return e?s({},e,{location:r.default.revive(e.location)}):e},e}();t.ExtensionManagementChannel=i;var o=function(){function e(e,t){this.channel=e,this.uriTransformer=t}
return Object.defineProperty(e.prototype,"onInstallExtension",{get:function(){return this.channel.listen("onInstallExtension")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidInstallExtension",{get:function(){var e=this;return n.mapEvent(this.channel.listen("onDidInstallExtension"),function(t){return s({},t,{local:e._transformIncoming(t.local)})})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onUninstallExtension",{get:function(){return this.channel.listen("onUninstallExtension")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidUninstallExtension",{get:function(){return this.channel.listen("onDidUninstallExtension")},enumerable:!0,configurable:!0}),e.prototype.zip=function(e){var t=this;return this.channel.call("zip",[this._transformOutgoing(e)]).then(function(e){return r.default.revive(t.uriTransformer.transformIncoming(e))})},e.prototype.unzip=function(e,t){return this.channel.call("unzip",[this.uriTransformer.transformOutgoing(e),t])},
e.prototype.install=function(e){return this.channel.call("install",[this.uriTransformer.transformOutgoing(e)])},e.prototype.installFromGallery=function(e){return this.channel.call("installFromGallery",[e])},e.prototype.uninstall=function(e,t){return void 0===t&&(t=!1),this.channel.call("uninstall",[this._transformOutgoing(e),t])},e.prototype.reinstallFromGallery=function(e){return this.channel.call("reinstallFromGallery",[this._transformOutgoing(e)])},e.prototype.getInstalled=function(e){var t=this;return void 0===e&&(e=null),this.channel.call("getInstalled",[e]).then(function(e){return e.map(function(e){return t._transformIncoming(e)})})},e.prototype.updateMetadata=function(e,t){var n=this;return this.channel.call("updateMetadata",[this._transformOutgoing(e),t]).then(function(e){return n._transformIncoming(e)})},e.prototype.getExtensionsReport=function(){return this.channel.call("getExtensionsReport")},e.prototype._transformIncoming=function(e){return e?s({},e,{
location:r.default.revive(this.uriTransformer.transformIncoming(e.location))}):e},e.prototype._transformOutgoing=function(e){return e?s({},e,{location:this.uriTransformer.transformOutgoing(e.location)}):e},e}();t.ExtensionManagementChannelClient=o}),define(e[69],t([0,1]),function(e,t){"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"}),define(e[70],t([0,1,4,5,69,14]),function(e,t,r,i,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t,n){var r=e.call(this)||this;return r.environmentService=t,r.extensionsManifestCache=i.join(r.environmentService.userDataPath,o.MANIFEST_CACHE_FOLDER,o.USER_MANIFEST_CACHE_FILE),r._register(n.onDidInstallExtension(function(e){return r.onDidInstallExtension(e)})),r._register(n.onDidUninstallExtension(function(e){return r.onDidUnInstallExtension(e)})),r}return n(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).done(function(){},function(){})},t}(r.Disposable);t.ExtensionsManifestCache=a}),define(e[38],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.ctor=e,this.staticArguments=t}}();t.SyncDescriptor=n,t.createSyncDescriptor=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new(n.bind.apply(n,[void 0,e].concat(t)))}}),define(e[6],t([0,1]),function(e,t){"use strict";function n(e,t,n,r){t[i.DI_TARGET]===t?t[i.DI_DEPENDENCIES].push({id:e,index:n,optional:r}):(t[i.DI_DEPENDENCIES]=[{id:e,index:n,optional:r}],t[i.DI_TARGET]=t)}function r(e){if(i.serviceIds.has(e))return i.serviceIds.get(e);var t=function(e,r,i){
if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");n(t,e,i,!1)};return t.toString=function(){return e},i.serviceIds.set(e,t),t}Object.defineProperty(t,"__esModule",{value:!0});var i;!function(e){e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=function(t){return t[e.DI_DEPENDENCIES]||[]}}(i=t._util||(t._util={})),t.IInstantiationService=r("instantiationService"),t.createDecorator=r,t.optional=function(e){return function(t,r,i){if(3!==arguments.length)throw new Error("@optional-decorator can only be used to decorate a parameter");n(e,t,i,!0)}}}),define(e[35],t([0,1,6,31,58]),function(e,t,n,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDialogService=n.createDecorator("dialogService");var o=10;t.getConfirmMessage=function(e,t){var n=[e];return n.push(""),n.push.apply(n,t.slice(0,o).map(function(e){return r.basename(e.fsPath)})),
t.length>o&&(t.length-o==1?n.push(i.localize(0,null)):n.push(i.localize(1,null,t.length-o))),n.push(""),n.join("\n")}});var a=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},u=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};define(e[74],t([0,1,2,35]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this.dialogService=e}return e.prototype.listen=function(e){throw new Error("No event found")},e.prototype.call=function(e,t){switch(e){case"show":return this.dialogService.show(t[0],t[1],t[2]);case"confirm":return this.dialogService.confirm(t[0])}return n.TPromise.wrapError(new Error("invalid command"))},e=a([u(0,r.IDialogService)],e)}()
;t.DialogChannel=i;var o=function(){function e(e){this.channel=e}return e.prototype.show=function(e,t,n){return this.channel.call("show",[e,t,n])},e.prototype.confirm=function(e){return this.channel.call("confirm",[e])},e}();t.DialogChannelClient=o}),define(e[42],t([0,1,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDownloadService=n.createDecorator("downloadService")}),define(e[18],t([0,1,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IEnvironmentService=n.createDecorator("environmentService")}),define(e[28],t([0,1,59,6]),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)};!function(e){e[e.System=0]="System",
e[e.User=1]="User"}(t.LocalExtensionType||(t.LocalExtensionType={})),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.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[47],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[79],t([0,1,16,7,44,100,38,6,47]),function(e,t,n,r,i,o,s,a,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){void 0===e&&(e=new u.ServiceCollection),void 0===t&&(t=!1),this._services=e,this._strict=t,this._services.set(a.IInstantiationService,this)}return e.prototype.createChild=function(t){var n=this;return this._services.forEach(function(e,r){t.has(e)||(r instanceof s.SyncDescriptor&&(r=n._createAndCacheServiceInstance(e,r)),t.set(e,r))}),new e(t,this._strict)},e.prototype.invokeFunction=function(e){for(var t=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var o;try{return o={get:function(e,n){var r=t._getOrCreateServiceInstance(e)
;if(!r&&n!==a.optional)throw new Error("[invokeFunction] unknown service '"+e+"'");return r}},e.apply(void 0,[o].concat(r))}finally{o.get=function(){throw n.illegalState("service accessor is only valid during the invocation of its target method")}}},e.prototype.createInstance=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return e instanceof s.SyncDescriptor?this._createInstance(e,t):this._createInstance(new s.SyncDescriptor(e),t)},e.prototype._createInstance=function(e,t){for(var n=e.staticArguments.concat(t),i=a._util.getServiceDependencies(e.ctor).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);if(!l&&this._strict&&!c.optional)throw new Error("[createInstance] "+e.ctor.name+" depends on UNKNOWN service "+c.id+".");o.push(l)}var f=i.length>0?i[0].index:n.length;if(n.length!==f){
console.warn("[createInstance] First service dependency of "+e.ctor.name+" at position "+(f+1)+" conflicts with "+n.length+" static arguments");var d=f-n.length;n=d>0?n.concat(new Array(d)):n.slice(0,f)}var p=[e.ctor];return p.push.apply(p,n),p.push.apply(p,o),r.create.apply(null,p)},e.prototype._getOrCreateServiceInstance=function(e){var t=this._services.get(e);return t instanceof s.SyncDescriptor?this._createAndCacheServiceInstance(e,t):t},e.prototype._createAndCacheServiceInstance=function(e,t){function n(){var e=new Error("[createInstance] cyclic dependency between services");throw e.message=r.toString(),e}i.ok(this._services.get(e)instanceof s.SyncDescriptor);for(var r=new o.Graph(function(e){return e.id.toString()}),u=0,c=[{id:e,desc:t}];c.length;){var l=c.pop();r.lookupOrInsertNode(l),u++>100&&n();for(var f=0,d=a._util.getServiceDependencies(l.desc.ctor);f<d.length;f++){var p=d[f],h=this._services.get(p.id);if(h||console.warn("[createInstance] "+e+" depends on "+p.id+" which is NOT registered."),
h instanceof s.SyncDescriptor){var g={id:p.id,desc:h};r.insertEdge(l,g),c.push(g)}}}for(;;){var v=r.roots();if(0===v.length){0!==r.length&&n();break}for(var m=0,y=v;m<y.length;m++){var b=y[m],_=this._createInstance(b.data.desc,[]);this._services.set(b.data.id,_),r.removeNode(b.data)}}return this._services.get(e)},e}();t.InstantiationService=c}),define(e[80],t([0,1,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Default=1]="Default",e[e.User=2]="User"}(t.KeybindingSource||(t.KeybindingSource={})),t.IKeybindingService=n.createDecorator("keybindingService")}),define(e[37],t([0,1,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Core=1]="Core",e[e.Contributed=2]="Contributed"}(t.LanguageType||(t.LanguageType={})),t.ILocalizationsService=n.createDecorator("localizationsService"),t.isValidLocalization=function(e){if("string"!=typeof e.languageId)return!1
;if(!Array.isArray(e.translations)||0===e.translations.length)return!1;for(var t=0,n=e.translations;t<n.length;t++){var r=n[t];if("string"!=typeof r.id)return!1;if("string"!=typeof r.path)return!1}return!(e.languageName&&"string"!=typeof e.languageName||e.localizedLanguageName&&"string"!=typeof e.localizedLanguageName)}}),define(e[82],t([0,1,3]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.service=e,this.onDidLanguagesChange=n.buffer(e.onDidLanguagesChange,!0)}return e.prototype.listen=function(e){switch(e){case"onDidLanguagesChange":return this.onDidLanguagesChange}throw new Error("No event found")},e.prototype.call=function(e,t){switch(e){case"getLanguageIds":return this.service.getLanguageIds(t)}},e}();t.LocalizationsChannel=r;var i=function(){function e(e){this.channel=e}return Object.defineProperty(e.prototype,"onDidLanguagesChange",{get:function(){return this.channel.listen("onDidLanguagesChange")},enumerable:!0,configurable:!0}),
e.prototype.getLanguageIds=function(e){return this.channel.call("getLanguageIds",e)},e}();t.LocalizationsChannelClient=i}),define(e[11],t([0,1,6,4,8,3]),function(e,t,r,i,o,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ILogService=r.createDecorator("logService");var a;!function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Info=2]="Info",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.Off=6]="Off"}(a=t.LogLevel||(t.LogLevel={})),t.DEFAULT_LOG_LEVEL=a.Info;var u=function(e){function r(){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 n(r,e),r.prototype.setLevel=function(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))},r.prototype.getLevel=function(){return this.level},r}(i.Disposable);t.AbstractLogService=u;var c=function(e){function r(n){void 0===n&&(n=t.DEFAULT_LOG_LEVEL)
;var r=e.call(this)||this;return r.setLevel(n),r.useColors=!o.isWindows,r}return n(r,e),r.prototype.trace=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=a.Trace&&(this.useColors?console.log.apply(console,["[90m[main "+(new Date).toLocaleTimeString()+"][0m",e].concat(t)):console.log.apply(console,["[main "+(new Date).toLocaleTimeString()+"]",e].concat(t)))},r.prototype.debug=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=a.Debug&&(this.useColors?console.log.apply(console,["[90m[main "+(new Date).toLocaleTimeString()+"][0m",e].concat(t)):console.log.apply(console,["[main "+(new Date).toLocaleTimeString()+"]",e].concat(t)))},r.prototype.info=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]
;this.getLevel()<=a.Info&&(this.useColors?console.log.apply(console,["[90m[main "+(new Date).toLocaleTimeString()+"][0m",e].concat(t)):console.log.apply(console,["[main "+(new Date).toLocaleTimeString()+"]",e].concat(t)))},r.prototype.warn=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=a.Warning&&(this.useColors?console.warn.apply(console,["[93m[main "+(new Date).toLocaleTimeString()+"][0m",e].concat(t)):console.warn.apply(console,["[main "+(new Date).toLocaleTimeString()+"]",e].concat(t)))},r.prototype.error=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=a.Error&&(this.useColors?console.error.apply(console,["[91m[main "+(new Date).toLocaleTimeString()+"][0m",e].concat(t)):console.error.apply(console,["[main "+(new Date).toLocaleTimeString()+"]",e].concat(t)))},r.prototype.critical=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]
;this.getLevel()<=a.Critical&&(this.useColors?console.error.apply(console,["[90m[main "+(new Date).toLocaleTimeString()+"][0m",e].concat(t)):console.error.apply(console,["[main "+(new Date).toLocaleTimeString()+"]",e].concat(t)))},r.prototype.dispose=function(){},r}(u);t.ConsoleLogMainService=c;var l=function(e){function r(n){void 0===n&&(n=t.DEFAULT_LOG_LEVEL);var r=e.call(this)||this;return r.setLevel(n),r}return n(r,e),r.prototype.trace=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=a.Trace&&console.log.apply(console,["%cTRACE","color: #888",e].concat(t))},r.prototype.debug=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=a.Debug&&console.log.apply(console,["%cDEBUG","background: #eee; color: #888",e].concat(t))},r.prototype.info=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=a.Info&&console.log.apply(console,["%c INFO","color: #33f",e].concat(t))},r.prototype.warn=function(e){
for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=a.Warning&&console.log.apply(console,["%c WARN","color: #993",e].concat(t))},r.prototype.error=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=a.Error&&console.log.apply(console,["%c  ERR","color: #f33",e].concat(t))},r.prototype.critical=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.getLevel()<=a.Critical&&console.log.apply(console,["%cCRITI","background: #f33; color: white",e].concat(t))},r.prototype.dispose=function(){},r}(u);t.ConsoleLogService=l;var f=function(e){function t(t){var n=e.call(this)||this;return n.logServices=t,t.length&&n.setLevel(t[0].getLevel()),n}return n(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}(u);t.MultiplexLogService=f;var d=function(e){function t(t){var n=e.call(this)||this;return n.logService=t,n._register(t),n}return n(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}(i.Disposable);t.DelegatedLogService=d;var p=function(){function e(){this.onDidChangeLogLevel=(new s.Emitter).event}return e.prototype.setLevel=function(e){},e.prototype.getLevel=function(){return a.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=p,t.getLogLevel=function(e){if(e.verbose)return a.Trace;if("string"==typeof e.args.log)switch(e.args.log.toLowerCase()){case"trace":return a.Trace;case"debug":return a.Debug;case"info":return a.Info;case"warn":return a.Warning;case"error":return a.Error;case"critical":return a.Critical;case"off":return a.Off}return t.DEFAULT_LOG_LEVEL}}),define(e[84],t([0,1,4,2,11,88,41,5,10,3,32]),function(e,t,r,i,o,s,c,l,f,d,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(e){function t(t){var n=e.call(this)||this;return n.logService=t,n.processesLimiter=new f.Limiter(5),n}return n(t,e),t.prototype.uninstall=function(e){var t=this,n=this.parseUninstallScript(e);return n?(this.logService.info(e.identifier.id,"Running Uninstall hook"),this.processesLimiter.queue(function(){return t.runUninstallHook(n.uninstallHook,n.args,e).then(function(){
return t.logService.info(e.identifier.id,"Finished running uninstall hook")},function(n){return t.logService.error(e.identifier.id,"Failed to run uninstall hook: "+n)})})):i.TPromise.as(null)},t.prototype.parseUninstallScript=function(e){if(e.location.scheme===p.Schemas.file&&e.manifest&&e.manifest.scripts&&"string"==typeof e.manifest.scripts["vscode:uninstall"]){var t=e.manifest.scripts["vscode:uninstall"].split(" ");return t.length<2||"node"!==t[0]||!t[1]?(this.logService.warn(e.identifier.id,"Uninstall script should be a node script"),null):{uninstallHook:l.posix.join(e.location.fsPath,t[1]),args:t.slice(2)||[]}}return null},t.prototype.runUninstallHook=function(e,t,n){var r=this;return new i.TPromise(function(i,o){var s,a=r.start(e,t,n),u=function(e){clearTimeout(s),s=null,e?o(e):i(null)};a.on("error",function(e){s&&u(c.toErrorMessage(e)||"Unknown")}),a.on("exit",function(e,t){s&&u(e?"Process exited with code "+e:void 0)}),s=setTimeout(function(){s=null,a.kill(),o("timed out")},5e3)})},
t.prototype.start=function(e,t,n){var r={silent:!0,execArgv:void 0},i=s.fork(e,["--type=extensionUninstall"].concat(t),r);i.stdout.setEncoding("utf8"),i.stderr.setEncoding("utf8");var o=d.fromNodeEventEmitter(i.stdout,"data"),a=d.fromNodeEventEmitter(i.stderr,"data"),u=d.anyEvent(d.mapEvent(o,function(e){return{data:"%c"+e,format:[""]}}),d.mapEvent(a,function(e){return{data:"%c"+e,format:["color: red"]}}));return d.debounceEvent(u,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(n.identifier.id),console.log.apply(console,[e.data].concat(e.format)),console.groupEnd()}),i},t=a([u(0,o.ILogService)],t)}(r.Disposable);t.ExtensionsLifecycle=h}),define(e[85],t([0,1,2,11,3]),function(e,t,r,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e){this.service=e,this.onDidChangeLogLevel=o.buffer(e.onDidChangeLogLevel,!0)}return e.prototype.listen=function(e){switch(e){
case"onDidChangeLogLevel":return this.onDidChangeLogLevel}throw new Error("No event found")},e.prototype.call=function(e,t){switch(e){case"setLevel":return this.service.setLevel(t),r.TPromise.as(null)}},e}();t.LogLevelSetterChannel=s;var a=function(){function e(e){this.channel=e}return Object.defineProperty(e.prototype,"onDidChangeLogLevel",{get:function(){return this.channel.listen("onDidChangeLogLevel")},enumerable:!0,configurable:!0}),e.prototype.setLevel=function(e){return this.channel.call("setLevel",e)},e}();t.LogLevelSetterChannelClient=a;var u=function(e){function t(t,n){var r=e.call(this,n)||this;return r.master=t,r._register(t.onDidChangeLogLevel(function(e){return n.setLevel(e)})),r}return n(t,e),t.prototype.setLevel=function(e){this.master.setLevel(e)},t}(i.DelegatedLogService);t.FollowerLogService=u}),define(e[86],t([0,1,5,11]),function(e,t,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSpdLogService=function(t,n,s){try{var a=e.__$__nodeRequire("spdlog")
;a.setAsyncMode(8192,2e3);var u=r.join(s,t+".log"),c=new a.RotatingLogger(t,u,5242880,6);return c.setLevel(0),new o(c,n)}catch(e){console.error(e)}return new i.NullLogService};var o=function(e){function t(t,n){void 0===n&&(n=i.LogLevel.Error);var r=e.call(this)||this;return r.logger=t,r.setLevel(n),r}return n(t,e),t.prototype.trace=function(){this.getLevel()<=i.LogLevel.Trace&&this.logger.trace(this.format(arguments))},t.prototype.debug=function(){this.getLevel()<=i.LogLevel.Debug&&this.logger.debug(this.format(arguments))},t.prototype.info=function(){this.getLevel()<=i.LogLevel.Info&&this.logger.info(this.format(arguments))},t.prototype.warn=function(){this.getLevel()<=i.LogLevel.Warning&&this.logger.warn(this.format(arguments))},t.prototype.error=function(){if(this.getLevel()<=i.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()<=i.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}(i.AbstractLogService)}),define(e[25],t([0,1,5,30]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n.dirname(r.getPathFromAmdModule(e,"")),o=n.join(i,"package.json");t.default=e.__$__nodeRequire(o)}),define(e[40],t([0,1,61,25]),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{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}}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,d=r.majorMustEqual,p=r.minorMustEqual,h=r.patchMustEqual;return r.isMinimum?i>c||!(i<c)&&(a>l||!(a<l)&&u>=f):(1!==i||0!==c||d&&p&&h||(c=1,l=0,f=0,d=!0,p=!1,h=!1),!(i<c)&&(i>c?!d:!(a<l)&&(a>l?!p:!(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}),define(e[22],t([0,1,5,30]),function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n.dirname(r.getPathFromAmdModule(e,"")),o=n.join(i,"product.json"),s=e.__$__nodeRequire(o);process.env.VSCODE_DEV&&(s.nameShort+=" Dev",s.nameLong+=" Dev",s.dataFolderName+="-dev"),t.default=s}),define(e[90],t([0,1,5,14,22,4,16,11,18]),function(e,t,n,r,s,c,l,f,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0})
;var p=function(){function e(e,t){this._environmentService=e,this._logService=t,this._disposables=[],this._environmentService.isBuilt&&this._manageCachedDataSoon()}return e.prototype.dispose=function(){this._disposables=c.dispose(this._disposables)},e.prototype._manageCachedDataSoon=function(){var e=this,t=setTimeout(function(){return i(e,void 0,void 0,function(){var e,i,a,u,c,f,d,p,h,g,v,m,y,b,_,E,w,C,S,x,P,O,k,T;return o(this,function(o){switch(o.label){case 0:t=void 0,this._logService.info("Starting to clean up unused language packs."),e=s.default.nameLong.indexOf("Insiders")>=0?6048e5:7776e6,o.label=1;case 1:return o.trys.push([1,17,,18]),i=Object.create(null),c=(u=JSON).parse,[4,r.readFile(n.join(this._environmentService.userDataPath,"languagepacks.json"),"utf8")];case 2:for(a=c.apply(u,[o.sent()]),f=0,d=Object.keys(a);f<d.length;f++)p=d[f],x=a[p],i[x.hash+"."+p]=!0;return h=n.join(this._environmentService.userDataPath,"clp"),[4,r.exists(h)];case 3:return(g=o.sent())?(v=0,[4,r.readdir(h)]):[2];case 4:
m=o.sent(),o.label=5;case 5:return v<m.length?(x=m[v],i[x]?(this._logService.info("Skipping directory "+x+". Language pack still in use."),[3,7]):(this._logService.info("Removing unused language pack:",x),[4,r.rimraf(n.join(h,x))])):[3,8];case 6:o.sent(),o.label=7;case 7:return v++,[3,5];case 8:y=Date.now(),b=0,_=Object.keys(i),o.label=9;case 9:return b<_.length?(E=_[b],w=n.join(h,E),C=0,[4,r.readdir(w)]):[3,16];case 10:S=o.sent(),o.label=11;case 11:return C<S.length?"tcf.json"===(x=S[C])?[3,14]:(P=n.join(w,x),[4,r.stat(P)]):[3,15];case 12:return(O=o.sent()).isDirectory()&&(k=y-O.mtime.getTime())>e?(this._logService.info("Removing language pack cache entry: ",n.join(E,x)),[4,r.rimraf(P)]):[3,14];case 13:o.sent(),o.label=14;case 14:return C++,[3,11];case 15:return b++,[3,9];case 16:return[3,18];case 17:return T=o.sent(),l.onUnexpectedError(T),[3,18];case 18:return[2]}})})},4e4);this._disposables.push({dispose:function(){void 0!==t&&clearTimeout(t)}})},e=a([u(0,d.IEnvironmentService),u(1,f.ILogService)],e)}()
;t.LanguagePackCachedDataCleaner=p}),define(e[91],t([0,1,4,16,2,5,14,18,22]),function(e,t,n,r,i,o,s,c,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=function(){function e(e){this._environmentService=e,this._disposables=[],this._manageCachedDataSoon()}return e.prototype.dispose=function(){this._disposables=n.dispose(this._disposables)},e.prototype._manageCachedDataSoon=function(){if(this._environmentService.nodeCachedDataDir){var t=o.dirname(this._environmentService.nodeCachedDataDir),n=o.basename(this._environmentService.nodeCachedDataDir),a=setTimeout(function(){a=void 0,s.readdir(t).then(function(r){var a=Date.now(),u=[];return r.forEach(function(r){if(r!==n){var i=o.join(t,r);u.push(s.stat(i).then(function(t){if(t.isDirectory()){if(a-t.mtime.getTime()>e._DataMaxAge)return s.rimraf(i)}}))}}),i.TPromise.join(u)}).done(void 0,r.onUnexpectedError)},3e4);this._disposables.push({dispose:function(){clearTimeout(a)}})}},e._DataMaxAge=l.default.nameLong.indexOf("Insiders")>=0?6048e5:7776e6,
e=a([u(0,c.IEnvironmentService)],e)}();t.NodeCachedDataCleaner=f}),define(e[92],t([0,1,91,90,4]),function(e,t,n,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSharedProcessContributions=function(e){return i.combinedDisposable([e.createInstance(n.NodeCachedDataCleaner),e.createInstance(r.LanguagePackCachedDataCleaner)])}}),define(e[93],t([0,1,94,75,27,5,51,25,22,52,8,30,17]),function(e,t,n,r,i,o,s,u,c,l,f,d,p){"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(_){var r=n.createHash("md5").update(e).digest("hex").substr(0,8);return o.join(_,"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 _=process.env.XDG_RUNTIME_DIR,E=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(d.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(){return process.env.VSCODE_PORTABLE?o.join(process.env.VSCODE_PORTABLE,"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,"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(d.getPathFromAmdModule(e,""),"..","extensions"))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"extensionsPath",{get:function(){var e=y(this._args["extensions-dir"],process);return e||(process.env.VSCODE_EXTENSIONS?process.env.VSCODE_EXTENSIONS:process.env.VSCODE_PORTABLE?o.join(process.env.VSCODE_PORTABLE,"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)?p.default.parse(e):p.default.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,"performance",{get:function(){return this._args.performance},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 this.isBuilt?o.join(this.userDataPath,"CachedData",c.default.commit||new Array(41).join("0")):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}),a([s.memoize],t.prototype,"appRoot",null),a([s.memoize],t.prototype,"cliPath",null),a([s.memoize],t.prototype,"userHome",null),a([s.memoize],t.prototype,"userDataPath",null),a([s.memoize],t.prototype,"appSettingsHome",null),a([s.memoize],t.prototype,"appSettingsPath",null),a([s.memoize],t.prototype,"settingsSearchBuildId",null),a([s.memoize],t.prototype,"settingsSearchUrl",null),a([s.memoize],t.prototype,"appKeybindingsPath",null),a([s.memoize],t.prototype,"isExtensionDevelopment",null),a([s.memoize],t.prototype,"backupHome",null),a([s.memoize],t.prototype,"backupWorkspacesPath",null),a([s.memoize],t.prototype,"workspacesHome",null),a([s.memoize],t.prototype,"installSourcePath",null),
a([s.memoize],t.prototype,"builtinExtensionsPath",null),a([s.memoize],t.prototype,"extensionsPath",null),a([s.memoize],t.prototype,"extensionDevelopmentLocationURI",null),a([s.memoize],t.prototype,"extensionTestsPath",null),a([s.memoize],t.prototype,"debugExtensionHost",null),a([s.memoize],t.prototype,"debugSearch",null),a([s.memoize],t.prototype,"mainIPCHandle",null),a([s.memoize],t.prototype,"sharedIPCHandle",null),a([s.memoize],t.prototype,"nodeCachedDataDir",null),t}();t.EnvironmentService=E,t.parseExtensionHostPort=g,t.parseSearchPort=v,t.parseDebugPort=m,t.parseUserDataDir=b}),define(e[95],t([0,1,14,94,28,4,18,2,10,33,11,37,22,20,3,32,5]),function(e,t,r,i,o,s,c,l,f,d,p,h,g,v,m,y,b){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var _=["de","en","en-US","es","fr","it","ja","ko","ru","zh-CN","zh-TW"];"stable"!==g.default.quality&&_.push("hu");var E=function(e){function t(t,n,r){var i=e.call(this)||this;return i.extensionManagementService=t,i.logService=r,
i._onDidLanguagesChange=i._register(new m.Emitter),i.onDidLanguagesChange=i._onDidLanguagesChange.event,i.cache=i._register(new w(n,r)),i._register(t.onDidInstallExtension(function(e){var t=e.local;return i.onDidInstallExtension(t)})),i._register(t.onDidUninstallExtension(function(e){var t=e.identifier;return i.onDidUninstallExtension(t)})),i.extensionManagementService.getInstalled().then(function(e){return i.cache.update(e)}),i}return n(t,e),t.prototype.getLanguageIds=function(e){return e===h.LanguageType.Core?l.TPromise.as(_.slice()):this.cache.getLanguagePacks().then(function(t){var n=e===h.LanguageType.Contributed?Object.keys(t):_.concat(Object.keys(t));return l.TPromise.as(v.distinct(n))})},t.prototype.onDidInstallExtension=function(e){e&&e.manifest&&e.manifest.contributes&&e.manifest.contributes.localizations&&e.manifest.contributes.localizations.length&&(this.logService.debug("Adding language packs from the extension",e.identifier.id),this.update())},t.prototype.onDidUninstallExtension=function(e){
var t=this;this.cache.getLanguagePacks().then(function(n){e={id:d.getIdFromLocalExtensionId(e.id),uuid:e.uuid},Object.keys(n).some(function(t){return n[t]&&n[t].extensions.some(function(t){return d.areSameExtensions(t.extensionIdentifier,e)})})&&(t.logService.debug("Removing language packs from the extension",e.id),t.update())})},t.prototype.update=function(){var e=this;l.TPromise.join([this.cache.getLanguagePacks(),this.extensionManagementService.getInstalled()]).then(function(t){var n=t[0],r=t[1];return e.cache.update(r).then(function(t){v.equals(Object.keys(n),Object.keys(t))||e._onDidLanguagesChange.fire()})})},t=a([u(0,o.IExtensionManagementService),u(1,c.IEnvironmentService),u(2,p.ILogService)],t)}(s.Disposable);t.LocalizationsService=E;var w=function(e){function t(t,n){var r=e.call(this)||this;return r.logService=n,r.languagePacks={},r.languagePacksFilePath=b.posix.join(t.userDataPath,"languagepacks.json"),r.languagePacksFileLimiter=new f.Limiter(1),r}return n(t,e),
t.prototype.getLanguagePacks=function(){var e=this;return this.languagePacksFileLimiter.size?this.withLanguagePacks().then(function(){return e.languagePacks}):l.TPromise.as(this.languagePacks)},t.prototype.update=function(e){var t=this;return this.withLanguagePacks(function(n){Object.keys(n).forEach(function(e){return n[e]=void 0}),t.createLanguagePacksFromExtensions.apply(t,[n].concat(e))}).then(function(){return t.languagePacks})},t.prototype.createLanguagePacksFromExtensions=function(e){for(var t=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];for(var i=0,o=n;i<o.length;i++){var s=o[i];s&&s.manifest&&s.manifest.contributes&&s.manifest.contributes.localizations&&s.manifest.contributes.localizations.length&&this.createLanguagePacksFromExtension(e,s)}Object.keys(e).forEach(function(n){return t.updateHash(e[n])})},t.prototype.createLanguagePacksFromExtension=function(e,t){for(var n={id:d.getGalleryExtensionIdFromLocal(t),uuid:t.identifier.uuid
},r=0,i=t.manifest.contributes.localizations;r<i.length;r++){var o=i[r];if(t.location.scheme===y.Schemas.file&&h.isValidLocalization(o)){var s=e[o.languageId];s||(s={hash:"",extensions:[],translations:{}},e[o.languageId]=s);var a=s.extensions.filter(function(e){return d.areSameExtensions(e.extensionIdentifier,n)})[0];a?a.version=t.manifest.version:s.extensions.push({extensionIdentifier:n,version:t.manifest.version});for(var u=0,c=o.translations;u<c.length;u++){var l=c[u];s.translations[l.id]=b.posix.join(t.location.fsPath,l.path)}}}},t.prototype.updateHash=function(e){if(e){for(var t=i.createHash("md5"),n=0,r=e.extensions;n<r.length;n++){var o=r[n];t.update(o.extensionIdentifier.uuid||o.extensionIdentifier.id).update(o.version)}e.hash=t.digest("hex")}},t.prototype.withLanguagePacks=function(e){var t=this;return void 0===e&&(e=function(){return null}),this.languagePacksFileLimiter.queue(function(){var n=null;return r.readFile(t.languagePacksFilePath,"utf8").then(null,function(e){
return"ENOENT"===e.code?l.TPromise.as("{}"):l.TPromise.wrapError(e)}).then(function(e){try{return JSON.parse(e)}catch(e){return{}}}).then(function(t){return n=e(t),t}).then(function(e){for(var n=0,i=Object.keys(e);n<i.length;n++){var o=i[n];e[o]||delete e[o]}t.languagePacks=e;var s=JSON.stringify(t.languagePacks);return t.logService.debug("Writing language packs",s),r.writeFile(t.languagePacksFilePath,s)}).then(function(){return n},function(e){return t.logService.error(e)})})},t=a([u(0,c.IEnvironmentService),u(1,p.ILogService)],t)}(s.Disposable)}),define(e[23],t([0,1,7,44]),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[97],t([0,1,23,3]),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[26],t([0,1,57,3,23,7,15,97]),function(e,t,n,r,i,o,s,a){"use strict";function u(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"};var c;!function(e){e[e.APPLICATION=1]="APPLICATION",e[e.WINDOW=2]="WINDOW",e[e.RESOURCE=3]="RESOURCE"}(c=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._onDidRegisterConfiguration=new r.Emitter,this.onDidRegisterConfiguration=this._onDidRegisterConfiguration.event,this.configurationContributors=[],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,n){var r=this;void 0===n&&(n=!0);var i=this.toConfiguration(t);i&&e.push(i);var o=[];e.forEach(function(e){o.push.apply(o,r.validateAndRegisterProperties(e,n)),r.configurationContributors.push(e),r.registerJSONConfiguration(e),r.updateSchemaForOverrideSettingsConfiguration(e)}),this._onDidRegisterConfiguration.fire(o)},e.prototype.notifyConfigurationSchemaUpdated=function(e){l.notifySchemaChanged(t.editorConfigurationSchemaId)},e.prototype.registerOverrideIdentifiers=function(e){var t;(t=this.overrideIdentifiers).push.apply(t,e),this.updateOverridePropertyPatternKey()},e.prototype.toConfiguration=function(e){for(var r={id:"defaultOverrides",title:n.localize(0,null),properties:{}
},i=0,o=e;i<o.length;i++){var s=o[i];for(var a in s.defaults){var u=s.defaults[a];t.OVERRIDE_PROPERTY_PATTERN.test(a)&&"object"==typeof u&&(r.properties[a]={type:"object",default:u,description:n.localize(1,null,a),$ref:t.editorConfigurationSchemaId})}}return Object.keys(r.properties).length?r:null},e.prototype.validateAndRegisterProperties=function(e,n,r,i){void 0===n&&(n=!0),void 0===r&&(r=c.WINDOW),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=u(l)))console.warn(f),delete a[l];else{var d=a[l],p=d.default;o.isUndefined(p)&&(d.default=function(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}}(d.type)),i&&(d.overridable=!0),t.OVERRIDE_PROPERTY_PATTERN.test(l)?d.scope=void 0:d.scope=o.isUndefinedOrNull(d.scope)?r:d.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 c.APPLICATION:t.applicationSettings.properties[i]=r[i];break;case c.WINDOW:t.windowSettings.properties[i]=r[i];break;case c.RESOURCE:t.resourceSettings.properties[i]=r[i]}var o=e.allOf;o&&o.forEach(n)}n(e),this._onDidSchemaChange.fire()},
e.prototype.updateSchemaForOverrideSettingsConfiguration=function(e){e.id!==d&&(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("|")):p},e}(),d="override",p="\\[.*\\]$",h="\\[(${0})\\]$";t.OVERRIDE_PROPERTY_PATTERN=new RegExp(p);var g=new f;i.Registry.add(t.Extensions.Configuration,g),t.validateProperty=u,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=c.RESOURCE,e.task=c.RESOURCE,e}}),define(e[21],t([0,1,9,7,17,23,6,26]),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;r<t.length;r++){if("object"!=typeof n||null===n)return;n=n[t[r]]}return n}(e,t.split("."));return void 0===r?n:r}function d(e,t,n){Object.keys(t).forEach(function(i){i in e?r.isObject(e[i])&&r.isObject(t[i])?d(e[i],t[i],n):n&&(e[i]=t[i]):e[i]=t[i]})}function p(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.default)};!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.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:[p(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=d,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=p,t.keyFromOverrideIdentifier=function(e){return"["+e+"]"}}),define(e[45],t([0,1,43,29,20,7,9,26,21]),function(e,t,r,i,o,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={},i=0,s=o.distinct(Object.keys(this.contents).concat(Object.keys(n)));i<s.length;i++){var u=s[i],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),i=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=i.filter(function(t){return o.equals(t.identifiers,e.identifiers)})[0];t?d.mergeContents(t.contents,e.contents):i.push(a.deepClone(e))},d=this,p=0,h=l.overrides;p<h.length;p++){f(h[p])}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,i)},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 n(t,e),t}(l);t.DefaultConfigurationModel=f;var d=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){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 n={},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){a.push({error:e})}};if(e)try{r.visit(e,u),n=o[0]||{}}catch(e){console.error("Error while parsing settings file "+this._name+": "+e),this._parseErrors=[e]}
return n},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=d;var p=function(){function e(e,t,n,r,o,s,a){void 0===n&&(n=new l),void 0===r&&(r=new i.ResourceMap),void 0===o&&(o=new l),void 0===s&&(s=new i.ResourceMap),void 0===a&&(a=!0),this._defaultConfiguration=e,this._userConfiguration=t,this._workspaceConfiguration=n,this._folderConfigurations=r,this._memoryConfiguration=o,this._memoryConfigurationByResource=s,this._freeze=a,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new i.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(null,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)}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=p;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 i.ResourceMap);var r=e.call(this)||this;return r._changedConfiguration=t,r._changedConfigurationByResource=n,r}return n(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)}),o.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[101],t([0,1,4,16,45,99,3,2]),function(e,t,r,i,o,s,a,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(e){function t(t){var n=e.call(this)||this;return n._onDidChangeConfiguration=n._register(new a.Emitter),n.onDidChangeConfiguration=n._onDidChangeConfiguration.event,
n.userConfigModelWatcher=new s.ConfigWatcher(t,{changeBufferDelay:300,onError:function(e){return i.onUnexpectedError(e)},defaultConfig:new o.ConfigurationModelParser(t),parse:function(e,n){var r=new o.ConfigurationModelParser(t);return r.parse(e),r.errors.slice(),r}}),n._register(n.userConfigModelWatcher),n._register(n.userConfigModelWatcher.onDidUpdateConfiguration(function(){return n._onDidChangeConfiguration.fire(n.configurationModel)})),n}return n(t,e),Object.defineProperty(t.prototype,"configurationModel",{get:function(){return this.userConfigModelWatcher.getConfig().configurationModel},enumerable:!0,configurable:!0}),t.prototype.reload=function(){var e=this;return new u.TPromise(function(t){return e.userConfigModelWatcher.reload(function(){return t(null)})})},t}(r.Disposable);t.UserConfiguration=c}),define(e[102],t([0,1,23,26,4,21,45,3,18,2,9,101]),function(e,t,r,i,o,s,c,l,f,d,p,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g=function(e){function t(t){var n=e.call(this)||this
;return n._onDidChangeConfiguration=n._register(new l.Emitter),n.onDidChangeConfiguration=n._onDidChangeConfiguration.event,n.userConfiguration=n._register(new h.UserConfiguration(t.appSettingsPath)),n.reset(),n._register(n.userConfiguration.onDidChangeConfiguration(function(){return n.onDidChangeUserConfiguration()})),n._register(r.Registry.as(i.Extensions.Configuration).onDidRegisterConfiguration(function(e){return n.onDidRegisterConfiguration(e)})),n}return n(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=s.isConfigurationOverrides(e)?e:s.isConfigurationOverrides(t)?t:{};return this.configuration.getValue(n,r,null)},t.prototype.updateValue=function(e,t,n,r){return d.TPromise.wrapError(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?d.TPromise.as(null):this.userConfiguration.reload().then(function(){return t.onDidChangeUserConfiguration()})},t.prototype.onDidChangeUserConfiguration=function(){var e=this,t=[],n=s.compare(this._configuration.user,this.userConfiguration.configurationModel),r=n.added,i=n.updated,o=n.removed;if((t=r.concat(i,o)).length){var a=this._configuration;this.reset(),(t=t.filter(function(t){return!p.equals(a.getValue(t,{},null),e._configuration.getValue(t,{},null))})).length&&this.trigger(t,s.ConfigurationTarget.USER)}},t.prototype.onDidRegisterConfiguration=function(e){this.reset(),this.trigger(e,s.ConfigurationTarget.DEFAULT)},t.prototype.reset=function(){var e=new c.DefaultConfigurationModel,t=this.userConfiguration.configurationModel;this._configuration=new c.Configuration(e,t)},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 s.ConfigurationTarget.DEFAULT:return this._configuration.defaults.contents;case s.ConfigurationTarget.USER:return this._configuration.user.contents}return{}},t=a([u(0,f.IEnvironmentService)],t)}(o.Disposable);t.ConfigurationService=g}),define(e[46],t([0,1,62,6,26,23]),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)}}})}),define(e[34],t([0,1,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITelemetryService=n.createDecorator("telemetryService")}),define(e[105],t([0,1,98,15,6,21,26,2,4,9,23]),function(e,t,n,r,i,o,s,c,l,f,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=function(){function e(e,t){this._configurationService=t,this._disposables=[],this._cleanupPatterns=[],this._appender=e.appender,this._commonProperties=e.commonProperties||c.TPromise.as({}),this._piiPaths=e.piiPaths||[],this._userOptIn=!0,this._cleanupPatterns=[/file:\/\/\/.*?\/resources\/app\//gi];for(var n=0,i=this._piiPaths;n<i.length;n++){var o=i[n];this._cleanupPatterns.push(new RegExp(r.escapeRegExpCharacters(o),"gi"))}this._configurationService&&(this._updateUserOptIn(),this._configurationService.onDidChangeConfiguration(this._updateUserOptIn,this,this._disposables),this.publicLog("optInStatus",{optIn:this._userOptIn}))}
return e.prototype._updateUserOptIn=function(){var e=this._configurationService.getValue(h);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=l.dispose(this._disposables)},e.prototype.publicLog=function(e,t,n){var r=this;return this._userOptIn?this._commonProperties.then(function(i){t=f.mixin(t,i),t=f.cloneAndChange(t,function(e){if("string"==typeof e)return r._cleanupInfo(e,n)}),r._appender.log(e,t)},function(e){console.error(e)}):c.TPromise.as(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])}
for(var a=/^[\\\/]?(node_modules|node_modules\.asar)[\\\/]/,u=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-\._]+(\\\\|\\|\/))+[\w-\._]*/g,c=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=n.slice(0,t.index)+t[0].replace(/./g,"a")+n.slice(u.lastIndex))};;){if("break"===c())break}}for(var l=0,f=this._cleanupPatterns;l<f.length;l++){var d=f[l];n=n.replace(d,"")}return n},e.IDLE_START_EVENT_NAME="UserIdleStart",e.IDLE_STOP_EVENT_NAME="UserIdleStop",e=a([u(1,i.optional(o.IConfigurationService))],e)}();t.TelemetryService=p;var h="telemetry";d.Registry.as(s.Extensions.Configuration).registerConfiguration({id:h,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[106],t([0,1,2,71,31,21,80,11]),function(e,t,n,r,i,o,s,c){"use strict";function l(e,t){
return t.onDidChangeConfiguration(function(t){t.source!==o.ConfigurationTarget.DEFAULT&&(e.publicLog("updateConfiguration",{configurationSource:o.ConfigurationTarget[t.source],configurationKeys:function(e){if(!e)return[];var t=[];return f(t,"",e),t}(t.sourceConfig)}),e.publicLog("updateConfigurationValues",{configurationSource:o.ConfigurationTarget[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,p)}))})}function f(e,t,n){n&&"object"==typeof n&&!Array.isArray(n)?Object.keys(n).forEach(function(r){return f(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 n.TPromise.wrap(null)},e.prototype.getTelemetryInfo=function(){return n.TPromise.wrap({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 n.TPromise.join(e.map(function(e){return e.dispose()}))}}},t.NullAppender={log:function(){return null},dispose:function(){return n.TPromise.as(null)}};var d=function(){function e(e){this._logService=e,this.commonPropertiesRegex=/^sessionID$|^version$|^timestamp$|^commitHash$|^common\./}return e.prototype.dispose=function(){return n.TPromise.as(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=a([u(0,c.ILogService)],e)}();t.LogAppender=d,t.telemetryURIDescriptor=function(e,t){var n=e&&e.fsPath;return n?{mimeType:r.guessMimeTypes(n).join(", "),ext:i.extname(n),path:t(n)}:{}}
;var p=["editor.tabCompletion","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.selectionHighlight","editor.occurrencesHighlight","editor.overviewRulerLanes","editor.overviewRulerBorder","editor.cursorBlinking","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.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.swipeToNavigate","workbench.sideBar.location","workbench.startupEditor","workbench.statusBar.visible","workbench.welcome.enabled"]
;t.configurationTelemetry=l,t.keybindingsTelemetry=function(e,t){return t.onDidUpdateKeybindings(function(t){t.source===s.KeybindingSource.User&&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[107],t([0,1,119,7,9,2,11]),function(e,t,n,r,i,o,s){"use strict";function c(e){!1===l&&(n.setup("2588e01f-f6c9-4cd6-a348-143741f8d702").setAutoCollectConsole(!1).setAutoCollectExceptions(!1).setAutoCollectPerformance(!1).setAutoCollectRequests(!1),l=!0);var t=n.getClient(e);return t.channel.setOfflineMode(!0),t.context.tags[t.context.keys.deviceMachineName]="",0===e.indexOf("AIF-")&&(t.config.endpointUrl="https://vortex.data.microsoft.com/collect/v1"),t}Object.defineProperty(t,"__esModule",{value:!0});var l=!1,f=function(){function e(e,t,n,r){this._eventPrefix=e,this._defaultData=t,this._logService=r,this._defaultData||(this._defaultData=Object.create(null)),
"string"==typeof n?this._aiClient=c(n):"function"==typeof n&&(this._aiClient=n())}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(this._eventPrefix+"/"+t,n.properties,n.measurements))},e.prototype.dispose=function(){var e=this
;if(this._aiClient)return new o.TPromise(function(t){e._aiClient.sendPendingData(function(){e._aiClient=void 0,t(void 0)})})},e=a([u(3,s.ILogService)],e)}();t.AppInsightsAppender=f}),define(e[109],t([0,1,8,27,24,14]),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.Platform[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[110],t([0,1,2]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.appender=e}return e.prototype.listen=function(e,t){throw new Error("No events")},e.prototype.call=function(e,t){var r=t.eventName,i=t.data;return this.appender.log(r,i),n.TPromise.as(null)},e}();t.TelemetryAppenderChannel=r;var i=function(){function e(e){this.channel=e}return e.prototype.log=function(e,t){return this.channel.call("log",{eventName:e,data:t}).done(null,function(e){return"Failed to log telemetry: "+console.warn(e)}),n.TPromise.as(null)},e.prototype.dispose=function(){},e}();t.TelemetryAppenderClient=i}),define(e[111],t([0,1,2,6,3,4]),function(e,t,n,r,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWindowsService=r.createDecorator("windowsService"),t.IWindowService=r.createDecorator("windowService");!function(e){e[e.CLI=0]="CLI",e[e.DOCK=1]="DOCK",e[e.MENU=2]="MENU",e[e.DIALOG=3]="DIALOG",
e[e.DESKTOP=4]="DESKTOP",e[e.API=5]="API"}(t.OpenContext||(t.OpenContext={}));!function(e){e[e.NONE=0]="NONE",e[e.LOADING=1]="LOADING",e[e.NAVIGATING=2]="NAVIGATING",e[e.READY=3]="READY"}(t.ReadyState||(t.ReadyState={}));var s=function(){function e(e){var t=this;this.disposables=[];i.latch(i.anyEvent(e.onWindowOpen,e.onWindowFocus))(this.setActiveWindow,this,this.disposables),this.firstActiveWindowIdPromise=e.getActiveWindowId().then(function(e){return void 0===t._activeWindowId&&t.setActiveWindow(e)})}return e.prototype.setActiveWindow=function(e){this.firstActiveWindowIdPromise&&(this.firstActiveWindowIdPromise=null),this._activeWindowId=e},e.prototype.getActiveClientId=function(){return this.firstActiveWindowIdPromise?this.firstActiveWindowIdPromise:n.TPromise.as("window:"+this._activeWindowId)},e.prototype.dispose=function(){this.disposables=o.dispose(this.disposables)},e=a([u(0,t.IWindowsService)],e)}();t.ActiveWindowManager=s}),define(e[112],t([0,1,6,64,17]),function(e,t,n,r,i){"use strict"
;function o(e){return e&&"object"==typeof e&&"string"==typeof e.path&&(!e.name||"string"==typeof e.name)}function s(e){return e&&"object"==typeof e&&"string"==typeof e.uri&&(!e.name||"string"==typeof e.name)}Object.defineProperty(t,"__esModule",{value:!0}),t.IWorkspacesMainService=n.createDecorator("workspacesMainService"),t.IWorkspacesService=n.createDecorator("workspacesService"),t.WORKSPACE_EXTENSION="code-workspace",t.WORKSPACE_FILTER=[{name:r.localize(0,null),extensions:[t.WORKSPACE_EXTENSION]}],t.UNTITLED_WORKSPACE_NAME="workspace.json",t.isStoredWorkspaceFolder=function(e){return o(e)||s(e)},t.isRawFileWorkspaceFolder=o,t.isRawUriWorkspaceFolder=s,t.isSingleFolderWorkspaceIdentifier=function(e){return e instanceof i.default},t.isWorkspaceIdentifier=function(e){var t=e;return t&&"string"==typeof t.id&&"string"==typeof t.configPath},t.toWorkspaceIdentifier=function(e){return e.configuration?{configPath:e.configuration.fsPath,id:e.id}:1===e.folders.length?e.folders[0].uri:void 0}}),
define(e[113],t([0,1,3,112,17]),function(e,t,n,r,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){this.service=e,this.onWindowOpen=n.buffer(e.onWindowOpen,!0),this.onWindowFocus=n.buffer(e.onWindowFocus,!0),this.onWindowBlur=n.buffer(e.onWindowBlur,!0),this.onWindowMaximize=n.buffer(e.onWindowMaximize,!0),this.onWindowUnmaximize=n.buffer(e.onWindowUnmaximize,!0),this.onRecentlyOpenedChange=n.buffer(e.onRecentlyOpenedChange,!0)}return e.prototype.listen=function(e,t){switch(e){case"onWindowOpen":return this.onWindowOpen;case"onWindowFocus":return this.onWindowFocus;case"onWindowBlur":return this.onWindowBlur;case"onWindowMaximize":return this.onWindowMaximize;case"onWindowUnmaximize":return this.onWindowUnmaximize;case"onRecentlyOpenedChange":return this.onRecentlyOpenedChange}throw new Error("No event found")},e.prototype.call=function(e,t){switch(e){case"pickFileFolderAndOpen":return this.service.pickFileFolderAndOpen(t);case"pickFileAndOpen":
return this.service.pickFileAndOpen(t);case"pickFolderAndOpen":return this.service.pickFolderAndOpen(t);case"pickWorkspaceAndOpen":return this.service.pickWorkspaceAndOpen(t);case"showMessageBox":return this.service.showMessageBox(t[0],t[1]);case"showSaveDialog":return this.service.showSaveDialog(t[0],t[1]);case"showOpenDialog":return this.service.showOpenDialog(t[0],t[1]);case"reloadWindow":return this.service.reloadWindow(t[0],t[1]);case"openDevTools":return this.service.openDevTools(t[0],t[1]);case"toggleDevTools":return this.service.toggleDevTools(t);case"closeWorkspace":return this.service.closeWorkspace(t);case"enterWorkspace":return this.service.enterWorkspace(t[0],t[1]);case"createAndEnterWorkspace":var n=t[1],o=void 0;return Array.isArray(n)&&(o=n.map(function(e){return{uri:i.default.revive(e.uri),name:e.name}})),this.service.createAndEnterWorkspace(t[0],o,t[2]);case"saveAndEnterWorkspace":return this.service.saveAndEnterWorkspace(t[0],t[1]);case"toggleFullScreen":
return this.service.toggleFullScreen(t);case"setRepresentedFilename":return this.service.setRepresentedFilename(t[0],t[1]);case"addRecentlyOpened":return this.service.addRecentlyOpened(t.map(i.default.revive));case"removeFromRecentlyOpened":var s=t;return Array.isArray(s)&&(s=s.map(function(e){return r.isWorkspaceIdentifier(e)?e:i.default.revive(e)})),this.service.removeFromRecentlyOpened(s);case"clearRecentlyOpened":return this.service.clearRecentlyOpened();case"newWindowTab":return this.service.newWindowTab();case"showPreviousWindowTab":return this.service.showPreviousWindowTab();case"showNextWindowTab":return this.service.showNextWindowTab();case"moveWindowTabToNewWindow":return this.service.moveWindowTabToNewWindow();case"mergeAllWindowTabs":return this.service.mergeAllWindowTabs();case"toggleWindowTabsBar":return this.service.toggleWindowTabsBar();case"updateTouchBar":return this.service.updateTouchBar(t[0],t[1]);case"getRecentlyOpened":return this.service.getRecentlyOpened(t);case"focusWindow":
return this.service.focusWindow(t);case"closeWindow":return this.service.closeWindow(t);case"isFocused":return this.service.isFocused(t);case"isMaximized":return this.service.isMaximized(t);case"maximizeWindow":return this.service.maximizeWindow(t);case"unmaximizeWindow":return this.service.unmaximizeWindow(t);case"minimizeWindow":return this.service.minimizeWindow(t);case"onWindowTitleDoubleClick":return this.service.onWindowTitleDoubleClick(t);case"setDocumentEdited":return this.service.setDocumentEdited(t[0],t[1]);case"openWindow":return this.service.openWindow(t[0],t[1]?t[1].map(function(e){return i.default.revive(e)}):t[1],t[2]);case"openNewWindow":return this.service.openNewWindow();case"showWindow":return this.service.showWindow(t);case"getWindows":return this.service.getWindows();case"getWindowCount":return this.service.getWindowCount();case"relaunch":return this.service.relaunch(t[0]);case"whenSharedProcessReady":return this.service.whenSharedProcessReady();case"toggleSharedProcess":
return this.service.toggleSharedProcess();case"quit":return this.service.quit();case"log":return this.service.log(t[0],t[1]);case"showItemInFolder":return this.service.showItemInFolder(t);case"getActiveWindowId":return this.service.getActiveWindowId();case"openExternal":return this.service.openExternal(t);case"startCrashReporter":return this.service.startCrashReporter(t);case"openAboutDialog":return this.service.openAboutDialog()}},e}();t.WindowsChannel=o;var s=function(){function e(e){this.channel=e}return Object.defineProperty(e.prototype,"onWindowOpen",{get:function(){return this.channel.listen("onWindowOpen")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onWindowFocus",{get:function(){return this.channel.listen("onWindowFocus")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onWindowBlur",{get:function(){return this.channel.listen("onWindowBlur")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onWindowMaximize",{get:function(){
return this.channel.listen("onWindowMaximize")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onWindowUnmaximize",{get:function(){return this.channel.listen("onWindowUnmaximize")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onRecentlyOpenedChange",{get:function(){return this.channel.listen("onRecentlyOpenedChange")},enumerable:!0,configurable:!0}),e.prototype.pickFileFolderAndOpen=function(e){return this.channel.call("pickFileFolderAndOpen",e)},e.prototype.pickFileAndOpen=function(e){return this.channel.call("pickFileAndOpen",e)},e.prototype.pickFolderAndOpen=function(e){return this.channel.call("pickFolderAndOpen",e)},e.prototype.pickWorkspaceAndOpen=function(e){return this.channel.call("pickWorkspaceAndOpen",e)},e.prototype.showMessageBox=function(e,t){return this.channel.call("showMessageBox",[e,t])},e.prototype.showSaveDialog=function(e,t){return this.channel.call("showSaveDialog",[e,t])},e.prototype.showOpenDialog=function(e,t){
return this.channel.call("showOpenDialog",[e,t])},e.prototype.reloadWindow=function(e,t){return this.channel.call("reloadWindow",[e,t])},e.prototype.openDevTools=function(e,t){return this.channel.call("openDevTools",[e,t])},e.prototype.toggleDevTools=function(e){return this.channel.call("toggleDevTools",e)},e.prototype.closeWorkspace=function(e){return this.channel.call("closeWorkspace",e)},e.prototype.enterWorkspace=function(e,t){return this.channel.call("enterWorkspace",[e,t])},e.prototype.createAndEnterWorkspace=function(e,t,n){return this.channel.call("createAndEnterWorkspace",[e,t,n])},e.prototype.saveAndEnterWorkspace=function(e,t){return this.channel.call("saveAndEnterWorkspace",[e,t])},e.prototype.toggleFullScreen=function(e){return this.channel.call("toggleFullScreen",e)},e.prototype.setRepresentedFilename=function(e,t){return this.channel.call("setRepresentedFilename",[e,t])},e.prototype.addRecentlyOpened=function(e){return this.channel.call("addRecentlyOpened",e)},
e.prototype.removeFromRecentlyOpened=function(e){return this.channel.call("removeFromRecentlyOpened",e)},e.prototype.clearRecentlyOpened=function(){return this.channel.call("clearRecentlyOpened")},e.prototype.getRecentlyOpened=function(e){return this.channel.call("getRecentlyOpened",e).then(function(e){return e.workspaces=e.workspaces.map(function(e){return r.isWorkspaceIdentifier(e)?e:i.default.revive(e)}),e.files=e.files.map(i.default.revive),e})},e.prototype.newWindowTab=function(){return this.channel.call("newWindowTab")},e.prototype.showPreviousWindowTab=function(){return this.channel.call("showPreviousWindowTab")},e.prototype.showNextWindowTab=function(){return this.channel.call("showNextWindowTab")},e.prototype.moveWindowTabToNewWindow=function(){return this.channel.call("moveWindowTabToNewWindow")},e.prototype.mergeAllWindowTabs=function(){return this.channel.call("mergeAllWindowTabs")},e.prototype.toggleWindowTabsBar=function(){return this.channel.call("toggleWindowTabsBar")},
e.prototype.focusWindow=function(e){return this.channel.call("focusWindow",e)},e.prototype.closeWindow=function(e){return this.channel.call("closeWindow",e)},e.prototype.isFocused=function(e){return this.channel.call("isFocused",e)},e.prototype.isMaximized=function(e){return this.channel.call("isMaximized",e)},e.prototype.maximizeWindow=function(e){return this.channel.call("maximizeWindow",e)},e.prototype.unmaximizeWindow=function(e){return this.channel.call("unmaximizeWindow",e)},e.prototype.minimizeWindow=function(e){return this.channel.call("minimizeWindow",e)},e.prototype.onWindowTitleDoubleClick=function(e){return this.channel.call("onWindowTitleDoubleClick",e)},e.prototype.setDocumentEdited=function(e,t){return this.channel.call("setDocumentEdited",[e,t])},e.prototype.quit=function(){return this.channel.call("quit")},e.prototype.relaunch=function(e){return this.channel.call("relaunch",[e])},e.prototype.whenSharedProcessReady=function(){return this.channel.call("whenSharedProcessReady")},
e.prototype.toggleSharedProcess=function(){return this.channel.call("toggleSharedProcess")},e.prototype.openWindow=function(e,t,n){return this.channel.call("openWindow",[e,t,n])},e.prototype.openNewWindow=function(){return this.channel.call("openNewWindow")},e.prototype.showWindow=function(e){return this.channel.call("showWindow",e)},e.prototype.getWindows=function(){return this.channel.call("getWindows").then(function(e){return e.forEach(function(e){return e.folderUri=e.folderUri?i.default.revive(e.folderUri):e.folderUri}),e})},e.prototype.getWindowCount=function(){return this.channel.call("getWindowCount")},e.prototype.log=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return this.channel.call("log",[e,t])},e.prototype.showItemInFolder=function(e){return this.channel.call("showItemInFolder",e)},e.prototype.getActiveWindowId=function(){return this.channel.call("getActiveWindowId")},e.prototype.openExternal=function(e){return this.channel.call("openExternal",e)},
e.prototype.startCrashReporter=function(e){return this.channel.call("startCrashReporter",e)},e.prototype.updateTouchBar=function(e,t){return this.channel.call("updateTouchBar",[e,t])},e.prototype.openAboutDialog=function(){return this.channel.call("openAboutDialog")},e}();t.WindowsChannelClient=s}),define(e[114],t([0,1,56,5,19,10,14,2,117,116,3]),function(e,t,r,i,o,s,a,u,c,l,f){"use strict";function d(e,t,n,c){var l=s.createCancelablePromise(function(){return Promise.resolve(null)}),d=0;return s.createCancelablePromise(function(p){return f.once(p.onCancellationRequested)(function(){c.debug(t,"Cancelled."),l.cancel(),e.close()}),new u.TPromise(function(c,h){var v=new s.SimpleThrottler,m=function(t){t.isCancellationRequested||(d++,e.readEntry())};e.once("error",h),e.once("close",function(){return l.then(function(){p.isCancellationRequested||e.entryCount===d?c(null):h(new g("Incomplete",new Error(r.localize(1,null,d,e.entryCount))))},h)}),e.readEntry(),e.on("entry",function(c){
if(!p.isCancellationRequested)if(n.sourcePathRegex.test(c.fileName)){var d=c.fileName.replace(n.sourcePathRegex,"");if(/\/$/.test(d)){var h=i.join(t,d);l=s.createCancelablePromise(function(e){return a.mkdirp(h,void 0,e).then(function(){return m(e)})})}else{var g=s.ninvoke(e,e.openReadStream,c),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)}(c);l=s.createCancelablePromise(function(e){return v.queue(function(){return g.then(function(n){return function(e,t,n,s,c,l){var d=i.dirname(t),p=i.join(s,d);if(0!==p.indexOf(s))return u.TPromise.wrapError(new Error(r.localize(0,null,t)));var h,g=i.join(s,t);return f.once(l.onCancellationRequested)(function(){h&&h.close()}),a.mkdirp(p,void 0,l).then(function(){return new u.TPromise(function(t,r){l.isCancellationRequested||((h=o.createWriteStream(g,{mode:n})).once("close",function(){return t(null)}),h.once("error",r),e.once("error",r),e.pipe(h))})})}(n,d,y,t,0,e).then(function(){
return m(e)})})})})}}else m(p)})})})}function p(e,t){return void 0===t&&(t=!1),s.nfcall(c.open,e,t?{lazyEntries:!0}:void 0).then(null,function(e){return u.TPromise.wrapError(function(e){if(e instanceof g)return e;var t=void 0;return/end of central directory record signature not found/.test(e.message)&&(t="CorruptZip"),new g(t,e)}(e))})}function h(e,t){return function(e,t){return p(e).then(function(e){return new u.TPromise(function(n,i){e.on("entry",function(r){r.fileName===t&&s.ninvoke(e,e.openReadStream,r).done(function(e){return n(e)},function(e){return i(e)})}),e.once("close",function(){return i(new Error(r.localize(2,null,t)))})})})}(e,t).then(function(e){return new u.TPromise(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 g=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 n(t,e),t}(Error);t.ExtractError=g,t.zip=function(e,t){return new u.TPromise(function(n,r){var i=new l.ZipFile;t.forEach(function(e){return e.contents?i.addBuffer("string"==typeof e.contents?Buffer.from(e.contents,"utf8"):e.contents,e.path):i.addFile(e.localPath,e.path)}),i.end();var s=o.createWriteStream(e);i.outputStream.pipe(s),i.outputStream.once("error",r),s.once("error",r),s.once("finish",function(){return n(e)})})},t.extract=function(e,t,n,r){void 0===n&&(n={});var i=new RegExp(n.sourcePath?"^"+n.sourcePath:""),o=p(e,!0);return n.overwrite&&(o=o.then(function(e){return a.rimraf(t).then(function(){return e})})),o.then(function(e){return d(e,t,{sourcePathRegex:i},r)})},t.buffer=h}),define(e[115],t([0,1,60,5,14,16,9,4,20,114,2,28,33,67,18,10,3,118,17,25,8,11,70,35,55,84,41,34,40,27,24,42,6,32]),function(e,t,r,s,c,l,f,d,p,h,g,v,m,y,b,_,E,w,C,S,x,P,O,k,T,I,D,L,j,A,F,R,M,N){"use strict";function U(e){return new g.TPromise(function(t,n){try{var i=JSON.parse(e),o=i.__metadata||null
;delete i.__metadata,t({manifest:i,metadata:o})}catch(e){n(new Error(r.localize(0,null)))}})}function W(e){return h.buffer(e,"extension/package.json").then(function(e){return U(e.toString("utf8"))}).then(function(e){var t=e.manifest;return g.TPromise.as(t)})}function B(e,t){return m.getLocalExtensionId(e.identifier.id,t)}function z(e){return m.getLocalExtensionId(m.getGalleryExtensionId(e.publisher,e.name),e.version)}Object.defineProperty(t,"__esModule",{value:!0});var q=function(e){function t(t,n){var r=e.call(this,t)||this;return r.code=n,r}return n(t,e),t}(Error);t.ExtensionManagementError=q,t.validateLocalExtension=W;var V=function(e){function t(t,n,r,i,o,a){var u=e.call(this)||this;return u.dialogService=n,u.galleryService=r,u.logService=i,u.downloadService=o,u.telemetryService=a,u.lastReportTimestamp=0,u.installingExtensions=new Map,u.uninstallingExtensions=new Map,u._onInstallExtension=new E.Emitter,u.onInstallExtension=u._onInstallExtension.event,u._onDidInstallExtension=new E.Emitter,
u.onDidInstallExtension=u._onDidInstallExtension.event,u._onUninstallExtension=new E.Emitter,u.onUninstallExtension=u._onUninstallExtension.event,u._onDidUninstallExtension=new E.Emitter,u.onDidUninstallExtension=u._onDidUninstallExtension.event,u.systemExtensionsPath=t.builtinExtensionsPath,u.extensionsPath=t.extensionsPath,u.uninstalledPath=s.join(u.extensionsPath,".obsolete"),u.uninstalledFileLimiter=new _.Limiter(1),u.manifestCache=u._register(new O.ExtensionsManifestCache(t,u)),u.extensionLifecycle=u._register(new I.ExtensionsLifecycle(u.logService)),u._register(d.toDisposable(function(){u.installingExtensions.forEach(function(e){return e.cancel()}),u.uninstallingExtensions.forEach(function(e){return e.cancel()}),u.installingExtensions.clear(),u.uninstallingExtensions.clear()})),u}return n(t,e),t.prototype.zip=function(e){return g.TPromise.wrap(this.collectFiles(e)).then(function(e){return h.zip(s.join(A.tmpdir(),F.generateUuid()),e)}).then(function(e){return C.default.file(e)})},
t.prototype.unzip=function(e,t){return this.install(e,t)},t.prototype.collectFiles=function(e){var t=this,n=function(e){return i(t,void 0,void 0,function(){var t,r,i;return o(this,function(o){switch(o.label){case 0:return[4,c.readdir(e)];case 1:return t=o.sent(),t=t.map(function(t){return s.join(e,t)}),[4,Promise.all(t.map(function(e){return c.stat(e)}))];case 2:return r=o.sent(),i=Promise.resolve([]),r.forEach(function(e,r){var o=t[r];e.isFile()&&(i=i.then(function(e){return e.concat([o])})),e.isDirectory()&&(i=i.then(function(e){return n(o).then(function(t){return e.concat(t)})}))}),[2,i]}})})};return n(e.location.fsPath).then(function(t){return t.map(function(t){return{path:"extension/"+s.relative(e.location.fsPath,t),localPath:t}})})},t.prototype.install=function(e,t){var n=this;return void 0===t&&(t=v.LocalExtensionType.User),this.downloadVsix(e).then(function(e){var i=s.resolve(e.fsPath);return W(i).then(function(e){var o={id:z(e)}
;return e.engines&&e.engines.vscode&&!j.isEngineValid(e.engines.vscode)?g.TPromise.wrapError(new Error(r.localize(1,null,o.id,S.default.version))):n.removeIfExists(o.id).then(function(){return n.checkOutdated(e).then(function(r){return r?(n.logService.info("Installing the extension:",o.id),n._onInstallExtension.fire({identifier:o,zipPath:i}),n.getMetadata(m.getGalleryExtensionId(e.publisher,e.name)).then(function(e){return n.installFromZipPath(o,i,e,t)},function(e){return n.installFromZipPath(o,i,null,t)}).then(function(){return n.logService.info("Successfully installed the extension:",o.id),o},function(e){return n.logService.error("Failed to install the extension:",o.id,e.message),g.TPromise.wrapError(e)})):null})},function(t){return g.TPromise.wrapError(new Error(r.localize(2,null,e.displayName||e.name)))})})})},t.prototype.downloadVsix=function(e){if(e.scheme===N.Schemas.file)return g.TPromise.as(e);if(!this.downloadService)throw new Error("Download service is not available")
;var t=s.join(A.tmpdir(),F.generateUuid());return this.downloadService.download(e,t).then(function(){return C.default.file(t)})},t.prototype.removeIfExists=function(e){var t=this;return this.getInstalled(v.LocalExtensionType.User).then(function(t){return t.filter(function(t){return t.identifier.id===e})[0]}).then(function(e){return e?t.removeExtension(e,"existing"):null})},t.prototype.checkOutdated=function(e){var t=this,n={id:m.getGalleryExtensionId(e.publisher,e.name)};return this.getInstalled(v.LocalExtensionType.User).then(function(i){var o=i.filter(function(t){return m.areSameExtensions(n,{id:m.getGalleryExtensionIdFromLocal(t)})&&w.gt(t.manifest.version,e.version)})[0];if(o){var s=r.localize(3,null),a=[r.localize(4,null),r.localize(5,null)];return t.dialogService.show(T.default.Info,s,a,{cancelId:1}).then(function(e){return 0===e?t.uninstall(o,!0).then(function(){return!0}):g.TPromise.wrapError(l.canceled())})}return!0})},t.prototype.installFromZipPath=function(e,t,n,r){var i=this
;return this.toNonCancellablePromise(this.getInstalled().then(function(o){var s=i.getOperation({id:m.getIdFromLocalExtensionId(e.id),uuid:e.uuid},o);return i.installExtension({zipPath:t,id:e.id,metadata:n},r).then(function(e){return i.installDependenciesAndPackExtensions(e,null).then(function(){return e},function(t){return i.uninstall(e,!0).then(function(){return g.TPromise.wrapError(t)},function(){return g.TPromise.wrapError(t)})})}).then(function(n){return i._onDidInstallExtension.fire({identifier:e,zipPath:t,local:n,operation:s}),n},function(n){return i._onDidInstallExtension.fire({identifier:e,zipPath:t,operation:s,error:n}),g.TPromise.wrapError(n)})}))},t.prototype.installFromGallery=function(e){var t=this,n=this.installingExtensions.get(e.identifier.id);if(!n){var r,i;n=new g.TPromise(function(e,t){r=e,i=t}),this.installingExtensions.set(e.identifier.id,n);try{var o=(new Date).getTime(),s={id:B(e,e.version),uuid:e.identifier.uuid},a=m.getGalleryExtensionTelemetryData(e),u=v.InstallOperation.Install
;this.logService.info("Installing extension:",e.name),this._onInstallExtension.fire({identifier:s,gallery:e}),this.checkMalicious(e).then(function(){return t.getInstalled(v.LocalExtensionType.User)}).then(function(n){var r=n.filter(function(t){return m.areSameExtensions(t.galleryIdentifier,e.identifier)})[0];return u=r?v.InstallOperation.Update:v.InstallOperation.Install,t.downloadInstallableExtension(e,u).then(function(e){return t.installExtension(e,v.LocalExtensionType.User).then(function(t){return _.always(c.rimraf(e.zipPath),function(){return null}).then(function(){return t})})}).then(function(e){return t.installDependenciesAndPackExtensions(e,r).then(function(){return e},function(n){return t.uninstall(e,!0).then(function(){return g.TPromise.wrapError(n)},function(){return g.TPromise.wrapError(n)})})})}).then(function(n){t.installingExtensions.delete(e.identifier.id),t.logService.info("Extensions installed successfully:",e.identifier.id),t._onDidInstallExtension.fire({identifier:s,gallery:e,local:n,
operation:u}),t.reportTelemetry(t.getTelemetryEvent(u),a,(new Date).getTime()-o,void 0),r(null)},function(n){t.installingExtensions.delete(e.identifier.id);var r=n&&n.code?n.code:"unknown";t.logService.error("Failed to install extension:",e.identifier.id,n?n.message:r),t._onDidInstallExtension.fire({identifier:s,gallery:e,operation:u,error:r}),t.reportTelemetry(t.getTelemetryEvent(u),a,(new Date).getTime()-o,n),i(n)})}catch(t){this.installingExtensions.delete(e.identifier.id),i(t)}}return n},t.prototype.reinstallFromGallery=function(e){var t=this;return 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 g.TPromise.wrapError(new Error(r.localize(7,null,D.toErrorMessage(e))))})}):g.TPromise.wrapError(new Error(r.localize(8,null)))}):g.TPromise.wrapError(new Error(r.localize(6,null)))},t.prototype.getOperation=function(e,t){
return t.some(function(t){return m.areSameExtensions({id:m.getGalleryExtensionIdFromLocal(t),uuid:t.identifier.uuid},e)})?v.InstallOperation.Update:v.InstallOperation.Install},t.prototype.getTelemetryEvent=function(e){return e===v.InstallOperation.Update?"extensionGallery:update":"extensionGallery:install"},t.prototype.checkMalicious=function(e){return this.getExtensionsReport().then(function(t){if(m.getMaliciousExtensionsSet(t).has(e.identifier.id))throw new q("malicious",r.localize(9,null));return null})},t.prototype.downloadInstallableExtension=function(e,t){var n=this,i={id:e.identifier.uuid,publisherId:e.publisherId,publisherDisplayName:e.publisherDisplayName};return this.galleryService.loadCompatibleVersion(e).then(function(o){return o?(n.logService.trace("Started downloading extension:",e.name),n.galleryService.download(o,t).then(function(t){return n.logService.info("Downloaded extension:",e.name,t),W(t).then(function(e){return{zipPath:t,id:z(e),metadata:i}},function(e){
return g.TPromise.wrapError(new q(n.joinErrors(e).message,"validating"))})},function(e){return g.TPromise.wrapError(new q(n.joinErrors(e).message,"downloading"))})):g.TPromise.wrapError(new q(r.localize(10,null,e.identifier.id,S.default.version),"incompatible"))},function(e){return g.TPromise.wrapError(new q(n.joinErrors(e).message,"gallery"))})},t.prototype.installExtension=function(e,t){var n=this;return this.unsetUninstalledAndGetLocal(e.id).then(function(r){return r||n.extractAndInstall(e,t)},function(e){return x.isMacintosh?g.TPromise.wrapError(new q(r.localize(11,null),"unsetUninstalled")):g.TPromise.wrapError(new q(r.localize(12,null),"unsetUninstalled"))})},t.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),t.unsetUninstalled(e).then(function(){return t.logService.info("Removed the extension from uninstalled list:",e),t.getInstalled(v.LocalExtensionType.User)
}).then(function(t){return t.filter(function(t){return t.identifier.id===e})[0]})):null})},t.prototype.extractAndInstall=function(e,t){var n=this,i=e.zipPath,o=e.id,a=e.metadata,u=t===v.LocalExtensionType.User?this.extensionsPath:this.systemExtensionsPath,l=s.join(u,"."+o),f=s.join(u,o);return c.rimraf(f).then(function(){return n.extractAndRename(o,i,l,f)},function(e){return g.TPromise.wrapError(new q(r.localize(13,null,f,o),"deleting"))}).then(function(){return n.logService.info("Installation completed.",o),n.scanExtension(o,u,t)}).then(function(e){return a?(e.metadata=a,n.saveMetadataForLocalExtension(e)):e})},t.prototype.extractAndRename=function(e,t,n,r){var i=this;return this.extract(e,t,n).then(function(){return i.rename(e,n,r,Date.now()+12e4).then(function(){return i.logService.info("Renamed to",r)},function(e){return i.logService.info("Rename failed. Deleting from extracted location",n),_.always(c.rimraf(n),function(){return null}).then(function(){return g.TPromise.wrapError(e)})})})},
t.prototype.extract=function(e,t,n){var r=this;return this.logService.trace("Started extracting the extension from "+t+" to "+n),c.rimraf(n).then(function(){return h.extract(t,n,{sourcePath:"extension",overwrite:!0},r.logService).then(function(){return r.logService.info("Extracted extension to "+n+":",e)},function(e){return _.always(c.rimraf(n),function(){return null}).then(function(){return g.TPromise.wrapError(new q(e.message,e instanceof h.ExtractError?e.type:"extracting"))})})},function(e){return g.TPromise.wrapError(new q(r.joinErrors(e).message,"deleting"))})},t.prototype.rename=function(e,t,n,i){var o=this;return c.rename(t,n).then(null,function(s){return x.isWindows&&s&&"EPERM"===s.code&&Date.now()<i?(o.logService.info("Failed renaming "+t+" to "+n+" with 'EPERM' error. Trying again..."),o.rename(e,t,n,i)):g.TPromise.wrapError(new q(s.message||r.localize(14,null,t,n),s.code||"renaming"))})},t.prototype.installDependenciesAndPackExtensions=function(e,t){var n=this;if(this.galleryService.isEnabled()){
var r=e.manifest.extensionDependencies||[];if(e.manifest.extensionPack)for(var i=function(e){t&&t.manifest.extensionPack&&t.manifest.extensionPack.some(function(t){return m.areSameExtensions({id:t},{id:e})})||r.every(function(t){return!m.areSameExtensions({id:t},{id:e})})&&r.push(e)},o=0,s=e.manifest.extensionPack;o<s.length;o++){i(s[o])}if(r.length)return this.getInstalled().then(function(e){var t=r.filter(function(t){return!n.installingExtensions.has(m.adoptToGalleryExtensionId(t))&&e.every(function(e){var n=e.galleryIdentifier;return!m.areSameExtensions(n,{id:t})})});return t.length?n.galleryService.query({names:t,pageSize:r.length}).then(function(e){var t=e.firstPage;return g.TPromise.join(t.map(function(e){return n.installFromGallery(e)})).then(function(){return null},function(e){return n.rollback(t).then(function(){return g.TPromise.wrapError(e)},function(){return g.TPromise.wrapError(e)})})}):null})}return g.TPromise.as(null)},t.prototype.rollback=function(e){var t=this
;return this.getInstalled(v.LocalExtensionType.User).then(function(n){return g.TPromise.join(n.filter(function(t){return e.some(function(e){return t.identifier.id===B(e,e.version)})}).map(function(e){return t.uninstall(e,!0)}))}).then(function(){return null},function(){return null})},t.prototype.uninstall=function(e,t){var n=this;return void 0===t&&(t=!1),this.toNonCancellablePromise(this.getInstalled(v.LocalExtensionType.User).then(function(t){var r=t.filter(function(t){return t.manifest.publisher===e.manifest.publisher&&t.manifest.name===e.manifest.name}).map(function(e){return n.checkForDependenciesAndUninstall(e,t)});return g.TPromise.join(r).then(function(){return null},function(e){return g.TPromise.wrapError(n.joinErrors(e))})}))},t.prototype.updateMetadata=function(e,t){var n=this;return e.metadata=t,this.saveMetadataForLocalExtension(e).then(function(e){return n.manifestCache.invalidate(),e})},t.prototype.saveMetadataForLocalExtension=function(e){if(!e.metadata)return g.TPromise.as(e)
;var t=s.join(this.extensionsPath,e.identifier.id,"package.json");return c.readFile(t,"utf8").then(function(e){return U(e)}).then(function(t){var n=t.manifest;return f.assign(n,{__metadata:e.metadata})}).then(function(e){return c.writeFile(t,JSON.stringify(e,null,"\t"))}).then(function(){return e})},t.prototype.getMetadata=function(e){return this.findGalleryExtensionByName(e).then(function(e){return e?{id:e.identifier.uuid,publisherDisplayName:e.publisherDisplayName,publisherId:e.publisherId}:null})},t.prototype.findGalleryExtension=function(e){var t=this;return e.identifier.uuid?this.findGalleryExtensionById(e.identifier.uuid).then(function(n){return n||t.findGalleryExtensionByName(m.getGalleryExtensionIdFromLocal(e))}):this.findGalleryExtensionByName(m.getGalleryExtensionIdFromLocal(e))},t.prototype.findGalleryExtensionById=function(e){return this.galleryService.query({ids:[e],pageSize:1}).then(function(e){return e.firstPage[0]})},t.prototype.findGalleryExtensionByName=function(e){
return this.galleryService.query({names:[e],pageSize:1}).then(function(e){return e.firstPage[0]})},t.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(""))},t.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 q(t instanceof Error?t.message:t,"local")),g.TPromise.wrapError(t)})},t.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 g.TPromise.wrapError(new Error(this.getDependentsErrorMessage(e,o)))}
return g.TPromise.join([this.uninstallExtension(e)].concat(t.map(function(e){return r.doUninstall(e)}))).then(function(){return null})},t.prototype.getDependentsErrorMessage=function(e,t){return 1===t.length?r.localize(15,null,e.manifest.displayName||e.manifest.name,t[0].manifest.displayName||t[0].manifest.name):2===t.length?r.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):r.localize(17,null,e.manifest.displayName||e.manifest.name,t[0].manifest.displayName||t[0].manifest.name,t[1].manifest.displayName||t[1].manifest.name)},t.prototype.getAllPackExtensionsToUninstall=function(e,t,n){if(void 0===n&&(n=[]),-1!==n.indexOf(e))return[];if(n.push(e),!e.manifest.extensionPack||0===e.manifest.extensionPack.length)return[];for(var r=t.filter(function(t){return e.manifest.extensionPack.some(function(e){return m.areSameExtensions({id:e},t.galleryIdentifier)})}),i=[],o=0,s=r;o<s.length;o++){var a=s[o]
;i.push.apply(i,this.getAllPackExtensionsToUninstall(a,t,n))}return r.concat(i)},t.prototype.getDependents=function(e,t){return t.filter(function(t){return t.manifest.extensionDependencies&&t.manifest.extensionDependencies.some(function(t){return m.areSameExtensions({id:t},e.galleryIdentifier)})})},t.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 q(n instanceof Error?n.message:n,"local")),g.TPromise.wrapError(n)})},t.prototype.preUninstallExtension=function(e){var t=this;return c.exists(e.location.fsPath).then(function(e){return e?null:g.TPromise.wrapError(new Error(r.localize(18,null)))}).then(function(){t.logService.info("Uninstalling extension:",e.identifier.id),t._onUninstallExtension.fire(e.identifier)})},t.prototype.uninstallExtension=function(e){
var t=this,n=m.getGalleryExtensionIdFromLocal(e),r=this.uninstallingExtensions.get(n);return r||(r=this.scanUserExtensions(!1).then(function(r){return t.setUninstalled.apply(t,r.filter(function(t){return m.areSameExtensions({id:m.getGalleryExtensionIdFromLocal(t),uuid:t.identifier.uuid},{id:n,uuid:e.identifier.uuid})}))}).then(function(){t.uninstallingExtensions.delete(n)}),this.uninstallingExtensions.set(n,r)),r},t.prototype.postUninstallExtension=function(e,t){return i(this,void 0,void 0,function(){var n;return o(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,v.StatisticType.Uninstall)]:[3,3];case 2:r.sent(),r.label=3;case 3:
return this.reportTelemetry("extensionGallery:uninstall",m.getLocalExtensionTelemetryData(e),void 0,t),n=t?t instanceof q?t.code:"unknown":void 0,this._onDidUninstallExtension.fire({identifier:e.identifier,error:n}),[2]}})})},t.prototype.getInstalled=function(e){var t=this;void 0===e&&(e=null);var n=[];return null!==e&&e!==v.LocalExtensionType.System||n.push(this.scanSystemExtensions().then(null,function(e){return new q(t.joinErrors(e).message,"scanningSystem")})),null!==e&&e!==v.LocalExtensionType.User||n.push(this.scanUserExtensions(!0).then(null,function(e){return new q(t.joinErrors(e).message,"scanningUser")})),g.TPromise.join(n).then(p.flatten,function(e){return g.TPromise.wrapError(t.joinErrors(e))})},t.prototype.scanSystemExtensions=function(){var e=this;return this.logService.trace("Started scanning system extensions"),this.scanExtensions(this.systemExtensionsPath,v.LocalExtensionType.System).then(function(t){return e.logService.info("Scanned system extensions:",t.length),t})},
t.prototype.scanUserExtensions=function(e){var t=this;return this.logService.trace("Started scanning user extensions"),g.TPromise.join([this.getUninstalledExtensions(),this.scanExtensions(this.extensionsPath,v.LocalExtensionType.User)]).then(function(n){var r=n[0],i=n[1];if(i=i.filter(function(e){return!r[e.identifier.id]}),e){i=m.groupByExtension(i,function(e){return{id:m.getGalleryExtensionIdFromLocal(e),uuid:e.identifier.uuid}}).map(function(e){return e.sort(function(e,t){return w.rcompare(e.manifest.version,t.manifest.version)})[0]})}return t.logService.info("Scanned user extensions:",i.length),i})},t.prototype.scanExtensions=function(e,t){var n=this,r=new _.Limiter(10);return c.readdir(e).then(function(i){return g.TPromise.join(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})})},t.prototype.scanExtension=function(e,t,n){if(n===v.LocalExtensionType.User&&0===e.indexOf("."))return g.TPromise.as(null)
;var r=s.join(t,e);return c.readdir(r).then(function(t){return function(e){var t=[c.readFile(s.join(e,"package.json"),"utf8").then(function(e){return U(e)}),c.readFile(s.join(e,"package.nls.json"),"utf8").then(null,function(e){return"ENOENT"!==e.code?g.TPromise.wrapError(e):"{}"}).then(function(e){return JSON.parse(e)})];return g.TPromise.join(t).then(function(e){var t=e[0],n=t.manifest,r=t.metadata,i=e[1];return{manifest:y.localizeManifest(n,i),metadata:r}})}(r).then(function(i){var o=i.manifest,a=i.metadata,u=t.filter(function(e){return/^readme(\.txt|\.md|)$/i.test(e)})[0],c=u?C.default.file(s.join(r,u)).toString():null,l=t.filter(function(e){return/^changelog(\.txt|\.md|)$/i.test(e)})[0],f=l?C.default.file(s.join(r,l)).toString():null;o.extensionDependencies&&(o.extensionDependencies=o.extensionDependencies.map(function(e){return m.adoptToGalleryExtensionId(e)})),o.extensionPack&&(o.extensionPack=o.extensionPack.map(function(e){return m.adoptToGalleryExtensionId(e)}));var d={
id:n===v.LocalExtensionType.System?e:z(o),uuid:a?a.id:null},p={id:m.getGalleryExtensionId(o.publisher,o.name),uuid:d.uuid};return{type:n,identifier:d,galleryIdentifier:p,manifest:o,metadata:a,location:C.default.file(r),readmeUrl:c,changelogUrl:f}})}).then(null,function(){return null})},t.prototype.removeDeprecatedExtensions=function(){var e=this;return this.removeUninstalledExtensions().then(function(){return e.removeOutdatedExtensions()})},t.prototype.removeUninstalledExtensions=function(){var e=this;return this.getUninstalledExtensions().then(function(t){return e.scanExtensions(e.extensionsPath,v.LocalExtensionType.User).then(function(n){var r=n.filter(function(e){return t[e.identifier.id]});return g.TPromise.join(r.map(function(t){return e.extensionLifecycle.uninstall(t).then(function(){return e.removeUninstalledExtension(t)})}))})}).then(function(){return null})},t.prototype.removeOutdatedExtensions=function(){var e=this
;return this.scanExtensions(this.extensionsPath,v.LocalExtensionType.User).then(function(t){var n=[],r=m.groupByExtension(t,function(e){return{id:m.getGalleryExtensionIdFromLocal(e),uuid:e.identifier.uuid}});return n.push.apply(n,p.flatten(r.map(function(e){return e.sort(function(e,t){return w.rcompare(e.manifest.version,t.manifest.version)}).slice(1)}))),g.TPromise.join(n.map(function(t){return e.removeExtension(t,"outdated")}))}).then(function(){return null})},t.prototype.removeUninstalledExtension=function(e){var t=this;return this.removeExtension(e,"uninstalled").then(function(){return t.withUninstalledExtensions(function(t){return delete t[e.identifier.id]})}).then(function(){return null})},t.prototype.removeExtension=function(e,t){var n=this;return this.logService.trace("Deleting "+t+" extension from disk",e.identifier.id),c.rimraf(e.location.fsPath).then(function(){return n.logService.info("Deleted from disk",e.identifier.id)})},t.prototype.isUninstalled=function(e){
return this.filterUninstalled(e).then(function(e){return 1===e.length})},t.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]&&n.push(o)}return n})},t.prototype.setUninstalled=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.map(function(e){return e.identifier.id});return this.withUninstalledExtensions(function(e){return f.assign(e,n.reduce(function(e,t){return e[t]=!0,e},{}))})},t.prototype.unsetUninstalled=function(e){return this.withUninstalledExtensions(function(t){return delete t[e]})},t.prototype.getUninstalledExtensions=function(){return this.withUninstalledExtensions(function(e){return e})},t.prototype.withUninstalledExtensions=function(e){var t=this;return this.uninstalledFileLimiter.queue(function(){var n=null;return c.readFile(t.uninstalledPath,"utf8").then(null,function(e){
return"ENOENT"===e.code?g.TPromise.as("{}"):g.TPromise.wrapError(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})})},t.prototype.getExtensionsReport=function(){var e=(new Date).getTime();return(!this.reportedExtensions||e-this.lastReportTimestamp>3e5)&&(this.reportedExtensions=this.updateReportCache(),this.lastReportTimestamp=e),this.reportedExtensions},t.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"),[]})},t.prototype.toNonCancellablePromise=function(e){var t=this;return new g.TPromise(function(t,n){return e.then(function(e){return t(e)},function(e){return n(e)})},function(){return t.logService.debug("Request Cancelled")})},t.prototype.reportTelemetry=function(e,t,n,r){var i=r?r instanceof q?r.code:"unknown":void 0;this.telemetryService.publicLog(e,f.assign(t,{success:!r,duration:n,errorcode:i}))},t=a([u(0,b.IEnvironmentService),u(1,k.IDialogService),u(2,v.IExtensionGalleryService),u(3,P.ILogService),u(4,M.optional(R.IDownloadService)),u(5,L.ITelemetryService)],t)}(d.Disposable);t.ExtensionManagementService=V,t.getLocalExtensionIdFromGallery=B,t.getLocalExtensionIdFromManifest=z}),define(e[48],t([0,1,2,7,77,19,9,120]),function(e,t,n,r,s,a,u,c){"use strict";function l(t){var a;return(t.getRawRequest?n.TPromise.as(t.getRawRequest(t)):n.TPromise.wrap(function(t){
return i(this,void 0,void 0,function(){var n,r,i;return o(this,function(o){switch(o.label){case 0:return"https:"!==(n=s.parse(t.url)).protocol?[3,2]:[4,new Promise(function(t,n){e(["https"],t,n)})];case 1:return i=o.sent(),[3,4];case 2:return[4,new Promise(function(t,n){e(["http"],t,n)})];case 3:i=o.sent(),o.label=4;case 4:return r=i,[2,r.request]}})})}(t))).then(function(e){return new n.TPromise(function(n,i){var o=s.parse(t.url),f={hostname:o.hostname,port:o.port?parseInt(o.port):"https:"===o.protocol?443:80,protocol:o.protocol,path:o.path,method:t.type||"GET",headers:t.headers,agent:t.agent,rejectUnauthorized:!r.isBoolean(t.strictSSL)||t.strictSSL};if(t.user&&t.password&&(f.auth=t.user+":"+t.password),(a=e(f,function(e){var o=r.isNumber(t.followRedirects)?t.followRedirects:3;if(e.statusCode>=300&&e.statusCode<400&&o>0&&e.headers.location)l(u.assign({},t,{url:e.headers.location,followRedirects:o-1})).done(n,i);else{var s=e;"gzip"===e.headers["content-encoding"]&&(s=s.pipe(c.createGunzip())),n({res:e,
stream:s})}})).on("error",i),t.timeout&&a.setTimeout(t.timeout),t.data){if("string"!=typeof t.data)return void t.data.pipe(a);a.write(t.data)}a.end()},function(){return a&&a.abort()})})}function f(e){return e.res.statusCode>=200&&e.res.statusCode<300||1223===e.res.statusCode}function d(e){return 204===e.res.statusCode}Object.defineProperty(t,"__esModule",{value:!0}),t.request=l,t.download=function(e,t){return new n.TPromise(function(n,r){var i=a.createWriteStream(e);i.once("finish",function(){return n(null)}),t.stream.once("error",r),t.stream.pipe(i)})},t.asText=function(e){return new n.TPromise(function(t,n){if(!f(e))return n("Server returned "+e.res.statusCode);if(d(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 n.TPromise(function(t,n){if(!f(e))return n("Server returned "+e.res.statusCode);if(d(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[49],t([0,1,27,5,2,20,16,28,33,9,46,34,48,25,22,40,18,14,36,24,29,10]),function(e,t,n,r,i,o,c,l,f,d,p,h,g,v,m,y,b,_,E,w,C,S){"use strict";function x(){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 P(e,t){var n=(e||[]).filter(function(e){return e.statisticName===t})[0];return n?n.value:0}function O(t,n){var r=t.files.filter(function(e){return e.assetType===n})[0];if(n===A.Repository&&t.properties){var i=t.properties.filter(function(e){return e.key===n}),o=new RegExp("((git|ssh|http(s)?)|(git@[w.]+))(:(//)?)([w.@:/-~]+)(.git)(/)?");return(s=i.filter(function(e){return o.test(e.value)})[0])?{uri:s.value,fallbackUri:s.value}:{uri:null,fallbackUri:null}}if(!r){if(n===A.Icon){var s=e.toUrl("./media/defaultIcon.png");return{uri:s,fallbackUri:s}}return n===A.Repository?{uri:null,fallbackUri:null}:null}return n===A.VSIX?{
uri:t.fallbackAssetUri+"/"+n+"?redirect=true",fallbackUri:t.fallbackAssetUri+"/"+n}:{uri:t.assetUri+"/"+n,fallbackUri:t.fallbackAssetUri+"/"+n}}function k(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 f.adoptToGalleryExtensionId(e)}):[]}function T(e){var t=e.properties?e.properties.filter(function(e){return e.key===F.Engine}):[];return t.length>0&&t[0].value||""}function I(e,t,n,r,i){var o={manifest:O(t,A.Manifest),readme:O(t,A.Details),changelog:O(t,A.Changelog),download:O(t,A.VSIX),icon:O(t,A.Icon),license:O(t,A.License),repository:O(t,A.Repository),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},{})}(t)};return{identifier:{id:f.getGalleryExtensionId(e.publisher.publisherName,e.extensionName),
uuid:e.extensionId},name:e.extensionName,version:t.version,date:t.lastUpdated,displayName:e.displayName,publisherId:e.publisher.publisherId,publisher:e.publisher.publisherName,publisherDisplayName:e.publisher.displayName,description:e.shortDescription||"",installCount:P(e.statistics,"install")+P(e.statistics,"updateCount"),rating:P(e.statistics,"averagerating"),ratingCount:P(e.statistics,"ratingcount"),assets:o,properties:{dependencies:k(t,F.Dependency),extensionPack:k(t,F.ExtensionPack),engine:T(t)},telemetryData:{index:(r.pageNumber-1)*r.pageSize+n,searchText:r.searchText,querySource:i},preview:function(e){return-1!==e.indexOf("preview")}(e.flags)}}function D(e){var t=r.join(e.userDataPath,"machineid");return _.readFile(t,"utf8").then(function(e){return w.isUUID(e)?e:i.TPromise.wrap(null)},function(e){return i.TPromise.wrap(null)}).then(function(e){if(!e){e=w.generateUuid();try{E.writeFileAndFlushSync(t,e)}catch(e){}}return{"X-Market-Client-Id":"VSCode "+v.default.version,
"User-Agent":"VSCode "+v.default.version,"X-Market-User-Id":e}})}Object.defineProperty(t,"__esModule",{value:!0});var L;!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"}(L||(L={}));var j;!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"}(j||(j={}));var A={
Icon:"Microsoft.VisualStudio.Services.Icons.Default",Details:"Microsoft.VisualStudio.Services.Content.Details",Changelog:"Microsoft.VisualStudio.Services.Content.Changelog",Manifest:"Microsoft.VisualStudio.Code.Manifest",VSIX:"Microsoft.VisualStudio.Services.VSIXPackage",License:"Microsoft.VisualStudio.Services.Content.License",Repository:"Microsoft.VisualStudio.Services.Links.Source"},F={Dependency:"Microsoft.VisualStudio.Code.ExtensionDependencies",ExtensionPack:"Microsoft.VisualStudio.Code.ExtensionPack",Engine:"Microsoft.VisualStudio.Code.Engine"},R={pageNumber:1,pageSize:10,sortBy:l.SortBy.NoneOrRelevance,sortOrder:l.SortOrder.Default,flags:L.None,criteria:[],assetTypes:[]},M=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(d.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(d.assign({},this.state,{criteria:i}))},e.prototype.withSortBy=function(t){return new e(d.assign({},this.state,{sortBy:t}))},e.prototype.withSortOrder=function(t){return new e(d.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(d.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(d.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===j.SearchText})[0];return e?e.value:""},enumerable:!0,configurable:!0}),e}(),N=function(){function e(e,t,n){this.requestService=e,this.environmentService=t,this.telemetryService=n;var r=m.default.extensionsGallery;this.extensionsGalleryUrl=r&&r.serviceUrl,this.extensionsControlUrl=r&&r.controlUrl,this.commonHeadersPromise=D(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.getExtension=function(e,t){var n=e.id,r=e.uuid,i=(new M).withFlags(L.IncludeAssetUri,L.IncludeStatistics,L.IncludeFiles,L.IncludeVersionProperties).withPage(1,1).withFilter(j.Target,"Microsoft.VisualStudio.Code").withFilter(j.ExcludeWithFlags,x(L.Unpublished));return i=r?i.withFilter(j.ExtensionId,r):i.withFilter(j.ExtensionName,n),this.queryGallery(i).then(function(e){var n=e.galleryExtensions;if(n.length){var r=n[0],o=t?r.versions.filter(function(e){return e.version===t})[0]:r.versions[0];if(o)return I(r,o,0,i)}return null})},e.prototype.query=function(e){var t=this;if(void 0===e&&(e={}),!this.isEnabled())return i.TPromise.wrapError(new Error("No extension gallery service configured."));var n=e.names?"ids":e.text?"text":"all",r=e.text||"",o=d.getOrDefault(e,function(e){return e.pageSize},50)
;this.telemetryService.publicLog("galleryService:query",{type:n,text:r});var s=(new M).withFlags(L.IncludeLatestVersionOnly,L.IncludeAssetUri,L.IncludeStatistics,L.IncludeFiles,L.IncludeVersionProperties).withPage(1,o).withFilter(j.Target,"Microsoft.VisualStudio.Code").withFilter(j.ExcludeWithFlags,x(L.Unpublished));return r?((r=(r=(r=r.replace(/\bcategory:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g,function(e,t,n){return s=s.withFilter(j.Category,n||t),""})).replace(/\btag:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g,function(e,t,n){return s=s.withFilter(j.Tag,n||t),""})).trim())&&(r=r.length<200?r:r.substring(0,200),s=s.withFilter(j.SearchText,r)),s=s.withSortBy(l.SortBy.NoneOrRelevance)):s=e.ids?s.withFilter.apply(s,[j.ExtensionId].concat(e.ids)):e.names?s.withFilter.apply(s,[j.ExtensionName].concat(e.names)):s.withSortBy(l.SortBy.InstallCount),"number"==typeof e.sortBy&&(s=s.withSortBy(e.sortBy)),"number"==typeof e.sortOrder&&(s=s.withSortOrder(e.sortOrder)),this.queryGallery(s).then(function(n){
var r=n.galleryExtensions,o=n.total;return{firstPage:r.map(function(t,n){return I(t,t.versions[0],n,s,e.source)}),total:o,pageSize:s.pageSize,getPage:function(n,r){if(r.isCancellationRequested)return i.TPromise.wrapError(c.canceled());var o=s.withPage(n+1),a=t.queryGallery(o).then(function(t){return t.galleryExtensions.map(function(t,n){return I(t,t.versions[0],n,o,e.source)})});return S.wireCancellationToken(r,a)}}})},e.prototype.queryGallery=function(e){var t=this;return this.commonHeadersPromise.then(function(n){var r=JSON.stringify(e.raw),i=d.assign({},n,{"Content-Type":"application/json",Accept:"application/json;api-version=3.0-preview.1","Accept-Encoding":"gzip","Content-Length":r.length});return t.requestService.request({type:"POST",url:t.api("/extensionquery"),data:r,headers:i}).then(function(e){return e.res.statusCode>=400&&e.res.statusCode<500?{galleryExtensions:[],total:0}:g.asJson(e).then(function(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}})})})},e.prototype.reportStatistic=function(e,t,n,r){var o=this;return this.isEnabled()?this.commonHeadersPromise.then(function(i){var a=s({},i,{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}).then(null,function(){return null})}):i.TPromise.as(null)},e.prototype.download=function(e,t){var i=this,o=r.join(n.tmpdir(),w.generateUuid()),s=f.getGalleryExtensionTelemetryData(e),a=(new Date).getTime(),u=t===l.InstallOperation.Install?"install":t===l.InstallOperation.Update?"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 g.download(o,e)}).then(function(){return function(e){
return i.telemetryService.publicLog("galleryService:downloadVSIX",d.assign(s,{duration:e}))}((new Date).getTime()-a)}).then(function(){return o})},e.prototype.getReadme=function(e){return this.getAsset(e.assets.readme).then(g.asText)},e.prototype.getManifest=function(e){return this.getAsset(e.assets.manifest).then(g.asText).then(JSON.parse)},e.prototype.getCoreTranslation=function(e,t){var n=e.assets.coreTranslations[t.toUpperCase()];return n?this.getAsset(n).then(g.asText).then(JSON.parse):i.TPromise.as(null)},e.prototype.getChangelog=function(e){return this.getAsset(e.assets.changelog).then(g.asText)},e.prototype.loadAllDependencies=function(e){return this.getDependenciesReccursively(e.map(function(e){return e.id}),[])},e.prototype.loadCompatibleVersion=function(e){var t=this;if(e.properties.engine&&y.isEngineValid(e.properties.engine))return i.TPromise.wrap(e)
;var n=(new M).withFlags(L.IncludeVersions,L.IncludeFiles,L.IncludeVersionProperties).withPage(1,1).withFilter(j.Target,"Microsoft.VisualStudio.Code").withFilter(j.ExcludeWithFlags,x(L.Unpublished)).withAssetTypes(A.Manifest,A.VSIX).withFilter(j.ExtensionId,e.identifier.uuid);return this.queryGallery(n).then(function(n){var r=n.galleryExtensions[0];return r?t.getLastValidExtensionVersion(r,r.versions).then(function(t){return t?(e.properties.dependencies=k(t,F.Dependency),e.properties.engine=T(t),e.assets.download=O(t,A.VSIX),e.version=t.version,e):null}):null})},e.prototype.loadDependencies=function(e){var t;if(!e||0===e.length)return i.TPromise.as([])
;var n=(t=(new M).withFlags(L.IncludeLatestVersionOnly,L.IncludeAssetUri,L.IncludeStatistics,L.IncludeFiles,L.IncludeVersionProperties).withPage(1,e.length).withFilter(j.Target,"Microsoft.VisualStudio.Code").withFilter(j.ExcludeWithFlags,x(L.Unpublished)).withAssetTypes(A.Icon,A.License,A.Details,A.Manifest,A.VSIX)).withFilter.apply(t,[j.ExtensionName].concat(e));return this.queryGallery(n).then(function(e){for(var t=[],r=[],i=0;i<e.galleryExtensions.length;i++){var o=e.galleryExtensions[i];-1===r.indexOf(o.extensionId)&&(t.push(I(o,o.versions[0],i,n,"dependencies")),r.push(o.extensionId))}return t})},e.prototype.getDependenciesReccursively=function(t,n){var r=this;return t&&t.length&&(t=n.length?t.filter(function(t){return!e.hasExtensionByName(n,t)}):t).length?this.loadDependencies(t).then(function(t){for(var i=new Set,s=0,a=t;s<a.length;s++){var u=a[s];u.properties.dependencies&&u.properties.dependencies.forEach(function(e){return i.add(e)})}n=o.distinct(n.concat(t),function(e){return e.identifier.uuid})
;var c=[];return i.forEach(function(t){return!e.hasExtensionByName(n,t)&&c.push(t)}),r.getDependenciesReccursively(c,n)}):i.TPromise.wrap(n)},e.prototype.getAsset=function(e,t){var n=this;return void 0===t&&(t={}),this.commonHeadersPromise.then(function(r){var o=d.assign({},r,t.headers||{});t=d.assign({},t,{type:"GET"},{headers:o});var s=e.uri,a=e.fallbackUri,u=d.assign({},t,{url:s});return n.requestService.request(u).then(function(e){return 200===e.res.statusCode?i.TPromise.as(e):g.asText(e).then(function(t){return i.TPromise.wrapError(new Error("Expected 200, got back "+e.res.statusCode+" instead.\n\n"+t))})}).then(null,function(e){if(c.isPromiseCanceledError(e))return i.TPromise.wrapError(e);var r=c.getErrorMessage(e);n.telemetryService.publicLog("galleryService:requestError",{url:s,cdn:!0,message:r}),n.telemetryService.publicLog("galleryService:cdnFallback",{url:s,message:r});var o=d.assign({},t,{url:a});return n.requestService.request(o).then(null,function(e){
if(c.isPromiseCanceledError(e))return i.TPromise.wrapError(e);var t=c.getErrorMessage(e);return n.telemetryService.publicLog("galleryService:requestError",{url:a,cdn:!1,message:t}),i.TPromise.wrapError(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 o=r[n],s=T(o);if(!s)return null;if(y.isEngineValid(s))return i.TPromise.wrap(o)}return null},e.prototype.getLastValidExtensionVersionReccursively=function(e,t){var n=this;if(!t.length)return null;var r=t[0],i=O(r,A.Manifest);return this.getAsset(i,{headers:{"Accept-Encoding":"gzip"}}).then(function(e){return g.asJson(e)}).then(function(i){var o=i.engines.vscode;return y.isEngineValid(o)?(r.properties=r.properties||[],r.properties.push({key:F.Engine,value:i.engines.vscode}),
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}).then(function(e){return 200!==e.res.statusCode?i.TPromise.wrapError(new Error("Could not get extensions report.")):g.asJson(e).then(function(e){for(var t=new Map,n=0,r=e.malicious;n<r.length;n++){var o=r[n],s=t.get(o)||{id:{id:o},malicious:!0,slow:!1};s.malicious=!0,t.set(o,s)}return i.TPromise.as(C.values(t))})}):i.TPromise.as([]):i.TPromise.wrapError(new Error("No extension gallery service configured."))},e=a([u(0,p.IRequestService),u(1,b.IEnvironmentService),u(2,h.ITelemetryService)],e)}();t.ExtensionGalleryService=N,t.resolveMarketplaceHeaders=D}),define(e[87],t([0,1,2,9,48,76,21,11]),function(e,t,n,r,i,o,s,c){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var l=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){var s=this;void 0===t&&(t=i.request),this.logService.trace("RequestService#request",e.url);var a=this.proxyUrl,u=this.strictSSL;return(e.agent?n.TPromise.wrap(e.agent):n.TPromise.wrap(o.getProxyAgent(e.url,{proxyUrl:a,strictSSL:u}))).then(function(n){return e.agent=n,e.strictSSL=u,s.authorization&&(e.headers=r.assign(e.headers||{},{"Proxy-Authorization":s.authorization})),t(e)})},e=a([u(0,s.IConfigurationService),u(1,c.ILogService)],e)}();t.RequestService=l}),define(e[73],t([0,1,2,89,87]),function(e,t,r,i,o){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return n(r,e),r.prototype.request=function(n){return e.prototype.request.call(this,n,t.xhrRequest)},r}(o.RequestService);t.RequestService=s,t.xhrRequest=function(e){var t=new XMLHttpRequest;return new r.TPromise(function(r,o){return t.open(e.type||"GET",e.url,!0,e.user,e.password),function(e,t){if(t.headers)e:for(var n in t.headers){switch(n){case"User-Agent":case"Accept-Encoding":case"Content-Length":continue e}e.setRequestHeader(n,t.headers[n])}}(t,e),t.responseType="arraybuffer",t.onerror=function(e){return o(new Error(t.statusText&&"XHR failed: "+t.statusText))},t.onload=function(e){r({res:{statusCode:t.status,headers:function(e){for(var t=Object.create(null),n=0,r=e.getAllResponseHeaders().split(/\r\n|\n|\r/g);n<r.length;n++){var i=r[n];if(i){var o=i.indexOf(":");t[i.substr(0,o).trim().toLowerCase()]=i.substr(o+1).trim()}}return t}(t)},stream:new(function(e){function t(t){
var n=e.call(this)||this;return n._buffer=Buffer.from(new Uint8Array(t)),n._offset=0,n._length=n._buffer.length,n}return n(t,e),t.prototype._read=function(e){this._offset<this._length?(this.push(this._buffer.slice(this._offset,this._offset+e)),this._offset+=e):this.push(null)},t}(i.Readable))(t.response)})},t.ontimeout=function(t){return o(new Error("XHR timeout: "+e.timeout+"ms"))},e.timeout&&(t.timeout=e.timeout),t.send(e.data),null},function(){t.abort()})}}),define(e[124],t([0,1,19,8,22,25,108,2,47,38,79,18,93,68,28,115,49,21,102,46,73,34,106,109,110,105,107,111,113,125,92,86,11,85,95,37,82,74,35,4,42,65,96]),function(e,t,n,r,i,o,s,a,u,c,l,f,d,p,h,g,v,m,y,b,_,E,w,C,S,x,P,O,k,T,I,D,L,j,A,F,R,M,N,U,W,B,z){"use strict";function q(e){!function(e){new a.TPromise(function(e,t){T.ipcRenderer.once("handshake:hey there",function(t,n){return e(n)}),T.ipcRenderer.send("handshake:hello")}).then(function(t){return function(e){function t(i){return s.serve(e).then(null,function(o){
return!i||r.isWindows||"EADDRINUSE"!==o.code?a.TPromise.wrapError(o):s.connect(e,"").then(function(e){return e.dispose(),a.TPromise.wrapError(new Error("There is an instance already running."))},function(r){try{n.unlinkSync(e)}catch(e){return a.TPromise.wrapError(new Error("Error deleting the shared ipc hook."))}return t(!1)})})}return t(!0)}(t.sharedIPCHandle).then(function(n){return function(e,t,n){var r=new u.ServiceCollection,s=[];process.once("exit",function(){return U.dispose(s)});var T=new d.EnvironmentService(t.args,process.execPath),q=function(){return a.TPromise.as("main")},H=new j.LogLevelSetterChannelClient(e.getChannel("loglevel",{routeCall:q,routeEvent:q})),G=new j.FollowerLogService(H,D.createSpdLogService("sharedprocess",t.logLevel,T.logsPath));s.push(G),G.info("main",JSON.stringify(n)),r.set(f.IEnvironmentService,T),r.set(L.ILogService,G),r.set(m.IConfigurationService,new c.SyncDescriptor(y.ConfigurationService)),r.set(b.IRequestService,new c.SyncDescriptor(_.RequestService))
;var J=e.getChannel("windows",{routeCall:q,routeEvent:q}),K=new k.WindowsChannelClient(J);r.set(O.IWindowsService,K);var $=new O.ActiveWindowManager(K),X=function(){return $.getActiveClientId()},Q=e.getChannel("dialog",{routeCall:X,routeEvent:X});r.set(N.IDialogService,new M.DialogChannelClient(Q));var Y=e.getChannel("download",{routeCall:X,routeEvent:X});r.set(W.IDownloadService,new B.DownloadServiceChannelClient(Y,z.DefaultURITransformer));var Z=new l.InstantiationService(r);Z.invokeFunction(function(r){var a=new u.ServiceCollection,l=r.get(f.IEnvironmentService),d=l.appRoot,m=l.extensionsPath,y=l.extensionDevelopmentLocationURI,b=l.isBuilt,_=l.installSourcePath,O=new j.FollowerLogService(H,D.createSpdLogService("telemetry",t.logLevel,l.logsPath)),k=w.NullAppender;if(i.default.aiConfig&&i.default.aiConfig.asimovKey&&b&&(k=new P.AppInsightsAppender(V,null,i.default.aiConfig.asimovKey,O),s.push(k)),e.registerChannel("telemetryAppender",new S.TelemetryAppenderChannel(k)),
y||l.args["disable-telemetry"]||!i.default.enableTelemetry)a.set(E.ITelemetryService,w.NullTelemetryService);else{var T={appender:w.combinedAppender(k,new w.LogAppender(G)),commonProperties:C.resolveCommonProperties(i.default.commit,o.default.version,n.machineId,_),piiPaths:[d,m]};a.set(E.ITelemetryService,new c.SyncDescriptor(x.TelemetryService,T))}a.set(h.IExtensionManagementService,new c.SyncDescriptor(g.ExtensionManagementService)),a.set(h.IExtensionGalleryService,new c.SyncDescriptor(v.ExtensionGalleryService)),a.set(F.ILocalizationsService,new c.SyncDescriptor(A.LocalizationsService));var L=Z.createChild(a);L.invokeFunction(function(t){var n=t.get(h.IExtensionManagementService),r=new p.ExtensionManagementChannel(n);e.registerChannel("extensions",r),n.removeDeprecatedExtensions();var i=t.get(F.ILocalizationsService),o=new R.LocalizationsChannel(i);e.registerChannel("localizations",o),I.createSharedProcessContributions(L),s.push(n)})})}(n,t,e)})}).then(function(){
return T.ipcRenderer.send("handshake:im ready")})}(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.startup=q;var V="monacoworkbench"})}).call(this);
//# sourceMappingURL=https://ticino.blob.core.windows.net/sourcemaps/5944e81f3c46a3938a82c701f96d7a59b074cfdc/core/vs/code/electron-browser/sharedProcess/sharedProcessMain.js.map
