UNPKG

code-server

Version:

Run VS Code on a remote server.

26 lines (18 loc) • 239 kB
"use strict";/*!-------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/var je=function(e,t){return je=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},je(e,t)};export function __extends(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");je(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}export var __assign=function(){return __assign=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},__assign.apply(this,arguments)};export function __rest(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}export function __decorate(e,t,n,r){var i=arguments.length,s=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,n,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}export function __param(e,t){return function(n,r){t(n,r,e)}}export function __esDecorate(e,t,n,r,i,s){function o(w){if(w!==void 0&&typeof w!="function")throw new TypeError("Function expected");return w}for(var l=r.kind,a=l==="getter"?"get":l==="setter"?"set":"value",u=!t&&e?r.static?e:e.prototype:null,c=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),h,f=!1,g=n.length-1;g>=0;g--){var m={};for(var p in r)m[p]=p==="access"?{}:r[p];for(var p in r.access)m.access[p]=r.access[p];m.addInitializer=function(w){if(f)throw new TypeError("Cannot add initializers after decoration has completed");s.push(o(w||null))};var d=(0,n[g])(l==="accessor"?{get:c.get,set:c.set}:c[a],m);if(l==="accessor"){if(d===void 0)continue;if(d===null||typeof d!="object")throw new TypeError("Object expected");(h=o(d.get))&&(c.get=h),(h=o(d.set))&&(c.set=h),(h=o(d.init))&&i.unshift(h)}else(h=o(d))&&(l==="field"?i.unshift(h):c[a]=h)}u&&Object.defineProperty(u,r.name,c),f=!0}export function __runInitializers(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e);return r?n:void 0}export function __propKey(e){return typeof e=="symbol"?e:"".concat(e)}export function __setFunctionName(e,t,n){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}export function __metadata(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}export function __awaiter(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function l(c){try{u(r.next(c))}catch(h){o(h)}}function a(c){try{u(r.throw(c))}catch(h){o(h)}}function u(c){c.done?s(c.value):i(c.value).then(l,a)}u((r=r.apply(e,t||[])).next())})}export function __generator(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(u){return function(c){return a([u,c])}}function a(u){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){n.label=u[1];break}if(u[0]===6&&n.label<s[1]){n.label=s[1],s=u;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(u);break}s[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(c){u=[6,c],i=0}finally{r=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}export var __createBinding=Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]};export function __exportStar(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&__createBinding(t,e,n)}export function __values(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}export function __read(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s}export function __spread(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(arguments[t]));return e}export function __spreadArrays(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var s=arguments[t],o=0,l=s.length;o<l;o++,i++)r[i]=s[o];return r}export function __spreadArray(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}export function __await(e){return this instanceof __await?(this.v=e,this):new __await(e)}export function __asyncGenerator(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,s=[];return i={},l("next"),l("throw"),l("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(g){return function(m){return Promise.resolve(m).then(g,h)}}function l(g,m){r[g]&&(i[g]=function(p){return new Promise(function(d,w){s.push([g,p,d,w])>1||a(g,p)})},m&&(i[g]=m(i[g])))}function a(g,m){try{u(r[g](m))}catch(p){f(s[0][3],p)}}function u(g){g.value instanceof __await?Promise.resolve(g.value.v).then(c,h):f(s[0][2],g)}function c(g){a("next",g)}function h(g){a("throw",g)}function f(g,m){g(m),s.shift(),s.length&&a(s[0][0],s[0][1])}}export function __asyncDelegator(e){var t,n;return t={},r("next"),r("throw",function(i){throw i}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(i,s){t[i]=e[i]?function(o){return(n=!n)?{value:__await(e[i](o)),done:!1}:s?s(o):o}:s}}export function __asyncValues(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof __values=="function"?__values(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(s){n[s]=e[s]&&function(o){return new Promise(function(l,a){o=e[s](o),i(l,a,o.done,o.value)})}}function i(s,o,l,a){Promise.resolve(a).then(function(u){s({value:u,done:l})},o)}}export function __makeTemplateObject(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var yi=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};export function __importStar(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&__createBinding(t,e,n);return yi(t,e),t}export function __importDefault(e){return e&&e.__esModule?e:{default:e}}export function __classPrivateFieldGet(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}export function __classPrivateFieldSet(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n}export function __classPrivateFieldIn(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}export function __addDisposableResource(e,t,n){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var r,i;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(r===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(i=r)}if(typeof r!="function")throw new TypeError("Object not disposable.");i&&(r=function(){try{i.call(this)}catch(s){return Promise.reject(s)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var Ai=typeof SuppressedError=="function"?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};export function __disposeResources(e){function t(r){e.error=e.hasError?new Ai(r,e.error,"An error was suppressed during disposal."):r,e.hasError=!0}function n(){for(;e.stack.length;){var r=e.stack.pop();try{var i=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(i).then(n,function(s){return t(s),n()})}catch(s){t(s)}}if(e.hasError)throw e.error}return n()}export default{__extends,__assign,__rest,__decorate,__param,__metadata,__awaiter,__generator,__createBinding,__exportStar,__values,__read,__spread,__spreadArrays,__spreadArray,__await,__asyncGenerator,__asyncDelegator,__asyncValues,__makeTemplateObject,__importStar,__importDefault,__classPrivateFieldGet,__classPrivateFieldSet,__classPrivateFieldIn,__addDisposableResource,__disposeResources};var xi=class{constructor(){this.b=[],this.a=function(e){setTimeout(()=>{throw e.stack?Be.isErrorNoTelemetry(e)?new Be(e.message+` `+e.stack):new Error(e.message+` `+e.stack):e},0)}}addListener(e){return this.b.push(e),()=>{this.d(e)}}c(e){this.b.forEach(t=>{t(e)})}d(e){this.b.splice(this.b.indexOf(e),1)}setUnexpectedErrorHandler(e){this.a=e}getUnexpectedErrorHandler(){return this.a}onUnexpectedError(e){this.a(e),this.c(e)}onUnexpectedExternalError(e){this.a(e)}},Ni=new xi;function fe(e){Ei(e)||Ni.onUnexpectedError(e)}function ze(e){if(e instanceof Error){const{name:t,message:n,cause:r}=e,i=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:i,noTelemetry:Be.isErrorNoTelemetry(e),cause:r?ze(r):void 0,code:e.code}}return e}var Te="Canceled";function Ei(e){return e instanceof Ii?!0:e instanceof Error&&e.name===Te&&e.message===Te}var Ii=class extends Error{constructor(){super(Te),this.name=this.message}};function Si(e){return e?new Error(`Illegal state: ${e}`):new Error("Illegal state")}var Be=class U1 extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof U1)return t;const n=new U1;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},W1;function $i(e,t){const n=Object.create(null);for(const r of e){const i=t(r);let s=n[i];s||(s=n[i]=[]),s.push(r)}return n}var sl=class{static{W1=Symbol.toStringTag}constructor(e,t){this.b=t,this.a=new Map,this[W1]="SetWithKey";for(const n of e)this.add(n)}get size(){return this.a.size}add(e){const t=this.b(e);return this.a.set(t,e),this}delete(e){return this.a.delete(this.b(e))}has(e){return this.a.has(this.b(e))}*entries(){for(const e of this.a.values())yield[e,e]}keys(){return this.values()}*values(){for(const e of this.a.values())yield e}clear(){this.a.clear()}forEach(e,t){this.a.forEach(n=>e.call(t,n,n,this))}[Symbol.iterator](){return this.values()}};function Oi(e,t){const n=this;let r=!1,i;return function(){if(r)return i;if(r=!0,t)try{i=e.apply(n,arguments)}finally{t()}else i=e.apply(n,arguments);return i}}function _i(e,t,n=0,r=e.length){let i=n,s=r;for(;i<s;){const o=Math.floor((i+s)/2);t(e[o])?i=o+1:s=o}return i-1}var ol=class Zr{static{this.assertInvariants=!1}constructor(t){this.e=t,this.c=0}findLastMonotonous(t){if(Zr.assertInvariants){if(this.d){for(const r of this.e)if(this.d(r)&&!t(r))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this.d=t}const n=_i(this.e,t,this.c);return this.c=n+1,n===-1?void 0:this.e[n]}},Ve;(function(e){function t(s){return s<0}e.isLessThan=t;function n(s){return s<=0}e.isLessThanOrEqual=n;function r(s){return s>0}e.isGreaterThan=r;function i(s){return s===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(Ve||(Ve={}));function Mi(e,t){return(n,r)=>t(e(n),e(r))}var Di=(e,t)=>e-t,ll=class Re{static{this.empty=new Re(t=>{})}constructor(t){this.iterate=t}forEach(t){this.iterate(n=>(t(n),!0))}toArray(){const t=[];return this.iterate(n=>(t.push(n),!0)),t}filter(t){return new Re(n=>this.iterate(r=>t(r)?n(r):!0))}map(t){return new Re(n=>this.iterate(r=>n(t(r))))}some(t){let n=!1;return this.iterate(r=>(n=t(r),!n)),n}findFirst(t){let n;return this.iterate(r=>t(r)?(n=r,!1):!0),n}findLast(t){let n;return this.iterate(r=>(t(r)&&(n=r),!0)),n}findLastMaxBy(t){let n,r=!0;return this.iterate(i=>((r||Ve.isGreaterThan(t(i,n)))&&(r=!1,n=i),!0)),n}},H1,G1,J1,Ri=class{constructor(e,t){this.uri=e,this.value=t}};function Pi(e){return Array.isArray(e)}var We=class ie{static{this.c=t=>t.toString()}constructor(t,n){if(this[H1]="ResourceMap",t instanceof ie)this.d=new Map(t.d),this.e=n??ie.c;else if(Pi(t)){this.d=new Map,this.e=n??ie.c;for(const[r,i]of t)this.set(r,i)}else this.d=new Map,this.e=t??ie.c}set(t,n){return this.d.set(this.e(t),new Ri(t,n)),this}get(t){return this.d.get(this.e(t))?.value}has(t){return this.d.has(this.e(t))}get size(){return this.d.size}clear(){this.d.clear()}delete(t){return this.d.delete(this.e(t))}forEach(t,n){typeof n<"u"&&(t=t.bind(n));for(const[r,i]of this.d)t(i.value,i.uri,this)}*values(){for(const t of this.d.values())yield t.value}*keys(){for(const t of this.d.values())yield t.uri}*entries(){for(const t of this.d.values())yield[t.uri,t.value]}*[(H1=Symbol.toStringTag,Symbol.iterator)](){for(const[,t]of this.d)yield[t.uri,t.value]}},al=class{constructor(e,t){this[G1]="ResourceSet",!e||typeof e=="function"?this.c=new We(e):(this.c=new We(t),e.forEach(this.add,this))}get size(){return this.c.size}add(e){return this.c.set(e,e),this}clear(){this.c.clear()}delete(e){return this.c.delete(e)}forEach(e,t){this.c.forEach((n,r)=>e.call(t,r,r,this))}has(e){return this.c.has(e)}entries(){return this.c.entries()}keys(){return this.c.keys()}values(){return this.c.keys()}[(G1=Symbol.toStringTag,Symbol.iterator)](){return this.keys()}},K1;(function(e){e[e.None=0]="None",e[e.AsOld=1]="AsOld",e[e.AsNew=2]="AsNew"})(K1||(K1={}));var ki=class{constructor(){this[J1]="LinkedMap",this.c=new Map,this.d=void 0,this.e=void 0,this.f=0,this.g=0}clear(){this.c.clear(),this.d=void 0,this.e=void 0,this.f=0,this.g++}isEmpty(){return!this.d&&!this.e}get size(){return this.f}get first(){return this.d?.value}get last(){return this.e?.value}has(e){return this.c.has(e)}get(e,t=0){const n=this.c.get(e);if(n)return t!==0&&this.n(n,t),n.value}set(e,t,n=0){let r=this.c.get(e);if(r)r.value=t,n!==0&&this.n(r,n);else{switch(r={key:e,value:t,next:void 0,previous:void 0},n){case 0:this.l(r);break;case 1:this.k(r);break;case 2:this.l(r);break;default:this.l(r);break}this.c.set(e,r),this.f++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this.c.get(e);if(t)return this.c.delete(e),this.m(t),this.f--,t.value}shift(){if(!this.d&&!this.e)return;if(!this.d||!this.e)throw new Error("Invalid list");const e=this.d;return this.c.delete(e.key),this.m(e),this.f--,e.value}forEach(e,t){const n=this.g;let r=this.d;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this.g!==n)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){const e=this,t=this.g;let n=this.d;const r={[Symbol.iterator](){return r},next(){if(e.g!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const i={value:n.key,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}values(){const e=this,t=this.g;let n=this.d;const r={[Symbol.iterator](){return r},next(){if(e.g!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const i={value:n.value,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}entries(){const e=this,t=this.g;let n=this.d;const r={[Symbol.iterator](){return r},next(){if(e.g!==t)throw new Error("LinkedMap got modified during iteration.");if(n){const i={value:[n.key,n.value],done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}[(J1=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}h(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this.d,n=this.size;for(;t&&n>e;)this.c.delete(t.key),t=t.next,n--;this.d=t,this.f=n,t&&(t.previous=void 0),this.g++}j(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this.e,n=this.size;for(;t&&n>e;)this.c.delete(t.key),t=t.previous,n--;this.e=t,this.f=n,t&&(t.next=void 0),this.g++}k(e){if(!this.d&&!this.e)this.e=e;else if(this.d)e.next=this.d,this.d.previous=e;else throw new Error("Invalid list");this.d=e,this.g++}l(e){if(!this.d&&!this.e)this.d=e;else if(this.e)e.previous=this.e,this.e.next=e;else throw new Error("Invalid list");this.e=e,this.g++}m(e){if(e===this.d&&e===this.e)this.d=void 0,this.e=void 0;else if(e===this.d){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this.d=e.next}else if(e===this.e){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this.e=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this.g++}n(e,t){if(!this.d||!this.e)throw new Error("Invalid list");if(!(t!==1&&t!==2)){if(t===1){if(e===this.d)return;const n=e.next,r=e.previous;e===this.e?(r.next=void 0,this.e=r):(n.previous=r,r.next=n),e.previous=void 0,e.next=this.d,this.d.previous=e,this.d=e,this.g++}else if(t===2){if(e===this.e)return;const n=e.next,r=e.previous;e===this.d?(n.previous=void 0,this.d=n):(n.previous=r,r.next=n),e.next=void 0,e.previous=this.e,this.e.next=e,this.e=e,this.g++}}}toJSON(){const e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}},Fi=class extends ki{constructor(e,t=1){super(),this.o=e,this.p=Math.min(Math.max(0,t),1)}get limit(){return this.o}set limit(e){this.o=e,this.q()}get ratio(){return this.p}set ratio(e){this.p=Math.min(Math.max(0,e),1),this.q()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this}q(){this.size>this.o&&this.r(Math.round(this.o*this.p))}},X1=class extends Fi{constructor(e,t=1){super(e,t)}r(e){this.h(e)}set(e,t){return super.set(e,t),this.q(),this}},qi=class{constructor(){this.c=new Map}add(e,t){let n=this.c.get(e);n||(n=new Set,this.c.set(e,n)),n.add(t)}delete(e,t){const n=this.c.get(e);n&&(n.delete(t),n.size===0&&this.c.delete(e))}forEach(e,t){const n=this.c.get(e);n&&n.forEach(t)}get(e){const t=this.c.get(e);return t||new Set}};function Ui(e){return!!e&&typeof e[Symbol.iterator]=="function"}var de;(function(e){function t(v){return v&&typeof v=="object"&&typeof v[Symbol.iterator]=="function"}e.is=t;const n=Object.freeze([]);function r(){return n}e.empty=r;function*i(v){yield v}e.single=i;function s(v){return t(v)?v:i(v)}e.wrap=s;function o(v){return v||n}e.from=o;function*l(v){for(let S=v.length-1;S>=0;S--)yield v[S]}e.reverse=l;function a(v){return!v||v[Symbol.iterator]().next().done===!0}e.isEmpty=a;function u(v){return v[Symbol.iterator]().next().value}e.first=u;function c(v,S){let I=0;for(const x of v)if(S(x,I++))return!0;return!1}e.some=c;function h(v,S){for(const I of v)if(S(I))return I}e.find=h;function*f(v,S){for(const I of v)S(I)&&(yield I)}e.filter=f;function*g(v,S){let I=0;for(const x of v)yield S(x,I++)}e.map=g;function*m(v,S){let I=0;for(const x of v)yield*S(x,I++)}e.flatMap=m;function*p(...v){for(const S of v)Ui(S)?yield*S:yield S}e.concat=p;function d(v,S,I){let x=I;for(const k of v)x=S(x,k);return x}e.reduce=d;function w(v){let S=0;for(const I of v)S++;return S}e.length=w;function*b(v,S,I=v.length){for(S<-v.length&&(S=0),S<0&&(S+=v.length),I<0?I+=v.length:I>v.length&&(I=v.length);S<I;S++)yield v[S]}e.slice=b;function C(v,S=Number.POSITIVE_INFINITY){const I=[];if(S===0)return[I,v];const x=v[Symbol.iterator]();for(let k=0;k<S;k++){const H=x.next();if(H.done)return[I,e.empty()];I.push(H.value)}return[I,{[Symbol.iterator](){return x}}]}e.consume=C;async function D(v){const S=[];for await(const I of v)S.push(I);return Promise.resolve(S)}e.asyncToArray=D})(de||(de={}));var ji=!1,Ut=null,ul=class ti{constructor(){this.b=new Map}static{this.a=0}c(t){let n=this.b.get(t);return n||(n={parent:null,source:null,isSingleton:!1,value:t,idx:ti.a++},this.b.set(t,n)),n}trackDisposable(t){const n=this.c(t);n.source||(n.source=new Error().stack)}setParent(t,n){const r=this.c(t);r.parent=n}markAsDisposed(t){this.b.delete(t)}markAsSingleton(t){this.c(t).isSingleton=!0}f(t,n){const r=n.get(t);if(r)return r;const i=t.parent?this.f(this.c(t.parent),n):t;return n.set(t,i),i}getTrackedDisposables(){const t=new Map;return[...this.b.entries()].filter(([,r])=>r.source!==null&&!this.f(r,t).isSingleton).flatMap(([r])=>r)}computeLeakingDisposables(t=10,n){let r;if(n)r=n;else{const a=new Map,u=[...this.b.values()].filter(h=>h.source!==null&&!this.f(h,a).isSingleton);if(u.length===0)return;const c=new Set(u.map(h=>h.value));if(r=u.filter(h=>!(h.parent&&c.has(h.parent))),r.length===0)throw new Error("There are cyclic diposable chains!")}if(!r)return;function i(a){function u(h,f){for(;h.length>0&&f.some(g=>typeof g=="string"?g===h[0]:h[0].match(g));)h.shift()}const c=a.source.split(` `).map(h=>h.trim().replace("at ","")).filter(h=>h!=="");return u(c,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),c.reverse()}const s=new qi;for(const a of r){const u=i(a);for(let c=0;c<=u.length;c++)s.add(u.slice(0,c).join(` `),a)}r.sort(Mi(a=>a.idx,Di));let o="",l=0;for(const a of r.slice(0,t)){l++;const u=i(a),c=[];for(let h=0;h<u.length;h++){let f=u[h];f=`(shared with ${s.get(u.slice(0,h+1).join(` `)).size}/${r.length} leaks) at ${f}`;const m=s.get(u.slice(0,h).join(` `)),p=$i([...m].map(d=>i(d)[h]),d=>d);delete p[u[h]];for(const[d,w]of Object.entries(p))c.unshift(` - stacktraces of ${w.length} other leaks continue with ${d}`);c.unshift(f)}o+=` ==================== Leaking disposable ${l}/${r.length}: ${a.value.constructor.name} ==================== ${c.join(` `)} ============================================================ `}return r.length>t&&(o+=` ... and ${r.length-t} more leaking disposables `),{leaks:r,details:o}}};function zi(e){Ut=e}if(ji){const e="__is_disposable_tracked__";zi(new class{trackDisposable(t){const n=new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[e]||console.log(n)},3e3)}setParent(t,n){if(t&&t!==jt.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==jt.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function He(e){return Ut?.trackDisposable(e),e}function Ge(e){Ut?.markAsDisposed(e)}function Je(e,t){Ut?.setParent(e,t)}function Ti(e,t){if(Ut)for(const n of e)Ut.setParent(n,t)}function Y1(e){if(de.is(e)){const t=[];for(const n of e)if(n)try{n.dispose()}catch(r){t.push(r)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function Bi(...e){const t=Q1(()=>Y1(e));return Ti(e,t),t}function Q1(e){const t=He({dispose:Oi(()=>{Ge(t),e()})});return t}var Ke=class ei{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this.f=new Set,this.g=!1,He(this)}dispose(){this.g||(Ge(this),this.g=!0,this.clear())}get isDisposed(){return this.g}clear(){if(this.f.size!==0)try{Y1(this.f)}finally{this.f.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return Je(t,this),this.g?ei.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this.f.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this.f.delete(t),t.dispose()}}deleteAndLeak(t){t&&this.f.has(t)&&(this.f.delete(t),Je(t,null))}},jt=class{static{this.None=Object.freeze({dispose(){}})}constructor(){this.q=new Ke,He(this),Je(this.q,this)}dispose(){Ge(this),this.q.dispose()}B(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this.q.add(e)}},z=class Pe{static{this.Undefined=new Pe(void 0)}constructor(t){this.element=t,this.next=Pe.Undefined,this.prev=Pe.Undefined}},Vi=class{constructor(){this.a=z.Undefined,this.b=z.Undefined,this.c=0}get size(){return this.c}isEmpty(){return this.a===z.Undefined}clear(){let e=this.a;for(;e!==z.Undefined;){const t=e.next;e.prev=z.Undefined,e.next=z.Undefined,e=t}this.a=z.Undefined,this.b=z.Undefined,this.c=0}unshift(e){return this.d(e,!1)}push(e){return this.d(e,!0)}d(e,t){const n=new z(e);if(this.a===z.Undefined)this.a=n,this.b=n;else if(t){const i=this.b;this.b=n,n.prev=i,i.next=n}else{const i=this.a;this.a=n,n.next=i,i.prev=n}this.c+=1;let r=!1;return()=>{r||(r=!0,this.e(n))}}shift(){if(this.a!==z.Undefined){const e=this.a.element;return this.e(this.a),e}}pop(){if(this.b!==z.Undefined){const e=this.b.element;return this.e(this.b),e}}e(e){if(e.prev!==z.Undefined&&e.next!==z.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===z.Undefined&&e.next===z.Undefined?(this.a=z.Undefined,this.b=z.Undefined):e.next===z.Undefined?(this.b=this.b.prev,this.b.next=z.Undefined):e.prev===z.Undefined&&(this.a=this.a.next,this.a.prev=z.Undefined);this.c-=1}*[Symbol.iterator](){let e=this.a;for(;e!==z.Undefined;)yield e.element,e=e.next}},Wi=globalThis.performance&&typeof globalThis.performance.now=="function",Hi=class ni{static create(t){return new ni(t)}constructor(t){this.c=Wi&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this.a=this.c(),this.b=-1}stop(){this.b=this.c()}reset(){this.a=this.c(),this.b=-1}elapsed(){return this.b!==-1?this.b-this.a:this.c()-this.a}},Z1=!1,Gi=!1,ge;(function(e){e.None=()=>jt.None;function t(E){if(Gi){const{onDidAddListener:L}=E,N=Xe.create();let y=0;E.onDidAddListener=()=>{++y===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),N.print()),L?.()}}}function n(E,L){return g(E,()=>{},0,void 0,!0,void 0,L)}e.defer=n;function r(E){return(L,N=null,y)=>{let $=!1,M;return M=E(q=>{if(!$)return M?M.dispose():$=!0,L.call(N,q)},null,y),$&&M.dispose(),M}}e.once=r;function i(E,L){return e.once(e.filter(E,L))}e.onceIf=i;function s(E,L,N){return h((y,$=null,M)=>E(q=>y.call($,L(q)),null,M),N)}e.map=s;function o(E,L,N){return h((y,$=null,M)=>E(q=>{L(q),y.call($,q)},null,M),N)}e.forEach=o;function l(E,L,N){return h((y,$=null,M)=>E(q=>L(q)&&y.call($,q),null,M),N)}e.filter=l;function a(E){return E}e.signal=a;function u(...E){return(L,N=null,y)=>{const $=Bi(...E.map(M=>M(q=>L.call(N,q))));return f($,y)}}e.any=u;function c(E,L,N,y){let $=N;return s(E,M=>($=L($,M),$),y)}e.reduce=c;function h(E,L){let N;const y={onWillAddFirstListener(){N=E($.fire,$)},onDidRemoveLastListener(){N?.dispose()}};L||t(y);const $=new ht(y);return L?.add($),$.event}function f(E,L){return L instanceof Array?L.push(E):L&&L.add(E),E}function g(E,L,N=100,y=!1,$=!1,M,q){let G,X,qt,he=0,Jt;const V1={leakWarningThreshold:M,onWillAddFirstListener(){G=E(Ci=>{he++,X=L(X,Ci),y&&!qt&&(ce.fire(X),X=void 0),Jt=()=>{const Li=X;X=void 0,qt=void 0,(!y||he>1)&&ce.fire(Li),he=0},typeof N=="number"?(clearTimeout(qt),qt=setTimeout(Jt,N)):qt===void 0&&(qt=0,queueMicrotask(Jt))})},onWillRemoveListener(){$&&he>0&&Jt?.()},onDidRemoveLastListener(){Jt=void 0,G.dispose()}};q||t(V1);const ce=new ht(V1);return q?.add(ce),ce.event}e.debounce=g;function m(E,L=0,N){return e.debounce(E,(y,$)=>y?(y.push($),y):[$],L,void 0,!0,void 0,N)}e.accumulate=m;function p(E,L=(y,$)=>y===$,N){let y=!0,$;return l(E,M=>{const q=y||!L(M,$);return y=!1,$=M,q},N)}e.latch=p;function d(E,L,N){return[e.filter(E,L,N),e.filter(E,y=>!L(y),N)]}e.split=d;function w(E,L=!1,N=[],y){let $=N.slice(),M=E(X=>{$?$.push(X):G.fire(X)});y&&y.add(M);const q=()=>{$?.forEach(X=>G.fire(X)),$=null},G=new ht({onWillAddFirstListener(){M||(M=E(X=>G.fire(X)),y&&y.add(M))},onDidAddFirstListener(){$&&(L?setTimeout(q):q())},onDidRemoveLastListener(){M&&M.dispose(),M=null}});return y&&y.add(G),G.event}e.buffer=w;function b(E,L){return(y,$,M)=>{const q=L(new D);return E(function(G){const X=q.evaluate(G);X!==C&&y.call($,X)},void 0,M)}}e.chain=b;const C=Symbol("HaltChainable");class D{constructor(){this.f=[]}map(L){return this.f.push(L),this}forEach(L){return this.f.push(N=>(L(N),N)),this}filter(L){return this.f.push(N=>L(N)?N:C),this}reduce(L,N){let y=N;return this.f.push($=>(y=L(y,$),y)),this}latch(L=(N,y)=>N===y){let N=!0,y;return this.f.push($=>{const M=N||!L($,y);return N=!1,y=$,M?$:C}),this}evaluate(L){for(const N of this.f)if(L=N(L),L===C)break;return L}}function v(E,L,N=y=>y){const y=(...G)=>q.fire(N(...G)),$=()=>E.on(L,y),M=()=>E.removeListener(L,y),q=new ht({onWillAddFirstListener:$,onDidRemoveLastListener:M});return q.event}e.fromNodeEventEmitter=v;function S(E,L,N=y=>y){const y=(...G)=>q.fire(N(...G)),$=()=>E.addEventListener(L,y),M=()=>E.removeEventListener(L,y),q=new ht({onWillAddFirstListener:$,onDidRemoveLastListener:M});return q.event}e.fromDOMEventEmitter=S;function I(E,L){return new Promise(N=>r(E)(N,null,L))}e.toPromise=I;function x(E){const L=new ht;return E.then(N=>{L.fire(N)},()=>{L.fire(void 0)}).finally(()=>{L.dispose()}),L.event}e.fromPromise=x;function k(E,L){return E(N=>L.fire(N))}e.forward=k;function H(E,L,N){return L(N),E(y=>L(y))}e.runAndSubscribe=H;class F{constructor(L,N){this._observable=L,this.f=0,this.g=!1;const y={onWillAddFirstListener:()=>{L.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{L.removeObserver(this)}};N||t(y),this.emitter=new ht(y),N&&N.add(this.emitter)}beginUpdate(L){this.f++}handlePossibleChange(L){}handleChange(L,N){this.g=!0}endUpdate(L){this.f--,this.f===0&&(this._observable.reportChanges(),this.g&&(this.g=!1,this.emitter.fire(this._observable.get())))}}function O(E,L){return new F(E,L).emitter.event}e.fromObservable=O;function It(E){return(L,N,y)=>{let $=0,M=!1;const q={beginUpdate(){$++},endUpdate(){$--,$===0&&(E.reportChanges(),M&&(M=!1,L.call(N)))},handlePossibleChange(){},handleChange(){M=!0}};E.addObserver(q),E.reportChanges();const G={dispose(){E.removeObserver(q)}};return y instanceof Ke?y.add(G):Array.isArray(y)&&y.push(G),G}}e.fromObservableLight=It})(ge||(ge={}));var Ji=class j1{static{this.all=new Set}static{this.f=0}constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${j1.f++}`,j1.all.add(this)}start(t){this.g=new Hi,this.listenerCount=t}stop(){if(this.g){const t=this.g.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this.g=void 0}}},tn=-1,Ki=class ri{static{this.f=1}constructor(t,n,r=(ri.f++).toString(16).padStart(3,"0")){this.j=t,this.threshold=n,this.name=r,this.h=0}dispose(){this.g?.clear()}check(t,n){const r=this.threshold;if(r<=0||n<r)return;this.g||(this.g=new Map);const i=this.g.get(t.value)||0;if(this.g.set(t.value,i+1),this.h-=1,this.h<=0){this.h=r*.5;const[s,o]=this.getMostFrequentStack(),l=`[${this.name}] potential listener LEAK detected, having ${n} listeners already. MOST frequent listener (${o}):`;console.warn(l),console.warn(s);const a=new Xi(l,s);this.j(a)}return()=>{const s=this.g.get(t.value)||0;this.g.set(t.value,s-1)}}getMostFrequentStack(){if(!this.g)return;let t,n=0;for(const[r,i]of this.g)(!t||n<i)&&(t=[r,i],n=i);return t}},Xe=class ii{static create(){const t=new Error;return new ii(t.stack??"")}constructor(t){this.value=t}print(){console.warn(this.value.split(` `).slice(2).join(` `))}},Xi=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},Yi=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},Qi=0,me=class{constructor(e){this.value=e,this.id=Qi++}},Zi=2,ts=(e,t)=>{if(e instanceof me)t(e);else for(let n=0;n<e.length;n++){const r=e[n];r&&t(r)}},ht=class{constructor(e){this.z=0,this.f=e,this.g=tn>0||this.f?.leakWarningThreshold?new Ki(e?.onListenerError??fe,this.f?.leakWarningThreshold??tn):void 0,this.j=this.f?._profName?new Ji(this.f._profName):void 0,this.w=this.f?.deliveryQueue}dispose(){if(!this.m){if(this.m=!0,this.w?.current===this&&this.w.reset(),this.u){if(Z1){const e=this.u;queueMicrotask(()=>{ts(e,t=>t.stack?.print())})}this.u=void 0,this.z=0}this.f?.onDidRemoveLastListener?.(),this.g?.dispose()}}get event(){return this.q??=(e,t,n)=>{if(this.g&&this.z>this.g.threshold**2){const l=`[${this.g.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this.z} vs ${this.g.threshold})`;console.warn(l);const a=this.g.getMostFrequentStack()??["UNKNOWN stack",-1],u=new Yi(`${l}. HINT: Stack shows most frequent listener (${a[1]}-times)`,a[0]);return(this.f?.onListenerError||fe)(u),jt.None}if(this.m)return jt.None;t&&(e=e.bind(t));const r=new me(e);let i,s;this.g&&this.z>=Math.ceil(this.g.threshold*.2)&&(r.stack=Xe.create(),i=this.g.check(r.stack,this.z+1)),Z1&&(r.stack=s??Xe.create()),this.u?this.u instanceof me?(this.w??=new es,this.u=[this.u,r]):this.u.push(r):(this.f?.onWillAddFirstListener?.(this),this.u=r,this.f?.onDidAddFirstListener?.(this)),this.f?.onDidAddListener?.(this),this.z++;const o=Q1(()=>{i?.(),this.A(r)});return n instanceof Ke?n.add(o):Array.isArray(n)&&n.push(o),o},this.q}A(e){if(this.f?.onWillRemoveListener?.(this),!this.u)return;if(this.z===1){this.u=void 0,this.f?.onDidRemoveLastListener?.(this),this.z=0;return}const t=this.u,n=t.indexOf(e);if(n===-1)throw console.log("disposed?",this.m),console.log("size?",this.z),console.log("arr?",JSON.stringify(this.u)),new Error("Attempted to dispose unknown listener");this.z--,t[n]=void 0;const r=this.w.current===this;if(this.z*Zi<=t.length){let i=0;for(let s=0;s<t.length;s++)t[s]?t[i++]=t[s]:r&&i<this.w.end&&(this.w.end--,i<this.w.i&&this.w.i--);t.length=i}}B(e,t){if(!e)return;const n=this.f?.onListenerError||fe;if(!n){e.value(t);return}try{e.value(t)}catch(r){n(r)}}C(e){const t=e.current.u;for(;e.i<e.end;)this.B(t[e.i++],e.value);e.reset()}fire(e){if(this.w?.current&&(this.C(this.w),this.j?.stop()),this.j?.start(this.z),this.u)if(this.u instanceof me)this.B(this.u,e);else{const t=this.w;t.enqueue(this,e,this.u.length),this.C(t)}this.j?.stop()}hasListeners(){return this.z>0}},es=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}};function ns(){return globalThis._VSCODE_NLS_MESSAGES}function en(){return globalThis._VSCODE_NLS_LANGUAGE}var rs=en()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function nn(e,t){let n;return t.length===0?n=e:n=e.replace(/\{(\d+)\}/g,(r,i)=>{const s=i[0],o=t[s];let l=r;return typeof o=="string"?l=o:(typeof o=="number"||typeof o=="boolean"||o===void 0||o===null)&&(l=String(o)),l}),rs&&(n="\uFF3B"+n.replace(/[aouei]/g,"$&$&")+"\uFF3D"),n}function tt(e,t,...n){return nn(typeof e=="number"?is(e,t):t,n)}function is(e,t){const n=ns()?.[e];if(typeof n!="string"){if(typeof t=="string")return t;throw new Error(`!!! NLS MISSING: ${e} !!!`)}return n}var Ot="en",pe=!1,be=!1,Kt=!1,ss=!1,rn=!1,Ye=!1,os=!1,ls=!1,as=!1,us=!1,ve=void 0,we=Ot,sn=Ot,hs=void 0,mt=void 0,pt=globalThis,st=void 0;typeof pt.vscode<"u"&&typeof pt.vscode.process<"u"?st=pt.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(st=process);var on=typeof st?.versions?.electron=="string",cs=on&&st?.type==="renderer";if(typeof st=="object"){pe=st.platform==="win32",be=st.platform==="darwin",Kt=st.platform==="linux",ss=Kt&&!!st.env.SNAP&&!!st.env.SNAP_REVISION,os=on,as=!!st.env.CI||!!st.env.BUILD_ARTIFACTSTAGINGDIRECTORY,ve=Ot,we=Ot;const e=st.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e);ve=t.userLocale,sn=t.osLocale,we=t.resolvedLanguage||Ot,hs=t.languagePack?.translationsConfigFile}catch{}rn=!0}else typeof navigator=="object"&&!cs?(mt=navigator.userAgent,pe=mt.indexOf("Windows")>=0,be=mt.indexOf("Macintosh")>=0,ls=(mt.indexOf("Macintosh")>=0||mt.indexOf("iPad")>=0||mt.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Kt=mt.indexOf("Linux")>=0,us=mt?.indexOf("Mobi")>=0,Ye=!0,we=en()||Ot,ve=navigator.language.toLowerCase(),sn=ve):console.error("Unable to resolve platform.");var ln;(function(e){e[e.Web=0]="Web",e[e.Mac=1]="Mac",e[e.Linux=2]="Linux",e[e.Windows=3]="Windows"})(ln||(ln={}));var Qe=0;be?Qe=1:pe?Qe=3:Kt&&(Qe=2);var _t=pe,Ze=be,an=Kt,fs=rn,Ce=Ye,ds=Ye&&typeof pt.importScripts=="function",gs=ds?pt.origin:void 0,dt=mt,St=we,un;(function(e){function t(){return St}e.value=t;function n(){return St.length===2?St==="en":St.length>=3?St[0]==="e"&&St[1]==="n"&&St[2]==="-":!1}e.isDefaultVariant=n;function r(){return St==="en"}e.isDefault=r})(un||(un={}));var ms=typeof pt.postMessage=="function"&&!pt.importScripts,ps=(()=>{if(ms){const e=[];pt.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let r=0,i=e.length;r<i;r++){const s=e[r];if(s.id===n.data.vscodeScheduleAsyncWork){e.splice(r,1),s.callback();return}}});let t=0;return n=>{const r=++t;e.push({id:r,callback:n}),pt.postMessage({vscodeScheduleAsyncWork:r},"*")}}return e=>setTimeout(e)})(),hn;(function(e){e[e.Windows=1]="Windows",e[e.Macintosh=2]="Macintosh",e[e.Linux=3]="Linux"})(hn||(hn={}));var cn=!!(dt&&dt.indexOf("Chrome")>=0),bs=!!(dt&&dt.indexOf("Firefox")>=0),vs=!!(!cn&&dt&&dt.indexOf("Safari")>=0),ws=!!(dt&&dt.indexOf("Edg/")>=0),hl=!!(dt&&dt.indexOf("Android")>=0),fn=Object.freeze(function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}),dn;(function(e){function t(n){return n===e.None||n===e.Cancelled||n instanceof Cs?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:ge.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:fn})})(dn||(dn={}));var Cs=class{constructor(){this.a=!1,this.b=null}cancel(){this.a||(this.a=!0,this.b&&(this.b.fire(void 0),this.dispose()))}get isCancellationRequested(){return this.a}get onCancellationRequested(){return this.a?fn:(this.b||(this.b=new ht),this.b.event)}dispose(){this.b&&(this.b.dispose(),this.b=null)}};function Ls(e){return e}var ys=class{constructor(e,t){this.a=void 0,this.b=void 0,typeof e=="function"?(this.c=e,this.d=Ls):(this.c=t,this.d=e.getCacheKey)}get(e){const t=this.d(e);return this.b!==t&&(this.b=t,this.a=this.c(e)),this.a}},t1=class{constructor(e){this.d=e,this.a=!1}get hasValue(){return this.a}get value(){if(!this.a)try{this.b=this.d()}catch(e){this.c=e}finally{this.a=!0}if(this.c)throw this.c;return this.b}get rawValue(){return this.b}};function As(e){return!e||typeof e!="string"?!0:e.trim().length===0}function xs(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function Ns(e,t,n={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=xs(e)),n.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e=e+"\\b"));let r="";return n.global&&(r+="g"),n.matchCase||(r+="i"),n.multiline&&(r+="m"),n.unicode&&(r+="u"),new RegExp(e,r)}function Es(e){return e.split(/\r\n|\r|\n/)}function e1(e){for(let t=0,n=e.length;t<n;t++){const r=e.charCodeAt(t);if(r!==32&&r!==9)return t}return-1}function Is(e,t=e.length-1){for(let n=t;n>=0;n--){const r=e.charCodeAt(n);if(r!==32&&r!==9)return n}return-1}function Ss(e,t){return e<t?-1:e>t?1:0}function $s(e,t,n=0,r=e.length,i=0,s=t.length){for(;n<r&&i<s;n++,i++){const a=e.charCodeAt(n),u=t.charCodeAt(i);if(a<u)return-1;if(a>u)return 1}const o=r-n,l=s-i;return o<l?-1:o>l?1:0}function gn(e,t,n=0,r=e.length,i=0,s=t.length){for(;n<r&&i<s;n++,i++){let a=e.charCodeAt(n),u=t.charCodeAt(i);if(a===u)continue;if(a>=128||u>=128)return $s(e.toLowerCase(),t.toLowerCase(),n,r,i,s);mn(a)&&(a-=32),mn(u)&&(u-=32);const c=a-u;if(c!==0)return c}const o=r-n,l=s-i;return o<l?-1:o>l?1:0}function mn(e){return e>=97&&e<=122}function pn(e){return e>=65&&e<=90}function Os(e,t){return e.length===t.length&&gn(e,t)===0}function _s(e,t){const n=t.length;return t.length>e.length?!1:gn(e,t,0,n)===0}function n1(e){return 55296<=e&&e<=56319}function r1(e){return 56320<=e&&e<=57343}function bn(e,t){return(e-55296<<10)+(t-56320)+65536}function Ms(e,t,n){const r=e.charCodeAt(n);if(n1(r)&&n+1<t){const i=e.charCodeAt(n+1);if(r1(i))return bn(r,i)}return r}var i1=void 0;function Ds(){return/(?:[\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\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}function vn(e){return i1||(i1=Ds()),i1.test(e)}var Rs=/^[\t\n\r\x20-\x7E]*$/;function Ps(e){return Rs.test(e)}var ks=/[\u2028\u2029]/;function wn(e){return ks.test(e)}var Fs=/(?:\x1b\[|\x9b)[=?>!]?[\d;:]*["$#'* ]?[a-zA-Z@^`{}|~]/,qs=/(?:\x1b\]|\x9d).*?(?:\x1b\\|\x07|\x9c)/,Us=/\x1b(?:[ #%\(\)\*\+\-\.\/]?[a-zA-Z0-9\|}~@])/,cl=new RegExp("(?:"+[Fs.source,qs.source,Us.source].join("|")+")","g"),js="\uFEFF";function zs(e){return!!(e&&e.length>0&&e.charCodeAt(0)===65279)}var Cn;(function(e){e[e.Other=0]="Other",e[e.Prepend=1]="Prepend",e[e.CR=2]="CR",e[e.LF=3]="LF",e[e.Control=4]="Control",e[e.Extend=5]="Extend",e[e.Regional_Indicator=6]="Regional_Indicator",e[e.SpacingMark=7]="SpacingMark",e[e.L=8]="L",e[e.V=9]="V",e[e.T=10]="T",e[e.LV=11]="LV",e[e.LVT=12]="LVT",e[e.ZWJ=13]="ZWJ",e[e.Extended_Pictographic=14]="Extended_Pictographic"})(Cn||(Cn={}));var fl=class se{static{this.c=null}static getInstance(){return se.c||(se.c=new se),se.c}constructor(){this.d=Ts()}getGraphemeBreakType(t){if(t<32)return t===10?3:t===13?2:4;if(t<127)return 0;const n=this.d,r=n.length/3;let i=1;for(;i<=r;)if(t<n[3*i])i=2*i;else if(t>n[3*i+1])i=2*i+1;else return n[3*i+2];return 0}};function Ts(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,7110