UNPKG

code-server

Version:

Run VS Code on a remote server.

27 lines (19 loc) • 999 kB
"use strict";/*!-------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/var S1=function(e,t){return S1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,i){s.__proto__=i}||function(s,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(s[n]=i[n])},S1(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");S1(e,t);function s(){this.constructor=e}e.prototype=t===null?Object.create(t):(s.prototype=t.prototype,new s)}export var __assign=function(){return __assign=Object.assign||function(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(t[r]=s[r])}return t},__assign.apply(this,arguments)};export function __rest(e,t){var s={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(s[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(s[i[n]]=e[i[n]]);return s}export function __decorate(e,t,s,i){var n=arguments.length,r=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,s):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,s,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(n<3?o(r):n>3?o(t,s,r):o(t,s))||r);return n>3&&r&&Object.defineProperty(t,s,r),r}export function __param(e,t){return function(s,i){t(s,i,e)}}export function __esDecorate(e,t,s,i,n,r){function o(x){if(x!==void 0&&typeof x!="function")throw new TypeError("Function expected");return x}for(var a=i.kind,c=a==="getter"?"get":a==="setter"?"set":"value",l=!t&&e?i.static?e:e.prototype:null,u=t||(l?Object.getOwnPropertyDescriptor(l,i.name):{}),h,f=!1,p=s.length-1;p>=0;p--){var g={};for(var w in i)g[w]=w==="access"?{}:i[w];for(var w in i.access)g.access[w]=i.access[w];g.addInitializer=function(x){if(f)throw new TypeError("Cannot add initializers after decoration has completed");r.push(o(x||null))};var b=(0,s[p])(a==="accessor"?{get:u.get,set:u.set}:u[c],g);if(a==="accessor"){if(b===void 0)continue;if(b===null||typeof b!="object")throw new TypeError("Object expected");(h=o(b.get))&&(u.get=h),(h=o(b.set))&&(u.set=h),(h=o(b.init))&&n.unshift(h)}else(h=o(b))&&(a==="field"?n.unshift(h):u[c]=h)}l&&Object.defineProperty(l,i.name,u),f=!0}export function __runInitializers(e,t,s){for(var i=arguments.length>2,n=0;n<t.length;n++)s=i?t[n].call(e,s):t[n].call(e);return i?s:void 0}export function __propKey(e){return typeof e=="symbol"?e:"".concat(e)}export function __setFunctionName(e,t,s){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:s?"".concat(s," ",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,s,i){function n(r){return r instanceof s?r:new s(function(o){o(r)})}return new(s||(s=Promise))(function(r,o){function a(u){try{l(i.next(u))}catch(h){o(h)}}function c(u){try{l(i.throw(u))}catch(h){o(h)}}function l(u){u.done?r(u.value):n(u.value).then(a,c)}l((i=i.apply(e,t||[])).next())})}export function __generator(e,t){var s={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,n,r,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(u){return c([l,u])}}function c(l){if(i)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(s=0)),s;)try{if(i=1,n&&(r=l[0]&2?n.return:l[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,l[1])).done)return r;switch(n=0,r&&(l=[l[0]&2,r.value]),l[0]){case 0:case 1:r=l;break;case 4:return s.label++,{value:l[1],done:!1};case 5:s.label++,n=l[1],l=[0];continue;case 7:l=s.ops.pop(),s.trys.pop();continue;default:if(r=s.trys,!(r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){s=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){s.label=l[1];break}if(l[0]===6&&s.label<r[1]){s.label=r[1],r=l;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(l);break}r[2]&&s.ops.pop(),s.trys.pop();continue}l=t.call(e,s)}catch(u){l=[6,u],n=0}finally{i=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}export var __createBinding=Object.create?function(e,t,s,i){i===void 0&&(i=s);var n=Object.getOwnPropertyDescriptor(t,s);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,i,n)}:function(e,t,s,i){i===void 0&&(i=s),e[i]=t[s]};export function __exportStar(e,t){for(var s in e)s!=="default"&&!Object.prototype.hasOwnProperty.call(t,s)&&__createBinding(t,e,s)}export function __values(e){var t=typeof Symbol=="function"&&Symbol.iterator,s=t&&e[t],i=0;if(s)return s.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}export function __read(e,t){var s=typeof Symbol=="function"&&e[Symbol.iterator];if(!s)return e;var i=s.call(e),n,r=[],o;try{for(;(t===void 0||t-- >0)&&!(n=i.next()).done;)r.push(n.value)}catch(a){o={error:a}}finally{try{n&&!n.done&&(s=i.return)&&s.call(i)}finally{if(o)throw o.error}}return r}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,s=arguments.length;t<s;t++)e+=arguments[t].length;for(var i=Array(e),n=0,t=0;t<s;t++)for(var r=arguments[t],o=0,a=r.length;o<a;o++,n++)i[n]=r[o];return i}export function __spreadArray(e,t,s){if(s||arguments.length===2)for(var i=0,n=t.length,r;i<n;i++)(r||!(i in t))&&(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||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,s){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=s.apply(e,t||[]),n,r=[];return n={},a("next"),a("throw"),a("return",o),n[Symbol.asyncIterator]=function(){return this},n;function o(p){return function(g){return Promise.resolve(g).then(p,h)}}function a(p,g){i[p]&&(n[p]=function(w){return new Promise(function(b,x){r.push([p,w,b,x])>1||c(p,w)})},g&&(n[p]=g(n[p])))}function c(p,g){try{l(i[p](g))}catch(w){f(r[0][3],w)}}function l(p){p.value instanceof __await?Promise.resolve(p.value.v).then(u,h):f(r[0][2],p)}function u(p){c("next",p)}function h(p){c("throw",p)}function f(p,g){p(g),r.shift(),r.length&&c(r[0][0],r[0][1])}}export function __asyncDelegator(e){var t,s;return t={},i("next"),i("throw",function(n){throw n}),i("return"),t[Symbol.iterator]=function(){return this},t;function i(n,r){t[n]=e[n]?function(o){return(s=!s)?{value:__await(e[n](o)),done:!1}:r?r(o):o}:r}}export function __asyncValues(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],s;return t?t.call(e):(e=typeof __values=="function"?__values(e):e[Symbol.iterator](),s={},i("next"),i("throw"),i("return"),s[Symbol.asyncIterator]=function(){return this},s);function i(r){s[r]=e[r]&&function(o){return new Promise(function(a,c){o=e[r](o),n(a,c,o.done,o.value)})}}function n(r,o,a,c){Promise.resolve(c).then(function(l){r({value:l,done:a})},o)}}export function __makeTemplateObject(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var nD=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 s in e)s!=="default"&&Object.prototype.hasOwnProperty.call(e,s)&&__createBinding(t,e,s);return nD(t,e),t}export function __importDefault(e){return e&&e.__esModule?e:{default:e}}export function __classPrivateFieldGet(e,t,s,i){if(s==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?i:s==="a"?i.call(e):i?i.value:t.get(e)}export function __classPrivateFieldSet(e,t,s,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(e,s):n?n.value=s:t.set(e,s),s}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,s){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var i,n;if(s){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=t[Symbol.asyncDispose]}if(i===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=t[Symbol.dispose],s&&(n=i)}if(typeof i!="function")throw new TypeError("Object not disposable.");n&&(i=function(){try{n.call(this)}catch(r){return Promise.reject(r)}}),e.stack.push({value:t,dispose:i,async:s})}else s&&e.stack.push({async:!0});return t}var rD=typeof SuppressedError=="function"?SuppressedError:function(e,t,s){var i=new Error(s);return i.name="SuppressedError",i.error=e,i.suppressed=t,i};export function __disposeResources(e){function t(i){e.error=e.hasError?new rD(i,e.error,"An error was suppressed during disposal."):i,e.hasError=!0}function s(){for(;e.stack.length;){var i=e.stack.pop();try{var n=i.dispose&&i.dispose.call(i.value);if(i.async)return Promise.resolve(n).then(s,function(r){return t(r),s()})}catch(r){t(r)}}if(e.hasError)throw e.error}return s()}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 oD=Object.create,P1=Object.defineProperty,aD=Object.getOwnPropertyDescriptor,I1=Object.getOwnPropertyNames,cD=Object.getPrototypeOf,lD=Object.prototype.hasOwnProperty,v=(e,t)=>function(){return e&&(t=(0,e[I1(e)[0]])(e=0)),t},uD=(e,t)=>function(){return t||(0,e[I1(e)[0]])((t={exports:{}}).exports,t),t.exports},hD=(e,t)=>{for(var s in t)P1(e,s,{get:t[s],enumerable:!0})},fD=(e,t,s,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of I1(t))!lD.call(e,n)&&n!==s&&P1(e,n,{get:()=>t[n],enumerable:!(i=aD(t,n))||i.enumerable});return e},jv=(e,t,s)=>(s=e!=null?oD(cD(e)):{},fD(t||!e||!e.__esModule?P1(s,"default",{value:e,enumerable:!0}):s,e)),Uv=uD({"node_modules/minimist/index.js"(e,t){"use strict";function s(r,o){var a=r;o.slice(0,-1).forEach(function(l){a=a[l]||{}});var c=o[o.length-1];return c in a}function i(r){return typeof r=="number"||/^0x[0-9a-f]+$/i.test(r)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(r)}function n(r,o){return o==="constructor"&&typeof r[o]=="function"||o==="__proto__"}t.exports=function(r,o){o||(o={});var a={bools:{},strings:{},unknownFn:null};typeof o.unknown=="function"&&(a.unknownFn=o.unknown),typeof o.boolean=="boolean"&&o.boolean?a.allBools=!0:[].concat(o.boolean).filter(Boolean).forEach(function(R){a.bools[R]=!0});var c={};function l(R){return c[R].some(function(ue){return a.bools[ue]})}Object.keys(o.alias||{}).forEach(function(R){c[R]=[].concat(o.alias[R]),c[R].forEach(function(ue){c[ue]=[R].concat(c[R].filter(function(Xe){return ue!==Xe}))})}),[].concat(o.string).filter(Boolean).forEach(function(R){a.strings[R]=!0,c[R]&&[].concat(c[R]).forEach(function(ue){a.strings[ue]=!0})});var u=o.default||{},h={_:[]};function f(R,ue){return a.allBools&&/^--[^=]+$/.test(ue)||a.strings[R]||a.bools[R]||c[R]}function p(R,ue,Xe){for(var F=R,Ye=0;Ye<ue.length-1;Ye++){var N=ue[Ye];if(n(F,N))return;F[N]===void 0&&(F[N]={}),(F[N]===Object.prototype||F[N]===Number.prototype||F[N]===String.prototype)&&(F[N]={}),F[N]===Array.prototype&&(F[N]=[]),F=F[N]}var I=ue[ue.length-1];n(F,I)||((F===Object.prototype||F===Number.prototype||F===String.prototype)&&(F={}),F===Array.prototype&&(F=[]),F[I]===void 0||a.bools[I]||typeof F[I]=="boolean"?F[I]=Xe:Array.isArray(F[I])?F[I].push(Xe):F[I]=[F[I],Xe])}function g(R,ue,Xe){if(!(Xe&&a.unknownFn&&!f(R,Xe)&&a.unknownFn(Xe)===!1)){var F=!a.strings[R]&&i(ue)?Number(ue):ue;p(h,R.split("."),F),(c[R]||[]).forEach(function(Ye){p(h,Ye.split("."),F)})}}Object.keys(a.bools).forEach(function(R){g(R,u[R]===void 0?!1:u[R])});var w=[];r.indexOf("--")!==-1&&(w=r.slice(r.indexOf("--")+1),r=r.slice(0,r.indexOf("--")));for(var b=0;b<r.length;b++){var x=r[b],k,D;if(/^--.+=/.test(x)){var M=x.match(/^--([^=]+)=([\s\S]*)$/);k=M[1];var A=M[2];a.bools[k]&&(A=A!=="false"),g(k,A,x)}else if(/^--no-.+/.test(x))k=x.match(/^--no-(.+)/)[1],g(k,!1,x);else if(/^--.+/.test(x))k=x.match(/^--(.+)/)[1],D=r[b+1],D!==void 0&&!/^(-|--)[^-]/.test(D)&&!a.bools[k]&&!a.allBools&&(!c[k]||!l(k))?(g(k,D,x),b+=1):/^(true|false)$/.test(D)?(g(k,D==="true",x),b+=1):g(k,a.strings[k]?"":!0,x);else if(/^-[^-]+/.test(x)){for(var j=x.slice(1,-1).split(""),B=!1,re=0;re<j.length;re++){if(D=x.slice(re+2),D==="-"){g(j[re],D,x);continue}if(/[A-Za-z]/.test(j[re])&&D[0]==="="){g(j[re],D.slice(1),x),B=!0;break}if(/[A-Za-z]/.test(j[re])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(D)){g(j[re],D,x),B=!0;break}if(j[re+1]&&j[re+1].match(/\W/)){g(j[re],x.slice(re+2),x),B=!0;break}else g(j[re],a.strings[j[re]]?"":!0,x)}k=x.slice(-1)[0],!B&&k!=="-"&&(r[b+1]&&!/^(-|--)[^-]/.test(r[b+1])&&!a.bools[k]&&(!c[k]||!l(k))?(g(k,r[b+1],x),b+=1):r[b+1]&&/^(true|false)$/.test(r[b+1])?(g(k,r[b+1]==="true",x),b+=1):g(k,a.strings[k]?"":!0,x))}else if((!a.unknownFn||a.unknownFn(x)!==!1)&&h._.push(a.strings._||!i(x)?x:Number(x)),o.stopEarly){h._.push.apply(h._,r.slice(b+1));break}}return Object.keys(u).forEach(function(R){s(h,R.split("."))||(p(h,R.split("."),u[R]),(c[R]||[]).forEach(function(ue){p(h,ue.split("."),u[R])}))}),o["--"]?h["--"]=w.slice():w.forEach(function(R){h._.push(R)}),h}}});function D1(e){const t=[];typeof e=="number"&&t.push("code/timeOrigin",e);function s(n,r){t.push(n,r?.startTime??Date.now())}function i(){const n=[];for(let r=0;r<t.length;r+=2)n.push({name:t[r],startTime:t[r+1]});return n}return{mark:s,getMarks:i}}function dD(){if(typeof performance=="object"&&typeof performance.mark=="function"&&!performance.nodeTiming)return typeof performance.timeOrigin!="number"&&!performance.timing?D1():{mark(e,t){performance.mark(e,t)},getMarks(){let e=performance.timeOrigin;typeof e!="number"&&(e=performance.timing.navigationStart||performance.timing.redirectStart||performance.timing.fetchStart);const t=[{name:"code/timeOrigin",startTime:Math.round(e)}];for(const s of performance.getEntriesByType("mark"))t.push({name:s.name,startTime:Math.round(e+s.startTime)});return t}};if(typeof process=="object"){const e=performance?.timeOrigin;return D1(e)}else return console.trace("perf-util loaded in UNKNOWN environment"),D1()}function pD(e){return e.MonacoPerformanceMarks||(e.MonacoPerformanceMarks=dD()),e.MonacoPerformanceMarks}var A1,kt,Tv,qi=v({"out-build/vs/base/common/performance.js"(){"use strict";A1=pD(globalThis),kt=A1.mark,Tv=A1.getMarks}});import*as Ei from"path";import*as xi from"fs";async function L1({userLocale:e,osLocale:t,userDataPath:s,commit:i,nlsMetadataPath:n}){if(kt("code/willGenerateNls"),process.env.VSCODE_DEV||e==="pseudo"||e.startsWith("en")||!i||!s)return Da(e,t,n);try{const r=await mD(s);if(!r)return Da(e,t,n);const o=gD(r,e);if(!o)return Da(e,t,n);const a=r[o],c=a?.translations?.vscode;if(!a||typeof a.hash!="string"||!a.translations||typeof c!="string"||!await R1(c))return Da(e,t,n);const l=`${a.hash}.${o}`,u=Ei.join(s,"clp",l),h=Ei.join(u,i),f=Ei.join(h,"nls.messages.json"),p=Ei.join(u,"tcf.json"),g=Ei.join(u,"corrupted.info");await R1(g)&&await xi.promises.rm(u,{recursive:!0,force:!0,maxRetries:3});const w={userLocale:e,osLocale:t,resolvedLanguage:o,defaultMessagesFile:Ei.join(n,"nls.messages.json"),languagePack:{translationsConfigFile:p,messagesFile:f,corruptMarkerFile:g},locale:e,availableLanguages:{"*":o},_languagePackId:l,_languagePackSupport:!0,_translationsConfigFile:p,_cacheRoot:u,_resolvedLanguagePackCoreLocation:h,_corruptedFile:g};if(await R1(h))return wD(h).catch(()=>{}),kt("code/didGenerateNls"),w;const[,b,x,k]=await Promise.all([xi.promises.mkdir(h,{recursive:!0}),JSON.parse(await xi.promises.readFile(Ei.join(n,"nls.keys.json"),"utf-8")),JSON.parse(await xi.promises.readFile(Ei.join(n,"nls.messages.json"),"utf-8")),JSON.parse(await xi.promises.readFile(c,"utf-8"))]),D=[];let M=0;for(const[A,j]of b){const B=k.contents[A];for(const re of j)D.push(B?.[re]||x[M]),M++}return await Promise.all([xi.promises.writeFile(f,JSON.stringify(D),"utf-8"),xi.promises.writeFile(p,JSON.stringify(a.translations),"utf-8")]),kt("code/didGenerateNls"),w}catch(r){console.error("Generating translation files failed.",r)}return Da(e,t,n)}async function mD(e){const t=Ei.join(e,"languagepacks.json");try{return JSON.parse(await xi.promises.readFile(t,"utf-8"))}catch{return}}function gD(e,t){try{for(;t;){if(e[t])return t;const s=t.lastIndexOf("-");if(s>0)t=t.substring(0,s);else return}}catch(s){console.error("Resolving language pack configuration failed.",s)}}function Da(e,t,s){return kt("code/didGenerateNls"),{userLocale:e,osLocale:t,resolvedLanguage:"en",defaultMessagesFile:Ei.join(s,"nls.messages.json"),locale:e,availableLanguages:{}}}async function R1(e){try{return await xi.promises.access(e),!0}catch{return!1}}function wD(e){const t=new Date;return xi.promises.utimes(e,t,t)}var Fv=v({"out-build/vs/base/node/nls.js"(){"use strict";qi()}});function Bv(e){Kl.setUnexpectedErrorHandler(e)}function Hv(e){if(!e||typeof e!="object")return!1;const t=e;return t.code==="EPIPE"&&t.syscall?.toUpperCase()==="WRITE"}function Wt(e){kn(e)||Kl.onUnexpectedError(e)}function kn(e){return e instanceof $t?!0:e instanceof Error&&e.name===Aa&&e.message===Aa}function Wv(){const e=new Error(Aa);return e.name=e.message,e}function Ne(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}function zv(e){return e?new Error(`Illegal state: ${e}`):new Error("Illegal state")}function he(e){return e?e.message?e.message:e.stack?e.stack.split(` `)[0]:String(e):"Error"}var Vv,Kl,Aa,$t,Gi,qv,pe=v({"out-build/vs/base/common/errors.js"(){"use strict";Vv=class{constructor(){this.b=[],this.a=function(e){setTimeout(()=>{throw e.stack?Gi.isErrorNoTelemetry(e)?new Gi(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)}},Kl=new Vv,Aa="Canceled",$t=class extends Error{constructor(){super(Aa),this.name=this.message}},Gi=class wv extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof wv)return t;const s=new wv;return s.message=t.message,s.stack=t.stack,s}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},qv=class wI extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,wI.prototype)}}}});function vD(){return globalThis._VSCODE_NLS_MESSAGES}function Gv(){return globalThis._VSCODE_NLS_LANGUAGE}var Jv=v({"out-build/vs/nls.messages.js"(){"use strict"}});function eu(e,t){let s;return t.length===0?s=e:s=e.replace(/\{(\d+)\}/g,(i,n)=>{const r=n[0],o=t[r];let a=i;return typeof o=="string"?a=o:(typeof o=="number"||typeof o=="boolean"||o===void 0||o===null)&&(a=String(o)),a}),Yv&&(s="\uFF3B"+s.replace(/[aouei]/g,"$&$&")+"\uFF3D"),s}function m(e,t,...s){return eu(typeof e=="number"?Xv(e,t):t,s)}function Xv(e,t){const s=vD()?.[e];if(typeof s!="string"){if(typeof t=="string")return t;throw new Error(`!!! NLS MISSING: ${e} !!!`)}return s}function Zv(e,t,...s){let i;typeof e=="number"?i=Xv(e,t):i=t;const n=eu(i,s);return{value:n,original:t===i?n:eu(t,s)}}var Yv,le=v({"out-build/vs/nls.js"(){"use strict";Jv(),Jv(),Yv=Gv()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0}});function Qv(e){switch(e){case 0:return"Web";case 1:return"Mac";case 2:return"Linux";case 3:return"Windows"}}var $n,Yr,Qr,Kr,N1,O1,tu,Kv,C1,eb,tb,La,Ra,_1,sb,ki,$i,$s,M1,ib,nb,Na,fe,Ns,nt,rb,ob,Ss,ab,cb,or,ei,Ps,lb,ub,hb,fb,ar,j1,db,pb,mb,bD,Y=v({"out-build/vs/base/common/platform.js"(){"use strict";if(le(),$n="en",Yr=!1,Qr=!1,Kr=!1,N1=!1,O1=!1,tu=!1,Kv=!1,C1=!1,eb=!1,tb=!1,La=void 0,Ra=$n,_1=$n,sb=void 0,ki=void 0,$i=globalThis,$s=void 0,typeof $i.vscode<"u"&&typeof $i.vscode.process<"u"?$s=$i.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&($s=process),M1=typeof $s?.versions?.electron=="string",ib=M1&&$s?.type==="renderer",typeof $s=="object"){Yr=$s.platform==="win32",Qr=$s.platform==="darwin",Kr=$s.platform==="linux",N1=Kr&&!!$s.env.SNAP&&!!$s.env.SNAP_REVISION,Kv=M1,eb=!!$s.env.CI||!!$s.env.BUILD_ARTIFACTSTAGINGDIRECTORY,La=$n,Ra=$n;const e=$s.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e);La=t.userLocale,_1=t.osLocale,Ra=t.resolvedLanguage||$n,sb=t.languagePack?.translationsConfigFile}catch{}O1=!0}else typeof navigator=="object"&&!ib?(ki=navigator.userAgent,Yr=ki.indexOf("Windows")>=0,Qr=ki.indexOf("Macintosh")>=0,C1=(ki.indexOf("Macintosh")>=0||ki.indexOf("iPad")>=0||ki.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Kr=ki.indexOf("Linux")>=0,tb=ki?.indexOf("Mobi")>=0,tu=!0,Ra=Gv()||$n,La=navigator.language.toLowerCase(),_1=La):console.error("Unable to resolve platform.");(function(e){e[e.Web=0]="Web",e[e.Mac=1]="Mac",e[e.Linux=2]="Linux",e[e.Windows=3]="Windows"})(nb||(nb={})),Na=0,Qr?Na=1:Yr?Na=3:Kr&&(Na=2),fe=Yr,Ns=Qr,nt=Kr,rb=N1,ob=O1,Ss=tu,ab=tu&&typeof $i.importScripts=="function",cb=ab?$i.origin:void 0,or=Na,ei=ki,Ps=Ra,function(e){function t(){return Ps}e.value=t;function s(){return Ps.length===2?Ps==="en":Ps.length>=3?Ps[0]==="e"&&Ps[1]==="n"&&Ps[2]==="-":!1}e.isDefaultVariant=s;function i(){return Ps==="en"}e.isDefault=i}(lb||(lb={})),ub=typeof $i.postMessage=="function"&&!$i.importScripts,hb=(()=>{if(ub){const e=[];$i.addEventListener("message",s=>{if(s.data&&s.data.vscodeScheduleAsyncWork)for(let i=0,n=e.length;i<n;i++){const r=e[i];if(r.id===s.data.vscodeScheduleAsyncWork){e.splice(i,1),r.callback();return}}});let t=0;return s=>{const i=++t;e.push({id:i,callback:s}),$i.postMessage({vscodeScheduleAsyncWork:i},"*")}}return e=>setTimeout(e)})(),function(e){e[e.Windows=1]="Windows",e[e.Macintosh=2]="Macintosh",e[e.Linux=3]="Linux"}(fb||(fb={})),ar=Qr||C1?2:Yr?1:3,j1=!!(ei&&ei.indexOf("Chrome")>=0),db=!!(ei&&ei.indexOf("Firefox")>=0),pb=!!(!j1&&ei&&ei.indexOf("Safari")>=0),mb=!!(ei&&ei.indexOf("Edg/")>=0),bD=!!(ei&&ei.indexOf("Android")>=0)}});function yD(e,t){const s=Object.create(null);for(const i of e){const n=t(i);let r=s[n];r||(r=s[n]=[]),r.push(i)}return s}var gb,ED,wb=v({"out-build/vs/base/common/collections.js"(){"use strict";ED=class{static{gb=Symbol.toStringTag}constructor(e,t){this.b=t,this.a=new Map,this[gb]="SetWithKey";for(const s of e)this.add(s)}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(s=>e.call(t,s,s,this))}[Symbol.iterator](){return this.values()}}}});function su(e,t){const s=this;let i=!1,n;return function(){if(i)return n;if(i=!0,t)try{n=e.apply(s,arguments)}finally{t()}else n=e.apply(s,arguments);return n}}var iu=v({"out-build/vs/base/common/functional.js"(){"use strict"}});function xD(e,t,s=0,i=e.length){let n=s,r=i;for(;n<r;){const o=Math.floor((n+r)/2);t(e[o])?n=o+1:r=o}return n-1}var kD,$D=v({"out-build/vs/base/common/arraysFind.js"(){"use strict";kD=class vI{static{this.assertInvariants=!1}constructor(t){this.e=t,this.c=0}findLastMonotonous(t){if(vI.assertInvariants){if(this.d){for(const i of this.e)if(this.d(i)&&!t(i))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this.d=t}const s=xD(this.e,t,this.c);return this.c=s+1,s===-1?void 0:this.e[s]}}}});function Sn(e,t,s=(i,n)=>i===n){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let i=0,n=e.length;i<n;i++)if(!s(e[i],t[i]))return!1;return!0}function SD(e,t,s){return PD(e.length,i=>s(e[i],t))}function PD(e,t){let s=0,i=e-1;for(;s<=i;){const n=(s+i)/2|0,r=t(n);if(r<0)s=n+1;else if(r>0)i=n-1;else return n}return-(s+1)}function ti(e){return e.filter(t=>!!t)}function ID(e){let t=0;for(let s=0;s<e.length;s++)e[s]&&(e[t]=e[s],t+=1);e.length=t}function nu(e){return Array.isArray(e)&&e.length>0}function Si(e,t=s=>s){const s=new Set;return e.filter(i=>{const n=t(i);return s.has(n)?!1:(s.add(n),!0)})}function vb(e,t){return e.push(t),()=>DD(e,t)}function DD(e,t){const s=e.indexOf(t);if(s>-1)return e.splice(s,1),t}function bb(e,t){let s;if(typeof t=="number"){let i=t;s=()=>{const n=Math.sin(i++)*179426549;return n-Math.floor(n)}}else s=Math.random;for(let i=e.length-1;i>0;i-=1){const n=Math.floor(s()*(i+1)),r=e[i];e[i]=e[n],e[n]=r}}function yb(e){return Array.isArray(e)?e:[e]}function AD(e){return e[Math.floor(Math.random()*e.length)]}function LD(e,t){return(s,i)=>t(e(s),e(i))}var U1,Eb,RD,St=v({"out-build/vs/base/common/arrays.js"(){"use strict";$D(),pe(),function(e){function t(r){return r<0}e.isLessThan=t;function s(r){return r<=0}e.isLessThanOrEqual=s;function i(r){return r>0}e.isGreaterThan=i;function n(r){return r===0}e.isNeitherLessOrGreaterThan=n,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0}(U1||(U1={})),Eb=(e,t)=>e-t,RD=class l1{static{this.empty=new l1(t=>{})}constructor(t){this.iterate=t}forEach(t){this.iterate(s=>(t(s),!0))}toArray(){const t=[];return this.iterate(s=>(t.push(s),!0)),t}filter(t){return new l1(s=>this.iterate(i=>t(i)?s(i):!0))}map(t){return new l1(s=>this.iterate(i=>s(t(i))))}some(t){let s=!1;return this.iterate(i=>(s=t(i),!s)),s}findFirst(t){let s;return this.iterate(i=>t(i)?(s=i,!1):!0),s}findLast(t){let s;return this.iterate(i=>(t(i)&&(s=i),!0)),s}findLastMaxBy(t){let s,i=!0;return this.iterate(n=>((i||U1.isGreaterThan(t(n,s)))&&(i=!1,s=n),!0)),s}}}});function ND(e){return Array.isArray(e)}var xb,kb,$b,Sb,Pt,ru,Pb,Ib,Db,Oa,Ab,os=v({"out-build/vs/base/common/map.js"(){"use strict";Sb=class{constructor(e,t){this.uri=e,this.value=t}},Pt=class Fl{static{this.c=t=>t.toString()}constructor(t,s){if(this[xb]="ResourceMap",t instanceof Fl)this.d=new Map(t.d),this.e=s??Fl.c;else if(ND(t)){this.d=new Map,this.e=s??Fl.c;for(const[i,n]of t)this.set(i,n)}else this.d=new Map,this.e=t??Fl.c}set(t,s){return this.d.set(this.e(t),new Sb(t,s)),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,s){typeof s<"u"&&(t=t.bind(s));for(const[i,n]of this.d)t(n.value,n.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]}*[(xb=Symbol.toStringTag,Symbol.iterator)](){for(const[,t]of this.d)yield[t.uri,t.value]}},ru=class{constructor(e,t){this[kb]="ResourceSet",!e||typeof e=="function"?this.c=new Pt(e):(this.c=new Pt(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((s,i)=>e.call(t,i,i,this))}has(e){return this.c.has(e)}entries(){return this.c.entries()}keys(){return this.c.keys()}values(){return this.c.keys()}[(kb=Symbol.toStringTag,Symbol.iterator)](){return this.keys()}},function(e){e[e.None=0]="None",e[e.AsOld=1]="AsOld",e[e.AsNew=2]="AsNew"}(Pb||(Pb={})),Ib=class{constructor(){this[$b]="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 s=this.c.get(e);if(s)return t!==0&&this.n(s,t),s.value}set(e,t,s=0){let i=this.c.get(e);if(i)i.value=t,s!==0&&this.n(i,s);else{switch(i={key:e,value:t,next:void 0,previous:void 0},s){case 0:this.l(i);break;case 1:this.k(i);break;case 2:this.l(i);break;default:this.l(i);break}this.c.set(e,i),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 s=this.g;let i=this.d;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this.g!==s)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){const e=this,t=this.g;let s=this.d;const i={[Symbol.iterator](){return i},next(){if(e.g!==t)throw new Error("LinkedMap got modified during iteration.");if(s){const n={value:s.key,done:!1};return s=s.next,n}else return{value:void 0,done:!0}}};return i}values(){const e=this,t=this.g;let s=this.d;const i={[Symbol.iterator](){return i},next(){if(e.g!==t)throw new Error("LinkedMap got modified during iteration.");if(s){const n={value:s.value,done:!1};return s=s.next,n}else return{value:void 0,done:!0}}};return i}entries(){const e=this,t=this.g;let s=this.d;const i={[Symbol.iterator](){return i},next(){if(e.g!==t)throw new Error("LinkedMap got modified during iteration.");if(s){const n={value:[s.key,s.value],done:!1};return s=s.next,n}else return{value:void 0,done:!0}}};return i}[($b=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}h(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this.d,s=this.size;for(;t&&s>e;)this.c.delete(t.key),t=t.next,s--;this.d=t,this.f=s,t&&(t.previous=void 0),this.g++}j(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this.e,s=this.size;for(;t&&s>e;)this.c.delete(t.key),t=t.previous,s--;this.e=t,this.f=s,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,s=e.previous;if(!t||!s)throw new Error("Invalid list");t.previous=s,s.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 s=e.next,i=e.previous;e===this.e?(i.next=void 0,this.e=i):(s.previous=i,i.next=s),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 s=e.next,i=e.previous;e===this.d?(s.previous=void 0,this.d=s):(s.previous=i,i.next=s),e.next=void 0,e.previous=this.e,this.e.next=e,this.e=e,this.g++}}}toJSON(){const e=[];return this.forEach((t,s)=>{e.push([s,t])}),e}fromJSON(e){this.clear();for(const[t,s]of e)this.set(t,s)}},Db=class extends Ib{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))}},Oa=class extends Db{constructor(e,t=1){super(e,t)}r(e){this.h(e)}set(e,t){return super.set(e,t),this.q(),this}},Ab=class{constructor(){this.c=new Map}add(e,t){let s=this.c.get(e);s||(s=new Set,this.c.set(e,s)),s.add(t)}delete(e,t){const s=this.c.get(e);s&&(s.delete(t),s.size===0&&this.c.delete(e))}forEach(e,t){const s=this.c.get(e);s&&s.forEach(t)}get(e){const t=this.c.get(e);return t||new Set}}}});function T1(e,t){if(!e)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}function OD(e,t="unexpected state"){if(!e)throw typeof t=="string"?new qv(`Assertion Failed: ${t}`):t}var Ca=v({"out-build/vs/base/common/assert.js"(){"use strict";pe()}});function ve(e){return typeof e=="string"}function at(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function CD(e){const t=Object.getPrototypeOf(Uint8Array);return typeof e=="object"&&e instanceof t}function Pn(e){return typeof e=="number"&&!isNaN(e)}function _D(e){return!!e&&typeof e[Symbol.iterator]=="function"}function Us(e){return e===!0||e===!1}function Ts(e){return typeof e>"u"}function F1(e){return!It(e)}function It(e){return Ts(e)||e===null}function B1(e){return OD(e!=null,"Argument is `undefined` or `null`."),e}function H1(e){if(!at(e))return!1;for(const t in e)if(Lb.call(e,t))return!1;return!0}function W1(e){return typeof e=="function"}function MD(e,t){if(ve(t)){if(typeof e!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(W1(t)){try{if(e instanceof t)return}catch{}if(!It(e)&&e.constructor===t||t.length===1&&t.call(void 0,e)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}var Lb,ye=v({"out-build/vs/base/common/types.js"(){"use strict";Ca(),Lb=Object.prototype.hasOwnProperty}}),Pi,cr=v({"out-build/vs/base/common/iterator.js"(){"use strict";ye(),function(e){function t(A){return A&&typeof A=="object"&&typeof A[Symbol.iterator]=="function"}e.is=t;const s=Object.freeze([]);function i(){return s}e.empty=i;function*n(A){yield A}e.single=n;function r(A){return t(A)?A:n(A)}e.wrap=r;function o(A){return A||s}e.from=o;function*a(A){for(let j=A.length-1;j>=0;j--)yield A[j]}e.reverse=a;function c(A){return!A||A[Symbol.iterator]().next().done===!0}e.isEmpty=c;function l(A){return A[Symbol.iterator]().next().value}e.first=l;function u(A,j){let B=0;for(const re of A)if(j(re,B++))return!0;return!1}e.some=u;function h(A,j){for(const B of A)if(j(B))return B}e.find=h;function*f(A,j){for(const B of A)j(B)&&(yield B)}e.filter=f;function*p(A,j){let B=0;for(const re of A)yield j(re,B++)}e.map=p;function*g(A,j){let B=0;for(const re of A)yield*j(re,B++)}e.flatMap=g;function*w(...A){for(const j of A)_D(j)?yield*j:yield j}e.concat=w;function b(A,j,B){let re=B;for(const R of A)re=j(re,R);return re}e.reduce=b;function x(A){let j=0;for(const B of A)j++;return j}e.length=x;function*k(A,j,B=A.length){for(j<-A.length&&(j=0),j<0&&(j+=A.length),B<0?B+=A.length:B>A.length&&(B=A.length);j<B;j++)yield A[j]}e.slice=k;function D(A,j=Number.POSITIVE_INFINITY){const B=[];if(j===0)return[B,A];const re=A[Symbol.iterator]();for(let R=0;R<j;R++){const ue=re.next();if(ue.done)return[B,e.empty()];B.push(ue.value)}return[B,{[Symbol.iterator](){return re}}]}e.consume=D;async function M(A){const j=[];for await(const B of A)j.push(B);return Promise.resolve(j)}e.asyncToArray=M}(Pi||(Pi={}))}});function jD(e){lr=e}function _a(e){return lr?.trackDisposable(e),e}function Ma(e){lr?.markAsDisposed(e)}function ja(e,t){lr?.setParent(e,t)}function UD(e,t){if(lr)for(const s of e)lr.setParent(s,t)}function TD(e){return typeof e=="object"&&e!==null&&typeof e.dispose=="function"&&e.dispose.length===0}function _t(e){if(Pi.is(e)){const t=[];for(const s of e)if(s)try{s.dispose()}catch(i){t.push(i)}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 Rb(...e){const t=Se(()=>_t(e));return UD(e,t),t}function Se(e){const t=_a({dispose:su(()=>{Ma(t),e()})});return t}var Nb,lr,FD,ct,X,ou,au,q=v({"out-build/vs/base/common/lifecycle.js"(){"use strict";if(St(),wb(),os(),iu(),cr(),Nb=!1,lr=null,FD=class bI{constructor(){this.b=new Map}static{this.a=0}c(t){let s=this.b.get(t);return s||(s={parent:null,source:null,isSingleton:!1,value:t,idx:bI.a++},this.b.set(t,s)),s}trackDisposable(t){const s=this.c(t);s.source||(s.source=new Error().stack)}setParent(t,s){const i=this.c(t);i.parent=s}markAsDisposed(t){this.b.delete(t)}markAsSingleton(t){this.c(t).isSingleton=!0}f(t,s){const i=s.get(t);if(i)return i;const n=t.parent?this.f(this.c(t.parent),s):t;return s.set(t,n),n}getTrackedDisposables(){const t=new Map;return[...this.b.entries()].filter(([,i])=>i.source!==null&&!this.f(i,t).isSingleton).flatMap(([i])=>i)}computeLeakingDisposables(t=10,s){let i;if(s)i=s;else{const c=new Map,l=[...this.b.values()].filter(h=>h.source!==null&&!this.f(h,c).isSingleton);if(l.length===0)return;const u=new Set(l.map(h=>h.value));if(i=l.filter(h=>!(h.parent&&u.has(h.parent))),i.length===0)throw new Error("There are cyclic diposable chains!")}if(!i)return;function n(c){function l(h,f){for(;h.length>0&&f.some(p=>typeof p=="string"?p===h[0]:h[0].match(p));)h.shift()}const u=c.source.split(` `).map(h=>h.trim().replace("at ","")).filter(h=>h!=="");return l(u,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),u.reverse()}const r=new Ab;for(const c of i){const l=n(c);for(let u=0;u<=l.length;u++)r.add(l.slice(0,u).join(` `),c)}i.sort(LD(c=>c.idx,Eb));let o="",a=0;for(const c of i.slice(0,t)){a++;const l=n(c),u=[];for(let h=0;h<l.length;h++){let f=l[h];f=`(shared with ${r.get(l.slice(0,h+1).join(` `)).size}/${i.length} leaks) at ${f}`;const g=r.get(l.slice(0,h).join(` `)),w=yD([...g].map(b=>n(b)[h]),b=>b);delete w[l[h]];for(const[b,x]of Object.entries(w))u.unshift(` - stacktraces of ${x.length} other leaks continue with ${b}`);u.unshift(f)}o+=` ==================== Leaking disposable ${a}/${i.length}: ${c.value.constructor.name} ==================== ${u.join(` `)} ============================================================ `}return i.length>t&&(o+=` ... and ${i.length-t} more leaking disposables `),{leaks:i,details:o}}},Nb){const e="__is_disposable_tracked__";jD(new class{trackDisposable(t){const s=new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[e]||console.log(s)},3e3)}setParent(t,s){if(t&&t!==X.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==X.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}ct=class yI{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this.f=new Set,this.g=!1,_a(this)}dispose(){this.g||(Ma(this),this.g=!0,this.clear())}get isDisposed(){return this.g}clear(){if(this.f.size!==0)try{_t(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 ja(t,this),this.g?yI.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),ja(t,null))}},X=class{static{this.None=Object.freeze({dispose(){}})}constructor(){this.q=new ct,_a(this),ja(this.q,this)}dispose(){Ma(this),this.q.dispose()}B(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this.q.add(e)}},ou=class{constructor(){this.b=!1,_a(this)}get value(){return this.b?void 0:this.a}set value(e){this.b||e===this.a||(this.a?.dispose(),e&&ja(e,this),this.a=e)}clear(){this.value=void 0}dispose(){this.b=!0,Ma(this),this.a?.dispose(),this.a=void 0}clearAndLeak(){const e=this.a;return this.a=void 0,e&&ja(e,null),e}},au=class{constructor(){this.a=new Map,this.b=!1,_a(this)}dispose(){Ma(this),this.b=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this.a.size)try{_t(this.a.values())}finally{this.a.clear()}}has(e){return this.a.has(e)}get size(){return this.a.size}get(e){return this.a.get(e)}set(e,t,s=!1){this.b&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),s||this.a.get(e)?.dispose(),this.a.set(e,t)}deleteAndDispose(e){this.a.get(e)?.dispose(),this.a.delete(e)}deleteAndLeak(e){const t=this.a.get(e);return this.a.delete(e),t}keys(){return this.a.keys()}values(){return this.a.values()}[Symbol.iterator](){return this.a[Symbol.iterator]()}}}}),rt,z1,Ob=v({"out-build/vs/base/common/linkedList.js"(){"use strict";rt=class u1{static{this.Undefined=new u1(void 0)}constructor(t){this.element=t,this.next=u1.Undefined,this.prev=u1.Undefined}},z1=class{constructor(){this.a=rt.Undefined,this.b=rt.Undefined,this.c=0}get size(){return this.c}isEmpty(){return this.a===rt.Undefined}clear(){let e=this.a;for(;e!==rt.Undefined;){const t=e.next;e.prev=rt.Undefined,e.next=rt.Undefined,e=t}this.a=rt.Undefined,this.b=rt.Undefined,this.c=0}unshift(e){return this.d(e,!1)}push(e){return this.d(e,!0)}d(e,t){const s=new rt(e);if(this.a===rt.Undefined)this.a=s,this.b=s;else if(t){const n=this.b;this.b=s,s.prev=n,n.next=s}else{const n=this.a;this.a=s,s.next=n,n.prev=s}this.c+=1;let i=!1;return()=>{i||(i=!0,this.e(s))}}shift(){if(this.a!==rt.Undefined){const e=this.a.element;return this.e(this.a),e}}pop(){if(this.b!==rt.Undefined){const e=this.b.element;return this.e(this.b),e}}e(e){if(e.prev!==rt.Undefined&&e.next!==rt.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===rt.Undefined&&e.next===rt.Undefined?(this.a=rt.Undefined,this.b=rt.Undefined):e.next===rt.Undefined?(this.b=this.b.prev,this.b.next=rt.Undefined):e.prev===rt.Undefined&&(this.a=this.a.next,this.a.prev=rt.Undefined);this.c-=1}*[Symbol.iterator](){let e=this.a;for(;e!==rt.Undefined;)yield e.element,e=e.next}}}}),Cb,Ji,eo=v({"out-build/vs/base/common/stopwatch.js"(){"use strict";Cb=globalThis.performance&&typeof globalThis.performance.now=="function",Ji=class EI{static create(t){return new EI(t)}constructor(t){this.c=Cb&&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}}}}),V1,_b,V,Mb,q1,jb,cu,Ub,Tb,Fb,Ua,Bb,Hb,L,Wb,lu,zb,G1,ne=v({"out-build/vs/base/common/event.js"(){"use strict";wb(),pe(),iu(),q(),Ob(),eo(),V1=!1,_b=!1,function(e){e.None=()=>X.None;function t(N){if(_b){const{onDidAddListener:I}=N,C=cu.create();let _=0;N.onDidAddListener=()=>{++_===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),C.print()),I?.()}}}function s(N,I){return p(N,()=>{},0,void 0,!0,void 0,I)}e.defer=s;function i(N){return(I,C=null,_)=>{let G=!1,ae;return ae=N($e=>{if(!G)return ae?ae.dispose():G=!0,I.call(C,$e)},null,_),G&&ae.dispose(),ae}}e.once=i;function n(N,I){return e.once(e.filter(N,I))}e.onceIf=n;function r(N,I,C){return h((_,G=null,ae)=>N($e=>_.call(G,I($e)),null,ae),C)}e.map=r;function o(N,I,C){return h((_,G=null,ae)=>N($e=>{I($e),_.call(G,$e)},null,ae),C)}e.forEach=o;function a(N,I,C){return h((_,G=null,ae)=>N($e=>I($e)&&_.call(G,$e),null,ae),C)}e.filter=a;function c(N){return N}e.signal=c;function l(...N){return(I,C=null,_)=>{const G=Rb(...N.map(ae=>ae($e=>I.call(C,$e))));return f(G,_)}}e.any=l;function u(N,I,C,_){let G=C;return r(N,ae=>(G=I(G,ae),G),_)}e.reduce=u;function h(N,I){let C;const _={onWillAddFirstListener(){C=N(G.fire,G)},onDidRemoveLastListener(){C?.dispose()}};I||t(_);const G=new L(_);return I?.add(G),G.event}function f(N,I){return I instanceof Array?I.push(N):I&&I.add(N),N}function p(N,I,C=100,_=!1,G=!1,ae,$e){let Qe,ot,ns,ir=0,zi;const Xr={leakWarningThreshold:ae,onWillAddFirstListener(){Qe=N(Gl=>{ir++,ot=I(ot,Gl),_&&!ns&&(bi.fire(ot),ot=void 0),zi=()=>{const Jl=ot;ot=void 0,ns=void 0,(!_||ir>1)&&bi.fire(Jl),ir=0},typeof C=="number"?(clearTimeout(ns),ns=setTimeout(zi,C)):ns===void 0&&(ns=0,queueMicrotask(zi))})},onWillRemoveListener(){G&&ir>0&&zi?.()},onDidRemoveLastListener(){zi=void 0,Qe.dispose()}};$e||t(Xr);const bi=new L(Xr);return $e?.add(bi),bi.event}e.debounce=p;function g(N,I=0,C){return e.debounce(N,(_,G)=>_?(_.push(G),_):[G],I,void 0,!0,void 0,C)}e.accumulate=g;function w(N,I=(_,G)=>_===G,C){let _=!0,G;return a(N,ae=>{const $e=_||!I(ae,G);return _=!1,G=ae,$e},C)}e.latch=w;function b(N,I,C){return[e.filter(N,I,C),e.filter(N,_=>!I(_),C)]}e.split=b;function x(N,I=!1,C=[],_){let G=C.slice(),ae=N(ot=>{G?G.push(ot):Qe.fire(ot)});_&&_.add(ae);const $e=()=>{G?.forEach(ot=>Qe.fire(ot)),G=null},Qe=new L({onWillAddFirstListener(){ae||(ae=N(ot=>Qe.fire(ot)),_&&_.add(ae))},onDidAddFirstListener(){G&&(I?setTimeout($e):$e())},onDidRemoveLastListener(){ae&&ae.dispose(),ae=null}});return _&&_.add(Qe),Qe.event}e.buffer=x;function k(N,I){return(_,G,ae)=>{const $e=I(new M);return N(function(Qe){const ot=$e.evaluate(Qe);ot!==D&&_.call(G,ot)},void 0,ae)}}e.chain=k;const D=Symbol("HaltChainable");class M{constructor(){this.f=[]}map(I){return this.f.push(I),this}forEach(I){return this.f.push(C=>(I(C),C)),this}filter(I){return this.f.push(C=>I(C)?C:D),this}reduce(I,C){let _=C;return this.f.push(G=>(_=I(_,G),_)),this}latch(I=(C,_)=>C===_){let C=!0,_;return this.f.push(G=>{const ae=C||!I(G,_);return C=!1,_=G,ae?G:D}),this}evaluate(I){for(const C of this.f)if(I=C(I),I===D)break;return I}}function A(N,I,C=_=>_){const _=(...Qe)=>$e.fire(C(...Qe)),G=()=>N.on(I,_),ae=()=>N.removeListener(I,_),$e=new L({onWillAddFirstListener:G,onDidRemoveLastListener:ae});return $e.event}e.fromNodeEventEmitter=A;function j(N,I,C=_=>_){const _=(...Qe)=>$e.fire(C(...Qe)),G=()=>N.addEventListener(I,_),ae=()=>N.removeEventListener(I,_),$e=new L({onWillAddFirstListener:G,onDidRemoveLastListener:ae});return $e.event}e.fromDOMEventEmitter=j;function B(N,I){return new Promise(C=>i(N)(C,null,I))}e.toPromise=B;function re(N){const I=new L;return N.then(C=>{I.fire(C)},()=>{I.fire(void 0)}).finally(()=>{I.dispose()}),I.event}e.fromPromise=re;function R(N,I){return N(C=>I.fire(C))}e.forward=R;function ue(N,I,C){return I(C),N(_=>I(_))}e.runAndSubscribe=ue;class Xe{constructor(I,C){this._observable=I,this.f=0,this.g=!1;const _={onWillAddFirstListener:()=>{I.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{I.removeObserver(this)}};C||t(_),this.emitter=new L(_),C&&C.add(this.emitter)}beginUpdate(I){this.f++}handlePossibleChange(I){}handleChange(I,C){this.g=!0}endUpdate(I){this.f--,this.f===0&&(this._observable.reportChanges(),this.g&&(this.g=!1,this.emitter.fire(this._observable.get())))}}function F(N,I){return new Xe(N,I).emitter.event}e.fromObservable=F;function Ye(N){return(I,C,_)=>{let G=0,ae=!1;const $e={beginUpdate(){G++},endUpdate(){G--,G===0&&(N.reportChanges(),ae&&(ae=!1,I.call(C)))},handlePossibleChange(){},handleChange(){ae=!0}};N.addObserver($e),N.reportChanges();const Qe={dispose(){N.removeObserver($e)}};return _ instanceof ct?_.add(Qe):Array.isArray(_)&&_.push(Qe),Qe}}e.fromObservableLight=Ye}(V||(V={})),Mb=class vv{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}_${vv.f++}`,vv.all.add(this)}start(t){this.g=new Ji,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}}},q1=-1,jb=class xI{static{this.f=1}constructor(t,s,i=(xI.f++).toString(16).padStart(3,"0")){this.j=t,this.threshold=s,this.name=i,this.h=0}dispose(){this.g?.clear()}check(t,s){const i=this.threshold;if(i<=0||s<i)return;this.g||(this.g=new Map);const n=this.g.get(t.value)||0;if(this.g.set(t.value,n+1),this.h-=1,this.h<=0){this.h=i*.5;const[r,o]=this.getMostFrequentStack(),a=`[${this.name}] potential listener LEAK detected, having ${s} listeners already. MOST frequent listener (${o}):`;console.warn(a),console.warn(r);const c=new Ub(a,r);this.j(c)}return()=>{const r=this.g.get(t.value)||0;this.g.set(t.value,r-1)}}getMostFrequentStack(){if(!this.g)return;let t,s=0;for(const[i,n]of this.g)(!t||s<n)&&(t=[i,n],s=n);return t}},cu=class kI{static create(){const t=new Error;return new kI(t.stack??"")}constructor(t){this.value=t}print(){console.warn(this.value.split(` `).slice(2).join(` `))}},Ub=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},Tb=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},Fb=0,Ua=class{constructor(e){this.value=e,this.id=Fb++}},Bb=2,Hb=(e,t)=>{if(e instanceof Ua)t(e);else for(let s=0;s<e.length;s++){const i=e[s];i&&t(i)}},L=class{constructor(e){this.z=0,this.f=e,this.g=q1>0||this.f?.leakWarningThreshold?new jb(e?.onListenerError??Wt,this.f?.leakWarningThreshold??q1):void 0,this.j=this.f?._profName?new Mb(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(V1){const e=this.u;queueMicrotask(()=>{Hb(e,t=>t.stack?.print())})}this.u=void 0,this.z=0}this.f?.onDidRemoveLastListener?