code-server
Version:
Run VS Code on a remote server.
24 lines (16 loc) • 146 kB
JavaScript
"use strict";/*!--------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/var Z1=function(e,t){return Z1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Z1(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");Z1(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}export var __assign=function(){return __assign=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},__assign.apply(this,arguments)};export function __rest(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}export function __decorate(e,t,r,n){var i=arguments.length,s=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}export function __param(e,t){return function(r,n){t(r,n,e)}}export function __esDecorate(e,t,r,n,i,s){function o(q){if(q!==void 0&&typeof q!="function")throw new TypeError("Function expected");return q}for(var l=n.kind,u=l==="getter"?"get":l==="setter"?"set":"value",a=!t&&e?n.static?e:e.prototype:null,h=t||(a?Object.getOwnPropertyDescriptor(a,n.name):{}),c,m=!1,w=r.length-1;w>=0;w--){var L={};for(var x in n)L[x]=x==="access"?{}:n[x];for(var x in n.access)L.access[x]=n.access[x];L.addInitializer=function(q){if(m)throw new TypeError("Cannot add initializers after decoration has completed");s.push(o(q||null))};var S=(0,r[w])(l==="accessor"?{get:h.get,set:h.set}:h[u],L);if(l==="accessor"){if(S===void 0)continue;if(S===null||typeof S!="object")throw new TypeError("Object expected");(c=o(S.get))&&(h.get=c),(c=o(S.set))&&(h.set=c),(c=o(S.init))&&i.unshift(c)}else(c=o(S))&&(l==="field"?i.unshift(c):h[u]=c)}a&&Object.defineProperty(a,n.name,h),m=!0}export function __runInitializers(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}export function __propKey(e){return typeof e=="symbol"?e:"".concat(e)}export function __setFunctionName(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",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,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(h){try{a(n.next(h))}catch(c){o(c)}}function u(h){try{a(n.throw(h))}catch(c){o(c)}}function a(h){h.done?s(h.value):i(h.value).then(l,u)}a((n=n.apply(e,t||[])).next())})}export function __generator(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,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(a){return function(h){return u([a,h])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(r=0)),r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(h){a=[6,h],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}export var __createBinding=Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]};export function __exportStar(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&__createBinding(t,e,r)}export function __values(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}export function __read(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}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,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var s=arguments[t],o=0,l=s.length;o<l;o++,i++)n[i]=s[o];return n}export function __spreadArray(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);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,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,s=[];return i={},l("next"),l("throw"),l("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(w){return function(L){return Promise.resolve(L).then(w,c)}}function l(w,L){n[w]&&(i[w]=function(x){return new Promise(function(S,q){s.push([w,x,S,q])>1||u(w,x)})},L&&(i[w]=L(i[w])))}function u(w,L){try{a(n[w](L))}catch(x){m(s[0][3],x)}}function a(w){w.value instanceof __await?Promise.resolve(w.value.v).then(h,c):m(s[0][2],w)}function h(w){u("next",w)}function c(w){u("throw",w)}function m(w,L){w(L),s.shift(),s.length&&u(s[0][0],s[0][1])}}export function __asyncDelegator(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,s){t[i]=e[i]?function(o){return(r=!r)?{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],r;return t?t.call(e):(e=typeof __values=="function"?__values(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=e[s]&&function(o){return new Promise(function(l,u){o=e[s](o),i(l,u,o.done,o.value)})}}function i(s,o,l,u){Promise.resolve(u).then(function(a){s({value:a,done:l})},o)}}export function __makeTemplateObject(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var St=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 r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&__createBinding(t,e,r);return St(t,e),t}export function __importDefault(e){return e&&e.__esModule?e:{default:e}}export function __classPrivateFieldGet(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}export function __classPrivateFieldSet(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="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 n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r}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,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n,i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(i=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");i&&(n=function(){try{i.call(this)}catch(s){return Promise.reject(s)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var Ot=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};export function __disposeResources(e){function t(n){e.error=e.hasError?new Ot(n,e.error,"An error was suppressed during disposal."):n,e.hasError=!0}function r(){for(;e.stack.length;){var n=e.stack.pop();try{var i=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(i).then(r,function(s){return t(s),r()})}catch(s){t(s)}}if(e.hasError)throw e.error}return r()}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};function we(){return globalThis._VSCODE_NLS_LANGUAGE}var I2=we()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0,f1="en",x1=!1,P1=!1,p1=!1,kt=!1,ye=!1,G1=!1,Rt=!1,Mt=!1,Tt=!1,jt=!1,S1=void 0,O1=f1,Ce=f1,It=void 0,G=void 0,Q=globalThis,W=void 0;typeof Q.vscode<"u"&&typeof Q.vscode.process<"u"?W=Q.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(W=process);var Le=typeof W?.versions?.electron=="string",Ut=Le&&W?.type==="renderer";if(typeof W=="object"){x1=W.platform==="win32",P1=W.platform==="darwin",p1=W.platform==="linux",kt=p1&&!!W.env.SNAP&&!!W.env.SNAP_REVISION,Rt=Le,Tt=!!W.env.CI||!!W.env.BUILD_ARTIFACTSTAGINGDIRECTORY||!!W.env.GITHUB_WORKSPACE,S1=f1,O1=f1;const e=W.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e);S1=t.userLocale,Ce=t.osLocale,O1=t.resolvedLanguage||f1,It=t.languagePack?.translationsConfigFile}catch{}ye=!0}else typeof navigator=="object"&&!Ut?(G=navigator.userAgent,x1=G.indexOf("Windows")>=0,P1=G.indexOf("Macintosh")>=0,Mt=(G.indexOf("Macintosh")>=0||G.indexOf("iPad")>=0||G.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,p1=G.indexOf("Linux")>=0,jt=G?.indexOf("Mobi")>=0,G1=!0,O1=we()||f1,S1=navigator.language.toLowerCase(),Ce=S1):console.error("Unable to resolve platform.");var Ae;(function(e){e[e.Web=0]="Web",e[e.Mac=1]="Mac",e[e.Linux=2]="Linux",e[e.Windows=3]="Windows"})(Ae||(Ae={}));var Q1=0;P1?Q1=1:x1?Q1=3:p1&&(Q1=2);var l1=x1,qt=P1,Dt=p1,Ft=ye,Ne=G1,Wt=G1&&typeof Q.importScripts=="function",zt=Wt?Q.origin:void 0,Z=G,n1=O1,$e;(function(e){function t(){return n1}e.value=t;function r(){return n1.length===2?n1==="en":n1.length>=3?n1[0]==="e"&&n1[1]==="n"&&n1[2]==="-":!1}e.isDefaultVariant=r;function n(){return n1==="en"}e.isDefault=n})($e||($e={}));var Vt=typeof Q.postMessage=="function"&&!Q.importScripts,Ht=(()=>{if(Vt){const e=[];Q.addEventListener("message",r=>{if(r.data&&r.data.vscodeScheduleAsyncWork)for(let n=0,i=e.length;n<i;n++){const s=e[n];if(s.id===r.data.vscodeScheduleAsyncWork){e.splice(n,1),s.callback();return}}});let t=0;return r=>{const n=++t;e.push({id:n,callback:r}),Q.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})(),Ee;(function(e){e[e.Windows=1]="Windows",e[e.Macintosh=2]="Macintosh",e[e.Linux=3]="Linux"})(Ee||(Ee={}));var Kt=!!(Z&&Z.indexOf("Chrome")>=0),U2=!!(Z&&Z.indexOf("Firefox")>=0),q2=!!(!Kt&&Z&&Z.indexOf("Safari")>=0),D2=!!(Z&&Z.indexOf("Edg/")>=0),F2=!!(Z&&Z.indexOf("Android")>=0),a1,Y1=globalThis.vscode;if(typeof Y1<"u"&&typeof Y1.process<"u"){const e=Y1.process;a1={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?a1={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:a1={get platform(){return l1?"win32":qt?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};var k1=a1.cwd,Bt=a1.env,Jt=a1.platform,W2=a1.arch,Zt=65,Gt=97,Qt=90,Yt=122,u1=46,U=47,z=92,Y=58,Xt=63,_e=class extends Error{constructor(e,t,r){let n;typeof t=="string"&&t.indexOf("not ")===0?(n="must not be",t=t.replace(/^not /,"")):n="must be";const i=e.indexOf(".")!==-1?"property":"argument";let s=`The "${e}" ${i} ${n} of type ${t}`;s+=`. Received type ${typeof r}`,super(s),this.code="ERR_INVALID_ARG_TYPE"}};function er(e,t){if(e===null||typeof e!="object")throw new _e(t,"Object",e)}function k(e,t){if(typeof e!="string")throw new _e(t,"string",e)}var V=Jt==="win32";function C(e){return e===U||e===z}function X1(e){return e===U}function X(e){return e>=Zt&&e<=Qt||e>=Gt&&e<=Yt}function R1(e,t,r,n){let i="",s=0,o=-1,l=0,u=0;for(let a=0;a<=e.length;++a){if(a<e.length)u=e.charCodeAt(a);else{if(n(u))break;u=U}if(n(u)){if(!(o===a-1||l===1))if(l===2){if(i.length<2||s!==2||i.charCodeAt(i.length-1)!==u1||i.charCodeAt(i.length-2)!==u1){if(i.length>2){const h=i.lastIndexOf(r);h===-1?(i="",s=0):(i=i.slice(0,h),s=i.length-1-i.lastIndexOf(r)),o=a,l=0;continue}else if(i.length!==0){i="",s=0,o=a,l=0;continue}}t&&(i+=i.length>0?`${r}..`:"..",s=2)}else i.length>0?i+=`${r}${e.slice(o+1,a)}`:i=e.slice(o+1,a),s=a-o-1;o=a,l=0}else u===u1&&l!==-1?++l:l=-1}return i}function tr(e){return e?`${e[0]==="."?"":"."}${e}`:""}function xe(e,t){er(t,"pathObject");const r=t.dir||t.root,n=t.base||`${t.name||""}${tr(t.ext)}`;return r?r===t.root?`${r}${n}`:`${r}${e}${n}`:n}var R={resolve(...e){let t="",r="",n=!1;for(let i=e.length-1;i>=-1;i--){let s;if(i>=0){if(s=e[i],k(s,`paths[${i}]`),s.length===0)continue}else t.length===0?s=k1():(s=Bt[`=${t}`]||k1(),(s===void 0||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===z)&&(s=`${t}\\`));const o=s.length;let l=0,u="",a=!1;const h=s.charCodeAt(0);if(o===1)C(h)&&(l=1,a=!0);else if(C(h))if(a=!0,C(s.charCodeAt(1))){let c=2,m=c;for(;c<o&&!C(s.charCodeAt(c));)c++;if(c<o&&c!==m){const w=s.slice(m,c);for(m=c;c<o&&C(s.charCodeAt(c));)c++;if(c<o&&c!==m){for(m=c;c<o&&!C(s.charCodeAt(c));)c++;(c===o||c!==m)&&(u=`\\\\${w}\\${s.slice(m,c)}`,l=c)}}}else l=1;else X(h)&&s.charCodeAt(1)===Y&&(u=s.slice(0,2),l=2,o>2&&C(s.charCodeAt(2))&&(a=!0,l=3));if(u.length>0)if(t.length>0){if(u.toLowerCase()!==t.toLowerCase())continue}else t=u;if(n){if(t.length>0)break}else if(r=`${s.slice(l)}\\${r}`,n=a,a&&t.length>0)break}return r=R1(r,!n,"\\",C),n?`${t}\\${r}`:`${t}${r}`||"."},normalize(e){k(e,"path");const t=e.length;if(t===0)return".";let r=0,n,i=!1;const s=e.charCodeAt(0);if(t===1)return X1(s)?"\\":e;if(C(s))if(i=!0,C(e.charCodeAt(1))){let l=2,u=l;for(;l<t&&!C(e.charCodeAt(l));)l++;if(l<t&&l!==u){const a=e.slice(u,l);for(u=l;l<t&&C(e.charCodeAt(l));)l++;if(l<t&&l!==u){for(u=l;l<t&&!C(e.charCodeAt(l));)l++;if(l===t)return`\\\\${a}\\${e.slice(u)}\\`;l!==u&&(n=`\\\\${a}\\${e.slice(u,l)}`,r=l)}}}else r=1;else X(s)&&e.charCodeAt(1)===Y&&(n=e.slice(0,2),r=2,t>2&&C(e.charCodeAt(2))&&(i=!0,r=3));let o=r<t?R1(e.slice(r),!i,"\\",C):"";if(o.length===0&&!i&&(o="."),o.length>0&&C(e.charCodeAt(t-1))&&(o+="\\"),!i&&n===void 0&&e.includes(":")){if(o.length>=2&&X(o.charCodeAt(0))&&o.charCodeAt(1)===Y)return`.\\${o}`;let l=e.indexOf(":");do if(l===t-1||C(e.charCodeAt(l+1)))return`.\\${o}`;while((l=e.indexOf(":",l+1))!==-1)}return n===void 0?i?`\\${o}`:o:i?`${n}\\${o}`:`${n}${o}`},isAbsolute(e){k(e,"path");const t=e.length;if(t===0)return!1;const r=e.charCodeAt(0);return C(r)||t>2&&X(r)&&e.charCodeAt(1)===Y&&C(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,r;for(let s=0;s<e.length;++s){const o=e[s];k(o,"path"),o.length>0&&(t===void 0?t=r=o:t+=`\\${o}`)}if(t===void 0)return".";let n=!0,i=0;if(typeof r=="string"&&C(r.charCodeAt(0))){++i;const s=r.length;s>1&&C(r.charCodeAt(1))&&(++i,s>2&&(C(r.charCodeAt(2))?++i:n=!1))}if(n){for(;i<t.length&&C(t.charCodeAt(i));)i++;i>=2&&(t=`\\${t.slice(i)}`)}return R.normalize(t)},relative(e,t){if(k(e,"from"),k(t,"to"),e===t)return"";const r=R.resolve(e),n=R.resolve(t);if(r===n||(e=r.toLowerCase(),t=n.toLowerCase(),e===t))return"";if(r.length!==e.length||n.length!==t.length){const L=r.split("\\"),x=n.split("\\");L[L.length-1]===""&&L.pop(),x[x.length-1]===""&&x.pop();const S=L.length,q=x.length,r1=S<q?S:q;let j;for(j=0;j<r1&&L[j].toLowerCase()===x[j].toLowerCase();j++);return j===0?n:j===r1?q>r1?x.slice(j).join("\\"):S>r1?"..\\".repeat(S-1-j)+"..":"":"..\\".repeat(S-j)+x.slice(j).join("\\")}let i=0;for(;i<e.length&&e.charCodeAt(i)===z;)i++;let s=e.length;for(;s-1>i&&e.charCodeAt(s-1)===z;)s--;const o=s-i;let l=0;for(;l<t.length&&t.charCodeAt(l)===z;)l++;let u=t.length;for(;u-1>l&&t.charCodeAt(u-1)===z;)u--;const a=u-l,h=o<a?o:a;let c=-1,m=0;for(;m<h;m++){const L=e.charCodeAt(i+m);if(L!==t.charCodeAt(l+m))break;L===z&&(c=m)}if(m!==h){if(c===-1)return n}else{if(a>h){if(t.charCodeAt(l+m)===z)return n.slice(l+m+1);if(m===2)return n.slice(l+m)}o>h&&(e.charCodeAt(i+m)===z?c=m:m===2&&(c=3)),c===-1&&(c=0)}let w="";for(m=i+c+1;m<=s;++m)(m===s||e.charCodeAt(m)===z)&&(w+=w.length===0?"..":"\\..");return l+=c,w.length>0?`${w}${n.slice(l,u)}`:(n.charCodeAt(l)===z&&++l,n.slice(l,u))},toNamespacedPath(e){if(typeof e!="string"||e.length===0)return e;const t=R.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===z){if(t.charCodeAt(1)===z){const r=t.charCodeAt(2);if(r!==Xt&&r!==u1)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(X(t.charCodeAt(0))&&t.charCodeAt(1)===Y&&t.charCodeAt(2)===z)return`\\\\?\\${t}`;return t},dirname(e){k(e,"path");const t=e.length;if(t===0)return".";let r=-1,n=0;const i=e.charCodeAt(0);if(t===1)return C(i)?e:".";if(C(i)){if(r=n=1,C(e.charCodeAt(1))){let l=2,u=l;for(;l<t&&!C(e.charCodeAt(l));)l++;if(l<t&&l!==u){for(u=l;l<t&&C(e.charCodeAt(l));)l++;if(l<t&&l!==u){for(u=l;l<t&&!C(e.charCodeAt(l));)l++;if(l===t)return e;l!==u&&(r=n=l+1)}}}}else X(i)&&e.charCodeAt(1)===Y&&(r=t>2&&C(e.charCodeAt(2))?3:2,n=r);let s=-1,o=!0;for(let l=t-1;l>=n;--l)if(C(e.charCodeAt(l))){if(!o){s=l;break}}else o=!1;if(s===-1){if(r===-1)return".";s=r}return e.slice(0,s)},basename(e,t){t!==void 0&&k(t,"suffix"),k(e,"path");let r=0,n=-1,i=!0,s;if(e.length>=2&&X(e.charCodeAt(0))&&e.charCodeAt(1)===Y&&(r=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,l=-1;for(s=e.length-1;s>=r;--s){const u=e.charCodeAt(s);if(C(u)){if(!i){r=s+1;break}}else l===-1&&(i=!1,l=s+1),o>=0&&(u===t.charCodeAt(o)?--o===-1&&(n=s):(o=-1,n=l))}return r===n?n=l:n===-1&&(n=e.length),e.slice(r,n)}for(s=e.length-1;s>=r;--s)if(C(e.charCodeAt(s))){if(!i){r=s+1;break}}else n===-1&&(i=!1,n=s+1);return n===-1?"":e.slice(r,n)},extname(e){k(e,"path");let t=0,r=-1,n=0,i=-1,s=!0,o=0;e.length>=2&&e.charCodeAt(1)===Y&&X(e.charCodeAt(0))&&(t=n=2);for(let l=e.length-1;l>=t;--l){const u=e.charCodeAt(l);if(C(u)){if(!s){n=l+1;break}continue}i===-1&&(s=!1,i=l+1),u===u1?r===-1?r=l:o!==1&&(o=1):r!==-1&&(o=-1)}return r===-1||i===-1||o===0||o===1&&r===i-1&&r===n+1?"":e.slice(r,i)},format:xe.bind(null,"\\"),parse(e){k(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const r=e.length;let n=0,i=e.charCodeAt(0);if(r===1)return C(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(C(i)){if(n=1,C(e.charCodeAt(1))){let c=2,m=c;for(;c<r&&!C(e.charCodeAt(c));)c++;if(c<r&&c!==m){for(m=c;c<r&&C(e.charCodeAt(c));)c++;if(c<r&&c!==m){for(m=c;c<r&&!C(e.charCodeAt(c));)c++;c===r?n=c:c!==m&&(n=c+1)}}}}else if(X(i)&&e.charCodeAt(1)===Y){if(r<=2)return t.root=t.dir=e,t;if(n=2,C(e.charCodeAt(2))){if(r===3)return t.root=t.dir=e,t;n=3}}n>0&&(t.root=e.slice(0,n));let s=-1,o=n,l=-1,u=!0,a=e.length-1,h=0;for(;a>=n;--a){if(i=e.charCodeAt(a),C(i)){if(!u){o=a+1;break}continue}l===-1&&(u=!1,l=a+1),i===u1?s===-1?s=a:h!==1&&(h=1):s!==-1&&(h=-1)}return l!==-1&&(s===-1||h===0||h===1&&s===l-1&&s===o+1?t.base=t.name=e.slice(o,l):(t.name=e.slice(o,s),t.base=e.slice(o,l),t.ext=e.slice(s,l))),o>0&&o!==n?t.dir=e.slice(0,o-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},rr=(()=>{if(V){const e=/\\/g;return()=>{const t=k1().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>k1()})(),_={resolve(...e){let t="",r=!1;for(let n=e.length-1;n>=0&&!r;n--){const i=e[n];k(i,`paths[${n}]`),i.length!==0&&(t=`${i}/${t}`,r=i.charCodeAt(0)===U)}if(!r){const n=rr();t=`${n}/${t}`,r=n.charCodeAt(0)===U}return t=R1(t,!r,"/",X1),r?`/${t}`:t.length>0?t:"."},normalize(e){if(k(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===U,r=e.charCodeAt(e.length-1)===U;return e=R1(e,!t,"/",X1),e.length===0?t?"/":r?"./":".":(r&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return k(e,"path"),e.length>0&&e.charCodeAt(0)===U},join(...e){if(e.length===0)return".";const t=[];for(let r=0;r<e.length;++r){const n=e[r];k(n,"path"),n.length>0&&t.push(n)}return t.length===0?".":_.normalize(t.join("/"))},relative(e,t){if(k(e,"from"),k(t,"to"),e===t||(e=_.resolve(e),t=_.resolve(t),e===t))return"";const r=1,n=e.length,i=n-r,s=1,o=t.length-s,l=i<o?i:o;let u=-1,a=0;for(;a<l;a++){const c=e.charCodeAt(r+a);if(c!==t.charCodeAt(s+a))break;c===U&&(u=a)}if(a===l)if(o>l){if(t.charCodeAt(s+a)===U)return t.slice(s+a+1);if(a===0)return t.slice(s+a)}else i>l&&(e.charCodeAt(r+a)===U?u=a:a===0&&(u=0));let h="";for(a=r+u+1;a<=n;++a)(a===n||e.charCodeAt(a)===U)&&(h+=h.length===0?"..":"/..");return`${h}${t.slice(s+u)}`},toNamespacedPath(e){return e},dirname(e){if(k(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===U;let r=-1,n=!0;for(let i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===U){if(!n){r=i;break}}else n=!1;return r===-1?t?"/":".":t&&r===1?"//":e.slice(0,r)},basename(e,t){t!==void 0&&k(t,"suffix"),k(e,"path");let r=0,n=-1,i=!0,s;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,l=-1;for(s=e.length-1;s>=0;--s){const u=e.charCodeAt(s);if(u===U){if(!i){r=s+1;break}}else l===-1&&(i=!1,l=s+1),o>=0&&(u===t.charCodeAt(o)?--o===-1&&(n=s):(o=-1,n=l))}return r===n?n=l:n===-1&&(n=e.length),e.slice(r,n)}for(s=e.length-1;s>=0;--s)if(e.charCodeAt(s)===U){if(!i){r=s+1;break}}else n===-1&&(i=!1,n=s+1);return n===-1?"":e.slice(r,n)},extname(e){k(e,"path");let t=-1,r=0,n=-1,i=!0,s=0;for(let o=e.length-1;o>=0;--o){const l=e[o];if(l==="/"){if(!i){r=o+1;break}continue}n===-1&&(i=!1,n=o+1),l==="."?t===-1?t=o:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||n===-1||s===0||s===1&&t===n-1&&t===r+1?"":e.slice(t,n)},format:xe.bind(null,"/"),parse(e){k(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const r=e.charCodeAt(0)===U;let n;r?(t.root="/",n=1):n=0;let i=-1,s=0,o=-1,l=!0,u=e.length-1,a=0;for(;u>=n;--u){const h=e.charCodeAt(u);if(h===U){if(!l){s=u+1;break}continue}o===-1&&(l=!1,o=u+1),h===u1?i===-1?i=u:a!==1&&(a=1):i!==-1&&(a=-1)}if(o!==-1){const h=s===0&&r?1:s;i===-1||a===0||a===1&&i===o-1&&i===s+1?t.base=t.name=e.slice(h,o):(t.name=e.slice(h,i),t.base=e.slice(h,o),t.ext=e.slice(i,o))}return s>0?t.dir=e.slice(0,s-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};_.win32=R.win32=R,_.posix=R.posix=_;var nr=V?R.normalize:_.normalize,z2=V?R.isAbsolute:_.isAbsolute,ir=V?R.join:_.join,sr=V?R.resolve:_.resolve,or=V?R.relative:_.relative,lr=V?R.dirname:_.dirname,V2=V?R.basename:_.basename,H2=V?R.extname:_.extname,K2=V?R.format:_.format,B2=V?R.parse:_.parse,J2=V?R.toNamespacedPath:_.toNamespacedPath,M1=V?R.sep:_.sep,Z2=V?R.delimiter:_.delimiter,ar=/^\w[\w\d+.-]*$/,ur=/^\//,cr=/^\/\//;function hr(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!ar.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!ur.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(cr.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function fr(e,t){return!e&&!t?"file":e}function dr(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==J&&(t=J+t):t=J;break}return t}var P="",J="/",mr=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,H=class F1{static isUri(t){return t instanceof F1?!0:!t||typeof t!="object"?!1:typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="string"&&typeof t.with=="function"&&typeof t.toString=="function"}constructor(t,r,n,i,s,o=!1){typeof t=="object"?(this.scheme=t.scheme||P,this.authority=t.authority||P,this.path=t.path||P,this.query=t.query||P,this.fragment=t.fragment||P):(this.scheme=fr(t,o),this.authority=r||P,this.path=dr(this.scheme,n||P),this.query=i||P,this.fragment=s||P,hr(this,o))}get fsPath(){return T1(this,!1)}with(t){if(!t)return this;let{scheme:r,authority:n,path:i,query:s,fragment:o}=t;return r===void 0?r=this.scheme:r===null&&(r=P),n===void 0?n=this.authority:n===null&&(n=P),i===void 0?i=this.path:i===null&&(i=P),s===void 0?s=this.query:s===null&&(s=P),o===void 0?o=this.fragment:o===null&&(o=P),r===this.scheme&&n===this.authority&&i===this.path&&s===this.query&&o===this.fragment?this:new d1(r,n,i,s,o)}static parse(t,r=!1){const n=mr.exec(t);return n?new d1(n[2]||P,j1(n[4]||P),j1(n[5]||P),j1(n[7]||P),j1(n[9]||P),r):new d1(P,P,P,P,P)}static file(t){let r=P;if(l1&&(t=t.replace(/\\/g,J)),t[0]===J&&t[1]===J){const n=t.indexOf(J,2);n===-1?(r=t.substring(2),t=J):(r=t.substring(2,n),t=t.substring(n)||J)}return new d1("file",r,t,P,P)}static from(t,r){return new d1(t.scheme,t.authority,t.path,t.query,t.fragment,r)}static joinPath(t,...r){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return l1&&t.scheme==="file"?n=F1.file(R.join(T1(t,!0),...r)).path:n=_.join(t.path,...r),t.with({path:n})}toString(t=!1){return ee(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof F1)return t;{const r=new d1(t);return r._formatted=t.external??null,r._fsPath=t._sep===Pe?t.fsPath??null:null,r}}else return t}[Symbol.for("debug.description")](){return`URI(${this.toString()})`}},Pe=l1?1:void 0,d1=class extends H{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=T1(this,!1)),this._fsPath}toString(e=!1){return e?ee(this,!0):(this._formatted||(this._formatted=ee(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=Pe),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}},Se={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function Oe(e,t,r){let n,i=-1;for(let s=0;s<e.length;s++){const o=e.charCodeAt(s);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||r&&o===91||r&&o===93||r&&o===58)i!==-1&&(n+=encodeURIComponent(e.substring(i,s)),i=-1),n!==void 0&&(n+=e.charAt(s));else{n===void 0&&(n=e.substr(0,s));const l=Se[o];l!==void 0?(i!==-1&&(n+=encodeURIComponent(e.substring(i,s)),i=-1),n+=l):i===-1&&(i=s)}}return i!==-1&&(n+=encodeURIComponent(e.substring(i))),n!==void 0?n:e}function vr(e){let t;for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);n===35||n===63?(t===void 0&&(t=e.substr(0,r)),t+=Se[n]):t!==void 0&&(t+=e[r])}return t!==void 0?t:e}function T1(e,t){let r;return e.authority&&e.path.length>1&&e.scheme==="file"?r=`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?r=e.path.substr(1):r=e.path[1].toLowerCase()+e.path.substr(2):r=e.path,l1&&(r=r.replace(/\//g,"\\")),r}function ee(e,t){const r=t?vr:Oe;let n="",{scheme:i,authority:s,path:o,query:l,fragment:u}=e;if(i&&(n+=i,n+=":"),(s||i==="file")&&(n+=J,n+=J),s){let a=s.indexOf("@");if(a!==-1){const h=s.substr(0,a);s=s.substr(a+1),a=h.lastIndexOf(":"),a===-1?n+=r(h,!1,!1):(n+=r(h.substr(0,a),!1,!1),n+=":",n+=r(h.substr(a+1),!1,!0)),n+="@"}s=s.toLowerCase(),a=s.lastIndexOf(":"),a===-1?n+=r(s,!1,!0):(n+=r(s.substr(0,a),!1,!0),n+=s.substr(a))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){const a=o.charCodeAt(1);a>=65&&a<=90&&(o=`/${String.fromCharCode(a+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){const a=o.charCodeAt(0);a>=65&&a<=90&&(o=`${String.fromCharCode(a+32)}:${o.substr(2)}`)}n+=r(o,!0,!1)}return l&&(n+="?",n+=r(l,!1,!1)),u&&(n+="#",n+=t?u:Oe(u,!1,!1)),n}function ke(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+ke(e.substr(3)):e}}var Re=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function j1(e){return e.match(Re)?e.replace(Re,t=>ke(t)):e}var Me;function gr(e,t){const r=Object.create(null);for(const n of e){const i=t(n);let s=r[i];s||(s=r[i]=[]),s.push(n)}return r}var G2=class{static{Me=Symbol.toStringTag}constructor(e,t){this.b=t,this.a=new Map,this[Me]="SetWithKey";for(const r of e)this.add(r)}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(r=>e.call(t,r,r,this))}[Symbol.iterator](){return this.values()}},br=class{constructor(){this.b=[],this.a=function(e){setTimeout(()=>{throw e.stack?ne.isErrorNoTelemetry(e)?new ne(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)}},pr=new br;function w1(e){wr(e)||pr.onUnexpectedError(e)}function te(e){if(e instanceof Error){const{name:t,message:r,cause:n}=e,i=e.stacktrace||e.stack;return{$isError:!0,name:t,message:r,stack:i,noTelemetry:ne.isErrorNoTelemetry(e),cause:n?te(n):void 0,code:e.code}}return e}var re="Canceled";function wr(e){return e instanceof Te?!0:e instanceof Error&&e.name===re&&e.message===re}var Te=class extends Error{constructor(){super(re),this.name=this.message}},Q2=class W1 extends Error{static{this.a="PendingMigrationError"}static is(t){return t instanceof W1||t instanceof Error&&t.name===W1.a}constructor(t){super(t),this.name=W1.a}},ne=class ve extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof ve)return t;const r=new ve;return r.message=t.message,r.stack=t.stack,r}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},je=class Ct extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,Ct.prototype)}};function yr(e,t){const r=this;let n=!1,i;return function(){if(n)return i;if(n=!0,t)try{i=e.apply(r,arguments)}finally{t()}else i=e.apply(r,arguments);return i}}function Cr(e,t,r=0,n=e.length){let i=r,s=n;for(;i<s;){const o=Math.floor((i+s)/2);t(e[o])?i=o+1:s=o}return i-1}var Y2=class Lt{static{this.assertInvariants=!1}constructor(t){this.e=t,this.c=0}findLastMonotonous(t){if(Lt.assertInvariants){if(this.d){for(const n of this.e)if(this.d(n)&&!t(n))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this.d=t}const r=Cr(this.e,t,this.c);return this.c=r+1,r===-1?void 0:this.e[r]}},ie;(function(e){function t(s){return s<0}e.isLessThan=t;function r(s){return s<=0}e.isLessThanOrEqual=r;function n(s){return s>0}e.isGreaterThan=n;function i(s){return s===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(ie||(ie={}));function Lr(e,t){return(r,n)=>t(e(r),e(n))}var Ar=(e,t)=>e-t,X2=class z1{static{this.empty=new z1(t=>{})}constructor(t){this.iterate=t}forEach(t){this.iterate(r=>(t(r),!0))}toArray(){const t=[];return this.iterate(r=>(t.push(r),!0)),t}filter(t){return new z1(r=>this.iterate(n=>t(n)?r(n):!0))}map(t){return new z1(r=>this.iterate(n=>r(t(n))))}some(t){let r=!1;return this.iterate(n=>(r=t(n),!r)),r}findFirst(t){let r;return this.iterate(n=>t(n)?(r=n,!1):!0),r}findLast(t){let r;return this.iterate(n=>(t(n)&&(r=n),!0)),r}findLastMaxBy(t){let r,n=!0;return this.iterate(i=>((n||ie.isGreaterThan(t(i,r)))&&(n=!1,r=i),!0)),r}},Ie,Ue,qe,Nr=class{constructor(e,t){this.uri=e,this.value=t}};function $r(e){return Array.isArray(e)}var De=class C1{static{this.c=t=>t.toString()}constructor(t,r){if(this[Ie]="ResourceMap",t instanceof C1)this.d=new Map(t.d),this.e=r??C1.c;else if($r(t)){this.d=new Map,this.e=r??C1.c;for(const[n,i]of t)this.set(n,i)}else this.d=new Map,this.e=t??C1.c}set(t,r){return this.d.set(this.e(t),new Nr(t,r)),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,r){typeof r<"u"&&(t=t.bind(r));for(const[n,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]}*[(Ie=Symbol.toStringTag,Symbol.iterator)](){for(const[,t]of this.d)yield[t.uri,t.value]}},en=class{constructor(e,t){this[Ue]="ResourceSet",!e||typeof e=="function"?this.c=new De(e):(this.c=new De(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((r,n)=>e.call(t,n,n,this))}has(e){return this.c.has(e)}entries(){return this.c.entries()}keys(){return this.c.keys()}values(){return this.c.keys()}[(Ue=Symbol.toStringTag,Symbol.iterator)](){return this.keys()}},Fe;(function(e){e[e.None=0]="None",e[e.AsOld=1]="AsOld",e[e.AsNew=2]="AsNew"})(Fe||(Fe={}));var tn=class{constructor(){this[qe]="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 r=this.c.get(e);if(r)return t!==0&&this.n(r,t),r.value}set(e,t,r=0){let n=this.c.get(e);if(n)n.value=t,r!==0&&this.n(n,r);else{switch(n={key:e,value:t,next:void 0,previous:void 0},r){case 0:this.l(n);break;case 1:this.k(n);break;case 2:this.l(n);break;default:this.l(n);break}this.c.set(e,n),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 r=this.g;let n=this.d;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this.g!==r)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this,t=this.g;let r=this.d;const n={[Symbol.iterator](){return n},next(){if(e.g!==t)throw new Error("LinkedMap got modified during iteration.");if(r){const i={value:r.key,done:!1};return r=r.next,i}else return{value:void 0,done:!0}}};return n}values(){const e=this,t=this.g;let r=this.d;const n={[Symbol.iterator](){return n},next(){if(e.g!==t)throw new Error("LinkedMap got modified during iteration.");if(r){const i={value:r.value,done:!1};return r=r.next,i}else return{value:void 0,done:!0}}};return n}entries(){const e=this,t=this.g;let r=this.d;const n={[Symbol.iterator](){return n},next(){if(e.g!==t)throw new Error("LinkedMap got modified during iteration.");if(r){const i={value:[r.key,r.value],done:!1};return r=r.next,i}else return{value:void 0,done:!0}}};return n}[(qe=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}h(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this.d,r=this.size;for(;t&&r>e;)this.c.delete(t.key),t=t.next,r--;this.d=t,this.f=r,t&&(t.previous=void 0),this.g++}j(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this.e,r=this.size;for(;t&&r>e;)this.c.delete(t.key),t=t.previous,r--;this.e=t,this.f=r,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,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,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 r=e.next,n=e.previous;e===this.e?(n.next=void 0,this.e=n):(r.previous=n,n.next=r),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 r=e.next,n=e.previous;e===this.d?(r.previous=void 0,this.d=r):(r.previous=n,n.next=r),e.next=void 0,e.previous=this.e,this.e.next=e,this.e=e,this.g++}}}toJSON(){const e=[];return this.forEach((t,r)=>{e.push([r,t])}),e}fromJSON(e){this.clear();for(const[t,r]of e)this.set(t,r)}},Er=class{constructor(){this.c=new Map}add(e,t){let r=this.c.get(e);r||(r=new Set,this.c.set(e,r)),r.add(t)}delete(e,t){const r=this.c.get(e);r&&(r.delete(t),r.size===0&&this.c.delete(e))}forEach(e,t){const r=this.c.get(e);r&&r.forEach(t)}get(e){const t=this.c.get(e);return t||new Set}};function _r(e){return!!e&&typeof e[Symbol.iterator]=="function"}var I1;(function(e){function t(b){return!!b&&typeof b=="object"&&typeof b[Symbol.iterator]=="function"}e.is=t;const r=Object.freeze([]);function n(){return r}e.empty=n;function*i(b){yield b}e.single=i;function s(b){return t(b)?b:i(b)}e.wrap=s;function o(b){return b||r}e.from=o;function*l(b){for(let y=b.length-1;y>=0;y--)yield b[y]}e.reverse=l;function u(b){return!b||b[Symbol.iterator]().next().done===!0}e.isEmpty=u;function a(b){return b[Symbol.iterator]().next().value}e.first=a;function h(b,y){let N=0;for(const D of b)if(y(D,N++))return!0;return!1}e.some=h;function c(b,y){let N=0;for(const D of b)if(!y(D,N++))return!1;return!0}e.every=c;function m(b,y){for(const N of b)if(y(N))return N}e.find=m;function*w(b,y){for(const N of b)y(N)&&(yield N)}e.filter=w;function*L(b,y){let N=0;for(const D of b)yield y(D,N++)}e.map=L;function*x(b,y){let N=0;for(const D of b)yield*y(D,N++)}e.flatMap=x;function*S(...b){for(const y of b)_r(y)?yield*y:yield y}e.concat=S;function q(b,y,N){let D=N;for(const h1 of b)D=y(D,h1);return D}e.reduce=q;function r1(b){let y=0;for(const N of b)y++;return y}e.length=r1;function*j(b,y,N=b.length){for(y<-b.length&&(y=0),y<0&&(y+=b.length),N<0?N+=b.length:N>b.length&&(N=b.length);y<N;y++)yield b[y]}e.slice=j;function K1(b,y=Number.POSITIVE_INFINITY){const N=[];if(y===0)return[N,b];const D=b[Symbol.iterator]();for(let h1=0;h1<y;h1++){const $1=D.next();if($1.done)return[N,e.empty()];N.push($1.value)}return[N,{[Symbol.iterator](){return D}}]}e.consume=K1;async function B1(b){const y=[];for await(const N of b)y.push(N);return y}e.asyncToArray=B1;async function J1(b){let y=[];for await(const N of b)y=y.concat(N);return y}e.asyncToArrayFlat=J1})(I1||(I1={}));var xr=!1,m1=null,rn=class At{constructor(){this.b=new Map}static{this.a=0}c(t){let r=this.b.get(t);return r||(r={parent:null,source:null,isSingleton:!1,value:t,idx:At.a++},this.b.set(t,r)),r}trackDisposable(t){const r=this.c(t);r.source||(r.source=new Error().stack)}setParent(t,r){const n=this.c(t);n.parent=r}markAsDisposed(t){this.b.delete(t)}markAsSingleton(t){this.c(t).isSingleton=!0}f(t,r){const n=r.get(t);if(n)return n;const i=t.parent?this.f(this.c(t.parent),r):t;return r.set(t,i),i}getTrackedDisposables(){const t=new Map;return[...this.b.entries()].filter(([,n])=>n.source!==null&&!this.f(n,t).isSingleton).flatMap(([n])=>n)}computeLeakingDisposables(t=10,r){let n;if(r)n=r;else{const u=new Map,a=[...this.b.values()].filter(c=>c.source!==null&&!this.f(c,u).isSingleton);if(a.length===0)return;const h=new Set(a.map(c=>c.value));if(n=a.filter(c=>!(c.parent&&h.has(c.parent))),n.length===0)throw new Error("There are cyclic diposable chains!")}if(!n)return;function i(u){function a(c,m){for(;c.length>0&&m.some(w=>typeof w=="string"?w===c[0]:c[0].match(w));)c.shift()}const h=u.source.split(`
`).map(c=>c.trim().replace("at ","")).filter(c=>c!=="");return a(h,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),h.reverse()}const s=new Er;for(const u of n){const a=i(u);for(let h=0;h<=a.length;h++)s.add(a.slice(0,h).join(`
`),u)}n.sort(Lr(u=>u.idx,Ar));let o="",l=0;for(const u of n.slice(0,t)){l++;const a=i(u),h=[];for(let c=0;c<a.length;c++){let m=a[c];m=`(shared with ${s.get(a.slice(0,c+1).join(`
`)).size}/${n.length} leaks) at ${m}`;const L=s.get(a.slice(0,c).join(`
`)),x=gr([...L].map(S=>i(S)[c]),S=>S);delete x[a[c]];for(const[S,q]of Object.entries(x))h.unshift(` - stacktraces of ${q.length} other leaks continue with ${S}`);h.unshift(m)}o+=`
==================== Leaking disposable ${l}/${n.length}: ${u.value.constructor.name} ====================
${h.join(`
`)}
============================================================
`}return n.length>t&&(o+=`
... and ${n.length-t} more leaking disposables
`),{leaks:n,details:o}}};function Pr(e){m1=e}if(xr){const e="__is_disposable_tracked__";Pr(new class{trackDisposable(t){const r=new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[e]||console.log(r)},3e3)}setParent(t,r){if(t&&t!==v1.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==v1.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function se(e){return m1?.trackDisposable(e),e}function oe(e){m1?.markAsDisposed(e)}function le(e,t){m1?.setParent(e,t)}function Sr(e,t){if(m1)for(const r of e)m1.setParent(r,t)}function We(e){if(I1.is(e)){const t=[];for(const r of e)if(r)try{r.dispose()}catch(n){t.push(n)}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 Or(...e){const t=ze(()=>We(e));return Sr(e,t),t}function ze(e){const t=se({dispose:yr(()=>{oe(t),e()})});return t}var ae=class Nt{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this.f=new Set,this.g=!1,se(this)}dispose(){this.g||(oe(this),this.g=!0,this.clear())}get isDisposed(){return this.g}clear(){if(this.f.size!==0)try{We(this.f)}finally{this.f.clear()}}add(t){if(!t||t===v1.None)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return le(t,this),this.g?Nt.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),le(t,null))}assertNotDisposed(){this.g&&w1(new je("Object disposed"))}},v1=class{static{this.None=Object.freeze({dispose(){}})}constructor(){this.q=new ae,se(this),le(this.q,this)}dispose(){oe(this),this.q.dispose()}B(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this.q.add(e)}},O=class V1{static{this.Undefined=new V1(void 0)}constructor(t){this.element=t,this.next=V1.Undefined,this.prev=V1.Undefined}},kr=class{constructor(){this.a=O.Undefined,this.b=O.Undefined,this.c=0}get size(){return this.c}isEmpty(){return this.a===O.Undefined}clear(){let e=this.a;for(;e!==O.Undefined;){const t=e.next;e.prev=O.Undefined,e.next=O.Undefined,e=t}this.a=O.Undefined,this.b=O.Undefined,this.c=0}unshift(e){return this.d(e,!1)}push(e){return this.d(e,!0)}d(e,t){const r=new O(e);if(this.a===O.Undefined)this.a=r,this.b=r;else if(t){const i=this.b;this.b=r,r.prev=i,i.next=r}else{const i=this.a;this.a=r,r.next=i,i.prev=r}this.c+=1;let n=!1;return()=>{n||(n=!0,this.e(r))}}shift(){if(this.a!==O.Undefined){const e=this.a.element;return this.e(this.a),e}}pop(){if(this.b!==O.Undefined){const e=this.b.element;return this.e(this.b),e}}e(e){if(e.prev!==O.Undefined&&e.next!==O.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===O.Undefined&&e.next===O.Undefined?(this.a=O.Undefined,this.b=O.Undefined):e.next===O.Undefined?(this.b=this.b.prev,this.b.next=O.Undefined):e.prev===O.Undefined&&(this.a=this.a.next,this.a.prev=O.Undefined);this.c-=1}*[Symbol.iterator](){let e=this.a;for(;e!==O.Undefined;)yield e.element,e=e.next}},Rr=globalThis.performance.now.bind(globalThis.performance),Mr=class $t{static create(t){return new $t(t)}constructor(t){this.c=t===!1?Date.now:Rr,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}},Ve=!1,Tr=!1,U1;(function(e){e.None=()=>v1.None;function t(g){if(Tr){const{onDidAddListener:f}=g,v=ue.create();let d=0;g.onDidAddListener=()=>{++d===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),v.print()),f?.()}}}function r(g,f){return w(g,()=>{},0,void 0,!0,void 0,f)}e.defer=r;function n(g){return(f,v=null,d)=>{let p=!1,A;return A=g($=>{if(!p)return A?A.dispose():p=!0,f.call(v,$)},null,d),p&&A.dispose(),A}}e.once=n;function i(g,f){return e.once(e.filter(g,f))}e.onceIf=i;function s(g,f,v){return c((d,p=null,A)=>g($=>d.call(p,f($)),null,A),v)}e.map=s;function o(g,f,v){return c((d,p=null,A)=>g($=>{f($),d.call(p,$)},null,A),v)}e.forEach=o;function l(g,f,v){return c((d,p=null,A)=>g($=>f($)&&d.call(p,$),null,A),v)}e.filter=l;function u(g){return g}e.signal=u;function a(...g){return(f,v=null,d)=>{const p=Or(...g.map(A=>A($=>f.call(v,$))));return m(p,d)}}e.any=a;function h(g,f,v,d){let p=v;return s(g,A=>(p=f(p,A),p),d)}e.reduce=h;function c(g,f){let v;const d={onWillAddFirstListener(){v=g(p.fire,p)},onDidRemoveLastListener(){v?.dispose()}};f||t(d);const p=new e1(d);return f?.add(p),p.event}function m(g,f){return f instanceof Array?f.push(g):f&&f.add(g),g}function w(g,f,v=100,d=!1,p=!1,A,$){let I,F,o1,E1=0,b1;const pe={leakWarningThreshold:A,onWillAddFirstListener(){I=g(xt=>{E1++,F=f(F,xt),d&&!o1&&(_1.fire(F),F=void 0),b1=()=>{const Pt=F;F=void 0,o1=void 0,(!d||E1>1)&&_1.fire(Pt),E1=0},typeof v=="number"?(o1&&clearTimeout(o1),o1=setTimeout(b1,v)):o1===void 0&&(o1=null,queueMicrotask(b1))})},onWillRemoveListener(){p&&E1>0&&b1?.()},onDidRemoveLastListener(){b1=void 0,I.dispose()}};$||t(pe);const _1=new e1(pe);return $?.add(_1),_1.event}e.debounce=w;function L(g,f=0,v){return e.debounce(g,(d,p)=>d?(d.push(p),d):[p],f,void 0,!0,void 0,v)}e.accumulate=L;function x(g,f=(d,p)=>d===p,v){let d=!0,p;return l(g,A=>{const $=d||!f(A,p);return d=!1,p=A,$},v)}e.latch=x;function S(g,f,v){return[e.filter(g,f,v),e.filter(g,d=>!f(d),v)]}e.split=S;function q(g,f=!1,v=[],d){let p=v.slice(),A=g(F=>{p?p.push(F):I.fire(F)});d&&d.add(A);const $=()=>{p?.forEach(F=>I.fire(F)),p=null},I=new e1({onWillAddFirstListener(){A||(A=g(F=>I.fire(F)),d&&d.add(A))},onDidAddFirstListener(){p&&(f?setTimeout($):$())},onDidRemoveLastListener(){A&&A.dispose(),A=null}});return d&&d.add(I),I.event}e.buffer=q;function r1(g,f){return(d,p,A)=>{const $=f(new K1);return g(function(I){const F=$.evaluate(I);F!==j&&d.call(p,F)},void 0,A)}}e.chain=r1;const j=Symbol("HaltChainable");class K1{constructor(){this.f=[]}map(f){return this.f.push(f),this}forEach(f){return this.f.push(v=>(f(v),v)),this}filter(f){return this.f.push(v=>f(v)?v:j),this}reduce(f,v){let d=v;return this.f.push(p=>(d=f(d,p),d)),this}latch(f=(v,d)=>v===d){let v=!0,d;return this.f.push(p=>{const A=v||!f(p,d);return v=!1,d=p,A?p:j}),this}evaluate(f){for(const v of this.f)if(f=v(f),f===j)break;return f}}function B1(g,f,v=d=>d){c