/*!--------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
(function(){
var e=["exports","require","vs/base/common/path","vs/base/common/lifecycle","vs/base/common/event","vs/base/common/platform","vs/platform/instantiation/common/instantiation","vs/base/common/errors","vs/base/node/pfs","vs/base/common/strings","vs/base/common/types","vs/base/common/objects","vs/base/common/uri","vs/nls!vs/code/electron-browser/sharedProcess/sharedProcessMain","vs/nls","vs/platform/log/common/log","vs/base/common/async","vs/platform/environment/common/environment","vs/base/common/arrays","vs/platform/configuration/common/configuration","vs/base/common/network","vs/platform/product/node/product","vs/platform/registry/common/platform","fs","vs/base/common/amd","vs/platform/configuration/common/configurationRegistry","vs/base/common/map","vs/platform/extensionManagement/common/extensionManagementUtil","vs/base/common/uuid","vs/platform/product/node/package","vs/base/common/cancellation","vs/base/common/json","os","vs/platform/extensionManagement/common/extensionManagement","vs/base/common/resources","vs/platform/request/node/request","vs/base/common/extpath","vs/base/node/extfs","vs/base/node/request","vs/platform/telemetry/common/telemetry","vs/base/common/errorMessage","vs/platform/download/common/download","vs/platform/localizations/common/localizations","vs/platform/dialogs/common/dialogs","vs/platform/instantiation/common/descriptors","vs/platform/extensions/node/extensionValidator","vs/platform/extensions/common/extensions","vs/platform/instantiation/common/serviceCollection","vs/base/parts/ipc/node/ipc","vs/base/common/glob","vs/platform/configuration/common/configurationModels","vs/base/common/iterator","vs/base/common/functional","vs/base/node/zip","vs/nls!vs/platform/workspaces/common/workspaces","vs/base/common/normalization","vs/base/common/collections","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/extensionManagement/node/extensionManagementUtil","vs/nls!vs/platform/extensions/node/extensionValidator","vs/nls!vs/platform/request/node/request","vs/nls!vs/platform/telemetry/common/telemetryService","vs/base/common/labels","vs/base/common/uriIpc","vs/platform/extensionManagement/common/extensionNls","vs/platform/extensionManagement/node/extensionLifecycle","vs/platform/extensionManagement/node/extensionManagementIpc","vs/base/common/jsonFormatter","vs/platform/extensionManagement/node/extensionsManifestCache","vs/base/node/flow","vs/platform/instantiation/common/graph","vs/platform/request/electron-browser/requestService","vs/base/node/paths","vs/platform/dialogs/node/dialogIpc","vs/base/node/proxy","url","vs/code/electron-browser/sharedProcess/contrib/logsDataCleaner","vs/code/electron-browser/sharedProcess/contrib/storageDataCleaner","vs/base/node/stream","vs/base/common/jsonEdit","vs/platform/instantiation/common/instantiationService","vs/base/node/encoding","vs/platform/localizations/node/localizationsIpc","vs/platform/request/node/requestService","vs/platform/log/node/logIpc","vs/platform/log/node/spdlogService","child_process","stream","vs/base/common/decorators","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/extensions/node/extensionsUtil","vs/platform/localizations/node/localizations","vs/base/node/config","vs/platform/jsonschemas/common/jsonContributionRegistry","vs/base/common/linkedList","vs/base/common/assert","vs/base/common/date","vs/platform/configuration/node/configuration","vs/platform/configuration/node/configurationService","vs/base/parts/ipc/node/ipc.net","vs/platform/extensionManagement/node/extensionGalleryService","vs/platform/telemetry/common/telemetryService","vs/platform/telemetry/common/telemetryUtils","vs/platform/telemetry/node/appInsightsAppender","vs/platform/download/node/downloadService","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/nls!vs/base/common/errorMessage","vs/base/common/mime","vs/platform/extensionManagement/node/extensionManagementService","vs/platform/extensionManagement/node/extensionManagementUtil","yazl","semver","yauzl","zlib","applicationinsights","net","iconv-lite","assert","vs/code/electron-browser/sharedProcess/sharedProcessMain","electron"],t=function(t){
for(var n=[],i=0,r=t.length;i<r;i++)n[i]=e[t[i]];return n};define(e[103],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ok=function(e,t){if(!e)throw new Error(t?"Assertion failed ("+t+")":"Assertion Failed")}}),define(e[56],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=Object.prototype.hasOwnProperty;t.values=function(e){const t=[];for(let i in e)n.call(e,i)&&t.push(e[i]);return t},t.size=function(e){let t=0;for(let i in e)n.call(e,i)&&(t+=1);return t},t.first=function(e){for(let t in e)if(n.call(e,t))return e[t]},t.forEach=function(e,t){for(let i in e)if(n.call(e,i)&&!1===t({key:i,value:e[i]},function(){delete e[i]}))return},t.groupBy=function(e,t){const n=Object.create(null);for(const i of e){const e=t(i);let r=n[e];r||(r=n[e]=[]),r.push(i)}return n},t.fromMap=function(e){const t=Object.create(null);return e&&e.forEach((e,n)=>{t[n]=e}),t}}),define(e[92],t([1,0]),function(e,t){"use strict";function n(e){return(t,n,i)=>{
let r=null,s=null;if("function"==typeof i.value?(r="value",s=i.value):"function"==typeof i.get&&(r="get",s=i.get),!s)throw new Error("not supported");i[r]=e(s,n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.createDecorator=n,t.memoize=function(e,t,n){let i=null,r=null;if("function"==typeof n.value?(i="value",0!==(r=n.value).length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"==typeof n.get&&(i="get",r=n.get),!r)throw new Error("not supported");const s=`$memoize$${t}`;n[i]=function(...e){return this.hasOwnProperty(s)||Object.defineProperty(this,s,{configurable:!1,enumerable:!1,writable:!1,value:r.apply(this,e)}),this[s]}},t.debounce=function(e,t,i){return n((n,r)=>{const s=`$debounce$${r}`,o=`$debounce$result$${r}`;return function(...r){this[o]||(this[o]=i?i():void 0),clearTimeout(this[s]),t&&(this[o]=t(this[o],...r),r=[this[o]]),this[s]=setTimeout(()=>{n.apply(this,r),this[o]=i?i():void 0},e)}})}}),define(e[7],t([1,0]),function(e,t){"use strict"
;function n(e){return e instanceof Error&&e.name===r&&e.message===r}Object.defineProperty(t,"__esModule",{value:!0});class i{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}t.ErrorHandler=i,t.errorHandler=new i,t.setUnexpectedErrorHandler=function(e){t.errorHandler.setUnexpectedErrorHandler(e)},t.onUnexpectedError=function(e){n(e)||t.errorHandler.onUnexpectedError(e)},t.onUnexpectedExternalError=function(e){n(e)||t.errorHandler.onUnexpectedExternalError(e)},
t.transformErrorForSerialization=function(e){if(e instanceof Error){let{name:t,message:n}=e;return{$isError:!0,name:t,message:n,stack:e.stacktrace||e.stack}}return e};const r="Canceled";t.isPromiseCanceledError=n,t.canceled=function(){let e=new Error(r);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){const t=new Error(`${e} has been disposed`);return t.name="DISPOSED",t},t.getErrorMessage=function(e){return e?e.message?e.message:e.stack?e.stack.split("\n")[0]:String(e):"Error"}});var n=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(r,s){function o(e){try{l(i.next(e))}catch(e){s(e)}}function a(e){try{l(i.throw(e))}catch(e){s(e)}}function l(e){
e.done?r(e.value):new n(function(t){t(e.value)}).then(o,a)}l((i=i.apply(e,t||[])).next())})};define(e[18],t([1,0,7]),function(e,t,i){"use strict";function r(e,t){let n=0,i=e.length;if(0===i)return 0;for(;n<i;){let r=Math.floor((n+i)/2);t(e[r])?i=r:n=r+1}return n}function s(e,t){return o(e,t,0,e.length-1,[]),e}function o(e,t,n,i,r){if(i<=n)return;let s=n+(i-n)/2|0;o(e,t,n,s,r),o(e,t,s+1,i,r),t(e[s],e[s+1])<=0||function(e,t,n,i,r,s){let o=n,a=i+1;for(let t=n;t<=r;t++)s[t]=e[t];for(let l=n;l<=r;l++)o>i?e[l]=s[a++]:a>r?e[l]=s[o++]:t(s[a],s[o])<0?e[l]=s[a++]:e[l]=s[o++]}(e,t,n,s,i,r)}function a(e,t,n){function i(e,t,n){if(0===t&&0===n.length)return;const i=r[r.length-1];i&&i.start+i.deleteCount===e?(i.deleteCount+=t,i.toInsert.push(...n)):r.push({start:e,deleteCount:t,toInsert:n})}const r=[];let s=0,o=0;for(;;){if(s===e.length){i(s,0,t.slice(o));break}if(o===t.length){i(s,e.length-s,[]);break}const r=e[s],a=t[o],l=n(r,a);0===l?(s+=1,o+=1):l<0?(i(s,1,[]),s+=1):l>0&&(i(s,0,[a]),o+=1)}return r}function l(e,t,n,i,s){
for(const o=n.length;i<s;i++){const s=e[i];if(t(s,n[o-1])<0){n.pop();const e=r(n,e=>t(s,e)<0);n.splice(e,0,s)}}}function c(e,t){for(let 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=0){return 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=((e,t)=>e===t)){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let i=0,r=e.length;i<r;i++)if(!n(e[i],t[i]))return!1;return!0},t.binarySearch=function(e,t,n){let i=0,r=e.length-1;for(;i<=r;){let s=(i+r)/2|0,o=n(e[s],t);if(o<0)i=s+1;else{if(!(o>0))return s;r=s-1}}return-(i+1)},t.findFirstInSorted=r,t.mergeSort=s,t.groupBy=function(e,t){const n=[];let i=void 0;for(const r of s(e.slice(0),t))i&&0===t(i[0],r)?i.push(r):(i=[r],n.push(i));return n},t.sortedDiff=a,t.delta=function(e,t,n){const i=a(e,t,n),r=[],s=[]
;for(const t of i)r.push(...e.slice(t.start,t.start+t.deleteCount)),s.push(...t.toInsert);return{removed:r,added:s}},t.top=function(e,t,n){if(0===n)return[];const i=e.slice(0,n).sort(t);return l(e,t,i,n,e.length),i},t.topAsync=function(e,t,r,s,o){return 0===r?Promise.resolve([]):new Promise((a,c)=>{(()=>n(this,void 0,void 0,function*(){const n=e.length,a=e.slice(0,r).sort(t);for(let c=r,u=Math.min(r+s,n);c<n;c=u,u=Math.min(u+s,n)){if(c>r&&(yield new Promise(e=>setTimeout(e))),o&&o.isCancellationRequested)throw i.canceled();l(e,t,a,c,u)}return a}))().then(a,c)})},t.coalesce=function(e){return e?e.filter(e=>!!e):e},t.coalesceInPlace=function(e){if(!e)return;let t=0;for(let n=0;n<e.length;n++)e[n]&&(e[t]=e[n],t+=1);e.length=t},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.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},t.distinct=function(e,t){if(!t)return e.filter((t,n)=>e.indexOf(t)===n);const n=Object.create(null)
;return e.filter(e=>{const i=t(e);return!n[i]&&(n[i]=!0,!0)})},t.uniqueFilter=function(e){const t=Object.create(null);return n=>{const i=e(n);return!t[i]&&(t[i]=!0,!0)}},t.firstIndex=c,t.first=function(e,t,n=null){const i=c(e,t);return i<0?n:e[i]},t.commonPrefixLength=function(e,t,n=((e,t)=>e===t)){let i=0;for(let r=0,s=Math.min(e.length,t.length);r<s&&n(e[r],t[r]);r++)i++;return i},t.flatten=function(e){return[].concat(...e)},t.range=function(e,t){let n="number"==typeof t?e:0;"number"==typeof t?n=e:(n=0,t=e);const i=[];if(n<=t)for(let e=n;e<t;e++)i.push(e);else for(let e=n;e>t;e--)i.push(e);return i},t.fill=function(e,t,n=[]){for(let i=0;i<e;i++)n[i]=t;return n},t.index=function(e,t,n=(e=>e)){return e.reduce((e,i)=>{const r=t(i);return e[r]=n(i,e[r]),e},Object.create(null))},t.insert=function(e,t){return e.push(t),()=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)}},t.arrayInsert=function(e,t,n){const i=e.slice(0,t),r=e.slice(t);return i.concat(n,r)},t.shuffle=function(e,t){let n;if("number"==typeof t){let e=t
;n=(()=>{const t=179426549*Math.sin(e++);return t-Math.floor(t)})}else n=Math.random;for(let t=e.length-1;t>0;t-=1){let i=Math.floor(n()*(t+1)),r=e[t];e[t]=e[i],e[i]=r}},t.pushToStart=function(e,t){const n=e.indexOf(t);n>-1&&(e.splice(n,1),e.unshift(t))},t.pushToEnd=function(e,t){const n=e.indexOf(t);n>-1&&(e.splice(n,1),e.push(t))},t.find=function(e,t){for(let n=0;n<e.length;n++){const i=e[n];if(t(i,n,e))return i}},t.mapArrayOrNot=function(e,t){return Array.isArray(e)?e.map(t):t(e)}}),define(e[52],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.once=function(e){const t=this;let n,i=!1;return function(){return i?n:(i=!0,n=e.apply(t,arguments))}}}),define(e[51],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FIN={done:!0,value:void 0};var n;!function(e){function n(e,t){for(let n=e.next();!n.done;n=e.next())t(n.value)}const i={next:()=>t.FIN};e.empty=function(){return i},e.fromArray=function(e,n=0,i=e.length){return{
next:()=>n>=i?t.FIN:{done:!1,value:e[n++]}}},e.from=function(t){return t?Array.isArray(t)?e.fromArray(t):t:e.empty()},e.map=function(e,n){return{next(){const i=e.next();return i.done?t.FIN:{done:!1,value:n(i.value)}}}},e.filter=function(e,n){return{next(){for(;;){const i=e.next();if(i.done)return t.FIN;if(n(i.value))return{done:!1,value:i.value}}}}},e.forEach=n,e.collect=function(e){const t=[];return n(e,e=>t.push(e)),t}}(n=t.Iterator||(t.Iterator={})),t.getSequenceIterator=function(e){return Array.isArray(e)?n.fromArray(e):e};class i{constructor(e,t=0,n=e.length,i=t-1){this.items=e,this.start=t,this.end=n,this.index=i}first(){return this.index=this.start,this.current()}next(){return this.index=Math.min(this.index+1,this.end),this.current()}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}}t.ArrayIterator=i;class r extends i{constructor(e,t=0,n=e.length,i=t-1){super(e,t,n,i)}current(){return super.current()}previous(){
return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}parent(){return null}}t.ArrayNavigator=r;class s{constructor(e,t){this.iterator=e,this.fn=t}next(){return this.fn(this.iterator.next())}}t.MappedIterator=s;class o extends s{constructor(e,t){super(e,t),this.navigator=e}current(){return this.fn(this.navigator.current())}previous(){return this.fn(this.navigator.previous())}parent(){return this.fn(this.navigator.parent())}first(){return this.fn(this.navigator.first())}last(){return this.fn(this.navigator.last())}next(){return this.fn(this.navigator.next())}}t.MappedNavigator=o}),define(e[31],t([1,0]),function(e,t){"use strict";function n(e,t=!1){function n(t){let n=0,i=0;for(;n<t;){let t=e.charCodeAt(a);if(t>=48&&t<=57)i=16*i+t-48;else if(t>=65&&t<=70)i=16*i+t-65+10;else{if(!(t>=97&&t<=102))break;i=16*i+t-97+10}a++,n++}return n<t&&(i=-1),i}function o(){if(c="",d=0,u=a,a>=l)return u=l,h=17
;let t=e.charCodeAt(a);if(i(t)){do{a++,c+=String.fromCharCode(t),t=e.charCodeAt(a)}while(i(t));return h=15}if(r(t))return a++,c+=String.fromCharCode(t),13===t&&10===e.charCodeAt(a)&&(a++,c+="\n"),h=14;switch(t){case 123:return a++,h=1;case 125:return a++,h=2;case 91:return a++,h=3;case 93:return a++,h=4;case 58:return a++,h=6;case 44:return a++,h=5;case 34:return a++,c=function(){let t="",i=a;for(;;){if(a>=l){t+=e.substring(i,a),d=2;break}let s=e.charCodeAt(a);if(34===s){t+=e.substring(i,a),a++;break}if(92!==s){if(s>=0&&s<=31){if(r(s)){t+=e.substring(i,a),d=2;break}d=6}a++}else{if(t+=e.substring(i,a),++a>=l){d=2;break}switch(i=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:let i=n(4);i>=0?t+=String.fromCharCode(i):d=4;break;default:d=5}i=a}}return t}(),h=10;case 47:let o=a-1;if(47===e.charCodeAt(a+1)){for(a+=2;a<l&&!r(e.charCodeAt(a));)a++
;return c=e.substring(o,a),h=12}if(42===e.charCodeAt(a+1)){a+=2;let t=l-1,n=!1;for(;a<t;){if(42===e.charCodeAt(a)&&47===e.charCodeAt(a+1)){a+=2,n=!0;break}a++}return n||(a++,d=1),c=e.substring(o,a),h=13}return c+=String.fromCharCode(t),a++,h=16;case 45:if(c+=String.fromCharCode(t),++a===l||!s(e.charCodeAt(a)))return h=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return c+=function(){let t=a;if(48===e.charCodeAt(a))a++;else for(a++;a<e.length&&s(e.charCodeAt(a));)a++;if(a<e.length&&46===e.charCodeAt(a)){if(!(++a<e.length&&s(e.charCodeAt(a))))return d=3,e.substring(t,a);for(a++;a<e.length&&s(e.charCodeAt(a));)a++}let 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&&s(e.charCodeAt(a))){for(a++;a<e.length&&s(e.charCodeAt(a));)a++;n=a}else d=3;return e.substring(t,n)}(),h=11;default:for(;a<l&&function(e){if(i(e)||r(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:
case 58:case 44:case 47:return!1}return!0}(t);)a++,t=e.charCodeAt(a);if(u!==a){switch(c=e.substring(u,a)){case"true":return h=8;case"false":return h=9;case"null":return h=7}return h=16}return c+=String.fromCharCode(t),a++,h=16}}let a=0,l=e.length,c="",u=0,h=16,d=0;return{setPosition:function(e){a=e,c="",u=0,h=16,d=0},getPosition:()=>a,scan:t?function(){let e;do{e=o()}while(e>=12&&e<=15);return e}:o,getToken:()=>h,getTokenValue:()=>c,getTokenOffset:()=>u,getTokenLength:()=>a-u,getTokenError:()=>d}}function i(e){return 32===e||9===e||11===e||12===e||160===e||5760===e||e>=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function r(e){return 10===e||13===e||8232===e||8233===e}function s(e){return e>=48&&e<=57}function o(e){if(!e.parent||!e.parent.children)return[];let t=o(e.parent);if("property"===e.parent.type){let n=e.parent.children[0].value;t.push(n)}else if("array"===e.parent.type){let n=e.parent.children.indexOf(e);-1!==n&&t.push(n)}return t}function a(e){switch(e.type){case"array":
return e.children.map(a);case"object":let t=Object.create(null);for(let n of e.children){let e=n.children[1];e&&(t[n.children[0].value]=a(e))}return t;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function l(e,t,n=!1){return t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}function c(e,t,n=!1){if(l(e,t,n)){let i=e.children;if(Array.isArray(i))for(let e=0;e<i.length&&i[e].offset<=t;e++){let r=c(i[e],t,n);if(r)return r}return e}}function u(e,t,i=d.DEFAULT){function r(e){return e?()=>e(h.getTokenOffset(),h.getTokenLength()):()=>!0}function s(e){return e?t=>e(t,h.getTokenOffset(),h.getTokenLength()):()=>!0}function o(){for(;;){let e=h.scan();switch(h.getTokenError()){case 4:a(14);break;case 5:a(15);break;case 3:a(13);break;case 1:C||a(11);break;case 2:a(12);break;case 6:a(16)}switch(e){case 12:case 13:C?a(10):E();break;case 16:a(1);break;case 15:case 14:break;default:return e}}}function a(e,t=[],n=[]){if(w(e),t.length+n.length>0){let e=h.getToken();for(;17!==e;){
if(-1!==t.indexOf(e)){o();break}if(-1!==n.indexOf(e))break;e=o()}}}function l(e){let t=h.getTokenValue();return e?y(t):g(t),o(),!0}function c(){return 10!==h.getToken()?(a(3,[],[2,5]),!1):(l(!1),6===h.getToken()?(_(":"),o(),u()||a(4,[],[2,5])):a(5,[],[2,5]),!0)}function u(){switch(h.getToken()){case 3:return function(){m(),o();let e=!1;for(;4!==h.getToken()&&17!==h.getToken();){if(5===h.getToken()){if(e||a(4,[],[]),_(","),o(),4===h.getToken()&&b)break}else e&&a(6,[],[]);u()||a(4,[],[4,5]),e=!0}return v(),4!==h.getToken()?a(8,[4],[]):o(),!0}();case 1:return function(){f(),o();let e=!1;for(;2!==h.getToken()&&17!==h.getToken();){if(5===h.getToken()){if(e||a(4,[],[]),_(","),o(),2===h.getToken()&&b)break}else e&&a(6,[],[]);c()||a(4,[],[2,5]),e=!0}return p(),2!==h.getToken()?a(7,[2],[]):o(),!0}();case 10:return l(!0);default:return function(){switch(h.getToken()){case 11:let e=0;try{"number"!=typeof(e=JSON.parse(h.getTokenValue()))&&(a(2),e=0)}catch(e){a(2)}y(e);break;case 7:y(null);break;case 8:y(!0);break;case 9:
y(!1);break;default:return!1}return o(),!0}()}}let h=n(e,!1),f=r(t.onObjectBegin),g=s(t.onObjectProperty),p=r(t.onObjectEnd),m=r(t.onArrayBegin),v=r(t.onArrayEnd),y=s(t.onLiteralValue),_=s(t.onSeparator),E=r(t.onComment),w=s(t.onError),C=i&&i.disallowComments,b=i&&i.allowTrailingComma;return o(),17===h.getToken()||(u()?(17!==h.getToken()&&a(9,[],[]),!0):(a(4,[],[]),!1))}function h(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";default:return"null"}}Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"}(t.ScanError||(t.ScanError={}));!function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",
e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"}(t.SyntaxKind||(t.SyntaxKind={}));!function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",
e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"}(t.ParseErrorCode||(t.ParseErrorCode={}));var d;!function(e){e.DEFAULT={allowTrailingComma:!0}}(d=t.ParseOptions||(t.ParseOptions={})),t.createScanner=n;var f;!function(e){e[e.nullCharacter=0]="nullCharacter",e[e.maxAsciiCharacter=127]="maxAsciiCharacter",e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.lineSeparator=8232]="lineSeparator",e[e.paragraphSeparator=8233]="paragraphSeparator",e[e.nextLine=133]="nextLine",e[e.space=32]="space",e[e.nonBreakingSpace=160]="nonBreakingSpace",e[e.enQuad=8192]="enQuad",e[e.emQuad=8193]="emQuad",e[e.enSpace=8194]="enSpace",e[e.emSpace=8195]="emSpace",e[e.threePerEmSpace=8196]="threePerEmSpace",e[e.fourPerEmSpace=8197]="fourPerEmSpace",
e[e.sixPerEmSpace=8198]="sixPerEmSpace",e[e.figureSpace=8199]="figureSpace",e[e.punctuationSpace=8200]="punctuationSpace",e[e.thinSpace=8201]="thinSpace",e[e.hairSpace=8202]="hairSpace",e[e.zeroWidthSpace=8203]="zeroWidthSpace",e[e.narrowNoBreakSpace=8239]="narrowNoBreakSpace",e[e.ideographicSpace=12288]="ideographicSpace",e[e.mathematicalSpace=8287]="mathematicalSpace",e[e.ogham=5760]="ogham",e[e._=95]="_",e[e.$=36]="$",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",
e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.ampersand=38]="ampersand",e[e.asterisk=42]="asterisk",e[e.at=64]="at",e[e.backslash=92]="backslash",e[e.bar=124]="bar",e[e.caret=94]="caret",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.closeParen=41]="closeParen",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.equals=61]="equals",e[e.exclamation=33]="exclamation",e[e.greaterThan=62]="greaterThan",e[e.lessThan=60]="lessThan",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.openParen=40]="openParen",e[e.percent=37]="percent",e[e.plus=43]="plus",e[e.question=63]="question",e[e.semicolon=59]="semicolon",
e[e.singleQuote=39]="singleQuote",e[e.slash=47]="slash",e[e.tilde=126]="tilde",e[e.backspace=8]="backspace",e[e.formFeed=12]="formFeed",e[e.byteOrderMark=65279]="byteOrderMark",e[e.tab=9]="tab",e[e.verticalTab=11]="verticalTab"}(f||(f={})),t.getLocation=function(e,t){function n(e,t,n,i){o.value=e,o.offset=t,o.length=n,o.type=i,o.colonOffset=void 0,s=o}let i=[],r=new Object,s=void 0;const o={value:{},offset:0,length:0,type:"object",parent:void 0};let a=!1;try{u(e,{onObjectBegin:(e,n)=>{if(t<=e)throw r;s=void 0,a=t>e,i.push("")},onObjectProperty:(e,s,o)=>{if(t<s)throw r;if(n(e,s,o,"property"),i[i.length-1]=e,t<=s+o)throw r},onObjectEnd:(e,n)=>{if(t<=e)throw r;s=void 0,i.pop()},onArrayBegin:(e,n)=>{if(t<=e)throw r;s=void 0,i.push(0)},onArrayEnd:(e,n)=>{if(t<=e)throw r;s=void 0,i.pop()},onLiteralValue:(e,i,s)=>{if(t<i)throw r;if(n(e,i,s,h(e)),t<=i+s)throw r},onSeparator:(e,n,o)=>{if(t<=n)throw r;if(":"===e&&s&&"property"===s.type)s.colonOffset=n,a=!1,s=void 0;else if(","===e){let e=i[i.length-1]
;"number"==typeof e?i[i.length-1]=e+1:(a=!0,i[i.length-1]=""),s=void 0}}})}catch(e){if(e!==r)throw e}return{path:i,previousNode:s,isAtPropertyKey:a,matches:e=>{let t=0;for(let n=0;t<e.length&&n<i.length;n++)if(e[t]===i[n]||"*"===e[t])t++;else if("**"!==e[t])return!1;return t===e.length}}},t.parse=function(e,t=[],n=d.DEFAULT){function i(e){Array.isArray(s)?s.push(e):r&&(s[r]=e)}let r=null,s=[],o=[];return u(e,{onObjectBegin:()=>{let e={};i(e),o.push(s),s=e,r=null},onObjectProperty:e=>{r=e},onObjectEnd:()=>{s=o.pop()},onArrayBegin:()=>{let e=[];i(e),o.push(s),s=e,r=null},onArrayEnd:()=>{s=o.pop()},onLiteralValue:i,onError:(e,n,i)=>{t.push({error:e,offset:n,length:i})}},n),s[0]},t.parseTree=function(e,t=[],n=d.DEFAULT){function i(e){"property"===s.type&&(s.length=e-s.offset,s=s.parent)}function r(e){return s.children.push(e),e}let s={type:"array",offset:-1,length:-1,children:[],parent:void 0};u(e,{onObjectBegin:e=>{s=r({type:"object",offset:e,length:-1,parent:s,children:[]})},onObjectProperty:(e,t,n)=>{(s=r({
type:"property",offset:t,length:-1,parent:s,children:[]})).children.push({type:"string",value:e,offset:t,length:n,parent:s})},onObjectEnd:(e,t)=>{s.length=e+t-s.offset,s=s.parent,i(e+t)},onArrayBegin:(e,t)=>{s=r({type:"array",offset:e,length:-1,parent:s,children:[]})},onArrayEnd:(e,t)=>{s.length=e+t-s.offset,s=s.parent,i(e+t)},onLiteralValue:(e,t,n)=>{r({type:h(e),offset:t,length:n,parent:s,value:e}),i(t+n)},onSeparator:(e,t,n)=>{"property"===s.type&&(":"===e?s.colonOffset=t:","===e&&i(t))},onError:(e,n,i)=>{t.push({error:e,offset:n,length:i})}},n);let o=s.children[0];return o&&delete o.parent,o},t.findNodeAtLocation=function(e,t){if(!e)return;let n=e;for(let e of t)if("string"==typeof e){if("object"!==n.type||!Array.isArray(n.children))return;let t=!1;for(const i of n.children)if(Array.isArray(i.children)&&i.children[0].value===e){n=i.children[1],t=!0;break}if(!t)return}else{let t=e;if("array"!==n.type||t<0||!Array.isArray(n.children)||t>=n.children.length)return;n=n.children[t]}return n},t.getNodePath=o,
t.getNodeValue=a,t.contains=l,t.findNodeAtOffset=c,t.visit=u,t.stripComments=function(e,t){let i,r,s=n(e),o=[],a=0;do{switch(r=s.getPosition(),i=s.scan()){case 12:case 13:case 17:a!==r&&o.push(e.substring(a,r)),void 0!==t&&o.push(s.getTokenValue().replace(/[^\r\n]/g,t)),a=s.getPosition()}}while(17!==i);return o.join("")}}),define(e[71],t([1,0,31]),function(e,t,n){"use strict";function i(e,t,i){function o(){return p+r(g,c+v)}function a(){let e=y.scan();for(m=!1;15===e||14===e;)m=m||14===e,e=y.scan();return _=16===e||0!==y.getTokenError(),e}function l(t,n,i){!_&&n<f&&i>d&&e.substring(n,i)!==t&&E.push({offset:n,length:i-n,content:t})}let c,u,h,d,f;if(t){for(d=t.offset,f=d+t.length,h=d;h>0&&!s(e,h-1);)h--;let n=f;for(;n<e.length&&!s(e,n);)n++;u=e.substring(h,n),c=function(e,t){let n=0,i=0,r=t.tabSize||4;for(;n<e.length;){let t=e.charAt(n);if(" "===t)i++;else{if("\t"!==t)break;i+=r}n++}return Math.floor(i/r)}(u,i)}else u=e,c=0,h=0,d=0,f=e.length;let g,p=function(e,t){for(let e=0;e<t.length;e++){let n=t.charAt(e)
;if("\r"===n)return e+1<t.length&&"\n"===t.charAt(e+1)?"\r\n":"\r";if("\n"===n)return"\n"}return e&&e.eol||"\n"}(i,e),m=!1,v=0;g=i.insertSpaces?r(" ",i.tabSize||4):"\t";let y=n.createScanner(u,!1),_=!1,E=[],w=a();if(17!==w){let e=y.getTokenOffset()+h;l(r(g,c),h,e)}for(;17!==w;){let e=y.getTokenOffset()+y.getTokenLength()+h,t=a(),n="";for(;!m&&(12===t||13===t);){l(" ",e,y.getTokenOffset()+h),e=y.getTokenOffset()+y.getTokenLength()+h,n=12===t?o():"",t=a()}if(2===t)1!==w&&(v--,n=o());else if(4===t)3!==w&&(v--,n=o());else{switch(w){case 3:case 1:v++,n=o();break;case 5:case 12:n=o();break;case 13:n=m?o():" ";break;case 6:n=" ";break;case 10:if(6===t){n="";break}case 7:case 8:case 9:case 11:case 2:case 4:12===t||13===t?n=" ":5!==t&&17!==t&&(_=!0);break;case 16:_=!0}!m||12!==t&&13!==t||(n=o())}l(n,e,y.getTokenOffset()+h),w=t}return E}function r(e,t){let n="";for(let i=0;i<t;i++)n+=e;return n}function s(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}Object.defineProperty(t,"__esModule",{value:!0}),t.format=i,t.isEOL=s
}),define(e[83],t([1,0,31,71]),function(e,t,n,i){"use strict";function r(e,t,i,r,o){let a=t.slice(),l=n.parseTree(e,[]),c=void 0,u=void 0;for(;a.length>0&&(u=a.pop(),void 0===(c=n.findNodeAtLocation(l,a))&&void 0!==i);)i="string"==typeof u?{[u]:i}:[i];if(c){if("object"===c.type&&"string"==typeof u&&Array.isArray(c.children)){let t=n.findNodeAtLocation(c,[u]);if(void 0!==t){if(void 0===i){if(!t.parent)throw new Error("Malformed AST");let n,i=c.children.indexOf(t.parent),o=t.parent.offset+t.parent.length;if(i>0){let e=c.children[i-1];n=e.offset+e.length}else if(n=c.offset+1,c.children.length>1){o=c.children[1].offset}return s(e,{offset:n,length:o-n,content:""},r)}return s(e,{offset:t.offset,length:t.length,content:JSON.stringify(i)},r)}{if(void 0===i)return[];let t,n=`${JSON.stringify(u)}: ${JSON.stringify(i)}`,a=o?o(c.children.map(e=>e.children[0].value)):c.children.length;if(a>0){let e=c.children[a-1];t={offset:e.offset+e.length,length:0,content:","+n}}else t=0===c.children.length?{offset:c.offset+1,length:0,
content:n}:{offset:c.offset+1,length:0,content:n+","};return s(e,t,r)}}if("array"===c.type&&"number"==typeof u&&Array.isArray(c.children)){if(-1===u){let t,n=`${JSON.stringify(i)}`;if(0===c.children.length)t={offset:c.offset+1,length:0,content:n};else{let e=c.children[c.children.length-1];t={offset:e.offset+e.length,length:0,content:","+n}}return s(e,t,r)}if(void 0===i&&c.children.length>=0){let t,n=u,i=c.children[n];if(1===c.children.length)t={offset:c.offset+1,length:c.length-2,content:""};else if(c.children.length-1===n){let e=c.children[n-1],i=e.offset+e.length;t={offset:i,length:c.offset+c.length-2-i,content:""}}else t={offset:i.offset,length:c.children[n+1].offset-i.offset,content:""};return s(e,t,r)}throw new Error("Array modification not supported yet")}throw new Error(`Can not add ${"number"!=typeof u?"index":"property"} to parent of type ${c.type}`)}if(void 0===i)throw new Error("Can not delete in empty document");return s(e,{offset:l?l.offset:0,length:l?l.length:0,content:JSON.stringify(i)},r)}
function s(e,t,n){let r=o(e,t),s=t.offset,a=t.offset+t.content.length;if(0===t.length||0===t.content.length){for(;s>0&&!i.isEOL(r,s-1);)s--;for(;a<r.length&&!i.isEOL(r,a);)a++}let l=i.format(r,{offset:s,length:a-s},n);for(let e=l.length-1;e>=0;e--){let t=l[e];r=o(r,t),s=Math.min(s,t.offset),a=Math.max(a,t.offset+t.length),a+=t.content.length-t.length}return[{offset:s,length:e.length-(r.length-a)-s,content:r.substring(s,a)}]}function o(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}Object.defineProperty(t,"__esModule",{value:!0}),t.removeProperty=function(e,t,n){return r(e,t,void 0,n)},t.setProperty=r,t.applyEdit=o,t.isWS=function(e,t){return-1!=="\r\n \t".indexOf(e.charAt(t))}}),define(e[3],t([1,0,52]),function(e,t,n){"use strict";function i(e,...t){if(Array.isArray(e))return e.forEach(e=>e&&e.dispose()),[];if(0!==t.length)return i(e),i(t),[];if(e)return e.dispose(),e}Object.defineProperty(t,"__esModule",{value:!0}),t.isDisposable=function(e){
return"function"==typeof e.dispose&&0===e.dispose.length},t.dispose=i,t.combinedDisposable=function(e){return{dispose:()=>i(e)}},t.toDisposable=function(e){return{dispose(){e()}}};class r{constructor(){this._toDispose=[],this._lifecycle_disposable_isDisposed=!1}get toDispose(){return this._toDispose}dispose(){this._lifecycle_disposable_isDisposed=!0,this._toDispose=i(this._toDispose)}_register(e){return this._lifecycle_disposable_isDisposed?(console.warn("Registering disposable on object that has already been disposed."),e.dispose()):this._toDispose.push(e),e}}r.None=Object.freeze({dispose(){}}),t.Disposable=r;class s{constructor(){this.references=Object.create(null)}acquire(e){let t=this.references[e];t||(t=this.references[e]={counter:0,object:this.createReferencedObject(e)});const{object:i}=t,r=n.once(()=>{0==--t.counter&&(this.destroyReferencedObject(e,t.object),delete this.references[e])});return t.counter++,{object:i,dispose:r}}}t.ReferenceCollection=s;class o{constructor(e){this.object=e}dispose(){}}
t.ImmortalReference=o}),define(e[102],t([1,0,51]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i{constructor(e){this.element=e}}class r{constructor(){this._size=0}get size(){return this._size}isEmpty(){return!this._first}clear(){this._first=void 0,this._last=void 0,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const n=new i(e);if(this._first)if(t){const e=this._last;this._last=n,n.prev=e,e.next=n}else{const e=this._first;this._first=n,n.next=e,e.prev=n}else this._first=n,this._last=n;return this._size+=1,this._remove.bind(this,n)}shift(){if(this._first){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last){const e=this._last.element;return this._remove(this._last),e}}_remove(e){let t=this._first;for(;t instanceof i;){if(t===e){if(t.prev&&t.next){let e=t.prev;e.next=t.next,t.next.prev=e}else t.prev||t.next?t.next?t.prev||(this._first=this._first.next,
this._first.prev=void 0):(this._last=this._last.prev,this._last.next=void 0):(this._first=void 0,this._last=void 0);this._size-=1;break}t=t.next}}iterator(){let e,t=this._first;return{next:()=>t?(e?e.value=t.element:e={done:!1,value:t.element},t=t.next,e):n.FIN}}toArray(){let e=[];for(let t=this._first;t instanceof i;t=t.next)e.push(t.element);return e}}t.LinkedList=r}),define(e[4],t([1,0,7,52,3,102]),function(e,t,i,r,s,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a;!function(e){function t(e){return(t,n=null,i)=>{let r,s=!1;return r=e(e=>{if(!s)return r?r.dispose():s=!0,t.call(n,e)},null,i),s&&r.dispose(),r}}function n(e,t){return a((n,i=null,r)=>e(e=>n.call(i,t(e)),null,r))}function i(e,t){return a((n,i=null,r)=>e(e=>{t(e),n.call(i,e)},null,r))}function r(e,t){return a((n,i=null,r)=>e(e=>t(e)&&n.call(i,e),null,r))}function o(e,t,i){let r=i;return n(e,e=>r=t(r,e))}function a(e){let t;const n=new u({onFirstListenerAdd(){t=e(n.fire,n)},onLastListenerRemove(){t.dispose()}});return n.event
}function l(e){let t,n=!0;return r(e,e=>{let i=n||e!==t;return n=!1,t=e,i})}const c={dispose(){}};e.None=function(){return c},e.once=t,e.map=n,e.forEach=i,e.filter=r,e.signal=function(e){return e},e.any=function(...e){return(t,n=null,i)=>s.combinedDisposable(e.map(e=>e(e=>t.call(n,e),null,i)))},e.reduce=o,e.snapshot=a,e.debounce=function(e,t,n=100,i=!1,r){let s,o=void 0,a=void 0,l=0;const c=new u({leakWarningThreshold:r,onFirstListenerAdd(){s=e(e=>{l++,o=t(o,e),i&&!a&&c.fire(o),clearTimeout(a),a=setTimeout(()=>{let e=o;o=void 0,a=void 0,(!i||l>1)&&c.fire(e),l=0},n)})},onLastListenerRemove(){s.dispose()}});return c.event},e.stopwatch=function(e){const i=(new Date).getTime();return n(t(e),e=>(new Date).getTime()-i)},e.latch=l,e.buffer=function(e,t=!1,n=[]){let i=n.slice(),r=e(e=>{i?i.push(e):o.fire(e)});const s=()=>{i&&i.forEach(e=>o.fire(e)),i=null},o=new u({onFirstListenerAdd(){r||(r=e(e=>o.fire(e)))},onFirstListenerDidAdd(){i&&(t?setTimeout(s):s())},onLastListenerRemove(){r&&r.dispose(),r=null}})
;return o.event},e.echo=function(e,t=!1,n=[]){n=n.slice(),e(e=>{n.push(e),r.fire(e)});const i=(e,t)=>n.forEach(n=>e.call(t,n)),r=new u({onListenerDidAdd(e,n,r){t?setTimeout(()=>i(n,r)):i(n,r)}});return r.event};class h{constructor(e){this.event=e}map(e){return new h(n(this.event,e))}forEach(e){return new h(i(this.event,e))}filter(e){return new h(r(this.event,e))}reduce(e,t){return new h(o(this.event,e,t))}latch(){return new h(l(this.event))}on(e,t,n){return this.event(e,t,n)}once(e,n,i){return t(this.event)(e,n,i)}}e.chain=function(e){return new h(e)},e.fromNodeEventEmitter=function(e,t,n=(e=>e)){const i=(...e)=>r.fire(n(...e)),r=new u({onFirstListenerAdd:()=>e.on(t,i),onLastListenerRemove:()=>e.removeListener(t,i)});return r.event},e.fromPromise=function(e){const t=new u;let n=!1;return e.then(void 0,()=>null).then(()=>{n?t.fire(void 0):setTimeout(()=>t.fire(void 0),0)}),n=!0,t.event},e.toPromise=function(e){return new Promise(n=>t(e)(n))}}(a=t.Event||(t.Event={}));let l=-1
;t.setGlobalLeakWarningThreshold=function(e){let t=l;return l=e,{dispose(){l=t}}};class c{constructor(e,t=Math.random().toString(18).slice(2,5)){this.customThreshold=e,this.name=t,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(e){let t=l;if("number"==typeof this.customThreshold&&(t=this.customThreshold),t<=0||e<t)return;this._stacks||(this._stacks=new Map);let n=(new Error).stack.split("\n").slice(3).join("\n"),i=this._stacks.get(n)||0;if(this._stacks.set(n,i+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=.5*t;let n,i=0;this._stacks.forEach((e,t)=>{(!n||i<e)&&(n=t,i=e)}),console.warn(`[${this.name}] potential listener LEAK detected, having ${e} listeners already. MOST frequent listener (${i}):`),console.warn(n)}return()=>{let e=this._stacks.get(n)||0;this._stacks.set(n,e-1)}}}class u{constructor(e){this._disposed=!1,this._options=e,this._leakageMon=l>0?new c(this._options&&this._options.leakWarningThreshold):void 0}get event(){
return this._event||(this._event=((e,t,n)=>{this._listeners||(this._listeners=new o.LinkedList);const i=this._listeners.isEmpty();i&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const r=this._listeners.push(t?[e,t]:e);i&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,e,t);let s;this._leakageMon&&(s=this._leakageMon.check(this._listeners.size));let a;return a={dispose:()=>{if(s&&s(),a.dispose=u._noop,!this._disposed&&(r(),this._options&&this._options.onLastListenerRemove)){this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)}}},Array.isArray(n)&&n.push(a),a})),this._event}fire(e){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=[]);for(let t=this._listeners.iterator(),n=t.next();!n.done;n=t.next())this._deliveryQueue.push([n.value,e]);for(;this._deliveryQueue.length>0;){
const[e,t]=this._deliveryQueue.shift();try{"function"==typeof e?e.call(void 0,t):e[0].call(e[1],t)}catch(e){i.onUnexpectedError(e)}}}}dispose(){this._listeners&&(this._listeners=void 0),this._deliveryQueue&&(this._deliveryQueue.length=0),this._leakageMon&&this._leakageMon.dispose(),this._disposed=!0}}u._noop=function(){},t.Emitter=u;class h extends u{fireAsync(e){return n(this,void 0,void 0,function*(){if(this._listeners){this._asyncDeliveryQueue||(this._asyncDeliveryQueue=[]);for(let t=this._listeners.iterator(),n=t.next();!n.done;n=t.next()){let t=[];this._asyncDeliveryQueue.push([n.value,e(t,"function"==typeof n.value?n.value:n.value[0]),t])}for(;this._asyncDeliveryQueue.length>0;){const[e,t,n]=this._asyncDeliveryQueue.shift();try{"function"==typeof e?e.call(void 0,t):e[0].call(e[1],t)}catch(e){i.onUnexpectedError(e);continue}Object.freeze(n),yield Promise.all(n)}}})}}t.AsyncEmitter=h;class d{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new u({
onFirstListenerAdd:()=>this.onFirstListenerAdd(),onLastListenerRemove:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){const t={event:e,listener:null};this.events.push(t),this.hasListeners&&this.hook(t);return s.toDisposable(r.once(()=>{this.hasListeners&&this.unhook(t);const e=this.events.indexOf(t);this.events.splice(e,1)}))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(e=>this.hook(e))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(e=>this.unhook(e))}hook(e){e.listener=e.event(e=>this.emitter.fire(e))}unhook(e){e.listener&&e.listener.dispose(),e.listener=null}dispose(){this.emitter.dispose()}}t.EventMultiplexer=d;class f{constructor(){this.buffers=[]}wrapEvent(e){return(t,n,i)=>e(e=>{const i=this.buffers[this.buffers.length-1];i?i.push(()=>t.call(n,e)):t.call(n,e)},void 0,i)}bufferEvents(e){const t=[];this.buffers.push(t);const n=e();return this.buffers.pop(),t.forEach(e=>e()),n}}t.EventBufferer=f;class g{constructor(){this.listening=!1,
this.inputEvent=a.None,this.inputEventListener=s.Disposable.None,this.emitter=new u({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}t.Relay=g}),define(e[30],t([1,0,4]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=Object.freeze(function(e,t){let n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}});var r;!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||t instanceof s||!(!t||"object"!=typeof t)&&"boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested},e.None=Object.freeze({isCancellationRequested:!1,
onCancellationRequested:n.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:i})}(r=t.CancellationToken||(t.CancellationToken={}));class s{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?i:(this._emitter||(this._emitter=new n.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class o{get token(){return this._token||(this._token=new s),this._token}cancel(){this._token?this._token instanceof s&&this._token.cancel():this._token=r.Cancelled}dispose(){this._token?this._token instanceof s&&this._token.dispose():this._token=r.None}}t.CancellationTokenSource=o}),define(e[16],t([1,0,30,7,4,3]),function(e,t,n,i,r,s){"use strict";function o(e){return e&&"function"==typeof e.then}function a(e){
const t=new n.CancellationTokenSource,r=e(t.token),s=new Promise((e,n)=>{t.token.onCancellationRequested(()=>{n(i.canceled())}),Promise.resolve(r).then(n=>{t.dispose(),e(n)},e=>{t.dispose(),n(e)})});return new class{cancel(){t.cancel()}then(e,t){return s.then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return s.finally(e)}}}function l(e,t){return t?new Promise((n,r)=>{const s=setTimeout(n,e);t.onCancellationRequested(()=>{clearTimeout(s),r(i.canceled())})}):a(t=>l(e,t))}function c(e){function t(s){void 0!==s&&null!==s&&n.push(s);const o=i<r?e[i++]():null;return o?o.then(t):Promise.resolve(n)}const n=[];let i=0;const r=e.length;return Promise.resolve(null).then(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.isThenable=o,t.createCancelablePromise=a,t.asPromise=function(e){return new Promise((t,n)=>{let i=e();o(i)?i.then(t,n):t(i)})};class u{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.activePromise){if(this.queuedPromiseFactory=e,
!this.queuedPromise){const e=()=>{this.queuedPromise=null;const e=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,e};this.queuedPromise=new Promise(t=>{this.activePromise.then(e,e).then(t)})}return new Promise((e,t)=>{this.queuedPromise.then(e,t)})}return this.activePromise=e(),new Promise((e,t)=>{this.activePromise.then(t=>{this.activePromise=null,e(t)},e=>{this.activePromise=null,t(e)})})}}t.Throttler=u;class h{constructor(){this.current=Promise.resolve(null)}queue(e){return this.current=this.current.then(()=>e())}}t.Sequencer=h;class d{constructor(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.doResolve=null,this.task=null}trigger(e,t=this.defaultDelay){return this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((e,t)=>{this.doResolve=e,this.doReject=t}).then(()=>{this.completionPromise=null,this.doResolve=null;const e=this.task;return this.task=null,e()})),this.timeout=setTimeout(()=>{this.timeout=null,
this.doResolve(null)},t),this.completionPromise}isTriggered(){return null!==this.timeout}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject(i.canceled()),this.completionPromise=null)}cancelTimeout(){null!==this.timeout&&(clearTimeout(this.timeout),this.timeout=null)}dispose(){this.cancelTimeout()}}t.Delayer=d;class f{constructor(e){this.delayer=new d(e),this.throttler=new u}trigger(e,t){return this.delayer.trigger(()=>this.throttler.queue(e),t)}isTriggered(){return this.delayer.isTriggered()}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose()}}t.ThrottledDelayer=f;class g{constructor(){this._isOpen=!1,this._promise=new Promise((e,t)=>{this._completePromise=e})}isOpen(){return this._isOpen}open(){this._isOpen=!0,this._completePromise(!0)}wait(){return this._promise}}t.Barrier=g,t.timeout=l,t.disposableTimeout=function(e,t=0){const n=setTimeout(e,t);return s.toDisposable(()=>clearTimeout(n))},t.ignoreErrors=function(e){return e.then(void 0,e=>void 0)},t.sequence=c,
t.first=function(e,t=(e=>!!e),n=null){let i=0;const r=e.length,s=()=>{if(i>=r)return Promise.resolve(n);const o=e[i++];return Promise.resolve(o()).then(e=>t(e)?Promise.resolve(e):s())};return s()};class p{constructor(e){this._size=0,this.maxDegreeOfParalellism=e,this.outstandingPromises=[],this.runningPromises=0,this._onFinished=new r.Emitter}get onFinished(){return this._onFinished.event}get size(){return this._size}queue(e){return this._size++,new Promise((t,n)=>{this.outstandingPromises.push({factory:e,c:t,e:n}),this.consume()})}consume(){for(;this.outstandingPromises.length&&this.runningPromises<this.maxDegreeOfParalellism;){const e=this.outstandingPromises.shift();this.runningPromises++;const t=e.factory();t.then(e.c,e.e),t.then(()=>this.consumed(),()=>this.consumed())}}consumed(){this._size--,this.runningPromises--,this.outstandingPromises.length>0?this.consume():this._onFinished.fire()}dispose(){this._onFinished.dispose()}}t.Limiter=p;class m extends p{constructor(){super(1)}}t.Queue=m;class v{
constructor(){this.queues=Object.create(null)}queueFor(e){const t=e.toString();if(!this.queues[t]){const e=new m;e.onFinished(()=>{e.dispose(),delete this.queues[t]}),this.queues[t]=e}return this.queues[t]}}t.ResourceQueue=v;class y extends s.Disposable{constructor(e,t){super(),this._token=-1,"function"==typeof e&&"number"==typeof t&&this.setIfNotSet(e,t)}dispose(){this.cancel(),super.dispose()}cancel(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){-1===this._token&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}}t.TimeoutTimer=y;class _ extends s.Disposable{constructor(){super(),this._token=-1}dispose(){this.cancel(),super.dispose()}cancel(){-1!==this._token&&(clearInterval(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setInterval(()=>{e()},t)}}t.IntervalTimer=_;class E{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,
this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}isScheduled(){return-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner&&this.runner()}}t.RunOnceScheduler=E;class w extends E{constructor(e,t){super(e,t),this.units=[]}work(e){this.units.push(e),this.isScheduled()||this.schedule()}doRun(){const e=this.units;this.units=[],this.runner&&this.runner(e)}dispose(){this.units=[],super.dispose()}}t.RunOnceWorker=w,t.nfcall=function(e,...t){return new Promise((n,i)=>e(...t,(e,t)=>e?i(e):n(t)))},t.ninvoke=function(e,t,...n){return new Promise((i,r)=>t.call(e,...n,(e,t)=>e?r(e):i(t)))},function(){if("function"!=typeof requestIdleCallback||"function"!=typeof cancelIdleCallback){let e=Object.freeze({didTimeout:!0,timeRemaining:()=>15});t.runWhenIdle=(t=>{
let n=setTimeout(()=>t(e)),i=!1;return{dispose(){i||(i=!0,clearTimeout(n))}}})}else t.runWhenIdle=((e,t)=>{let n=requestIdleCallback(e,"number"==typeof t?{timeout:t}:void 0),i=!1;return{dispose(){i||(i=!0,cancelIdleCallback(n))}}})}();class C{constructor(e){this._executor=(()=>{try{this._value=e()}catch(e){this._error=e}finally{this._didRun=!0}}),this._handle=t.runWhenIdle(()=>this._executor())}dispose(){this._handle.dispose()}getValue(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}}t.IdleValue=C}),define(e[20],t([1,0]),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",e.command="command"}(t.Schemas||(t.Schemas={}))}),define(e[5],t([1,0]),function(e,t){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0}),t.LANGUAGE_DEFAULT="en";let n=!1,i=!1,r=!1,s=!1,o=!1,a=void 0,l=t.LANGUAGE_DEFAULT,c=void 0;const u="undefined"!=typeof process&&void 0!==process.versions&&void 0!==process.versions.electron&&"renderer"===process.type;if("object"!=typeof navigator||u){if("object"==typeof process){n="win32"===process.platform,i="darwin"===process.platform,r="linux"===process.platform,a=t.LANGUAGE_DEFAULT,l=t.LANGUAGE_DEFAULT;const e=process.env.VSCODE_NLS_CONFIG;if(e)try{const n=JSON.parse(e),i=n.availableLanguages["*"];a=n.locale,l=i||t.LANGUAGE_DEFAULT,c=n._translationsConfigFile}catch(e){}s=!0}}else{const e=navigator.userAgent;n=e.indexOf("Windows")>=0,i=e.indexOf("Macintosh")>=0,r=e.indexOf("Linux")>=0,o=!0,l=a=navigator.language}!function(e){e[e.Web=0]="Web",e[e.Mac=1]="Mac",e[e.Linux=2]="Linux",e[e.Windows=3]="Windows"}(t.Platform||(t.Platform={})),t.PlatformToString=function(e){switch(e){case 0:return"Web";case 1:return"Mac";case 2:return"Linux";case 3:return"Windows"}}
;let h=0;s&&(i?h=1:n?h=3:r&&(h=2)),t.isWindows=n,t.isMacintosh=i,t.isLinux=r,t.isNative=s,t.isWeb=o,t.platform=h,t.isRootUser=function(){return s&&!n&&0===process.getuid()},t.language=l,t.locale=a,t.translationsConfigFile=c;const d="object"==typeof self?self:"object"==typeof global?global:{};t.globals=d;let f=null;t.setImmediate=function(e){return null===f&&(f=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)),f(e)};!function(e){e[e.Windows=1]="Windows",e[e.Macintosh=2]="Macintosh",e[e.Linux=3]="Linux"}(t.OperatingSystem||(t.OperatingSystem={})),t.OS=i?2:n?1:3}),define(e[2],t([1,0,5]),function(e,t,n){"use strict";function i(e,t){if("string"!=typeof e)throw new v(t,"string",e)}function r(e){return e===g||e===p}function s(e){return e===g}function o(e){return e>=c&&e<=h||e>=u&&e<=d}function a(e,t,n,i){let r,s="",o=0,a=-1,l=0;for(let c=0;c<=e.length;++c){
if(c<e.length)r=e.charCodeAt(c);else{if(i(r))break;r=g}if(i(r)){if(a===c-1||1===l);else if(a!==c-1&&2===l){if(s.length<2||2!==o||s.charCodeAt(s.length-1)!==f||s.charCodeAt(s.length-2)!==f){if(s.length>2){const e=s.lastIndexOf(n);-1===e?(s="",o=0):o=(s=s.slice(0,e)).length-1-s.lastIndexOf(n),a=c,l=0;continue}if(2===s.length||1===s.length){s="",o=0,a=c,l=0;continue}}t&&(s.length>0?s+=`${n}..`:s="..",o=2)}else s.length>0?s+=n+e.slice(a+1,c):s=e.slice(a+1,c),o=c-a-1;a=c,l=0}else r===f&&-1!==l?++l:l=-1}return s}function l(e,t){const n=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+i:n+e+i:i}const c=65,u=97,h=90,d=122,f=46,g=47,p=92,m="undefined"==typeof process?{cwd:()=>"/",env:{},get platform(){return n.isWindows?"win32":"posix"}}:process;class v extends Error{constructor(e,t,n){let i;"string"==typeof t&&0===t.indexOf("not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";let r;r=`The "${e}" ${-1!==e.indexOf(".")?"property":"argument"} ${i} of type ${t}`,
super(r+=`. Received type ${typeof n}`)}}const y={resolve(...e){let t="",n="",s=!1;for(let a=e.length-1;a>=-1;a--){let l;if(a>=0?l=e[a]:t?void 0!==(l=m.env["="+t]||m.cwd())&&l.slice(0,3).toLowerCase()===t.toLowerCase()+"\\"||(l=t+"\\"):l=m.cwd(),i(l,"path"),0===l.length)continue;let c=l.length,u=0,h="",d=!1;const f=l.charCodeAt(0);if(c>1)if(r(f))if(d=!0,r(l.charCodeAt(1))){let e=2,t=e;for(;e<c&&!r(l.charCodeAt(e));++e);if(e<c&&e!==t){const n=l.slice(t,e);for(t=e;e<c&&r(l.charCodeAt(e));++e);if(e<c&&e!==t){for(t=e;e<c&&!r(l.charCodeAt(e));++e);e===c?(h="\\\\"+n+"\\"+l.slice(t),u=e):e!==t&&(h="\\\\"+n+"\\"+l.slice(t,e),u=e)}}}else u=1;else o(f)&&58===l.charCodeAt(1)&&(h=l.slice(0,2),u=2,c>2&&r(l.charCodeAt(2))&&(d=!0,u=3));else r(f)&&(u=1,d=!0);if(!(h.length>0&&t.length>0&&h.toLowerCase()!==t.toLowerCase())&&(0===t.length&&h.length>0&&(t=h),s||(n=l.slice(u)+"\\"+n,s=d),t.length>0&&s))break}return n=a(n,!s,"\\",r),t+(s?"\\":"")+n||"."},normalize(e){i(e,"path");const t=e.length;if(0===t)return".";let n,s=0,l=!1
;const c=e.charCodeAt(0);if(t>1)if(r(c))if(l=!0,r(e.charCodeAt(1))){let i=2,o=i;for(;i<t&&!r(e.charCodeAt(i));++i);if(i<t&&i!==o){const a=e.slice(o,i);for(o=i;i<t&&r(e.charCodeAt(i));++i);if(i<t&&i!==o){for(o=i;i<t&&!r(e.charCodeAt(i));++i);if(i===t)return"\\\\"+a+"\\"+e.slice(o)+"\\";i!==o&&(n="\\\\"+a+"\\"+e.slice(o,i),s=i)}}}else s=1;else o(c)&&58===e.charCodeAt(1)&&(n=e.slice(0,2),s=2,t>2&&r(e.charCodeAt(2))&&(l=!0,s=3));else if(r(c))return"\\";let u;return 0!==(u=s<t?a(e.slice(s),!l,"\\",r):"").length||l||(u="."),u.length>0&&r(e.charCodeAt(t-1))&&(u+="\\"),void 0===n?l?u.length>0?"\\"+u:"\\":u.length>0?u:"":l?u.length>0?n+"\\"+u:n+"\\":u.length>0?n+u:n},isAbsolute(e){i(e,"path");const t=e.length;if(0===t)return!1;const n=e.charCodeAt(0);return!!r(n)||!!(o(n)&&t>2&&58===e.charCodeAt(1)&&r(e.charCodeAt(2)))},join(...e){if(0===e.length)return".";let t,n;for(let r=0;r<e.length;++r){let s=e[r];i(s,"path"),s.length>0&&(void 0===t?t=n=s:t+="\\"+s)}if(void 0===t)return".";let s=!0,o=0;if(r(n.charCodeAt(0))){++o
;const e=n.length;e>1&&r(n.charCodeAt(1))&&(++o,e>2&&(r(n.charCodeAt(2))?++o:s=!1))}if(s){for(;o<t.length&&r(t.charCodeAt(o));++o);o>=2&&(t="\\"+t.slice(o))}return y.normalize(t)},relative(e,t){if(i(e,"from"),i(t,"to"),e===t)return"";let n=y.resolve(e),r=y.resolve(t);if(n===r)return"";if(e=n.toLowerCase(),t=r.toLowerCase(),e===t)return"";let s=0;for(;s<e.length&&e.charCodeAt(s)===p;++s);let o=e.length;for(;o-1>s&&e.charCodeAt(o-1)===p;--o);let a=o-s,l=0;for(;l<t.length&&t.charCodeAt(l)===p;++l);let c=t.length;for(;c-1>l&&t.charCodeAt(c-1)===p;--c);let u=c-l,h=a<u?a:u,d=-1,f=0;for(;f<=h;++f){if(f===h){if(u>h){if(t.charCodeAt(l+f)===p)return r.slice(l+f+1);if(2===f)return r.slice(l+f)}a>h&&(e.charCodeAt(s+f)===p?d=f:2===f&&(d=3));break}let n=e.charCodeAt(s+f);if(n!==t.charCodeAt(l+f))break;n===p&&(d=f)}if(f!==h&&-1===d)return r;let g="";for(-1===d&&(d=0),f=s+d+1;f<=o;++f)f!==o&&e.charCodeAt(f)!==p||(0===g.length?g+="..":g+="\\..");return g.length>0?g+r.slice(l+d,c):(l+=d,r.charCodeAt(l)===p&&++l,r.slice(l,c))},
toNamespacedPath(e){if("string"!=typeof e)return e;if(0===e.length)return"";const t=y.resolve(e);if(t.length>=3)if(t.charCodeAt(0)===p){if(t.charCodeAt(1)===p){const e=t.charCodeAt(2);if(63!==e&&e!==f)return"\\\\?\\UNC\\"+t.slice(2)}}else if(o(t.charCodeAt(0))&&58===t.charCodeAt(1)&&t.charCodeAt(2)===p)return"\\\\?\\"+t;return e},dirname(e){i(e,"path");const t=e.length;if(0===t)return".";let n=-1,s=-1,a=!0,l=0;const c=e.charCodeAt(0);if(t>1)if(r(c)){if(n=l=1,r(e.charCodeAt(1))){let i=2,s=i;for(;i<t&&!r(e.charCodeAt(i));++i);if(i<t&&i!==s){for(s=i;i<t&&r(e.charCodeAt(i));++i);if(i<t&&i!==s){for(s=i;i<t&&!r(e.charCodeAt(i));++i);if(i===t)return e;i!==s&&(n=l=i+1)}}}}else o(c)&&58===e.charCodeAt(1)&&(n=l=2,t>2&&r(e.charCodeAt(2))&&(n=l=3));else if(r(c))return e;for(let n=t-1;n>=l;--n)if(r(e.charCodeAt(n))){if(!a){s=n;break}}else a=!1;if(-1===s){if(-1===n)return".";s=n}return e.slice(0,s)},basename(e,t){void 0!==t&&i(t,"ext"),i(e,"path");let n,s=0,a=-1,l=!0;if(e.length>=2){
o(e.charCodeAt(0))&&58===e.charCodeAt(1)&&(s=2)}if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";let i=t.length-1,o=-1;for(n=e.length-1;n>=s;--n){const c=e.charCodeAt(n);if(r(c)){if(!l){s=n+1;break}}else-1===o&&(l=!1,o=n+1),i>=0&&(c===t.charCodeAt(i)?-1==--i&&(a=n):(i=-1,a=o))}return s===a?a=o:-1===a&&(a=e.length),e.slice(s,a)}for(n=e.length-1;n>=s;--n)if(r(e.charCodeAt(n))){if(!l){s=n+1;break}}else-1===a&&(l=!1,a=n+1);return-1===a?"":e.slice(s,a)},extname(e){i(e,"path");let t=0,n=-1,s=0,a=-1,l=!0,c=0;e.length>=2&&58===e.charCodeAt(1)&&o(e.charCodeAt(0))&&(t=s=2);for(let i=e.length-1;i>=t;--i){const t=e.charCodeAt(i);if(r(t)){if(!l){s=i+1;break}}else-1===a&&(l=!1,a=i+1),t===f?-1===n?n=i:1!==c&&(c=1):-1!==n&&(c=-1)}return-1===n||-1===a||0===c||1===c&&n===a-1&&n===s+1?"":e.slice(n,a)},format(e){if(null===e||"object"!=typeof e)throw new v("pathObject","Object",e);return l("\\",e)},parse(e){i(e,"path");let t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t
;let n=e.length,s=0,a=e.charCodeAt(0);if(n>1){if(r(a)){if(s=1,r(e.charCodeAt(1))){let t=2,i=t;for(;t<n&&!r(e.charCodeAt(t));++t);if(t<n&&t!==i){for(i=t;t<n&&r(e.charCodeAt(t));++t);if(t<n&&t!==i){for(i=t;t<n&&!r(e.charCodeAt(t));++t);t===n?s=t:t!==i&&(s=t+1)}}}}else if(o(a)&&58===e.charCodeAt(1)){if(s=2,!(n>2))return t.root=t.dir=e,t;if(r(e.charCodeAt(2))){if(3===n)return t.root=t.dir=e,t;s=3}}}else if(r(a))return t.root=t.dir=e,t;s>0&&(t.root=e.slice(0,s));let l=-1,c=s,u=-1,h=!0,d=e.length-1,g=0;for(;d>=s;--d)if(a=e.charCodeAt(d),r(a)){if(!h){c=d+1;break}}else-1===u&&(h=!1,u=d+1),a===f?-1===l?l=d:1!==g&&(g=1):-1!==l&&(g=-1);return-1===l||-1===u||0===g||1===g&&l===u-1&&l===c+1?-1!==u&&(t.base=t.name=e.slice(c,u)):(t.name=e.slice(c,l),t.base=e.slice(c,u),t.ext=e.slice(l,u)),t.dir=c>0&&c!==s?e.slice(0,c-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},_={resolve(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let s;i(s=r>=0?e[r]:m.cwd(),"path"),0!==s.length&&(t=s+"/"+t,n=s.charCodeAt(0)===g)}
return t=a(t,!n,"/",s),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize(e){if(i(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===g,n=e.charCodeAt(e.length-1)===g;return 0!==(e=a(e,!t,"/",s)).length||t||(e="."),e.length>0&&n&&(e+="/"),t?"/"+e:e},isAbsolute:e=>(i(e,"path"),e.length>0&&e.charCodeAt(0)===g),join(...e){if(0===e.length)return".";let t;for(let n=0;n<e.length;++n){let e=arguments[n];i(e,"path"),e.length>0&&(void 0===t?t=e:t+="/"+e)}return void 0===t?".":_.normalize(t)},relative(e,t){if(i(e,"from"),i(t,"to"),e===t)return"";if(e=_.resolve(e),t=_.resolve(t),e===t)return"";let n=1;for(;n<e.length&&e.charCodeAt(n)===g;++n);let r=e.length,s=r-n,o=1;for(;o<t.length&&t.charCodeAt(o)===g;++o);let a=t.length-o,l=s<a?s:a,c=-1,u=0;for(;u<=l;++u){if(u===l){if(a>l){if(t.charCodeAt(o+u)===g)return t.slice(o+u+1);if(0===u)return t.slice(o+u)}else s>l&&(e.charCodeAt(n+u)===g?c=u:0===u&&(c=0));break}let i=e.charCodeAt(n+u);if(i!==t.charCodeAt(o+u))break;i===g&&(c=u)}let h=""
;for(u=n+c+1;u<=r;++u)u!==r&&e.charCodeAt(u)!==g||(0===h.length?h+="..":h+="/..");return h.length>0?h+t.slice(o+c):(o+=c,t.charCodeAt(o)===g&&++o,t.slice(o))},toNamespacedPath:e=>e,dirname(e){if(i(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===g;let n=-1,r=!0;for(let t=e.length-1;t>=1;--t)if(e.charCodeAt(t)===g){if(!r){n=t;break}}else r=!1;return-1===n?t?"/":".":t&&1===n?"//":e.slice(0,n)},basename(e,t){void 0!==t&&i(t,"ext"),i(e,"path");let n,r=0,s=-1,o=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";let i=t.length-1,a=-1;for(n=e.length-1;n>=0;--n){const l=e.charCodeAt(n);if(l===g){if(!o){r=n+1;break}}else-1===a&&(o=!1,a=n+1),i>=0&&(l===t.charCodeAt(i)?-1==--i&&(s=n):(i=-1,s=a))}return r===s?s=a:-1===s&&(s=e.length),e.slice(r,s)}for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===g){if(!o){r=n+1;break}}else-1===s&&(o=!1,s=n+1);return-1===s?"":e.slice(r,s)},extname(e){i(e,"path");let t=-1,n=0,r=-1,s=!0,o=0;for(let i=e.length-1;i>=0;--i){const a=e.charCodeAt(i)
;if(a!==g)-1===r&&(s=!1,r=i+1),a===f?-1===t?t=i:1!==o&&(o=1):-1!==t&&(o=-1);else if(!s){n=i+1;break}}return-1===t||-1===r||0===o||1===o&&t===r-1&&t===n+1?"":e.slice(t,r)},format(e){if(null===e||"object"!=typeof e)throw new v("pathObject","Object",e);return l("/",e)},parse(e){i(e,"path");let t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;let n,r=e.charCodeAt(0)===g;r?(t.root="/",n=1):n=0;let s=-1,o=0,a=-1,l=!0,c=e.length-1,u=0;for(;c>=n;--c){const t=e.charCodeAt(c);if(t!==g)-1===a&&(l=!1,a=c+1),t===f?-1===s?s=c:1!==u&&(u=1):-1!==s&&(u=-1);else if(!l){o=c+1;break}}return-1===s||-1===a||0===u||1===u&&s===a-1&&s===o+1?-1!==a&&(t.base=t.name=0===o&&r?e.slice(1,a):e.slice(o,a)):(0===o&&r?(t.name=e.slice(1,s),t.base=e.slice(1,a)):(t.name=e.slice(o,s),t.base=e.slice(o,a)),t.ext=e.slice(s,a)),o>0?t.dir=e.slice(0,o-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};_.win32=y.win32=y,_.posix=y.posix=_;return"win32"===m.platform?y:_}),define(e[9],t([1,0]),function(e,t){"use strict"
;function n(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\[\]\(\)\#]/g,"\\$&")}function i(e,t){if(!e||!t)return e;let n=t.length;if(0===n||0===e.length)return e;let i=0;for(;e.indexOf(t,i)===i;)i+=n;return e.substring(i)}function r(e,t){if(!e||!t)return e;let n=t.length,i=e.length;if(0===n||0===i)return e;let r=i,s=-1;for(;;){if(-1===(s=e.lastIndexOf(t,r-1))||s+n!==r)break;if(0===s)return"";r=s}return e.substring(0,r)}function s(e,t){return e<t?-1:e>t?1:0}function o(e){return e>=97&&e<=122}function a(e){return e>=65&&e<=90}function l(e){return o(e)||a(e)}function c(e,t,n=e.length){if("string"!=typeof e||"string"!=typeof t)return!1;for(let i=0;i<n;i++){const n=e.charCodeAt(i),r=t.charCodeAt(i);if(n!==r)if(l(n)&&l(r)){let e=Math.abs(n-r);if(0!==e&&32!==e)return!1}else if(String.fromCharCode(n).toLowerCase()!==String.fromCharCode(r).toLowerCase())return!1}return!0}function u(e,t,n,i,r,s){for(;t<n&&r<s;){if(e[t]!==i[r])return!1;t+=1,r+=1}return!0}function h(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="0"){let i=""+e,r=[i];for(let e=i.length;e<t;e++)r.push(n);return r.reverse().join("")};const f=/{(\d+)}/g;t.format=function(e,...t){return 0===t.length?e:e.replace(f,function(e,n){let i=parseInt(n,10);return isNaN(i)||i<0||i>=t.length?e:t[i]})},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 r(i(e,t),t)},t.ltrim=i,t.rtrim=r,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(let n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0},t.endsWith=function(e,t){let n=e.length-t.length;return n>0?e.indexOf(t,n)===n:0===n&&e===t},t.createRegExp=function(e,t,i={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=n(e)),i.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let r="";return i.global&&(r+="g"),i.matchCase||(r+="i"),i.multiline&&(r+="m"),i.unicode&&(r+="u"),new RegExp(e,r)},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.regExpFlags=function(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")},t.firstNonWhitespaceIndex=function(e){for(let t=0,n=e.length;t<n;t++){let n=e.charCodeAt(t);if(32!==n&&9!==n)return t}return-1},
t.getLeadingWhitespace=function(e,t=0,n=e.length){for(let i=t;i<n;i++){let n=e.charCodeAt(i);if(32!==n&&9!==n)return e.substring(t,i)}return e.substring(t,n)},t.lastNonWhitespaceIndex=function(e,t=e.length-1){for(let n=t;n>=0;n--){let t=e.charCodeAt(n);if(32!==t&&9!==t)return n}return-1},t.compare=s,t.compareIgnoreCase=function(e,t){const n=Math.min(e.length,t.length);for(let i=0;i<n;i++){let n=e.charCodeAt(i),r=t.charCodeAt(i);if(n===r)continue;a(n)&&(n+=32),a(r)&&(r+=32);const l=n-r;if(0!==l)return o(n)&&o(r)?l:s(e.toLowerCase(),t.toLowerCase())}return e.length<t.length?-1:e.length>t.length?1:0},t.isLowerAsciiLetter=o,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){const n=t.length;return!(t.length>e.length)&&c(e,t,n)},t.commonPrefixLength=function(e,t){let n,i=Math.min(e.length,t.length);for(n=0;n<i;n++)if(e.charCodeAt(n)!==t.charCodeAt(n))return n;return i},t.commonSuffixLength=function(e,t){
let n,i=Math.min(e.length,t.length),r=e.length-1,s=t.length-1;for(n=0;n<i;n++)if(e.charCodeAt(r-n)!==t.charCodeAt(s-n))return n;return i},t.overlap=function(e,t){let n=e.length,i=t.length,r=n-i;if(0===r)return e===t?n:0;for(r<0&&(i+=r,r=0);r<n&&i>0;){if(u(e,r,n,t,0,i))return i;i-=1,r+=1}return 0},t.isHighSurrogate=function(e){return 55296<=e&&e<=56319},t.isLowSurrogate=function(e){return 56320<=e&&e<=57343};const g=/(?:[\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 g.test(e)}
;const p=/(?:[\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 p.test(e)};const m=/^[\t\n\r\x20-\x7E]*$/;t.isBasicASCII=function(e){return m.test(e)},t.containsFullWidthCharacter=function(e){for(let t=0,n=e.length;t<n;t++)if(h(e.charCodeAt(t)))return!0;return!1},t.isFullWidthCharacter=h,t.lcut=function(e,n){if(e.length<n)return e;const i=/\b/g;let r=0;for(;i.test(e)&&!(e.length-i.lastIndex<n);)r=i.lastIndex,i.lastIndex+=1;return e.substring(r).replace(/^\s/,t.empty)};const v=/\x1B\x5B[12]?K/g,y=/\x1b\[\d+m/g,_=/\x1b\[0?m/g;t.removeAnsiEscapeCodes=function(e){return e&&(e=(e=(e=e.replace(v,"")).replace(y,"")).replace(_,"")),e},t.removeAccents=function(){if("function"!=typeof String.prototype.normalize)return function(e){return e};{const e=/[\u0300-\u036f]/g;return function(n){return n.normalize("NFD").replace(e,t.empty)}}}(),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){let n="";for(let i=0;i<t;i++)n+=e;return n},t.fuzzyContains=function(e,t){if(!e||!t)return!1;if(e.length<t.length)return!1;const n=t.length,i=e.toLowerCase();let r=0,s=-1;for(;r<n;){let e=i.indexOf(t[r],s+1);if(e<0)return!1;s=e,r++}return!0},t.containsUppercaseCharacter=function(e,t=!1){return!!e&&(t&&(e=e.replace(/\\./g,"")),e.toLowerCase()!==e)},t.uppercaseFirstLetter=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},t.getNLines=function(e,t=1){if(0===t)return"";let n=-1;do{n=e.indexOf("\n",n+1),t--}while(t>0&&n>=0);return n>=0?e.substr(0,n):e}}),define(e[104],t([1,0,9]),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[36],t([1,0,5,9,2]),function(e,t,n,i,r){"use strict";function s(e){return 47===e||92===e}function o(e){return e>=65&&e<=90||e>=97&&e<=122}Object.defineProperty(t,"__esModule",{value:!0}),t.toSlashes=function(e){return e.replace(/[\\/]/g,"/")},t.getRoot=function(e,t="/"){if(!e)return"";let n=e.length;const i=e.charCodeAt(0);if(s(i)){if(s(e.charCodeAt(1))&&!s(e.charCodeAt(2))){let i=3,r=i;for(;i<n&&!s(e.charCodeAt(i));i++);if(r!==i&&!s(e.charCodeAt(i+1)))for(i+=1;i<n;i++)if(s(e.charCodeAt(i)))return e.slice(0,i+1).replace(/[\\/]/g,t)}return t}if(o(i)&&58===e.charCodeAt(1))return s(e.charCodeAt(2))?e.slice(0,2)+t:e.slice(0,2);let r=e.indexOf("://");if(-1!==r)for(r+=3;r<n;r++)if(s(e.charCodeAt(r)))return e.slice(0,r+1);return""},t.isUNC=function(e){if(!n.isWindows)return!1
;if(!e||e.length<5)return!1;let t=e.charCodeAt(0);if(92!==t)return!1;if(92!==(t=e.charCodeAt(1)))return!1;let i=2,r=i;for(;i<e.length&&92!==(t=e.charCodeAt(i));i++);return r!==i&&(t=e.charCodeAt(i+1),!isNaN(t)&&92!==t)};const a=n.isWindows?/[\\/:\*\?"<>\|]/g:/[\\/]/g,l=/^(con|prn|aux|clock\$|nul|lpt[0-9]|com[0-9])$/i;t.isValidBasename=function(e){return!(!e||0===e.length||/^\s+$/.test(e)||(a.lastIndex=0,a.test(e)||n.isWindows&&l.test(e)||"."===e||".."===e||n.isWindows&&"."===e[e.length-1]||n.isWindows&&e.length!==e.trim().length||e.length>255))},t.isEqual=function(e,t,n){const r=e===t;return!n||r?r:!(!e||!t)&&i.equalsIgnoreCase(e,t)},t.isEqualOrParent=function(e,t,n,s=r.sep){if(e===t)return!0;if(!e||!t)return!1;if(t.length>e.length)return!1;if(n){if(!i.startsWithIgnoreCase(e,t))return!1;if(t.length===e.length)return!0;let n=t.length;return t.charAt(t.length-1)===s&&n--,e.charAt(n)===s}return t.charAt(t.length-1)!==s&&(t+=s),0===e.indexOf(t)},t.isWindowsDriveLetter=o}),define(e[10],t([1,0]),function(e,t){
"use strict";function n(e){return Array.isArray?Array.isArray(e):!(!e||typeof e.length!==c.number||e.constructor!==Array)}function i(e){return typeof e===c.string||e instanceof String}function r(e){return!(typeof e!==c.object||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function s(e){return typeof e===c.undefined}function o(e){return s(e)||null===e}function a(e){return typeof e===c.function}function l(e,t){if(i(t)){if(typeof e!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(a(t)){try{if(e instanceof t)return}catch(e){}if(!o(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});const c={number:"number",string:"string",undefined:"undefined",object:"object",function:"function"};t.isArray=n,t.isString=i,t.isStringArray=function(e){
return n(e)&&e.every(e=>i(e))},t.isObject=r,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=s,t.isUndefinedOrNull=o;const u=Object.prototype.hasOwnProperty;t.isEmptyObject=function(e){if(!r(e))return!1;for(let t in e)if(u.call(e,t))return!1;return!0},t.isFunction=a,t.areFunctions=function(...e){return e.length>0&&e.every(a)},t.validateConstraints=function(e,t){const n=Math.min(e.length,t.length);for(let i=0;i<n;i++)l(e[i],t[i])},t.validateConstraint=l,t.create=function(e,...t){if(function(e){return"function"==typeof e&&e.hasOwnProperty("prototype")&&!e.hasOwnProperty("arguments")}(e))return new e(...t);{let n=Object.create(e.prototype);return e.apply(n,t),n}},t.getAllPropertyNames=function(e){let t=[],n=Object.getPrototypeOf(e);for(;Object.prototype!==n;)t=t.concat(Object.getOwnPropertyNames(n)),n=Object.getPrototypeOf(n);return t}}),define(e[11],t([1,0,10]),function(e,t,n){"use strict";function i(e){
if(!e||"object"!=typeof e)return e;if(e instanceof RegExp)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(n=>{e[n]&&"object"==typeof e[n]?t[n]=i(e[n]):t[n]=e[n]}),t}function r(e,t,i){if(n.isUndefinedOrNull(e))return e;const s=t(e);if(void 0!==s)return s;if(n.isArray(e)){const n=[];for(const s of e)n.push(r(s,t,i));return n}if(n.isObject(e)){if(i.has(e))throw new Error("Cannot clone recursive data-structure");i.add(e);const n={};for(let s in e)a.call(e,s)&&(n[s]=r(e[s],t,i));return i.delete(e),n}return e}function s(e,t,i=!0){return n.isObject(e)?(n.isObject(t)&&Object.keys(t).forEach(r=>{r in e?i&&(n.isObject(e[r])&&n.isObject(t[r])?s(e[r],t[r],i):e[r]=t[r]):e[r]=t[r]}),e):t}function o(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;let n,i;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!o(e[n],t[n]))return!1}else{
const r=[];for(i in e)r.push(i);r.sort();const s=[];for(i in t)s.push(i);if(s.sort(),!o(r,s))return!1;for(n=0;n<r.length;n++)if(!o(e[r[n]],t[r[n]]))return!1}return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.deepClone=i,t.deepFreeze=function(e){if(!e||"object"!=typeof e)return e;const t=[e];for(;t.length>0;){let e=t.shift();Object.freeze(e);for(const n in e)if(a.call(e,n)){let i=e[n];"object"!=typeof i||Object.isFrozen(i)||t.push(i)}}return e};const a=Object.prototype.hasOwnProperty;t.cloneAndChange=function(e,t){return r(e,t,new Set)},t.mixin=s,t.assign=function(e,...t){return t.forEach(t=>Object.keys(t).forEach(n=>e[n]=t[n])),e},t.equals=o,t.createKeywordMatcher=function(e,t=!1){t&&(e=e.map(function(e){return e.toLowerCase()}));const n=function(e){const t={};for(const n of e)t[n]=!0;return t}(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){const t=[]
;return JSON.stringify(e,(e,i)=>{if(n.isObject(i)||Array.isArray(i)){if(-1!==t.indexOf(i))return"[Circular]";t.push(i)}return i})},t.getOrDefault=function(e,t,n){const i=t(e);return void 0===i?n:i},t.distinct=function(e,t){const n=Object.create(null);return e&&t?(Object.keys(t).forEach(i=>{const r=e[i],s=t[i];o(r,s)||(n[i]=s)}),n):n}}),define(e[12],t([1,0,5]),function(e,t,n){"use strict";function i(e,t){let n=void 0,i=-1;for(let r=0;r<e.length;r++){let s=e.charCodeAt(r);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||t&&47===s)-1!==i&&(n+=encodeURIComponent(e.substring(i,r)),i=-1),void 0!==n&&(n+=e.charAt(r));else{void 0===n&&(n=e.substr(0,r));let t=g[s];void 0!==t?(-1!==i&&(n+=encodeURIComponent(e.substring(i,r)),i=-1),n+=t):-1===i&&(i=r)}}return-1!==i&&(n+=encodeURIComponent(e.substring(i))),void 0!==n?n:e}function r(e){let 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,n.isWindows&&(t=t.replace(/\//g,"\\")),t}function s(e,t){const n=t?function(e){let t=void 0;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);35===i||63===i?(void 0===t&&(t=e.substr(0,n)),t+=g[i]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}:i;let r="",{scheme:s,authority:o,path:a,query:l,fragment:c}=e;if(s&&(r+=s,r+=":"),(o||"file"===s)&&(r+=u,r+=u),o){let e=o.indexOf("@");if(-1!==e){const t=o.substr(0,e);o=o.substr(e+1),-1===(e=t.indexOf(":"))?r+=n(t,!1):(r+=n(t.substr(0,e),!1),r+=":",r+=n(t.substr(e+1),!1)),r+="@"}-1===(e=(o=o.toLowerCase()).indexOf(":"))?r+=n(o,!1):(r+=n(o.substr(0,e),!1),r+=o.substr(e))}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2)){let e=a.charCodeAt(1)
;e>=65&&e<=90&&(a=`/${String.fromCharCode(e+32)}:${a.substr(3)}`)}else if(a.length>=2&&58===a.charCodeAt(1)){let e=a.charCodeAt(0);e>=65&&e<=90&&(a=`${String.fromCharCode(e+32)}:${a.substr(2)}`)}r+=n(a,!0)}return l&&(r+="?",r+=n(l,!1)),c&&(r+="#",r+=t?c:i(c,!1)),r}Object.defineProperty(t,"__esModule",{value:!0});const o=/^\w[\w\d+.-]*$/,a=/^\//,l=/^\/\//;let c=!0;t.setUriThrowOnMissingScheme=function(e){const t=c;return c=e,t};const u="/",h=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static isUri(e){return e instanceof d||!!e&&("string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"function"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString)}constructor(e,t,n,i,r,s){"object"==typeof e?(this.scheme=e.scheme||"",this.authority=e.authority||"",this.path=e.path||"",this.query=e.query||"",this.fragment=e.fragment||""):(this.scheme=e||"",this.authority=t||"",this.path=function(e,t){
switch(e){case"https":case"http":case"file":t?t[0]!==u&&(t=u+t):t=u}return t}(this.scheme,n||""),this.query=i||"",this.fragment=r||"",function(e,t){if(!e.scheme){if(t||c)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);console.warn(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`)}if(e.scheme&&!o.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!a.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,s))}get fsPath(){return r(this)}with(e){if(!e)return this
;let{scheme:t,authority:n,path:i,query:r,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=""),void 0===n?n=this.authority:null===n&&(n=""),void 0===i?i=this.path:null===i&&(i=""),void 0===r?r=this.query:null===r&&(r=""),void 0===s?s=this.fragment:null===s&&(s=""),t===this.scheme&&n===this.authority&&i===this.path&&r===this.query&&s===this.fragment?this:new f(t,n,i,r,s)}static parse(e,t=!1){const n=h.exec(e);return n?new f(n[2]||"",decodeURIComponent(n[4]||""),decodeURIComponent(n[5]||""),decodeURIComponent(n[7]||""),decodeURIComponent(n[9]||""),t):new f("","","","","")}static file(e){let t="";if(n.isWindows&&(e=e.replace(/\\/g,u)),e[0]===u&&e[1]===u){let n=e.indexOf(u,2);-1===n?(t=e.substring(2),e=u):(t=e.substring(2,n),e=e.substring(n)||u)}return new f("file",t,e,"","")}static from(e){return new f(e.scheme,e.authority,e.path,e.query,e.fragment)}toString(e=!1){return s(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof d)return e;{let t=new f(e);return t._fsPath=e.fsPath,
t._formatted=e.external,t}}return e}}t.URI=d;class f extends d{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=r(this)),this._fsPath}toString(e=!1){return e?s(this,!0):(this._formatted||(this._formatted=s(this,!1)),this._formatted)}toJSON(){const 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}}const g={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"}}),define(e[24],t([1,0,12]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPathFromAmdModule=function(e,t){return n.URI.parse(e.toUrl(t)).fsPath}}),define(e[26],t([1,0,12,51]),function(e,t,n,i){
"use strict";function r(e){const t=[];return e.forEach(e=>t.push(e)),t}function s(e){const t=[];return e.forEach((e,n)=>t.push(n)),t}Object.defineProperty(t,"__esModule",{value:!0}),t.values=r,t.keys=s,t.getOrSet=function(e,t,n){let i=e.get(t);return void 0===i&&(i=n,e.set(t,i)),i},t.mapToString=function(e){const t=[];return e.forEach((e,n)=>{t.push(`${n} => ${e}`)}),`Map(${e.size}) {${t.join(", ")}}`},t.setToString=function(e){const t=[];return e.forEach(e=>{t.push(e)}),`Set(${e.size}) {${t.join(", ")}}`},t.mapToSerializable=function(e){const t=[];return e.forEach((e,n)=>{t.push([n,e])}),t},t.serializableToMap=function(e){const t=new Map;for(const[n,i]of e)t.set(n,i);return t};class o{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(e){return e.charCodeAt(0)-this._value.charCodeAt(this._pos)}value(){return this._value[this._pos]}}t.StringIterator=o;class a{reset(e){
return this._value=e.replace(/\\$|\/$/,""),this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let e=!0;for(;this._to<this._value.length;this._to++){const t=this._value.charCodeAt(this._to);if(47===t||92===t){if(!e)break;this._from++}else e=!1}return this}cmp(e){let t=0,n=e.length,i=this._from;for(;t<n&&i<this._to;){let n=e.charCodeAt(t)-this._value.charCodeAt(i);if(0!==n)return n;t+=1,i+=1}return n===this._to-this._from?0:t<n?-1:1}value(){return this._value.substring(this._from,this._to)}}t.PathIterator=a;class l{isEmpty(){return!(this.left||this.mid||this.right||this.value)}}class c{constructor(e){this._iter=e}static forPaths(){return new c(new a)}static forStrings(){return new c(new o)}clear(){this._root=void 0}set(e,t){let n,i=this._iter.reset(e);for(this._root||(this._root=new l,this._root.segment=i.value()),n=this._root;;){let e=i.cmp(n.segment);if(e>0)n.left||(n.left=new l,n.left.segment=i.value()),n=n.left;else if(e<0)n.right||(n.right=new l,
n.right.segment=i.value()),n=n.right;else{if(!i.hasNext())break;i.next(),n.mid||(n.mid=new l,n.mid.segment=i.value()),n=n.mid}}const r=n.value;return n.value=t,n.key=e,r}get(e){let t=this._iter.reset(e),n=this._root;for(;n;){let e=t.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!t.hasNext())break;t.next(),n=n.mid}}return n?n.value:void 0}delete(e){let t=this._iter.reset(e),n=[],i=this._root;for(;i;){let e=t.cmp(i.segment);if(e>0)n.push([1,i]),i=i.left;else if(e<0)n.push([-1,i]),i=i.right;else{if(!t.hasNext()){for(i.value=void 0;n.length>0&&i.isEmpty();){let[e,t]=n.pop();switch(e){case 1:t.left=void 0;break;case 0:t.mid=void 0;break;case-1:t.right=void 0}i=t}break}t.next(),n.push([0,i]),i=i.mid}}}findSubstr(e){let t=this._iter.reset(e),n=this._root,i=void 0;for(;n;){let e=t.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!t.hasNext())break;t.next(),i=n.value||i,n=n.mid}}return n&&n.value||i}findSuperstr(e){let t=this._iter.reset(e),n=this._root;for(;n;){let e=t.cmp(n.segment)
;if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!t.hasNext())return n.mid?this._nodeIterator(n.mid):void 0;t.next(),n=n.mid}}}_nodeIterator(e){let t,n,r;return{next:()=>(r||(r=[],n=0,this._forEach(e,e=>r.push(e))),n>=r.length?i.FIN:(t?t.value=r[n++]:t={done:!1,value:r[n++]},t))}}forEach(e){this._forEach(this._root,e)}_forEach(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))}}t.TernarySearchTree=c;class u{constructor(){this.map=new Map,this.ignoreCase=!1}set(e,t){this.map.set(this.toKey(e),t)}get(e){return this.map.get(this.toKey(e))}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e){this.map.forEach(e)}values(){return r(this.map)}toKey(e){let t=e.toString();return this.ignoreCase&&(t=t.toLowerCase()),t}keys(){return s(this.map).map(e=>n.URI.parse(e))}clone(){const e=new u;return this.map.forEach((t,n)=>e.map.set(n,t)),e}}t.ResourceMap=u
;!function(e){e[e.None=0]="None",e[e.AsOld=1]="AsOld",e[e.AsNew=2]="AsNew"}(t.Touch||(t.Touch={}));class h{constructor(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}has(e){return this._map.has(e)}get(e,t=0){const n=this._map.get(e);if(n)return 0!==t&&this.touch(n,t),n.value}set(e,t,n=0){let i=this._map.get(e);if(i)i.value=t,0!==n&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case 0:this.addItemLast(i);break;case 1:this.addItemFirst(i);break;case 2:default:this.addItemLast(i)}this._map.set(e,i),this._size++}}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),
this.removeItem(e),this._size--,e.value}forEach(e,t){let n=this._head;for(;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.next}values(){let e=[],t=this._head;for(;t;)e.push(t.value),t=t.next;return e}keys(){let e=[],t=this._head;for(;t;)e.push(t.key),t=t.next;return e}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0)}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){
if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e}else if(2===t){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e}}toJSON(){const e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}t.LinkedMap=h;class d extends h{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,
this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e){return super.get(e,2)}peek(e){return super.get(e,0)}set(e,t){super.set(e,t,2),this.checkTrim()}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}t.LRUCache=d}),define(e[49],t([1,0,18,9,36,2,26,16]),function(e,t,n,i,r,s,o,a){"use strict";function l(e){switch(e){case 0:return"";case 1:return`${C}*?`;default:return`(?:${w}|${C}+${w}|${w}${C}+)*?`}}function c(e,t){if(!e)return[];let n=[],i=!1,r=!1,s="";for(const o of e){switch(o){case t:if(!i&&!r){n.push(s),s="";continue}break;case"{":i=!0;break;case"}":i=!1;break;case"[":r=!0;break;case"]":r=!1}s+=o}return s&&n.push(s),n}function u(e){if(!e)return"";let t="",n=c(e,E);if(n.every(e=>e===_))t=".*";else{let e=!1;n.forEach((r,s)=>{if(r===_)return void(e||(t+=l(2),e=!0));let o=!1,a="",h=!1,d="";for(const e of r)if("}"!==e&&o)a+=e;else if(!h||"]"===e&&d)switch(e){case"{":o=!0;continue;case"[":h=!0;continue
;case"}":let n=`(?:${c(a,",").map(e=>u(e)).join("|")})`;t+=n,o=!1,a="";break;case"]":t+="["+d+"]",h=!1,d="";break;case"?":t+=C;continue;case"*":t+=l(1);continue;default:t+=i.escapeRegExpCharacters(e)}else{let t;d+=t="-"===e?e:"^"!==e&&"!"!==e||d?e===E?"":i.escapeRegExpCharacters(e):"^"}s<n.length-1&&(n[s+1]!==_||s+2<n.length)&&(t+=w),e=!1})}return t}function h(e,t){if(!e)return L;let r;r="string"!=typeof e?e.pattern:e;const s=`${r=r.trim()}_${!!t.trimForExclusions}`;let o=D.get(s);if(o)return d(o,e);let a;if(x.test(r)){const e=r.substr(4);o=function(t,n){return"string"==typeof t&&i.endsWith(t,e)?r:null}}else o=(a=S.exec(f(r,t)))?function(e,t){const n=`/${e}`,r=`\\${e}`,s=function(s,o){return"string"!=typeof s?null:o?o===e?t:null:s===e||i.endsWith(s,n)||i.endsWith(s,r)?t:null},o=[e];return s.basenames=o,s.patterns=[t],s.allBasenames=o,s}(a[1],r):(t.trimForExclusions?k:P).test(r)?function(e,t){const i=y(e.slice(1,-1).split(",").map(e=>h(e,t)).filter(e=>e!==L),e),r=i.length;if(!r)return L;if(1===r)return i[0]
;const s=function(t,n){for(let r=0,s=i.length;r<s;r++)if(i[r](t,n))return e;return null},o=n.first(i,e=>!!e.allBasenames);o&&(s.allBasenames=o.allBasenames);const a=i.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);a.length&&(s.allPaths=a);return s}(r,t):(a=I.exec(f(r,t)))?g(a[1].substr(1),r,!0):(a=O.exec(f(r,t)))?g(a[1],r,!1):function(e){try{const t=new RegExp(`^${u(e)}$`);return function(n,i){return t.lastIndex=0,"string"==typeof n&&t.test(n)?e:null}}catch(e){return L}}(r);return D.set(s,o),d(o,e)}function d(e,t){return"string"==typeof t?e:function(n,i){return r.isEqualOrParent(n,t.base)?e(s.relative(t.base,n),i):null}}function f(e,t){return t.trimForExclusions&&i.endsWith(e,"/**")?e.substr(0,e.length-2):e}function g(e,t,n){const r=s.sep!==s.posix.sep?e.replace(b,s.sep):e,o=s.sep+r,a=n?function(e,n){return"string"!=typeof e||e!==r&&!i.endsWith(e,o)?null:t}:function(e,n){return"string"==typeof e&&e===r?t:null};return a.allPaths=[(n?"*/":"./")+e],a}function p(e,t={}){if(!e)return A
;if("string"==typeof e||v(e)){const n=h(e,t);if(n===L)return A;const i=function(e,t){return!!n(e,t)};return n.allBasenames&&(i.allBasenames=n.allBasenames),n.allPaths&&(i.allPaths=n.allPaths),i}return function(e,t){const i=y(Object.getOwnPropertyNames(e).map(n=>(function(e,t,n){if(!1===t)return L;const i=h(e,n);if(i===L)return L;if("boolean"==typeof t)return i;if(t){const n=t.when;if("string"==typeof n){const t=(t,r,s,o)=>{if(!o||!i(t,r))return null;const l=n.replace("$(basename)",s),c=o(l);return a.isThenable(c)?c.then(t=>t?e:null):c?e:null};return t.requiresSiblings=!0,t}}return i})(n,e[n],t)).filter(e=>e!==L)),r=i.length;if(!r)return L;if(!i.some(e=>!!e.requiresSiblings)){if(1===r)return i[0];const e=function(e,t){for(let n=0,r=i.length;n<r;n++){const r=i[n](e,t);if(r)return r}return null},t=n.first(i,e=>!!e.allBasenames);t&&(e.allBasenames=t.allBasenames);const s=i.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);return s.length&&(e.allPaths=s),e}const o=function(e,t,n){let r=void 0
;for(let o=0,a=i.length;o<a;o++){const a=i[o];a.requiresSiblings&&n&&(t||(t=s.basename(e)),r||(r=t.substr(0,t.length-s.extname(e).length)));const l=a(e,t,r,n);if(l)return l}return null},l=n.first(i,e=>!!e.allBasenames);l&&(o.allBasenames=l.allBasenames);const c=i.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);c.length&&(o.allPaths=c);return o}(e,t)}function m(e){const t={};for(const n of e)t[n]=!0;return t}function v(e){const t=e;return t&&"string"==typeof t.base&&"string"==typeof t.pattern}function y(e,t){const n=e.filter(e=>!!e.basenames);if(n.length<2)return e;const i=n.reduce((e,t)=>{const n=t.basenames;return n?e.concat(n):e},[]);let r;if(t){r=[];for(let e=0,n=i.length;e<n;e++)r.push(t)}else r=n.reduce((e,t)=>{const n=t.patterns;return n?e.concat(n):e},[]);const s=function(e,t){if("string"!=typeof e)return null;if(!t){let n;for(n=e.length;n>0;n--){const t=e.charCodeAt(n-1);if(47===t||92===t)break}t=e.substr(n)}const n=i.indexOf(t);return-1!==n?r[n]:null};s.basenames=i,s.patterns=r,s.allBasenames=i
;const o=e.filter(e=>!e.basenames);return o.push(s),o}Object.defineProperty(t,"__esModule",{value:!0}),t.getEmptyExpression=function(){return Object.create(null)};const _="**",E="/",w="[/\\\\]",C="[^/\\\\]",b=/\//g;t.splitGlobAware=c;const x=/^\*\*\/\*\.[\w\.-]+$/,S=/^\*\*\/([\w\.-]+)\/?$/,P=/^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/,k=/^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/,I=/^\*\*((\/[\w\.-]+)+)\/?$/,O=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,D=new o.LRUCache(1e4),A=function(){return!1},L=function(){return null};t.match=function(e,t,n){return!(!e||"string"!=typeof t)&&p(e)(t,void 0,n)},t.parse=p,t.hasSiblingPromiseFn=function(e){if(!e)return;let t;return n=>(t||(t=(e()||Promise.resolve([])).then(e=>e?m(e):{})),t.then(e=>!!e[n]))},t.hasSiblingFn=function(e){if(!e)return;let t;return n=>{if(!t){const n=e();t=n?m(n):{}}return!!t[n]}},t.isRelativePattern=v,t.parseToAsync=function(e,t){const n=p(e,t);return(e,t,i)=>{const r=n(e,t,i)
;return a.isThenable(r)?r:Promise.resolve(r)}},t.getBasenameTerms=function(e){return e.allBasenames||[]},t.getPathTerms=function(e){return e.allPaths||[]}}),define(e[119],t([1,0,2,9,18,49]),function(e,t,n,i,r,s){"use strict";function o(e,t=!1){const i=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.posix.sep)>=0}}(e);u.push(i),i.userConfigured?d.push(i):h.push(i),t&&!i.userConfigured&&u.forEach(e=>{e.mime===i.mime||e.userConfigured||(i.extension&&e.extension===i.extension&&console.warn(`Overwriting extension <<${i.extension}>> to now point to mime <<${i.mime}>>`),
i.filename&&e.filename===i.filename&&console.warn(`Overwriting filename <<${i.filename}>> to now point to mime <<${i.mime}>>`),i.filepattern&&e.filepattern===i.filepattern&&console.warn(`Overwriting filepattern <<${i.filepattern}>> to now point to mime <<${i.mime}>>`),i.firstline&&e.firstline===i.firstline&&console.warn(`Overwriting firstline <<${i.firstline}>> to now point to mime <<${i.mime}>>`))})}function a(e,r){if(!e)return[t.MIME_UNKNOWN];e=e.toLowerCase();const s=n.basename(e),o=l(e,s,d);if(o)return[o,t.MIME_TEXT];const a=l(e,s,h);if(a)return[a,t.MIME_TEXT];if(r){const e=function(e){i.startsWithUTF8BOM(e)&&(e=e.substr(1));if(e.length>0)for(const t of u){if(!t.firstline)continue;const n=e.match(t.firstline);if(n&&n.length>0)return t.mime}return null}(r);if(e)return[e,t.MIME_TEXT]}return[t.MIME_UNKNOWN]}function l(e,t,n){let r=null,o=null,a=null;for(let l=n.length-1;l>=0;l--){const c=n[l];if(t===c.filenameLowercase){r=c;break}if(c.filepattern&&(!o||c.filepattern.length>o.filepattern.length)){
const n=c.filepatternOnPath?e:t;s.match(c.filepatternLowercase,n)&&(o=c)}c.extension&&(!a||c.extension.length>a.extension.length)&&i.endsWith(t,c.extensionLowercase)&&(a=c)}return r?r.mime:o?o.mime:a?a.mime:null}function c(e){return!e||("string"==typeof e?e===t.MIME_BINARY||e===t.MIME_TEXT||e===t.MIME_UNKNOWN:1===e.length&&c(e[0]))}Object.defineProperty(t,"__esModule",{value:!0}),t.MIME_TEXT="text/plain",t.MIME_BINARY="application/octet-stream",t.MIME_UNKNOWN="application/unknown";let u=[],h=[],d=[];t.registerTextMime=o,t.clearTextMimes=function(e){e?(u=u.filter(e=>!e.userConfigured),d=[]):(u=[],h=[],d=[])},t.guessMimeTypes=a,t.isUnspecific=c,t.suggestFilename=function(e,t){const n=u.filter(t=>!t.userConfigured&&t.extension&&t.id===e).map(e=>e.extension),s=r.coalesce(n).filter(e=>i.startsWith(e,"."));return s.length>0?t+s[0]:n[0]||t};const f={".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){const t=n.extname(e);return f[t.toLowerCase()]}}),define(e[55],t([1,0,26]),function(e,t,n){"use strict";function i(e,n,i){if(!t.canNormalize||!e)return e
;const r=i.get(e);if(r)return r;let s;return s=o.test(e)?e.normalize(n):e,i.set(e,s),s}Object.defineProperty(t,"__esModule",{value:!0}),t.canNormalize="function"==typeof"".normalize;const r=new n.LRUCache(1e4);t.normalizeNFC=function(e){return i(e,"NFC",r)};const s=new n.LRUCache(1e4);t.normalizeNFD=function(e){return i(e,"NFD",s)};const o=/[^\u0000-\u0080]/}),define(e[34],t([1,0,36,2,12,9,20,5,49,26]),function(e,t,n,i,r,s,o,a,l,c){"use strict";function u(e){return!e||e.scheme!==o.Schemas.file||!a.isLinux}function h(e,t,i=u(e)){if(e.scheme===t.scheme){if(e.scheme===o.Schemas.file)return n.isEqualOrParent(g(e),g(t),i);if(d(e.authority,t.authority))return n.isEqualOrParent(e.path,t.path,i,"/")}return!1}function d(e,t){return e===t||s.equalsIgnoreCase(e,t)}function f(e){return i.posix.basename(e.path)}function g(e){let t;const i=e.path
;return t=e.authority&&i.length>1&&"file"===e.scheme?`//${e.authority}${i}`:a.isWindows&&47===i.charCodeAt(0)&&n.isWindowsDriveLetter(i.charCodeAt(1))&&58===i.charCodeAt(2)?i.substr(1):i,a.isWindows&&(t=t.replace(/\//g,"\\")),t}function p(e){if(e.scheme===o.Schemas.file){const t=g(e);return t.length>n.getRoot(t).length&&t[t.length-1]===i.sep}{let t=e.path;return t.length>1&&47===t.charCodeAt(t.length-1)}}function m(e,t){if(e.scheme===t.scheme&&d(e.authority,t.authority)){if(e.scheme===o.Schemas.file){const r=i.relative(e.path,t.path);return a.isWindows?n.toSlashes(r):r}return i.posix.relative(e.path||"/",t.path||"/")}}Object.defineProperty(t,"__esModule",{value:!0}),t.getComparisonKey=function(e){return u(e)?e.toString().toLowerCase():e.toString()},t.hasToIgnoreCase=u,t.basenameOrAuthority=function(e){return f(e)||e.authority},t.isEqualOrParent=h,t.isEqualAuthority=d,t.isEqual=function(e,t,n=u(e)){if(e===t)return!0;if(!e||!t)return!1;if(e.scheme!==t.scheme||!d(e.authority,t.authority))return!1
;const i=e.path||"/",r=t.path||"/";return i===r||n&&s.equalsIgnoreCase(i||"/",r||"/")},t.basename=f,t.extname=function(e){return i.posix.extname(e.path)},t.dirname=function(e){if(0===e.path.length)return e;if(e.scheme===o.Schemas.file)return r.URI.file(i.dirname(g(e)));let t=i.posix.dirname(e.path);return e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/"),e.with({path:t})},t.joinPath=function(e,...t){let n;return n=e.scheme===o.Schemas.file?r.URI.file(i.join(g(e),...t)).path:i.posix.join(e.path||"/",...t),e.with({path:n})},t.normalizePath=function(e){if(!e.path.length)return e;let t;return t=e.scheme===o.Schemas.file?r.URI.file(i.normalize(g(e))).path:i.posix.normalize(e.path),e.with({path:t})},t.originalFSPath=g,t.isAbsolutePath=function(e){return!!e.path&&"/"===e.path[0]},t.hasTrailingPathSeparator=p,t.removeTrailingPathSeparator=function(e){return p(e)?e.with({path:e.path.substr(0,e.path.length-1)}):e},t.relativePath=m,
t.resolvePath=function(e,t){let n;return n=e.scheme===o.Schemas.file?r.URI.file(i.resolve(g(e),t)).path:i.posix.resolve(e.path,t),e.with({path:n})},t.distinctParents=function(e,t){const n=[];for(let i=0;i<e.length;i++){const r=t(e[i]);e.some((e,n)=>n!==i&&h(r,t(e)))||n.push(e[i])}return n},t.isMalformedFileUri=function(e){if(!e.scheme||a.isWindows&&e.scheme.match(/^[a-zA-Z]$/))return r.URI.file((e.scheme?e.scheme+":":"")+e.path)};!function(e){e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=function(t){const n=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach(e=>{const[t,i]=e.split(":");t&&i&&n.set(t,i)});const i=t.path.substring(0,t.path.indexOf(";"));return i&&n.set(e.META_DATA_MIME,i),n}}(t.DataUri||(t.DataUri={}));class v{constructor(e,t){this.expressionsByRoot=c.TernarySearchTree.forPaths(),this.globalExpression=l.parse(e);for(const e of t)this.expressionsByRoot.set(e.root.toString(),{
root:e.root,expression:l.parse(e.expression)})}matches(e){const t=this.expressionsByRoot.findSubstr(e.toString());if(t){const n=m(t.root,e);if(n&&t.expression(n))return!0}return!!this.globalExpression(e.path)}}t.ResourceGlobMatcher=v}),define(e[66],t([1,0,12,2,9,20,5,34]),function(e,t,n,i,r,s,o,a){"use strict";function l(e){return!(!o.isWindows||!e||":"!==e[1])}function c(e){return l(e)?e.charAt(0).toUpperCase()+e.slice(1):e}function u(e,t){if(o.isWindows||!e||!t)return e;let n=h.original===t?h.normalized:void 0;return n||(n=`${r.rtrim(t,i.posix.sep)}${i.posix.sep}`,h={original:t,normalized:n}),(o.isLinux?r.startsWith(e,n):r.startsWithIgnoreCase(e,n))&&(e=`~/${e.substr(n.length)}`),e}Object.defineProperty(t,"__esModule",{value:!0}),t.getPathLabel=function(e,t,h){if("string"==typeof e&&(e=n.URI.file(e)),h){const t=h.getWorkspaceFolder(e);if(t){const n=h.getWorkspace().folders.length>1;let s;if(s=a.isEqual(t.uri,e)?"":i.normalize(r.ltrim(e.path.substr(t.uri.path.length),i.posix.sep)),n){
const e=t&&t.name?t.name:a.basename(t.uri);s=s?e+" • "+s:e}return s}}if(e.scheme!==s.Schemas.file&&e.scheme!==s.Schemas.untitled)return e.with({query:null,fragment:null}).toString(!0);if(l(e.fsPath))return i.normalize(c(e.fsPath));let d=i.normalize(e.fsPath);return!o.isWindows&&t&&(d=u(d,t.userHome)),d},t.getBaseLabel=function(e){if(!e)return;"string"==typeof e&&(e=n.URI.file(e));const t=a.basename(e)||(e.scheme===s.Schemas.file?e.fsPath:e.path);return l(t)?c(t):t},t.normalizeDriveLetter=c;let h=Object.create(null);t.tildify=u,t.untildify=function(e,t){return e.replace(/^~($|\/|\\)/,`${t}$1`)};const d="…",f="\\\\",g="~";t.shorten=function(e){const t=new Array(e.length);let n=!1;for(let s=0;s<e.length;s++){let o=e[s];if(""===o){t[s]=`.${i.sep}`;continue}if(!o){t[s]=o;continue}n=!0;let a="";0===o.indexOf(f)?(a=o.substr(0,o.indexOf(f)+f.length),o=o.substr(o.indexOf(f)+f.length)):0===o.indexOf(i.sep)?(a=o.substr(0,o.indexOf(i.sep)+i.sep.length),
o=o.substr(o.indexOf(i.sep)+i.sep.length)):0===o.indexOf(g)&&(a=o.substr(0,o.indexOf(g)+g.length),o=o.substr(o.indexOf(g)+g.length));const l=o.split(i.sep);for(let o=1;n&&o<=l.length;o++)for(let c=l.length-o;n&&c>=0;c--){n=!1;let u=l.slice(c,c+o).join(i.sep);for(let t=0;!n&&t<e.length;t++)if(t!==s&&e[t]&&e[t].indexOf(u)>-1){const s=c+o===l.length,a=c>0&&e[t].indexOf(i.sep)>-1?i.sep+u:u,h=r.endsWith(e[t],a);n=!s||h}if(!n){let e="";(r.endsWith(l[0],":")||""!==a)&&(1===c&&(c=0,o++,u=l[0]+i.sep+u),c>0&&(e=l[0]+i.sep),e=a+e),c>0&&(e=e+d+i.sep),e+=u,c+o<l.length&&(e=e+i.sep+d),t[s]=e}}n&&(t[s]=o)}return t};var p;!function(e){e[e.TEXT=0]="TEXT",e[e.VARIABLE=1]="VARIABLE",e[e.SEPARATOR=2]="SEPARATOR"}(p||(p={})),t.template=function(e,t=Object.create(null)){const n=[];let i=!1,r="";for(const s of e)if("$"===s||i&&"{"===s)r&&n.push({value:r,type:p.TEXT}),r="",i=!0;else if("}"===s&&i){const e=t[r];if("string"==typeof e)e.length&&n.push({value:e,type:p.VARIABLE});else if(e){const t=n[n.length-1]
;t&&t.type===p.SEPARATOR||n.push({value:e.label,type:p.SEPARATOR})}r="",i=!1}else r+=s;return r&&!i&&n.push({value:r,type:p.TEXT}),n.filter((e,t)=>e.type!==p.SEPARATOR||[n[t-1],n[t+1]].every(e=>e&&(e.type===p.VARIABLE||e.type===p.TEXT)&&e.value.length>0)).map(e=>e.value).join("")},t.mnemonicMenuLabel=function(e,t){return o.isMacintosh||t?e.replace(/\(&&\w\)|&&/g,"").replace(/&/g,o.isMacintosh?"&":"&&"):e.replace(/&&|&/g,e=>"&"===e?"&&":"&")},t.mnemonicButtonLabel=function(e){return o.isMacintosh?e.replace(/\(&&\w\)|&&/g,""):o.isWindows?e.replace(/&&|&/g,e=>"&"===e?"&&":"&"):e.replace(/&&/g,"_")},t.unmnemonicLabel=function(e){return e.replace(/&/g,"&&")}}),define(e[67],t([1,0,12]),function(e,t,n){"use strict";function i(e,t,r){if(!e||r>200)return null;if("object"==typeof e){if(e instanceof n.URI)return t.transformOutgoing(e);for(let n in e)if(Object.hasOwnProperty.call(e,n)){const s=i(e[n],t,r+1);null!==s&&(e[n]=s)}}return null}function r(e,t,i,s){if(!e||s>200)return null;if("object"==typeof e){
if(1===e.$mid)return i?n.URI.revive(t.transformIncoming(e)):t.transformIncoming(e);for(let n in e)if(Object.hasOwnProperty.call(e,n)){const o=r(e[n],t,i,s+1);null!==o&&(e[n]=o)}}return null}Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultURITransformer=new class{transformIncoming(e){return e}transformOutgoing(e){return e}transformOutgoingURI(e){return e}},t.transformOutgoingURIs=function(e,t){const n=i(e,t,0);return null===n?e:n},t.transformIncomingURIs=function(e,t){const n=r(e,t,!1,0);return null===n?e:n},t.transformAndReviveIncomingURIs=function(e,t){const n=r(e,t,!0,0);return null===n?e:n}}),define(e[28],t([1,0]),function(e,t){"use strict";function n(){return new s}function i(e){return o.test(e)}Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e){this._value=e}asHex(){return this._value}}class s extends r{constructor(){
super([s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),"-",s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),"-","4",s._randomHex(),s._randomHex(),s._randomHex(),"-",s._oneOf(s._timeHighBits),s._randomHex(),s._randomHex(),s._randomHex(),"-",s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex(),s._randomHex()].join(""))}static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return s._oneOf(s._chars)}}s._chars=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],s._timeHighBits=["8","9","a","b"],t.v4=n;const o=/^[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 r(e)},t.generateUuid=function(){return n().asHex()}}),define(e[73],t([1,0,129]),function(e,t,n){"use strict";function i(e,t,r){
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 r,"Third parameter must be a function that is called on error and success"),"function"==typeof e)try{e((e,n)=>{e?r(e,null):i(n,t,r)})}catch(e){r(e,null)}else{let n=[],i=function(s){if(s<e.length)try{t(e[s],(e,t)=>{!0!==e&&!1!==e||(t=e,e=null),e?r(e,null):(t&&n.push(t),process.nextTick(()=>{i(s+1)}))},s,e.length)}catch(e){r(e,null)}else r(null,n)};i(0)}}function r(e){!function(e){n.ok(e.length>1,"Need at least one error handler and one function to process sequence"),e.forEach(e=>{n.ok("function"==typeof e)});let t=e.splice(0,1)[0],r=null;i(e,(e,t)=>{let n=function(e,n){!0!==e&&!1!==e||(n=e,e=null),e?t(e,null):(r=n,t(null,null))};try{e.call(n,r)}catch(e){t(e,null)}},(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){
let i=new Array(e.length),r=new Array(e.length),s=!1,o=0;if(0===e.length)return n(null,[]);e.forEach((a,l)=>{t(a,(t,a)=>{if(t?(s=!0,i[l]=null,r[l]=t):(i[l]=a,r[l]=null),++o===e.length)return n(s?r:null,i)})})},t.loop=i,t.sequence=r}),define(e[76],t([1,0,24]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n.getPathFromAmdModule(e,"paths"),r=e.__$__nodeRequire(i);t.getAppDataPath=r.getAppDataPath,t.getDefaultUserDataPath=r.getDefaultUserDataPath}),define(e[78],t([1,0,79,10]),function(e,t,i,r){"use strict";function s(t,s={}){return n(this,void 0,void 0,function*(){const n=i.parse(t),o=s.proxyUrl||function(e){return"http:"===e.protocol?process.env.HTTP_PROXY||process.env.http_proxy||null:"https:"===e.protocol?process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy||null:null}(n);if(!o)return null;const a=i.parse(o);if(!/^https?:$/.test(a.protocol||""))return null;const l={host:a.hostname||"",port:Number(a.port),auth:a.auth,
rejectUnauthorized:!r.isBoolean(s.strictSSL)||s.strictSSL};return new("http:"===n.protocol?yield new Promise((t,n)=>{e(["http-proxy-agent"],t,n)}):yield new Promise((t,n)=>{e(["https-proxy-agent"],t,n)}))(l)})}Object.defineProperty(t,"__esModule",{value:!0}),t.getProxyAgent=s}),define(e[82],t([1,0,23]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readExactlyByFile=function(e,t){return new Promise((i,r)=>{n.open(e,"r",null,(e,s)=>{function o(e,t,o){n.close(s,n=>n?r(n):e&&"EISDIR"===e.code?r(e):i({buffer:t,bytesRead:o}))}function a(){n.read(s,l,c,t-c,null,(e,n)=>e?o(e,null,0):0===n?o(null,l,c):(c+=n)===t?o(null,l,c):a())}if(e)return r(e);const l=Buffer.allocUnsafe(t);let c=0;a()})})},t.readToMatchingString=function(e,t,i,r){return new Promise((s,o)=>n.open(e,"r",null,(a,l)=>{function c(e,t){n.close(l,n=>n?o(n):e&&"EISDIR"===e.code?o(e):s(t))}function u(){n.read(l,h,d,i,null,(n,i)=>{if(n)return c(n,null);if(0===i)return c(null,null);d+=i;const s=h.indexOf(t)
;return s>=0?c(null,h.toString("utf8").substr(0,s)):d>=r?c(new Error(`Could not find ${t} in first ${r} bytes of ${e}`),null):u()})}if(a)return o(a);let h=Buffer.allocUnsafe(r),d=0;u()}))}}),define(e[85],t([1,0,82,128,5,90,91]),function(e,t,n,i,r,s,o){"use strict";function a(e){return i.decodeStream(l(e))}function l(e){return e===t.UTF8_with_bom||null===e?t.UTF8:e}function c(e,n){if(!e||n<2)return null;const i=e.readUInt8(0),r=e.readUInt8(1);if(254===i&&255===r)return t.UTF16be;if(255===i&&254===r)return t.UTF16le;if(n<3)return null;const s=e.readUInt8(2);return 239===i&&187===r&&191===s?t.UTF8:null}function u(t){return new Promise((t,n)=>{e(["jschardet"],t,n)}).then(e=>{e.Constants.MINIMUM_THRESHOLD=f;const n=e.detect(t);if(!n||!n.encoding)return null;const i=n.encoding.toLowerCase();return 0<=g.indexOf(i)?null:h(n.encoding)})}function h(e){const t=e.replace(/[^a-zA-Z0-9]/g,"").toLowerCase();return p[t]||t}function d({buffer:e,bytesRead:n},i){let r=c(e,n),s=!1;if(r!==t.UTF16be&&r!==t.UTF16le&&e){
let i=!0,o=!0,a=!1;for(let t=0;t<n&&t<m;t++){const n=t%2==1,r=0===e.readInt8(t);if(r&&(a=!0),i&&(n&&!r||!n&&r)&&(i=!1),o&&(n&&r||!n&&!r)&&(o=!1),r&&!i&&!o)break}a&&(i?r=t.UTF16le:o?r=t.UTF16be:s=!0)}return i&&!s&&!r&&e?u(e.slice(0,n)).then(e=>({seemsBinary:!1,encoding:e})):{seemsBinary:s,encoding:r}}Object.defineProperty(t,"__esModule",{value:!0}),t.UTF8="utf8",t.UTF8_with_bom="utf8bom",t.UTF16be="utf16be",t.UTF16le="utf16le",t.toDecodeStream=function(e,n){return n.minBytesRequiredForDetection||(n.minBytesRequiredForDetection=n.guessEncoding?y:v),n.overwriteEncoding||(n.overwriteEncoding=(e=>e||t.UTF8)),new Promise((t,i)=>{e.on("error",i),e.pipe(new class extends o.Writable{constructor(){super(...arguments),this._buffer=[],this._bytesBuffered=0}_write(e,t,i){Buffer.isBuffer(e)||i(new Error("data must be a buffer")),this._decodeStream?this._decodeStream.write(e,i):(this._buffer.push(e),this._bytesBuffered+=e.length,
this._decodeStreamConstruction?this._decodeStreamConstruction.then(e=>i(),e=>i(e)):"number"==typeof n.minBytesRequiredForDetection&&this._bytesBuffered>=n.minBytesRequiredForDetection?this._startDecodeStream(i):i())}_startDecodeStream(e){this._decodeStreamConstruction=Promise.resolve(d({buffer:Buffer.concat(this._buffer),bytesRead:this._bytesBuffered},n.guessEncoding)).then(i=>{n.overwriteEncoding&&(i.encoding=n.overwriteEncoding(i.encoding)),this._decodeStream=a(i.encoding);for(const e of this._buffer)this._decodeStream.write(e);e(),t({detected:i,stream:this._decodeStream})},t=>{this.emit("error",t),e(t)})}_final(e){this._decodeStream?this._decodeStream.end(e):this._startDecodeStream(()=>this._decodeStream.end(e))}})})},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,l(t))},t.encode=function(e,t,n){return i.encode(e,l(t),n)},t.encodingExists=function(e){return i.encodingExists(l(e))},t.decodeStream=a,
t.encodeStream=function(e,t){return i.encodeStream(l(e),t)},t.detectEncodingByBOMFromBuffer=c,t.detectEncodingByBOM=function(e){return n.readExactlyByFile(e,3).then(({buffer:e,bytesRead:t})=>c(e,t))};const f=.2,g=["ascii","utf-8","utf-16","utf-32"];t.guessEncodingByBuffer=u;const p={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:const t=e.match(/windows(\d+)/);return t?"windows-"+t[1]:e}};const m=512,v=512,y=4096;t.detectEncodingFromBuffer=d;const _={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){let n
;const o=process.env.VSCODE_CLI_ENCODING;return o?(e&&console.log(`Found VSCODE_CLI_ENCODING variable: ${o}`),n=Promise.resolve(o)):n=r.isLinux||r.isMacintosh?new Promise(t=>{e&&console.log('Running "locale charmap" to detect terminal encoding...'),s.exec("locale charmap",(e,n,i)=>t(n))}):new Promise(t=>{e&&console.log('Running "chcp" to detect terminal encoding...'),s.exec("chcp",(e,n,i)=>{if(n){const e=Object.keys(_);for(const i of e)if(n.indexOf(i)>=0)return t(_[i])}return t(void 0)})}),n.then(n=>{if(e&&console.log(`Detected raw terminal encoding: ${n}`),!n||"utf-8"===n.toLowerCase()||n.toLowerCase()===t.UTF8)return t.UTF8;const r=h(n);return i.encodingExists(r)?r:(e&&console.log("Unsupported terminal encoding, falling back to UTF-8."),t.UTF8)})}}),define(e[37],t([1,0,23,2,16,55,5,9,28,85,73,3]),function(e,t,n,i,r,s,o,a,l,c,u,h){"use strict";function d(e){return o.isMacintosh?n.readdirSync(e).map(e=>s.normalizeNFC(e)):n.readdirSync(e)}function f(e,t){
return o.isMacintosh?n.readdir(e,(e,n)=>e?t(e,[]):t(null,n.map(e=>s.normalizeNFC(e)))):n.readdir(e,t)}function g(e,t,r,s){const o=s||Object.create(null);n.stat(e,(s,a)=>{if(s)return r(s);if(!a.isDirectory())return function(e,t,i,r){const s=n.createReadStream(e),o=n.createWriteStream(t,{mode:i});let a=!1;const l=e=>{a||(a=!0,e?r(e):n.chmod(t,i,r))};s.once("error",e=>l(e)),o.once("error",e=>l(e)),o.once("close",()=>l()),s.pipe(o)}(e,t,511&a.mode,r);if(o[e])return r(null);o[e]=!0;const l=function(){f(e,(n,s)=>{C(s,(n,r)=>{g(i.join(e,n),i.join(t,n),e=>r(e,[]),o)},r)})};p(t,511&a.mode).then(l,l)})}function p(e,t,s){const o=()=>r.nfcall(n.mkdir,e,t).then(void 0,t=>"ENOENT"===t.code?Promise.reject(t):r.nfcall(n.stat,e).then(t=>t.isDirectory()?null:Promise.reject(new Error(`'${e}' exists and is not a directory.`)),e=>Promise.reject(t)));return e===i.dirname(e)?Promise.resolve(!0):o().then(void 0,n=>s&&s.isCancellationRequested?Promise.resolve(!1):"ENOENT"===n.code?p(i.dirname(e),t).then(o):Promise.reject(n))}
function m(e,t){if("\\"===e||"/"===e)return t(new Error("Will not delete root!"));n.exists(e,r=>{r?n.lstat(e,(r,s)=>{if(r||!s)t(r);else if(!s.isDirectory()||s.isSymbolicLink()){const i=s.mode;128&i?n.unlink(e,t):n.chmod(e,128|i,i=>{i?t(i):n.unlink(e,t)})}else f(e,(r,s)=>{if(r||!s)t(r);else if(0===s.length)n.rmdir(e,t);else{let r=null,o=s.length;s.forEach(s=>{m(i.join(e,s),i=>{o--,i&&(r=r||i),0===o&&(r?t(r):n.rmdir(e,t))})})}})}):t(null)})}function v(e){try{const t=n.lstatSync(e);t.isDirectory()&&!t.isSymbolicLink()?(d(e).forEach(t=>v(i.join(e,t))),n.rmdirSync(e)):n.unlinkSync(e)}catch(e){if("ENOENT"===e.code)return;throw e}}function y(e,t,i,r){i=_(i),"string"==typeof t||Buffer.isBuffer(t)?function(e,t,i,r){i.encoding&&(t=c.encode(t,i.encoding.charset,{addBOM:i.encoding.addBOM}));if(!b)return n.writeFile(e,t,{mode:i.mode,flag:i.flag},r);n.open(e,"string"==typeof i.flag?i.flag:"r",i.mode,(e,i)=>{if(e)return r(e);n.writeFile(i,t,e=>{if(e)return n.close(i,()=>r(e))
;n.fdatasync(i,e=>(e&&(console.warn("[node.js fs] fdatasync is now disabled for this session because it failed: ",e),b=!1),n.close(i,e=>r(e))))})})}(e,t,i,r):function(e,t,i,r){let s=!1;const o=e=>{s||(s=!0,e?u?(a.once("close",()=>r(e)),a.destroy()):r(e):r())},a=n.createWriteStream(e,{mode:i.mode,flags:i.flag,autoClose:!1});let l,u;a.once("open",e=>{l=e,u=!0,i.encoding&&(t=t.pipe(c.encodeStream(i.encoding.charset,{addBOM:i.encoding.addBOM}))),t.pipe(a)}),t.once("error",e=>o(e)),a.once("error",e=>o(e)),a.once("finish",()=>{b&&u?n.fdatasync(l,e=>{e&&(console.warn("[node.js fs] fdatasync is now disabled for this session because it failed: ",e),b=!1),a.destroy()}):a.destroy()}),a.once("close",()=>o())}(e,t,i,r)}function _(e){if(!e)return{mode:438,flag:"w"};const 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(e){const t=i.dirname(e);if(e===t)return e;const n=(i.basename(e)||e).toLowerCase();try{
const e=d(t).filter(e=>e.toLowerCase()===n);if(1===e.length){const n=E(t);if(n)return i.join(n,e[0])}else if(e.length>1){const r=e.indexOf(n);if(r>=0){const n=E(t);if(n)return i.join(n,e[r])}}}catch(e){}return null}function w(e){return a.rtrim(i.normalize(e),i.sep)}Object.defineProperty(t,"__esModule",{value:!0});const C=u.loop;t.readdirSync=d,t.readdir=f,t.statLink=function(e,t){n.lstat(e,(i,r)=>{i||r.isSymbolicLink()?n.stat(e,(e,n)=>{if(e)return t(e,null);t(null,{stat:n,isSymbolicLink:r&&r.isSymbolicLink()})}):t(null,{stat:r,isSymbolicLink:!1})})},t.copy=g,t.mkdirp=p,t.del=function(e,t,r,s){n.exists(e,o=>{if(!o)return r(null);n.stat(e,(o,c)=>{if(o||!c)return r(o);if("."===e[e.length-1]||a.endsWith(e,"./")||a.endsWith(e,".\\"))return m(e,r);const u=i.join(t,l.generateUuid());n.rename(e,u,t=>{if(t)return m(e,r);r(null),m(u,e=>{e&&console.error(e),s&&s(e)})})})})},t.delSync=v,t.mv=function(e,t,i){function r(e){if(e)return i(e);n.stat(t,(e,r)=>e?i(e):r.isDirectory()?i(null):void n.open(t,"a",null,(e,t)=>{
if(e)return i(e);n.futimes(t,r.atime,new Date,e=>{if(e)return i(e);n.close(t,i)})}))}if(e===t)return i(null);n.rename(e,t,n=>n?n&&e.toLowerCase()!==t.toLowerCase()&&"EXDEV"===n.code||a.endsWith(e,".")?g(e,t,t=>{if(t)return i(t);m(e,r)}):i(n):r(null))};let b=!0;t.writeFileAndFlush=y,t.writeFileAndFlushSync=function(e,t,i){if((i=_(i)).encoding&&(t=c.encode(t,i.encoding.charset,{addBOM:i.encoding.addBOM})),!b)return n.writeFileSync(e,t,{mode:i.mode,flag:i.flag});const r=n.openSync(e,"string"==typeof i.flag?i.flag:"r",i.mode);try{n.writeFileSync(r,t);try{n.fdatasyncSync(r)}catch(e){console.warn("[node.js fs] fdatasyncSync is now disabled for this session because it failed: ",e),b=!1}}finally{n.closeSync(r)}},t.realcaseSync=E,t.realpathSync=function(e){try{return n.realpathSync(e)}catch(t){const i=w(e);return n.accessSync(i,n.constants.R_OK),i}},t.realpath=function(e,t){return n.realpath(e,(i,r)=>{if(!i)return t(null,r);const s=w(e);return n.access(s,n.constants.R_OK,e=>t(e,s))})},t.watch=function(e,t,i){try{
const r=n.watch(e);return r.on("change",(e,n)=>{let i;n&&(i=n.toString(),o.isMacintosh&&(i=s.normalizeNFC(i))),t(e,i)}),r.on("error",(t,n)=>i(`Failed to watch ${e} for changes (${t}, ${n})`)),h.toDisposable(()=>{r.removeAllListeners(),r.close()})}catch(t){n.exists(e,n=>{n&&i(`Failed to watch ${e} for changes (${t.toString()})`)})}return h.Disposable.None},t.sanitizeFilePath=function(e,t){return o.isWindows&&a.endsWith(e,":")&&(e+=i.sep),i.isAbsolute(e)||(e=i.join(t,e)),e=i.normalize(e),o.isWindows?(e=a.rtrim(e,i.sep),a.endsWith(e,":")&&(e+=i.sep)):(e=a.rtrim(e,i.sep))||(e=i.sep),e}}),define(e[100],t([1,0,23,2,11,3,4,31,37,5]),function(e,t,n,i,r,s,o,a,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class u{constructor(e,t={defaultConfig:Object.create(null),onError:e=>console.error(e)}){this._path=e,this.options=t,this.disposables=[],this.configName=i.basename(this._path),this._onDidUpdateConfiguration=new o.Emitter,this.disposables.push(this._onDidUpdateConfiguration),this.registerWatcher(),
this.initAsync()}get path(){return this._path}get hasParseErrors(){return this.parseErrors&&this.parseErrors.length>0}get onDidUpdateConfiguration(){return this._onDidUpdateConfiguration.event}initAsync(){this.loadAsync(e=>{this.loaded||this.updateCache(e),this.options.initCallback&&this.options.initCallback(this.getConfig())})}updateCache(e){this.cache=e,this.loaded=!0}loadSync(){try{return this.parse(n.readFileSync(this._path).toString())}catch(e){return this.options.defaultConfig}}loadAsync(e){n.readFile(this._path,(t,n)=>e(t?this.options.defaultConfig:this.parse(n.toString())))}parse(e){let t;try{return this.parseErrors=[],(t=this.options.parse?this.options.parse(e,this.parseErrors):a.parse(e,this.parseErrors))||this.options.defaultConfig}catch(e){return this.options.defaultConfig}}registerWatcher(){const e=i.dirname(this._path);this.watch(e,!0),n.lstat(this._path,(e,t)=>{e||t.isDirectory()||t.isSymbolicLink()&&n.readlink(this._path,(e,t)=>{e||this.watch(t,!1)})})}watch(e,t){
this.disposed||this.disposables.push(l.watch(e,(e,n)=>this.onConfigFileChange(e,n,t),e=>this.options.onError(e)))}onConfigFileChange(e,t,n){n&&(c.isWindows&&t&&t!==this.configName&&(t=i.basename(t)),t!==this.configName)||(this.timeoutHandle&&(global.clearTimeout(this.timeoutHandle),this.timeoutHandle=null),this.timeoutHandle=global.setTimeout(()=>this.reload(),this.options.changeBufferDelay||0))}reload(e){this.loadAsync(t=>{if(r.equals(t,this.cache)||(this.updateCache(t),this._onDidUpdateConfiguration.fire({config:this.cache})),e)return e(t)})}getConfig(){return this.ensureLoaded(),this.cache}ensureLoaded(){this.loaded||this.updateCache(this.loadSync())}dispose(){this.disposed=!0,this.disposables=s.dispose(this.disposables)}}t.ConfigWatcher=u}),define(e[8],t([1,0,37,2,16,23,32,5,4]),function(e,t,n,i,r,s,o,a,l){"use strict";function c(e){return r.nfcall(n.readdir,e)}function u(e){
return d(e).then(t=>t.isDirectory()&&!t.isSymbolicLink()?c(e).then(t=>Promise.all(t.map(t=>u(i.join(e,t))))).then(()=>f(e)):g(e),e=>{if("ENOENT"!==e.code)return Promise.reject(e)})}function h(e){return r.nfcall(s.stat,e)}function d(e){return r.nfcall(s.lstat,e)}function f(e){return r.nfcall(s.rmdir,e)}function g(e){return r.nfcall(s.unlink,e)}function p(e,t,i){return function(e){let t=y[e];if(!t){t=new r.Queue,y[e]=t;l.Event.once(t.onFinished)(()=>{delete y[e],t.dispose()})}return t}(function(e){let t=e;(a.isWindows||a.isMacintosh)&&(t=t.toLowerCase());return t}(e)).queue(()=>r.nfcall(n.writeFileAndFlush,e,t,i))}function m(e){return h(e).then(e=>e.isDirectory(),()=>!1)}function v(e,t=(_||(_=o.tmpdir()),_)){return r.nfcall(n.del,e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.readdir=c,t.exists=function(e){return new Promise(t=>s.exists(e,t))},t.chmod=function(e,t){return r.nfcall(s.chmod,e,t)},t.mkdirp=n.mkdirp,t.rimraf=u,t.realpath=function(e){return r.nfcall(n.realpath,e)},t.stat=h,
t.statLink=function(e){return r.nfcall(n.statLink,e)},t.lstat=d,t.rename=function(e,t){return r.nfcall(s.rename,e,t)},t.renameIgnoreError=function(e,t){return new Promise(n=>{s.rename(e,t,()=>n())})},t.rmdir=f,t.unlink=g,t.symlink=function(e,t,n){return r.nfcall(s.symlink,e,t,n)},t.readlink=function(e){return r.nfcall(s.readlink,e)},t.truncate=function(e,t){return r.nfcall(s.truncate,e,t)},t.readFile=function(e,t){return r.nfcall(s.readFile,e,t)};const y=Object.create(null);t.writeFile=p,t.readDirsInDir=function(e){return c(e).then(t=>Promise.all(t.map(t=>m(i.join(e,t)))).then(e=>t.filter((t,n)=>e[n])))},t.dirExists=m,t.fileExists=function(e){return h(e).then(e=>e.isFile(),()=>!1)};let _=null;t.del=v,t.whenDeleted=function(e){return new Promise(t=>{let n=!1;const i=setInterval(()=>{n||(n=!0,s.exists(e,e=>{n=!1,e||(clearInterval(i),t(void 0))}))},1e3)})},t.copy=function(e,t){return r.nfcall(n.copy,e,t)}}),define(e[48],t([1,0,3,4,16,30,7]),function(e,t,i,r,s,o,a){"use strict";function l(e){
const t=Buffer.allocUnsafe(4);return t.writeUInt32BE(e,0),t}function c(e){return e.read(4).readUInt32BE(0)}function u(e,t){if(void 0===t)e.write(v.Undefined);else if("string"==typeof t){const n=Buffer.from(t);e.write(v.String),e.write(l(n.length)),e.write(n)}else if(Buffer.isBuffer(t))e.write(v.Buffer),e.write(l(t.length)),e.write(t);else if(Array.isArray(t)){e.write(v.Array),e.write(l(t.length));for(const n of t)u(e,n)}else{const n=Buffer.from(JSON.stringify(t));e.write(v.Object),e.write(l(n.length)),e.write(n)}}function h(e){switch(e.read(1).readUInt8(0)){case m.Undefined:return;case m.String:return e.read(c(e)).toString();case m.Buffer:return e.read(c(e));case m.Array:{const t=c(e),n=[];for(let i=0;i<t;i++)n.push(h(e));return n}case m.Object:return JSON.parse(e.read(c(e)).toString())}}function d(e){return{call:(t,n,i)=>e.then(e=>e.call(t,n,i)),listen(t,n){const i=new r.Relay;return e.then(e=>i.input=e.listen(t,n)),i.event}}}Object.defineProperty(t,"__esModule",{value:!0});!function(e){
e[e.Promise=100]="Promise",e[e.PromiseCancel=101]="PromiseCancel",e[e.EventListen=102]="EventListen",e[e.EventDispose=103]="EventDispose"}(t.RequestType||(t.RequestType={}));!function(e){e[e.Initialize=200]="Initialize",e[e.PromiseSuccess=201]="PromiseSuccess",e[e.PromiseError=202]="PromiseError",e[e.PromiseErrorObj=203]="PromiseErrorObj",e[e.EventFire=204]="EventFire"}(t.ResponseType||(t.ResponseType={}));var f;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Idle=1]="Idle"}(f||(f={}));class g{constructor(e){this.buffer=e,this.pos=0}read(e){const t=this.buffer.slice(this.pos,this.pos+e);return this.pos+=t.length,t}}class p{constructor(){this.buffers=[]}get buffer(){return Buffer.concat(this.buffers)}write(e){this.buffers.push(e)}}var m;!function(e){e[e.Undefined=0]="Undefined",e[e.String=1]="String",e[e.Buffer=2]="Buffer",e[e.Array=3]="Array",e[e.Object=4]="Object"}(m||(m={}));const v={Undefined:Buffer.alloc(1,m.Undefined),String:Buffer.alloc(1,m.String),Buffer:Buffer.alloc(1,m.Buffer),
Array:Buffer.alloc(1,m.Array),Object:Buffer.alloc(1,m.Object)};class y{constructor(e,t){this.protocol=e,this.ctx=t,this.channels=new Map,this.activeRequests=new Map,this.protocolListener=this.protocol.onMessage(e=>this.onRawMessage(e)),this.sendResponse({type:200})}registerChannel(e,t){this.channels.set(e,t)}sendResponse(e){switch(e.type){case 200:return this.send([e.type]);case 201:case 202:case 204:case 203:return this.send([e.type,e.id],e.data)}}send(e,t){const n=new p;u(n,e),u(n,t),this.sendBuffer(n.buffer)}sendBuffer(e){try{this.protocol.send(e)}catch(e){}}onRawMessage(e){const t=new g(e),n=h(t),i=h(t),r=n[0];switch(r){case 100:return this.onPromise({type:r,id:n[1],channelName:n[2],name:n[3],arg:i});case 102:return this.onEventListen({type:r,id:n[1],channelName:n[2],name:n[3],arg:i});case 101:case 103:return this.disposeActiveRequest({type:r,id:n[1]})}}onPromise(e){const t=this.channels.get(e.channelName);if(!t)throw new Error("Unknown channel");const n=new o.CancellationTokenSource;let r;try{
r=t.call(this.ctx,e.name,e.arg,n.token)}catch(e){r=Promise.reject(e)}const s=e.id;r.then(t=>{this.sendResponse({id:s,data:t,type:201}),this.activeRequests.delete(e.id)},t=>{t instanceof Error?this.sendResponse({id:s,data:{message:t.message,name:t.name,stack:t.stack?t.stack.split?t.stack.split("\n"):t.stack:void 0},type:202}):this.sendResponse({id:s,data:t,type:203}),this.activeRequests.delete(e.id)});const a=i.toDisposable(()=>n.cancel());this.activeRequests.set(e.id,a)}onEventListen(e){const t=this.channels.get(e.channelName);if(!t)throw new Error("Unknown channel");const n=e.id,i=t.listen(this.ctx,e.name,e.arg)(e=>this.sendResponse({id:n,data:e,type:204}));this.activeRequests.set(e.id,i)}disposeActiveRequest(e){const t=this.activeRequests.get(e.id);t&&(t.dispose(),this.activeRequests.delete(e.id))}dispose(){this.protocolListener&&(this.protocolListener.dispose(),this.protocolListener=null),this.activeRequests.forEach(e=>e.dispose()),this.activeRequests.clear()}}t.ChannelServer=y;class _{constructor(e){
this.protocol=e,this.state=f.Uninitialized,this.activeRequests=new Set,this.handlers=new Map,this.lastRequestId=0,this._onDidInitialize=new r.Emitter,this.onDidInitialize=this._onDidInitialize.event,this.protocolListener=this.protocol.onMessage(e=>this.onBuffer(e))}getChannel(e){const t=this;return{call:(n,i,r)=>t.requestPromise(e,n,i,r),listen:(n,i)=>t.requestEvent(e,n,i)}}requestPromise(e,t,n,r=o.CancellationToken.None){const l=this.lastRequestId++,c={id:l,type:100,channelName:e,name:t,arg:n};if(r.isCancellationRequested)return Promise.reject(a.canceled());let u;return new Promise((e,t)=>{if(r.isCancellationRequested)return t(a.canceled());let n=s.createCancelablePromise(e=>this.whenInitialized());n.then(()=>{n=null;this.handlers.set(l,n=>{switch(n.type){case 201:this.handlers.delete(l),e(n.data);break;case 202:this.handlers.delete(l);const i=new Error(n.data.message);i.stack=n.data.stack,i.name=n.data.name,t(i);break;case 203:this.handlers.delete(l),t(n.data)}}),this.sendRequest(c)});const o=()=>{
n?(n.cancel(),n=null):this.sendRequest({id:l,type:101}),t(a.canceled())},h=r.onCancellationRequested(o);u=i.combinedDisposable([i.toDisposable(o),h]),this.activeRequests.add(u)}).finally(()=>this.activeRequests.delete(u))}requestEvent(e,t,n){const i=this.lastRequestId++,o={id:i,type:102,channelName:e,name:t,arg:n};let a=null;const l=new r.Emitter({onFirstListenerAdd:()=>{(a=s.createCancelablePromise(e=>this.whenInitialized())).then(()=>{a=null,this.activeRequests.add(l),this.sendRequest(o)})},onLastListenerRemove:()=>{a?(a.cancel(),a=null):(this.activeRequests.delete(l),this.sendRequest({id:i,type:103}))}});return this.handlers.set(i,e=>l.fire(e.data)),l.event}sendRequest(e){switch(e.type){case 100:case 102:return this.send([e.type,e.id,e.channelName,e.name],e.arg);case 101:case 103:return this.send([e.type,e.id])}}send(e,t){const n=new p;u(n,e),u(n,t),this.sendBuffer(n.buffer)}sendBuffer(e){try{this.protocol.send(e)}catch(e){}}onBuffer(e){const t=new g(e),n=h(t),i=h(t);switch(n[0]){case 200:
return this.onResponse({type:n[0]});case 201:case 202:case 204:case 203:return this.onResponse({type:n[0],id:n[1],data:i})}}onResponse(e){if(200===e.type)return this.state=f.Idle,void this._onDidInitialize.fire();const t=this.handlers.get(e.id);t&&t(e)}whenInitialized(){return this.state===f.Idle?Promise.resolve():r.Event.toPromise(this.onDidInitialize)}dispose(){this.protocolListener&&(this.protocolListener.dispose(),this.protocolListener=null),this.activeRequests.forEach(e=>e.dispose()),this.activeRequests.clear()}}t.ChannelClient=_;class E{constructor(e){this.channels=new Map,this._connections=new Set,this._onDidChangeConnections=new r.Emitter,this.onDidChangeConnections=this._onDidChangeConnections.event,e(({protocol:e,onDidClientDisconnect:t})=>{r.Event.once(e.onMessage)(n=>{const i=h(new g(n)),r=new y(e,i),s=new _(e);this.channels.forEach((e,t)=>r.registerChannel(t,e));const o={channelClient:s,ctx:i};this._connections.add(o),this._onDidChangeConnections.fire(o),t(()=>{r.dispose(),s.dispose(),
this._connections.delete(o)})})})}get connections(){const e=[];return this._connections.forEach(t=>e.push(t)),e}getChannel(e,t){const n=this;return{call:(i,r,s)=>d(t.routeCall(n,i,r).then(t=>t.channelClient.getChannel(e))).call(i,r,s),listen:(i,r)=>d(t.routeEvent(n,i,r).then(t=>t.channelClient.getChannel(e))).listen(i,r)}}registerChannel(e,t){this.channels.set(e,t)}dispose(){this.channels.clear(),this._connections.clear(),this._onDidChangeConnections.dispose()}}t.IPCServer=E;class w{constructor(e,t){const n=new p;u(n,t),e.send(n.buffer),this.channelClient=new _(e),this.channelServer=new y(e,t)}getChannel(e){return this.channelClient.getChannel(e)}registerChannel(e,t){this.channelServer.registerChannel(e,t)}dispose(){this.channelClient.dispose(),this.channelServer.dispose()}}t.IPCClient=w,t.getDelayedChannel=d,t.getNextTickChannel=function(e){let t=!1;return{call:(n,i,r)=>t?e.call(n,i,r):s.timeout(0).then(()=>t=!0).then(()=>e.call(n,i,r)),listen(n,i){if(t)return e.listen(n,i);const o=new r.Relay
;return s.timeout(0).then(()=>t=!0).then(()=>o.input=e.listen(n,i)),o.event}}};class C{constructor(e){this.fn=e}routeCall(e){return this.route(e)}routeEvent(e){return this.route(e)}route(e){return n(this,void 0,void 0,function*(){for(const t of e.connections)if(yield Promise.resolve(this.fn(t.ctx)))return Promise.resolve(t);return yield r.Event.toPromise(e.onDidChangeConnections),yield this.route(e)})}}t.StaticRouter=C}),define(e[107],t([1,0,127,4,48,2,32,28,16]),function(e,t,n,i,r,s,o,a,l){"use strict";function c(e){let t,n=!1,r=!1,s=[];const o=()=>{if(!r){for(r=!0;n&&s.length>0;)t.fire(s.shift());r=!1}};return e(e=>{s.push(e),o()}),(t=new i.Emitter({onFirstListenerAdd:()=>{n=!0,process.nextTick(o)},onLastListenerRemove:()=>{n=!1}})).event}Object.defineProperty(t,"__esModule",{value:!0}),t.generateRandomPipeName=function(){const e=a.generateUuid();return"win32"===process.platform?`\\\\.\\pipe\\vscode-ipc-${e}-sock`:s.join(o.tmpdir(),`vscode-ipc-${e}.sock`)};class u{constructor(e,t){this._socket=e,
this._onMessage=new i.Emitter,this.onMessage=this._onMessage.event,this._onClose=new i.Emitter,this.onClose=this._onClose.event,this._writeBuffer=new class{constructor(){this._data=[],this._totalLength=0}add(e,t){const n=0===this._totalLength;return this._data.push(e,t),this._totalLength+=e.length+t.length,n}take(){const e=Buffer.concat(this._data,this._totalLength);return this._data.length=0,this._totalLength=0,e}},this._isDisposed=!1,this._chunks=[];let n=0;const r={readHead:!0,bodyLen:-1},s=e=>{for(this._chunks.push(e),n+=e.length;n>0;){if(r.readHead){if(!(n>=u._headerLen))break;{const e=Buffer.concat(this._chunks);r.bodyLen=e.readUInt32BE(0),r.readHead=!1;const t=e.slice(u._headerLen);n=t.length,this._chunks=[t]}}if(!r.readHead){if(!(n>=r.bodyLen))break;{const e=Buffer.concat(this._chunks),t=e.slice(0,r.bodyLen),i=e.slice(r.bodyLen);if(n=i.length,this._chunks=[i],r.bodyLen=-1,r.readHead=!0,this._onMessage.fire(t),this._isDisposed)break}}}},o=()=>{if(t&&t.length>0){let e=t;t=void 0,s(e)}}
;this._firstChunkTimer=new l.TimeoutTimer,this._firstChunkTimer.setIfNotSet(()=>{o()},0),this._socketDataListener=(e=>{o(),s(e)}),e.on("data",this._socketDataListener),this._socketEndListener=(()=>{o()}),e.on("end",this._socketEndListener),this._socketCloseListener=(()=>{this._onClose.fire()}),e.once("close",this._socketCloseListener)}dispose(){this._isDisposed=!0,this._firstChunkTimer.dispose(),this._socket.removeListener("data",this._socketDataListener),this._socket.removeListener("end",this._socketEndListener),this._socket.removeListener("close",this._socketCloseListener)}end(){this._socket.end()}getBuffer(){return Buffer.concat(this._chunks)}send(e){const t=Buffer.allocUnsafe(u._headerLen);t.writeUInt32BE(e.length,0,!0),this._writeSoon(t,e)}_writeSoon(e,t){this._writeBuffer.add(e,t)&&setImmediate(()=>{this._socket.destroyed||this._socket.write(this._writeBuffer.take())})}}u._headerLen=4,t.Protocol=u;class h extends r.IPCServer{static toClientConnectionEvent(e){
const t=i.Event.fromNodeEventEmitter(e,"connection");return i.Event.map(t,e=>({protocol:new u(e),onDidClientDisconnect:i.Event.once(i.Event.fromNodeEventEmitter(e,"close"))}))}constructor(e){super(h.toClientConnectionEvent(e)),this.server=e}dispose(){super.dispose(),this.server&&(this.server.close(),this.server=null)}}t.Server=h;class d extends r.IPCClient{constructor(e,t){super(e,t),this.protocol=e}static fromSocket(e,t){return new d(new u(e),t)}get onClose(){return this.protocol.onClose}dispose(){super.dispose(),this.protocol.end()}}t.Client=d,t.serve=function(e){return new Promise((t,i)=>{const r=n.createServer();r.on("error",i),r.listen(e,()=>{r.removeListener("error",i),t(new h(r))})})},t.connect=function(e,t){return new Promise((i,r)=>{const s=n.createConnection(e,()=>{s.removeListener("error",r),i(d.fromSocket(s,t))});s.once("error",r)})};class f{constructor(e){this._actual=e,this.onMessage=c(this._actual.onMessage),this.onClose=c(this._actual.onClose)}send(e){this._actual.send(e)}end(){
this._actual.end()}}t.BufferedProtocol=f}),define(e[118],t([14,13]),function(e,t){return e.create("vs/base/common/errorMessage",t)}),define(e[40],t([1,0,118,10,18]),function(e,t,n,i,r){"use strict";function s(e,t){return e.message?t&&(e.stack||e.stacktrace)?n.localize(0,null,o(e),e.stack||e.stacktrace):o(e):n.localize(1,null)}function o(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=null,t=!1){if(!e)return n.localize(3,null);if(Array.isArray(e)){const i=r.coalesce(e),s=a(i[0],t);return i.length>1?n.localize(4,null,s,i.length):s}if(i.isString(e))return e;if(e.detail){const n=e.detail;if(n.error)return s(n.error,t);if(n.exception)return s(n.exception,t)}return e.stack?s(e,t):e.message?e.message:n.localize(5,null)}Object.defineProperty(t,"__esModule",{value:!0}),t.toErrorMessage=a}),define(e[57],t([14,13]),function(e,t){return e.create("vs/base/node/zip",t)}),define(e[58],t([14,13]),function(e,t){
return e.create("vs/platform/configuration/common/configurationRegistry",t)}),define(e[59],t([14,13]),function(e,t){return e.create("vs/platform/dialogs/common/dialogs",t)}),define(e[60],t([14,13]),function(e,t){return e.create("vs/platform/extensionManagement/common/extensionManagement",t)}),define(e[61],t([14,13]),function(e,t){return e.create("vs/platform/extensionManagement/node/extensionManagementService",t)}),define(e[62],t([14,13]),function(e,t){return e.create("vs/platform/extensionManagement/node/extensionManagementUtil",t)}),define(e[63],t([14,13]),function(e,t){return e.create("vs/platform/extensions/node/extensionValidator",t)}),define(e[64],t([14,13]),function(e,t){return e.create("vs/platform/request/node/request",t)}),define(e[65],t([14,13]),function(e,t){return e.create("vs/platform/telemetry/common/telemetryService",t)}),define(e[54],t([14,13]),function(e,t){return e.create("vs/platform/workspaces/common/workspaces",t)}),define(e[27],t([1,0,9]),function(e,t,n){"use strict";function i(e,t){
return e.uuid&&t.uuid?e.uuid===t.uuid:e.id===t.id||0===n.compareIgnoreCase(e.id,t.id)}Object.defineProperty(t,"__esModule",{value:!0}),t.areSameExtensions=i,t.adoptToGalleryExtensionId=function(e){return e.toLocaleLowerCase()},t.getGalleryExtensionId=function(e,t){return`${e.toLocaleLowerCase()}.${t.toLocaleLowerCase()}`},t.groupByExtension=function(e,t){const n=[],r=e=>{for(const r of n)if(r.some(n=>i(t(n),t(e))))return r;return null};for(const t of e){const e=r(t);e?e.push(t):n.push([t])}return n},t.getLocalExtensionTelemetryData=function(e){return{id:e.identifier.id,name:e.manifest.name,galleryId:null,publisherId:e.metadata?e.metadata.publisherId:null,publisherName:e.manifest.publisher,publisherDisplayName:e.metadata?e.metadata.publisherDisplayName:null,dependencies:e.manifest.extensionDependencies&&e.manifest.extensionDependencies.length>0}},t.getGalleryExtensionTelemetryData=function(e){return Object.assign({id:e.identifier.id,name:e.name,galleryId:e.identifier.uuid,publisherId:e.publisherId,
publisherName:e.publisher,publisherDisplayName:e.publisherDisplayName,dependencies:!!(e.properties.dependencies&&e.properties.dependencies.length>0)},e.telemetryData)},t.BetterMergeId="pprice.better-merge",t.getMaliciousExtensionsSet=function(e){const t=new Set;for(const n of e)n.malicious&&t.add(n.id.id);return t}}),define(e[68],t([1,0,11]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=/^%([\w\d.-]+)%$/i;t.localizeManifest=function(e,t){return n.cloneAndChange(e,e=>{if("string"!=typeof e)return;const n=i.exec(e);return n?t[n[1]]||e:void 0})}}),define(e[69],t([1,0,3,90,40,2,16,4,20,8]),function(e,t,i,r,s,o,a,l,c,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class h extends i.Disposable{constructor(e,t){super(),this.environmentService=e,this.logService=t,this.processesLimiter=new a.Limiter(5)}postUninstall(e){return n(this,void 0,void 0,function*(){const t=this.parseScript(e,"uninstall")
;return t&&(this.logService.info(e.identifier.id,e.manifest.version,"Running post uninstall script"),yield this.processesLimiter.queue(()=>this.runLifecycleHook(t.script,"uninstall",t.args,!0,e).then(()=>this.logService.info(e.identifier.id,e.manifest.version,"Finished running post uninstall script"),t=>this.logService.error(e.identifier.id,e.manifest.version,`Failed to run post uninstall script: ${t}`)))),u.rimraf(this.getExtensionStoragePath(e)).then(void 0,e=>this.logService.error("Error while removing extension storage path",e))})}parseScript(e,t){const n=`vscode:${t}`;if(e.location.scheme===c.Schemas.file&&e.manifest&&e.manifest.scripts&&"string"==typeof e.manifest.scripts[n]){const t=e.manifest.scripts[n].split(" ");return t.length<2||"node"!==t[0]||!t[1]?(this.logService.warn(e.identifier.id,e.manifest.version,`${n} should be a node script`),null):{script:o.join(e.location.fsPath,t[1]),args:t.slice(2)||[]}}return null}runLifecycleHook(e,t,n,i,r){return new Promise((o,a)=>{const l=this.start(e,t,n,r)
;let c;const u=e=>{c&&(clearTimeout(c),c=null),e?a(e):o(void 0)};l.on("error",e=>{u(s.toErrorMessage(e)||"Unknown")}),l.on("exit",(e,n)=>{u(e?`post-${t} process exited with code ${e}`:void 0)}),i&&(c=setTimeout(()=>{c=null,l.kill(),a("timed out")},5e3))})}start(e,t,n,i){const s={silent:!0,execArgv:void 0},o=r.fork(e,[`--type=extension-post-${t}`,...n],s);o.stdout.setEncoding("utf8"),o.stderr.setEncoding("utf8");const a=l.Event.fromNodeEventEmitter(o.stdout,"data"),c=l.Event.fromNodeEventEmitter(o.stderr,"data");a(e=>this.logService.info(i.identifier.id,i.manifest.version,`post-${t}`,e)),c(e=>this.logService.error(i.identifier.id,i.manifest.version,`post-${t}`,e));const u=l.Event.any(l.Event.map(a,e=>({data:`%c${e}`,format:[""]})),l.Event.map(c,e=>({data:`%c${e}`,format:["color: red"]})));return l.Event.debounce(u,(e,t)=>e?{data:e.data+t.data,format:[...e.format,...t.format]}:{data:t.data,format:t.format},100)(e=>{console.group(i.identifier.id),console.log(e.data,...e.format),console.groupEnd()}),o}
getExtensionStoragePath(e){return o.join(this.environmentService.globalStorageHome,e.identifier.id.toLowerCase())}}t.ExtensionsLifecycle=h}),define(e[70],t([1,0,4,12,67,11]),function(e,t,n,i,r,s){"use strict";function o(e,t){return i.URI.revive(t?t.transformIncoming(e):e)}function a(e,t){t=t||r.DefaultURITransformer;const n=e.manifest,i=r.transformAndReviveIncomingURIs(Object.assign({},e,{manifest:void 0}),t);return Object.assign({},i,{manifest:n})}function l(e,t){return t?s.cloneAndChange(e,e=>e instanceof i.URI?t.transformOutgoingURI(e):void 0):e}Object.defineProperty(t,"__esModule",{value:!0});class c{constructor(e,t){this.service=e,this.getUriTransformer=t,this.onInstallExtension=n.Event.buffer(e.onInstallExtension,!0),this.onDidInstallExtension=n.Event.buffer(e.onDidInstallExtension,!0),this.onUninstallExtension=n.Event.buffer(e.onUninstallExtension,!0),this.onDidUninstallExtension=n.Event.buffer(e.onDidUninstallExtension,!0)}listen(e,t){const i=this.getUriTransformer(e);switch(t){
case"onInstallExtension":return this.onInstallExtension;case"onDidInstallExtension":return n.Event.map(this.onDidInstallExtension,e=>Object.assign({},e,{local:e.local?l(e.local,i):e.local}));case"onUninstallExtension":return this.onUninstallExtension;case"onDidUninstallExtension":return this.onDidUninstallExtension}throw new Error("Invalid listen")}call(e,t,n){const i=this.getUriTransformer(e);switch(t){case"zip":return this.service.zip(a(n[0],i)).then(e=>(function(e,t){return t?t.transformOutgoingURI(e):e})(e,i));case"unzip":return this.service.unzip(o(n[0],i),n[1]);case"install":return this.service.install(o(n[0],i));case"installFromGallery":return this.service.installFromGallery(n[0]);case"uninstall":return this.service.uninstall(a(n[0],i),n[1]);case"reinstallFromGallery":return this.service.reinstallFromGallery(a(n[0],i));case"getInstalled":return this.service.getInstalled(n[0]).then(e=>e.map(e=>l(e,i)));case"updateMetadata":return this.service.updateMetadata(a(n[0],i),n[1]).then(e=>l(e,i))
;case"getExtensionsReport":return this.service.getExtensionsReport()}throw new Error("Invalid call")}}t.ExtensionManagementChannel=c;class u{constructor(e){this.channel=e}get onInstallExtension(){return this.channel.listen("onInstallExtension")}get onDidInstallExtension(){return n.Event.map(this.channel.listen("onDidInstallExtension"),e=>Object.assign({},e,{local:e.local?a(e.local,null):e.local}))}get onUninstallExtension(){return this.channel.listen("onUninstallExtension")}get onDidUninstallExtension(){return this.channel.listen("onDidUninstallExtension")}zip(e){return Promise.resolve(this.channel.call("zip",[e]).then(e=>i.URI.revive(e)))}unzip(e,t){return Promise.resolve(this.channel.call("unzip",[e,t]))}install(e){return Promise.resolve(this.channel.call("install",[e]))}installFromGallery(e){return Promise.resolve(this.channel.call("installFromGallery",[e]))}uninstall(e,t=!1){return Promise.resolve(this.channel.call("uninstall",[e,t]))}reinstallFromGallery(e){
return Promise.resolve(this.channel.call("reinstallFromGallery",[e]))}getInstalled(e=null){return Promise.resolve(this.channel.call("getInstalled",[e])).then(e=>e.map(e=>a(e,null)))}updateMetadata(e,t){return Promise.resolve(this.channel.call("updateMetadata",[e,t])).then(e=>a(e,null))}getExtensionsReport(){return Promise.resolve(this.channel.call("getExtensionsReport"))}}t.ExtensionManagementChannelClient=u}),define(e[46],t([1,0,27,9]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MANIFEST_CACHE_FOLDER="CachedExtensions",t.USER_MANIFEST_CACHE_FILE="user",t.BUILTIN_MANIFEST_CACHE_FILE="builtin";class r{constructor(e,t){this.identifier=e,this.version=t}key(){return`${this.identifier.id}-${this.version}`}equals(e){return e instanceof r&&(n.areSameExtensions(this.identifier,e.identifier)&&this.version===e.version)}}t.ExtensionIdentifierWithVersion=r,t.isIExtensionIdentifier=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&(!e.uuid||"string"==typeof e.uuid)}
;!function(e){e[e.System=0]="System",e[e.User=1]="User"}(t.ExtensionType||(t.ExtensionType={}));class s{constructor(e){this.value=e,this._lower=e.toLowerCase()}static equals(e,t){if(void 0===e||null===e)return void 0===t||null===t;if(void 0===t||null===t)return!1;if("string"==typeof e||"string"==typeof t){let n="string"==typeof e?e:e.value,r="string"==typeof t?t:t.value;return i.equalsIgnoreCase(n,r)}return e._lower===t._lower}static toKey(e){return"string"==typeof e?e.toLowerCase():e._lower}}t.ExtensionIdentifier=s,t.isLanguagePackExtension=function(e){return!(!e.contributes||!e.contributes.localizations)&&e.contributes.localizations.length>0}}),define(e[72],t([1,0,3,2,46,8]),function(e,t,n,i,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class o extends n.Disposable{constructor(e,t){super(),this.environmentService=e,this.extensionsManifestCache=i.join(this.environmentService.userDataPath,r.MANIFEST_CACHE_FOLDER,r.USER_MANIFEST_CACHE_FILE),
this._register(t.onDidInstallExtension(e=>this.onDidInstallExtension(e))),this._register(t.onDidUninstallExtension(e=>this.onDidUnInstallExtension(e)))}onDidInstallExtension(e){e.error||this.invalidate()}onDidUnInstallExtension(e){e.error||this.invalidate()}invalidate(){s.del(this.extensionsManifestCache).then(()=>{},()=>{})}}t.ExtensionsManifestCache=o}),define(e[44],t([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(e,t=[],n=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=n}}t.SyncDescriptor=n,t.createSyncDescriptor=((e,...t)=>new n(e,t))}),define(e[74],t([1,0,10,56]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e){this._hashFn=e,this._nodes=Object.create(null)}roots(){const e=[];return i.forEach(this._nodes,t=>{n.isEmptyObject(t.value.outgoing)&&e.push(t.value)}),e}insertEdge(e,t){const n=this.lookupOrInsertNode(e),i=this.lookupOrInsertNode(t);n.outgoing[this._hashFn(t)]=i,
i.incoming[this._hashFn(e)]=n}removeNode(e){const t=this._hashFn(e);delete this._nodes[t],i.forEach(this._nodes,e=>{delete e.value.outgoing[t],delete e.value.incoming[t]})}lookupOrInsertNode(e){const t=this._hashFn(e);let 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}lookup(e){return this._nodes[this._hashFn(e)]}isEmpty(){for(const e in this._nodes)return!1;return!0}toString(){let e=[];return i.forEach(this._nodes,t=>{e.push(`${t.key}, (incoming)[${Object.keys(t.value.incoming).join(", ")}], (outgoing)[${Object.keys(t.value.outgoing).join(",")}]`)}),e.join("\n")}}t.Graph=r}),define(e[6],t([1,0]),function(e,t){"use strict";function n(e,t,n,i){t[r.DI_TARGET]===t?t[r.DI_DEPENDENCIES].push({id:e,index:n,optional:i}):(t[r.DI_DEPENDENCIES]=[{id:e,index:n,optional:i}],t[r.DI_TARGET]=t)}function i(e){if(r.serviceIds.has(e))return r.serviceIds.get(e);const t=function(e,i,r){
if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");n(t,e,r,!1)};return t.toString=(()=>e),r.serviceIds.set(e,t),t}Object.defineProperty(t,"__esModule",{value:!0});var r;!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]||[]}}(r=t._util||(t._util={})),t.IInstantiationService=i("instantiationService"),t.createDecorator=i,t.optional=function(e){return function(t,i,r){if(3!==arguments.length)throw new Error("@optional-decorator can only be used to decorate a parameter");n(e,t,r,!0)}}}),define(e[43],t([1,0,6,34,59]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDialogService=n.createDecorator("dialogService"),t.IFileDialogService=n.createDecorator("fileDialogService");const s=10;t.getConfirmMessage=function(e,t){const n=[e];return n.push(""),n.push(...t.slice(0,s).map(e=>i.basename(e))),
t.length>s&&(t.length-s==1?n.push(r.localize(0,null)):n.push(r.localize(1,null,t.length-s))),n.push(""),n.join("\n")}});var i=this&&this.__decorate||function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},r=this&&this.__param||function(e,t){return function(n,i){t(n,i,e)}};define(e[77],t([1,0,43]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=class{constructor(e){this.dialogService=e}listen(e,t){throw new Error(`Event not found: ${t}`)}call(e,t,n){switch(t){case"show":return this.dialogService.show(n[0],n[1],n[2]);case"confirm":return this.dialogService.confirm(n[0])}return Promise.reject(new Error("invalid command"))}};s=i([r(0,n.IDialogService)],s),t.DialogChannel=s;class o{constructor(e){this.channel=e}
show(e,t,n){return this.channel.call("show",[e,t,n])}confirm(e){return this.channel.call("confirm",[e])}}t.DialogChannelClient=o}),define(e[41],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDownloadService=n.createDecorator("downloadService")}),define(e[17],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IEnvironmentService=n.createDecorator("environmentService")}),define(e[80],t([1,0,17,2,8,7,3]),function(e,t,n,s,o,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let c=class extends l.Disposable{constructor(e){super(),this.environmentService=e,this.cleanUpOldLogsSoon()}cleanUpOldLogsSoon(){let e=setTimeout(()=>{e=void 0;const t=s.basename(this.environmentService.logsPath),n=s.dirname(this.environmentService.logsPath);o.readdir(n).then(e=>{const i=e.filter(e=>/^\d{8}T\d{6}$/.test(e)).sort().filter((e,n)=>e!==t),r=i.slice(0,Math.max(0,i.length-9));return Promise.all(r.map(e=>o.rimraf(s.join(n,e))))
}).then(null,a.onUnexpectedError)},1e4);this._register(l.toDisposable(()=>clearTimeout(e)))}};c=i([r(0,n.IEnvironmentService)],c),t.LogsDataCleaner=c}),define(e[81],t([1,0,17,2,8,7,3]),function(e,t,n,s,o,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let c=class e extends l.Disposable{constructor(e){super(),this.environmentService=e,this.cleanUpStorageSoon()}cleanUpStorageSoon(){let t=setTimeout(()=>{t=void 0,o.readFile(this.environmentService.backupWorkspacesPath,"utf8").then(t=>{const n=JSON.parse(t).emptyWorkspaceInfos.map(e=>e.backupFolder);return o.readdir(this.environmentService.workspaceStorageHome).then(t=>{const i=[];return t.forEach(t=>{t.length!==e.NON_EMPTY_WORKSPACE_ID_LENGTH&&-1===n.indexOf(t)&&i.push(o.rimraf(s.join(this.environmentService.workspaceStorageHome,t)))}),Promise.all(i)})}).then(null,a.onUnexpectedError)},3e4);this._register(l.toDisposable(()=>clearTimeout(t)))}};c.NON_EMPTY_WORKSPACE_ID_LENGTH=32,c=i([r(0,n.IEnvironmentService)],c),t.StorageDataCleaner=c}),
define(e[33],t([1,0,60,6]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXTENSION_IDENTIFIER_PATTERN="^([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$",t.EXTENSION_IDENTIFIER_REGEX=new RegExp(t.EXTENSION_IDENTIFIER_PATTERN),t.isIExtensionIdentifier=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&(!e.uuid||"string"==typeof e.uuid)},t.IExtensionManagementService=i.createDecorator("extensionManagementService"),t.IExtensionGalleryService=i.createDecorator("extensionGalleryService");!function(e){e[e.NoneOrRelevance=0]="NoneOrRelevance",e[e.LastUpdatedDate=1]="LastUpdatedDate",e[e.Title=2]="Title",e[e.PublisherName=3]="PublisherName",e[e.InstallCount=4]="InstallCount",e[e.PublishedDate=5]="PublishedDate",e[e.AverageRating=6]="AverageRating",e[e.WeightedRating=12]="WeightedRating"}(t.SortBy||(t.SortBy={}));!function(e){e[e.Default=0]="Default",e[e.Ascending=1]="Ascending",e[e.Descending=2]="Descending"}(t.SortOrder||(t.SortOrder={}));!function(e){
e.Uninstall="uninstall"}(t.StatisticType||(t.StatisticType={}));!function(e){e[e.None=0]="None",e[e.Install=1]="Install",e[e.Update=2]="Update"}(t.InstallOperation||(t.InstallOperation={})),t.INSTALL_ERROR_MALICIOUS="malicious",t.INSTALL_ERROR_INCOMPATIBLE="incompatible",t.IExtensionManagementServerService=i.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=i.createDecorator("extensionEnablementService"),t.IExtensionTipsService=i.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([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(...e){this._entries=new Map;for(let[t,n]of e)this.set(t,n)}set(e,t){const n=this._entries.get(e);return this._entries.set(e,t),n}forEach(e){this._entries.forEach((t,n)=>e(n,t))}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}}t.ServiceCollection=n}),define(e[84],t([1,0,7,10,74,44,6,47]),function(e,t,n,i,r,s,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class l{constructor(e=new a.ServiceCollection,t=!1,n){this._services=e,this._strict=t,this._parent=n,this._services.set(o.IInstantiationService,this)}createChild(e){return new l(e,this._strict,this)}invokeFunction(e,...t){let i=u.traceInvocation(e),r=!1;try{const s={get:(e,t)=>{if(r)throw n.illegalState("service accessor is only valid during the invocation of its target method");const s=this._getOrCreateServiceInstance(e,i)
;if(!s&&t!==o.optional)throw new Error(`[invokeFunction] unknown service '${e}'`);return s}};return e.apply(void 0,[s,...t])}finally{r=!0,i.stop()}}createInstance(e,...t){let n,i;return e instanceof s.SyncDescriptor?(n=u.traceCreation(e.ctor),i=this._createInstance(e.ctor,e.staticArguments.concat(t),n)):(n=u.traceCreation(e),i=this._createInstance(e,t,n)),n.stop(),i}_createInstance(e,t=[],n){let r=o._util.getServiceDependencies(e).sort((e,t)=>e.index-t.index),s=[];for(const t of r){let i=this._getOrCreateServiceInstance(t.id,n);if(!i&&this._strict&&!t.optional)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${t.id}.`);s.push(i)}let a=r.length>0?r[0].index:t.length;if(t.length!==a){console.warn(`[createInstance] First service dependency of ${e.name} at position ${a+1} conflicts with ${t.length} static arguments`);let n=a-t.length;t=n>0?t.concat(new Array(n)):t.slice(0,a)}return i.create.apply(null,[e].concat(t,s))}_setServiceInstance(e,t){
if(this._services.get(e)instanceof s.SyncDescriptor)this._services.set(e,t);else{if(!this._parent)throw new Error("illegalState - setting UNKNOWN service instance");this._parent._setServiceInstance(e,t)}}_getServiceInstanceOrDescriptor(e){let t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){let n=this._getServiceInstanceOrDescriptor(e);return n instanceof s.SyncDescriptor?this._createAndCacheServiceInstance(e,n,t.branch(e,!0)):(t.branch(e,!1),n)}_createAndCacheServiceInstance(e,t,n){function i(){const e=new Error("[createInstance] cyclic dependency between services");throw e.message=a.toString(),e}const a=new r.Graph(e=>e.id.toString());let l=0;const c=[{id:e,desc:t,_trace:n}];for(;c.length;){const t=c.pop();a.lookupOrInsertNode(t),l++>100&&i();let n=o._util.getServiceDependencies(t.desc.ctor);for(let i of n){let n=this._getServiceInstanceOrDescriptor(i.id)
;if(n||i.optional||console.warn(`[createInstance] ${e} depends on ${i.id} which is NOT registered.`),n instanceof s.SyncDescriptor){const e={id:i.id,desc:n,_trace:t._trace.branch(i.id,!0)};a.insertEdge(t,e),c.push(e)}}}for(;;){let e=a.roots();if(0===e.length){a.isEmpty()||i();break}for(let{data:t}of e){const e=this._createServiceInstanceWithOwner(t.id,t.desc.ctor,t.desc.staticArguments,t.desc.supportsDelayedInstantiation,t._trace);this._setServiceInstance(t.id,e),a.removeNode(t)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,n=[],i,r){if(this._services.get(e)instanceof s.SyncDescriptor)return this._createServiceInstance(t,n,i,r);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,n,i,r);throw new Error("illegalState - creating UNKNOWN service instance")}_createServiceInstance(e,t=[],n,i){return this._createInstance(e,t,i)}}t.InstantiationService=l;var c;!function(e){e[e.Creation=0]="Creation",e[e.Invocation=1]="Invocation",e[e.Branch=2]="Branch"
}(c||(c={}));class u{constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}static traceInvocation(e){return u._None}static traceCreation(e){return u._None}branch(e,t){let n=new u(2,e.toString());return this._dep.push([e,t,n]),n}stop(){function e(t,i){let r=[],s=new Array(t+1).join("\t");for(const[o,a,l]of i._dep)if(a&&l){n=!0,r.push(`${s}CREATES -> ${o}`);let i=e(t+1,l);i&&r.push(i)}else r.push(`${s}uses -> ${o}`);return r.join("\n")}let t=Date.now()-this._start;u._totals+=t;let n=!1,i=[`${0===this.type?"CREATE":"CALL"} ${this.name}`,`${e(1,this)}`,`DONE, took ${t.toFixed(2)}ms (grand total ${u._totals.toFixed(2)}ms)`];(t>2||n)&&console.log(i.join("\n"))}}u._None=new class extends u{constructor(){super(-1,null)}stop(){}branch(){return this}},u._totals=0}),define(e[42],t([1,0,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(const t of e.translations){if("string"!=typeof t.id)return!1;if("string"!=typeof t.path)return!1}return!(e.languageName&&"string"!=typeof e.languageName||e.localizedLanguageName&&"string"!=typeof e.localizedLanguageName)}}),define(e[86],t([1,0,4]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i{constructor(e){this.service=e,this.onDidLanguagesChange=n.Event.buffer(e.onDidLanguagesChange,!0)}listen(e,t){switch(t){case"onDidLanguagesChange":return this.onDidLanguagesChange}throw new Error(`Event not found: ${t}`)}call(e,t,n){switch(t){case"getLanguageIds":return this.service.getLanguageIds(n)}throw new Error(`Call not found: ${t}`)}}t.LocalizationsChannel=i;class r{constructor(e){this.channel=e}get onDidLanguagesChange(){
return this.channel.listen("onDidLanguagesChange")}getLanguageIds(e){return this.channel.call("getLanguageIds",e)}}t.LocalizationsChannelClient=r}),define(e[15],t([1,0,6,3,5,4]),function(e,t,n,i,r,s){"use strict";function o(){return(new Date).toISOString()}Object.defineProperty(t,"__esModule",{value:!0}),t.ILogService=n.createDecorator("logService");var a;!function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Info=2]="Info",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.Off=6]="Off"}(a=t.LogLevel||(t.LogLevel={})),t.DEFAULT_LOG_LEVEL=a.Info;class l extends i.Disposable{constructor(){super(...arguments),this.level=t.DEFAULT_LOG_LEVEL,this._onDidChangeLogLevel=this._register(new s.Emitter),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}t.AbstractLogService=l;class c extends l{constructor(e=t.DEFAULT_LOG_LEVEL){super(),this.setLevel(e),
this.useColors=!r.isWindows}trace(e,...t){this.getLevel()<=a.Trace&&(this.useColors?console.log(`[90m[main ${o()}][0m`,e,...t):console.log(`[main ${o()}]`,e,...t))}debug(e,...t){this.getLevel()<=a.Debug&&(this.useColors?console.log(`[90m[main ${o()}][0m`,e,...t):console.log(`[main ${o()}]`,e,...t))}info(e,...t){this.getLevel()<=a.Info&&(this.useColors?console.log(`[90m[main ${o()}][0m`,e,...t):console.log(`[main ${o()}]`,e,...t))}warn(e,...t){this.getLevel()<=a.Warning&&(this.useColors?console.warn(`[93m[main ${o()}][0m`,e,...t):console.warn(`[main ${o()}]`,e,...t))}error(e,...t){this.getLevel()<=a.Error&&(this.useColors?console.error(`[91m[main ${o()}][0m`,e,...t):console.error(`[main ${o()}]`,e,...t))}critical(e,...t){this.getLevel()<=a.Critical&&(this.useColors?console.error(`[90m[main ${o()}][0m`,e,...t):console.error(`[main ${o()}]`,e,...t))}dispose(){}}t.ConsoleLogMainService=c;class u extends l{constructor(e=t.DEFAULT_LOG_LEVEL){super(),this.setLevel(e)}trace(e,...t){
this.getLevel()<=a.Trace&&console.log("%cTRACE","color: #888",e,...t)}debug(e,...t){this.getLevel()<=a.Debug&&console.log("%cDEBUG","background: #eee; color: #888",e,...t)}info(e,...t){this.getLevel()<=a.Info&&console.log("%c INFO","color: #33f",e,...t)}warn(e,...t){this.getLevel()<=a.Warning&&console.log("%c WARN","color: #993",e,...t)}error(e,...t){this.getLevel()<=a.Error&&console.log("%c  ERR","color: #f33",e,...t)}critical(e,...t){this.getLevel()<=a.Critical&&console.log("%cCRITI","background: #f33; color: white",e,...t)}dispose(){}}t.ConsoleLogService=u;class h extends l{constructor(e){super(),this.logServices=e,e.length&&this.setLevel(e[0].getLevel())}setLevel(e){for(const t of this.logServices)t.setLevel(e);super.setLevel(e)}trace(e,...t){for(const n of this.logServices)n.trace(e,...t)}debug(e,...t){for(const n of this.logServices)n.debug(e,...t)}info(e,...t){for(const n of this.logServices)n.info(e,...t)}warn(e,...t){for(const n of this.logServices)n.warn(e,...t)}error(e,...t){
for(const n of this.logServices)n.error(e,...t)}critical(e,...t){for(const n of this.logServices)n.critical(e,...t)}dispose(){for(const e of this.logServices)e.dispose()}}t.MultiplexLogService=h;class d extends i.Disposable{constructor(e){super(),this.logService=e,this._register(e)}get onDidChangeLogLevel(){return this.logService.onDidChangeLogLevel}setLevel(e){this.logService.setLevel(e)}getLevel(){return this.logService.getLevel()}trace(e,...t){this.logService.trace(e,...t)}debug(e,...t){this.logService.debug(e,...t)}info(e,...t){this.logService.info(e,...t)}warn(e,...t){this.logService.warn(e,...t)}error(e,...t){this.logService.error(e,...t)}critical(e,...t){this.logService.critical(e,...t)}}t.DelegatedLogService=d;class f{constructor(){this.onDidChangeLogLevel=(new s.Emitter).event}setLevel(e){}getLevel(){return a.Info}trace(e,...t){}debug(e,...t){}info(e,...t){}warn(e,...t){}error(e,...t){}critical(e,...t){}dispose(){}}t.NullLogService=f,t.getLogLevel=function(e){if(e.verbose)return a.Trace
;if("string"==typeof e.args.log)switch(e.args.log.toLowerCase()){case"trace":return a.Trace;case"debug":return a.Debug;case"info":return a.Info;case"warn":return a.Warning;case"error":return a.Error;case"critical":return a.Critical;case"off":return a.Off}return t.DEFAULT_LOG_LEVEL}}),define(e[88],t([1,0,15,4]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e){this.service=e,this.onDidChangeLogLevel=i.Event.buffer(e.onDidChangeLogLevel,!0)}listen(e,t){switch(t){case"onDidChangeLogLevel":return this.onDidChangeLogLevel}throw new Error(`Event not found: ${t}`)}call(e,t,n){switch(t){case"setLevel":this.service.setLevel(n)}throw new Error(`Call not found: ${t}`)}}t.LogLevelSetterChannel=r;class s{constructor(e){this.channel=e}get onDidChangeLogLevel(){return this.channel.listen("onDidChangeLogLevel")}setLevel(e){this.channel.call("setLevel",e)}}t.LogLevelSetterChannelClient=s;class o extends n.DelegatedLogService{constructor(e,t){super(t),this.master=e,
this._register(e.onDidChangeLogLevel(e=>t.setLevel(e)))}setLevel(e){this.master.setLevel(e)}}t.FollowerLogService=o}),define(e[89],t([1,0,2,15]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSpdLogService=function(t,s,o){try{const i=e.__$__nodeRequire("spdlog");i.setAsyncMode(8192,500);const a=n.join(o,`${t}.log`),l=new i.RotatingLogger(t,a,5242880,6);return l.setLevel(0),new r(l,s)}catch(e){console.error(e)}return new i.NullLogService},t.createRotatingLogger=function(t,n,i,r){return new(e.__$__nodeRequire("spdlog").RotatingLogger)(t,n,i,r)};class r extends i.AbstractLogService{constructor(e,t=i.LogLevel.Error){super(),this.logger=e,this.setLevel(t)}trace(){this.getLevel()<=i.LogLevel.Trace&&this.logger.trace(this.format(arguments))}debug(){this.getLevel()<=i.LogLevel.Debug&&this.logger.debug(this.format(arguments))}info(){this.getLevel()<=i.LogLevel.Info&&this.logger.info(this.format(arguments))}warn(){
this.getLevel()<=i.LogLevel.Warning&&this.logger.warn(this.format(arguments))}error(){if(this.getLevel()<=i.LogLevel.Error){const e=arguments[0];if(e instanceof Error){const t=Array.prototype.slice.call(arguments);t[0]=e.stack,this.logger.error(this.format(t))}else this.logger.error(this.format(arguments))}}critical(){this.getLevel()<=i.LogLevel.Critical&&this.logger.critical(this.format(arguments))}dispose(){this.logger.drop()}format(e){let t="";for(let n=0;n<e.length;n++){let i=e[n];if("object"==typeof i)try{i=JSON.stringify(i)}catch(e){}t+=(n>0?" ":"")+i}return t}}}),define(e[29],t([1,0,2,24]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n.dirname(i.getPathFromAmdModule(e,"")),s=n.join(r,"package.json");t.default=e.__$__nodeRequire(s)}),define(e[45],t([1,0,63,29]),function(e,t,n,i){"use strict";function r(e){return"*"===(e=e.trim())||c.test(e)}function s(e){if(!r(e))return null;if("*"===(e=e.trim()))return{hasCaret:!1,hasGreaterEquals:!1,majorBase:0,
majorMustEqual:!1,minorBase:0,minorMustEqual:!1,patchBase:0,patchMustEqual:!1,preRelease:null};let t=e.match(c);return t?{hasCaret:"^"===t[1],hasGreaterEquals:">="===t[1],majorBase:"x"===t[2]?0:parseInt(t[2],10),majorMustEqual:"x"!==t[2],minorBase:"x"===t[4]?0:parseInt(t[4],10),minorMustEqual:"x"!==t[4],patchBase:"x"===t[6]?0:parseInt(t[6],10),patchMustEqual:"x"!==t[6],preRelease:t[8]||null}:null}function o(e){if(!e)return null;let t=e.majorBase,n=e.majorMustEqual,i=e.minorBase,r=e.minorMustEqual,s=e.patchBase,o=e.patchMustEqual;return e.hasCaret&&(0===t?o=!1:(r=!1,o=!1)),{majorBase:t,majorMustEqual:n,minorBase:i,minorMustEqual:r,patchBase:s,patchMustEqual:o,isMinimum:e.hasGreaterEquals}}function a(e,t){let n;n="string"==typeof e?o(s(e)):e;let i;if(i="string"==typeof t?o(s(t)):t,!n||!i)return!1;let r=n.majorBase,a=n.minorBase,l=n.patchBase,c=i.majorBase,u=i.minorBase,h=i.patchBase,d=i.majorMustEqual,f=i.minorMustEqual,g=i.patchMustEqual
;return i.isMinimum?r>c||!(r<c)&&(a>u||!(a<u)&&l>=h):(1!==r||0!==c||d&&f&&g||(c=1,u=0,h=0,d=!0,f=!1,g=!1),!(r<c)&&(r>c?!d:!(a<u)&&(a>u?!f:!(l<h)&&(!(l>h)||!g))))}function l(e,t,i=[]){let r=o(s(t));if(!r)return i.push(n.localize(0,null,t)),!1;if(0===r.majorBase){if(!r.majorMustEqual||!r.minorMustEqual)return i.push(n.localize(1,null,t)),!1}else if(!r.majorMustEqual)return i.push(n.localize(2,null,t)),!1;return!!a(e,r)||(i.push(n.localize(3,null,e,t)),!1)}Object.defineProperty(t,"__esModule",{value:!0});const c=/^(\^|>=)?((\d+)|x)\.((\d+)|x)\.((\d+)|x)(\-.*)?$/;t.isValidVersionStr=r,t.parseVersion=s,t.normalizeVersion=o,t.isValidVersion=a,t.isValidExtensionVersion=function(e,t,n){return!(!t.isBuiltin&&void 0!==t.main)||l(e,t.engines.vscode,n)},t.isEngineValid=function(e){return"*"===e||l(i.default.version,e)},t.isVersionValid=l}),define(e[21],t([1,0,2,24]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0})
;const r=n.dirname(i.getPathFromAmdModule(e,"")),s=n.join(r,"product.json"),o=e.__$__nodeRequire(s);process.env.VSCODE_DEV&&(o.nameShort+=" Dev",o.nameLong+=" Dev",o.dataFolderName+="-dev"),t.default=o}),define(e[93],t([1,0,2,8,21,3,7,15,17]),function(e,t,s,o,a,l,c,u,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let d=class{constructor(e,t){this._environmentService=e,this._logService=t,this._disposables=[],this._environmentService.isBuilt&&this._manageCachedDataSoon()}dispose(){this._disposables=l.dispose(this._disposables)}_manageCachedDataSoon(){let e=setTimeout(()=>n(this,void 0,void 0,function*(){e=void 0,this._logService.info("Starting to clean up unused language packs.");const t=a.default.nameLong.indexOf("Insiders")>=0?6048e5:7776e6;try{let e=Object.create(null);const n=JSON.parse(yield o.readFile(s.join(this._environmentService.userDataPath,"languagepacks.json"),"utf8"));for(let t of Object.keys(n)){e[`${n[t].hash}.${t}`]=!0}
const i=s.join(this._environmentService.userDataPath,"clp");if(!(yield o.exists(i)))return;for(let t of yield o.readdir(i))e[t]?this._logService.info(`Skipping directory ${t}. Language pack still in use.`):(this._logService.info("Removing unused language pack:",t),yield o.rimraf(s.join(i,t)));const r=Date.now();for(let n of Object.keys(e)){const e=s.join(i,n);for(let i of yield o.readdir(e)){if("tcf.json"===i)continue;const a=s.join(e,i),l=yield o.stat(a);if(l.isDirectory()){r-l.mtime.getTime()>t&&(this._logService.info("Removing language pack cache entry: ",s.join(n,i)),yield o.rimraf(a))}}}}catch(e){c.onUnexpectedError(e)}}),4e4);this._disposables.push({dispose(){void 0!==e&&clearTimeout(e)}})}};d=i([r(0,h.IEnvironmentService),r(1,u.ILogService)],d),t.LanguagePackCachedDataCleaner=d}),define(e[94],t([1,0,2,7,3,8,17,21]),function(e,t,n,s,o,a,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let u=class e{constructor(e){this._environmentService=e,this._disposables=[],
this._manageCachedDataSoon()}dispose(){this._disposables=o.dispose(this._disposables)}_manageCachedDataSoon(){if(!this._environmentService.nodeCachedDataDir)return;const t=n.dirname(this._environmentService.nodeCachedDataDir),i=n.basename(this._environmentService.nodeCachedDataDir);let r=setTimeout(()=>{r=void 0,a.readdir(t).then(r=>{const s=Date.now(),o=[];return r.forEach(r=>{if(r!==i){const i=n.join(t,r);o.push(a.stat(i).then(t=>{if(t.isDirectory()){if(s-t.mtime.getTime()>e._DataMaxAge)return a.rimraf(i)}}))}}),Promise.all(o)}).then(void 0,s.onUnexpectedError)},3e4);this._disposables.push({dispose(){clearTimeout(r)}})}};u._DataMaxAge=c.default.nameLong.indexOf("Insiders")>=0?6048e5:7776e6,u=i([r(0,l.IEnvironmentService)],u),t.NodeCachedDataCleaner=u}),define(e[95],t([1,0,94,93,3,81,80]),function(e,t,n,i,r,s,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSharedProcessContributions=function(e){
return r.combinedDisposable([e.createInstance(n.NodeCachedDataCleaner),e.createInstance(i.LanguagePackCachedDataCleaner),e.createInstance(s.StorageDataCleaner),e.createInstance(o.LogsDataCleaner)])}}),define(e[96],t([1,0,97,76,32,2,92,29,21,104,5,24,12]),function(e,t,n,r,s,o,a,l,c,u,h,d,f){"use strict";function g(e,t){return h.isWindows?function(e,t){return`\\\\.\\pipe\\${n.createHash("md5").update(e).digest("hex")}-${l.default.version}-${t}-sock`}(e,t):function(e,t){if(E){const i=n.createHash("md5").update(e).digest("hex").substr(0,8);return o.join(E,`vscode-${i}-${l.default.version}-${t}.sock`)}return o.join(e,`${l.default.version}-${t}.sock`)}(e,t)}function p(e,t){return v(e["inspect-extensions"],e["inspect-brk-extensions"],5870,t,e.debugId)}function m(e,t){return v(e["inspect-search"],e["inspect-brk-search"],5876,t)}function v(e,t,n,i,r){const s=t||e,o=Number(s)||(i?null:n);return{port:o,break:!!o&&Boolean(!!t),debugId:r}}function y(e,t){if(!e)return;const n=o.resolve(e)
;return o.normalize(e)===n?n:o.resolve(t.env.VSCODE_CWD||t.cwd(),e)}function _(e,t){return y(e["user-data-dir"],t)||o.resolve(r.getDefaultUserDataPath(t.platform))}Object.defineProperty(t,"__esModule",{value:!0});const E=process.env.XDG_RUNTIME_DIR;class w{constructor(e,t){if(this._args=e,this._execPath=t,!process.env.VSCODE_LOGS){const e=u.toLocalISOString(new Date).replace(/-|:|\.\d+Z$/g,"");process.env.VSCODE_LOGS=o.join(this.userDataPath,"logs",e)}this.logsPath=process.env.VSCODE_LOGS}get args(){return this._args}get appRoot(){return o.dirname(d.getPathFromAmdModule(e,""))}get execPath(){return this._execPath}get cliPath(){return function(e,t,n){return h.isWindows?n?o.join(o.dirname(e),"bin",`${c.default.applicationName}.cmd`):o.join(t,"scripts","code-cli.bat"):h.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)}get userHome(){return s.homedir()}
get userDataPath(){const e=process.env.VSCODE_PORTABLE;return e?o.join(e,"user-data"):_(this._args,process)}get appNameLong(){return c.default.nameLong}get appQuality(){return c.default.quality}get appSettingsHome(){return o.join(this.userDataPath,"User")}get appSettingsPath(){return o.join(this.appSettingsHome,"settings.json")}get globalStorageHome(){return o.join(this.appSettingsHome,"globalStorage")}get workspaceStorageHome(){return o.join(this.appSettingsHome,"workspaceStorage")}get settingsSearchBuildId(){return c.default.settingsSearchBuildId}get settingsSearchUrl(){return c.default.settingsSearchUrl}get appKeybindingsPath(){return o.join(this.appSettingsHome,"keybindings.json")}get isExtensionDevelopment(){return!!this._args.extensionDevelopmentPath}get backupHome(){return o.join(this.userDataPath,"Backups")}get backupWorkspacesPath(){return o.join(this.backupHome,"workspaces.json")}get untitledWorkspacesHome(){return f.URI.file(o.join(this.userDataPath,"Workspaces"))}get installSourcePath(){
return o.join(this.userDataPath,"installSource")}get builtinExtensionsPath(){const t=y(this._args["builtin-extensions-dir"],process);return t||o.normalize(o.join(d.getPathFromAmdModule(e,""),"..","extensions"))}get extensionsPath(){const e=y(this._args["extensions-dir"],process);if(e)return e;const t=process.env.VSCODE_EXTENSIONS;if(t)return t;const n=process.env.VSCODE_PORTABLE;return n?o.join(n,"extensions"):o.join(this.userHome,c.default.dataFolderName,"extensions")}get extensionDevelopmentLocationURI(){const e=this._args.extensionDevelopmentPath;if(e)return/^[^:/?#]+?:\/\//.test(e)?f.URI.parse(e):f.URI.file(o.normalize(e))}get extensionTestsLocationURI(){const e=this._args.extensionTestsPath;if(e)return/^[^:/?#]+?:\/\//.test(e)?f.URI.parse(e):f.URI.file(o.normalize(e))}get disableExtensions(){if(this._args["disable-extensions"])return!0;const e=this._args["disable-extension"];if(e){if("string"==typeof e)return[e];if(Array.isArray(e)&&e.length>0)return e}return!1}get skipGettingStarted(){
return!!this._args["skip-getting-started"]}get skipReleaseNotes(){return!!this._args["skip-release-notes"]}get skipAddToRecentlyOpened(){return!!this._args["skip-add-to-recently-opened"]}get debugExtensionHost(){return p(this._args,this.isBuilt)}get debugSearch(){return m(this._args,this.isBuilt)}get isBuilt(){return!process.env.VSCODE_DEV}get verbose(){return!!this._args.verbose}get log(){return this._args.log}get wait(){return!!this._args.wait}get logExtensionHostCommunication(){return!!this._args.logExtensionHostCommunication}get status(){return!!this._args.status}get mainIPCHandle(){return g(this.userDataPath,"main")}get sharedIPCHandle(){return g(this.userDataPath,"shared")}get nodeCachedDataDir(){return process.env.VSCODE_NODE_CACHED_DATA_DIR||void 0}get disableUpdates(){return!!this._args["disable-updates"]}get disableCrashReporter(){return!!this._args["disable-crash-reporter"]}get driverHandle(){return this._args.driver}get driverVerbose(){return!!this._args["driver-verbose"]}}
i([a.memoize],w.prototype,"appRoot",null),i([a.memoize],w.prototype,"cliPath",null),i([a.memoize],w.prototype,"userHome",null),i([a.memoize],w.prototype,"userDataPath",null),i([a.memoize],w.prototype,"appSettingsHome",null),i([a.memoize],w.prototype,"appSettingsPath",null),i([a.memoize],w.prototype,"globalStorageHome",null),i([a.memoize],w.prototype,"workspaceStorageHome",null),i([a.memoize],w.prototype,"settingsSearchBuildId",null),i([a.memoize],w.prototype,"settingsSearchUrl",null),i([a.memoize],w.prototype,"appKeybindingsPath",null),i([a.memoize],w.prototype,"isExtensionDevelopment",null),i([a.memoize],w.prototype,"backupHome",null),i([a.memoize],w.prototype,"backupWorkspacesPath",null),i([a.memoize],w.prototype,"untitledWorkspacesHome",null),i([a.memoize],w.prototype,"installSourcePath",null),i([a.memoize],w.prototype,"builtinExtensionsPath",null),i([a.memoize],w.prototype,"extensionsPath",null),i([a.memoize],w.prototype,"extensionDevelopmentLocationURI",null),
i([a.memoize],w.prototype,"extensionTestsLocationURI",null),i([a.memoize],w.prototype,"debugExtensionHost",null),i([a.memoize],w.prototype,"debugSearch",null),i([a.memoize],w.prototype,"mainIPCHandle",null),i([a.memoize],w.prototype,"sharedIPCHandle",null),i([a.memoize],w.prototype,"nodeCachedDataDir",null),t.EnvironmentService=w,t.parseExtensionHostPort=p,t.parseSearchPort=m,t.parseDebugPort=v,t.parseUserDataDir=_}),define(e[98],t([1,0,27,18,21]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isUIExtension=function(e,t){const s=n.getGalleryExtensionId(e.publisher,e.name),o=t.getValue("_workbench.uiExtensions")||[];if(o.length){if(-1!==o.indexOf(s))return!0;if(-1!==o.indexOf(`-${s}`))return!1}switch(e.extensionKind){case"ui":return!0;case"workspace":return!1;default:return!((!i.isNonEmptyArray(r.default.uiExtensions)||!r.default.uiExtensions.some(e=>n.areSameExtensions({id:e},{id:s})))&&(e.main||e.contributes&&i.isNonEmptyArray(e.contributes.debuggers)))}}}),
define(e[99],t([1,0,8,97,33,3,17,16,27,15,42,21,18,4,20,2]),function(e,t,n,s,o,a,l,c,u,h,d,f,g,p,m,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const y=["de","en","en-US","es","fr","it","ja","ko","ru","zh-CN","zh-TW"];"stable"!==f.default.quality&&y.push("hu");let _=class extends a.Disposable{constructor(e,t,n){super(),this.extensionManagementService=e,this.logService=n,this._onDidLanguagesChange=this._register(new p.Emitter),this.onDidLanguagesChange=this._onDidLanguagesChange.event,this.cache=this._register(new E(t,n)),this._register(e.onDidInstallExtension(({local:e})=>this.onDidInstallExtension(e))),this._register(e.onDidUninstallExtension(({identifier:e})=>this.onDidUninstallExtension(e))),this.extensionManagementService.getInstalled().then(e=>this.cache.update(e))}getLanguageIds(e){return 1===e?Promise.resolve([...y]):this.cache.getLanguagePacks().then(t=>{const n=2===e?Object.keys(t):[...y,...Object.keys(t)];return g.distinct(n)})}onDidInstallExtension(e){
e&&e.manifest&&e.manifest.contributes&&e.manifest.contributes.localizations&&e.manifest.contributes.localizations.length&&(this.logService.debug("Adding language packs from the extension",e.identifier.id),this.update())}onDidUninstallExtension(e){this.cache.getLanguagePacks().then(t=>{Object.keys(t).some(n=>t[n]&&t[n].extensions.some(t=>u.areSameExtensions(t.extensionIdentifier,e)))&&(this.logService.debug("Removing language packs from the extension",e.id),this.update())})}update(){Promise.all([this.cache.getLanguagePacks(),this.extensionManagementService.getInstalled()]).then(([e,t])=>this.cache.update(t).then(t=>{g.equals(Object.keys(e),Object.keys(t))||this._onDidLanguagesChange.fire()}))}};_=i([r(0,o.IExtensionManagementService),r(1,l.IEnvironmentService),r(2,h.ILogService)],_),t.LocalizationsService=_;let E=class extends a.Disposable{constructor(e,t){super(),this.logService=t,this.languagePacks={},this.languagePacksFilePath=v.join(e.userDataPath,"languagepacks.json"),
this.languagePacksFileLimiter=new c.Queue}getLanguagePacks(){return this.languagePacksFileLimiter.size?this.withLanguagePacks().then(()=>this.languagePacks):Promise.resolve(this.languagePacks)}update(e){return this.withLanguagePacks(t=>{Object.keys(t).forEach(e=>delete t[e]),this.createLanguagePacksFromExtensions(t,...e)}).then(()=>this.languagePacks)}createLanguagePacksFromExtensions(e,...t){for(const n of t)n&&n.manifest&&n.manifest.contributes&&n.manifest.contributes.localizations&&n.manifest.contributes.localizations.length&&this.createLanguagePacksFromExtension(e,n);Object.keys(e).forEach(t=>this.updateHash(e[t]))}createLanguagePacksFromExtension(e,t){const n=t.identifier,i=t.manifest.contributes&&t.manifest.contributes.localizations?t.manifest.contributes.localizations:[];for(const r of i)if(t.location.scheme===m.Schemas.file&&d.isValidLocalization(r)){let i=e[r.languageId];i||(i={hash:"",extensions:[],translations:{}},e[r.languageId]=i)
;let s=i.extensions.filter(e=>u.areSameExtensions(e.extensionIdentifier,n))[0];s?s.version=t.manifest.version:i.extensions.push({extensionIdentifier:n,version:t.manifest.version});for(const e of r.translations)i.translations[e.id]=v.join(t.location.fsPath,e.path)}}updateHash(e){if(e){const t=s.createHash("md5");for(const n of e.extensions)t.update(n.extensionIdentifier.uuid||n.extensionIdentifier.id).update(n.version);e.hash=t.digest("hex")}}withLanguagePacks(e=(()=>null)){return this.languagePacksFileLimiter.queue(()=>{let t=null;return n.readFile(this.languagePacksFilePath,"utf8").then(void 0,e=>"ENOENT"===e.code?Promise.resolve("{}"):Promise.reject(e)).then(e=>{try{return JSON.parse(e)}catch(e){return{}}}).then(n=>(t=e(n),n)).then(e=>{for(const t of Object.keys(e))e[t]||delete e[t];this.languagePacks=e;const t=JSON.stringify(this.languagePacks);return this.logService.debug("Writing language packs",t),n.writeFile(this.languagePacksFilePath,t)}).then(()=>t,e=>this.logService.error(e))})}}
;E=i([r(0,l.IEnvironmentService),r(1,h.ILogService)],E)}),define(e[22],t([1,0,10,103]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(){this.data={}}add(e,t){i.ok(n.isString(e)),i.ok(n.isObject(t)),i.ok(!this.data.hasOwnProperty(e),"There is already an extension with this id"),this.data[e]=t}knows(e){return this.data.hasOwnProperty(e)}as(e){return this.data[e]||null}}t.Registry=new r}),define(e[101],t([1,0,22,4]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Extensions={JSONContribution:"base.contributions.json"};class r{constructor(){this._onDidChangeSchema=new i.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.schemasById={}}registerSchema(e,t){this.schemasById[function(e){return e.length>0&&"#"===e.charAt(e.length-1)?e.substring(0,e.length-1):e}(e)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}getSchemaContributions(){return{schemas:this.schemasById}}}
const s=new r;n.Registry.add(t.Extensions.JSONContribution,s)}),define(e[25],t([1,0,58,4,22,10,9,101]),function(e,t,n,i,r,s,o,a){"use strict";function l(e){switch(Array.isArray(e)?e[0]:e){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}function c(e){return t.OVERRIDE_PROPERTY_PATTERN.test(e)?n.localize(3,null,e):void 0!==p.getConfigurationProperties()[e]?n.localize(4,null,e):null}Object.defineProperty(t,"__esModule",{value:!0}),t.Extensions={Configuration:"base.contributions.configuration"};!function(e){e[e.APPLICATION=1]="APPLICATION",e[e.WINDOW=2]="WINDOW",e[e.RESOURCE=3]="RESOURCE"}(t.ConfigurationScope||(t.ConfigurationScope={})),t.allSettings={properties:{},patternProperties:{}},t.applicationSettings={properties:{},patternProperties:{}},t.windowSettings={properties:{},patternProperties:{}},t.resourceSettings={properties:{},patternProperties:{}},t.editorConfigurationSchemaId="vscode://schemas/settings/editor"
;const u=r.Registry.as(a.Extensions.JSONContribution);class h{constructor(){this.overrideIdentifiers=[],this._onDidSchemaChange=new i.Emitter,this.onDidSchemaChange=this._onDidSchemaChange.event,this._onDidUpdateConfiguration=new i.Emitter,this.onDidUpdateConfiguration=this._onDidUpdateConfiguration.event,this.defaultOverridesConfigurationNode={id:"defaultOverrides",title:n.localize(0,null),properties:{}},this.configurationContributors=[this.defaultOverridesConfigurationNode],this.editorConfigurationSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting"},this.configurationProperties={},this.excludedConfigurationProperties={},this.computeOverridePropertyPattern(),u.registerSchema(t.editorConfigurationSchemaId,this.editorConfigurationSchema)}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const n=[];e.forEach(e=>{n.push(...this.validateAndRegisterProperties(e,t)),
this.configurationContributors.push(e),this.registerJSONConfiguration(e),this.updateSchemaForOverrideSettingsConfiguration(e)}),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(n)}deregisterConfigurations(e){const n=[],i=e=>{if(e.properties)for(const i in e.properties)switch(n.push(i),delete this.configurationProperties[i],delete this.editorConfigurationSchema.properties[i],delete t.allSettings.properties[i],e.properties[i].scope){case 1:delete t.applicationSettings.properties[i];break;case 2:delete t.windowSettings.properties[i];break;case 3:delete t.resourceSettings.properties[i]}e.allOf&&e.allOf.forEach(e=>i(e))};for(const t of e){i(t);const e=this.configurationContributors.indexOf(t);-1!==e&&this.configurationContributors.splice(e,1)}u.registerSchema(t.editorConfigurationSchemaId,this.editorConfigurationSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(n)}registerDefaultConfigurations(e){const i=[];for(const r of e)for(const e in r.defaults){const s=r.defaults[e]
;if(t.OVERRIDE_PROPERTY_PATTERN.test(e)&&"object"==typeof s){const r={type:"object",default:s,description:n.localize(1,null,e),$ref:t.editorConfigurationSchemaId};t.allSettings.properties[e]=r,this.defaultOverridesConfigurationNode.properties[e]=r,this.configurationProperties[e]=r,i.push(e)}}this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(i)}deregisterDefaultConfigurations(e){const n=[];for(const i of e)for(const e in i.defaults)n.push(e),delete t.allSettings.properties[e],delete this.defaultOverridesConfigurationNode.properties[e],delete this.configurationProperties[e];this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(n)}notifyConfigurationSchemaUpdated(...e){this._onDidSchemaChange.fire()}registerOverrideIdentifiers(e){this.overrideIdentifiers.push(...e),this.updateOverridePropertyPatternKey()}validateAndRegisterProperties(e,n=!0,i=2,r=!1){i=s.isUndefinedOrNull(e.scope)?i:e.scope,r=e.overridable||r;let o=[],a=e.properties;if(a)for(let e in a){let u;if(n&&(u=c(e))){
console.warn(u),delete a[e];continue}let h=a[e],d=h.default;s.isUndefined(d)&&(h.default=l(h.type)),r&&(h.overridable=!0),t.OVERRIDE_PROPERTY_PATTERN.test(e)?h.scope=void 0:h.scope=s.isUndefinedOrNull(h.scope)?i:h.scope,!a[e].hasOwnProperty("included")||a[e].included?(this.configurationProperties[e]=a[e],o.push(e)):(this.excludedConfigurationProperties[e]=a[e],delete a[e])}let u=e.allOf;if(u)for(let e of u)o.push(...this.validateAndRegisterProperties(e,n,i,r));return o}getConfigurations(){return this.configurationContributors}getConfigurationProperties(){return this.configurationProperties}getExcludedConfigurationProperties(){return this.excludedConfigurationProperties}registerJSONConfiguration(e){function n(e){let i=e.properties;if(i)for(const e in i)switch(t.allSettings.properties[e]=i[e],i[e].scope){case 1:t.applicationSettings.properties[e]=i[e];break;case 2:t.windowSettings.properties[e]=i[e];break;case 3:t.resourceSettings.properties[e]=i[e]}let r=e.allOf;r&&r.forEach(n)}n(e)}
updateSchemaForOverrideSettingsConfiguration(e){e.id!==d&&(this.update(e),u.registerSchema(t.editorConfigurationSchemaId,this.editorConfigurationSchema))}updateOverridePropertyPatternKey(){let e=t.allSettings.patternProperties[this.overridePropertyPattern];e||(e={type:"object",description: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()}update(e){let t=e.properties;if(t)for(let e in t)t[e].overridable&&(this.editorConfigurationSchema.properties[e]=this.getConfigurationProperties()[e]);let n=e.allOf;n&&n.forEach(e=>this.update(e))}computeOverridePropertyPattern(){this.overridePropertyPattern=this.overrideIdentifiers.length?g.replace("${0}",this.overrideIdentifiers.map(e=>o.createRegExp(e,!1).source).join("|")):f}}const d="override",f="\\[.*\\]$",g="\\[(${0})\\]$";t.OVERRIDE_PROPERTY_PATTERN=new RegExp(f),t.getDefaultValue=l;const p=new h;r.Registry.add(t.Extensions.Configuration,p),t.validateProperty=c,t.getScopes=function(){const e={},t=p.getConfigurationProperties();for(const n of Object.keys(t))e[n]=t[n].scope;return e.launch=3,e.task=3,e}}),define(e[19],t([1,0,11,10,12,22,6,25]),function(e,t,n,i,r,s,o,a){"use strict";function l(e,t){const n=Object.create(null);for(let i in e)c(n,i,e[i],t);return n}function c(e,t,n,i){const r=t.split("."),s=r.pop();let o=e;for(let e=0;e<r.length;e++){let n=r[e],s=o[n]
;switch(typeof s){case"undefined":s=o[n]=Object.create(null);break;case"object":break;default:return void i(`Ignoring ${t} as ${r.slice(0,e+1).join(".")} is ${JSON.stringify(s)}`)}o=s}"object"==typeof o?o[s]=n:i(`Ignoring ${t} as ${r.join(".")} is ${JSON.stringify(o)}`)}function u(e,t){const n=t.shift();if(0!==t.length){if(-1!==Object.keys(e).indexOf(n)){const i=e[n];"object"!=typeof i||Array.isArray(i)||(u(i,t),0===Object.keys(i).length&&delete e[n])}}else delete e[n]}function h(e,t,n){const i=function(e,t){let n=e;for(const e of t){if("object"!=typeof n||null===n)return;n=n[e]}return n}(e,t.split("."));return void 0===i?n:i}function d(e,t,n){Object.keys(t).forEach(r=>{r in e?i.isObject(e[r])&&i.isObject(t[r])?d(e[r],t[r],n):n&&(e[r]=t[r]):e[r]=t[r]})}function f(e){return e.substring(1,e.length-1)}Object.defineProperty(t,"__esModule",{value:!0}),t.IConfigurationService=o.createDecorator("configurationService"),t.isConfigurationOverrides=function(e){
return e&&"object"==typeof e&&(!e.overrideIdentifier||"string"==typeof e.overrideIdentifier)&&(!e.resource||e.resource instanceof r.URI)};!function(e){e[e.USER=1]="USER",e[e.WORKSPACE=2]="WORKSPACE",e[e.WORKSPACE_FOLDER=3]="WORKSPACE_FOLDER",e[e.DEFAULT=4]="DEFAULT",e[e.MEMORY=5]="MEMORY"}(t.ConfigurationTarget||(t.ConfigurationTarget={})),t.ConfigurationTargetToString=function(e){switch(e){case 1:return"USER";case 2:return"WORKSPACE";case 3:return"WORKSPACE_FOLDER";case 4:return"DEFAULT";case 5:return"MEMORY"}},t.compare=function(e,t){const i=t.keys.filter(t=>-1===e.keys.indexOf(t)),r=e.keys.filter(e=>-1===t.keys.indexOf(e)),s=[];for(const i of e.keys){const r=h(e.contents,i),o=h(t.contents,i);n.equals(r,o)||s.push(i)}return{added:i,removed:r,updated:s}},t.toOverrides=function(e,t){const n=[],i=s.Registry.as(a.Extensions.Configuration).getConfigurationProperties();for(const r of Object.keys(e))if(a.OVERRIDE_PROPERTY_PATTERN.test(r)){const s={};for(const t in e[r])i[t]&&i[t].overridable&&(s[t]=e[r][t])
;n.push({identifiers:[f(r).trim()],contents:l(s,t)})}return n},t.toValuesTree=l,t.addToValueTree=c,t.removeFromValueTree=function(e,t){u(e,t.split("."))},t.getConfigurationValue=h,t.merge=d,t.getConfigurationKeys=function(){const e=s.Registry.as(a.Extensions.Configuration).getConfigurationProperties();return Object.keys(e)},t.getDefaultValues=function(){const e=Object.create(null),t=s.Registry.as(a.Extensions.Configuration).getConfigurationProperties();for(let n in t)c(e,n,t[n].default,e=>console.error(`Conflict in default settings: ${e}`));return e},t.overrideIdentifierFromKey=f,t.keyFromOverrideIdentifier=function(e){return`[${e}]`},t.getMigratedSettingValue=function(e,t,n){const i=e.inspect(t),r=e.inspect(n);return void 0!==i.user||void 0!==i.workspace||void 0!==i.workspaceFolder?i.value:void 0!==r.user||void 0!==r.workspace||void 0!==r.workspaceFolder?r.value:i.default}}),define(e[50],t([1,0,31,26,18,10,11,25,19]),function(e,t,n,i,r,s,o,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0})
;class c{constructor(e={},t=[],n=[]){this._contents=e,this._keys=t,this._overrides=n,this.isFrozen=!1}get contents(){return this.checkAndFreeze(this._contents)}get overrides(){return this.checkAndFreeze(this._overrides)}get keys(){return this.checkAndFreeze(this._keys)}getValue(e){return e?l.getConfigurationValue(this.contents,e):this.contents}override(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||"object"!=typeof t||!Object.keys(t).length)return this;let n={};for(const e of r.distinct([...Object.keys(this.contents),...Object.keys(t)])){let i=this.contents[e],r=t[e];r&&("object"==typeof i&&"object"==typeof r?(i=o.deepClone(i),this.mergeContents(i,r)):i=r),n[e]=i}return new c(n)}merge(...e){const t=o.deepClone(this.contents),n=o.deepClone(this.overrides),i=[...this.keys];for(const s of e){this.mergeContents(t,s.contents);for(const e of s.overrides){const[t]=n.filter(t=>r.equals(t.identifiers,e.identifiers));t?this.mergeContents(t.contents,e.contents):n.push(o.deepClone(e))}
for(const e of s.keys)-1===i.indexOf(e)&&i.push(e)}return new c(t,i,n)}freeze(){return this.isFrozen=!0,this}mergeContents(e,t){for(const n of Object.keys(t))n in e&&s.isObject(e[n])&&s.isObject(t[n])?this.mergeContents(e[n],t[n]):e[n]=o.deepClone(t[n])}checkAndFreeze(e){return this.isFrozen&&!Object.isFrozen(e)?o.deepFreeze(e):e}getContentsForOverrideIdentifer(e){for(const t of this.overrides)if(-1!==t.identifiers.indexOf(e))return t.contents;return null}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,t){this.addKey(e),l.addToValueTree(this.contents,e,t,e=>{throw new Error(e)})}removeValue(e){this.removeKey(e)&&l.removeFromValueTree(this.contents,e)}addKey(e){let t=this.keys.length;for(let n=0;n<t;n++)0===e.indexOf(this.keys[n])&&(t=n);this.keys.splice(t,1,e)}removeKey(e){let t=this.keys.indexOf(e);return-1!==t&&(this.keys.splice(t,1),!0)}}t.ConfigurationModel=c;class u extends c{constructor(){const e=l.getDefaultValues(),t=l.getConfigurationKeys(),n=[]
;for(const t of Object.keys(e))a.OVERRIDE_PROPERTY_PATTERN.test(t)&&n.push({identifiers:[l.overrideIdentifierFromKey(t).trim()],contents:l.toValuesTree(e[t],e=>console.error(`Conflict in default settings file: ${e}`))});super(e,t,n)}}t.DefaultConfigurationModel=u;class h{constructor(e){this._name=e,this._configurationModel=null,this._parseErrors=[]}get configurationModel(){return this._configurationModel||new c}get errors(){return this._parseErrors}parse(e){if(e){const t=this.parseContent(e),n=this.parseRaw(t);this._configurationModel=new c(n.contents,n.keys,n.overrides)}}parseContent(e){function t(e){Array.isArray(s)?s.push(e):r&&(s[r]=e)}let i={},r=null,s=[],o=[],a=[],l={onObjectBegin:()=>{let e={};t(e),o.push(s),s=e,r=null},onObjectProperty:e=>{r=e},onObjectEnd:()=>{s=o.pop()},onArrayBegin:()=>{let e=[];t(e),o.push(s),s=e,r=null},onArrayEnd:()=>{s=o.pop()},onLiteralValue:t,onError:(e,t,n)=>{a.push({error:e,offset:t,length:n})}};if(e)try{n.visit(e,l),i=s[0]||{}}catch(e){
console.error(`Error while parsing settings file ${this._name}: ${e}`),this._parseErrors=[e]}return i}parseRaw(e){return{contents:l.toValuesTree(e,e=>console.error(`Conflict in settings file ${this._name}: ${e}`)),keys:Object.keys(e),overrides:l.toOverrides(e,e=>console.error(`Conflict in settings file ${this._name}: ${e}`))}}}t.ConfigurationModelParser=h;class d{constructor(e,t,n=new c,r=new i.ResourceMap,s=new c,o=new i.ResourceMap,a=!0){this._defaultConfiguration=e,this._userConfiguration=t,this._workspaceConfiguration=n,this._folderConfigurations=r,this._memoryConfiguration=s,this._memoryConfigurationByResource=o,this._freeze=a,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new i.ResourceMap}getValue(e,t,n){return this.getConsolidateConfigurationModel(t,n).getValue(e)}updateValue(e,t,n={}){let i;n.resource?(i=this._memoryConfigurationByResource.get(n.resource))||(i=new c,this._memoryConfigurationByResource.set(n.resource,i)):i=this._memoryConfiguration,
void 0===t?i.removeValue(e):i.setValue(e,t),n.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,t,n){const i=this.getConsolidateConfigurationModel(t,n),r=this.getFolderConfigurationModelForResource(t.resource,n),s=t.resource?this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration:this._memoryConfiguration;return{default:t.overrideIdentifier?this._defaultConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this._defaultConfiguration.freeze().getValue(e),user:t.overrideIdentifier?this._userConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this._userConfiguration.freeze().getValue(e),workspace:n?t.overrideIdentifier?this._workspaceConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this._workspaceConfiguration.freeze().getValue(e):void 0,workspaceFolder:r?t.overrideIdentifier?r.freeze().override(t.overrideIdentifier).getValue(e):r.freeze().getValue(e):void 0,
memory:t.overrideIdentifier?s.override(t.overrideIdentifier).getValue(e):s.getValue(e),value:i.getValue(e)}}keys(e){const t=this.getFolderConfigurationModelForResource(void 0,e);return{default:this._defaultConfiguration.freeze().keys,user:this._userConfiguration.freeze().keys,workspace:this._workspaceConfiguration.freeze().keys,workspaceFolder:t?t.freeze().keys:[]}}updateDefaultConfiguration(e){this._defaultConfiguration=e,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateUserConfiguration(e){this._userConfiguration=e,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateWorkspaceConfiguration(e){this._workspaceConfiguration=e,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updateFolderConfiguration(e,t){this._folderConfigurations.set(e,t),this._foldersConsolidatedConfigurations.delete(e)}deleteFolderConfiguration(e){this.folders.delete(e),
this._foldersConsolidatedConfigurations.delete(e)}get defaults(){return this._defaultConfiguration}get user(){return this._userConfiguration}get workspace(){return this._workspaceConfiguration}get folders(){return this._folderConfigurations}getConsolidateConfigurationModel(e,t){let n=this.getConsolidatedConfigurationModelForResource(e,t);return e.overrideIdentifier?n.override(e.overrideIdentifier):n}getConsolidatedConfigurationModelForResource({resource:e},t){let n=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const i=t.getFolder(e);i&&(n=this.getFolderConsolidatedConfiguration(i.uri)||n);const r=this._memoryConfigurationByResource.get(e);r&&(n=n.merge(r))}return n}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this._userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),
this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const n=this.getWorkspaceConsolidatedConfiguration(),i=this._folderConfigurations.get(e);i?(t=n.merge(i),this._freeze&&(t=t.freeze()),this._foldersConsolidatedConfigurations.set(e,t)):t=n}return t}getFolderConfigurationModelForResource(e,t){if(t&&e){const n=t.getFolder(e);if(n)return this._folderConfigurations.get(n.uri)||null}return null}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},user:{contents:this._userConfiguration.contents,overrides:this._userConfiguration.overrides,keys:this._userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:this._folderConfigurations.keys().reduce((e,t)=>{
const{contents:n,overrides:i,keys:r}=this._folderConfigurations.get(t);return e[t.toString()]={contents:n,overrides:i,keys:r},e},Object.create({})),isComplete:!0}}allKeys(e){let t=this.keys(e),n=[...t.default];const i=e=>{for(const t of e)-1===n.indexOf(t)&&n.push(t)};i(t.user),i(t.workspace);for(const e of this.folders.keys())i(this.folders.get(e).keys);return n}}t.Configuration=d;class f{doesConfigurationContains(e,t){let n,i=e.contents,r=l.toValuesTree({[t]:!0},()=>{});for(;"object"==typeof r&&(n=Object.keys(r)[0]);){if(!(i=i[n]))return!1;r=r[n]}return!0}updateKeys(e,t,n){for(const n of t)e.setValue(n,{})}}t.AbstractConfigurationChangeEvent=f;class g extends f{constructor(e=new c,t=new i.ResourceMap){super(),this._changedConfiguration=e,this._changedConfigurationByResource=t}get changedConfiguration(){return this._changedConfiguration}get changedConfigurationByResource(){return this._changedConfigurationByResource}change(e,t){if(e instanceof g){
this._changedConfiguration=this._changedConfiguration.merge(e._changedConfiguration);for(const t of e._changedConfigurationByResource.keys()){let n=this.getOrSetChangedConfigurationForResource(t);n=n.merge(e._changedConfigurationByResource.get(t)),this._changedConfigurationByResource.set(t,n)}}else this.changeWithKeys(e,t);return this}telemetryData(e,t){return this._source=e,this._sourceConfig=t,this}get affectedKeys(){const e=[...this._changedConfiguration.keys];return this._changedConfigurationByResource.forEach(t=>e.push(...t.keys)),r.distinct(e)}get source(){return this._source}get sourceConfig(){return this._sourceConfig}affectsConfiguration(e,t){let n=[this._changedConfiguration];if(t){let e=this._changedConfigurationByResource.get(t);e&&n.push(e)}else n.push(...this._changedConfigurationByResource.values());for(const t of n)if(this.doesConfigurationContains(t,e))return!0;return!1}changeWithKeys(e,t){let n=t?this.getOrSetChangedConfigurationForResource(t):this._changedConfiguration;this.updateKeys(n,e)}
getOrSetChangedConfigurationForResource(e){let t=this._changedConfigurationByResource.get(e);return t||(t=new c,this._changedConfigurationByResource.set(e,t)),t}}t.ConfigurationChangeEvent=g}),define(e[105],t([1,0,3,7,50,100,4]),function(e,t,n,i,r,s,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class a extends n.Disposable{constructor(e){super(),this.settingsPath=e,this._onDidChangeConfiguration=this._register(new o.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event}initialize(){return this.initializePromise||(this.initializePromise=new Promise((e,t)=>{this.userConfigModelWatcher=new s.ConfigWatcher(this.settingsPath,{changeBufferDelay:300,onError:e=>i.onUnexpectedError(e),defaultConfig:new r.ConfigurationModelParser(this.settingsPath),parse:(e,t)=>{const n=new r.ConfigurationModelParser(this.settingsPath);return n.parse(e),[...n.errors],n},initCallback:()=>e(void 0)}),this._register(this.userConfigModelWatcher),
this._register(this.userConfigModelWatcher.onDidUpdateConfiguration(()=>this._onDidChangeConfiguration.fire(this.userConfigModelWatcher.getConfig().configurationModel)))})),this.initializePromise.then(()=>this.userConfigModelWatcher.getConfig().configurationModel)}initializeSync(){return this.initialize(),this.userConfigModelWatcher.getConfig().configurationModel}reload(){return this.initialize().then(()=>new Promise(e=>this.userConfigModelWatcher.reload(t=>e(t.configurationModel))))}}t.UserConfiguration=a}),define(e[106],t([1,0,22,25,3,19,50,4,17,105]),function(e,t,n,s,o,a,l,c,u,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let d=class extends o.Disposable{constructor(e){super(),this._onDidChangeConfiguration=this._register(new c.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this.userConfiguration=this._register(new h.UserConfiguration(e.appSettingsPath));const t=new l.DefaultConfigurationModel,i=this.userConfiguration.initializeSync()
;this._configuration=new l.Configuration(t,i),this._register(this.userConfiguration.onDidChangeConfiguration(e=>this.onDidChangeUserConfiguration(e))),this._register(n.Registry.as(s.Extensions.Configuration).onDidUpdateConfiguration(e=>this.onDidDefaultConfigurationChange(e)))}get configuration(){return this._configuration}getConfigurationData(){return this.configuration.toData()}getValue(e,t){const n="string"==typeof e?e:void 0,i=a.isConfigurationOverrides(e)?e:a.isConfigurationOverrides(t)?t:{};return this.configuration.getValue(n,i,void 0)}updateValue(e,t,n,i){return Promise.reject(new Error("not supported"))}inspect(e){return this.configuration.inspect(e,{},void 0)}keys(){return this.configuration.keys(void 0)}reloadConfiguration(e){return e?Promise.resolve(void 0):this.userConfiguration.reload().then(e=>this.onDidChangeUserConfiguration(e))}onDidChangeUserConfiguration(e){const{added:t,updated:n,removed:i}=a.compare(this._configuration.user,e),r=[...t,...n,...i]
;r.length&&(this._configuration.updateUserConfiguration(e),this.trigger(r,1))}onDidDefaultConfigurationChange(e){this._configuration.updateDefaultConfiguration(new l.DefaultConfigurationModel),this.trigger(e,4)}trigger(e,t){this._onDidChangeConfiguration.fire((new l.ConfigurationChangeEvent).change(e).telemetryData(t,this.getTargetConfiguration(t)))}getTargetConfiguration(e){switch(e){case 4:return this._configuration.defaults.contents;case 1:return this._configuration.user.contents}return{}}};d=i([r(0,u.IEnvironmentService)],d),t.ConfigurationService=d}),define(e[35],t([1,0,64,6,25,22]),function(e,t,n,i,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IRequestService=i.createDecorator("requestService2"),s.Registry.as(r.Extensions.Configuration).registerConfiguration({id:"http",order:15,title:n.localize(0,null),type:"object",properties:{"http.proxy":{type:"string",pattern:"^https?://([^:]*(:[^@]*)?@)?([^:]+)(:\\d+)?/?$|^$",description:n.localize(1,null)},"http.proxyStrictSSL":{
type:"boolean",default:!0,description:n.localize(2,null)},"http.proxyAuthorization":{type:["null","string"],default:null,description:n.localize(3,null)},"http.proxySupport":{type:"string",enum:["off","on","override"],enumDescriptions:[n.localize(4,null),n.localize(5,null),n.localize(6,null)],default:"override",description:n.localize(7,null)}}})}),define(e[39],t([1,0,6]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITelemetryService=n.createDecorator("telemetryService")}),define(e[109],t([1,0,65,9,6,19,25,3,11,22]),function(e,t,n,s,o,a,l,c,u,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let d=class{constructor(e,t){this._configurationService=t,this._disposables=[],this._cleanupPatterns=[],this._appender=e.appender,this._commonProperties=e.commonProperties||Promise.resolve({}),this._piiPaths=e.piiPaths||[],this._userOptIn=!0,this._cleanupPatterns=[/file:\/\/\/.*?\/resources\/app\//gi]
;for(let e of this._piiPaths)this._cleanupPatterns.push(new RegExp(s.escapeRegExpCharacters(e),"gi"));this._configurationService&&(this._updateUserOptIn(),this._configurationService.onDidChangeConfiguration(this._updateUserOptIn,this,this._disposables),this.publicLog("optInStatus",{optIn:this._userOptIn}),this._commonProperties.then(e=>{const t=/^[a-f0-9]+$/i.test(e["common.machineId"]);this.publicLog("machineIdFallback",{usingFallbackGuid:!t})}))}_updateUserOptIn(){const e=this._configurationService.getValue(f);this._userOptIn=e?e.enableTelemetry:this._userOptIn}get isOptedIn(){return this._userOptIn}getTelemetryInfo(){return this._commonProperties.then(e=>{return{sessionId:e.sessionID,instanceId:e["common.instanceId"],machineId:e["common.machineId"]}})}dispose(){this._disposables=c.dispose(this._disposables)}publicLog(e,t,n){return this._userOptIn?this._commonProperties.then(i=>{t=u.mixin(t,i),t=u.cloneAndChange(t,e=>{if("string"==typeof e)return this._cleanupInfo(e,n)}),this._appender.log(e,t)},e=>{
console.error(e)}):Promise.resolve(void 0)}_cleanupInfo(e,t){let n=e;if(t){const t=[];for(let n of this._cleanupPatterns)for(;;){const i=n.exec(e);if(!i)break;t.push([i.index,n.lastIndex])}const i=/^[\\\/]?(node_modules|node_modules\.asar)[\\\/]/,r=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-\._]+(\\\\|\\|\/))+[\w-\._]*/g;let s=0;for(n="";;){const o=r.exec(e);if(!o)break;!i.test(o[0])&&t.every(([e,t])=>o.index<e||o.index>=t)&&(n+=e.substring(s,o.index)+"<REDACTED: user-file-path>",s=r.lastIndex)}s<e.length&&(n+=e.substr(s))}for(let e of this._cleanupPatterns)n=n.replace(e,"");return n}};d.IDLE_START_EVENT_NAME="UserIdleStart",d.IDLE_STOP_EVENT_NAME="UserIdleStop",d=i([r(1,o.optional(a.IConfigurationService))],d),t.TelemetryService=d;const f="telemetry";h.Registry.as(l.Extensions.Configuration).registerConfiguration({id:f,order:110,type:"object",title:n.localize(0,null),properties:{"telemetry.enableTelemetry":{type:"boolean",description:n.localize(1,null),default:!0,tags:["usesOnlineServices"]}}})
}),define(e[110],t([1,0,119,2,19,15]),function(e,t,n,s,o,a){"use strict";function l(e,t){return t.onDidChangeConfiguration(t=>{4!==t.source&&(e.publicLog("updateConfiguration",{configurationSource:o.ConfigurationTargetToString(t.source),configurationKeys:function(e){if(!e)return[];const t=[];return c(t,"",e),t}(t.sourceConfig)}),e.publicLog("updateConfigurationValues",{configurationSource:o.ConfigurationTargetToString(t.source),configurationValues:function(e,t){if(!e)return[];return t.reduce((t,n)=>{const i=n.split(".").reduce((e,t)=>e&&"object"==typeof e?e[t]:void 0,e);return void 0!==i&&t.push({[n]:i}),t},[])}(t.sourceConfig,h)}))})}function c(e,t,n){n&&"object"==typeof n&&!Array.isArray(n)?Object.keys(n).forEach(i=>c(e,t?`${t}.${i}`:i,n[i])):e.push(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.NullTelemetryService=new class{publicLog(e,t){return Promise.resolve(void 0)}getTelemetryInfo(){return Promise.resolve({instanceId:"someValue.instanceId",sessionId:"someValue.sessionId",
machineId:"someValue.machineId"})}},t.combinedAppender=function(...e){return{log:(t,n)=>e.forEach(e=>e.log(t,n)),dispose:()=>Promise.all(e.map(e=>e.dispose()))}},t.NullAppender={log:()=>null,dispose:()=>Promise.resolve(null)};let u=class{constructor(e){this._logService=e,this.commonPropertiesRegex=/^sessionID$|^version$|^timestamp$|^commitHash$|^common\./}dispose(){return Promise.resolve(void 0)}log(e,t){const n={};Object.keys(t).forEach(e=>{this.commonPropertiesRegex.test(e)||(n[e]=t[e])}),this._logService.trace(`telemetry/${e}`,n)}};u=i([r(0,a.ILogService)],u),t.LogAppender=u,t.telemetryURIDescriptor=function(e,t){const i=e&&e.fsPath;return i?{mimeType:n.guessMimeTypes(i).join(", "),scheme:e.scheme,ext:s.extname(i),path:t(i)}:{}}
;const h=["editor.fontFamily","editor.fontWeight","editor.fontSize","editor.lineHeight","editor.letterSpacing","editor.lineNumbers","editor.rulers","editor.wordSeparators","editor.tabSize","editor.indentSize","editor.insertSpaces","editor.detectIndentation","editor.roundedSelection","editor.scrollBeyondLastLine","editor.minimap.enabled","editor.minimap.side","editor.minimap.renderCharacters","editor.minimap.maxColumn","editor.find.seedSearchStringFromSelection","editor.find.autoFindInSelection","editor.wordWrap","editor.wordWrapColumn","editor.wrappingIndent","editor.mouseWheelScrollSensitivity","editor.multiCursorModifier","editor.quickSuggestions","editor.quickSuggestionsDelay","editor.parameterHints.enabled","editor.parameterHints.cycle","editor.autoClosingBrackets","editor.autoClosingQuotes","editor.autoSurround","editor.autoIndent","editor.formatOnType","editor.formatOnPaste","editor.suggestOnTriggerCharacters","editor.acceptSuggestionOnEnter","editor.acceptSuggestionOnCommitCharacter","editor.snippetSuggestions","editor.emptySelectionClipboard","editor.wordBasedSuggestions","editor.suggestSelection","editor.suggestFontSize","editor.suggestLineHeight","editor.tabCompletion","editor.selectionHighlight","editor.occurrencesHighlight","editor.overviewRulerLanes","editor.overviewRulerBorder","editor.cursorBlinking","editor.cursorSmoothCaretAnimation","editor.cursorStyle","editor.mouseWheelZoom","editor.fontLigatures","editor.hideCursorInOverviewRuler","editor.renderWhitespace","editor.renderControlCharacters","editor.renderIndentGuides","editor.renderLineHighlight","editor.codeLens","editor.folding","editor.showFoldingControls","editor.matchBrackets","editor.glyphMargin","editor.useTabStops","editor.trimAutoWhitespace","editor.stablePeek","editor.dragAndDrop","editor.formatOnSave","editor.colorDecorators","breadcrumbs.enabled","breadcrumbs.filePath","breadcrumbs.symbolPath","breadcrumbs.symbolSortOrder","breadcrumbs.useQuickPick","explorer.openEditors.visible","extensions.autoUpdate","files.associations","files.autoGuessEncoding","files.autoSave","files.autoSaveDelay","files.encoding","files.eol","files.hotExit","files.trimTrailingWhitespace","git.confirmSync","git.enabled","http.proxyStrictSSL","javascript.validate.enable","php.builtInCompletions.enable","php.validate.enable","php.validate.run","terminal.integrated.fontFamily","window.openFilesInNewWindow","window.restoreWindows","window.zoomLevel","workbench.editor.enablePreview","workbench.editor.enablePreviewFromQuickOpen","workbench.editor.showTabs","workbench.editor.highlightModifiedTabs","workbench.editor.swipeToNavigate","workbench.sideBar.location","workbench.startupEditor","workbench.statusBar.visible","workbench.welcome.enabled"]
;t.configurationTelemetry=l,t.keybindingsTelemetry=function(e,t){return t.onDidUpdateKeybindings(t=>{2===t.source&&t.keybindings&&e.publicLog("updateKeybindings",{bindings:t.keybindings.map(e=>({key:e.key,command:e.command,when:e.when,args:!!e.args||void 0}))})})}}),define(e[111],t([1,0,126,10,11,15]),function(e,t,n,s,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let l=class e{constructor(e,t,i,r){this._eventPrefix=e,this._defaultData=t,this._logService=r,this._defaultData||(this._defaultData=Object.create(null)),"string"==typeof i?this._aiClient=function(e){let t;return n.defaultClient?(t=new n.TelemetryClient(e)).channel.setUseDiskRetryCaching(!0):(n.setup(e).setAutoCollectRequests(!1).setAutoCollectPerformance(!1).setAutoCollectExceptions(!1).setAutoCollectDependencies(!1).setAutoDependencyCorrelation(!1).setAutoCollectConsole(!1).setInternalLogging(!1,!1).setUseDiskRetryCaching(!0).start(),t=n.defaultClient),
0===e.indexOf("AIF-")&&(t.config.endpointUrl="https://vortex.data.microsoft.com/collect/v1"),t}(i):"function"==typeof i&&(this._aiClient=i())}static _getData(t){const n=Object.create(null),i=Object.create(null),r=Object.create(null);e._flaten(t,r);for(let e in r){const t=r[e=e.length>150?e.substr(e.length-149):e];"number"==typeof t?i[e]=t:"boolean"==typeof t?i[e]=t?1:0:"string"==typeof t?n[e]=t.substring(0,1023):void 0!==t&&null!==t&&(n[e]=t)}return{properties:n,measurements:i}}static _flaten(t,n,i=0,r){if(t)for(let a of Object.getOwnPropertyNames(t)){const l=t[a],c=r?r+a:a;Array.isArray(l)?n[c]=o.safeStringify(l):l instanceof Date?n[c]=l.toISOString():s.isObject(l)?i<2?e._flaten(l,n,i+1,c+"."):n[c]=o.safeStringify(l):n[c]=l}}log(t,n){this._aiClient&&(n=o.mixin(n,this._defaultData),n=e._getData(n),this._logService&&this._logService.trace(`telemetry/${t}`,n),this._aiClient.trackEvent({name:this._eventPrefix+"/"+t,properties:n.properties,measurements:n.measurements}))}dispose(){
if(this._aiClient)return new Promise(e=>{this._aiClient.flush({callback:()=>{this._aiClient=void 0,e(void 0)}})})}};l=i([r(3,a.ILogService)],l),t.AppInsightsAppender=l}),define(e[113],t([1,0,5,32,28,8]),function(e,t,n,i,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveCommonProperties=function(e,t,o,a){const l=Object.create(null);l["common.machineId"]=o,l.sessionID=r.generateUuid()+Date.now(),l.commitHash=e,l.version=t,l["common.platformVersion"]=(i.release()||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),l["common.platform"]=n.PlatformToString(n.platform),l["common.nodePlatform"]=process.platform,l["common.nodeArch"]=process.arch;let c=0;const u=Date.now();return Object.defineProperties(l,{timestamp:{get:()=>new Date,enumerable:!0},"common.timesincesessionstart":{get:()=>Date.now()-u,enumerable:!0},"common.sequence":{get:()=>c++,enumerable:!0}}),s.readFile(a,"utf8").then(e=>(l["common.source"]=e.slice(0,30),l),e=>l)}}),define(e[114],t([1,0]),function(e,t){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(e){this.appender=e}listen(e,t){throw new Error(`Event not found: ${t}`)}call(e,t,{eventName:n,data:i}){return this.appender.log(n,i),Promise.resolve(null)}}t.TelemetryAppenderChannel=n;class i{constructor(e){this.channel=e}log(e,t){return this.channel.call("log",{eventName:e,data:t}).then(void 0,e=>`Failed to log telemetry: ${console.warn(e)}`),Promise.resolve(null)}dispose(){}}t.TelemetryAppenderClient=i}),define(e[115],t([1,0,6,4,5,3]),function(e,t,n,s,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWindowsService=n.createDecorator("windowsService"),t.IWindowService=n.createDecorator("windowService"),t.getTitleBarStyle=function(e,t,n=t.isExtensionDevelopment){const i=e.getValue("window"),r=!t.isBuilt||n;if(o.isMacintosh&&r)return"native";if(i){if(o.isMacintosh&&!0===i.nativeTabs)return"native";if(o.isMacintosh&&!1===i.nativeFullScreen)return"native";const e=i.titleBarStyle;if("native"===e||"custom"===e)return e}
return o.isLinux?"native":"custom"};!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={}));let l=class{constructor(e){this.disposables=[];s.Event.latch(s.Event.any(e.onWindowOpen,e.onWindowFocus))(this.setActiveWindow,this,this.disposables),this.firstActiveWindowIdPromise=e.getActiveWindowId().then(e=>void 0===this._activeWindowId&&this.setActiveWindow(e))}setActiveWindow(e){this.firstActiveWindowIdPromise&&(this.firstActiveWindowIdPromise=null),this._activeWindowId=e}getActiveClientId(){return this.firstActiveWindowIdPromise?this.firstActiveWindowIdPromise:Promise.resolve(`window:${this._activeWindowId}`)}dispose(){this.disposables=a.dispose(this.disposables)}};l=i([r(0,t.IWindowsService)],l),t.ActiveWindowManager=l}),
define(e[116],t([1,0,6,54,12,5,2,34,83,31,20,66,36]),function(e,t,n,i,r,s,o,a,l,c,u,h,d){"use strict";function f(e){return g(e)||p(e)}function g(e){return e&&"object"==typeof e&&"string"==typeof e.path&&(!e.name||"string"==typeof e.name)}function p(e){return e&&"object"==typeof e&&"string"==typeof e.uri&&(!e.name||"string"==typeof e.name)}function m(e){return e instanceof r.URI}function v(e,t,n,i=!s.isWindows){if(e.scheme!==n.scheme||!a.isEqualAuthority(e.authority,n.authority))return{name:t,uri:e.toString(!0)};let r;return a.isEqualOrParent(e,n)?(r=a.relativePath(n,e)||".",s.isWindows&&e.scheme===u.Schemas.file&&!i&&(r=r.replace(/\//g,"\\"))):e.scheme===u.Schemas.file?(r=e.fsPath,s.isWindows&&(r=h.normalizeDriveLetter(r),i&&(r=d.toSlashes(r)))):r=e.path,{name:t,path:r}}function y(e,t,n){let i=function(e,t){let n=c.parse(t);Array.isArray(n.folders)&&(n.folders=n.folders.filter(e=>f(e)));if(!Array.isArray(n.folders))throw new Error(`${e} looks like an invalid workspace file.`);return n}(t,e)
;const o=a.dirname(t),u=a.dirname(n),h=[],d=_(i.folders);for(const e of i.folders){let t=g(e)?a.resolvePath(o,e.path):r.URI.parse(e.uri);h.push(v(t,e.name,u,d))}let p=e;return l.setProperty(e,["folders"],h,{insertSpaces:!1,tabSize:4,eol:s.isLinux||s.isMacintosh?"\n":"\r\n"}).forEach(t=>{p=l.applyEdit(e,t)}),p}function _(e){if(s.isWindows){for(const t of e)if(g(t)&&t.path.indexOf(w)>=0)return!0;return!1}return!0}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:i.localize(0,null),extensions:[t.WORKSPACE_EXTENSION]}],t.UNTITLED_WORKSPACE_NAME="workspace.json",t.reviveWorkspaceIdentifier=function(e){return{id:e.id,configPath:r.URI.revive(e.configPath)}},t.isStoredWorkspaceFolder=f,t.isRawFileWorkspaceFolder=g,t.isRawUriWorkspaceFolder=p,t.isSingleFolderWorkspaceIdentifier=m,t.isWorkspaceIdentifier=function(e){const t=e
;return t&&"string"==typeof t.id&&t.configPath instanceof r.URI},t.toWorkspaceIdentifier=function(e){return e.configuration?{configPath:e.configuration,id:e.id}:1===e.folders.length?e.folders[0].uri:void 0},t.isSingleFolderWorkspaceInitializationPayload=function(e){return m(e.folder)};const E="."+t.WORKSPACE_EXTENSION;t.hasWorkspaceFileExtension=function(e){return o.extname(e)===E};const w="/";t.getStoredWorkspaceFolder=v,t.rewriteWorkspaceFileForNewLocation=y,t.useSlashForPath=_}),define(e[117],t([1,0,4,116,12]),function(e,t,n,i,r){"use strict";function s(e){return e&&e.configPath}Object.defineProperty(t,"__esModule",{value:!0});class o{constructor(e){this.service=e,this.onWindowOpen=n.Event.buffer(e.onWindowOpen,!0),this.onWindowFocus=n.Event.buffer(e.onWindowFocus,!0),this.onWindowBlur=n.Event.buffer(e.onWindowBlur,!0),this.onWindowMaximize=n.Event.buffer(e.onWindowMaximize,!0),this.onWindowUnmaximize=n.Event.buffer(e.onWindowUnmaximize,!0),
this.onRecentlyOpenedChange=n.Event.buffer(e.onRecentlyOpenedChange,!0)}listen(e,t){switch(t){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(`Event not found: ${t}`)}call(e,t,n){switch(t){case"pickFileFolderAndOpen":return this.service.pickFileFolderAndOpen(n);case"pickFileAndOpen":return this.service.pickFileAndOpen(n);case"pickFolderAndOpen":return this.service.pickFolderAndOpen(n);case"pickWorkspaceAndOpen":return this.service.pickWorkspaceAndOpen(n);case"showMessageBox":return this.service.showMessageBox(n[0],n[1]);case"showSaveDialog":return this.service.showSaveDialog(n[0],n[1]);case"showOpenDialog":return this.service.showOpenDialog(n[0],n[1]);case"reloadWindow":return this.service.reloadWindow(n[0],n[1]);case"openDevTools":
return this.service.openDevTools(n[0],n[1]);case"toggleDevTools":return this.service.toggleDevTools(n);case"closeWorkspace":return this.service.closeWorkspace(n);case"enterWorkspace":return this.service.enterWorkspace(n[0],r.URI.revive(n[1]));case"toggleFullScreen":return this.service.toggleFullScreen(n);case"setRepresentedFilename":return this.service.setRepresentedFilename(n[0],n[1]);case"addRecentlyOpened":return this.service.addRecentlyOpened(n.map(r.URI.revive));case"removeFromRecentlyOpened":{let e=n;return Array.isArray(e)&&(e=e.map(e=>s(e)?i.reviveWorkspaceIdentifier(e):"string"==typeof e?e:r.URI.revive(e))),this.service.removeFromRecentlyOpened(e)}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(n[0],n[1]);case"getRecentlyOpened":return this.service.getRecentlyOpened(n);case"focusWindow":return this.service.focusWindow(n);case"closeWindow":return this.service.closeWindow(n);case"isFocused":return this.service.isFocused(n);case"isMaximized":return this.service.isMaximized(n);case"maximizeWindow":return this.service.maximizeWindow(n);case"unmaximizeWindow":return this.service.unmaximizeWindow(n);case"minimizeWindow":return this.service.minimizeWindow(n);case"onWindowTitleDoubleClick":return this.service.onWindowTitleDoubleClick(n);case"setDocumentEdited":return this.service.setDocumentEdited(n[0],n[1]);case"openWindow":return this.service.openWindow(n[0],n[1]?n[1].map(e=>({uri:r.URI.revive(e.uri),typeHint:e.typeHint})):n[1],n[2]);case"openNewWindow":return this.service.openNewWindow(n);case"showWindow":
return this.service.showWindow(n);case"getWindows":return this.service.getWindows();case"getWindowCount":return this.service.getWindowCount();case"relaunch":return this.service.relaunch(n[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(n[0],n[1]);case"showItemInFolder":return this.service.showItemInFolder(n);case"getActiveWindowId":return this.service.getActiveWindowId();case"openExternal":return this.service.openExternal(n);case"startCrashReporter":return this.service.startCrashReporter(n);case"openAboutDialog":return this.service.openAboutDialog();case"resolveProxy":return this.service.resolveProxy(n[0],n[1])}throw new Error(`Call not found: ${t}`)}}t.WindowsChannel=o;class a{constructor(e){this.channel=e}get onWindowOpen(){return this.channel.listen("onWindowOpen")}get onWindowFocus(){return this.channel.listen("onWindowFocus")}
get onWindowBlur(){return this.channel.listen("onWindowBlur")}get onWindowMaximize(){return this.channel.listen("onWindowMaximize")}get onWindowUnmaximize(){return this.channel.listen("onWindowUnmaximize")}get onRecentlyOpenedChange(){return this.channel.listen("onRecentlyOpenedChange")}pickFileFolderAndOpen(e){return this.channel.call("pickFileFolderAndOpen",e)}pickFileAndOpen(e){return this.channel.call("pickFileAndOpen",e)}pickFolderAndOpen(e){return this.channel.call("pickFolderAndOpen",e)}pickWorkspaceAndOpen(e){return this.channel.call("pickWorkspaceAndOpen",e)}showMessageBox(e,t){return this.channel.call("showMessageBox",[e,t])}showSaveDialog(e,t){return this.channel.call("showSaveDialog",[e,t])}showOpenDialog(e,t){return this.channel.call("showOpenDialog",[e,t])}reloadWindow(e,t){return this.channel.call("reloadWindow",[e,t])}openDevTools(e,t){return this.channel.call("openDevTools",[e,t])}toggleDevTools(e){return this.channel.call("toggleDevTools",e)}closeWorkspace(e){
return this.channel.call("closeWorkspace",e)}enterWorkspace(e,t){return this.channel.call("enterWorkspace",[e,t]).then(e=>({backupPath:e.backupPath,workspace:i.reviveWorkspaceIdentifier(e.workspace)}))}toggleFullScreen(e){return this.channel.call("toggleFullScreen",e)}setRepresentedFilename(e,t){return this.channel.call("setRepresentedFilename",[e,t])}addRecentlyOpened(e){return this.channel.call("addRecentlyOpened",e)}removeFromRecentlyOpened(e){return this.channel.call("removeFromRecentlyOpened",e)}clearRecentlyOpened(){return this.channel.call("clearRecentlyOpened")}getRecentlyOpened(e){return this.channel.call("getRecentlyOpened",e).then(e=>(e.workspaces=e.workspaces.map(e=>s(e)?i.reviveWorkspaceIdentifier(e):r.URI.revive(e)),e.files=e.files.map(r.URI.revive),e))}newWindowTab(){return this.channel.call("newWindowTab")}showPreviousWindowTab(){return this.channel.call("showPreviousWindowTab")}showNextWindowTab(){return this.channel.call("showNextWindowTab")}moveWindowTabToNewWindow(){
return this.channel.call("moveWindowTabToNewWindow")}mergeAllWindowTabs(){return this.channel.call("mergeAllWindowTabs")}toggleWindowTabsBar(){return this.channel.call("toggleWindowTabsBar")}focusWindow(e){return this.channel.call("focusWindow",e)}closeWindow(e){return this.channel.call("closeWindow",e)}isFocused(e){return this.channel.call("isFocused",e)}isMaximized(e){return this.channel.call("isMaximized",e)}maximizeWindow(e){return this.channel.call("maximizeWindow",e)}unmaximizeWindow(e){return this.channel.call("unmaximizeWindow",e)}minimizeWindow(e){return this.channel.call("minimizeWindow",e)}onWindowTitleDoubleClick(e){return this.channel.call("onWindowTitleDoubleClick",e)}setDocumentEdited(e,t){return this.channel.call("setDocumentEdited",[e,t])}quit(){return this.channel.call("quit")}relaunch(e){return this.channel.call("relaunch",[e])}whenSharedProcessReady(){return this.channel.call("whenSharedProcessReady")}toggleSharedProcess(){return this.channel.call("toggleSharedProcess")}openWindow(e,t,n){
return this.channel.call("openWindow",[e,t,n])}openNewWindow(e){return this.channel.call("openNewWindow",e)}showWindow(e){return this.channel.call("showWindow",e)}getWindows(){return this.channel.call("getWindows").then(e=>{for(const t of e)t.folderUri&&(t.folderUri=r.URI.revive(t.folderUri)),t.workspace&&(t.workspace=i.reviveWorkspaceIdentifier(t.workspace));return e})}getWindowCount(){return this.channel.call("getWindowCount")}log(e,...t){return this.channel.call("log",[e,t])}showItemInFolder(e){return this.channel.call("showItemInFolder",e)}getActiveWindowId(){return this.channel.call("getActiveWindowId")}openExternal(e){return this.channel.call("openExternal",e)}startCrashReporter(e){return this.channel.call("startCrashReporter",e)}updateTouchBar(e,t){return this.channel.call("updateTouchBar",[e,t])}openAboutDialog(){return this.channel.call("openAboutDialog")}resolveProxy(e,t){return Promise.resolve(this.channel.call("resolveProxy",[e,t]))}}t.WindowsChannelClient=a}),
define(e[53],t([1,0,57,2,23,16,8,124,122,4]),function(e,t,n,i,r,s,o,a,l,c){"use strict";function u(e,t,a,l){let u=s.createCancelablePromise(()=>Promise.resolve()),h=0;return c.Event.once(l.onCancellationRequested)(()=>{u.cancel(),e.close()}),new Promise((d,g)=>{const p=new s.Sequencer,m=t=>{t.isCancellationRequested||(h++,e.readEntry())};e.once("error",g),e.once("close",()=>u.then(()=>{l.isCancellationRequested||e.entryCount===h?d():g(new f("Incomplete",new Error(n.localize(1,null,h,e.entryCount))))},g)),e.readEntry(),e.on("entry",h=>{if(l.isCancellationRequested)return;if(!a.sourcePathRegex.test(h.fileName))return void m(l);const d=h.fileName.replace(a.sourcePathRegex,"");if(/\/$/.test(d)){const e=i.join(t,d);return void(u=s.createCancelablePromise(t=>o.mkdirp(e,void 0,t).then(()=>m(t)).then(void 0,g)))}const f=s.ninvoke(e,e.openReadStream,h),v=function(e){let t=e.externalFileAttributes>>16||33188;return[448,56,7].map(e=>t&e).reduce((e,t)=>e+t,61440&t)}(h)
;u=s.createCancelablePromise(e=>p.queue(()=>f.then(s=>(function(e,t,s,a,l,u){const h=i.dirname(t),d=i.join(a,h);if(0!==d.indexOf(a))return Promise.reject(new Error(n.localize(0,null,t)));const f=i.join(a,t);let g;return c.Event.once(u.onCancellationRequested)(()=>{g&&g.destroy()}),Promise.resolve(o.mkdirp(d,void 0,u)).then(()=>new Promise((t,n)=>{if(!u.isCancellationRequested)try{(g=r.createWriteStream(f,{mode:s})).once("close",()=>t()),g.once("error",n),e.once("error",n),e.pipe(g)}catch(e){n(e)}}))})(s,d,v,t,0,e).then(()=>m(e)))).then(null,g))})})}function h(e,t=!1){return s.nfcall(a.open,e,t?{lazyEntries:!0}:void 0).then(void 0,e=>Promise.reject(function(e){if(e instanceof f)return e;let t=void 0;return/end of central directory record signature not found/.test(e.message)&&(t="CorruptZip"),new f(t,e)}(e)))}function d(e,t){return function(e,t){return h(e).then(e=>new Promise((i,r)=>{e.on("entry",n=>{n.fileName===t&&s.ninvoke(e,e.openReadStream,n).then(e=>i(e),e=>r(e))}),
e.once("close",()=>r(new Error(n.localize(2,null,t))))}))}(e,t).then(e=>new Promise((t,n)=>{const i=[];e.once("error",n),e.on("data",e=>i.push(e)),e.on("end",()=>t(Buffer.concat(i)))}))}Object.defineProperty(t,"__esModule",{value:!0});class f extends Error{constructor(e,t){let n=t.message;switch(e){case"CorruptZip":n=`Corrupt ZIP: ${n}`}super(n),this.type=e,this.cause=t}}t.ExtractError=f,t.zip=function(e,t){return new Promise((n,i)=>{const s=new l.ZipFile;t.forEach(e=>{e.contents?s.addBuffer("string"==typeof e.contents?Buffer.from(e.contents,"utf8"):e.contents,e.path):e.localPath&&s.addFile(e.localPath,e.path)}),s.end();const o=r.createWriteStream(e);s.outputStream.pipe(o),s.outputStream.once("error",i),o.once("error",i),o.once("finish",()=>n(e))})},t.extract=function(e,t,n={},i){const r=new RegExp(n.sourcePath?`^${n.sourcePath}`:"");let s=h(e,!0);return n.overwrite&&(s=s.then(e=>o.rimraf(t).then(()=>e))),s.then(e=>u(e,t,{sourcePathRegex:r},i))},t.buffer=d}),define(e[121],t([1,0,53,62]),function(e,t,n,i){
"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getManifest=function(e){return n.buffer(e,"extension/package.json").then(e=>{try{return JSON.parse(e.toString("utf8"))}catch(e){throw new Error(i.localize(0,null))}})}}),define(e[120],t([1,0,61,2,8,11,3,18,53,33,27,68,17,16,4,123,12,29,5,15,72,69,40,39,45,32,28,41,6,20,30,24,121,46,19,98]),function(e,t,s,o,a,l,c,u,h,d,f,g,p,m,v,y,_,E,w,C,b,x,S,P,k,I,O,D,A,L,T,R,j,M,F,U){"use strict";function N(e){return new Promise((t,n)=>{try{const i=JSON.parse(e),r=i.__metadata||null;delete i.__metadata,t({manifest:i,metadata:r})}catch(e){n(new Error(s.localize(0,null)))}})}Object.defineProperty(t,"__esModule",{value:!0});class W extends Error{constructor(e,t){super(e),this.code=t}}t.ExtensionManagementError=W;let z=class extends c.Disposable{constructor(e,t,n,i,r,s,a){super(),this.remote=e,this.environmentService=t,this.configurationService=n,this.galleryService=i,this.logService=r,this.downloadService=s,this.telemetryService=a,this.lastReportTimestamp=0,
this.installingExtensions=new Map,this.uninstallingExtensions=new Map,this._onInstallExtension=new v.Emitter,this.onInstallExtension=this._onInstallExtension.event,this._onDidInstallExtension=new v.Emitter,this.onDidInstallExtension=this._onDidInstallExtension.event,this._onUninstallExtension=new v.Emitter,this.onUninstallExtension=this._onUninstallExtension.event,this._onDidUninstallExtension=new v.Emitter,this.onDidUninstallExtension=this._onDidUninstallExtension.event,this._devSystemExtensionsPath=null,this._devSystemExtensionsFilePath=null,this.systemExtensionsPath=t.builtinExtensionsPath,this.extensionsPath=t.extensionsPath,this.uninstalledPath=o.join(this.extensionsPath,".obsolete"),this.uninstalledFileLimiter=new m.Queue,this.manifestCache=this._register(new b.ExtensionsManifestCache(t,this)),this.extensionLifecycle=this._register(new x.ExtensionsLifecycle(t,this.logService)),this._register(c.toDisposable(()=>{this.installingExtensions.forEach(e=>e.cancel()),
this.uninstallingExtensions.forEach(e=>e.cancel()),this.installingExtensions.clear(),this.uninstallingExtensions.clear()}))}zip(e){return this.logService.trace("ExtensionManagementService#zip",e.identifier.id),this.collectFiles(e).then(e=>h.zip(o.join(I.tmpdir(),O.generateUuid()),e)).then(e=>_.URI.file(e))}unzip(e,t){return this.logService.trace("ExtensionManagementService#unzip",e.toString()),this.install(e,t)}collectFiles(e){const t=e=>n(this,void 0,void 0,function*(){let n=yield a.readdir(e);n=n.map(t=>o.join(e,t));const i=yield Promise.all(n.map(e=>a.stat(e)));let r=Promise.resolve([]);return i.forEach((e,i)=>{const s=n[i];e.isFile()&&(r=r.then(e=>[...e,s])),e.isDirectory()&&(r=r.then(e=>t(s).then(t=>[...e,...t])))}),r});return t(e.location.fsPath).then(t=>t.map(t=>({path:`extension/${o.relative(e.location.fsPath,t)}`,localPath:t})))}install(e,t=1){return this.logService.trace("ExtensionManagementService#install",e.toString()),m.createCancelablePromise(n=>this.downloadVsix(e).then(e=>{
const i=o.resolve(e.fsPath);return j.getManifest(i).then(e=>{const r={id:f.getGalleryExtensionId(e.publisher,e.name)};let o=1;if(e.engines&&e.engines.vscode&&!k.isEngineValid(e.engines.vscode))return Promise.reject(new Error(s.localize(1,null,r.id,E.default.version)));const a=new M.ExtensionIdentifierWithVersion(r,e.version);return this.getInstalled(1).then(t=>{const n=t.filter(e=>f.areSameExtensions(r,e.identifier))[0];if(n){if(o=2,a.equals(new M.ExtensionIdentifierWithVersion(n.identifier,n.manifest.version)))return this.removeExtension(n,"existing").then(null,t=>Promise.reject(new Error(s.localize(2,null,e.displayName||e.name))));if(y.gt(n.manifest.version,e.version))return this.uninstall(n,!0)}}).then(()=>(this.logService.info("Installing the extension:",r.id),this._onInstallExtension.fire({identifier:r,zipPath:i}),
this.getMetadata(f.getGalleryExtensionId(e.publisher,e.name)).then(e=>this.installFromZipPath(a,i,e,t,o,n),()=>this.installFromZipPath(a,i,null,t,o,n)).then(()=>(this.logService.info("Successfully installed the extension:",r.id),r),e=>(this.logService.error("Failed to install the extension:",r.id,e.message),Promise.reject(e)))))})}))}downloadVsix(e){if(e.scheme===L.Schemas.file)return Promise.resolve(e);if(!this.downloadService)throw new Error("Download service is not available");const t=o.join(I.tmpdir(),O.generateUuid());return this.downloadService.download(e,t).then(()=>_.URI.file(t))}installFromZipPath(e,t,n,i,r,s){return this.toNonCancellablePromise(this.installExtension({zipPath:t,identifierWithVersion:e,metadata:n},i,s).then(e=>this.installDependenciesAndPackExtensions(e,null).then(()=>e,t=>this.uninstall(e,!0).then(()=>Promise.reject(t),()=>Promise.reject(t)))).then(n=>(this._onDidInstallExtension.fire({identifier:e.identifier,zipPath:t,local:n,operation:r}),n),n=>(this._onDidInstallExtension.fire({
identifier:e.identifier,zipPath:t,operation:r,error:n}),Promise.reject(n))))}installFromGallery(e){return n(this,void 0,void 0,function*(){const t=(new Date).getTime();this.logService.info("Installing extension:",e.identifier.id),this._onInstallExtension.fire({identifier:e.identifier,gallery:e});const n=(e,n,i)=>{const r=i&&i.code?i.code:"unknown";this.logService.error("Failed to install extension:",e.identifier.id,i?i.message:r),this._onDidInstallExtension.fire({identifier:e.identifier,gallery:e,operation:n,error:r}),this.reportTelemetry(this.getTelemetryEvent(n),f.getGalleryExtensionTelemetryData(e),(new Date).getTime()-t,i),i instanceof Error&&(i.name=r)};try{e=yield this.checkAndGetCompatibleVersion(e)}catch(t){return n(e,1,t),Promise.reject(t)}const i=new M.ExtensionIdentifierWithVersion(e.identifier,e.version).key();let r=this.installingExtensions.get(i);if(!r){let s,o,l,c=1;r=m.createCancelablePromise(e=>(s=e,new Promise((e,t)=>{o=e,l=t}))),this.installingExtensions.set(i,r);try{
const r=(yield this.getInstalled(1)).filter(t=>f.areSameExtensions(t.identifier,e.identifier))[0];r&&(c=2,y.gt(r.manifest.version,e.version)&&(yield this.uninstall(r,!0))),this.downloadInstallableExtension(e,c).then(e=>this.installExtension(e,1,s).then(t=>a.rimraf(e.zipPath).finally(()=>null).then(()=>t))).then(e=>this.installDependenciesAndPackExtensions(e,r).then(()=>e,t=>this.uninstall(e,!0).then(()=>Promise.reject(t),()=>Promise.reject(t)))).then(n=>{this.installingExtensions.delete(i),((e,n,i)=>{this.logService.info("Extensions installed successfully:",e.identifier.id),this._onDidInstallExtension.fire({identifier:e.identifier,gallery:e,local:i,operation:n}),this.reportTelemetry(this.getTelemetryEvent(n),f.getGalleryExtensionTelemetryData(e),(new Date).getTime()-t,void 0)})(e,c,n),o(null)},t=>{this.installingExtensions.delete(i),n(e,c,t),l(t)})}catch(t){return this.installingExtensions.delete(i),n(e,c,t),Promise.reject(t)}}return r})}checkAndGetCompatibleVersion(e){return n(this,void 0,void 0,function*(){
if(yield this.isMalicious(e))return Promise.reject(new W(s.localize(3,null),d.INSTALL_ERROR_MALICIOUS));const t=yield this.galleryService.getCompatibleExtension(e);if(!t)return Promise.reject(new W(s.localize(4,null,e.identifier.id,E.default.version),d.INSTALL_ERROR_INCOMPATIBLE));if(this.remote){const t=yield this.galleryService.getManifest(e,T.CancellationToken.None);if(t&&U.isUIExtension(t,this.configurationService)&&!M.isLanguagePackExtension(t))return Promise.reject(new Error(s.localize(5,null,e.identifier.id)))}return t})}reinstallFromGallery(e){return this.logService.trace("ExtensionManagementService#reinstallFromGallery",e.identifier.id),this.galleryService.isEnabled()?this.findGalleryExtension(e).then(t=>t?this.setUninstalled(e).then(()=>this.removeUninstalledExtension(e).then(()=>this.installFromGallery(t),e=>Promise.reject(new Error(s.localize(7,null,S.toErrorMessage(e)))))):Promise.reject(new Error(s.localize(8,null)))):Promise.reject(new Error(s.localize(6,null)))}getTelemetryEvent(e){
return 2===e?"extensionGallery:update":"extensionGallery:install"}isMalicious(e){return this.getExtensionsReport().then(t=>f.getMaliciousExtensionsSet(t).has(e.identifier.id))}downloadInstallableExtension(e,t){const n={id:e.identifier.uuid,publisherId:e.publisherId,publisherDisplayName:e.publisherDisplayName};return this.logService.trace("Started downloading extension:",e.identifier.id),this.galleryService.download(e,t).then(t=>(this.logService.info("Downloaded extension:",e.identifier.id,t),j.getManifest(t).then(i=>({zipPath:t,identifierWithVersion:new M.ExtensionIdentifierWithVersion(e.identifier,i.version),metadata:n}),e=>Promise.reject(new W(this.joinErrors(e).message,"validating")))),e=>Promise.reject(new W(this.joinErrors(e).message,"downloading")))}installExtension(e,t,n){
return this.unsetUninstalledAndGetLocal(e.identifierWithVersion).then(i=>i||this.extractAndInstall(e,t,n),e=>w.isMacintosh?Promise.reject(new W(s.localize(9,null),"unsetUninstalled")):Promise.reject(new W(s.localize(10,null),"unsetUninstalled")))}unsetUninstalledAndGetLocal(e){return this.isUninstalled(e).then(t=>t?(this.logService.trace("Removing the extension from uninstalled list:",e.identifier.id),this.unsetUninstalled(e).then(()=>(this.logService.info("Removed the extension from uninstalled list:",e.identifier.id),this.getInstalled(1))).then(t=>t.filter(t=>new M.ExtensionIdentifierWithVersion(t.identifier,t.manifest.version).equals(e))[0])):null)}extractAndInstall({zipPath:e,identifierWithVersion:t,metadata:n},i,r){const{identifier:l}=t,c=1===i?this.extensionsPath:this.systemExtensionsPath,u=t.key(),h=o.join(c,`.${u}`),d=o.join(c,u)
;return a.rimraf(d).then(()=>this.extractAndRename(l,e,h,d,r),e=>Promise.reject(new W(s.localize(11,null,d,l.id),"deleting"))).then(()=>this.scanExtension(u,c,i)).then(e=>e?(this.logService.info("Installation completed.",l.id),n?(e.metadata=n,this.saveMetadataForLocalExtension(e)):e):Promise.reject(s.localize(12,null,c)),e=>a.rimraf(d).then(()=>Promise.reject(e),()=>Promise.reject(e)))}extractAndRename(e,t,n,i,r){return this.extract(e,t,n,r).then(()=>this.rename(e,n,i,Date.now()+12e4).then(()=>this.logService.info("Renamed to",i),e=>(this.logService.info("Rename failed. Deleting from extracted location",n),a.rimraf(n).finally(()=>null).then(()=>Promise.reject(e)))))}extract(e,t,n,i){return this.logService.trace(`Started extracting the extension from ${t} to ${n}`),a.rimraf(n).then(()=>h.extract(t,n,{sourcePath:"extension",overwrite:!0
},i).then(()=>this.logService.info(`Extracted extension to ${n}:`,e.id),e=>a.rimraf(n).finally(()=>null).then(()=>Promise.reject(new W(e.message,e instanceof h.ExtractError&&e.type?e.type:"extracting")))),e=>Promise.reject(new W(this.joinErrors(e).message,"deleting")))}rename(e,t,n,i){return a.rename(t,n).then(void 0,r=>w.isWindows&&r&&"EPERM"===r.code&&Date.now()<i?(this.logService.info(`Failed renaming ${t} to ${n} with 'EPERM' error. Trying again...`,e.id),this.rename(e,t,n,i)):Promise.reject(new W(r.message||s.localize(13,null,t,n),r.code||"renaming")))}installDependenciesAndPackExtensions(e,t){return n(this,void 0,void 0,function*(){if(this.galleryService.isEnabled()){const i=e.manifest.extensionDependencies||[];if(e.manifest.extensionPack)for(const n of e.manifest.extensionPack)t&&t.manifest.extensionPack&&t.manifest.extensionPack.some(e=>f.areSameExtensions({id:e},{id:n}))||i.every(e=>!f.areSameExtensions({id:e},{id:n}))&&i.push(n);if(i.length)return this.getInstalled().then(e=>{
const t=i.filter(t=>e.every(({identifier:e})=>!f.areSameExtensions(e,{id:t})));return t.length?this.galleryService.query({names:t,pageSize:i.length}).then(e=>{const t=e.firstPage;return Promise.all(t.map(e=>n(this,void 0,void 0,function*(){if(this.remote){const t=yield this.galleryService.getManifest(e,T.CancellationToken.None);if(t&&U.isUIExtension(t,this.configurationService)&&!M.isLanguagePackExtension(t))return void this.logService.info("Ignored installing the UI dependency",e.identifier.id)}return this.installFromGallery(e)}))).then(()=>null,e=>this.rollback(t).then(()=>Promise.reject(e),()=>Promise.reject(e)))}):null})}return Promise.resolve(void 0)})}rollback(e){return this.getInstalled(1).then(t=>Promise.all(t.filter(t=>e.some(e=>new M.ExtensionIdentifierWithVersion(t.identifier,t.manifest.version).equals(new M.ExtensionIdentifierWithVersion(e.identifier,e.version)))).map(e=>this.uninstall(e,!0)))).then(()=>void 0,()=>void 0)}uninstall(e,t=!1){
return this.logService.trace("ExtensionManagementService#uninstall",e.identifier.id),this.toNonCancellablePromise(this.getInstalled(1).then(t=>{const n=t.filter(t=>f.areSameExtensions(t.identifier,e.identifier))[0];return n?this.checkForDependenciesAndUninstall(n,t).then(()=>null,e=>Promise.reject(this.joinErrors(e))):Promise.reject(new Error(s.localize(14,null,e.manifest.displayName||e.manifest.name)))}))}updateMetadata(e,t){return this.logService.trace("ExtensionManagementService#updateMetadata",e.identifier.id),e.metadata=t,this.saveMetadataForLocalExtension(e).then(e=>(this.manifestCache.invalidate(),e))}saveMetadataForLocalExtension(e){if(!e.metadata)return Promise.resolve(e);const t=o.join(e.location.fsPath,"package.json");return a.readFile(t,"utf8").then(e=>N(e)).then(({manifest:t})=>l.assign(t,{__metadata:e.metadata})).then(e=>a.writeFile(t,JSON.stringify(e,null,"\t"))).then(()=>e)}getMetadata(e){return this.findGalleryExtensionByName(e).then(e=>e?{id:e.identifier.uuid,
publisherDisplayName:e.publisherDisplayName,publisherId:e.publisherId}:null)}findGalleryExtension(e){return e.identifier.uuid?this.findGalleryExtensionById(e.identifier.uuid).then(t=>t||this.findGalleryExtensionByName(e.identifier.id)):this.findGalleryExtensionByName(e.identifier.id)}findGalleryExtensionById(e){return this.galleryService.query({ids:[e],pageSize:1}).then(e=>e.firstPage[0])}findGalleryExtensionByName(e){return this.galleryService.query({names:[e],pageSize:1}).then(e=>e.firstPage[0])}joinErrors(e){const t=Array.isArray(e)?e:[e];return 1===t.length?t[0]instanceof Error?t[0]:new Error(t[0]):t.reduce((e,t)=>new Error(`${e.message}${e.message?",":""}${t instanceof Error?t.message:t}`),new Error(""))}checkForDependenciesAndUninstall(e,t){return this.preUninstallExtension(e).then(()=>{const n=this.getAllPackExtensionsToUninstall(e,t);return n.length?this.uninstallExtensions(e,n,t):this.uninstallExtensions(e,[],t)
}).then(()=>this.postUninstallExtension(e),t=>(this.postUninstallExtension(e,new W(t instanceof Error?t.message:t,"local")),Promise.reject(t)))}uninstallExtensions(e,t,n){const i=this.getDependents(e,n);if(i.length){const n=i.filter(n=>e!==n&&-1===t.indexOf(n));if(n.length)return Promise.reject(new Error(this.getDependentsErrorMessage(e,n)))}return Promise.all([this.uninstallExtension(e),...t.map(e=>this.doUninstall(e))]).then(()=>void 0)}getDependentsErrorMessage(e,t){return 1===t.length?s.localize(15,null,e.manifest.displayName||e.manifest.name,t[0].manifest.displayName||t[0].manifest.name):2===t.length?s.localize(16,null,e.manifest.displayName||e.manifest.name,t[0].manifest.displayName||t[0].manifest.name,t[1].manifest.displayName||t[1].manifest.name):s.localize(17,null,e.manifest.displayName||e.manifest.name,t[0].manifest.displayName||t[0].manifest.name,t[1].manifest.displayName||t[1].manifest.name)}getAllPackExtensionsToUninstall(e,t,n=[]){if(-1!==n.indexOf(e))return[];n.push(e)
;const i=e.manifest.extensionPack?e.manifest.extensionPack:[];if(i.length){const e=t.filter(e=>i.some(t=>f.areSameExtensions({id:t},e.identifier))),r=[];for(const i of e)r.push(...this.getAllPackExtensionsToUninstall(i,t,n));return[...e,...r]}return[]}getDependents(e,t){return t.filter(t=>t.manifest.extensionDependencies&&t.manifest.extensionDependencies.some(t=>f.areSameExtensions({id:t},e.identifier)))}doUninstall(e){return this.preUninstallExtension(e).then(()=>this.uninstallExtension(e)).then(()=>this.postUninstallExtension(e),t=>(this.postUninstallExtension(e,new W(t instanceof Error?t.message:t,"local")),Promise.reject(t)))}preUninstallExtension(e){return Promise.resolve(a.exists(e.location.fsPath)).then(e=>e?null:Promise.reject(new Error(s.localize(18,null)))).then(()=>{this.logService.info("Uninstalling extension:",e.identifier.id),this._onUninstallExtension.fire(e.identifier)})}uninstallExtension(e){let t=this.uninstallingExtensions.get(e.identifier.id)
;return t||(t=m.createCancelablePromise(t=>this.scanUserExtensions(!1).then(t=>this.setUninstalled(...t.filter(t=>f.areSameExtensions(t.identifier,e.identifier)))).then(()=>{this.uninstallingExtensions.delete(e.identifier.id)})),this.uninstallingExtensions.set(e.identifier.id,t)),t}postUninstallExtension(e,t){return n(this,void 0,void 0,function*(){t?this.logService.error("Failed to uninstall extension:",e.identifier.id,t.message):(this.logService.info("Successfully uninstalled extension:",e.identifier.id),e.identifier.uuid&&(yield this.galleryService.reportStatistic(e.manifest.publisher,e.manifest.name,e.manifest.version,"uninstall"))),this.reportTelemetry("extensionGallery:uninstall",f.getLocalExtensionTelemetryData(e),void 0,t);const n=t?t instanceof W?t.code:"unknown":void 0;this._onDidUninstallExtension.fire({identifier:e.identifier,error:n})})}getInstalled(e=null){const t=[]
;return null!==e&&0!==e||t.push(this.scanSystemExtensions().then(null,e=>Promise.reject(new W(this.joinErrors(e).message,"scanningSystem")))),null!==e&&1!==e||t.push(this.scanUserExtensions(!0).then(null,e=>Promise.reject(new W(this.joinErrors(e).message,"scanningUser")))),Promise.all(t).then(u.flatten,e=>Promise.reject(this.joinErrors(e)))}scanSystemExtensions(){this.logService.trace("Started scanning system extensions");const e=this.scanExtensions(this.systemExtensionsPath,0).then(e=>(this.logService.info("Scanned system extensions:",e.length),e));if(this.environmentService.isBuilt)return e;const t=this.getDevSystemExtensionsList().then(e=>e.length?this.scanExtensions(this.devSystemExtensionsPath,0).then(t=>(this.logService.info("Scanned dev system extensions:",t.length),t.filter(t=>e.some(e=>f.areSameExtensions(t.identifier,{id:e}))))):[]);return Promise.all([e,t]).then(([e,t])=>[...e,...t])}scanUserExtensions(e){return this.logService.trace("Started scanning user extensions"),
Promise.all([this.getUninstalledExtensions(),this.scanExtensions(this.extensionsPath,1)]).then(([t,n])=>{if(n=n.filter(e=>!t[new M.ExtensionIdentifierWithVersion(e.identifier,e.manifest.version).key()]),e){n=f.groupByExtension(n,e=>e.identifier).map(e=>e.sort((e,t)=>y.rcompare(e.manifest.version,t.manifest.version))[0])}return this.logService.info("Scanned user extensions:",n.length),n})}scanExtensions(e,t){const n=new m.Limiter(10);return a.readdir(e).then(i=>Promise.all(i.map(i=>n.queue(()=>this.scanExtension(i,e,t))))).then(e=>e.filter(e=>e&&e.identifier))}scanExtension(e,t,n){if(1===n&&0===e.indexOf("."))return Promise.resolve(null);const i=o.join(t,e);return a.readdir(i).then(e=>(function(e){const t=[a.readFile(o.join(e,"package.json"),"utf8").then(e=>N(e)),a.readFile(o.join(e,"package.nls.json"),"utf8").then(void 0,e=>"ENOENT"!==e.code?Promise.reject(e):"{}").then(e=>JSON.parse(e))];return Promise.all(t).then(([{manifest:e,metadata:t},n])=>({manifest:g.localizeManifest(e,n),metadata:t}))
})(i).then(({manifest:t,metadata:r})=>{const s=e.filter(e=>/^readme(\.txt|\.md|)$/i.test(e))[0],a=s?_.URI.file(o.join(i,s)):null,l=e.filter(e=>/^changelog(\.txt|\.md|)$/i.test(e))[0],c=l?_.URI.file(o.join(i,l)):null,u={id:f.getGalleryExtensionId(t.publisher,t.name),uuid:r?r.id:null};return{type:n,identifier:u,manifest:t,metadata:r,location:_.URI.file(i),readmeUrl:a,changelogUrl:c}})).then(void 0,()=>null)}removeDeprecatedExtensions(){return this.removeUninstalledExtensions().then(()=>this.removeOutdatedExtensions())}removeUninstalledExtensions(){return this.getUninstalledExtensions().then(e=>this.scanExtensions(this.extensionsPath,1).then(t=>{const n=t.filter(t=>e[new M.ExtensionIdentifierWithVersion(t.identifier,t.manifest.version).key()]);return Promise.all(n.map(e=>this.extensionLifecycle.postUninstall(e).then(()=>this.removeUninstalledExtension(e))))})).then(()=>void 0)}removeOutdatedExtensions(){return this.scanExtensions(this.extensionsPath,1).then(e=>{const t=[],n=f.groupByExtension(e,e=>e.identifier)
;return t.push(...u.flatten(n.map(e=>e.sort((e,t)=>y.rcompare(e.manifest.version,t.manifest.version)).slice(1)))),Promise.all(t.map(e=>this.removeExtension(e,"outdated")))}).then(()=>void 0)}removeUninstalledExtension(e){return this.removeExtension(e,"uninstalled").then(()=>this.withUninstalledExtensions(t=>delete t[new M.ExtensionIdentifierWithVersion(e.identifier,e.manifest.version).key()])).then(()=>void 0)}removeExtension(e,t){return this.logService.trace(`Deleting ${t} extension from disk`,e.identifier.id,e.location.fsPath),a.rimraf(e.location.fsPath).then(()=>this.logService.info("Deleted from disk",e.identifier.id,e.location.fsPath))}isUninstalled(e){return this.filterUninstalled(e).then(e=>1===e.length)}filterUninstalled(...e){return this.withUninstalledExtensions(t=>{const n=[];for(const i of e)t[i.key()]&&n.push(i.key());return n})}setUninstalled(...e){const t=e.map(e=>new M.ExtensionIdentifierWithVersion(e.identifier,e.manifest.version))
;return this.withUninstalledExtensions(e=>l.assign(e,t.reduce((e,t)=>(e[t.key()]=!0,e),{})))}unsetUninstalled(e){return this.withUninstalledExtensions(t=>delete t[e.key()])}getUninstalledExtensions(){return this.withUninstalledExtensions(e=>e)}withUninstalledExtensions(e){return n(this,void 0,void 0,function*(){return yield this.uninstalledFileLimiter.queue(()=>{let t=null;return a.readFile(this.uninstalledPath,"utf8").then(void 0,e=>"ENOENT"===e.code?Promise.resolve("{}"):Promise.reject(e)).then(e=>{try{return JSON.parse(e)}catch(e){return{}}}).then(n=>(t=e(n),n)).then(e=>{if(0===Object.keys(e).length)return a.rimraf(this.uninstalledPath);{const t=JSON.stringify(e);return a.writeFile(this.uninstalledPath,t)}}).then(()=>t)})})}getExtensionsReport(){const e=(new Date).getTime();return(!this.reportedExtensions||e-this.lastReportTimestamp>3e5)&&(this.reportedExtensions=this.updateReportCache(),this.lastReportTimestamp=e),this.reportedExtensions}updateReportCache(){
return this.logService.trace("ExtensionManagementService.refreshReportedCache"),this.galleryService.getExtensionsReport().then(e=>(this.logService.trace(`ExtensionManagementService.refreshReportedCache - got ${e.length} reported extensions from service`),e),e=>(this.logService.trace("ExtensionManagementService.refreshReportedCache - failed to get extension report"),[]))}get devSystemExtensionsPath(){return this._devSystemExtensionsPath||(this._devSystemExtensionsPath=o.normalize(o.join(R.getPathFromAmdModule(e,""),"..",".build","builtInExtensions"))),this._devSystemExtensionsPath}get devSystemExtensionsFilePath(){return this._devSystemExtensionsFilePath||(this._devSystemExtensionsFilePath=o.normalize(o.join(R.getPathFromAmdModule(e,""),"..","build","builtInExtensions.json"))),this._devSystemExtensionsFilePath}getDevSystemExtensionsList(){return a.readFile(this.devSystemExtensionsFilePath,"utf8").then(e=>{return JSON.parse(e).map(({name:e})=>e)})}toNonCancellablePromise(e){
return new Promise((t,n)=>e.then(e=>t(e),e=>n(e)))}reportTelemetry(e,t,n,i){const r=i?i instanceof W?i.code:"unknown":void 0;this.telemetryService.publicLog(e,l.assign(t,{success:!i,duration:n,errorcode:r}))}};z=i([r(1,p.IEnvironmentService),r(2,F.IConfigurationService),r(3,d.IExtensionGalleryService),r(4,C.ILogService),r(5,A.optional(D.IDownloadService)),r(6,P.ITelemetryService)],z),t.ExtensionManagementService=z}),define(e[38],t([1,0,10,79,23,11,125,7]),function(e,t,i,r,s,o,a,l){"use strict";function c(t,s){let u;return(t.getRawRequest?Promise.resolve(t.getRawRequest(t)):Promise.resolve(function(t){return n(this,void 0,void 0,function*(){return("https:"===r.parse(t.url).protocol?yield new Promise((t,n)=>{e(["https"],t,n)}):yield new Promise((t,n)=>{e(["http"],t,n)})).request})}(t))).then(e=>new Promise((n,h)=>{const d=r.parse(t.url),f={hostname:d.hostname,port:d.port?parseInt(d.port):"https:"===d.protocol?443:80,protocol:d.protocol,path:d.path,method:t.type||"GET",headers:t.headers,agent:t.agent,
rejectUnauthorized:!i.isBoolean(t.strictSSL)||t.strictSSL};if(t.user&&t.password&&(f.auth=t.user+":"+t.password),(u=e(f,e=>{const r=i.isNumber(t.followRedirects)?t.followRedirects:3;if(e.statusCode&&e.statusCode>=300&&e.statusCode<400&&r>0&&e.headers.location)c(o.assign({},t,{url:e.headers.location,followRedirects:r-1}),s).then(n,h);else{let t=e;"gzip"===e.headers["content-encoding"]&&(t=t.pipe(a.createGunzip())),n({res:e,stream:t})}})).on("error",h),t.timeout&&u.setTimeout(t.timeout),t.data){if("string"!=typeof t.data)return void t.data.pipe(u);u.write(t.data)}u.end(),s.onCancellationRequested(()=>{u.abort(),h(l.canceled())})}))}function u(e){return e.res.statusCode&&e.res.statusCode>=200&&e.res.statusCode<300||1223===e.res.statusCode}function h(e){return 204===e.res.statusCode}Object.defineProperty(t,"__esModule",{value:!0}),t.request=c,t.download=function(e,t){return new Promise((n,i)=>{const r=s.createWriteStream(e);r.once("finish",()=>n(void 0)),t.stream.once("error",i),t.stream.pipe(r)})},
t.asText=function(e){return new Promise((t,n)=>{if(!u(e))return n("Server returned "+e.res.statusCode);if(h(e))return t(null);let i=[];e.stream.on("data",e=>i.push(e)),e.stream.on("end",()=>t(i.join(""))),e.stream.on("error",n)})},t.asJson=function(e){return new Promise((t,n)=>{if(!u(e))return n("Server returned "+e.res.statusCode);if(h(e))return t(null);const i=[];e.stream.on("data",e=>i.push(e)),e.stream.on("end",()=>{try{t(JSON.parse(i.join("")))}catch(e){n(e)}}),e.stream.on("error",n)})}}),define(e[112],t([1,0,20,8,35,38,30]),function(e,t,n,s,o,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let c=class{constructor(e){this.requestService=e}download(e,t,i=l.CancellationToken.None){if(e.scheme===n.Schemas.file)return s.copy(e.fsPath,t);const r={type:"GET",url:e.toString()};return this.requestService.request(r,i).then(e=>200===e.res.statusCode?a.download(t,e):a.asText(e).then(t=>Promise.reject(new Error(`Expected 200, got back ${e.res.statusCode} instead.\n\n${t}`))))}}
;c=i([r(0,o.IRequestService)],c),t.DownloadService=c}),define(e[108],t([1,0,32,2,18,7,33,27,11,35,39,38,29,21,45,17,8,37,28,26,30,15]),function(e,t,n,s,o,a,l,c,u,h,d,f,g,p,m,v,y,_,E,w,C,b){"use strict";function x(...e){return String(e.reduce((e,t)=>e|t,0))}function S(e,t){const n=(e||[]).filter(e=>e.statisticName===t)[0];return n?n.value:0}function P(e,t){return e.files.filter(e=>e.assetType===t)[0]?{uri:`${e.assetUri}/${t}`,fallbackUri:`${e.fallbackAssetUri}/${t}`}:null}function k(e,t){const n=e.properties?e.properties.filter(e=>e.key===t):[],i=n.length>0&&n[0].value;return i?i.split(",").map(e=>c.adoptToGalleryExtensionId(e)):[]}function I(e){const t=e.properties?e.properties.filter(e=>e.key===R.Engine):[];return t.length>0&&t[0].value||""}function O(t,n,i,r,s){const o={manifest:P(n,T.Manifest),readme:P(n,T.Details),changelog:P(n,T.Changelog),license:P(n,T.License),repository:function(e){if(e.properties){
const t=e.properties.filter(e=>e.key===T.Repository),n=new RegExp("((git|ssh|http(s)?)|(git@[w.]+))(:(//)?)([w.@:/-~]+)(.git)(/)?"),i=t.filter(e=>n.test(e.value))[0];return i?{uri:i.value,fallbackUri:i.value}:null}return P(e,T.Repository)}(n),download:function(e){return{uri:`${e.fallbackAssetUri}/${T.VSIX}?redirect=true`,fallbackUri:`${e.fallbackAssetUri}/${T.VSIX}`}}(n),icon:function(t){const n=P(t,T.Icon);if(n)return n;const i=e.toUrl("./media/defaultIcon.png");return{uri:i,fallbackUri:i}}(n),coreTranslations:function(e){return e.files.filter(e=>0===e.assetType.indexOf("Microsoft.VisualStudio.Code.Translation.")).reduce((t,n)=>(t[n.assetType.substring("Microsoft.VisualStudio.Code.Translation.".length)]=P(e,n.assetType),t),{})}(n)};return{identifier:{id:c.getGalleryExtensionId(t.publisher.publisherName,t.extensionName),uuid:t.extensionId},name:t.extensionName,version:n.version,date:n.lastUpdated,displayName:t.displayName,publisherId:t.publisher.publisherId,publisher:t.publisher.publisherName,
publisherDisplayName:t.publisher.displayName,description:t.shortDescription||"",installCount:S(t.statistics,"install")+S(t.statistics,"updateCount"),rating:S(t.statistics,"averagerating"),ratingCount:S(t.statistics,"ratingcount"),assets:o,properties:{dependencies:k(n,R.Dependency),extensionPack:k(n,R.ExtensionPack),engine:I(n),localizedLanguages:function(e){const t=e.properties?e.properties.filter(e=>e.key===R.LocalizedLanguages):[],n=t.length>0&&t[0].value||"";return n?n.split(","):[]}(n)},telemetryData:{index:(r.pageNumber-1)*r.pageSize+i,searchText:r.searchText,querySource:s},preview:function(e){return-1!==e.indexOf("preview")}(t.flags)}}function D(e){const t=s.join(e.userDataPath,"machineid");return y.readFile(t,"utf8").then(e=>E.isUUID(e)?e:null,()=>null).then(e=>{if(!e){e=E.generateUuid();try{_.writeFileAndFlushSync(t,e)}catch(e){}}return{"X-Market-Client-Id":`VSCode ${g.default.version}`,"User-Agent":`VSCode ${g.default.version}`,"X-Market-User-Id":e}})}Object.defineProperty(t,"__esModule",{value:!0})
;var A;!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"}(A||(A={}));var L;!function(e){e[e.Tag=1]="Tag",e[e.ExtensionId=4]="ExtensionId",e[e.Category=5]="Category",e[e.ExtensionName=7]="ExtensionName",e[e.Target=8]="Target",e[e.Featured=9]="Featured",e[e.SearchText=10]="SearchText",e[e.ExcludeWithFlags=12]="ExcludeWithFlags"}(L||(L={}));const T={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"},R={Dependency:"Microsoft.VisualStudio.Code.ExtensionDependencies",ExtensionPack:"Microsoft.VisualStudio.Code.ExtensionPack",Engine:"Microsoft.VisualStudio.Code.Engine",LocalizedLanguages:"Microsoft.VisualStudio.Code.LocalizedLanguages"},j={pageNumber:1,pageSize:10,sortBy:0,sortOrder:0,flags:A.None,criteria:[],assetTypes:[]};class M{constructor(e=j){this.state=e}get pageNumber(){return this.state.pageNumber}get pageSize(){return this.state.pageSize}get sortBy(){return this.state.sortBy}get sortOrder(){return this.state.sortOrder}get flags(){return this.state.flags}withPage(e,t=this.state.pageSize){return new M(u.assign({},this.state,{pageNumber:e,pageSize:t}))}withFilter(e,...t){const n=[...this.state.criteria,...t.map(t=>({filterType:e,
value:t}))];return new M(u.assign({},this.state,{criteria:n}))}withSortBy(e){return new M(u.assign({},this.state,{sortBy:e}))}withSortOrder(e){return new M(u.assign({},this.state,{sortOrder:e}))}withFlags(...e){return new M(u.assign({},this.state,{flags:e.reduce((e,t)=>e|t,0)}))}withAssetTypes(...e){return new M(u.assign({},this.state,{assetTypes:e}))}get raw(){const{criteria:e,pageNumber:t,pageSize:n,sortBy:i,sortOrder:r,flags:s,assetTypes:o}=this.state;return{filters:[{criteria:e,pageNumber:t,pageSize:n,sortBy:i,sortOrder:r}],assetTypes:o,flags:s}}get searchText(){const e=this.state.criteria.filter(e=>e.filterType===L.SearchText)[0];return e&&e.value?e.value:""}}let F=class e{constructor(e,t,n,i){this.requestService=e,this.logService=t,this.environmentService=n,this.telemetryService=i;const r=p.default.extensionsGallery;this.extensionsGalleryUrl=r&&r.serviceUrl,this.extensionsControlUrl=r&&r.controlUrl,this.commonHeadersPromise=D(this.environmentService)}api(e=""){return`${this.extensionsGalleryUrl}${e}`}
isEnabled(){return!!this.extensionsGalleryUrl}getCompatibleExtension(e,t){const n=l.isIExtensionIdentifier(e)?null:e;if(n&&n.properties.engine&&m.isEngineValid(n.properties.engine))return Promise.resolve(n);const{id:i,uuid:r}=n?n.identifier:e;let s=(new M).withFlags(A.IncludeAssetUri,A.IncludeStatistics,A.IncludeFiles,A.IncludeVersionProperties,A.ExcludeNonValidated).withPage(1,1).withFilter(L.Target,"Microsoft.VisualStudio.Code").withFilter(L.ExcludeWithFlags,x(A.Unpublished));return s=r?s.withFilter(L.ExtensionId,r):s.withFilter(L.ExtensionName,i),this.queryGallery(s,C.CancellationToken.None).then(({galleryExtensions:e})=>{const[n]=e;if(!n||!n.versions.length)return null;if(t){const e=n.versions.filter(e=>e.version===t)[0];if(e){const t=O(n,e,0,s);if(t.properties.engine&&m.isEngineValid(t.properties.engine))return t}return null}return this.getLastValidExtensionVersion(n,n.versions).then(e=>e?O(n,e,0,s):null)})}query(e={}){
if(!this.isEnabled())return Promise.reject(new Error("No extension gallery service configured."));const t=e.names?"ids":e.text?"text":"all";let n=e.text||"";const i=u.getOrDefault(e,e=>e.pageSize,50);this.telemetryService.publicLog("galleryService:query",{type:t,text:n});let r=(new M).withFlags(A.IncludeLatestVersionOnly,A.IncludeAssetUri,A.IncludeStatistics,A.IncludeFiles,A.IncludeVersionProperties).withPage(1,i).withFilter(L.Target,"Microsoft.VisualStudio.Code").withFilter(L.ExcludeWithFlags,x(A.Unpublished));return n?((n=(n=(n=n.replace(/\bcategory:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g,(e,t,n)=>(r=r.withFilter(L.Category,n||t),""))).replace(/\btag:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g,(e,t,n)=>(r=r.withFilter(L.Tag,n||t),""))).trim())&&(n=n.length<200?n:n.substring(0,200),r=r.withFilter(L.SearchText,n)),r=r.withSortBy(0)):r=e.ids?r.withFilter(L.ExtensionId,...e.ids):e.names?r.withFilter(L.ExtensionName,...e.names):r.withSortBy(4),"number"==typeof e.sortBy&&(r=r.withSortBy(e.sortBy)),
"number"==typeof e.sortOrder&&(r=r.withSortOrder(e.sortOrder)),this.queryGallery(r,C.CancellationToken.None).then(({galleryExtensions:t,total:n})=>{return{firstPage:t.map((t,n)=>O(t,t.versions[0],n,r,e.source)),total:n,pageSize:r.pageSize,getPage:(t,n)=>{if(n.isCancellationRequested)return Promise.reject(a.canceled());const i=r.withPage(t+1);return this.queryGallery(i,n).then(({galleryExtensions:t})=>t.map((t,n)=>O(t,t.versions[0],n,i,e.source)))}}})}queryGallery(e,t){return this.isEnabled()?this.commonHeadersPromise.then(n=>{const i=JSON.stringify(e.raw),r=u.assign({},n,{"Content-Type":"application/json",Accept:"application/json;api-version=3.0-preview.1","Accept-Encoding":"gzip","Content-Length":i.length});return this.requestService.request({type:"POST",url:this.api("/extensionquery"),data:i,headers:r},t).then(e=>e.res.statusCode&&e.res.statusCode>=400&&e.res.statusCode<500?{galleryExtensions:[],total:0}:f.asJson(e).then(e=>{if(e){
const t=e.results[0],n=t.extensions,i=t.resultMetadata&&t.resultMetadata.filter(e=>"ResultCount"===e.metadataType)[0];return{galleryExtensions:n,total:i&&i.metadataItems.filter(e=>"TotalCount"===e.name)[0].count||0}}return{galleryExtensions:[],total:0}}))}):Promise.reject(new Error("No extension gallery service configured."))}reportStatistic(e,t,n,i){return this.isEnabled()?this.commonHeadersPromise.then(r=>{const s=Object.assign({},r,{Accept:"*/*;api-version=4.0-preview.1"});return this.requestService.request({type:"POST",url:this.api(`/publishers/${e}/extensions/${t}/${n}/stats?statType=${i}`),headers:s},C.CancellationToken.None).then(void 0,()=>void 0)}):Promise.resolve(void 0)}download(e,t){this.logService.trace("ExtensionGalleryService#download",e.identifier.id);const i=s.join(n.tmpdir(),E.generateUuid()),r=c.getGalleryExtensionTelemetryData(e),o=(new Date).getTime(),a=1===t?"install":2===t?"update":"",l=a?{uri:`${e.assets.download.uri}&${a}=true`,fallbackUri:`${e.assets.download.fallbackUri}?${a}=true`
}:e.assets.download;return this.getAsset(l).then(e=>f.download(i,e)).then(()=>(e=>this.telemetryService.publicLog("galleryService:downloadVSIX",u.assign(r,{duration:e})))((new Date).getTime()-o)).then(()=>i)}getReadme(e,t){return e.assets.readme?this.getAsset(e.assets.readme,{},t).then(e=>f.asText(e)).then(e=>e||""):Promise.resolve("")}getManifest(e,t){return e.assets.manifest?this.getAsset(e.assets.manifest,{},t).then(f.asText).then(JSON.parse):Promise.resolve(null)}getCoreTranslation(e,t){const n=e.assets.coreTranslations[t.toUpperCase()];return n?this.getAsset(n).then(f.asText).then(JSON.parse):Promise.resolve(null)}getChangelog(e,t){return e.assets.changelog?this.getAsset(e.assets.changelog,{},t).then(e=>f.asText(e)).then(e=>e||""):Promise.resolve("")}loadAllDependencies(e,t){return this.getDependenciesReccursively(e.map(e=>e.id),[],t)}getAllVersions(e,t){
let n=(new M).withFlags(A.IncludeVersions,A.IncludeFiles,A.IncludeVersionProperties,A.ExcludeNonValidated).withPage(1,1).withFilter(L.Target,"Microsoft.VisualStudio.Code").withFilter(L.ExcludeWithFlags,x(A.Unpublished));return n=e.identifier.uuid?n.withFilter(L.ExtensionId,e.identifier.uuid):n.withFilter(L.ExtensionName,e.identifier.id),this.queryGallery(n,C.CancellationToken.None).then(({galleryExtensions:e})=>e.length?t?Promise.all(e[0].versions.map(e=>this.getEngine(e).then(t=>m.isEngineValid(t)?e:null))).then(e=>e.filter(e=>!!e).map(e=>({version:e.version,date:e.lastUpdated}))):e[0].versions.map(e=>({version:e.version,date:e.lastUpdated})):[])}loadDependencies(e,t){if(!e||0===e.length)return Promise.resolve([])
;let n=(new M).withFlags(A.IncludeLatestVersionOnly,A.IncludeAssetUri,A.IncludeStatistics,A.IncludeFiles,A.IncludeVersionProperties).withPage(1,e.length).withFilter(L.Target,"Microsoft.VisualStudio.Code").withFilter(L.ExcludeWithFlags,x(A.Unpublished)).withAssetTypes(T.Icon,T.License,T.Details,T.Manifest,T.VSIX).withFilter(L.ExtensionName,...e);return this.queryGallery(n,t).then(e=>{const t=[],i=[];for(let r=0;r<e.galleryExtensions.length;r++){const s=e.galleryExtensions[r];-1===i.indexOf(s.extensionId)&&(t.push(O(s,s.versions[0],r,n,"dependencies")),i.push(s.extensionId))}return t})}getDependenciesReccursively(t,n,i){return t&&t.length&&(t=n.length?t.filter(t=>!e.hasExtensionByName(n,t)):t).length?this.loadDependencies(t,i).then(t=>{const r=new Set;for(const e of t)e.properties.dependencies&&e.properties.dependencies.forEach(e=>r.add(e));n=o.distinct(n.concat(t),e=>e.identifier.uuid);const s=[];return r.forEach(t=>!e.hasExtensionByName(n,t)&&s.push(t)),this.getDependenciesReccursively(s,n,i)
}):Promise.resolve(n)}getAsset(e,t={},n=C.CancellationToken.None){return this.commonHeadersPromise.then(i=>{const r=u.assign({},i,t.headers||{});t=u.assign({},t,{type:"GET"},{headers:r});const s=e.uri,o=e.fallbackUri,l=u.assign({},t,{url:s});return this.requestService.request(l,n).then(e=>200===e.res.statusCode?Promise.resolve(e):f.asText(e).then(t=>Promise.reject(new Error(`Expected 200, got back ${e.res.statusCode} instead.\n\n${t}`)))).then(void 0,e=>{if(a.isPromiseCanceledError(e))return Promise.reject(e);const i=a.getErrorMessage(e);this.telemetryService.publicLog("galleryService:requestError",{url:s,cdn:!0,message:i}),this.telemetryService.publicLog("galleryService:cdnFallback",{url:s,message:i});const r=u.assign({},t,{url:o});return this.requestService.request(r,n).then(void 0,e=>{if(a.isPromiseCanceledError(e))return Promise.reject(e);const t=a.getErrorMessage(e);return this.telemetryService.publicLog("galleryService:requestError",{url:o,cdn:!1,message:t}),Promise.reject(e)})})})}
getLastValidExtensionVersion(e,t){const n=this.getLastValidExtensionVersionFromProperties(e,t);return n||this.getLastValidExtensionVersionReccursively(e,t)}getLastValidExtensionVersionFromProperties(e,t){for(const e of t){const t=I(e);if(!t)return null;if(m.isEngineValid(t))return Promise.resolve(e)}return null}getEngine(e){const t=I(e);if(t)return Promise.resolve(t);const n=P(e,T.Manifest);if(!n)return Promise.reject("Manifest was not found");return this.getAsset(n,{headers:{"Accept-Encoding":"gzip"}}).then(e=>f.asJson(e)).then(e=>e?e.engines.vscode:Promise.reject("Error while reading manifest"))}getLastValidExtensionVersionReccursively(e,t){if(!t.length)return Promise.resolve(null);const n=t[0];return this.getEngine(n).then(i=>m.isEngineValid(i)?(n.properties=n.properties||[],n.properties.push({key:R.Engine,value:i}),n):this.getLastValidExtensionVersionReccursively(e,t.slice(1)))}static hasExtensionByName(e,t){for(const n of e)if(`${n.publisher}.${n.name}`===t)return!0;return!1}getExtensionsReport(){
return this.isEnabled()?this.extensionsControlUrl?this.requestService.request({type:"GET",url:this.extensionsControlUrl},C.CancellationToken.None).then(e=>200!==e.res.statusCode?Promise.reject(new Error("Could not get extensions report.")):f.asJson(e).then(e=>{const t=new Map;if(e)for(const n of e.malicious){const e=t.get(n)||{id:{id:n},malicious:!0,slow:!1};e.malicious=!0,t.set(n,e)}return Promise.resolve(w.values(t))})):Promise.resolve([]):Promise.reject(new Error("No extension gallery service configured."))}};F=i([r(0,h.IRequestService),r(1,b.ILogService),r(2,v.IEnvironmentService),r(3,d.ITelemetryService)],F),t.ExtensionGalleryService=F,t.resolveMarketplaceHeaders=D}),define(e[87],t([1,0,11,38,78,19,15]),function(e,t,n,s,o,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let c=class{constructor(e,t){this.logService=t,this.disposables=[],this.configure(e.getValue()),e.onDidChangeConfiguration(()=>this.configure(e.getValue()),this,this.disposables)}configure(e){
this.proxyUrl=e.http&&e.http.proxy,this.strictSSL=!(!e.http||!e.http.proxyStrictSSL),this.authorization=e.http&&e.http.proxyAuthorization}request(e,t,i=s.request){this.logService.trace("RequestService#request",e.url);const{proxyUrl:r,strictSSL:a}=this;return(e.agent?Promise.resolve(e.agent):Promise.resolve(o.getProxyAgent(e.url||"",{proxyUrl:r,strictSSL:a}))).then(r=>(e.agent=r,e.strictSSL=a,this.authorization&&(e.headers=n.assign(e.headers||{},{"Proxy-Authorization":this.authorization})),i(e,t)))}};c=i([r(0,a.IConfigurationService),r(1,l.ILogService)],c),t.RequestService=c}),define(e[75],t([1,0,91,87,7]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class s extends i.RequestService{request(e,n){return super.request(e,n,t.xhrRequest)}}t.RequestService=s,t.xhrRequest=((e,t)=>{const i=new XMLHttpRequest;return new Promise((s,o)=>{i.open(e.type||"GET",e.url||"",!0,e.user,e.password),function(e,t){if(t.headers)e:for(let n in t.headers){switch(n){case"User-Agent":
case"Accept-Encoding":case"Content-Length":continue e}e.setRequestHeader(n,t.headers[n])}}(i,e),i.responseType="arraybuffer",i.onerror=(e=>o(new Error(i.statusText&&"XHR failed: "+i.statusText))),i.onload=(e=>{s({res:{statusCode:i.status,headers:function(e){const t=Object.create(null);for(const n of e.getAllResponseHeaders().split(/\r\n|\n|\r/g))if(n){const e=n.indexOf(":");t[n.substr(0,e).trim().toLowerCase()]=n.substr(e+1).trim()}return t}(i)},stream:new class extends n.Readable{constructor(e){super(),this._buffer=Buffer.from(new Uint8Array(e)),this._offset=0,this._length=this._buffer.length}_read(e){this._offset<this._length?(this.push(this._buffer.slice(this._offset,this._offset+e)),this._offset+=e):this.push(null)}}(i.response)})}),i.ontimeout=(t=>o(new Error(`XHR timeout: ${e.timeout}ms`))),e.timeout&&(i.timeout=e.timeout),i.send(e.data),t.onCancellationRequested(()=>{i.abort(),o(r.canceled())})})})}),
define(e[130],t([1,0,23,5,21,29,107,47,44,84,17,96,70,33,120,108,19,106,35,75,39,110,113,114,109,111,115,117,131,95,89,15,88,99,42,86,77,43,3,112,41,48]),function(e,t,i,r,s,o,a,l,c,u,h,d,f,g,p,m,v,y,_,E,w,C,b,x,S,P,k,I,O,D,A,L,T,R,j,M,F,U,N,W,z,B){"use strict";function $(e){!function(e){n(this,void 0,void 0,function*(){const t=yield new Promise(e=>{O.ipcRenderer.once("handshake:hey there",(t,n)=>e(n)),O.ipcRenderer.send("handshake:hello")});!function(e,t,n){const i=new l.ServiceCollection,r=[],a=()=>N.dispose(r);process.once("exit",a),O.ipcRenderer.once("handshake:goodbye",a),r.push(e);const $=new d.EnvironmentService(t.args,process.execPath),V=new B.StaticRouter(e=>"main"===e),H=new T.LogLevelSetterChannelClient(e.getChannel("loglevel",V)),G=new T.FollowerLogService(H,A.createSpdLogService("sharedprocess",t.logLevel,$.logsPath));r.push(G),G.info("main",JSON.stringify(n)),i.set(h.IEnvironmentService,$),i.set(L.ILogService,G),i.set(v.IConfigurationService,new c.SyncDescriptor(y.ConfigurationService)),
i.set(_.IRequestService,new c.SyncDescriptor(E.RequestService)),i.set(z.IDownloadService,new c.SyncDescriptor(W.DownloadService));const K=e.getChannel("windows",V),J=new I.WindowsChannelClient(K);i.set(k.IWindowsService,J);const X=new k.ActiveWindowManager(J),Q=new B.StaticRouter(e=>X.getActiveClientId().then(t=>e===t)),Y=e.getChannel("dialog",Q);i.set(U.IDialogService,new F.DialogChannelClient(Y));const Z=new u.InstantiationService(i);Z.invokeFunction(i=>{const a=new l.ServiceCollection,u=i.get(h.IEnvironmentService),{appRoot:d,extensionsPath:v,extensionDevelopmentLocationURI:y,isBuilt:_,installSourcePath:E}=u,k=new T.FollowerLogService(H,A.createSpdLogService("telemetry",t.logLevel,u.logsPath));k.info("The below are logs for every telemetry event sent from VS Code once the log level is set to trace."),k.info("===========================================================");let I=C.NullAppender;if(y||u.args["disable-telemetry"]||!s.default.enableTelemetry)a.set(w.ITelemetryService,C.NullTelemetryService);else{
s.default.aiConfig&&s.default.aiConfig.asimovKey&&_&&(I=new P.AppInsightsAppender(q,null,s.default.aiConfig.asimovKey,k),r.push(I));const e={appender:C.combinedAppender(I,new C.LogAppender(G)),commonProperties:b.resolveCommonProperties(s.default.commit,o.default.version,n.machineId,E),piiPaths:[d,v]};a.set(w.ITelemetryService,new c.SyncDescriptor(S.TelemetryService,[e]))}e.registerChannel("telemetryAppender",new x.TelemetryAppenderChannel(I)),a.set(g.IExtensionManagementService,new c.SyncDescriptor(p.ExtensionManagementService,[!1])),a.set(g.IExtensionGalleryService,new c.SyncDescriptor(m.ExtensionGalleryService)),a.set(j.ILocalizationsService,new c.SyncDescriptor(R.LocalizationsService));const O=Z.createChild(a);O.invokeFunction(t=>{const n=t.get(g.IExtensionManagementService),i=new f.ExtensionManagementChannel(n,()=>null);e.registerChannel("extensions",i),n.removeDeprecatedExtensions();const s=t.get(j.ILocalizationsService),o=new M.LocalizationsChannel(s);e.registerChannel("localizations",o),
D.createSharedProcessContributions(O),r.push(n)})})}(yield function(e){function t(n){return a.serve(e).then(null,s=>!n||r.isWindows||"EADDRINUSE"!==s.code?Promise.reject(s):a.connect(e,"").then(e=>(e.dispose(),Promise.reject(new Error("There is an instance already running."))),n=>{try{i.unlinkSync(e)}catch(e){return Promise.reject(new Error("Error deleting the shared ipc hook."))}return t(!1)}))}return t(!0)}(t.sharedIPCHandle),t,e),O.ipcRenderer.send("handshake:im ready")})}(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.startup=$;const q="monacoworkbench"})}).call(this);
//# sourceMappingURL=https://ticino.blob.core.windows.net/sourcemaps/05f146c7a8f7f78e80261aa3b2a2e642586f9eb3/core/vs/code/electron-browser/sharedProcess/sharedProcessMain.js.map
