/*!--------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
(function(){
var e=["require","exports","vs/base/common/strings","vs/base/common/platform","vs/base/common/path","vs/base/common/event","vs/base/common/arrays","vs/base/common/extpath","vs/base/common/uri","vs/base/common/errors","vs/base/common/objects","vs/base/common/lifecycle","vs/base/common/async","vs/base/common/types","vs/base/common/map","vs/base/common/glob","child_process","vs/base/common/cancellation","vs/base/node/pfs","vs/base/common/normalization","fs","vs/platform/instantiation/common/instantiation","vs/workbench/services/search/common/search","vs/base/common/buffer","vs/base/common/stopwatch","vs/base/common/functional","vs/base/common/iterator","vs/base/parts/quickopen/common/quickOpenScorer","vs/nls","vs/nls!vs/workbench/services/search/node/searchApp","vs/base/common/errorMessage","vs/base/node/encoding","vs/platform/registry/common/platform","string_decoder","vs/workbench/services/search/common/searchExtTypes","vs/workbench/services/search/node/ripgrepSearchUtils","vs/workbench/services/search/node/rawSearchService","vs/base/common/linkedList","vs/workbench/services/search/node/textSearchAdapter","vs/base/common/amd","vs/base/common/console","vs/workbench/services/search/node/ripgrepTextSearchEngine","util","vs/base/parts/ipc/common/ipc","vs/base/common/network","vs/nls!vs/base/common/errorMessage","vs/base/common/filters","vs/base/common/comparers","vs/base/common/collections","vs/nls!vs/base/node/processes","vs/base/node/processes","vs/base/parts/ipc/node/ipc.cp","vs/nls!vs/workbench/common/views","vs/base/common/resources","vs/platform/log/common/log","vs/base/common/uuid","vs/workbench/common/views","vs/base/node/decoder","vs/base/common/process","vs/base/common/assert","vs/workbench/services/search/node/searchIpc","vs/workbench/services/search/node/textSearchManager","vs/workbench/services/search/node/ripgrepFileSearch","vscode-ripgrep","vs/workbench/services/search/node/fileSearch","os","events","stream","iconv-lite","graceful-fs","vs/workbench/services/search/node/searchApp"],t=function(t){
for(var r=[],n=0,s=t.length;n<s;n++)r[n]=e[t[n]];return r};define(e[59],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ok=function(e,t){if(!e)throw new Error(t?"Assertion failed ("+t+")":"Assertion Failed")}}),define(e[23],t([0,1]),function(e,t){"use strict";function r(){return new o}Object.defineProperty(t,"__esModule",{value:!0}),t.hasBuffer="undefined"!=typeof Buffer;let n,s;class i{static alloc(e){return new i(t.hasBuffer?Buffer.allocUnsafe(e):new Uint8Array(e))}static wrap(e){return t.hasBuffer&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new i(e)}static fromString(e){return t.hasBuffer?new i(Buffer.from(e)):(n||(n=new TextEncoder),new i(n.encode(e)))}static concat(e,t){if(void 0===t){t=0;for(let r=0,n=e.length;r<n;r++)t+=e[r].byteLength}const r=i.alloc(t);let n=0;for(let t=0,s=e.length;t<s;t++){const s=e[t];r.set(s,n),n+=s.byteLength}return r}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){
return t.hasBuffer?this.buffer.toString():(s||(s=new TextDecoder),s.decode(this.buffer))}slice(e,t){return new i(this.buffer.subarray(e,t))}set(e,t){this.buffer.set(e.buffer,t)}readUInt32BE(e){return function(e,t){return e[t]*Math.pow(2,24)+e[t+1]*Math.pow(2,16)+e[t+2]*Math.pow(2,8)+e[t+3]}(this.buffer,e)}writeUInt32BE(e,t){!function(e,t,r){e[r+3]=t,t>>>=8,e[r+2]=t,t>>>=8,e[r+1]=t,t>>>=8,e[r]=t}(this.buffer,e,t)}readUInt8(e){return function(e,t){return e[t]}(this.buffer,e)}writeUInt8(e,t){!function(e,t,r){e[r]=t}(this.buffer,e,t)}}t.VSBuffer=i,t.readableToBuffer=function(e){const t=[];let r;for(;r=e.read();)t.push(r);return i.concat(t)},t.bufferToReadable=function(e){let t=!1;return{read:()=>t?null:(t=!0,e)}},t.streamToBuffer=function(e){return new Promise((t,r)=>{const n=[];e.on("data",e=>n.push(e)),e.on("error",e=>r(e)),e.on("end",()=>t(i.concat(n)))})},t.bufferToStream=function(e){const t=r();return t.end(e),t},t.writeableBufferStream=r;class o{constructor(){this.state={flowing:!1,ended:!1,destroyed:!1},
this.buffer={data:[],error:[]},this.listeners={data:[],error:[],end:[]}}pause(){this.state.destroyed||(this.state.flowing=!1)}resume(){this.state.destroyed||this.state.flowing||(this.state.flowing=!0,this.flowData(),this.flowErrors(),this.flowEnd())}write(e){this.state.destroyed||(this.state.flowing?this.listeners.data.forEach(t=>t(e)):this.buffer.data.push(e))}error(e){this.state.destroyed||(this.state.flowing?this.listeners.error.forEach(t=>t(e)):this.buffer.error.push(e))}end(e){this.state.destroyed||(e instanceof Error?this.error(e):e&&this.write(e),this.state.flowing?(this.listeners.end.forEach(e=>e()),this.destroy()):this.state.ended=!0)}on(e,t){if(!this.state.destroyed)switch(e){case"data":this.listeners.data.push(t),this.resume();break;case"end":this.listeners.end.push(t),this.state.flowing&&this.flowEnd()&&this.destroy();break;case"error":this.listeners.error.push(t),this.state.flowing&&this.flowErrors()}}flowData(){if(this.buffer.data.length>0){const e=i.concat(this.buffer.data)
;this.listeners.data.forEach(t=>t(e)),this.buffer.data.length=0}}flowErrors(){if(this.listeners.error.length>0){for(const e of this.buffer.error)this.listeners.error.forEach(t=>t(e));this.buffer.error.length=0}}flowEnd(){return!!this.state.ended&&(this.listeners.end.forEach(e=>e()),this.listeners.end.length>0)}destroy(){this.state.destroyed||(this.state.destroyed=!0,this.state.ended=!0,this.buffer.data.length=0,this.buffer.error.length=0,this.listeners.data.length=0,this.listeners.error.length=0,this.listeners.end.length=0)}}}),define(e[48],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=Object.prototype.hasOwnProperty;t.values=function(e){const t=[];for(let n in e)r.call(e,n)&&t.push(e[n]);return t},t.size=function(e){let t=0;for(let n in e)r.call(e,n)&&(t+=1);return t},t.first=function(e){for(let t in e)if(r.call(e,t))return e[t]},t.forEach=function(e,t){for(let n in e)if(r.call(e,n)&&!1===t({key:n,value:e[n]},function(){delete e[n]}))return},
t.groupBy=function(e,t){const r=Object.create(null);for(const n of e){const e=t(n);let s=r[e];s||(s=r[e]=[]),s.push(n)}return r},t.fromMap=function(e){const t=Object.create(null);return e&&e.forEach((e,r)=>{t[r]=e}),t};class n{constructor(){this.map=new Map}add(e,t){let r=this.map.get(e);r||(r=new Set,this.map.set(e,r)),r.add(t)}delete(e,t){const r=this.map.get(e);r&&(r.delete(t),0===r.size&&this.map.delete(e))}forEach(e,t){const r=this.map.get(e);r&&r.forEach(t)}}t.SetMap=n}),define(e[9],t([0,1]),function(e,t){"use strict";function r(e){return e instanceof Error&&e.name===s&&e.message===s}Object.defineProperty(t,"__esModule",{value:!0});class n{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=n,t.errorHandler=new n,t.setUnexpectedErrorHandler=function(e){t.errorHandler.setUnexpectedErrorHandler(e)},t.onUnexpectedError=function(e){r(e)||t.errorHandler.onUnexpectedError(e)},t.onUnexpectedExternalError=function(e){r(e)||t.errorHandler.onUnexpectedExternalError(e)},t.transformErrorForSerialization=function(e){if(e instanceof Error){let{name:t,message:r}=e;return{$isError:!0,name:t,message:r,stack:e.stacktrace||e.stack}}return e};const s="Canceled";t.isPromiseCanceledError=r,t.canceled=function(){const e=new Error(s);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 r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(s,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){e.done?s(e.value):new r(function(t){t(e.value)}).then(o,a)}c((n=n.apply(e,t||[])).next())})};define(e[6],t([0,1,9]),function(e,t,n){"use strict";function s(e,t){let r=0,n=e.length;if(0===n)return 0;for(;r<n;){const s=Math.floor((r+n)/2);t(e[s])?n=s:r=s+1}return r}function i(e,t){return o(e,t,0,e.length-1,[]),e}function o(e,t,r,n,s){if(n<=r)return;const i=r+(n-r)/2|0;o(e,t,r,i,s),o(e,t,i+1,n,s),t(e[i],e[i+1])<=0||function(e,t,r,n,s,i){let o=r,a=n+1;for(let t=r;t<=s;t++)i[t]=e[t]
;for(let c=r;c<=s;c++)o>n?e[c]=i[a++]:a>s?e[c]=i[o++]:t(i[a],i[o])<0?e[c]=i[a++]:e[c]=i[o++]}(e,t,r,i,n,s)}function a(e,t,r){function n(e,t,r){if(0===t&&0===r.length)return;const n=s[s.length-1];n&&n.start+n.deleteCount===e?(n.deleteCount+=t,n.toInsert.push(...r)):s.push({start:e,deleteCount:t,toInsert:r})}const s=[];let i=0,o=0;for(;;){if(i===e.length){n(i,0,t.slice(o));break}if(o===t.length){n(i,e.length-i,[]);break}const s=e[i],a=t[o],c=r(s,a);0===c?(i+=1,o+=1):c<0?(n(i,1,[]),i+=1):c>0&&(n(i,0,[a]),o+=1)}return s}function c(e,t,r,n,i){for(const o=r.length;n<i;n++){const i=e[n];if(t(i,r[o-1])<0){r.pop();const e=s(r,e=>t(i,e)<0);r.splice(e,0,i)}}}function l(e,t){for(let r=0;r<e.length;r++){if(t(e[r]))return r}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,r=((e,t)=>e===t)){if(e===t)return!0;if(!e||!t)return!1
;if(e.length!==t.length)return!1;for(let n=0,s=e.length;n<s;n++)if(!r(e[n],t[n]))return!1;return!0},t.binarySearch=function(e,t,r){let n=0,s=e.length-1;for(;n<=s;){const i=(n+s)/2|0,o=r(e[i],t);if(o<0)n=i+1;else{if(!(o>0))return i;s=i-1}}return-(n+1)},t.findFirstInSorted=s,t.mergeSort=i,t.groupBy=function(e,t){const r=[];let n=void 0;for(const s of i(e.slice(0),t))n&&0===t(n[0],s)?n.push(s):(n=[s],r.push(n));return r},t.sortedDiff=a,t.delta=function(e,t,r){const n=a(e,t,r),s=[],i=[];for(const t of n)s.push(...e.slice(t.start,t.start+t.deleteCount)),i.push(...t.toInsert);return{removed:s,added:i}},t.top=function(e,t,r){if(0===r)return[];const n=e.slice(0,r).sort(t);return c(e,t,n,r,e.length),n},t.topAsync=function(e,t,s,i,o){return 0===s?Promise.resolve([]):new Promise((a,l)=>{(()=>r(this,void 0,void 0,function*(){const r=e.length,a=e.slice(0,s).sort(t);for(let l=s,u=Math.min(s+i,r);l<r;l=u,u=Math.min(u+i,r)){if(l>s&&(yield new Promise(e=>setTimeout(e))),o&&o.isCancellationRequested)throw n.canceled()
;c(e,t,a,l,u)}return a}))().then(a,l)})},t.coalesce=function(e){return e?e.filter(e=>!!e):e},t.coalesceInPlace=function(e){if(!e)return;let t=0;for(let r=0;r<e.length;r++)e[r]&&(e[t]=e[r],t+=1);e.length=t},t.move=function(e,t,r){e.splice(r,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,r)=>e.indexOf(t)===r);const r=Object.create(null);return e.filter(e=>{const n=t(e);return!r[n]&&(r[n]=!0,!0)})},t.distinctES6=function(e){const t=new Set;return e.filter(e=>!t.has(e)&&(t.add(e),!0))},t.uniqueFilter=function(e){const t=Object.create(null);return r=>{const n=e(r);return!t[n]&&(t[n]=!0,!0)}},t.lastIndex=function(e,t){for(let r=e.length-1;r>=0;r--)if(t(e[r]))return r;return-1},t.firstIndex=l,t.first=function(e,t,r){const n=l(e,t);return n<0?r:e[n]},t.commonPrefixLength=function(e,t,r=((e,t)=>e===t)){let n=0
;for(let s=0,i=Math.min(e.length,t.length);s<i&&r(e[s],t[s]);s++)n++;return n},t.flatten=function(e){return[].concat(...e)},t.range=function(e,t){let r="number"==typeof t?e:0;"number"==typeof t?r=e:(r=0,t=e);const n=[];if(r<=t)for(let e=r;e<t;e++)n.push(e);else for(let e=r;e>t;e--)n.push(e);return n},t.fill=function(e,t,r=[]){for(let n=0;n<e;n++)r[n]=t;return r},t.index=function(e,t,r=(e=>e)){return e.reduce((e,n)=>{const s=t(n);return e[s]=r(n,e[s]),e},Object.create(null))},t.insert=function(e,t){return e.push(t),()=>{const r=e.indexOf(t);r>-1&&e.splice(r,1)}},t.arrayInsert=function(e,t,r){const n=e.slice(0,t),s=e.slice(t);return n.concat(r,s)},t.shuffle=function(e,t){let r;if("number"==typeof t){let e=t;r=(()=>{const t=179426549*Math.sin(e++);return t-Math.floor(t)})}else r=Math.random;for(let t=e.length-1;t>0;t-=1){const n=Math.floor(r()*(t+1)),s=e[t];e[t]=e[n],e[n]=s}},t.pushToStart=function(e,t){const r=e.indexOf(t);r>-1&&(e.splice(r,1),e.unshift(t))},t.pushToEnd=function(e,t){const r=e.indexOf(t)
;r>-1&&(e.splice(r,1),e.push(t))},t.find=function(e,t){for(let r=0;r<e.length;r++){const n=e[r];if(t(n,r,e))return n}},t.mapArrayOrNot=function(e,t){return Array.isArray(e)?e.map(t):t(e)},t.asArray=function(e){return Array.isArray(e)?e:[e]}}),define(e[25],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.once=function(e){const t=this;let r,n=!1;return function(){return n?r:(n=!0,r=e.apply(t,arguments))}}}),define(e[26],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FIN={done:!0,value:void 0};var r;!function(e){function r(e,t){for(let r=e.next();!r.done;r=e.next())t(r.value)}const n={next:()=>t.FIN};e.empty=function(){return n},e.fromArray=function(e,r=0,n=e.length){return{next:()=>r>=n?t.FIN:{done:!1,value:e[r++]}}},e.from=function(t){return t?Array.isArray(t)?e.fromArray(t):t:e.empty()},e.map=function(e,r){return{next(){const n=e.next();return n.done?t.FIN:{done:!1,value:r(n.value)}}}},e.filter=function(e,r){return{next(){for(;;){
const n=e.next();if(n.done)return t.FIN;if(r(n.value))return{done:!1,value:n.value}}}}},e.forEach=r,e.collect=function(e){const t=[];return r(e,e=>t.push(e)),t}}(r=t.Iterator||(t.Iterator={})),t.getSequenceIterator=function(e){return Array.isArray(e)?r.fromArray(e):e};class n{constructor(e,t=0,r=e.length,n=t-1){this.items=e,this.start=t,this.end=r,this.index=n}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=n;class s extends n{constructor(e,t=0,r=e.length,n=t-1){super(e,t,r,n)}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=s;class i{constructor(e,t){this.iterator=e,this.fn=t}next(){return this.fn(this.iterator.next())}}
t.MappedIterator=i;class o extends i{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[11],t([0,1,25]),function(e,t,r){"use strict";function n(e){if(o&&e&&e!==l.None)try{e[a]=!0}catch(e){}}function s(e){if(!o)return e;const t=(new Error).stack;return setTimeout(()=>{e[a]||console.log(t)},3e3),e}function i(e){return Array.isArray(e)?(e.forEach(e=>{e&&(n(e),e.dispose())}),[]):e?(n(e),e.dispose(),e):void 0}Object.defineProperty(t,"__esModule",{value:!0});const o=!1,a="__is_disposable_tracked__";t.isDisposable=function(e){return"function"==typeof e.dispose&&0===e.dispose.length},t.dispose=i,t.combinedDisposable=function(...e){return e.forEach(n),s({dispose:()=>i(e)})},t.toDisposable=function(e){
return s({dispose:e})};class c{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(n(this),this._isDisposed=!0,this.clear())}clear(){this._toDispose.forEach(e=>e.dispose()),this._toDispose.clear()}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return n(e),this._isDisposed?(console.warn(new Error("Registering disposable on object that has already been disposed of").stack),e.dispose()):this._toDispose.add(e),e}}t.DisposableStore=c;class l{constructor(){this._store=new c,s(this)}dispose(){n(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}l.None=Object.freeze({dispose(){}}),t.Disposable=l;class u{constructor(){this._isDisposed=!1,s(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value&&this._value.dispose(),e&&n(e),this._value=e)}clear(){this.value=void 0}dispose(){
this._isDisposed=!0,n(this),this._value&&this._value.dispose(),this._value=void 0}}t.MutableDisposable=u;class h{constructor(){this.references=new Map}acquire(e){let t=this.references.get(e);t||(t={counter:0,object:this.createReferencedObject(e)},this.references.set(e,t));const{object:n}=t,s=r.once(()=>{0==--t.counter&&(this.destroyReferencedObject(e,t.object),this.references.delete(e))});return t.counter++,{object:n,dispose:s}}}t.ReferenceCollection=h;class f{constructor(e){this.object=e}dispose(){}}t.ImmortalReference=f}),define(e[37],t([0,1,26]),function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(e){this.element=e,this.next=n.Undefined,this.prev=n.Undefined}}n.Undefined=new n(void 0);class s{constructor(){this._first=n.Undefined,this._last=n.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===n.Undefined}clear(){this._first=n.Undefined,this._last=n.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){
return this._insert(e,!0)}_insert(e,t){const r=new n(e);if(this._first===n.Undefined)this._first=r,this._last=r;else if(t){const e=this._last;this._last=r,r.prev=e,e.next=r}else{const e=this._first;this._first=r,r.next=e,e.prev=r}this._size+=1;let s=!1;return()=>{s||(s=!0,this._remove(r))}}shift(){if(this._first!==n.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==n.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==n.Undefined&&e.next!==n.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===n.Undefined&&e.next===n.Undefined?(this._first=n.Undefined,this._last=n.Undefined):e.next===n.Undefined?(this._last=this._last.prev,this._last.next=n.Undefined):e.prev===n.Undefined&&(this._first=this._first.next,this._first.prev=n.Undefined);this._size-=1}iterator(){let e,t=this._first;return{next:()=>t===n.Undefined?r.FIN:(e?e.value=t.element:e={done:!1,value:t.element},t=t.next,e)}}toArray(){const e=[]
;for(let t=this._first;t!==n.Undefined;t=t.next)e.push(t.element);return e}}t.LinkedList=s}),define(e[5],t([0,1,9,25,11,37]),function(e,t,n,s,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a;!function(e){function t(e){return(t,r=null,n)=>{let s,i=!1;return s=e(e=>{if(!i)return s?s.dispose():i=!0,t.call(r,e)},null,n),i&&s.dispose(),s}}function r(e,t){return a((r,n=null,s)=>e(e=>r.call(n,t(e)),null,s))}function n(e,t){return a((r,n=null,s)=>e(e=>{t(e),r.call(n,e)},null,s))}function s(e,t){return a((r,n=null,s)=>e(e=>t(e)&&r.call(n,e),null,s))}function o(e,t,n){let s=n;return r(e,e=>s=t(s,e))}function a(e){let t;const r=new u({onFirstListenerAdd(){t=e(r.fire,r)},onLastListenerRemove(){t.dispose()}});return r.event}function c(e){let t,r=!0;return s(e,e=>{const n=r||e!==t;return r=!1,t=e,n})}e.None=(()=>i.Disposable.None),e.once=t,e.map=r,e.forEach=n,e.filter=s,e.signal=function(e){return e},e.any=function(...e){return(t,r=null,n)=>i.combinedDisposable(...e.map(e=>e(e=>t.call(r,e),null,n)))
},e.reduce=o,e.snapshot=a,e.debounce=function(e,t,r=100,n=!1,s){let i,o=void 0,a=void 0,c=0;const l=new u({leakWarningThreshold:s,onFirstListenerAdd(){i=e(e=>{c++,o=t(o,e),n&&!a&&l.fire(o),clearTimeout(a),a=setTimeout(()=>{const e=o;o=void 0,a=void 0,(!n||c>1)&&l.fire(e),c=0},r)})},onLastListenerRemove(){i.dispose()}});return l.event},e.stopwatch=function(e){const n=(new Date).getTime();return r(t(e),e=>(new Date).getTime()-n)},e.latch=c,e.buffer=function(e,t=!1,r=[]){let n=r.slice(),s=e(e=>{n?n.push(e):o.fire(e)});const i=()=>{n&&n.forEach(e=>o.fire(e)),n=null},o=new u({onFirstListenerAdd(){s||(s=e(e=>o.fire(e)))},onFirstListenerDidAdd(){n&&(t?setTimeout(i):i())},onLastListenerRemove(){s&&s.dispose(),s=null}});return o.event};class l{constructor(e){this.event=e}map(e){return new l(r(this.event,e))}forEach(e){return new l(n(this.event,e))}filter(e){return new l(s(this.event,e))}reduce(e,t){return new l(o(this.event,e,t))}latch(){return new l(c(this.event))}on(e,t,r){return this.event(e,t,r)}once(e,r,n){
return t(this.event)(e,r,n)}}e.chain=function(e){return new l(e)},e.fromNodeEventEmitter=function(e,t,r=(e=>e)){const n=(...e)=>s.fire(r(...e)),s=new u({onFirstListenerAdd:()=>e.on(t,n),onLastListenerRemove:()=>e.removeListener(t,n)});return s.event},e.fromPromise=function(e){const t=new u;let r=!1;return e.then(void 0,()=>null).then(()=>{r?t.fire(void 0):setTimeout(()=>t.fire(void 0),0)}),r=!0,t.event},e.toPromise=function(e){return new Promise(r=>t(e)(r))}}(a=t.Event||(t.Event={}));let c=-1;t.setGlobalLeakWarningThreshold=function(e){const t=c;return c=e,{dispose(){c=t}}};class l{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=c;if("number"==typeof this.customThreshold&&(t=this.customThreshold),t<=0||e<t)return;this._stacks||(this._stacks=new Map);const r=(new Error).stack.split("\n").slice(3).join("\n"),n=this._stacks.get(r)||0;if(this._stacks.set(r,n+1),this._warnCountdown-=1,
this._warnCountdown<=0){this._warnCountdown=.5*t;let r,n=0;this._stacks.forEach((e,t)=>{(!r||n<e)&&(r=t,n=e)}),console.warn(`[${this.name}] potential listener LEAK detected, having ${e} listeners already. MOST frequent listener (${n}):`),console.warn(r)}return()=>{const e=this._stacks.get(r)||0;this._stacks.set(r,e-1)}}}class u{constructor(e){this._disposed=!1,this._options=e,this._leakageMon=c>0?new l(this._options&&this._options.leakWarningThreshold):void 0}get event(){return this._event||(this._event=((e,t,r)=>{this._listeners||(this._listeners=new o.LinkedList);const n=this._listeners.isEmpty();n&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const s=this._listeners.push(t?[e,t]:e);n&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,e,t);let a;this._leakageMon&&(a=this._leakageMon.check(this._listeners.size));let c;return c={dispose:()=>{
if(a&&a(),c.dispose=u._noop,!this._disposed&&(s(),this._options&&this._options.onLastListenerRemove)){this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)}}},r instanceof i.DisposableStore?r.add(c):Array.isArray(r)&&r.push(c),c})),this._event}fire(e){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new o.LinkedList);for(let t=this._listeners.iterator(),r=t.next();!r.done;r=t.next())this._deliveryQueue.push([r.value,e]);for(;this._deliveryQueue.size>0;){const[e,t]=this._deliveryQueue.shift();try{"function"==typeof e?e.call(void 0,t):e[0].call(e[1],t)}catch(e){n.onUnexpectedError(e)}}}}dispose(){this._listeners&&this._listeners.clear(),this._deliveryQueue&&this._deliveryQueue.clear(),this._leakageMon&&this._leakageMon.dispose(),this._disposed=!0}}u._noop=function(){},t.Emitter=u;class h extends u{constructor(e){super(e),this._isPaused=0,this._eventQueue=new o.LinkedList,this._mergeFn=e&&e.merge}pause(){this._isPaused++}resume(){
if(0!==this._isPaused&&0==--this._isPaused)if(this._mergeFn){const e=this._eventQueue.toArray();this._eventQueue.clear(),super.fire(this._mergeFn(e))}else for(;!this._isPaused&&0!==this._eventQueue.size;)super.fire(this._eventQueue.shift())}fire(e){this._listeners&&(0!==this._isPaused?this._eventQueue.push(e):super.fire(e))}}t.PauseableEmitter=h;class f extends u{fireAsync(e){return r(this,void 0,void 0,function*(){if(this._listeners){this._asyncDeliveryQueue||(this._asyncDeliveryQueue=[]);for(let t=this._listeners.iterator(),r=t.next();!r.done;r=t.next()){const t=[];this._asyncDeliveryQueue.push([r.value,e(t,"function"==typeof r.value?r.value:r.value[0]),t])}for(;this._asyncDeliveryQueue.length>0;){const[e,t,r]=this._asyncDeliveryQueue.shift();try{"function"==typeof e?e.call(void 0,t):e[0].call(e[1],t)}catch(e){n.onUnexpectedError(e);continue}Object.freeze(r),yield Promise.all(r)}}})}}t.AsyncEmitter=f;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 i.toDisposable(s.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 p{constructor(){this.buffers=[]}wrapEvent(e){return(t,r,n)=>e(e=>{const n=this.buffers[this.buffers.length-1];n?n.push(()=>t.call(r,e)):t.call(r,e)},void 0,n)}bufferEvents(e){const t=[];this.buffers.push(t);const r=e();return this.buffers.pop(),t.forEach(e=>e()),r}}t.EventBufferer=p;class m{constructor(){this.listening=!1,
this.inputEvent=a.None,this.inputEventListener=i.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=m}),define(e[17],t([0,1,5]),function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=Object.freeze(function(e,t){const r=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(r)}}});var s;!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||t instanceof i||!(!t||"object"!=typeof t)&&"boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested},e.None=Object.freeze({isCancellationRequested:!1,
onCancellationRequested:r.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:n})}(s=t.CancellationToken||(t.CancellationToken={}));class i{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?n:(this._emitter||(this._emitter=new r.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class o{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new i),this._token}cancel(){this._token?this._token instanceof i&&this._token.cancel():this._token=s.Cancelled}dispose(){this._parentListener&&this._parentListener.dispose(),
this._token?this._token instanceof i&&this._token.dispose():this._token=s.None}}t.CancellationTokenSource=o}),define(e[12],t([0,1,17,9,5,11]),function(e,t,n,s,i,o){"use strict";function a(e){return e&&"function"==typeof e.then}function c(e){const t=new n.CancellationTokenSource,r=e(t.token),i=new Promise((e,n)=>{t.token.onCancellationRequested(()=>{n(s.canceled())}),Promise.resolve(r).then(r=>{t.dispose(),e(r)},e=>{t.dispose(),n(e)})});return new class{cancel(){t.cancel()}then(e,t){return i.then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return i.finally(e)}}}function l(e,t){return t?new Promise((r,n)=>{const i=setTimeout(r,e);t.onCancellationRequested(()=>{clearTimeout(i),n(s.canceled())})}):c(t=>l(e,t))}function u(e){function t(i){void 0!==i&&null!==i&&r.push(i);const o=n<s?e[n++]():null;return o?o.then(t):Promise.resolve(r)}const r=[];let n=0;const s=e.length;return Promise.resolve(null).then(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.isThenable=a,t.createCancelablePromise=c,
t.raceCancellation=function(e,t,r){return Promise.race([e,new Promise(e=>t.onCancellationRequested(()=>e(r)))])},t.asPromise=function(e){return new Promise((t,r)=>{const n=e();a(n)?n.then(t,r):t(n)})};class h{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=h;class f{constructor(){this.current=Promise.resolve(null)}queue(e){return this.current=this.current.then(()=>e())}}t.Sequencer=f;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(s.canceled()),this.completionPromise=null)}cancelTimeout(){null!==this.timeout&&(clearTimeout(this.timeout),this.timeout=null)}dispose(){this.cancelTimeout()}}t.Delayer=d;class p{constructor(e){this.delayer=new d(e),this.throttler=new h}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=p;class m{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=m,t.timeout=l,t.disposableTimeout=function(e,t=0){const r=setTimeout(e,t);return o.toDisposable(()=>clearTimeout(r))},t.ignoreErrors=function(e){return e.then(void 0,e=>void 0)},t.sequence=u,t.first=function(e,t=(e=>!!e),r=null){let n=0;const s=e.length,i=()=>{if(n>=s)return Promise.resolve(r);const o=e[n++];return Promise.resolve(o()).then(e=>t(e)?Promise.resolve(e):i())};return i()};class g{constructor(e){this._size=0,this.maxDegreeOfParalellism=e,this.outstandingPromises=[],this.runningPromises=0,this._onFinished=new i.Emitter}get onFinished(){return this._onFinished.event}get size(){return this._size}queue(e){return this._size++,new Promise((t,r)=>{this.outstandingPromises.push({factory:e,c:t,e:r}),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=g;class v extends g{constructor(){super(1)}}t.Queue=v;class w{constructor(){this.queues=new Map}queueFor(e){const t=e.toString();if(!this.queues.has(t)){const e=new v;e.onFinished(()=>{e.dispose(),this.queues.delete(t)}),this.queues.set(t,e)}return this.queues.get(t)}}t.ResourceQueue=w;class y{constructor(e,t){this._token=-1,"function"==typeof e&&"number"==typeof t&&this.setIfNotSet(e,t)}dispose(){this.cancel()}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 b{constructor(){
this._token=-1}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearInterval(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setInterval(()=>{e()},t)}}t.IntervalTimer=b;class _{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=_;class C extends _{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=C,function(){
if("function"!=typeof requestIdleCallback||"function"!=typeof cancelIdleCallback){const e=Object.freeze({didTimeout:!0,timeRemaining:()=>15});t.runWhenIdle=(t=>{const r=setTimeout(()=>t(e));let n=!1;return{dispose(){n||(n=!0,clearTimeout(r))}}})}else t.runWhenIdle=((e,t)=>{const r=requestIdleCallback(e,"number"==typeof t?{timeout:t}:void 0);let n=!1;return{dispose(){n||(n=!0,cancelIdleCallback(r))}}})}();class x{constructor(e){this._didRun=!1,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=x,t.retry=function(e,t,n){return r(this,void 0,void 0,function*(){let r;for(let s=0;s<n;s++)try{return yield e()}catch(e){r=e,yield l(t)}return Promise.reject(r)})}}),define(e[44],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})
;!function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote"}(t.Schemas||(t.Schemas={}))}),define(e[3],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=!1,n=!1,s=!1,i=!1,o=!1,a=void 0,c="en",l=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){r="win32"===process.platform,n="darwin"===process.platform,s="linux"===process.platform,a="en",c="en";const e=process.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),r=t.availableLanguages["*"];a=t.locale,c=r||"en",l=t._translationsConfigFile}catch(e){}i=!0}}else{const e=navigator.userAgent;r=e.indexOf("Windows")>=0,n=e.indexOf("Macintosh")>=0,
s=e.indexOf("Linux")>=0,o=!0,c=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;i&&(n?h=1:r?h=3:s&&(h=2)),t.isWindows=r,t.isMacintosh=n,t.isLinux=s,t.isNative=i,t.isWeb=o,t.platform=h,t.isRootUser=function(){return i&&!r&&0===process.getuid()},t.language=c;!function(e){e.value=function(){return t.language},e.isDefaultVariant=function(){return 2===t.language.length?"en"===t.language:t.language.length>=3&&"e"===t.language[0]&&"n"===t.language[1]&&"-"===t.language[2]},e.isDefault=function(){return"en"===t.language}}(t.Language||(t.Language={})),t.locale=a,t.translationsConfigFile=l;const f="object"==typeof self?self:"object"==typeof global?global:{};t.globals=f;let d=null;t.setImmediate=function(e){
return null===d&&(d=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)),d(e)};!function(e){e[e.Windows=1]="Windows",e[e.Macintosh=2]="Macintosh",e[e.Linux=3]="Linux"}(t.OperatingSystem||(t.OperatingSystem={})),t.OS=n?2:r?1:3}),define(e[58],t([0,1,3]),function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n="undefined"==typeof process?{cwd:()=>"/",env:Object.create(null),get platform(){return r.isWindows?"win32":r.isMacintosh?"darwin":"linux"},nextTick:e=>r.setImmediate(e)}:process;t.cwd=n.cwd,t.env=n.env,t.platform=n.platform,t.nextTick=n.nextTick}),define(e[4],t([0,1,58]),function(e,t,r){"use strict";function n(e,t){if("string"!=typeof e)throw new g(t,"string",e)}function s(e){return e===p||e===m}function i(e){return e===p}function o(e){return e>=l&&e<=h||e>=u&&e<=f}function a(e,t,r,n){let s,i="",o=0,a=-1,c=0;for(let l=0;l<=e.length;++l){
if(l<e.length)s=e.charCodeAt(l);else{if(n(s))break;s=p}if(n(s)){if(a===l-1||1===c);else if(a!==l-1&&2===c){if(i.length<2||2!==o||i.charCodeAt(i.length-1)!==d||i.charCodeAt(i.length-2)!==d){if(i.length>2){const e=i.lastIndexOf(r);-1===e?(i="",o=0):o=(i=i.slice(0,e)).length-1-i.lastIndexOf(r),a=l,c=0;continue}if(2===i.length||1===i.length){i="",o=0,a=l,c=0;continue}}t&&(i.length>0?i+=`${r}..`:i="..",o=2)}else i.length>0?i+=r+e.slice(a+1,l):i=e.slice(a+1,l),o=l-a-1;a=l,c=0}else s===d&&-1!==c?++c:c=-1}return i}function c(e,t){const r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+e+n:n}Object.defineProperty(t,"__esModule",{value:!0});const l=65,u=97,h=90,f=122,d=46,p=47,m=92;class g extends Error{constructor(e,t,r){let n;"string"==typeof t&&0===t.indexOf("not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";let s=`The "${e}" ${-1!==e.indexOf(".")?"property":"argument"} ${n} of type ${t}`;super(s+=`. Received type ${typeof r}`)}}t.win32={resolve(...e){let t="",i="",c=!1
;for(let a=e.length-1;a>=-1;a--){let l;if(a>=0?l=e[a]:t?void 0!==(l=r.env["="+t]||r.cwd())&&l.slice(0,3).toLowerCase()===t.toLowerCase()+"\\"||(l=t+"\\"):l=r.cwd(),n(l,"path"),0===l.length)continue;const u=l.length;let h=0,f="",d=!1;const p=l.charCodeAt(0);if(u>1)if(s(p))if(d=!0,s(l.charCodeAt(1))){let e=2,t=e;for(;e<u&&!s(l.charCodeAt(e));++e);if(e<u&&e!==t){const r=l.slice(t,e);for(t=e;e<u&&s(l.charCodeAt(e));++e);if(e<u&&e!==t){for(t=e;e<u&&!s(l.charCodeAt(e));++e);e===u?(f="\\\\"+r+"\\"+l.slice(t),h=e):e!==t&&(f="\\\\"+r+"\\"+l.slice(t,e),h=e)}}}else h=1;else o(p)&&58===l.charCodeAt(1)&&(f=l.slice(0,2),h=2,u>2&&s(l.charCodeAt(2))&&(d=!0,h=3));else s(p)&&(h=1,d=!0);if(!(f.length>0&&t.length>0&&f.toLowerCase()!==t.toLowerCase())&&(0===t.length&&f.length>0&&(t=f),c||(i=l.slice(h)+"\\"+i,c=d),t.length>0&&c))break}return i=a(i,!c,"\\",s),t+(c?"\\":"")+i||"."},normalize(e){n(e,"path");const t=e.length;if(0===t)return".";let r,i=0,c=!1;const l=e.charCodeAt(0);if(t>1)if(s(l))if(c=!0,s(e.charCodeAt(1))){
let n=2,o=n;for(;n<t&&!s(e.charCodeAt(n));++n);if(n<t&&n!==o){const a=e.slice(o,n);for(o=n;n<t&&s(e.charCodeAt(n));++n);if(n<t&&n!==o){for(o=n;n<t&&!s(e.charCodeAt(n));++n);if(n===t)return"\\\\"+a+"\\"+e.slice(o)+"\\";n!==o&&(r="\\\\"+a+"\\"+e.slice(o,n),i=n)}}}else i=1;else o(l)&&58===e.charCodeAt(1)&&(r=e.slice(0,2),i=2,t>2&&s(e.charCodeAt(2))&&(c=!0,i=3));else if(s(l))return"\\";let u;return 0!==(u=i<t?a(e.slice(i),!c,"\\",s):"").length||c||(u="."),u.length>0&&s(e.charCodeAt(t-1))&&(u+="\\"),void 0===r?c?u.length>0?"\\"+u:"\\":u.length>0?u:"":c?u.length>0?r+"\\"+u:r+"\\":u.length>0?r+u:r},isAbsolute(e){n(e,"path");const t=e.length;if(0===t)return!1;const r=e.charCodeAt(0);return!!s(r)||!!(o(r)&&t>2&&58===e.charCodeAt(1)&&s(e.charCodeAt(2)))},join(...e){if(0===e.length)return".";let r,i;for(let t=0;t<e.length;++t){const s=e[t];n(s,"path"),s.length>0&&(void 0===r?r=i=s:r+="\\"+s)}if(void 0===r)return".";let o=!0,a=0;if("string"==typeof i&&s(i.charCodeAt(0))){++a;const e=i.length
;e>1&&s(i.charCodeAt(1))&&(++a,e>2&&(s(i.charCodeAt(2))?++a:o=!1))}if(o){for(;a<r.length&&s(r.charCodeAt(a));++a);a>=2&&(r="\\"+r.slice(a))}return t.win32.normalize(r)},relative(e,r){if(n(e,"from"),n(r,"to"),e===r)return"";const s=t.win32.resolve(e),i=t.win32.resolve(r);if(s===i)return"";if(e=s.toLowerCase(),r=i.toLowerCase(),e===r)return"";let o=0;for(;o<e.length&&e.charCodeAt(o)===m;++o);let a=e.length;for(;a-1>o&&e.charCodeAt(a-1)===m;--a);const c=a-o;let l=0;for(;l<r.length&&r.charCodeAt(l)===m;++l);let u=r.length;for(;u-1>l&&r.charCodeAt(u-1)===m;--u);const h=u-l,f=c<h?c:h;let d=-1,p=0;for(;p<=f;++p){if(p===f){if(h>f){if(r.charCodeAt(l+p)===m)return i.slice(l+p+1);if(2===p)return i.slice(l+p)}c>f&&(e.charCodeAt(o+p)===m?d=p:2===p&&(d=3));break}const t=e.charCodeAt(o+p);if(t!==r.charCodeAt(l+p))break;t===m&&(d=p)}if(p!==f&&-1===d)return i;let g="";for(-1===d&&(d=0),p=o+d+1;p<=a;++p)p!==a&&e.charCodeAt(p)!==m||(0===g.length?g+="..":g+="\\..");return g.length>0?g+i.slice(l+d,u):(l+=d,
i.charCodeAt(l)===m&&++l,i.slice(l,u))},toNamespacedPath(e){if("string"!=typeof e)return e;if(0===e.length)return"";const r=t.win32.resolve(e);if(r.length>=3)if(r.charCodeAt(0)===m){if(r.charCodeAt(1)===m){const e=r.charCodeAt(2);if(63!==e&&e!==d)return"\\\\?\\UNC\\"+r.slice(2)}}else if(o(r.charCodeAt(0))&&58===r.charCodeAt(1)&&r.charCodeAt(2)===m)return"\\\\?\\"+r;return e},dirname(e){n(e,"path");const t=e.length;if(0===t)return".";let r=-1,i=-1,a=!0,c=0;const l=e.charCodeAt(0);if(t>1)if(s(l)){if(r=c=1,s(e.charCodeAt(1))){let n=2,i=n;for(;n<t&&!s(e.charCodeAt(n));++n);if(n<t&&n!==i){for(i=n;n<t&&s(e.charCodeAt(n));++n);if(n<t&&n!==i){for(i=n;n<t&&!s(e.charCodeAt(n));++n);if(n===t)return e;n!==i&&(r=c=n+1)}}}}else o(l)&&58===e.charCodeAt(1)&&(r=c=2,t>2&&s(e.charCodeAt(2))&&(r=c=3));else if(s(l))return e;for(let r=t-1;r>=c;--r)if(s(e.charCodeAt(r))){if(!a){i=r;break}}else a=!1;if(-1===i){if(-1===r)return".";i=r}return e.slice(0,i)},basename(e,t){void 0!==t&&n(t,"ext"),n(e,"path");let r,i=0,a=-1,c=!0
;if(e.length>=2){o(e.charCodeAt(0))&&58===e.charCodeAt(1)&&(i=2)}if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";let n=t.length-1,o=-1;for(r=e.length-1;r>=i;--r){const l=e.charCodeAt(r);if(s(l)){if(!c){i=r+1;break}}else-1===o&&(c=!1,o=r+1),n>=0&&(l===t.charCodeAt(n)?-1==--n&&(a=r):(n=-1,a=o))}return i===a?a=o:-1===a&&(a=e.length),e.slice(i,a)}for(r=e.length-1;r>=i;--r)if(s(e.charCodeAt(r))){if(!c){i=r+1;break}}else-1===a&&(c=!1,a=r+1);return-1===a?"":e.slice(i,a)},extname(e){n(e,"path");let t=0,r=-1,i=0,a=-1,c=!0,l=0;e.length>=2&&58===e.charCodeAt(1)&&o(e.charCodeAt(0))&&(t=i=2);for(let n=e.length-1;n>=t;--n){const t=e.charCodeAt(n);if(s(t)){if(!c){i=n+1;break}}else-1===a&&(c=!1,a=n+1),t===d?-1===r?r=n:1!==l&&(l=1):-1!==r&&(l=-1)}return-1===r||-1===a||0===l||1===l&&r===a-1&&r===i+1?"":e.slice(r,a)},format(e){if(null===e||"object"!=typeof e)throw new g("pathObject","Object",e);return c("\\",e)},parse(e){n(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""}
;if(0===e.length)return t;const r=e.length;let i=0,a=e.charCodeAt(0);if(r>1){if(s(a)){if(i=1,s(e.charCodeAt(1))){let t=2,n=t;for(;t<r&&!s(e.charCodeAt(t));++t);if(t<r&&t!==n){for(n=t;t<r&&s(e.charCodeAt(t));++t);if(t<r&&t!==n){for(n=t;t<r&&!s(e.charCodeAt(t));++t);t===r?i=t:t!==n&&(i=t+1)}}}}else if(o(a)&&58===e.charCodeAt(1)){if(i=2,!(r>2))return t.root=t.dir=e,t;if(s(e.charCodeAt(2))){if(3===r)return t.root=t.dir=e,t;i=3}}}else if(s(a))return t.root=t.dir=e,t;i>0&&(t.root=e.slice(0,i));let c=-1,l=i,u=-1,h=!0,f=e.length-1,p=0;for(;f>=i;--f)if(a=e.charCodeAt(f),s(a)){if(!h){l=f+1;break}}else-1===u&&(h=!1,u=f+1),a===d?-1===c?c=f:1!==p&&(p=1):-1!==c&&(p=-1);return-1===c||-1===u||0===p||1===p&&c===u-1&&c===l+1?-1!==u&&(t.base=t.name=e.slice(l,u)):(t.name=e.slice(l,c),t.base=e.slice(l,u),t.ext=e.slice(c,u)),t.dir=l>0&&l!==i?e.slice(0,l-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},t.posix={resolve(...e){let t="",s=!1;for(let i=e.length-1;i>=-1&&!s;i--){let o;n(o=i>=0?e[i]:r.cwd(),"path"),
0!==o.length&&(t=o+"/"+t,s=o.charCodeAt(0)===p)}return t=a(t,!s,"/",i),s?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize(e){if(n(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===p,r=e.charCodeAt(e.length-1)===p;return 0!==(e=a(e,!t,"/",i)).length||t||(e="."),e.length>0&&r&&(e+="/"),t?"/"+e:e},isAbsolute:e=>(n(e,"path"),e.length>0&&e.charCodeAt(0)===p),join(...e){if(0===e.length)return".";let r;for(let t=0;t<e.length;++t){const e=arguments[t];n(e,"path"),e.length>0&&(void 0===r?r=e:r+="/"+e)}return void 0===r?".":t.posix.normalize(r)},relative(e,r){if(n(e,"from"),n(r,"to"),e===r)return"";if(e=t.posix.resolve(e),r=t.posix.resolve(r),e===r)return"";let s=1;for(;s<e.length&&e.charCodeAt(s)===p;++s);const i=e.length,o=i-s;let a=1;for(;a<r.length&&r.charCodeAt(a)===p;++a);const c=r.length-a,l=o<c?o:c;let u=-1,h=0;for(;h<=l;++h){if(h===l){if(c>l){if(r.charCodeAt(a+h)===p)return r.slice(a+h+1);if(0===h)return r.slice(a+h)}else o>l&&(e.charCodeAt(s+h)===p?u=h:0===h&&(u=0));break}const t=e.charCodeAt(s+h)
;if(t!==r.charCodeAt(a+h))break;t===p&&(u=h)}let f="";for(h=s+u+1;h<=i;++h)h!==i&&e.charCodeAt(h)!==p||(0===f.length?f+="..":f+="/..");return f.length>0?f+r.slice(a+u):(a+=u,r.charCodeAt(a)===p&&++a,r.slice(a))},toNamespacedPath:e=>e,dirname(e){if(n(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===p;let r=-1,s=!0;for(let t=e.length-1;t>=1;--t)if(e.charCodeAt(t)===p){if(!s){r=t;break}}else s=!1;return-1===r?t?"/":".":t&&1===r?"//":e.slice(0,r)},basename(e,t){void 0!==t&&n(t,"ext"),n(e,"path");let r,s=0,i=-1,o=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";let n=t.length-1,a=-1;for(r=e.length-1;r>=0;--r){const c=e.charCodeAt(r);if(c===p){if(!o){s=r+1;break}}else-1===a&&(o=!1,a=r+1),n>=0&&(c===t.charCodeAt(n)?-1==--n&&(i=r):(n=-1,i=a))}return s===i?i=a:-1===i&&(i=e.length),e.slice(s,i)}for(r=e.length-1;r>=0;--r)if(e.charCodeAt(r)===p){if(!o){s=r+1;break}}else-1===i&&(o=!1,i=r+1);return-1===i?"":e.slice(s,i)},extname(e){n(e,"path");let t=-1,r=0,s=-1,i=!0,o=0
;for(let n=e.length-1;n>=0;--n){const a=e.charCodeAt(n);if(a!==p)-1===s&&(i=!1,s=n+1),a===d?-1===t?t=n:1!==o&&(o=1):-1!==t&&(o=-1);else if(!i){r=n+1;break}}return-1===t||-1===s||0===o||1===o&&t===s-1&&t===r+1?"":e.slice(t,s)},format(e){if(null===e||"object"!=typeof e)throw new g("pathObject","Object",e);return c("/",e)},parse(e){n(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const r=e.charCodeAt(0)===p;let s;r?(t.root="/",s=1):s=0;let i=-1,o=0,a=-1,c=!0,l=e.length-1,u=0;for(;l>=s;--l){const t=e.charCodeAt(l);if(t!==p)-1===a&&(c=!1,a=l+1),t===d?-1===i?i=l:1!==u&&(u=1):-1!==i&&(u=-1);else if(!c){o=l+1;break}}return-1===i||-1===a||0===u||1===u&&i===a-1&&i===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,i),t.base=e.slice(1,a)):(t.name=e.slice(o,i),t.base=e.slice(o,a)),t.ext=e.slice(i,a)),o>0?t.dir=e.slice(0,o-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null},t.posix.win32=t.win32.win32=t.win32,
t.posix.posix=t.win32.posix=t.posix,t.normalize="win32"===r.platform?t.win32.normalize:t.posix.normalize,t.isAbsolute="win32"===r.platform?t.win32.isAbsolute:t.posix.isAbsolute,t.join="win32"===r.platform?t.win32.join:t.posix.join,t.resolve="win32"===r.platform?t.win32.resolve:t.posix.resolve,t.relative="win32"===r.platform?t.win32.relative:t.posix.relative,t.dirname="win32"===r.platform?t.win32.dirname:t.posix.dirname,t.basename="win32"===r.platform?t.win32.basename:t.posix.basename,t.extname="win32"===r.platform?t.win32.extname:t.posix.extname,t.format="win32"===r.platform?t.win32.format:t.posix.format,t.parse="win32"===r.platform?t.win32.parse:t.posix.parse,t.toNamespacedPath="win32"===r.platform?t.win32.toNamespacedPath:t.posix.toNamespacedPath,t.sep="win32"===r.platform?t.win32.sep:t.posix.sep,t.delimiter="win32"===r.platform?t.win32.delimiter:t.posix.delimiter}),define(e[24],t([0,1,3]),function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})
;const n=r.globals.performance&&"function"==typeof r.globals.performance.now;class s{static create(e=!0){return new s(e)}constructor(e){this._highResolution=n&&e,this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?r.globals.performance.now():(new Date).getTime()}}t.StopWatch=s}),define(e[2],t([0,1]),function(e,t){"use strict";function r(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\[\]\(\)\#]/g,"\\$&")}function n(e,t){if(!e||!t)return e;const r=t.length;if(0===r||0===e.length)return e;let n=0;for(;e.indexOf(t,n)===n;)n+=r;return e.substring(n)}function s(e,t){if(!e||!t)return e;const r=t.length,n=e.length;if(0===r||0===n)return e;let s=n,i=-1;for(;;){if(-1===(i=e.lastIndexOf(t,s-1))||i+r!==s)break;if(0===i)return"";s=i}return e.substring(0,s)}function i(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 c(e){return o(e)||a(e)}function l(e,t,r=e.length){if("string"!=typeof e||"string"!=typeof t)return!1;for(let n=0;n<r;n++){const r=e.charCodeAt(n),s=t.charCodeAt(n);if(r!==s)if(c(r)&&c(s)){const e=Math.abs(r-s);if(0!==e&&32!==e)return!1}else if(String.fromCharCode(r).toLowerCase()!==String.fromCharCode(s).toLowerCase())return!1}return!0}function u(e,t,r,n,s,i){for(;t<r&&s<i;){if(e[t]!==n[s])return!1;t+=1,s+=1}return!0}function h(e){return(e=+e)>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function f(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,r="0"){const n=""+e,s=[n];for(let e=n.length;e<t;e++)s.push(r);return s.reverse().join("")};const d=/{(\d+)}/g;t.format=function(e,...t){return 0===t.length?e:e.replace(d,function(e,r){const n=parseInt(r,10);return isNaN(n)||n<0||n>=t.length?e:t[n]})},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=r,t.trim=function(e,t=" "){return s(n(e,t),t)},t.ltrim=n,t.rtrim=s,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 r=0;r<t.length;r++)if(e[r]!==t[r])return!1;return!0},t.endsWith=function(e,t){const r=e.length-t.length;return r>0?e.indexOf(t,r)===r:0===r&&e===t},t.createRegExp=function(e,t,n={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=r(e)),n.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let s="";return n.global&&(s+="g"),n.matchCase||(s+="i"),n.multiline&&(s+="m"),n.unicode&&(s+="u"),new RegExp(e,s)},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,r=e.length;t<r;t++){const r=e.charCodeAt(t);if(32!==r&&9!==r)return t}return-1},t.getLeadingWhitespace=function(e,t=0,r=e.length){for(let n=t;n<r;n++){const r=e.charCodeAt(n);if(32!==r&&9!==r)return e.substring(t,n)}return e.substring(t,r)},t.lastNonWhitespaceIndex=function(e,t=e.length-1){for(let r=t;r>=0;r--){const t=e.charCodeAt(r);if(32!==t&&9!==t)return r}return-1},t.compare=i,t.compareIgnoreCase=function(e,t){const r=Math.min(e.length,t.length);for(let n=0;n<r;n++){let r=e.charCodeAt(n),s=t.charCodeAt(n);if(r===s)continue;a(r)&&(r+=32),a(s)&&(s+=32);const c=r-s;if(0!==c)return o(r)&&o(s)?c:i(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)&&l(e,t)},t.startsWithIgnoreCase=function(e,t){const r=t.length;return!(t.length>e.length)&&l(e,t,r)},t.commonPrefixLength=function(e,t){let r,n=Math.min(e.length,t.length);for(r=0;r<n;r++)if(e.charCodeAt(r)!==t.charCodeAt(r))return r;return n},t.commonSuffixLength=function(e,t){let r,n=Math.min(e.length,t.length);const s=e.length-1,i=t.length-1;for(r=0;r<n;r++)if(e.charCodeAt(s-r)!==t.charCodeAt(i-r))return r;return n},t.overlap=function(e,t){const r=e.length;let n=t.length,s=r-n;if(0===s)return e===t?r:0;for(s<0&&(n+=s,s=0);s<r&&n>0;){if(u(e,s,r,t,0,n))return n;n-=1,s+=1}return 0},t.isHighSurrogate=function(e){return 55296<=e&&e<=56319},t.isLowSurrogate=function(e){return 56320<=e&&e<=57343}
;const p=/(?:[\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 p.test(e)};const m=/(?:[\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 m.test(e)};const g=/^[\t\n\r\x20-\x7E]*$/;t.isBasicASCII=function(e){return g.test(e)},t.containsFullWidthCharacter=function(e){for(let t=0,r=e.length;t<r;t++)if(h(e.charCodeAt(t)))return!0;return!1},t.isFullWidthCharacter=h,t.lcut=function(e,r){if(e.length<r)return e;const n=/\b/g
;let s=0;for(;n.test(e)&&!(e.length-n.lastIndex<r);)s=n.lastIndex,n.lastIndex+=1;return e.substring(s).replace(/^\s/,t.empty)};const v=/\x1B\x5B[12]?K/g,w=/\x1b\[\d+m/g,y=/\x1b\[0?m/g;t.removeAnsiEscapeCodes=function(e){return e&&(e=(e=(e=e.replace(v,"")).replace(w,"")).replace(y,"")),e},t.removeAccents=function(){if("function"!=typeof String.prototype.normalize)return function(e){return e};{const e=/[\u0300-\u036f]/g;return function(r){return r.normalize("NFD").replace(e,t.empty)}}}(),t.UTF8_BOM_CHARACTER=String.fromCharCode(65279),t.startsWithUTF8BOM=f,t.stripUTF8BOM=function(e){return f(e)?e.substr(1):e},t.safeBtoa=function(e){return btoa(encodeURIComponent(e))},t.repeat=function(e,t){let r="";for(let n=0;n<t;n++)r+=e;return r},t.fuzzyContains=function(e,t){if(!e||!t)return!1;if(e.length<t.length)return!1;const r=t.length,n=e.toLowerCase();let s=0,i=-1;for(;s<r;){const e=n.indexOf(t[s],i+1);if(e<0)return!1;i=e,s++}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 r=-1;do{r=e.indexOf("\n",r+1),t--}while(t>0&&r>=0);return r>=0?e.substr(0,r):e}}),define(e[47],t([0,1,2,4]),function(e,t,r,n){"use strict";function s(e,t,r=!1){if(u){const r=e||"",n=t||"",s=u.getValue().collator.compare(r,n);return u.getValue().collatorIsNumeric&&0===s&&r!==n?r<n?-1:1:s}return i(e,t,r)}function i(e,t,r=!1){r||(e=e&&e.toLowerCase(),t=t&&t.toLowerCase());const[n,s]=a(e),[i,o]=a(t);return n!==i?n<i?-1:1:s===o?0:s<o?-1:1}function o(e,t){if(u){const[r,n]=a(e),[s,i]=a(t);let o=u.getValue().collator.compare(n,i);if(0===o){if(u.getValue().collatorIsNumeric&&n!==i)return n<i?-1:1;if(o=u.getValue().collator.compare(r,s),u.getValue().collatorIsNumeric&&0===o&&r!==s)return r<s?-1:1}return o}return function(e,t){const[r,n]=a(e&&e.toLowerCase()),[s,i]=a(t&&t.toLowerCase());if(n!==i)return n<i?-1:1;if(r===s)return 0
;return r<s?-1:1}(e,t)}function a(e){const t=e?h.exec(e):[];return[t&&t[1]||"",t&&t[3]||""]}function c(e,t,r=!1){return r||(e=e&&e.toLowerCase(),t=t&&t.toLowerCase()),e===t?0:e<t?-1:1}function l(e,t,n){const s=e.toLowerCase(),i=t.toLowerCase(),o=r.startsWith(s,n),a=r.startsWith(i,n);if(o!==a)return o?-1:1;if(o&&a){if(s.length<i.length)return-1;if(s.length>i.length)return 1}return 0}Object.defineProperty(t,"__esModule",{value:!0});let u;t.setFileNameComparer=function(e){u=e},t.compareFileNames=s;const h=/^(.*?)(\.([^.]*))?$/;t.noIntlCompareFileNames=i,t.compareFileExtensions=o,t.comparePaths=function(e,t,r=!1){const i=e.split(n.sep),o=t.split(n.sep),a=i.length-1,l=o.length-1;let u,h;for(let e=0;;e++){if(u=a===e,h=l===e,u&&h)return s(i[e],o[e],r);if(u)return-1;if(h)return 1;const t=c(i[e],o[e],r);if(0!==t)return t}},t.compareAnything=function(e,t,n){const i=e.toLowerCase(),o=t.toLowerCase(),a=l(e,t,n);if(a)return a;const c=r.endsWith(i,n);if(c!==r.endsWith(o,n))return c?-1:1;const u=s(i,o)
;return 0!==u?u:i.localeCompare(o)},t.compareByPrefix=l}),define(e[7],t([0,1,3,2,4]),function(e,t,r,n,s){"use strict";function i(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,s.posix.sep)},t.getRoot=function(e,t=s.posix.sep){if(!e)return"";const r=e.length,n=e.charCodeAt(0);if(i(n)){if(i(e.charCodeAt(1))&&!i(e.charCodeAt(2))){let n=3;const s=n;for(;n<r&&!i(e.charCodeAt(n));n++);if(s!==n&&!i(e.charCodeAt(n+1)))for(n+=1;n<r;n++)if(i(e.charCodeAt(n)))return e.slice(0,n+1).replace(/[\\/]/g,t)}return t}if(o(n)&&58===e.charCodeAt(1))return i(e.charCodeAt(2))?e.slice(0,2)+t:e.slice(0,2);let a=e.indexOf("://");if(-1!==a)for(a+=3;a<r;a++)if(i(e.charCodeAt(a)))return e.slice(0,a+1);return""},t.isUNC=function(e){if(!r.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 n=2;const s=n
;for(;n<e.length&&92!==(t=e.charCodeAt(n));n++);return s!==n&&(t=e.charCodeAt(n+1),!isNaN(t)&&92!==t)};const a=/[\\/:\*\?"<>\|]/g,c=/[\\/]/g,l=/^(con|prn|aux|clock\$|nul|lpt[0-9]|com[0-9])$/i;t.isValidBasename=function(e,t=r.isWindows){const n=t?a:c;return!(!e||0===e.length||/^\s+$/.test(e)||(n.lastIndex=0,n.test(e)||t&&l.test(e)||"."===e||".."===e||t&&"."===e[e.length-1]||t&&e.length!==e.trim().length||e.length>255))},t.isEqual=function(e,t,r){const s=e===t;return!r||s?s:!(!e||!t)&&n.equalsIgnoreCase(e,t)},t.isEqualOrParent=function(e,t,r,i=s.sep){if(e===t)return!0;if(!e||!t)return!1;if(t.length>e.length)return!1;if(r){if(!n.startsWithIgnoreCase(e,t))return!1;if(t.length===e.length)return!0;let r=t.length;return t.charAt(t.length-1)===i&&r--,e.charAt(r)===i}return t.charAt(t.length-1)!==i&&(t+=i),0===e.indexOf(t)},t.isWindowsDriveLetter=o,t.sanitizeFilePath=function(e,t){return r.isWindows&&n.endsWith(e,":")&&(e+=s.sep),s.isAbsolute(e)||(e=s.join(t,e)),e=s.normalize(e),r.isWindows?(e=n.rtrim(e,s.sep),
n.endsWith(e,":")&&(e+=s.sep)):(e=n.rtrim(e,s.sep))||(e=s.sep),e},t.isRootOrDriveLetter=function(e){const t=s.normalize(e);return r.isWindows?!(e.length>3)&&o(t.charCodeAt(0))&&58===t.charCodeAt(1)&&(2===e.length||92===t.charCodeAt(2)):t===s.posix.sep}}),define(e[13],t([0,1]),function(e,t){"use strict";function r(e){return Array.isArray?Array.isArray(e):!(!e||typeof e.length!==l.number||e.constructor!==Array)}function n(e){return typeof e===l.string||e instanceof String}function s(e){return!(typeof e!==l.object||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function i(e){return typeof e===l.undefined}function o(e){return i(e)||null===e}function a(e){return typeof e===l.function}function c(e,t){if(n(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 l={number:"number",string:"string",undefined:"undefined",object:"object",function:"function"};t.isArray=r,t.isString=n,t.isStringArray=function(e){return r(e)&&e.every(e=>n(e))},t.isObject=s,t.isNumber=function(e){return(typeof e===l.number||e instanceof Number)&&!isNaN(e)},t.isBoolean=function(e){return!0===e||!1===e},t.isUndefined=i,t.isUndefinedOrNull=o;const u=Object.prototype.hasOwnProperty;t.isEmptyObject=function(e){if(!s(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 r=Math.min(e.length,t.length);for(let n=0;n<r;n++)c(e[n],t[n])},t.validateConstraint=c,t.getAllPropertyNames=function(e){let t=[],r=Object.getPrototypeOf(e)
;for(;Object.prototype!==r;)t=t.concat(Object.getOwnPropertyNames(r)),r=Object.getPrototypeOf(r);return t},t.withNullAsUndefined=function(e){return null===e?void 0:e},t.withUndefinedAsNull=function(e){return void 0===e?null:e}}),define(e[10],t([0,1,13]),function(e,t,r){"use strict";function n(e){if(!e||"object"!=typeof e)return e;if(e instanceof RegExp)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(r=>{e[r]&&"object"==typeof e[r]?t[r]=n(e[r]):t[r]=e[r]}),t}function s(e,t,n){if(r.isUndefinedOrNull(e))return e;const i=t(e);if(void 0!==i)return i;if(r.isArray(e)){const r=[];for(const i of e)r.push(s(i,t,n));return r}if(r.isObject(e)){if(n.has(e))throw new Error("Cannot clone recursive data-structure");n.add(e);const r={};for(let i in e)a.call(e,i)&&(r[i]=s(e[i],t,n));return n.delete(e),r}return e}function i(e,t,n=!0){return r.isObject(e)?(r.isObject(t)&&Object.keys(t).forEach(s=>{s in e?n&&(r.isObject(e[s])&&r.isObject(t[s])?i(e[s],t[s],n):e[s]=t[s]):e[s]=t[s]}),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 r,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(r=0;r<e.length;r++)if(!o(e[r],t[r]))return!1}else{const s=[];for(n in e)s.push(n);s.sort();const i=[];for(n in t)i.push(n);if(i.sort(),!o(s,i))return!1;for(r=0;r<s.length;r++)if(!o(e[s[r]],t[s[r]]))return!1}return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.deepClone=n,t.deepFreeze=function(e){if(!e||"object"!=typeof e)return e;const t=[e];for(;t.length>0;){const e=t.shift();Object.freeze(e);for(const r in e)if(a.call(e,r)){const n=e[r];"object"!=typeof n||Object.isFrozen(n)||t.push(n)}}return e};const a=Object.prototype.hasOwnProperty;t.cloneAndChange=function(e,t){return s(e,t,new Set)},t.mixin=i,t.assign=function(e,...t){return t.forEach(t=>Object.keys(t).forEach(r=>e[r]=t[r])),e},t.equals=o,t.safeStringify=function(e){const t=[]
;return JSON.stringify(e,(e,n)=>{if(r.isObject(n)||Array.isArray(n)){if(-1!==t.indexOf(n))return"[Circular]";t.push(n)}return n})},t.getOrDefault=function(e,t,r){const n=t(e);return void 0===n?r:n},t.distinct=function(e,t){const r=Object.create(null);return e&&t?(Object.keys(t).forEach(n=>{const s=e[n],i=t[n];o(s,i)||(r[n]=i)}),r):r}}),define(e[8],t([0,1,3]),function(e,t,r){"use strict";function n(e){if(!e)return!1;switch(e.toLowerCase()){case"http":case"https":case"ftp":return!0}return!1}function s(e,t){if(t>=e.length)return!1;const r=e.charCodeAt(t);return r>=48&&r<=57||r>=97&&r<=102||r>=65&&r<=70}function i(e,t,r){let n,i=-1;for(let o=0;o<e.length;o++){const a=e.charCodeAt(o);if(37===a&&s(e,o+1)&&s(e,o+2)){const s=e.charCodeAt(o+1),a=e.charCodeAt(o+2);if(t&&50===s&&(70===a||102===a)||r&&(50===s&&54===a||51===s&&(66===a||98===a||68===a||100===a))){-1!==i&&(n+=decodeURIComponent(e.substring(i,o)),i=-1),void 0!==n&&(n+=e.substr(o,3)),o+=2;continue}void 0===n&&(n=e.substring(0,o)),-1===i&&(i=o),o+=2
}else-1!==i&&(n+=decodeURIComponent(e.substring(i,o)),i=-1),void 0!==n&&(n+=String.fromCharCode(a))}return-1!==i&&(n+=decodeURIComponent(e.substr(i))),void 0!==n?n:e}function o(e,t,r){let n=void 0,i=-1;for(let o=0;o<e.length;o++){const a=e.charCodeAt(o);if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||45===a||46===a||95===a||126===a||t&&47===a||r&&(61===a||38===a||59===a))-1!==i&&(n+=encodeURIComponent(e.substring(i,o)),i=-1),void 0!==n&&(n+=e.charAt(o));else if(37===a&&s(e,o+1)&&s(e,o+2))-1!==i&&(n+=encodeURIComponent(e.substring(i,o)),i=-1),void 0!==n&&(n+=e.substr(o,3)),o+=2;else{void 0===n&&(n=e.substr(0,o));const t=y[a];void 0!==t?(-1!==i&&(n+=encodeURIComponent(e.substring(i,o)),i=-1),n+=t):-1===i&&(i=o)}}return-1!==i&&(n+=encodeURIComponent(e.substring(i))),void 0!==n?n:e}function a(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,r.isWindows&&(t=t.replace(/\//g,"\\")),t}function c(e,t){const r=t?function(e){let t=void 0;for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);35===n||63===n?(void 0===t&&(t=e.substr(0,r)),t+=y[n]):void 0!==t&&(t+=e[r])}return void 0!==t?t:e}:o;let s="",{scheme:i,authority:a,path:c,query:l,fragment:u}=e;if(i&&(s+=i,s+=":"),(a||"file"===i)&&(s+=p,s+=p),a){let e=a.indexOf("@");if(-1!==e){const t=a.substr(0,e);a=a.substr(e+1),-1===(e=t.indexOf(":"))?s+=r(t,!1,!1):(s+=r(t.substr(0,e),!1,!1),s+=":",s+=r(t.substr(e+1),!1,!1)),s+="@"}-1===(e=(a=a.toLowerCase()).indexOf(":"))?s+=r(a,!1,!1):(s+=r(a.substr(0,e),!1,!1),s+=a.substr(e))}if(c){if(c.length>=3&&47===c.charCodeAt(0)&&58===c.charCodeAt(2)){const e=c.charCodeAt(1)
;e>=65&&e<=90&&(c=`/${String.fromCharCode(e+32)}:${c.substr(3)}`)}else if(c.length>=2&&58===c.charCodeAt(1)){const e=c.charCodeAt(0);e>=65&&e<=90&&(c=`${String.fromCharCode(e+32)}:${c.substr(2)}`)}s+=r(c,!0,!1)}return l&&(s+="?",s+=r(l,!1,n(i))),u&&(s+="#",s+=t?u:o(u,!1,!1)),s}Object.defineProperty(t,"__esModule",{value:!0});const l=/^\w[\w\d+.-]*$/,u=/^\//,h=/^\/\//;let f=!0;t.setUriThrowOnMissingScheme=function(e){const t=f;return f=e,t};const d="",p="/",m=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class g{static isUri(e){return e instanceof g||!!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,r,n,s,i=!1){"object"==typeof e?(this.scheme=e.scheme||d,this.authority=e.authority||d,this.path=e.path||d,this.query=e.query||d,this.fragment=e.fragment||d):(this.scheme=function(e,t){
return t||f?e||d:(e||(console.trace("BAD uri lacks scheme, falling back to file-scheme."),e="file"),e)}(e,i),this.authority=t||d,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==p&&(t=p+t):t=p}return t}(this.scheme,r||d),this.query=n||d,this.fragment=s||d,function(e,t){if(!e.scheme){if(t||f)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&&!l.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!u.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(h.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,i))}get fsPath(){return a(this)}with(e){if(!e)return this;let{scheme:t,authority:r,path:n,query:s,fragment:i}=e;return void 0===t?t=this.scheme:null===t&&(t=d),void 0===r?r=this.authority:null===r&&(r=d),void 0===n?n=this.path:null===n&&(n=d),void 0===s?s=this.query:null===s&&(s=d),void 0===i?i=this.fragment:null===i&&(i=d),t===this.scheme&&r===this.authority&&n===this.path&&s===this.query&&i===this.fragment?this:new w(t,r,n,s,i)}static parse(e,t=!1){const r=m.exec(e);return r?new w(r[2]||d,i(r[4]||d,!1,!1),i(r[5]||d,!0,!1),i(r[7]||d,!1,n(r[2])),i(r[9]||d,!1,!1),t):new w(d,d,d,d,d,t)}static file(e){let t=d;if(r.isWindows&&(e=e.replace(/\\/g,p)),e[0]===p&&e[1]===p){const r=e.indexOf(p,2);-1===r?(t=e.substring(2),e=p):(t=e.substring(2,r),e=e.substring(r)||p)}return new w("file",t,e,d,d)}static from(e){
return new w(e.scheme,e.authority,e.path,e.query,e.fragment)}toString(e=!1){return c(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof g)return e;{const t=new w(e);return t._formatted=e.external,t._fsPath=e._sep===v?e.fsPath:null,t}}return e}}t.URI=g;const v=r.isWindows?1:void 0;class w extends g{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=a(this)),this._fsPath}toString(e=!1){return e?c(this,!0):(this._formatted||(this._formatted=c(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=v),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 y={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[39],t([0,1,8]),function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPathFromAmdModule=function(e,t){return r.URI.parse(e.toUrl(t)).fsPath}}),define(e[40],t([0,1,8]),function(e,t,r){"use strict";function n(e){const t=[];let r;try{const n=JSON.parse(e.arguments),s=n[n.length-1];s&&s.__$stack&&(n.pop(),r=s.__$stack),t.push(...n)}catch(r){t.push("Unable to log remote console arguments",e.arguments)}return{args:t,stack:r}}function s(e){if("string"!=typeof e)return s(n(e).stack);const t=e;if(t){const e=i(t),n=/at [^\/]*((?:(?:[a-zA-Z]+:)|(?:[\/])|(?:\\\\))(?:.+)):(\d+):(\d+)/.exec(e||"");if(n&&4===n.length)return{uri:r.URI.file(n[1]),line:Number(n[2]),column:Number(n[3])}}}function i(e){if(!e)return e;const t=e.indexOf("\n");return-1===t?e:e.substring(0,t)}function o(e){return`color: ${e}`}Object.defineProperty(t,"__esModule",{value:!0}),t.isRemoteConsoleLog=function(e){const t=e
;return t&&"string"==typeof t.type&&"string"==typeof t.severity},t.parse=n,t.getFirstFrame=s,t.log=function(e,t){const{args:r,stack:s}=n(e),a="string"==typeof r[0]&&1===r.length;let c=i(s);c&&(c=`(${c.trim()})`);let l=[];l="string"==typeof r[0]?c&&a?[`%c[${t}] %c${r[0]} %c${c}`,o("blue"),o("black"),o("grey")]:[`%c[${t}] %c${r[0]}`,o("blue"),o("black"),...r.slice(1)]:[`%c[${t}]%`,o("blue"),...r],c&&!a&&l.push(c),console[e.severity].apply(console,l)}}),define(e[14],t([0,1,8,26]),function(e,t,r,n){"use strict";function s(e){const t=[];return e.forEach(e=>t.push(e)),t}function i(e){const t=[];return e.forEach((e,r)=>t.push(r)),t}Object.defineProperty(t,"__esModule",{value:!0}),t.values=s,t.keys=i,t.getOrSet=function(e,t,r){let n=e.get(t);return void 0===n&&(n=r,e.set(t,n)),n},t.mapToString=function(e){const t=[];return e.forEach((e,r)=>{t.push(`${r} => ${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,r)=>{t.push([r,e])}),t},t.serializableToMap=function(e){const t=new Map;for(const[r,n]of e)t.set(r,n);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;const r=e.length;let n=this._from;for(;t<r&&n<this._to;){const r=e.charCodeAt(t)-this._value.charCodeAt(n);if(0!==r)return r;t+=1,n+=1}return r===this._to-this._from?0:t<r?-1:1}value(){
return this._value.substring(this._from,this._to)}}t.PathIterator=a;class c{isEmpty(){return!(this.left||this.mid||this.right||this.value)}}class l{constructor(e){this._iter=e}static forPaths(){return new l(new a)}static forStrings(){return new l(new o)}clear(){this._root=void 0}set(e,t){const r=this._iter.reset(e);let n;for(this._root||(this._root=new c,this._root.segment=r.value()),n=this._root;;){const e=r.cmp(n.segment);if(e>0)n.left||(n.left=new c,n.left.segment=r.value()),n=n.left;else if(e<0)n.right||(n.right=new c,n.right.segment=r.value()),n=n.right;else{if(!r.hasNext())break;r.next(),n.mid||(n.mid=new c,n.mid.segment=r.value()),n=n.mid}}const s=n.value;return n.value=t,n.key=e,s}get(e){const t=this._iter.reset(e);let r=this._root;for(;r;){const e=t.cmp(r.segment);if(e>0)r=r.left;else if(e<0)r=r.right;else{if(!t.hasNext())break;t.next(),r=r.mid}}return r?r.value:void 0}delete(e){const t=this._iter.reset(e),r=[];let n=this._root;for(;n;){const e=t.cmp(n.segment);if(e>0)r.push([1,n]),
n=n.left;else if(e<0)r.push([-1,n]),n=n.right;else{if(!t.hasNext()){for(n.value=void 0;r.length>0&&n.isEmpty();){let[e,t]=r.pop();switch(e){case 1:t.left=void 0;break;case 0:t.mid=void 0;break;case-1:t.right=void 0}n=t}break}t.next(),r.push([0,n]),n=n.mid}}}findSubstr(e){const t=this._iter.reset(e);let r=this._root,n=void 0;for(;r;){const e=t.cmp(r.segment);if(e>0)r=r.left;else if(e<0)r=r.right;else{if(!t.hasNext())break;t.next(),n=r.value||n,r=r.mid}}return r&&r.value||n}findSuperstr(e){const t=this._iter.reset(e);let r=this._root;for(;r;){const e=t.cmp(r.segment);if(e>0)r=r.left;else if(e<0)r=r.right;else{if(!t.hasNext())return r.mid?this._nodeIterator(r.mid):void 0;t.next(),r=r.mid}}}_nodeIterator(e){let t,r,s;return{next:()=>(s||(s=[],r=0,this._forEach(e,e=>s.push(e))),r>=s.length?n.FIN:(t?t.value=s[r++]:t={done:!1,value:s[r++]},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=l;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 s(this.map)}toKey(e){let t=e.toString();return this.ignoreCase&&(t=t.toLowerCase()),t}keys(){return i(this.map).map(e=>r.URI.parse(e))}clone(){const e=new u;return this.map.forEach((t,r)=>e.map.set(r,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 r=this._map.get(e);if(r)return 0!==t&&this.touch(r,t),r.value}
set(e,t,r=0){let n=this._map.get(e);if(n)n.value=t,0!==r&&this.touch(n,r);else{switch(n={key:e,value:t,next:void 0,previous:void 0},r){case 0:this.addItemLast(n);break;case 1:this.addItemFirst(n);break;case 2:default:this.addItemLast(n)}this._map.set(e,n),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 r=this._head;for(;r;)t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),r=r.next}values(){const e=[];let t=this._head;for(;t;)e.push(t.value),t=t.next;return e}keys(){const e=[];let 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,r=this.size;for(;t&&r>e;)this._map.delete(t.key),t=t.next,r--;this._head=t,
this._size=r,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,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.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,r=e.previous;e===this._tail?(r.next=void 0,this._tail=r):(t.previous=r,r.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,r=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=r,r.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e}}toJSON(){const e=[];return this.forEach((t,r)=>{e.push([r,t])}),e}fromJSON(e){this.clear();for(const[t,r]of e)this.set(t,r)}}t.LinkedMap=h;class f 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=f}),define(e[46],t([0,1,14,2]),function(e,t,r,n){"use strict";function s(...e){return function(t,r){for(let n=0,s=e.length;n<s;n++){
const s=e[n](t,r);if(s)return s}return null}}function i(e,t,r){if(!r||r.length<t.length)return null;let s;return(s=e?n.startsWithIgnoreCase(r,t):0===r.indexOf(t))?t.length>0?[{start:0,end:t.length}]:[]:null}function o(e,t){const r=t.toLowerCase().indexOf(e.toLowerCase());return-1===r?null:[{start:r,end:r+e.length}]}function a(e,t){return c(e.toLowerCase(),t.toLowerCase(),0,0)}function c(e,t,r,n){if(r===e.length)return[];if(n===t.length)return null;if(e[r]===t[n]){let s=null;return(s=c(e,t,r+1,n+1))?m({start:n,end:n+1},s):null}return c(e,t,r,n+1)}function l(e){return 97<=e&&e<=122}function u(e){return 65<=e&&e<=90}function h(e){return 48<=e&&e<=57}function f(e){return 32===e||9===e||10===e||13===e}function d(e){return D.has(e)}function p(e){return l(e)||u(e)||h(e)}function m(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function g(e,t){for(let r=t;r<e.length;r++){const t=e.charCodeAt(r);if(u(t)||h(t)||r>0&&!p(e.charCodeAt(r-1)))return r}return e.length}function v(e,t,r,n){
if(r===e.length)return[];if(n===t.length)return null;if(e[r]!==t[n].toLowerCase())return null;{let s=null,i=n+1;for(s=v(e,t,r+1,n+1);!s&&(i=g(t,i))<t.length;)s=v(e,t,r+1,i),i++;return null===s?null:m({start:n,end:n+1},s)}}function w(e,t){if(!t)return null;if(0===(t=t.trim()).length)return null;if(!function(e){let t=0,r=0,n=0,s=0;for(let i=0;i<e.length;i++)u(n=e.charCodeAt(i))&&t++,l(n)&&r++,f(n)&&s++;return 0!==t&&0!==r||0!==s?t<=5:e.length<=30}(e))return null;if(t.length>60)return null;const r=function(e){let t=0,r=0,n=0,s=0,i=0;for(let o=0;o<e.length;o++)u(i=e.charCodeAt(o))&&t++,l(i)&&r++,p(i)&&n++,h(i)&&s++;return{upperPercent:t/e.length,lowerPercent:r/e.length,alphaPercent:n/e.length,numericPercent:s/e.length}}(t);if(!function(e){const{upperPercent:t,lowerPercent:r,alphaPercent:n,numericPercent:s}=e;return r>.2&&t<.8&&n>.6&&s<.2}(r)){if(!function(e){const{upperPercent:t,lowerPercent:r}=e;return 0===r&&t>.6}(r))return null;t=t.toLowerCase()}let n=null,s=0
;for(e=e.toLowerCase();s<t.length&&null===(n=v(e,t,0,s));)s=g(t,s+1);return n}function y(e,t,r,n,s){if(r===e.length)return[];if(n===t.length)return null;if(e[r]!==t[n])return null;{let i=null,o=n+1;if(i=y(e,t,r+1,n+1,s),!s)for(;!i&&(o=b(t,o))<t.length;)i=y(e,t,r+1,o,s),o++;return null===i?null:m({start:n,end:n+1},i)}}function b(e,t){for(let r=t;r<e.length;r++){const t=e.charCodeAt(r);if(f(t)||r>0&&f(e.charCodeAt(r-1))||d(t)||r>0&&d(e.charCodeAt(r-1)))return r}return e.length}function _(e){if(void 0===e)return[];const t=e[1].toString(2),r=[];for(let n=e[2];n<T;n++)if("1"===t[t.length-(n+1)]){const e=r[r.length-1];e&&e.end===n?e.end=n+1:r.push({start:n,end:n+1})}return r}function C(){const e=[],t=[0];for(let e=1;e<=T;e++)t.push(-e);for(let r=0;r<=T;r++){const n=t.slice(0);n[0]=-r,e.push(n)}return e}function x(e,t,r,n,s){function i(e,t,r=" "){for(;e.length<t;)e=r+e;return e}let o=` |   |${n.split("").map(e=>i(e,3)).join("|")}\n`;for(let n=0;n<=r;n++)o+=0===n?" |":`${t[n-1]}|`,
o+=e[n].slice(0,s+1).map(e=>i(e.toString(),3)).join("|")+"\n";return o}function E(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:return!0;default:return!1}}function P(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}function S(e,t,r){return t[e]!==r[e]}function A(e,t,r,n,s,i,o){const a=e.length>T?T:e.length,c=n.length>T?T:n.length;if(r>=a||i>=c||a>c)return;if(!function(e,t,r,n,s,i){for(;t<r&&s<i;)e[t]===n[s]&&(t+=1),s+=1;return t===r}(t,r,a,s,i,c))return;const l=r,u=i;for(r=l+1;r<=a;r++)for(i=1;i<=c;i++){let o=-1;t[r-1]===s[i-1]&&(o=i===r-l?e[r-1]===n[i-1]?7:5:!S(i-1,n,s)||1!==i&&S(i-2,n,s)?E(s,i-2)||P(s,i-2)?5:1:e[r-1]===n[i-1]?7:5),F[r][i]=o;const a=M[r-1][i-1]+(o>1?1:o),c=M[r-1][i]+-1,u=M[r][i-1]+-1;u>=c?u>a?(M[r][i]=u,j[r][i]=4):u===a?(M[r][i]=u,j[r][i]=6):(M[r][i]=a,j[r][i]=2):c>a?(M[r][i]=c,j[r][i]=1):c===a?(M[r][i]=c,j[r][i]=3):(M[r][i]=a,j[r][i]=2)}
return N&&(console.log(x(M,e,a,n,c)),console.log(x(j,e,a,n,c)),console.log(x(F,e,a,n,c))),B=0,z=-100,$=l,W=o,L(a,c,a===c?1:0,0,!1),0!==B?[z,U,u]:void 0}function L(e,t,r,n,s){if(B>=10||r<-25)return;let i=0;for(;e>$&&t>0;){const o=F[e][t],a=j[e][t];if(4===a)t-=1,s?r-=5:0!==n&&(r-=1),s=!1,i=0;else{if(!(2&a))return;if(4&a&&L(e,t-1,0!==n?r-1:r,n,s),r+=o,e-=1,t-=1,s=!0,n+=Math.pow(2,t),1===o){if(i+=1,e===$&&!W)return}else r+=1+i*(o-1),i=0}}B+=1,(r-=t>=3?9:3*t)>z&&(z=r,U=n)}function R(e,t,r,n,s,i,o,a){let c=A(e,t,r,n,s,i,a);if(c&&!o)return c;if(e.length>=3){const t=Math.min(7,e.length-1);for(let o=r+1;o<t;o++){const t=function(e,t){if(t+1>=e.length)return;const r=e[t],n=e[t+1];if(r===n)return;return e.slice(0,t)+n+r+e.slice(t+2)}(e,o);if(t){const e=A(t,t.toLowerCase(),r,n,s,i,a);e&&(e[0]-=3,(!c||e[0]>c[0])&&(c=e))}}}return c}Object.defineProperty(t,"__esModule",{value:!0}),t.or=s,t.matchesStrictPrefix=i.bind(void 0,!1),t.matchesPrefix=i.bind(void 0,!0),t.matchesContiguousSubString=o,t.matchesSubString=a,t.isUpper=u
;const D=new Set;"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?".split("").forEach(e=>D.add(e.charCodeAt(0))),t.matchesCamelCase=w,t.matchesWords=function(e,t,r=!1){if(!t||0===t.length)return null;let n=null,s=0;for(e=e.toLowerCase(),t=t.toLowerCase();s<t.length&&null===(n=y(e,t,0,s,r));)s=b(t,s+1);return n};const k=s(t.matchesPrefix,w,o),O=s(t.matchesPrefix,w,a),I=new r.LRUCache(1e4);t.matchesFuzzy=function(e,t,r=!1){if("string"!=typeof e||"string"!=typeof t)return null;let s=I.get(e);s||(s=new RegExp(n.convertSimple2RegExpPattern(e),"i"),I.set(e,s));const i=s.exec(t);return i?[{start:i.index,end:i.index+i[0].length}]:r?O(e,t):k(e,t)},t.matchesFuzzy2=function(e,t){const r=A(e,e.toLowerCase(),0,t,t.toLowerCase(),0,!0);return r?_(r):null},t.anyScore=function(e,t,r,n,s,i){const o=A(e,t,0,n,s,0,!0);if(o)return o;let a=0,c=0,l=i;for(let e=0;e<t.length&&e<T;++e){const r=s.indexOf(t.charAt(e),l);if(r>=0)c+=1,a+=Math.pow(2,r),l=r+1;else if(0!==a)break}return[c,a,i]},t.createMatches=_;const T=53,M=C(),F=C(),j=C(),N=!1;var q
;!function(e){e[e.Top=1]="Top",e[e.Diag=2]="Diag",e[e.Left=4]="Left"}(q||(q={}));!function(e){e.Default=Object.freeze([-100,0,0]),e.isDefault=function(e){return!e||-100===e[0]&&0===e[1]&&0===e[2]}}(t.FuzzyScore||(t.FuzzyScore={})),t.fuzzyScore=A;let B=0,U=0,z=0,$=0,W=!1;t.fuzzyScoreGracefulAggressive=function(e,t,r,n,s,i,o){return R(e,t,r,n,s,i,!0,o)},t.fuzzyScoreGraceful=function(e,t,r,n,s,i,o){return R(e,t,r,n,s,i,!1,o)}}),define(e[15],t([0,1,6,2,7,4,14,12]),function(e,t,r,n,s,i,o,a){"use strict";function c(e){switch(e){case 0:return"";case 1:return`${C}*?`;default:return`(?:${_}|${C}+${_}|${_}${C}+)*?`}}function l(e,t){if(!e)return[];const r=[];let n=!1,s=!1,i="";for(const o of e){switch(o){case t:if(!n&&!s){r.push(i),i="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":s=!0;break;case"]":s=!1}i+=o}return i&&r.push(i),r}function u(e){if(!e)return"";let t="";const r=l(e,b);if(r.every(e=>e===y))t=".*";else{let e=!1;r.forEach((s,i)=>{if(s===y)return void(e||(t+=c(2),e=!0));let o=!1,a="",h=!1,f=""
;for(const e of s)if("}"!==e&&o)a+=e;else if(!h||"]"===e&&f)switch(e){case"{":o=!0;continue;case"[":h=!0;continue;case"}":const r=`(?:${l(a,",").map(e=>u(e)).join("|")})`;t+=r,o=!1,a="";break;case"]":t+="["+f+"]",h=!1,f="";break;case"?":t+=C;continue;case"*":t+=c(1);continue;default:t+=n.escapeRegExpCharacters(e)}else{let t;f+=t="-"===e?e:"^"!==e&&"!"!==e||f?e===b?"":n.escapeRegExpCharacters(e):"^"}i<r.length-1&&(r[i+1]!==y||i+2<r.length)&&(t+=_),e=!1})}return t}function h(e,t){if(!e)return O;let s;s="string"!=typeof e?e.pattern:e;const i=`${s=s.trim()}_${!!t.trimForExclusions}`;let o=D.get(i);if(o)return f(o,e);let a;if(E.test(s)){const e=s.substr(4);o=function(t,r){return"string"==typeof t&&n.endsWith(t,e)?s:null}}else o=(a=P.exec(d(s,t)))?function(e,t){const r=`/${e}`,s=`\\${e}`,i=function(i,o){return"string"!=typeof i?null:o?o===e?t:null:i===e||n.endsWith(i,r)||n.endsWith(i,s)?t:null},o=[e];return i.basenames=o,i.patterns=[t],i.allBasenames=o,i}(a[1],s):(t.trimForExclusions?A:S).test(s)?function(e,t){
const n=w(e.slice(1,-1).split(",").map(e=>h(e,t)).filter(e=>e!==O),e),s=n.length;if(!s)return O;if(1===s)return n[0];const i=function(t,r){for(let s=0,i=n.length;s<i;s++)if(n[s](t,r))return e;return null},o=r.first(n,e=>!!e.allBasenames);o&&(i.allBasenames=o.allBasenames);const a=n.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);a.length&&(i.allPaths=a);return i}(s,t):(a=L.exec(d(s,t)))?p(a[1].substr(1),s,!0):(a=R.exec(d(s,t)))?p(a[1],s,!1):function(e){try{const t=new RegExp(`^${u(e)}$`);return function(r,n){return t.lastIndex=0,"string"==typeof r&&t.test(r)?e:null}}catch(e){return O}}(s);return D.set(i,o),f(o,e)}function f(e,t){return"string"==typeof t?e:function(r,n){return s.isEqualOrParent(r,t.base)?e(i.relative(t.base,r),n):null}}function d(e,t){return t.trimForExclusions&&n.endsWith(e,"/**")?e.substr(0,e.length-2):e}function p(e,t,r){const s=i.sep!==i.posix.sep?e.replace(x,i.sep):e,o=i.sep+s,a=r?function(e,r){return"string"!=typeof e||e!==s&&!n.endsWith(e,o)?null:t}:function(e,r){
return"string"==typeof e&&e===s?t:null};return a.allPaths=[(r?"*/":"./")+e],a}function m(e,t={}){if(!e)return k;if("string"==typeof e||v(e)){const r=h(e,t);if(r===O)return k;const n=function(e,t){return!!r(e,t)};return r.allBasenames&&(n.allBasenames=r.allBasenames),r.allPaths&&(n.allPaths=r.allPaths),n}return function(e,t){const n=w(Object.getOwnPropertyNames(e).map(r=>(function(e,t,r){if(!1===t)return O;const n=h(e,r);if(n===O)return O;if("boolean"==typeof t)return n;if(t){const r=t.when;if("string"==typeof r){const t=(t,s,i,o)=>{if(!o||!n(t,s))return null;const c=r.replace("$(basename)",i),l=o(c);return a.isThenable(l)?l.then(t=>t?e:null):l?e:null};return t.requiresSiblings=!0,t}}return n})(r,e[r],t)).filter(e=>e!==O)),s=n.length;if(!s)return O;if(!n.some(e=>!!e.requiresSiblings)){if(1===s)return n[0];const e=function(e,t){for(let r=0,s=n.length;r<s;r++){const s=n[r](e,t);if(s)return s}return null},t=r.first(n,e=>!!e.allBasenames);t&&(e.allBasenames=t.allBasenames)
;const i=n.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);return i.length&&(e.allPaths=i),e}const o=function(e,t,r){let s=void 0;for(let o=0,a=n.length;o<a;o++){const a=n[o];a.requiresSiblings&&r&&(t||(t=i.basename(e)),s||(s=t.substr(0,t.length-i.extname(e).length)));const c=a(e,t,s,r);if(c)return c}return null},c=r.first(n,e=>!!e.allBasenames);c&&(o.allBasenames=c.allBasenames);const l=n.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);l.length&&(o.allPaths=l);return o}(e,t)}function g(e){const t={};for(const r of e)t[r]=!0;return t}function v(e){const t=e;return t&&"string"==typeof t.base&&"string"==typeof t.pattern}function w(e,t){const r=e.filter(e=>!!e.basenames);if(r.length<2)return e;const n=r.reduce((e,t)=>{const r=t.basenames;return r?e.concat(r):e},[]);let s;if(t){s=[];for(let e=0,r=n.length;e<r;e++)s.push(t)}else s=r.reduce((e,t)=>{const r=t.patterns;return r?e.concat(r):e},[]);const i=function(e,t){if("string"!=typeof e)return null;if(!t){let r;for(r=e.length;r>0;r--){
const t=e.charCodeAt(r-1);if(47===t||92===t)break}t=e.substr(r)}const r=n.indexOf(t);return-1!==r?s[r]:null};i.basenames=n,i.patterns=s,i.allBasenames=n;const o=e.filter(e=>!e.basenames);return o.push(i),o}Object.defineProperty(t,"__esModule",{value:!0}),t.getEmptyExpression=function(){return Object.create(null)};const y="**",b="/",_="[/\\\\]",C="[^/\\\\]",x=/\//g;t.splitGlobAware=l;const E=/^\*\*\/\*\.[\w\.-]+$/,P=/^\*\*\/([\w\.-]+)\/?$/,S=/^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/,A=/^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/,L=/^\*\*((\/[\w\.-]+)+)\/?$/,R=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,D=new o.LRUCache(1e4),k=function(){return!1},O=function(){return null};t.match=function(e,t,r){return!(!e||"string"!=typeof t)&&m(e)(t,void 0,r)},t.parse=m,t.hasSiblingPromiseFn=function(e){if(!e)return;let t;return r=>(t||(t=(e()||Promise.resolve([])).then(e=>e?g(e):{})),t.then(e=>!!e[r]))},t.hasSiblingFn=function(e){if(!e)return;let t;return r=>{if(!t){const r=e()
;t=r?g(r):{}}return!!t[r]}},t.isRelativePattern=v,t.getBasenameTerms=function(e){return e.allBasenames||[]},t.getPathTerms=function(e){return e.allPaths||[]}}),define(e[19],t([0,1,14]),function(e,t,r){"use strict";function n(e,r,n){if(!t.canNormalize||!e)return e;const s=n.get(e);if(s)return s;let i;return i=o.test(e)?e.normalize(r):e,n.set(e,i),i}Object.defineProperty(t,"__esModule",{value:!0}),t.canNormalize="function"==typeof"".normalize;const s=new r.LRUCache(1e4);t.normalizeNFC=function(e){return n(e,"NFC",s)};const i=new r.LRUCache(1e4);t.normalizeNFD=function(e){return n(e,"NFD",i)};const o=/[^\u0000-\u0080]/}),define(e[53],t([0,1,7,4,8,2,44,3,15,14]),function(e,t,r,n,s,i,o,a,c,l){"use strict";function u(e){return!e||e.scheme!==o.Schemas.file||!a.isLinux}function h(e,t,n=u(e)){if(e.scheme===t.scheme){if(e.scheme===o.Schemas.file)return r.isEqualOrParent(p(e),p(t),n);if(f(e.authority,t.authority))return r.isEqualOrParent(e.path,t.path,n,"/")}return!1}function f(e,t){return e===t||i.equalsIgnoreCase(e,t)
}function d(e){return n.posix.basename(e.path)}function p(e){let t;const n=e.path;return t=e.authority&&n.length>1&&e.scheme===o.Schemas.file?`//${e.authority}${n}`:a.isWindows&&47===n.charCodeAt(0)&&r.isWindowsDriveLetter(n.charCodeAt(1))&&58===n.charCodeAt(2)?n.substr(1):n,a.isWindows&&(t=t.replace(/\//g,"\\")),t}function m(e,t=n.sep){if(e.scheme===o.Schemas.file){const n=p(e);return n.length>r.getRoot(n).length&&n[n.length-1]===t}{const t=e.path;return t.length>1&&47===t.charCodeAt(t.length-1)}}function g(e,t){if(e.scheme===t.scheme&&f(e.authority,t.authority)){if(e.scheme===o.Schemas.file){const s=n.relative(e.path,t.path);return a.isWindows?r.toSlashes(s):s}return n.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 d(e)||e.authority},t.isEqualOrParent=h,t.isEqualAuthority=f,t.isEqual=function(e,t,r=u(e)){if(e===t)return!0
;if(!e||!t)return!1;if(e.scheme!==t.scheme||!f(e.authority,t.authority))return!1;const n=e.path||"/",s=t.path||"/";return n===s||r&&i.equalsIgnoreCase(n||"/",s||"/")},t.basename=d,t.extname=function(e){return n.posix.extname(e.path)},t.dirname=function(e){if(0===e.path.length)return e;if(e.scheme===o.Schemas.file)return s.URI.file(n.dirname(p(e)));let t=n.posix.dirname(e.path);return e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/"),e.with({path:t})},t.joinPath=function(e,...t){let r;return r=e.scheme===o.Schemas.file?s.URI.file(n.join(p(e),...t)).path:n.posix.join(e.path||"/",...t),e.with({path:r})},t.normalizePath=function(e){if(!e.path.length)return e;let t;return t=e.scheme===o.Schemas.file?s.URI.file(n.normalize(p(e))).path:n.posix.normalize(e.path),e.with({path:t})},t.originalFSPath=p,t.isAbsolutePath=function(e){return!!e.path&&"/"===e.path[0]},t.hasTrailingPathSeparator=m,t.removeTrailingPathSeparator=function(e,t=n.sep){
return m(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e},t.addTrailingPathSeparator=function(e,t=n.sep){let s=!1;if(e.scheme===o.Schemas.file){const n=p(e);s=void 0!==n&&n.length===r.getRoot(n).length&&n[n.length-1]===t}else{t="/";const r=e.path;s=1===r.length&&47===r.charCodeAt(r.length-1)}return s||m(e,t)?e:e.with({path:e.path+"/"})},t.relativePath=g,t.resolvePath=function(e,t){if(e.scheme===o.Schemas.file){const r=s.URI.file(n.resolve(p(e),t));return e.with({authority:r.authority,path:r.path})}return e.with({path:n.posix.resolve(e.path,t)})},t.distinctParents=function(e,t){const r=[];for(let n=0;n<e.length;n++){const s=t(e[n]);e.some((e,r)=>r!==n&&h(s,t(e)))||r.push(e[n])}return r};!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 r=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach(e=>{const[t,n]=e.split(":");t&&n&&r.set(t,n)})
;const n=t.path.substring(0,t.path.indexOf(";"));return n&&r.set(e.META_DATA_MIME,n),r}}(t.DataUri||(t.DataUri={}));class v{constructor(e,t){this.expressionsByRoot=l.TernarySearchTree.forPaths(),this.globalExpression=c.parse(e);for(const e of t)this.expressionsByRoot.set(e.root.toString(),{root:e.root,expression:c.parse(e.expression)})}matches(e){const t=this.expressionsByRoot.findSubstr(e.toString());if(t){const r=g(t.root,e);if(r&&t.expression(r))return!0}return!!this.globalExpression(e.path)}}t.ResourceGlobMatcher=v,t.toLocalResource=function(e,t){if(t){let r=e.path;return r&&r[0]!==n.posix.sep&&(r=n.posix.sep+r),e.with({scheme:o.Schemas.vscodeRemote,authority:t,path:r})}return e.with({scheme:o.Schemas.file})}}),define(e[55],t([0,1]),function(e,t){"use strict";function r(){return new i}function n(e){return o.test(e)}Object.defineProperty(t,"__esModule",{value:!0});class s{constructor(e){this._value=e}asHex(){return this._value}}class i extends s{constructor(){
super([i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),"-",i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),"-","4",i._randomHex(),i._randomHex(),i._randomHex(),"-",i._oneOf(i._timeHighBits),i._randomHex(),i._randomHex(),i._randomHex(),"-",i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex()].join(""))}static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return i._oneOf(i._chars)}}i._chars=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],i._timeHighBits=["8","9","a","b"],t.v4=r;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=n,t.parse=function(e){if(!n(e))throw new Error("invalid uuid");return new s(e)},t.generateUuid=function(){return r().asHex()}}),define(e[57],t([0,1,33]),function(e,t,r){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(e="utf8"){this.stringDecoder=new r.StringDecoder(e),this.remaining=null}write(e){const t=[],r=this.remaining?this.remaining+this.stringDecoder.write(e):this.stringDecoder.write(e);if(r.length<1)return t;let n,s=0,i=s;for(;i<r.length;)if(13===(n=r.charCodeAt(i))||10===n){if(t.push(r.substring(s,i)),++i<r.length){const e=n;n=r.charCodeAt(i),(13===e&&10===n||10===e&&13===n)&&i++}s=i}else i++;return this.remaining=s<r.length?r.substr(s):null,t}end(){return this.remaining}}t.LineDecoder=n}),define(e[31],t([0,1,68,3,16,67]),function(e,t,n,s,i,o){"use strict";function a(e,t){return t.minBytesRequiredForDetection||(t.minBytesRequiredForDetection=t.guessEncoding?p:d),new Promise((r,s)=>{const i=new class extends o.Writable{constructor(){super(...arguments),this.bufferedChunks=[],this.bytesBuffered=0}_write(e,r,n){if(!Buffer.isBuffer(e))return n(new Error("toDecodeStream(): data must be a buffer"))
;this.decodeStream?this.decodeStream.write(e,n):(this.bufferedChunks.push(e),this.bytesBuffered+=e.byteLength,this.decodeStreamPromise?this.decodeStreamPromise.then(()=>n(null),e=>n(e)):"number"==typeof t.minBytesRequiredForDetection&&this.bytesBuffered>=t.minBytesRequiredForDetection?this._startDecodeStream(n):n(null))}_startDecodeStream(e){this.decodeStreamPromise=Promise.resolve(h({buffer:Buffer.concat(this.bufferedChunks),bytesRead:this.bytesBuffered},t.guessEncoding)).then(s=>{s.encoding=t.overwriteEncoding(s.encoding),this.decodeStream=function(e){return n.decodeStream(c(e))}(s.encoding),this.decodeStream.write(Buffer.concat(this.bufferedChunks),e),this.bufferedChunks.length=0,r({detected:s,stream:this.decodeStream})},t=>{this.emit("error",t),e(t)})}_final(e){this.decodeStream?this.decodeStream.end(e):this._startDecodeStream(()=>this.decodeStream.end(e))}};e.on("error",s),e.pipe(i)})}function c(e){return e===t.UTF8_with_bom||null===e?t.UTF8:e}function l(e,r){if(!e||r<t.UTF16be_BOM.length)return null
;const n=e.readUInt8(0),s=e.readUInt8(1);if(n===t.UTF16be_BOM[0]&&s===t.UTF16be_BOM[1])return t.UTF16be;if(n===t.UTF16le_BOM[0]&&s===t.UTF16le_BOM[1])return t.UTF16le;if(r<t.UTF8_BOM.length)return null;const i=e.readUInt8(2);return n===t.UTF8_BOM[0]&&s===t.UTF8_BOM[1]&&i===t.UTF8_BOM[2]?t.UTF8:null}function u(e){const t=e.replace(/[^a-zA-Z0-9]/g,"").toLowerCase();return v[t]||t}function h({buffer:n,bytesRead:s},i){let o=l(n,s),a=!1;if(o!==t.UTF16be&&o!==t.UTF16le&&n){let e=!0,r=!0,i=!1;for(let t=0;t<s&&t<f;t++){const s=t%2==1,o=0===n.readInt8(t);if(o&&(i=!0),e&&(s&&!o||!s&&o)&&(e=!1),r&&(s&&o||!s&&!o)&&(r=!1),o&&!e&&!r)break}i&&(e?o=t.UTF16le:r?o=t.UTF16be:a=!0)}return i&&!a&&!o&&n?function(t){return r(this,void 0,void 0,function*(){const r=yield new Promise((t,r)=>{e(["jschardet"],t,r)});r.Constants.MINIMUM_THRESHOLD=m;const n=r.detect(t);if(!n||!n.encoding)return null;const s=n.encoding.toLowerCase();return 0<=g.indexOf(s)?null:u(n.encoding)})}(n.slice(0,s)).then(e=>({seemsBinary:!1,encoding:e})):{
seemsBinary:a,encoding:o}}Object.defineProperty(t,"__esModule",{value:!0}),t.UTF8="utf8",t.UTF8_with_bom="utf8bom",t.UTF16be="utf16be",t.UTF16le="utf16le",t.UTF16be_BOM=[254,255],t.UTF16le_BOM=[255,254],t.UTF8_BOM=[239,187,191];const f=512,d=512,p=4096;t.toDecodeStream=a,t.decode=function(e,t){return n.decode(e,c(t))},t.encode=function(e,t,r){return n.encode(e,c(t),r)},t.encodingExists=function(e){return n.encodingExists(c(e))},t.encodeStream=function(e,t){return n.encodeStream(c(e),t)},t.detectEncodingByBOMFromBuffer=l;const m=.2,g=["ascii","utf-8","utf-16","utf-32"],v={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}},
t.detectEncodingFromBuffer=h;const w={437:"cp437",850:"cp850",852:"cp852",855:"cp855",857:"cp857",860:"cp860",861:"cp861",863:"cp863",865:"cp865",866:"cp866",869:"cp869",936:"cp936",1252:"cp1252"};t.resolveTerminalEncoding=function(e){return r(this,void 0,void 0,function*(){let r;const o=process.env.VSCODE_CLI_ENCODING;o?(e&&console.log(`Found VSCODE_CLI_ENCODING variable: ${o}`),r=Promise.resolve(o)):r=s.isLinux||s.isMacintosh?new Promise(t=>{e&&console.log('Running "locale charmap" to detect terminal encoding...'),i.exec("locale charmap",(e,r,n)=>t(r))}):new Promise(t=>{e&&console.log('Running "chcp" to detect terminal encoding...'),i.exec("chcp",(e,r,n)=>{if(r){const e=Object.keys(w);for(const n of e)if(r.indexOf(n)>=0)return t(w[n])}return t(void 0)})});const a=yield r;if(e&&console.log(`Detected raw terminal encoding: ${a}`),!a||"utf-8"===a.toLowerCase()||a.toLowerCase()===t.UTF8)return t.UTF8;const c=u(a)
;return n.encodingExists(c)?c:(e&&console.log("Unsupported terminal encoding, falling back to UTF-8."),t.UTF8)})}}),define(e[18],t([0,1,4,12,20,65,3,5,2,42,7,55,19,31]),function(e,t,n,s,i,o,a,c,l,u,h,f,d,p){"use strict";function m(e,t=k.UNLINK){return r(this,void 0,void 0,function*(){if(h.isRootOrDriveLetter(e))throw new Error("rimraf - will refuse to recursively delete root");return t===k.UNLINK?g(e):function(e){return r(this,void 0,void 0,function*(){try{const t=n.join(o.tmpdir(),f.generateUuid());try{yield E(e,t)}catch(t){return g(e)}g(t)}catch(e){if("ENOENT"!==e.code)throw e}})}(e)})}function g(e){return r(this,void 0,void 0,function*(){try{const t=yield x(e);if(!t.isDirectory()||t.isSymbolicLink()){const r=t.mode;return 128&r||(yield _(e,128|r)),P(e)}{const t=yield w(e);yield Promise.all(t.map(t=>g(n.join(e,t)))),yield u.promisify(i.rmdir)(e)}}catch(e){if("ENOENT"!==e.code)throw e}})}function v(e){if(h.isRootOrDriveLetter(e))throw new Error("rimraf - will refuse to recursively delete root");try{
const t=i.lstatSync(e);if(!t.isDirectory()||t.isSymbolicLink()){const r=t.mode;return 128&r||i.chmodSync(e,128|r),i.unlinkSync(e)}y(e).map(t=>v(n.join(e,t))),i.rmdirSync(e)}catch(e){if("ENOENT"!==e.code)throw e}}function w(e){return r(this,void 0,void 0,function*(){return b(yield u.promisify(i.readdir)(e))})}function y(e){return b(i.readdirSync(e))}function b(e){return a.isMacintosh?e.map(e=>d.normalizeNFC(e)):e}function _(e,t){return u.promisify(i.chmod)(e,t)}function C(e){return u.promisify(i.stat)(e)}function x(e){return u.promisify(i.lstat)(e)}function E(e,t){return u.promisify(i.rename)(e,t)}function P(e){return u.promisify(i.unlink)(e)}function S(e,t,r){return function(e){const t=O.get(e);if(t)return t;const r=new s.Queue;O.set(e,r);return c.Event.once(r.onFinished)(()=>{O.delete(e),r.dispose()}),r}(function(e){let t=e;(a.isWindows||a.isMacintosh)&&(t=t.toLowerCase());return t}(e)).queue(()=>(function(e,t,r){const n=A(r);return new Promise((r,s)=>{
"string"==typeof t||Buffer.isBuffer(t)||t instanceof Uint8Array?function(e,t,r,n){r.encoding&&(t=p.encode(t instanceof Uint8Array?Buffer.from(t):t,r.encoding.charset,{addBOM:r.encoding.addBOM}));if(!I)return i.writeFile(e,t,{mode:r.mode,flag:r.flag},n);i.open(e,r.flag,r.mode,(e,r)=>{if(e)return n(e);i.writeFile(r,t,e=>{if(e)return i.close(r,()=>n(e));i.fdatasync(r,e=>(e&&(console.warn("[node.js fs] fdatasync is now disabled for this session because it failed: ",e),I=!1),i.close(r,e=>n(e))))})})}(e,t,n,e=>e?s(e):r()):function(e,t,r,n){let s=!1;const o=e=>{s||(s=!0,e?l?(a.once("close",()=>n(e)),a.destroy()):n(e):n())},a=i.createWriteStream(e,{mode:r.mode,flags:r.flag,autoClose:!1});let c,l;a.once("open",e=>{c=e,l=!0,r.encoding&&(t=t.pipe(p.encodeStream(r.encoding.charset,{addBOM:r.encoding.addBOM}))),t.pipe(a)}),t.once("error",e=>o(e)),a.once("error",e=>o(e)),a.once("finish",()=>{I&&l?i.fdatasync(c,e=>{e&&(console.warn("[node.js fs] fdatasync is now disabled for this session because it failed: ",e),I=!1),
a.destroy()}):a.destroy()}),a.once("close",()=>o())}(e,t,n,e=>e?s(e):r())})})(e,t,r))}function A(e){return e?{mode:"number"==typeof e.mode?e.mode:438,flag:"string"==typeof e.flag?e.flag:"w",encoding:e.encoding}:{mode:438,flag:"w"}}function L(e){return r(this,void 0,void 0,function*(){try{return(yield C(e)).isDirectory()}catch(e){return!1}})}function R(e,t,s){return r(this,void 0,void 0,function*(){const o=s||Object.create(null),a=yield C(e);if(!a.isDirectory())return function(e,t,n){return r(this,void 0,void 0,function*(){return new Promise((r,s)=>{const o=i.createReadStream(e),a=i.createWriteStream(t,{mode:n});let c=!1;const l=e=>{if(!c){if(c=!0,e)return s(e);i.chmod(t,n,e=>e?s(e):r())}};o.once("error",e=>l(e)),a.once("error",e=>l(e)),a.once("close",()=>l()),o.pipe(a)})})}(e,t,511&a.mode);if(o[e])return Promise.resolve();o[e]=!0,yield D(t,511&a.mode);const c=yield w(e);for(let r=0;r<c.length;r++){const s=c[r];yield R(n.join(e,s),n.join(t,s),o)}})}function D(e,t,s){return r(this,void 0,void 0,function*(){
const o=()=>r(this,void 0,void 0,function*(){try{yield u.promisify(i.mkdir)(e,t)}catch(t){if("ENOENT"===t.code)return Promise.reject(t);try{if(!(yield C(e)).isDirectory())return Promise.reject(new Error(`'${e}' exists and is not a directory.`))}catch(e){throw t}}});if(e===n.dirname(e))return Promise.resolve();try{yield o()}catch(r){return s&&s.isCancellationRequested?Promise.resolve():"ENOENT"===r.code?(yield D(n.dirname(e),t),o()):Promise.reject(r)}})}Object.defineProperty(t,"__esModule",{value:!0});var k;!function(e){e[e.UNLINK=0]="UNLINK",e[e.MOVE=1]="MOVE"}(k=t.RimRafMode||(t.RimRafMode={})),t.rimraf=m,t.rimrafSync=v,t.readdir=w,t.readdirSync=y,t.exists=function(e){return u.promisify(i.exists)(e)},t.chmod=_,t.stat=C,t.statLink=function(e){return r(this,void 0,void 0,function*(){let t,r;try{t=yield x(e)}catch(e){r=e}const n=!(!t||!t.isSymbolicLink());return r||n?{stat:yield C(e),isSymbolicLink:n}:{stat:t,isSymbolicLink:!1}})},t.lstat=x,t.rename=E,t.renameIgnoreError=function(e,t){return new Promise(r=>{
i.rename(e,t,()=>r())})},t.unlink=P,t.symlink=function(e,t,r){return u.promisify(i.symlink)(e,t,r)},t.truncate=function(e,t){return u.promisify(i.truncate)(e,t)},t.readFile=function(e,t){return u.promisify(i.readFile)(e,t)};const O=new Map;t.writeFile=S;let I=!0;t.writeFileSync=function(e,t,r){const n=A(r);if(n.encoding&&(t=p.encode(t,n.encoding.charset,{addBOM:n.encoding.addBOM})),!I)return i.writeFileSync(e,t,{mode:n.mode,flag:n.flag});const s=i.openSync(e,n.flag,n.mode);try{i.writeFileSync(s,t);try{i.fdatasyncSync(s)}catch(e){console.warn("[node.js fs] fdatasyncSync is now disabled for this session because it failed: ",e),I=!1}}finally{i.closeSync(s)}},t.readDirsInDir=function(e){return r(this,void 0,void 0,function*(){const t=yield w(e),r=[];for(const s of t)(yield L(n.join(e,s)))&&r.push(s);return r})},t.dirExists=L,t.fileExists=function(e){return r(this,void 0,void 0,function*(){try{return(yield C(e)).isFile()}catch(e){return!1}})},t.whenDeleted=function(e){return new Promise(t=>{let r=!1
;const n=setInterval(()=>{r||(r=!0,i.exists(e,e=>{r=!1,e||(clearInterval(n),t(void 0))}))},1e3)})},t.move=function(e,t){return r(this,void 0,void 0,function*(){function n(e){return r(this,void 0,void 0,function*(){const t=yield x(e);if(t.isDirectory()||t.isSymbolicLink())return Promise.resolve();const r=yield u.promisify(i.open)(e,"a");try{yield u.promisify(i.futimes)(r,t.atime,new Date)}catch(e){}return u.promisify(i.close)(r)})}if(e===t)return Promise.resolve();try{yield E(e,t),yield n(t)}catch(r){if(!(e.toLowerCase()!==t.toLowerCase()&&"EXDEV"===r.code||l.endsWith(e,".")))throw r;yield R(e,t),yield m(e,k.MOVE),yield n(t)}})},t.copy=R,t.mkdirp=D;t.MAX_FILE_SIZE="ia32"===process.arch?314572800:17179869184,t.MAX_HEAP_SIZE="ia32"===process.arch?734003200:1468006400}),define(e[43],t([0,1,5,11,12,17,9,23]),function(e,t,n,s,i,o,a,c){"use strict";function l(e){const t=c.VSBuffer.alloc(4);return t.writeUInt32BE(e,0),t}function u(e){return e.read(4).readUInt32BE(0)}function h(e){const t=c.VSBuffer.alloc(1)
;return t.writeUInt8(e,0),t}function f(e,t){if(void 0===t)e.write(y.Undefined);else if("string"==typeof t){const r=c.VSBuffer.fromString(t);e.write(y.String),e.write(l(r.byteLength)),e.write(r)}else if(b&&Buffer.isBuffer(t)){const r=c.VSBuffer.wrap(t);e.write(y.Buffer),e.write(l(r.byteLength)),e.write(r)}else if(t instanceof c.VSBuffer)e.write(y.VSBuffer),e.write(l(t.byteLength)),e.write(t);else if(Array.isArray(t)){e.write(y.Array),e.write(l(t.length));for(const r of t)f(e,r)}else{const r=c.VSBuffer.fromString(JSON.stringify(t));e.write(y.Object),e.write(l(r.byteLength)),e.write(r)}}function d(e){switch(e.read(1).readUInt8(0)){case w.Undefined:return;case w.String:return e.read(u(e)).toString();case w.Buffer:return e.read(u(e)).buffer;case w.VSBuffer:return e.read(u(e));case w.Array:{const t=u(e),r=[];for(let n=0;n<t;n++)r.push(d(e));return r}case w.Object:return JSON.parse(e.read(u(e)).toString())}}function p(e){return{call:(t,r,n)=>e.then(e=>e.call(t,r,n)),listen(t,r){const s=new n.Relay
;return e.then(e=>s.input=e.listen(t,r)),s.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 m;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Idle=1]="Idle"}(m||(m={}));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.byteLength,t}}class v{constructor(){this.buffers=[]}get buffer(){return c.VSBuffer.concat(this.buffers)}write(e){this.buffers.push(e)}}var w;!function(e){e[e.Undefined=0]="Undefined",e[e.String=1]="String",e[e.Buffer=2]="Buffer",e[e.VSBuffer=3]="VSBuffer",e[e.Array=4]="Array",
e[e.Object=5]="Object"}(w||(w={}));const y={Undefined:h(w.Undefined),String:h(w.String),Buffer:h(w.Buffer),VSBuffer:h(w.VSBuffer),Array:h(w.Array),Object:h(w.Object)},b="undefined"!=typeof Buffer;class _{constructor(e,t,r=1e3){this.protocol=e,this.ctx=t,this.timeoutDelay=r,this.channels=new Map,this.activeRequests=new Map,this.pendingRequests=new Map,this.protocolListener=this.protocol.onMessage(e=>this.onRawMessage(e)),this.sendResponse({type:200})}registerChannel(e,t){this.channels.set(e,t),this.flushPendingRequests(e)}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 r=new v;f(r,e),f(r,t),this.sendBuffer(r.buffer)}sendBuffer(e){try{this.protocol.send(e)}catch(e){}}onRawMessage(e){const t=new g(e),r=d(t),n=d(t),s=r[0];switch(s){case 100:return this.onPromise({type:s,id:r[1],channelName:r[2],name:r[3],arg:n});case 102:return this.onEventListen({type:s,id:r[1],channelName:r[2],name:r[3],arg:n})
;case 101:case 103:return this.disposeActiveRequest({type:s,id:r[1]})}}onPromise(e){const t=this.channels.get(e.channelName);if(!t)return void this.collectPendingRequest(e);const r=new o.CancellationTokenSource;let n;try{n=t.call(this.ctx,e.name,e.arg,r.token)}catch(e){n=Promise.reject(e)}const i=e.id;n.then(t=>{this.sendResponse({id:i,data:t,type:201}),this.activeRequests.delete(e.id)},t=>{t instanceof Error?this.sendResponse({id:i,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:i,data:t,type:203}),this.activeRequests.delete(e.id)});const a=s.toDisposable(()=>r.cancel());this.activeRequests.set(e.id,a)}onEventListen(e){const t=this.channels.get(e.channelName);if(!t)return void this.collectPendingRequest(e);const r=e.id,n=t.listen(this.ctx,e.name,e.arg)(e=>this.sendResponse({id:r,data:e,type:204}));this.activeRequests.set(e.id,n)}disposeActiveRequest(e){const t=this.activeRequests.get(e.id);t&&(t.dispose(),
this.activeRequests.delete(e.id))}collectPendingRequest(e){let t=this.pendingRequests.get(e.channelName);t||(t=[],this.pendingRequests.set(e.channelName,t));const r=setTimeout(()=>{console.error(`Unknown channel: ${e.channelName}`),100===e.type&&this.sendResponse({id:e.id,data:{name:"Unknown channel",message:`Channel name '${e.channelName}' timed out after ${this.timeoutDelay}ms`,stack:void 0},type:202})},this.timeoutDelay);t.push({request:e,timeoutTimer:r})}flushPendingRequests(e){const t=this.pendingRequests.get(e);if(t){for(const e of t)switch(clearTimeout(e.timeoutTimer),e.request.type){case 100:this.onPromise(e.request);break;case 102:this.onEventListen(e.request)}this.pendingRequests.delete(e)}}dispose(){this.protocolListener&&(this.protocolListener.dispose(),this.protocolListener=null),this.activeRequests.forEach(e=>e.dispose()),this.activeRequests.clear()}}t.ChannelServer=_;class C{constructor(e){this.protocol=e,this.state=m.Uninitialized,this.activeRequests=new Set,this.handlers=new Map,
this.lastRequestId=0,this._onDidInitialize=new n.Emitter,this.onDidInitialize=this._onDidInitialize.event,this.protocolListener=this.protocol.onMessage(e=>this.onBuffer(e))}getChannel(e){const t=this;return{call:(r,n,s)=>t.requestPromise(e,r,n,s),listen:(r,n)=>t.requestEvent(e,r,n)}}requestPromise(e,t,r,n=o.CancellationToken.None){const c=this.lastRequestId++,l={id:c,type:100,channelName:e,name:t,arg:r};if(n.isCancellationRequested)return Promise.reject(a.canceled());let u;return new Promise((e,t)=>{if(n.isCancellationRequested)return t(a.canceled());let r=i.createCancelablePromise(e=>this.whenInitialized());r.then(()=>{r=null;this.handlers.set(c,r=>{switch(r.type){case 201:this.handlers.delete(c),e(r.data);break;case 202:this.handlers.delete(c);const n=new Error(r.data.message);n.stack=r.data.stack,n.name=r.data.name,t(n);break;case 203:this.handlers.delete(c),t(r.data)}}),this.sendRequest(l)});const o=()=>{r?(r.cancel(),r=null):this.sendRequest({id:c,type:101}),t(a.canceled())
},h=n.onCancellationRequested(o);u=s.combinedDisposable(s.toDisposable(o),h),this.activeRequests.add(u)}).finally(()=>this.activeRequests.delete(u))}requestEvent(e,t,r){const s=this.lastRequestId++,o={id:s,type:102,channelName:e,name:t,arg:r};let a=null;const c=new n.Emitter({onFirstListenerAdd:()=>{(a=i.createCancelablePromise(e=>this.whenInitialized())).then(()=>{a=null,this.activeRequests.add(c),this.sendRequest(o)})},onLastListenerRemove:()=>{a?(a.cancel(),a=null):(this.activeRequests.delete(c),this.sendRequest({id:s,type:103}))}});return this.handlers.set(s,e=>c.fire(e.data)),c.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 r=new v;f(r,e),f(r,t),this.sendBuffer(r.buffer)}sendBuffer(e){try{this.protocol.send(e)}catch(e){}}onBuffer(e){const t=new g(e),r=d(t),n=d(t);switch(r[0]){case 200:return this.onResponse({type:r[0]});case 201:case 202:case 204:case 203:
return this.onResponse({type:r[0],id:r[1],data:n})}}onResponse(e){if(200===e.type)return this.state=m.Idle,void this._onDidInitialize.fire();const t=this.handlers.get(e.id);t&&t(e)}whenInitialized(){return this.state===m.Idle?Promise.resolve():n.Event.toPromise(this.onDidInitialize)}dispose(){this.protocolListener&&(this.protocolListener.dispose(),this.protocolListener=null),this.activeRequests.forEach(e=>e.dispose()),this.activeRequests.clear()}}t.ChannelClient=C;class x{constructor(e){this.channels=new Map,this._connections=new Set,this._onDidChangeConnections=new n.Emitter,this.onDidChangeConnections=this._onDidChangeConnections.event,e(({protocol:e,onDidClientDisconnect:t})=>{n.Event.once(e.onMessage)(r=>{const n=d(new g(r)),s=new _(e,n),i=new C(e);this.channels.forEach((e,t)=>s.registerChannel(t,e));const o={channelServer:s,channelClient:i,ctx:n};this._connections.add(o),this._onDidChangeConnections.fire(o),t(()=>{s.dispose(),i.dispose(),this._connections.delete(o)})})})}get connections(){const e=[]
;return this._connections.forEach(t=>e.push(t)),e}getChannel(e,t){const r=this;return{call:(n,s,i)=>p(t.routeCall(r,n,s).then(t=>t.channelClient.getChannel(e))).call(n,s,i),listen:(n,s)=>p(t.routeEvent(r,n,s).then(t=>t.channelClient.getChannel(e))).listen(n,s)}}registerChannel(e,t){this.channels.set(e,t),this._connections.forEach(r=>{r.channelServer.registerChannel(e,t)})}dispose(){this.channels.clear(),this._connections.clear(),this._onDidChangeConnections.dispose()}}t.IPCServer=x;class E{constructor(e,t){const r=new v;f(r,t),e.send(r.buffer),this.channelClient=new C(e),this.channelServer=new _(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=E,t.getDelayedChannel=p,t.getNextTickChannel=function(e){let t=!1;return{call:(r,n,s)=>t?e.call(r,n,s):i.timeout(0).then(()=>t=!0).then(()=>e.call(r,n,s)),listen(r,s){if(t)return e.listen(r,s);const o=new n.Relay
;return i.timeout(0).then(()=>t=!0).then(()=>o.input=e.listen(r,s)),o.event}}};class P{constructor(e){this.fn=e}routeCall(e){return this.route(e)}routeEvent(e){return this.route(e)}route(e){return r(this,void 0,void 0,function*(){for(const t of e.connections)if(yield Promise.resolve(this.fn(t.ctx)))return Promise.resolve(t);return yield n.Event.toPromise(e.onDidChangeConnections),yield this.route(e)})}}t.StaticRouter=P}),define(e[27],t([0,1,47,46,4,3,2]),function(e,t,r,n,s,i,o){"use strict";function a(e,t,r,s){if(!e||!t)return d;const i=e.length,o=t.length;if(i<o)return d;const a=e.toLowerCase();if(!s){if(-1===a.indexOf(r))return d}return function(e,t,r,s,i,o){const a=[],c=[];for(let l=0;l<r;l++){const r=l*o,u=r-o,h=l>0,d=e[l],p=t[l];for(let e=0;e<o;e++){const t=e>0,o=r+e,l=u+e-1,m=t?a[o-1]:0,g=h&&t?a[l]:0,v=h&&t?c[l]:0;let w;(w=!g&&h?0:function(e,t,r,s,i,o){let a=0;if(t!==s[i])return a;a+=1,o>0&&(a+=5*o);e===r[i]&&(a+=1);if(0===i)a+=8;else{const e=function(e){switch(e){case 47:case 92:return 5;case 95:
case 45:case 46:case 32:case 39:case 34:case 58:return 4;default:return 0}}(r.charCodeAt(i-1));e?a+=e:n.isUpper(r.charCodeAt(i))&&(a+=1)}return a}(d,p,s,i,e,v))&&g+w>=m?(c[o]=v+1,a[o]=g+w):(c[o]=f,a[o]=m)}}const l=[];let u=r-1,h=o-1;for(;u>=0&&h>=0;){c[u*o+h]===f?h--:(l.push(h),u--,h--)}return[a[r*o-1],l.reverse()]}(t,r,o,e,a,i)}function c(e,t,r,c,u){if(!e||!t.value)return p;const h=c.getItemLabel(e);if(!h)return p;const f=c.getItemDescription(e);let d;const y=u[d=f?`${h}${f}${t.value}${r}`:`${h}${t.value}${r}`];if(y)return y;const b=function(e,t,r,c,u){if(r&&(i.isLinux?c.original===r:o.equalsIgnoreCase(c.original,r)))return{score:m,labelMatch:[{start:0,end:e.length}],descriptionMatch:t?[{start:0,end:t.length}]:void 0};if(!r||!c.containsPathSeparator){const t=n.matchesPrefix(c.value,e);if(t)return{score:g,labelMatch:t};const r=n.matchesCamelCase(c.value,e);if(r)return{score:v,labelMatch:r};const[s,i]=a(e,c.value,c.lowercase,u);if(s)return{score:s+w,labelMatch:l(i)}}if(t){let n=t;r&&(n=`${t}${s.sep}`)
;const i=n.length,o=`${n}${e}`,[h,f]=a(o,c.value,c.lowercase,u);if(h){const e=[],t=[];return l(f).forEach(r=>{r.start<i&&r.end>i?(e.push({start:0,end:r.end-i}),t.push({start:r.start,end:i})):r.start>=i?e.push({start:r.start-i,end:r.end-i}):t.push(r)}),{score:h,labelMatch:e,descriptionMatch:t}}}return p}(h,f,c.getItemPath(e),t,r);return u[d]=b,b}function l(e){let t=[];if(!e)return t;let r;for(const n of e)r&&r.end===n?r.end+=1:(r={start:n,end:n+1},t.push(r));return t}function u(e,t,r){let n=-1,s=-1;if(t.descriptionMatch&&t.descriptionMatch.length?n=t.descriptionMatch[0].start:t.labelMatch&&t.labelMatch.length&&(n=t.labelMatch[0].start),t.labelMatch&&t.labelMatch.length){if(s=t.labelMatch[t.labelMatch.length-1].end,t.descriptionMatch&&t.descriptionMatch.length){const t=r.getItemDescription(e);t&&(s+=t.length)}}else t.descriptionMatch&&t.descriptionMatch.length&&(s=t.descriptionMatch[t.descriptionMatch.length-1].end);return s-n}function h(e,t,n,s){
const i=s.getItemLabel(e)||"",o=s.getItemLabel(t)||"",a=s.getItemDescription(e),c=s.getItemDescription(t),l=i.length+(a?a.length:0),u=o.length+(c?c.length:0);if(l!==u)return l-u;const h=s.getItemPath(e),f=s.getItemPath(t);return h&&f&&h.length!==f.length?h.length-f.length:i!==o?r.compareAnything(i,o,n.value):a&&c&&a!==c?r.compareAnything(a,c,n.value):h&&f&&h!==f?r.compareAnything(h,f,n.value):0}Object.defineProperty(t,"__esModule",{value:!0});const f=0,d=[f,[]];t.score=a;const p=Object.freeze({score:0}),m=1<<18,g=1<<17,v=65536,w=32768;t.prepareQuery=function(e){e||(e="");let t=o.stripWildcards(e).replace(/\s/g,"");return i.isWindows&&(t=t.replace(/\//g,s.sep)),{original:e,value:t,lowercase:t.toLowerCase(),containsPathSeparator:t.indexOf(s.sep)>=0}},t.scoreItem=c,t.compareItemsByScore=function(e,t,r,n,s,i,o=h){const a=c(e,r,n,s,i),l=c(t,r,n,s,i),f=a.score,d=l.score;if((f===m||d===m)&&f!==d)return f===m?-1:1;if(f===g||d===g){if(f!==d)return f===g?-1:1;const r=s.getItemLabel(e)||"",n=s.getItemLabel(t)||""
;if(r.length!==n.length)return r.length-n.length}if(f===v||d===v){if(f!==d)return f===v?-1:1;const r=s.getItemLabel(e)||"",n=s.getItemLabel(t)||"",i=function(e,t){if(!e&&!t||!(e&&e.length||t&&t.length))return 0;if(!t||!t.length)return-1;if(!e||!e.length)return 1;const r=e[0].start,n=e[e.length-1].end-r,s=t[0].start,i=t[t.length-1].end-s;return n===i?0:i<n?1:-1}(a.labelMatch,l.labelMatch);if(0!==i)return i;if(r.length!==n.length)return r.length-n.length}if(f>w||d>w){if(d<w)return-1;if(f<w)return 1}if(f!==d)return f>d?-1:1;const p=u(e,a,s),y=u(t,l,s);return p&&y&&p!==y?y>p?-1:1:o(e,t,r,s)},t.fallbackCompare=h}),define(e[45],t([28,29]),function(e,t){return e.create("vs/base/common/errorMessage",t)}),define(e[30],t([0,1,45,13,6]),function(e,t,r,n,s){"use strict";function i(e,t){return e.message?t&&(e.stack||e.stacktrace)?r.localize(0,null,a(e),o(e.stack)||o(e.stacktrace)):a(e):r.localize(1,null)}function o(e){return Array.isArray(e)?e.join("\n"):e}function a(e){
return"string"==typeof e.code&&"number"==typeof e.errno&&"string"==typeof e.syscall?r.localize(2,null,e.message):e.message}function c(e=null,t=!1){if(!e)return r.localize(3,null);if(Array.isArray(e)){const n=s.coalesce(e),i=c(n[0],t);return n.length>1?r.localize(4,null,i,n.length):i}if(n.isString(e))return e;if(e.detail){const r=e.detail;if(r.error)return i(r.error,t);if(r.exception)return i(r.exception,t)}return e.stack?i(e,t):e.message?e.message:r.localize(5,null)}Object.defineProperty(t,"__esModule",{value:!0}),t.toErrorMessage=c}),define(e[49],t([28,29]),function(e,t){return e.create("vs/base/node/processes",t)}),define(e[50],t([0,1,4,20,42,16,49,13,10,7,3,57,39]),function(e,t,n,s,i,o,a,c,l,u,h,f,d){"use strict";function p(t,r){if(h.isWindows)try{const e={stdio:["pipe","pipe","ignore"]};r&&(e.cwd=r),o.execFileSync("taskkill",["/T","/F","/PID",t.pid.toString()],e)}catch(e){return{success:!1,error:e,code:e.status?function(e){switch(e){case 0:return 0;case 1:return 2;case 128:return 3;default:return 1}
}(e.status):1}}else if(h.isLinux||h.isMacintosh)try{const r=d.getPathFromAmdModule(e,"vs/base/node/terminateProcess.sh"),n=o.spawnSync(r,[t.pid.toString()]);if(n.error)return{success:!1,error:n.error}}catch(e){return{success:!1,error:e}}else t.kill("SIGKILL");return{success:!0}}function m(){return process.env.comspec||"cmd.exe"}Object.defineProperty(t,"__esModule",{value:!0}),t.terminateProcess=p,t.getWindowsShell=m;class g{constructor(e,t,r,n){if(void 0!==t&&void 0!==r&&void 0!==n)this.cmd=e,this.args=t,this.shell=r,this.options=n;else{const t=e;this.cmd=t.command,this.shell=t.isShellCommand,this.args=t.args.slice(0),this.options=t.options||{}}if(this.childProcess=null,this.terminateRequested=!1,this.options.env){const e=Object.create(null);Object.keys(process.env).forEach(t=>{e[t]=process.env[t]}),Object.keys(this.options.env).forEach(t=>{e[t]=this.options.env[t]}),this.options.env=e}}getSanitizedCommand(){let e=this.cmd.toLowerCase();const t=e.lastIndexOf(n.sep);return-1!==t&&(e=e.substring(t+1)),
g.WellKnowCommands[e]?e:"other"}start(e){return h.isWindows&&(this.options&&this.options.cwd&&u.isUNC(this.options.cwd)||!this.options&&u.isUNC(process.cwd()))?Promise.reject(new Error(a.localize(0,null))):this.useExec().then(t=>{let r,n;const s=new Promise((e,t)=>{r=e,n=t});if(t){let t=this.cmd;this.args&&(t=t+" "+this.args.join(" ")),this.childProcess=o.exec(t,this.options,(t,s,i)=>{this.childProcess=null;const o=t;o&&o.killed?n({killed:this.terminateRequested,stdout:s.toString(),stderr:i.toString()}):this.handleExec(r,e,t,s,i)})}else{let t=null;if(this.shell&&h.isWindows){const e=l.deepClone(this.options);e.windowsVerbatimArguments=!0,e.detached=!1;let r=!1,n=!1;const s=[];let i=this.ensureQuotes(this.cmd);s.push(i.value),r=i.quoted,this.args&&this.args.forEach(e=>{i=this.ensureQuotes(e),s.push(i.value),n=n&&i.quoted});const a=["/s","/c"];r?n?a.push('"'+s.join(" ")+'"'):s.length>1?a.push('"'+s[0]+'" '+s.slice(1).join(" ")):a.push('"'+s[0]+'"'):a.push(s.join(" ")),t=o.spawn(m(),a,e)
}else this.cmd&&(t=o.spawn(this.cmd,this.args,this.options));t&&(this.childProcess=t,this.childProcessPromise=Promise.resolve(t),this.pidResolve&&(this.pidResolve(c.isNumber(t.pid)?t.pid:-1),this.pidResolve=void 0),t.on("error",e=>{this.childProcess=null,n({terminated:this.terminateRequested,error:e})}),t.pid&&(this.childProcess.on("close",t=>{this.childProcess=null,this.childProcessPromise=null,this.handleClose(t,r,e,n);const s={terminated:this.terminateRequested};c.isNumber(t)&&(s.cmdCode=t),r(s)}),this.handleSpawn(t,r,e,n,!0)))}return s})}handleClose(e,t,r,n){}ensureQuotes(e){return g.regexp.test(e)?{value:'"'+e+'"',quoted:!0}:{value:e,quoted:e.length>0&&'"'===e[0]&&'"'===e[e.length-1]}}get pid(){return this.childProcessPromise?this.childProcessPromise.then(e=>e.pid,e=>-1):new Promise(e=>{this.pidResolve=e})}terminate(){return this.childProcessPromise?this.childProcessPromise.then(e=>{this.terminateRequested=!0;const t=p(e,this.options.cwd);return t.success&&(this.childProcess=null),t},e=>({success:!0
})):Promise.resolve({success:!0})}useExec(){return new Promise((e,t)=>{if(!this.shell||!h.isWindows)return e(!1);const r=o.spawn(m(),["/s","/c"]);r.on("error",t=>e(!0)),r.on("exit",t=>e(!1))})}}g.WellKnowCommands={ant:!0,cmake:!0,eslint:!0,gradle:!0,grunt:!0,gulp:!0,jake:!0,jenkins:!0,jshint:!0,make:!0,maven:!0,msbuild:!0,msc:!0,nmake:!0,npm:!0,rake:!0,tsc:!0,xbuild:!0},g.regexp=/^[^"].* .*[^"]/,t.AbstractProcess=g;class v extends g{constructor(e,t,r,n){super(e,t,r,n)}handleExec(e,t,r,n,s){[n,s].forEach((e,r)=>{const n=new f.LineDecoder;n.write(e).forEach(e=>{t({line:e,source:0===r?0:1})});const s=n.end();s&&t({line:s,source:0===r?0:1})}),e({terminated:this.terminateRequested,error:r})}handleSpawn(e,t,r,n,s){this.stdoutLineDecoder=new f.LineDecoder,this.stderrLineDecoder=new f.LineDecoder,e.stdout.on("data",e=>{this.stdoutLineDecoder.write(e).forEach(e=>r({line:e,source:0}))}),e.stderr.on("data",e=>{this.stderrLineDecoder.write(e).forEach(e=>r({line:e,source:1}))})}handleClose(e,t,r,n){
[this.stdoutLineDecoder.end(),this.stderrLineDecoder.end()].forEach((e,t)=>{e&&r({line:e,source:0===t?0:1})})}}t.LineProcess=v,t.createQueuedSender=function(e){let t=[],r=!1;const n=function(s){r?t.push(s):e.send(s,e=>{if(e&&console.error(e),r=!1,t.length>0){const e=t.slice(0);t=[],e.forEach(e=>n(e))}})&&!h.isWindows||(r=!0)};return{send:n}};!function(e){e.findExecutable=function(e,t,o){return r(this,void 0,void 0,function*(){if(n.isAbsolute(e))return e;if(void 0===t&&(t=process.cwd()),"."!==n.dirname(e))return n.join(t,e);if(void 0===o&&c.isString(process.env.PATH)&&(o=process.env.PATH.split(n.delimiter)),void 0===o||0===o.length)return n.join(t,e);for(let r of o){let o;if(o=n.isAbsolute(r)?n.join(r,e):n.join(t,r,e),yield i.promisify(s.exists)(o))return o;let a=o+".com";if(yield i.promisify(s.exists)(a))return a;if(a=o+".exe",yield i.promisify(s.exists)(a))return a}return n.join(t,e)})}}(t.win32||(t.win32={}))}),define(e[51],t([0,1,16,11,12,10,5,50,43,40,17,9,23]),function(e,t,r,n,s,i,o,a,c,l,u,h,f){
"use strict";Object.defineProperty(t,"__esModule",{value:!0});class d extends c.ChannelServer{constructor(e){super({send:e=>{try{process.send&&process.send(e.buffer.toString("base64"))}catch(e){}},onMessage:o.Event.fromNodeEventEmitter(process,"message",e=>f.VSBuffer.wrap(Buffer.from(e,"base64")))},e),process.once("disconnect",()=>this.dispose())}}t.Server=d;class p{constructor(e,t){this.modulePath=e,this.options=t,this.activeRequests=new Set,this.channels=new Map,this._onDidProcessExit=new o.Emitter,this.onDidProcessExit=this._onDidProcessExit.event;const r=t&&t.timeout?t.timeout:6e4;this.disposeDelayer=new s.Delayer(r),this.child=null,this._client=null}getChannel(e){const t=this;return{call:(r,n,s)=>t.requestPromise(e,r,n,s),listen:(r,n)=>t.requestEvent(e,r,n)}}requestPromise(e,t,r,i=u.CancellationToken.None){if(!this.disposeDelayer)return Promise.reject(new Error("disposed"));if(i.isCancellationRequested)return Promise.reject(h.canceled());this.disposeDelayer.cancel()
;const o=this.getCachedChannel(e),a=s.createCancelablePromise(e=>o.call(t,r,e)),c=i.onCancellationRequested(()=>a.cancel()),l=n.toDisposable(()=>a.cancel());return this.activeRequests.add(l),a.finally(()=>{c.dispose(),this.activeRequests.delete(l),0===this.activeRequests.size&&this.disposeDelayer.trigger(()=>this.disposeClient())}),a}requestEvent(e,t,r){if(!this.disposeDelayer)return o.Event.None;this.disposeDelayer.cancel();let n;const s=new o.Emitter({onFirstListenerAdd:()=>{const i=this.getCachedChannel(e).listen(t,r);n=i(s.fire,s),this.activeRequests.add(n)},onLastListenerRemove:()=>{this.activeRequests.delete(n),n.dispose(),0===this.activeRequests.size&&this.disposeDelayer&&this.disposeDelayer.trigger(()=>this.disposeClient())}});return s.event}get client(){if(!this._client){const e=this.options&&this.options.args?this.options.args:[],t=Object.create(null);t.env=i.assign(i.deepClone(process.env),{VSCODE_PARENT_PID:String(process.pid)}),
this.options&&this.options.env&&(t.env=i.assign(t.env,this.options.env)),this.options&&this.options.freshExecArgv&&(t.execArgv=[]),this.options&&"number"==typeof this.options.debug&&(t.execArgv=["--nolazy","--inspect="+this.options.debug]),this.options&&"number"==typeof this.options.debugBrk&&(t.execArgv=["--nolazy","--inspect-brk="+this.options.debugBrk]),this.child=r.fork(this.modulePath,e,t);const s=new o.Emitter;o.Event.fromNodeEventEmitter(this.child,"message",e=>e)(e=>{l.isRemoteConsoleLog(e)?l.log(e,`IPC Library: ${this.options.serverName}`):s.fire(f.VSBuffer.wrap(Buffer.from(e,"base64")))});const u=this.options.useQueue?a.createQueuedSender(this.child):this.child,h={send:e=>this.child&&this.child.connected&&u.send(e.buffer.toString("base64")),onMessage:s.event};this._client=new c.ChannelClient(h);const d=()=>this.disposeClient();process.once("exit",d),this.child.on("error",e=>console.warn('IPC "'+this.options.serverName+'" errored with '+e)),this.child.on("exit",(e,t)=>{
process.removeListener("exit",d),this.activeRequests.forEach(e=>n.dispose(e)),this.activeRequests.clear(),0!==e&&"SIGTERM"!==t&&console.warn('IPC "'+this.options.serverName+'" crashed with exit code '+e+" and signal "+t),this.disposeDelayer&&this.disposeDelayer.cancel(),this.disposeClient(),this._onDidProcessExit.fire({code:e,signal:t})})}return this._client}getCachedChannel(e){let t=this.channels.get(e);return t||(t=this.client.getChannel(e),this.channels.set(e,t)),t}disposeClient(){this._client&&(this.child&&(this.child.kill(),this.child=null),this._client=null,this.channels.clear())}dispose(){this._onDidProcessExit.dispose(),this.disposeDelayer.cancel(),this.disposeDelayer=null,this.disposeClient(),this.activeRequests.clear()}}t.Client=p}),define(e[52],t([28,29]),function(e,t){return e.create("vs/workbench/common/views",t)}),define(e[21],t([0,1]),function(e,t){"use strict";function r(e,t,r,n){t[s.DI_TARGET]===t?t[s.DI_DEPENDENCIES].push({id:e,index:r,optional:n}):(t[s.DI_DEPENDENCIES]=[{id:e,index:r,
optional:n}],t[s.DI_TARGET]=t)}function n(e){if(s.serviceIds.has(e))return s.serviceIds.get(e);const t=function(e,n,s){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");r(t,e,s,!1)};return t.toString=(()=>e),s.serviceIds.set(e,t),t}Object.defineProperty(t,"__esModule",{value:!0});var s;!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]||[]}}(s=t._util||(t._util={})),t.IInstantiationService=n("instantiationService"),t.createDecorator=n,t.optional=function(e){return function(t,n,s){if(3!==arguments.length)throw new Error("@optional-decorator can only be used to decorate a parameter");r(e,t,s,!0)}}}),define(e[54],t([0,1,21,11,3,5]),function(e,t,r,n,s,i){"use strict";function o(){return(new Date).toISOString()}Object.defineProperty(t,"__esModule",{value:!0}),t.ILogService=r.createDecorator("logService");var a;!function(e){e[e.Trace=0]="Trace",
e[e.Debug=1]="Debug",e[e.Info=2]="Info",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.Off=6]="Off"}(a=t.LogLevel||(t.LogLevel={})),t.DEFAULT_LOG_LEVEL=a.Info;class c extends n.Disposable{constructor(){super(...arguments),this.level=t.DEFAULT_LOG_LEVEL,this._onDidChangeLogLevel=this._register(new i.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=c;class l extends c{constructor(e=t.DEFAULT_LOG_LEVEL){super(),this.setLevel(e),this.useColors=!s.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=l;class u extends c{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 c{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 r of this.logServices)r.trace(e,...t)}debug(e,...t){for(const r of this.logServices)r.debug(e,...t)}info(e,...t){for(const r of this.logServices)r.info(e,...t)}warn(e,...t){for(const r of this.logServices)r.warn(e,...t)}error(e,...t){for(const r of this.logServices)r.error(e,...t)}critical(e,...t){for(const r of this.logServices)r.critical(e,...t)}dispose(){for(const e of this.logServices)e.dispose()}}t.MultiplexLogService=h;class f extends n.Disposable{constructor(e){super(),this.logService=e,this._register(e)}get onDidChangeLogLevel(){return this.logService.onDidChangeLogLevel}
setLevel(e){this.logService.setLevel(e)}getLevel(){return this.logService.getLevel()}trace(e,...t){this.logService.trace(e,...t)}debug(e,...t){this.logService.debug(e,...t)}info(e,...t){this.logService.info(e,...t)}warn(e,...t){this.logService.warn(e,...t)}error(e,...t){this.logService.error(e,...t)}critical(e,...t){this.logService.critical(e,...t)}}t.DelegatedLogService=f;class d{constructor(){this.onDidChangeLogLevel=(new i.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=d,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[32],t([0,1,13,59]),function(e,t,r,n){"use strict"
;Object.defineProperty(t,"__esModule",{value:!0});class s{constructor(){this.data=new Map}add(e,t){n.ok(r.isString(e)),n.ok(r.isObject(t)),n.ok(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}knows(e){return this.data.has(e)}as(e){return this.data.get(e)||null}}t.Registry=new s}),define(e[56],t([0,1,5,52,21,11,14,32]),function(e,t,r,n,s,i,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TEST_VIEW_CONTAINER_ID="workbench.view.extension.test";var c;!function(e){e.ViewContainersRegistry="workbench.registry.view.containers",e.ViewsRegistry="workbench.registry.view"}(c=t.Extensions||(t.Extensions={}));class l{constructor(e,t,r){this.id=e,this.hideIfEmpty=t,this.extensionId=r}}t.ViewContainer=l;class u extends i.Disposable{constructor(){super(...arguments),this._onDidRegister=this._register(new r.Emitter),this.onDidRegister=this._onDidRegister.event,this._onDidDeregister=this._register(new r.Emitter),this.onDidDeregister=this._onDidDeregister.event,
this.viewContainers=new Map}get all(){return o.values(this.viewContainers)}registerViewContainer(e,t,r){const n=this.viewContainers.get(e);if(n)return n;const s=new class extends l{constructor(){super(e,!!t,r)}};return this.viewContainers.set(e,s),this._onDidRegister.fire(s),s}deregisterViewContainer(e){this.viewContainers.get(e.id)&&(this.viewContainers.delete(e.id),this._onDidDeregister.fire(e))}get(e){return this.viewContainers.get(e)}}a.Registry.add(c.ViewContainersRegistry,new u);class h extends i.Disposable{constructor(){super(...arguments),this._onViewsRegistered=this._register(new r.Emitter),this.onViewsRegistered=this._onViewsRegistered.event,this._onViewsDeregistered=this._register(new r.Emitter),this.onViewsDeregistered=this._onViewsDeregistered.event,this._onDidChangeContainer=this._register(new r.Emitter),this.onDidChangeContainer=this._onDidChangeContainer.event,this._viewContainers=[],this._views=new Map}registerViews(e,t){this.addViews(e,t),this._onViewsRegistered.fire({views:e,viewContainer:t
})}deregisterViews(e,t){const r=this.removeViews(e,t);r.length&&this._onViewsDeregistered.fire({views:r,viewContainer:t})}moveViews(e,t){o.keys(this._views).forEach(r=>{if(r!==t){const n=this.removeViews(e,r);n.length&&(this.addViews(n,t),this._onDidChangeContainer.fire({views:n,from:r,to:t}))}})}getViews(e){return this._views.get(e)||[]}getView(e){for(const t of this._viewContainers){const r=(this._views.get(t)||[]).filter(t=>t.id===e)[0];if(r)return r}return null}getViewContainer(e){for(const t of this._viewContainers){if((this._views.get(t)||[]).filter(t=>t.id===e)[0])return t}return null}addViews(e,t){let r=this._views.get(t);r||(r=[],this._views.set(t,r),this._viewContainers.push(t));for(const s of e){if(r.some(e=>e.id===s.id))throw new Error(n.localize(0,null,s.id,t.id));r.push(s)}}removeViews(e,t){const r=this._views.get(t);if(!r)return[];const n=[],s=[];for(const t of r)-1===e.indexOf(t)?s.push(t):n.push(t);return n.length&&(s.length?this._views.set(t,s):(this._views.delete(t),
this._viewContainers.splice(this._viewContainers.indexOf(t),1))),n}}a.Registry.add(c.ViewsRegistry,new h),t.IViewsService=s.createDecorator("viewsService");!function(e){e[e.None=0]="None",e[e.Collapsed=1]="Collapsed",e[e.Expanded=2]="Expanded"}(t.TreeItemCollapsibleState||(t.TreeItemCollapsibleState={}))}),define(e[22],t([0,1,6,15,10,7,2,21,56,32]),function(e,t,r,n,s,i,o,a,c,l){"use strict";function u(e){return!!e.resource}Object.defineProperty(t,"__esModule",{value:!0}),t.VIEWLET_ID="workbench.view.search",t.PANEL_ID="workbench.view.search",t.VIEW_ID="workbench.view.search",t.VIEW_CONTAINER=l.Registry.as(c.Extensions.ViewContainersRegistry).registerViewContainer(t.VIEWLET_ID,!0),t.ISearchService=a.createDecorator("searchService");!function(e){e[e.file=0]="file",e[e.text=1]="text"}(t.SearchProviderType||(t.SearchProviderType={}));!function(e){e[e.File=1]="File",e[e.Text=2]="Text"}(t.QueryType||(t.QueryType={})),t.resultIsMatch=function(e){return!!e.preview},t.isFileMatch=u,t.isProgressMessage=function(e){
return!u(e)};class h{constructor(e){this.resource=e,this.results=[]}}t.FileMatch=h;class f{constructor(e,t,n){if(this.ranges=t,n&&1===n.matchLines&&!Array.isArray(t)){e=o.getNLines(e,n.matchLines);const r=Math.floor(n.charsPerLine/5),s=Math.max(t.startColumn-r,0),i=e.substring(s,n.charsPerLine+s),a=t.endLineNumber-t.startLineNumber+1<=n.matchLines?Math.min(i.length,t.endColumn-s):i.length;this.preview={text:i,matches:new p(0,t.startColumn-s,a)}}else{const n=Array.isArray(t)?t[0].startLineNumber:t.startLineNumber;this.preview={text:e,matches:r.mapArrayOrNot(t,e=>new d(e.startLineNumber-n,e.startColumn,e.endLineNumber-n,e.endColumn))}}}}t.TextSearchMatch=f;class d{constructor(e,t,r,n){this.startLineNumber=e,this.startColumn=t,this.endLineNumber=r,this.endColumn=n}}t.SearchRange=d;class p extends d{constructor(e,t,r){super(e,t,e,r)}}t.OneLineRange=p,t.getExcludes=function(e,t=!0){const r=e&&e.files&&e.files.exclude,n=t&&e&&e.search&&e.search.exclude;if(!r&&!n)return;if(!r||!n)return r||n
;let i=Object.create(null);return i=s.mixin(i,s.deepClone(r)),i=s.mixin(i,s.deepClone(n),!0)},t.pathIncludedInQuery=function(e,t){return(!e.excludePattern||!n.match(e.excludePattern,t))&&!(e.includePattern&&!n.match(e.includePattern,t))&&(!e.usingSearchPaths||!!e.folderQueries&&e.folderQueries.every(e=>{const r=e.folder.fsPath;return!(!i.isEqualOrParent(t,r)||e.includePattern&&!n.match(e.includePattern,t))}))};var m;!function(e){e[e.unknownEncoding=1]="unknownEncoding",e[e.regexParseError=2]="regexParseError",e[e.globParseError=3]="globParseError",e[e.invalidLiteral=4]="invalidLiteral",e[e.rgProcessError=5]="rgProcessError",e[e.other=6]="other"}(m=t.SearchErrorCode||(t.SearchErrorCode={}));class g extends Error{constructor(e,t){super(e),this.code=t}}t.SearchError=g,t.deserializeSearchError=function(e){try{const t=JSON.parse(e);return new g(t.message,t.code)}catch(t){return new g(e,m.other)}},t.serializeSearchError=function(e){const t={message:e.message,code:e.code};return new Error(JSON.stringify(t))},
t.isSerializedSearchComplete=function(e){return"error"===e.type||"success"===e.type},t.isSerializedSearchSuccess=function(e){return"success"===e.type},t.isSerializedFileMatch=function(e){return!!e.path};class v{constructor(e){this.path=e,this.results=[]}addMatch(e){this.results.push(e)}serialize(){return{path:this.path,results:this.results,numMatches:this.results.length}}}t.SerializableFileMatch=v,t.resolvePatternsForProvider=function(e,t){const r=Object.assign({},e||{},t||{});return Object.keys(r).filter(e=>{const t=r[e];return"boolean"==typeof t&&t})};class w{constructor(e,t){this._excludeExpression=Object.assign({},e.excludePattern||{},t.excludePattern||{}),this._parsedExcludeExpression=n.parse(this._excludeExpression);let r=e.includePattern;t.includePattern&&(r=r?Object.assign({},r,t.includePattern):t.includePattern),r&&(this._parsedIncludeExpression=n.parse(r))}includedInQuerySync(e,t,r){
return(!this._parsedExcludeExpression||!this._parsedExcludeExpression(e,t,r))&&!(this._parsedIncludeExpression&&!this._parsedIncludeExpression(e,t,r))}includedInQuery(e,t,r){return(this._parsedExcludeExpression?Promise.resolve(this._parsedExcludeExpression(e,t,r)).then(e=>!!e):Promise.resolve(!1)).then(n=>!n&&(this._parsedIncludeExpression?Promise.resolve(this._parsedIncludeExpression(e,t,r)).then(e=>!!e):Promise.resolve(!0))).then(e=>e)}hasSiblingExcludeClauses(){return function(e){for(const t in e)if("boolean"!=typeof e[t])return!0;return!1}(this._excludeExpression)}}t.QueryGlobTester=w}),define(e[34],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t){this.line=e,this.character=t}isBefore(e){return!1}isBeforeOrEqual(e){return!1}isAfter(e){return!1}isAfterOrEqual(e){return!1}isEqual(e){return!1}compareTo(e){return 0}translate(e,t){return new r(0,0)}with(e){return new r(0,0)}}t.Position=r;class n{constructor(e,t,n,s){this.start=new r(e,t),
this.end=new r(n,s)}contains(e){return!1}isEqual(e){return!1}intersection(e){}union(e){return new n(0,0,0,0)}with(e){return new n(0,0,0,0)}}t.Range=n});var n=this&&this.__decorate||function(e,t,r,n){var s,i=arguments.length,o=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o},s=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};define(e[35],t([0,1,2,54,22,6,34]),function(e,t,r,i,o,a,c){"use strict";function l(e){return new o.SearchRange(e.start.line,e.start.character,e.end.line,e.end.character)}function u(e){return new c.Range(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn)}Object.defineProperty(t,"__esModule",{value:!0}),t.anchorGlob=function(e){return r.startsWith(e,"**")||r.startsWith(e,"/")?e:`/${e}`},t.createTextSearchResult=function(e,t,r,n){
const s=a.mapArrayOrNot(r,l),i=new o.TextSearchMatch(t,s,n),c=i.preview.matches;return{ranges:a.mapArrayOrNot(s,u),uri:e,preview:{text:i.preview.text,matches:a.mapArrayOrNot(c,u)}}};let h=class{constructor(e){this.logService=e}appendLine(e){this.logService.debug("RipgrepSearchEH#search",e)}};h=n([s(0,i.ILogService)],h),t.OutputChannel=h}),define(e[60],t([0,1]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e){this.service=e}listen(e,t,r){switch(t){case"fileSearch":return this.service.fileSearch(r);case"textSearch":return this.service.textSearch(r)}throw new Error("Event not found")}call(e,t,r){switch(t){case"clearCache":return this.service.clearCache(r)}throw new Error("Call not found")}}t.SearchChannel=r;class n{constructor(e){this.channel=e}fileSearch(e){return this.channel.listen("fileSearch",e)}textSearch(e){return this.channel.listen("textSearch",e)}clearCache(e){return this.channel.call("clearCache",e)}}t.SearchChannelClient=n}),
define(e[61],t([0,1,4,6,17,30,15,53,8,31,18,22]),function(e,t,r,n,s,i,o,a,c,l,u,h){"use strict";function f(e){return!!e.preview}Object.defineProperty(t,"__esModule",{value:!0});class d{constructor(e,t,r=u){this.query=e,this.provider=t,this._pfs=r,this.resultCount=0}search(e,t){const r=this.query.folderQueries||[],n=new s.CancellationTokenSource;return t.onCancellationRequested(()=>n.cancel()),new Promise((t,s)=>{this.collector=new p(e);let o=!1;Promise.all(r.map((e,t)=>this.searchInFolder(e,e=>((e,t)=>{if(!o&&!this.isLimitHit){const r=this.resultSize(e);f(e)&&"number"==typeof this.query.maxResults&&this.resultCount+r>this.query.maxResults&&(this.isLimitHit=!0,o=!0,n.cancel(),e=this.trimResultToSize(e,this.query.maxResults-this.resultCount));const s=this.resultSize(e);this.resultCount+=s,s>0&&this.collector.add(e,t)}})(e,t),n.token))).then(e=>{n.dispose(),this.collector.flush();const r=e.some(e=>!!e&&!!e.limitHit);t({limitHit:this.isLimitHit||r,stats:{type:"textSearchProvider"}})},e=>{n.dispose()
;const t=i.toErrorMessage(e);s(new Error(t))})})}resultSize(e){const t=e;return Array.isArray(t.ranges)?t.ranges.length:1}trimResultToSize(e,t){const r=Array.isArray(e.ranges)?e.ranges:[e.ranges],n=Array.isArray(e.preview.matches)?e.preview.matches:[e.preview.matches];return{ranges:r.slice(0,t),preview:{matches:n.slice(0,t),text:e.preview.text},uri:e.uri}}searchInFolder(e,t,n){const s=new h.QueryGlobTester(this.query,e),i=[],a={report:n=>{if(!this.validateProviderResult(n))return;const a="file"===e.folder.scheme?o.hasSiblingPromiseFn(()=>this.readdir(r.dirname(n.uri.fsPath))):void 0,c=r.relative(e.folder.fsPath,n.uri.fsPath);i.push(s.includedInQuery(c,r.basename(c),a).then(e=>{e&&t(n)}))}},c=this.getSearchOptionsForFolder(e);return new Promise(e=>process.nextTick(e)).then(()=>this.provider.provideTextSearchResults(function(e){return{isCaseSensitive:e.isCaseSensitive||!1,isRegExp:e.isRegExp||!1,isWordMatch:e.isWordMatch||!1,isMultiline:e.isMultiline||!1,pattern:e.pattern}
}(this.query.contentPattern),c,a,n)).then(e=>Promise.all(i).then(()=>e))}validateProviderResult(e){if(f(e))if(Array.isArray(e.ranges)){if(!Array.isArray(e.preview.matches))return console.warn("INVALID - A text search provider match's`ranges` and`matches` properties must have the same type."),!1;if(e.preview.matches.length!==e.ranges.length)return console.warn("INVALID - A text search provider match's`ranges` and`matches` properties must have the same length."),!1}else if(Array.isArray(e.preview.matches))return console.warn("INVALID - A text search provider match's`ranges` and`matches` properties must have the same length."),!1;return!0}readdir(e){return this._pfs.readdir(e)}getSearchOptionsForFolder(e){const t=h.resolvePatternsForProvider(this.query.includePattern,e.includePattern),r=h.resolvePatternsForProvider(this.query.excludePattern,e.excludePattern),n={folder:c.URI.from(e.folder),excludes:r,includes:t,useIgnoreFiles:!e.disregardIgnoreFiles,useGlobalIgnoreFiles:!e.disregardGlobalIgnoreFiles,
followSymlinks:!e.ignoreSymlinks,encoding:e.fileEncoding&&l.toCanonicalName(e.fileEncoding),maxFileSize:this.query.maxFileSize,maxResults:this.query.maxResults,previewOptions:this.query.previewOptions,afterContext:this.query.afterContext,beforeContext:this.query.beforeContext};return n.usePCRE2=this.query.usePCRE2,n}}t.TextSearchManager=d;class p{constructor(e){this._onResult=e,this._currentFileMatch=null,this._batchedCollector=new m(512,e=>this.sendItems(e))}add(e,t){!this._currentFileMatch||this._currentFolderIdx===t&&a.isEqual(this._currentUri,e.uri)||(this.pushToCollector(),this._currentFileMatch=null),this._currentFileMatch||(this._currentFolderIdx=t,this._currentFileMatch={resource:e.uri,results:[]}),this._currentFileMatch.results.push(function(e){return f(e)?{preview:{matches:n.mapArrayOrNot(e.preview.matches,e=>({startLineNumber:e.start.line,startColumn:e.start.character,endLineNumber:e.end.line,endColumn:e.end.character})),text:e.preview.text},ranges:n.mapArrayOrNot(e.ranges,e=>({
startLineNumber:e.start.line,startColumn:e.start.character,endLineNumber:e.end.line,endColumn:e.end.character}))}:{text:e.text,lineNumber:e.lineNumber}}(e))}pushToCollector(){const e=this._currentFileMatch&&this._currentFileMatch.results?this._currentFileMatch.results.length:0;this._batchedCollector.addItem(this._currentFileMatch,e)}flush(){this.pushToCollector(),this._batchedCollector.flush()}sendItems(e){this._onResult(e)}}t.TextSearchResultsCollector=p,t.extensionResultIsMatch=f;class m{constructor(e,t){this.maxBatchSize=e,this.cb=t,this.totalNumberCompleted=0,this.batch=[],this.batchSize=0}addItem(e,t){e&&this.addItemToBatch(e,t)}addItems(e,t){e&&this.addItemsToBatch(e,t)}addItemToBatch(e,t){this.batch.push(e),this.batchSize+=t,this.onUpdate()}addItemsToBatch(e,t){this.batch=this.batch.concat(e),this.batchSize+=t,this.onUpdate()}onUpdate(){this.totalNumberCompleted<m.START_BATCH_AFTER_COUNT?this.flush():this.batchSize>=this.maxBatchSize?this.flush():this.timeoutHandle||(this.timeoutHandle=setTimeout(()=>{
this.flush()},m.TIMEOUT))}flush(){this.batchSize&&(this.totalNumberCompleted+=this.batchSize,this.cb(this.batch),this.batch=[],this.batchSize=0,this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=0))}}m.TIMEOUT=4e3,m.START_BATCH_AFTER_COUNT=50,t.BatchedCollector=m}),define(e[62],t([0,1,16,4,19,10,7,3,2,35,63]),function(e,t,r,n,s,i,o,a,c,l,u){"use strict";function h(e,t,n,i){const o=function(e,t,r,n){const i=["--files","--hidden","--case-sensitive"];d([t],r,!1).forEach(e=>{const t=l.anchorGlob(e);if(i.push("-g",t),a.isMacintosh){const e=s.normalizeNFD(t);e!==t&&i.push("-g",e)}});const o=f([t],n,void 0,!1);o.globArgs.forEach(e=>{const t=`!${l.anchorGlob(e)}`;if(i.push("-g",t),a.isMacintosh){const e=s.normalizeNFD(t);e!==t&&i.push("-g",e)}}),!1!==t.disregardIgnoreFiles?i.push("--no-ignore"):i.push("--no-ignore-parent");t.ignoreSymlinks||i.push("--follow");e.exists&&i.push("--quiet");i.push("--no-config"),t.disregardGlobalIgnoreFiles&&i.push("--no-ignore-global");return{args:i,
siblingClauses:o.siblingClauses}}(e,t,n,i),c=t.folder.fsPath;return{cmd:r.spawn(v,o.args,{cwd:c}),siblingClauses:o.siblingClauses,rgArgs:o,cwd:c}}function f(e,t,r,n=!0){const s=[];let o={};return e.forEach(e=>{const a=p(i.assign({},e.excludePattern||{},t||{}),n?e.folder.fsPath:void 0,r);s.push(...a.globArgs),a.siblingClauses&&(o=i.assign(o,a.siblingClauses))}),{globArgs:s,siblingClauses:o}}function d(e,t,r=!0){const n=[];return e.forEach(e=>{const s=p(i.assign({},t||{},e.includePattern||{}),r?e.folder.fsPath:void 0);n.push(...s.globArgs)}),n}function p(e,t,r){const n=[],s={};return Object.keys(e).forEach(i=>{if(r&&r.has(i))return;if(!i)return;const o=e[i];i=function(e){return e=c.rtrim(e,"\\"),c.rtrim(e,"/")}(t?m(t,i):i),i=c.startsWith(i,"\\\\")?"\\\\"+i.substr(2).replace(/\\/g,"/"):i.replace(/\\/g,"/"),"boolean"==typeof o&&o?(c.startsWith(i,"\\\\")&&(i+="**"),n.push(g(i))):o&&o.when&&(s[i]=o)}),{globArgs:n,siblingClauses:s}}function m(e,t){return n.isAbsolute(t)?t:n.join(e,t)}function g(e){
return"c:/"===o.getRoot(e).toLowerCase()?e.replace(/^c:[/\\]/i,"/"):e}Object.defineProperty(t,"__esModule",{value:!0});const v=u.rgPath.replace(/\bnode_modules\.asar\b/,"node_modules.asar.unpacked");t.spawnRipgrepCmd=h,t.foldersToRgExcludeGlobs=f,t.foldersToIncludeGlobs=d,t.getAbsoluteGlob=m,t.fixDriveC=g}),define(e[64],t([0,1,16,20,4,33,6,30,15,19,10,7,3,24,2,13,18,62,27]),function(e,t,r,n,s,i,o,a,c,l,u,h,f,d,p,m,g,v,w){"use strict";function y(e){const t=e.trim().split("\n"),r=t[0].trim();return p.startsWith(r,"Error parsing regex")?r:p.startsWith(r,"regex parse error")?p.uppercaseFirstLetter(t[t.length-1].trim()):p.startsWith(r,"error parsing glob")||p.startsWith(r,"unsupported encoding")?r.charAt(0).toUpperCase()+r.substr(1):"Literal '\\n' not allowed."===r?"Literal '\\n' currently not supported":p.startsWith(r,"Literal ")?r:void 0}Object.defineProperty(t,"__esModule",{value:!0});const b=new Set;process.on("exit",()=>{b.forEach(e=>e())});class _{constructor(e){this.config=e,
this.filePattern=e.filePattern||"",this.includePattern=e.includePattern&&c.parse(e.includePattern),this.maxResults=e.maxResults||null,this.exists=!!e.exists,this.walkedPaths=Object.create(null),this.resultCount=0,this.isLimitHit=!1,this.directoriesWalked=0,this.filesWalked=0,this.errors=[],this.filePattern&&(this.normalizedFilePatternLowercase=w.prepareQuery(this.filePattern).lowercase),this.globalExcludePattern=e.excludePattern&&c.parse(e.excludePattern),this.folderExcludePatterns=new Map,e.folderQueries.forEach(t=>{const r=u.assign({},t.excludePattern||{},this.config.excludePattern||{}),n=t.folder.fsPath;e.folderQueries.map(e=>e.folder.fsPath).filter(e=>e!==n).forEach(e=>{h.isEqualOrParent(e,n)&&(r[s.relative(n,e)]=!0)}),this.folderExcludePatterns.set(n,new x(r,n))})}cancel(){this.isCanceled=!0}walk(e,t,r,n,i){if(this.fileWalkSW=d.StopWatch.create(!1),this.isCanceled)return i(null,this.isLimitHit);t.forEach(e=>{const t=s.basename(e.fsPath)
;this.globalExcludePattern&&this.globalExcludePattern(e.fsPath,t)||this.matchFile(r,{relativePath:e.fsPath,basename:t})}),this.cmdSW=d.StopWatch.create(!1),this.parallel(e,(e,t)=>{this.call(this.cmdTraversal,this,e,r,n,e=>{if(e){const r=a.toErrorMessage(e);console.error(r),this.errors.push(r),t(e,void 0)}else t(null,void 0)})},(e,t)=>{this.fileWalkSW.stop();const r=e?o.coalesce(e)[0]:null;i(r,this.isLimitHit)})}parallel(e,t,r){const n=new Array(e.length),s=new Array(e.length);let i=!1,o=0;if(0===e.length)return r(null,[]);e.forEach((a,c)=>{t(a,(t,a)=>{if(t?(i=!0,n[c]=null,s[c]=t):(n[c]=a,s[c]=null),++o===e.length)return r(i?s:null,n)})})}call(e,t,...r){try{e.apply(t,r)}catch(e){r[r.length-1](e)}}cmdTraversal(e,t,r,n){const i=e.folder.fsPath,o=f.isMacintosh;let a;const c=()=>a&&a.kill();b.add(c);let u=e=>{b.delete(c),u=(()=>{}),n(e)},h="";const d=this.initDirectoryTree();let p;const m=v.spawnRipgrepCmd(this.config,e,this.config.includePattern,this.folderExcludePatterns.get(e.folder.fsPath).expression);a=m.cmd,
p=!Object.keys(m.siblingClauses).length;let g=`rg ${m.rgArgs.args.map(e=>e.match(/^-/)?e:`'${e}'`).join(" ")}\n - cwd: ${m.cwd}`;m.rgArgs.siblingClauses&&(g+=`\n - Sibling clauses: ${JSON.stringify(m.rgArgs.siblingClauses)}`),r({message:g}),this.cmdResultCount=0,this.collectStdout(a,"utf8",r,(e,r,n)=>{if(e)return void u(e);if(this.isLimitHit)return void u();const a=(h+(o?l.normalizeNFC(r||""):r)).split("\n");if(n){const e=a.length;a[e-1]=a[e-1].trim(),a[e-1]||a.pop()}else h=a.pop()||"";if(a.length&&-1!==a[0].indexOf("\n"))u(new Error("Splitting up files failed"));else if(this.cmdResultCount+=a.length,p){for(const e of a){const r=s.basename(e);if(this.matchFile(t,{base:i,relativePath:e,basename:r}),this.isLimitHit){c();break}}(n||this.isLimitHit)&&u()}else this.addDirectoryEntries(d,i,a,t),n&&(this.matchDirectoryTree(d,i,t),u())})}spawnFindCmd(e){const t=this.folderExcludePatterns.get(e.folder.fsPath),n=t.getBasenameTerms(),s=t.getPathTerms(),i=["-L","."];if(n.length||s.length){i.push("-not","(","(")
;for(const e of n)i.push("-name",e),i.push("-o");for(const e of s)i.push("-path",e),i.push("-o");i.pop(),i.push(")","-prune",")")}return i.push("-type","f"),r.spawn("find",i,{cwd:e.folder.fsPath})}readStdout(e,t,r){let n="";this.collectStdout(e,t,()=>{},(e,t,s)=>{e?r(e):(n+=t,s&&r(null,n))})}collectStdout(e,t,r,n){let s=(e,t,r)=>{(e||r)&&(s=(()=>{}),this.cmdSW&&this.cmdSW.stop()),n(e,t,r)},i=!1;e.stdout?(this.forwardData(e.stdout,t,s),e.stdout.once("data",()=>i=!0)):r({message:"stdout is null"});let o;e.stderr?o=this.collectData(e.stderr):r({message:"stderr is null"}),e.on("error",e=>{s(e)}),e.on("close",e=>{let r;!i&&(r=this.decodeData(o,t))&&y(r)?s(new Error(`command failed with error code ${e}: ${this.decodeData(o,t)}`)):(this.exists&&0===e&&(this.isLimitHit=!0),s(null,"",!0))})}forwardData(e,t,r){const n=new i.StringDecoder(t);return e.on("data",e=>{r(null,n.write(e))}),n}collectData(e){const t=[];return e.on("data",e=>{t.push(e)}),t}decodeData(e,t){const r=new i.StringDecoder(t)
;return e.map(e=>r.write(e)).join("")}initDirectoryTree(){const e={rootEntries:[],pathToEntries:Object.create(null)};return e.pathToEntries["."]=e.rootEntries,e}addDirectoryEntries({pathToEntries:e},t,r,n){function i(r){const n=s.basename(r),o=s.dirname(r);let a=e[o];a||(a=e[o]=[],i(o)),a.push({base:t,relativePath:r,basename:n})}if(-1!==r.indexOf(this.filePattern)){const e=s.basename(this.filePattern);this.matchFile(n,{base:t,relativePath:this.filePattern,basename:e})}r.forEach(i)}matchDirectoryTree({rootEntries:e,pathToEntries:t},r,n){function s(e){i.directoriesWalked++;const r=c.hasSiblingFn(()=>e.map(e=>e.basename));for(let c=0,l=e.length;c<l;c++){const l=e[c],{relativePath:u,basename:h}=l;if(o.test(u,h,a!==h?r:void 0))continue;const f=t[u];if(f)s(f);else{if(i.filesWalked++,u===a)continue;i.matchFile(n,l)}if(i.isLimitHit)break}}const i=this,o=this.folderExcludePatterns.get(r),a=this.filePattern;s(e)}getStats(){return{cmdTime:this.cmdSW&&this.cmdSW.elapsed(),fileWalkTime:this.fileWalkSW.elapsed(),
directoriesWalked:this.directoriesWalked,filesWalked:this.filesWalked,cmdResultCount:this.cmdResultCount}}doWalk(e,t,r,i,a){const l=e.folder,u=c.hasSiblingFn(()=>r);this.parallel(r,(r,o)=>{if(this.isCanceled||this.isLimitHit)return o(null);const a=t?[t,r].join(s.sep):r;if(this.folderExcludePatterns.get(e.folder.fsPath).test(a,r,this.config.filePattern!==r?u:void 0))return o(null);const c=[l.fsPath,a].join(s.sep);n.lstat(c,(t,n)=>{if(t||this.isCanceled||this.isLimitHit)return o(null);this.statLinkIfNeeded(c,n,(t,s)=>t||this.isCanceled||this.isLimitHit?o(null):s.isDirectory()?(this.directoriesWalked++,this.realPathIfNeeded(c,n,(t,r)=>t||this.isCanceled||this.isLimitHit?o(null):(r=r||"",this.walkedPaths[r]?o(null):(this.walkedPaths[r]=!0,g.readdir(c).then(t=>{if(this.isCanceled||this.isLimitHit)return o(null);this.doWalk(e,a,t,i,e=>o(e||null))},e=>{o(null)}))))):(this.filesWalked++,a===this.filePattern?o(null,void 0):this.maxFilesize&&m.isNumber(s.size)&&s.size>this.maxFilesize?o(null,void 0):(this.matchFile(i,{
base:l.fsPath,relativePath:a,basename:r,size:s.size}),o(null,void 0))))})},e=>(e&&(e=o.coalesce(e)),a(e&&e.length>0?e[0]:void 0)))}matchFile(e,t){!this.isFilePatternMatch(t.relativePath)||this.includePattern&&!this.includePattern(t.relativePath,t.basename)||(this.resultCount++,(this.exists||this.maxResults&&this.resultCount>this.maxResults)&&(this.isLimitHit=!0),this.isLimitHit||e(t))}isFilePatternMatch(e){return!this.filePattern||("*"===this.filePattern||p.fuzzyContains(e,this.normalizedFilePatternLowercase))}statLinkIfNeeded(e,t,r){return t.isSymbolicLink()?n.stat(e,r):r(null,t)}realPathIfNeeded(e,t,r){return t.isSymbolicLink()?n.realpath(e,(e,t)=>e?r(e):r(null,t)):r(null,e)}}t.FileWalker=_;class C{constructor(e){this.folderQueries=e.folderQueries,this.extraFiles=e.extraFileResources||[],this.walker=new _(e)}search(e,t,r){this.walker.walk(this.folderQueries,this.extraFiles,e,t,(e,t)=>{r(e,{limitHit:t,stats:this.walker.getStats()})})}cancel(){this.walker.cancel()}}t.Engine=C;class x{constructor(e,t){
this.expression=e,this.root=t,this.init(e)}init(e){let t,r;Object.keys(e).filter(t=>e[t]).forEach(n=>{s.isAbsolute(n)?(t=t||c.getEmptyExpression())[n]=e[n]:(r=r||c.getEmptyExpression())[n]=e[n]}),this.absoluteParsedExpr=t&&c.parse(t,{trimForExclusions:!0}),this.relativeParsedExpr=r&&c.parse(r,{trimForExclusions:!0})}test(e,t,r){return this.relativeParsedExpr&&this.relativeParsedExpr(e,t,r)||this.absoluteParsedExpr&&this.absoluteParsedExpr(s.join(this.root,e),t,r)}getBasenameTerms(){const e=[];return this.absoluteParsedExpr&&e.push(...c.getBasenameTerms(this.absoluteParsedExpr)),this.relativeParsedExpr&&e.push(...c.getBasenameTerms(this.relativeParsedExpr)),e}getPathTerms(){const e=[];return this.absoluteParsedExpr&&e.push(...c.getPathTerms(this.absoluteParsedExpr)),this.relativeParsedExpr&&e.push(...c.getPathTerms(this.relativeParsedExpr)),e}}t.rgErrorMsgForDisplay=y}),define(e[41],t([0,1,16,66,4,33,2,8,22,63,35,6,15,48,34]),function(e,t,r,n,s,i,o,a,c,l,u,h,f,d,p){"use strict";function m(e){
const t=e.split("\n")[0].trim();if(o.startsWith(t,"regex parse error"))return new c.SearchError("Regex parse error",c.SearchErrorCode.regexParseError);const r=t.match(/grep config error: unknown encoding: (.*)/);return r?new c.SearchError(`Unknown encoding: ${r[1]}`,c.SearchErrorCode.unknownEncoding):o.startsWith(t,"error parsing glob")?new c.SearchError(t.charAt(0).toUpperCase()+t.substr(1),c.SearchErrorCode.globParseError):o.startsWith(t,"the literal")?new c.SearchError(t.charAt(0).toUpperCase()+t.substr(1),c.SearchErrorCode.invalidLiteral):o.startsWith(t,"PCRE2: error compiling pattern")?new c.SearchError(t,c.SearchErrorCode.regexParseError):void 0}function g(e){return e.bytes?Buffer.from(e.bytes,"base64").toString():e.text}function v(e){const t=f.splitGlobAware(e,"/");return"**"!==t[t.length-1]&&t.push("**"),t.map((e,r)=>t.slice(0,r+1).join("/"))}function w(e){const t=/((?:[^\\]|^)(?:\\\\)*)\\u([a-z0-9]{4})(?!\d)/g;for(;e.match(t);)e=e.replace(t,"$1\\x{$2}");return e}function y(e){
return e.match(/([^\\]|^)(\\\\)*\$$/)?e.replace(/\$$/,"\\r?$"):e}function b(e){return e.replace(/([^\\]|^)(\\\\)*\\n/g,"$1$2\\r?\\n")}function _(e,t){return t?e.replace(/([^\\]|^)((?:\\\\)*)\\s/g,"$1$2(\\r?\\n|[^\\S\\r])"):e.replace(/([^\\]|^)((?:\\\\)*)\\s/g,"$1$2[ \\t\\f]")}function C(e,t){return t?e.replace(/([^\\]|^)((?:\\\\)*)\\W/g,"$1$2(\\r?\\n|[^\\w\\r])"):e.replace(/([^\\]|^)((?:\\\\)*)\\W/g,"$1$2[^\\w\\r]")}function x(e){return e.replace(/\n/g,"\\r?\\n")}Object.defineProperty(t,"__esModule",{value:!0});const E=l.rgPath.replace(/\bnode_modules\.asar\b/,"node_modules.asar.unpacked");class P{constructor(e){this.outputChannel=e}provideTextSearchResults(e,t,n,s){return this.outputChannel.appendLine(`provideTextSearchResults ${e.pattern}, ${JSON.stringify(Object.assign({},t,{folder:t.folder.toString()}))}`),new Promise((i,a)=>{s.onCancellationRequested(()=>L());const l=function(e,t){const r=["--hidden"];r.push(e.isCaseSensitive?"--case-sensitive":"--ignore-case")
;const{doubleStarIncludes:n,otherIncludes:s}=d.groupBy(t.includes,e=>o.startsWith(e,"**")?"doubleStarIncludes":"otherIncludes");if(s&&s.length){const e=new Set;s.forEach(t=>{o.endsWith(t,"/**")||(t+="/**"),e.add(t)}),r.push("-g","!*"),e.forEach(e=>{v(e).map(u.anchorGlob).forEach(e=>{r.push("-g",e)})})}n&&n.length&&n.forEach(e=>{r.push("-g",e)}),t.excludes.map(u.anchorGlob).forEach(e=>r.push("-g",`!${e}`)),t.maxFileSize&&r.push("--max-filesize",t.maxFileSize+""),t.useIgnoreFiles?r.push("--no-ignore-parent"):r.push("--no-ignore"),t.followSymlinks&&r.push("--follow"),t.encoding&&"utf8"!==t.encoding&&r.push("--encoding",t.encoding);let i=e.pattern;"--"===i&&(e.isRegExp=!0,i="\\-\\-"),e.isMultiline&&!e.isRegExp&&(e.pattern=o.escapeRegExpCharacters(e.pattern),e.isRegExp=!0),t.usePCRE2&&(r.push("--pcre2"),e.isRegExp&&(i=w(i)));let a;if(e.isWordMatch){const t=o.createRegExp(i,!!e.isRegExp,{wholeWord:e.isWordMatch}).source.replace(/\\\//g,"/");r.push("--regexp",t)}else if(e.isRegExp){let t=y(e.pattern)
;t=_(t=C(t=x(t=b(t)),!!e.isMultiline),!!e.isMultiline),r.push("--regexp",t)}else a=i,r.push("--fixed-strings");return r.push("--no-config"),t.useGlobalIgnoreFiles||r.push("--no-ignore-global"),r.push("--json"),e.isMultiline&&r.push("--multiline"),t.beforeContext&&r.push("--before-context",t.beforeContext+""),t.afterContext&&r.push("--after-context",t.afterContext+""),r.push("--"),a&&r.push(a),r.push("."),r}(e,t),h=t.folder.fsPath,f=l.map(e=>e.match(/^-/)?e:`'${e}'`).join(" ");this.outputChannel.appendLine(`rg ${f}\n - cwd: ${h}`);let p=r.spawn(E,l,{cwd:h});p.on("error",e=>{console.error(e),this.outputChannel.appendLine("Error: "+(e&&e.message)),a(c.serializeSearchError(new c.SearchError(e&&e.message,c.SearchErrorCode.rgProcessError)))});let g=!1;const P=new S(t.maxResults,h,t.previewOptions);P.on("result",e=>{g=!0,n.report(e)});let A=!1;const L=()=>{A=!0,p&&p.kill(),P&&P.cancel()};let R=!1;P.on("hitLimit",()=>{R=!0,L()}),p.stdout.on("data",e=>{P.handleData(e)});let D=!1;p.stdout.once("data",()=>D=!0);let k=""
;p.stderr.on("data",e=>{const t=e.toString();this.outputChannel.appendLine(t),k+=t}),p.on("close",()=>{if(this.outputChannel.appendLine(D?"Got data from stdout":"No data from stdout"),this.outputChannel.appendLine(g?"Got result from parser":"No result from parser"),this.outputChannel.appendLine(""),A)i({limitHit:R});else{P.flush(),p=null;let e;k&&!D&&(e=m(k))?a(c.serializeSearchError(new c.SearchError(e.message,e.code))):i({limitHit:R})}})})}}t.RipgrepTextSearchEngine=P,t.rgErrorMsgForDisplay=m;class S extends n.EventEmitter{constructor(e,t,r){super(),this.maxResults=e,this.rootFolder=t,this.previewOptions=r,this.remainder="",this.isDone=!1,this.hitLimit=!1,this.numResults=0,this.stringDecoder=new i.StringDecoder}cancel(){this.isDone=!0}flush(){this.handleDecodedData(this.stringDecoder.end())}on(e,t){return super.on(e,t),this}handleData(e){if(this.isDone)return;const t="string"==typeof e?e:this.stringDecoder.write(e);this.handleDecodedData(t)}handleDecodedData(e){let t=e.indexOf("\n");const r=this.remainder+e
;if(!(t>=0))return void(this.remainder=r);t+=this.remainder.length;let n=0;for(;t>=0;)this.handleLine(r.substring(n,t).trim()),n=t+1,t=r.indexOf("\n",n);this.remainder=r.substring(n).trim()}handleLine(e){if(this.isDone||!e)return;let t;try{t=JSON.parse(e)}catch(t){throw new Error(`malformed line from rg: ${e}`)}if("match"===t.type){const e=g(t.data.path),r=a.URI.file(s.join(this.rootFolder,e)),n=this.createTextSearchMatch(t.data,r);this.onResult(n),this.hitLimit&&(this.cancel(),this.emit("hitLimit"))}else if("context"===t.type){const e=g(t.data.path),r=a.URI.file(s.join(this.rootFolder,e));this.createTextSearchContext(t.data,r).forEach(e=>this.onResult(e))}}createTextSearchMatch(e,t){const r=e.line_number-1;let n=!1,s=g(e.lines);0===r&&o.startsWithUTF8BOM(s)&&(n=!0,s=o.stripUTF8BOM(s));const i=Buffer.from(s);let a=0,c=0,l=r;const f=h.coalesce(e.submatches.map((e,t)=>{if(this.hitLimit)return null;this.numResults++,this.numResults>=this.maxResults&&(this.hitLimit=!0);let s=g(e.match)
;0===r&&0===t&&n&&(s=o.stripUTF8BOM(s),e.start=e.start<=3?0:e.start-3,e.end=e.end<=3?0:e.end-3);const u=i.slice(a,e.start).toString().length;let h=c+u;const f=function(e){const t=/\n/g;let r,n=0,s=-1;for(;r=t.exec(e);)n++,s=r.index;return{numLines:n,lastLineLength:s>=0?e.length-s-1:e.length}}(s),d=l,m=f.numLines+d;let v=f.numLines>0?f.lastLineLength:f.lastLineLength+h;return a=e.end,c=v,l=m,new p.Range(d,h,m,v)}));return u.createTextSearchResult(t,s,f,this.previewOptions)}createTextSearchContext(e,t){const r=g(e.lines),n=e.line_number;return r.replace(/\r?\n$/,"").split("\n").map((e,r)=>({text:e,uri:t,lineNumber:n+r}))}onResult(e){this.emit("result",e)}}t.RipgrepParser=S,t.spreadGlobComponents=v,t.unicodeEscapesToPCRE2=w,t.fixRegexEndingPattern=y,t.fixRegexNewline=b,t.fixRegexCRMatchingWhitespaceClass=_,t.fixRegexCRMatchingNonWordClass=C,t.fixNewline=x}),define(e[38],t([0,1,18,41,61]),function(e,t,r,n,s){"use strict";function i(e){return{path:e.resource&&e.resource.fsPath,results:e.results,
numMatches:(e.results||[]).reduce((e,t)=>{if(t.ranges){const r=t;return e+(Array.isArray(r.ranges)?r.ranges.length:1)}return e+1},0)}}Object.defineProperty(t,"__esModule",{value:!0});class o{constructor(e){this.query=e}search(e,t,o){if(!(this.query.folderQueries&&this.query.folderQueries.length||this.query.extraFileResources&&this.query.extraFileResources.length))return Promise.resolve({type:"success",limitHit:!1,stats:{type:"searchProcess"}});const a={appendLine(e){o({message:e})}},c=new s.TextSearchManager(this.query,new n.RipgrepTextSearchEngine(a),r);return new Promise((r,n)=>c.search(e=>{t(e.map(i))},e).then(e=>r({limitHit:e.limitHit,type:"success"}),n))}}t.TextSearchEngineAdapter=o}),define(e[36],t([0,1,20,69,4,6,12,9,5,10,24,2,8,27,18,64,38]),function(e,t,r,n,s,i,o,a,c,l,u,h,f,d,p,m,g){"use strict";function v(e){return Object.assign({},e,{folderQueries:e.folderQueries&&e.folderQueries.map(w),extraFileResources:e.extraFileResources&&e.extraFileResources.map(e=>f.URI.revive(e))})}function w(e){
return Object.assign({},e,{folder:f.URI.revive(e.folder)})}Object.defineProperty(t,"__esModule",{value:!0}),n.gracefulify(r);class y{constructor(){this.caches=Object.create(null)}fileSearch(e){let t;const r=v(e),n=new c.Emitter({onFirstListenerDidAdd:()=>{(t=o.createCancelablePromise(e=>this.doFileSearchWithEngine(m.Engine,r,e=>n.fire(e),e))).then(e=>n.fire(e),e=>n.fire({type:"error",error:{message:e.message,stack:e.stack}}))},onLastListenerRemove:()=>{t.cancel()}});return n.event}textSearch(e){let t;const r=v(e),n=new c.Emitter({onFirstListenerDidAdd:()=>{(t=o.createCancelablePromise(e=>this.ripgrepTextSearch(r,e=>n.fire(e),e))).then(e=>n.fire(e),e=>n.fire({type:"error",error:{message:e.message,stack:e.stack}}))},onLastListenerRemove:()=>{t.cancel()}});return n.event}ripgrepTextSearch(e,t,r){e.maxFileSize=p.MAX_FILE_SIZE;return new g.TextSearchEngineAdapter(e).search(r,t,t)}doFileSearch(e,t,r){return this.doFileSearchWithEngine(m.Engine,e,t,r)}doFileSearchWithEngine(e,t,r,n,s=y.BATCH_SIZE){let i=0
;const o=e=>{Array.isArray(e)?(i+=e.length,r(e.map(e=>this.rawMatchToSearchItem(e)))):e.relativePath?(i++,r(this.rawMatchToSearchItem(e))):r(e)};if(t.sortByScore){let i=this.trySortedSearchFromCache(t,o,n);if(!i){const s=new e(t.maxResults?l.assign({},t,{maxResults:null}):t);i=this.doSortedSearch(s,t,r,o,n)}return new Promise((e,t)=>{i.then(([t,n])=>{const i=n.map(e=>this.rawMatchToSearchItem(e));this.sendProgress(i,r,s),e(t)},t)})}const a=new e(t);return this.doSearch(a,o,s,n).then(e=>({limitHit:e.limitHit,type:"success",stats:{detailStats:e.stats,type:"searchProcess",fromCache:!1,resultCount:i,sortingTime:void 0}}))}rawMatchToSearchItem(e){return{path:e.base?s.join(e.base,e.relativePath):e.relativePath}}doSortedSearch(e,t,r,n,s){const i=new c.Emitter;let a,l=o.createCancelablePromise(t=>{let r=[];return this.doSearch(e,e=>{Array.isArray(e)?r=e:(n(e),i.fire(e))},-1,t).then(e=>[e,r])});if(t.cacheKey){a=this.getOrCreateCache(t.cacheKey);const e={promise:l,event:i.event,resolved:!1}
;a.resultsToSearchCache[t.filePattern||""]=e,l.then(()=>{e.resolved=!0},e=>{delete a.resultsToSearchCache[t.filePattern||""]}),l=this.preventCancellation(l)}return l.then(([e,r])=>{const n=a?a.scorerCache:Object.create(null),i=("number"!=typeof t.maxResults||t.maxResults>0)&&u.StopWatch.create(!1);return this.sortResults(t,r,n,s).then(n=>{const s=i?i.elapsed():-1;return[{type:"success",stats:{detailStats:e.stats,sortingTime:s,fromCache:!1,type:"searchProcess",workspaceFolderCount:t.folderQueries.length,resultCount:n.length},limitHit:e.limitHit||"number"==typeof t.maxResults&&r.length>t.maxResults},n]})})}getOrCreateCache(e){const t=this.caches[e];return t||(this.caches[e]=new b)}trySortedSearchFromCache(e,t,r){const n=e.cacheKey&&this.caches[e.cacheKey];if(!n)return;const s=this.getResultsFromCache(n,e.filePattern||"",t,r);return s?s.then(([t,s,i])=>{const o=u.StopWatch.create(!1);return this.sortResults(e,s,n.scorerCache,r).then(r=>{const n=o.elapsed(),a={fromCache:!0,detailStats:i,type:"searchProcess",
resultCount:s.length,sortingTime:n};return[{type:"success",limitHit:t.limitHit||"number"==typeof e.maxResults&&s.length>e.maxResults,stats:a},r]})}):void 0}sortResults(e,t,r,n){const s=d.prepareQuery(e.filePattern||""),o=e.maxResults||Number.MAX_VALUE;return i.topAsync(t,(e,t)=>d.compareItemsByScore(e,t,s,!0,_,r),o,1e4,n)}sendProgress(e,t,r){if(r&&r>0)for(let n=0;n<e.length;n+=r)t(e.slice(n,n+r));else t(e)}getResultsFromCache(e,t,r,n){const i=u.StopWatch.create(!1),o=t.indexOf(s.sep)>=0;let c;for(const r in e.resultsToSearchCache)if(h.startsWith(t,r)){if(o&&r.indexOf(s.sep)<0)continue;const t=e.resultsToSearchCache[r];c={promise:this.preventCancellation(t.promise),event:t.event,resolved:t.resolved};break}if(!c)return null;const l=i.elapsed(),f=u.StopWatch.create(!1),p=c.event(r);return n&&n.onCancellationRequested(()=>{p.dispose()}),c.promise.then(([e,r])=>{if(n&&n.isCancellationRequested)throw a.canceled();const s=[],i=d.prepareQuery(t).lowercase;for(const e of r)h.fuzzyContains(e.relativePath,i)&&s.push(e)
;return[e,s,{cacheWasResolved:c.resolved,cacheLookupTime:l,cacheFilterTime:f.elapsed(),cacheEntryCount:r.length}]})}doSearch(e,t,r,n){return new Promise((s,i)=>{let o=[];n&&n.onCancellationRequested(()=>e.cancel()),e.search(e=>{e&&(r?(o.push(e),r>0&&o.length>=r&&(t(o),o=[])):t(e))},e=>{t(e)},(e,r)=>{o.length&&t(o),e?i(e):s(r)})})}clearCache(e){return delete this.caches[e],Promise.resolve(void 0)}preventCancellation(e){return new class{cancel(){}then(t,r){return e.then(t,r)}catch(e){return this.then(void 0,e)}finally(t){return e.finally(t)}}}}y.BATCH_SIZE=512,t.SearchService=y;class b{constructor(){this.resultsToSearchCache=Object.create(null),this.scorerCache=Object.create(null)}}const _=new class{getItemLabel(e){return e.basename}getItemDescription(e){return e.relativePath.substr(0,e.relativePath.length-e.basename.length-1)}getItemPath(e){return e.relativePath}}}),define(e[70],t([0,1,51,60,36]),function(e,t,r,n,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0})
;const i=new r.Server("search"),o=new s.SearchService,a=new n.SearchChannel(o);i.registerChannel("search",a)})}).call(this);
//# sourceMappingURL=https://ticino.blob.core.windows.net/sourcemaps/0f3794b38477eea13fb47fbe15a42798e6129338/core/vs/workbench/services/search/node/searchApp.js.map
