/*!--------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
/******************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */

var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
    return extendStatics(d, b);
};

export function __extends(d, b) {
    if (typeof b !== "function" && b !== null)
        throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
    extendStatics(d, b);
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}

export var __assign = function() {
    __assign = Object.assign || function __assign(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
        }
        return t;
    }
    return __assign.apply(this, arguments);
}

export function __rest(s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                t[p[i]] = s[p[i]];
        }
    return t;
}

export function __decorate(decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
}

export function __param(paramIndex, decorator) {
    return function (target, key) { decorator(target, key, paramIndex); }
}

export function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
    function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
    var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
    var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
    var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
    var _, done = false;
    for (var i = decorators.length - 1; i >= 0; i--) {
        var context = {};
        for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
        for (var p in contextIn.access) context.access[p] = contextIn.access[p];
        context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
        var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
        if (kind === "accessor") {
            if (result === void 0) continue;
            if (result === null || typeof result !== "object") throw new TypeError("Object expected");
            if (_ = accept(result.get)) descriptor.get = _;
            if (_ = accept(result.set)) descriptor.set = _;
            if (_ = accept(result.init)) initializers.unshift(_);
        }
        else if (_ = accept(result)) {
            if (kind === "field") initializers.unshift(_);
            else descriptor[key] = _;
        }
    }
    if (target) Object.defineProperty(target, contextIn.name, descriptor);
    done = true;
};

export function __runInitializers(thisArg, initializers, value) {
    var useValue = arguments.length > 2;
    for (var i = 0; i < initializers.length; i++) {
        value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
    }
    return useValue ? value : void 0;
};

export function __propKey(x) {
    return typeof x === "symbol" ? x : "".concat(x);
};

export function __setFunctionName(f, name, prefix) {
    if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
    return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
};

export function __metadata(metadataKey, metadataValue) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}

export function __awaiter(thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
}

export function __generator(thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
    return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (g && (g = 0, op[0] && (_ = 0)), _) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
}

export var __createBinding = Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
        desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
});

export function __exportStar(m, o) {
    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
}

export function __values(o) {
    var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
    if (m) return m.call(o);
    if (o && typeof o.length === "number") return {
        next: function () {
            if (o && i >= o.length) o = void 0;
            return { value: o && o[i++], done: !o };
        }
    };
    throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}

export function __read(o, n) {
    var m = typeof Symbol === "function" && o[Symbol.iterator];
    if (!m) return o;
    var i = m.call(o), r, ar = [], e;
    try {
        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
    }
    catch (error) { e = { error: error }; }
    finally {
        try {
            if (r && !r.done && (m = i["return"])) m.call(i);
        }
        finally { if (e) throw e.error; }
    }
    return ar;
}

/** @deprecated */
export function __spread() {
    for (var ar = [], i = 0; i < arguments.length; i++)
        ar = ar.concat(__read(arguments[i]));
    return ar;
}

/** @deprecated */
export function __spreadArrays() {
    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
    for (var r = Array(s), k = 0, i = 0; i < il; i++)
        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
            r[k] = a[j];
    return r;
}

export function __spreadArray(to, from, pack) {
    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
        if (ar || !(i in from)) {
            if (!ar) ar = Array.prototype.slice.call(from, 0, i);
            ar[i] = from[i];
        }
    }
    return to.concat(ar || Array.prototype.slice.call(from));
}

export function __await(v) {
    return this instanceof __await ? (this.v = v, this) : new __await(v);
}

export function __asyncGenerator(thisArg, _arguments, generator) {
    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
    var g = generator.apply(thisArg, _arguments || []), i, q = [];
    return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
    function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
    function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
    function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
    function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
    function fulfill(value) { resume("next", value); }
    function reject(value) { resume("throw", value); }
    function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
}

export function __asyncDelegator(o) {
    var i, p;
    return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
    function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
}

export function __asyncValues(o) {
    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
    var m = o[Symbol.asyncIterator], i;
    return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
    function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
    function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
}

export function __makeTemplateObject(cooked, raw) {
    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
    return cooked;
};

var __setModuleDefault = Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
};

var ownKeys = function(o) {
    ownKeys = Object.getOwnPropertyNames || function (o) {
        var ar = [];
        for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
        return ar;
    };
    return ownKeys(o);
};

export function __importStar(mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
    __setModuleDefault(result, mod);
    return result;
}

export function __importDefault(mod) {
    return (mod && mod.__esModule) ? mod : { default: mod };
}

export function __classPrivateFieldGet(receiver, state, kind, f) {
    if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
    if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
    return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
}

export function __classPrivateFieldSet(receiver, state, value, kind, f) {
    if (kind === "m") throw new TypeError("Private method is not writable");
    if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
    if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
    return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
}

export function __classPrivateFieldIn(state, receiver) {
    if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
    return typeof state === "function" ? receiver === state : state.has(receiver);
}

export function __addDisposableResource(env, value, async) {
    if (value !== null && value !== void 0) {
        if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
        var dispose, inner;
        if (async) {
            if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
            dispose = value[Symbol.asyncDispose];
        }
        if (dispose === void 0) {
            if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
            dispose = value[Symbol.dispose];
            if (async) inner = dispose;
        }
        if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
        if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
        env.stack.push({ value: value, dispose: dispose, async: async });
    }
    else if (async) {
        env.stack.push({ async: true });
    }
    return value;

}

var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
    var e = new Error(message);
    return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
};

export function __disposeResources(env) {
    function fail(e) {
        env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
        env.hasError = true;
    }
    var r, s = 0;
    function next() {
        while (r = env.stack.pop()) {
            try {
                if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
                if (r.dispose) {
                    var result = r.dispose.call(r.value);
                    if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
                }
                else s |= 1;
            }
            catch (e) {
                fail(e);
            }
        }
        if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
        if (env.hasError) throw env.error;
    }
    return next();
}

export function __rewriteRelativeImportExtension(path, preserveJsx) {
    if (typeof path === "string" && /^\.\.?\//.test(path)) {
        return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
            return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
        });
    }
    return path;
}

export default {
    __extends: __extends,
    __assign: __assign,
    __rest: __rest,
    __decorate: __decorate,
    __param: __param,
    __esDecorate: __esDecorate,
    __runInitializers: __runInitializers,
    __propKey: __propKey,
    __setFunctionName: __setFunctionName,
    __metadata: __metadata,
    __awaiter: __awaiter,
    __generator: __generator,
    __createBinding: __createBinding,
    __exportStar: __exportStar,
    __values: __values,
    __read: __read,
    __spread: __spread,
    __spreadArrays: __spreadArrays,
    __spreadArray: __spreadArray,
    __await: __await,
    __asyncGenerator: __asyncGenerator,
    __asyncDelegator: __asyncDelegator,
    __asyncValues: __asyncValues,
    __makeTemplateObject: __makeTemplateObject,
    __importStar: __importStar,
    __importDefault: __importDefault,
    __classPrivateFieldGet: __classPrivateFieldGet,
    __classPrivateFieldSet: __classPrivateFieldSet,
    __classPrivateFieldIn: __classPrivateFieldIn,
    __addDisposableResource: __addDisposableResource,
    __disposeResources: __disposeResources,
    __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,
};

var Fn=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?mt.isErrorNoTelemetry(e)?new mt(e.message+`

`+e.stack):new Error(e.message+`

`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},di=new Fn;function Ee(r){Vn(r)||di.onUnexpectedError(r)}function fi(r){Vn(r)||di.onUnexpectedExternalError(r)}function jt(r){if(r instanceof Error){let{name:e,message:t,cause:n}=r,i=r.stacktrace||r.stack;return{$isError:!0,name:e,message:t,stack:i,noTelemetry:mt.isErrorNoTelemetry(r),cause:n?jt(n):void 0,code:r.code}}return r}var Kn="Canceled";function Vn(r){return r instanceof it?!0:r instanceof Error&&r.name===Kn&&r.message===Kn}var it=class extends Error{constructor(){super(Kn),this.name=this.message}},ci=class r extends Error{static{this._name="PendingMigrationError"}static is(e){return e instanceof r||e instanceof Error&&e.name===r._name}constructor(e){super(e),this.name=r._name}};function pi(r){return r?new Error(`Illegal state: ${r}`):new Error("Illegal state")}var mt=class r extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof r)return e;let t=new r;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}},je=class r extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,r.prototype)}};function bi(r,e){let t=Object.create(null);for(let n of r){let i=e(n),o=t[i];o||(o=t[i]=[]),o.push(n)}return t}var mi,gi,hi=class{constructor(e,t){this.toKey=t;this._map=new Map;this[mi]="SetWithKey";for(let n of e)this.add(n)}get size(){return this._map.size}add(e){let t=this.toKey(e);return this._map.set(t,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,t){this._map.forEach(n=>e.call(t,n,n,this))}[(gi=Symbol.iterator,mi=Symbol.toStringTag,gi)](){return this.values()}};function os(r,e,t=0,n=r.length){let i=t,o=n;for(;i<o;){let s=Math.floor((i+o)/2);e(r[s])?i=s+1:o=s}return i-1}var xi=class r{constructor(e){this._array=e;this._findLastMonotonousLastIdx=0}static{this.assertInvariants=!1}findLastMonotonous(e){if(r.assertInvariants){if(this._prevFindLastPredicate){for(let n of this._array)if(this._prevFindLastPredicate(n)&&!e(n))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=e}let t=os(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=t+1,t===-1?void 0:this._array[t]}};var yi;(a=>{function r(l){return l<0}a.isLessThan=r;function e(l){return l<=0}a.isLessThanOrEqual=e;function t(l){return l>0}a.isGreaterThan=t;function n(l){return l===0}a.isNeitherLessOrGreaterThan=n,a.greaterThan=1,a.lessThan=-1,a.neitherLessOrGreaterThan=0})(yi||={});function Ti(r,e){return(t,n)=>e(r(t),r(n))}var vi=(r,e)=>r-e;var _i=class r{constructor(e){this.iterate=e}static{this.empty=new r(e=>{})}forEach(e){this.iterate(t=>(e(t),!0))}toArray(){let e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(e){return new r(t=>this.iterate(n=>e(n)?t(n):!0))}map(e){return new r(t=>this.iterate(n=>t(e(n))))}some(e){let t=!1;return this.iterate(n=>(t=e(n),!t)),t}findFirst(e){let t;return this.iterate(n=>e(n)?(t=n,!1):!0),t}findLast(e){let t;return this.iterate(n=>(e(n)&&(t=n),!0)),t}findLastMaxBy(e){let t,n=!0;return this.iterate(i=>((n||yi.isGreaterThan(e(i,t)))&&(n=!1,t=i),!0)),t}};var Wn=class{constructor(e,t){this.uri=e;this.value=t}};function ss(r){return Array.isArray(r)}var Ei,He=class r{constructor(e,t){this[Ei]="ResourceMap";if(e instanceof r)this.map=new Map(e.map),this.toKey=t??r.defaultToKey;else if(ss(e)){this.map=new Map,this.toKey=t??r.defaultToKey;for(let[n,i]of e)this.set(n,i)}else this.map=new Map,this.toKey=e??r.defaultToKey}static{this.defaultToKey=e=>e.toString()}set(e,t){return this.map.set(this.toKey(e),new Wn(e,t)),this}get(e){return this.map.get(this.toKey(e))?.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){typeof t<"u"&&(e=e.bind(t));for(let[n,i]of this.map)e(i.value,i.uri,this)}*values(){for(let e of this.map.values())yield e.value}*keys(){for(let e of this.map.values())yield e.uri}*entries(){for(let e of this.map.values())yield[e.uri,e.value]}*[(Ei=Symbol.toStringTag,Symbol.iterator)](){for(let[,e]of this.map)yield[e.uri,e.value]}},wi,Ii=class{constructor(e,t){this[wi]="ResourceSet";!e||typeof e=="function"?this._map=new He(e):(this._map=new He(t),e.forEach(this.add,this))}get size(){return this._map.size}add(e){return this._map.set(e,e),this}clear(){this._map.clear()}delete(e){return this._map.delete(e)}forEach(e,t){this._map.forEach((n,i)=>e.call(t,i,i,this))}has(e){return this._map.has(e)}entries(){return this._map.entries()}keys(){return this._map.keys()}values(){return this._map.keys()}[(wi=Symbol.toStringTag,Symbol.iterator)](){return this.keys()}};var Si,qn=class{constructor(){this[Si]="LinkedMap";this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=0){let n=this._map.get(e);if(n)return t!==0&&this.touch(n,t),n.value}set(e,t,n=0){let i=this._map.get(e);if(i)i.value=t,n!==0&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case 0:this.addItemLast(i);break;case 1:this.addItemFirst(i);break;case 2:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let n=this._state,i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let e=this,t=this._state,n=this._head,i={[Symbol.iterator](){return i},[Symbol.dispose](){},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.key,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return i}values(){let e=this,t=this._state,n=this._head,i={[Symbol.iterator](){return i},[Symbol.dispose](){},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:n.value,done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return i}entries(){let e=this,t=this._state,n=this._head,i={[Symbol.iterator](){return i},[Symbol.dispose](){},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let o={value:[n.key,n.value],done:!1};return n=n.next,o}else return{value:void 0,done:!0}}};return i}[(Si=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._tail,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.previous,n--;this._tail=t,this._size=n,t&&(t.next=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==1&&t!==2)){if(t===1){if(e===this._head)return;let n=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(n.previous=i,i.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===2){if(e===this._tail)return;let n=e.next,i=e.previous;e===this._head?(n.previous=void 0,this._head=n):(n.previous=i,i.next=n),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(let[t,n]of e)this.set(t,n)}},zn=class extends qn{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}},ot=class extends zn{constructor(e,t=1){super(e,t)}trim(e){this.trimOld(e)}set(e,t){return super.set(e,t),this.checkTrim(),this}};var Ht=class{constructor(){this.map=new Map}add(e,t){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)}delete(e,t){let n=this.map.get(e);n&&(n.delete(t),n.size===0&&this.map.delete(e))}forEach(e,t){let n=this.map.get(e);n&&n.forEach(t)}get(e){let t=this.map.get(e);return t||new Set}};function Ci(r){return!!r&&typeof r[Symbol.iterator]=="function"}var st;(z=>{function r(y){return!!y&&typeof y=="object"&&typeof y[Symbol.iterator]=="function"}z.is=r;let e=Object.freeze([]);function t(){return e}z.empty=t;function*n(y){yield y}z.single=n;function i(y){return r(y)?y:n(y)}z.wrap=i;function o(y){return y??e}z.from=o;function*s(y){for(let _=y.length-1;_>=0;_--)yield y[_]}z.reverse=s;function a(y){return!y||y[Symbol.iterator]().next().done===!0}z.isEmpty=a;function l(y){return y[Symbol.iterator]().next().value}z.first=l;function u(y,_){let k=0;for(let K of y)if(_(K,k++))return!0;return!1}z.some=u;function d(y,_){let k=0;for(let K of y)if(!_(K,k++))return!1;return!0}z.every=d;function c(y,_){for(let k of y)if(_(k))return k}z.find=c;function*f(y,_){for(let k of y)_(k)&&(yield k)}z.filter=f;function*p(y,_){let k=0;for(let K of y)yield _(K,k++)}z.map=p;function*g(y,_){let k=0;for(let K of y)yield*_(K,k++)}z.flatMap=g;function*T(...y){for(let _ of y)Ci(_)?yield*_:yield _}z.concat=T;function b(y,_,k){let K=k;for(let U of y)K=_(K,U);return K}z.reduce=b;function h(y){let _=0;for(let k of y)_++;return _}z.length=h;function*x(y,_,k=y.length){for(_<-y.length&&(_=0),_<0&&(_+=y.length),k<0?k+=y.length:k>y.length&&(k=y.length);_<k;_++)yield y[_]}z.slice=x;function m(y,_=Number.POSITIVE_INFINITY){let k=[];if(_===0)return[k,y];let K=y[Symbol.iterator]();for(let U=0;U<_;U++){let P=K.next();if(P.done)return[k,z.empty()];k.push(P.value)}return[k,{[Symbol.iterator](){return K}}]}z.consume=m;async function L(y){let _=[];for await(let k of y)_.push(k);return _}z.asyncToArray=L;async function R(y){let _=[];for await(let k of y)_=_.concat(k);return _}z.asyncToArrayFlat=R})(st||={});var ls=!1,at=null;var Li=class r{constructor(){this.livingDisposables=new Map}static{this.idx=0}getDisposableData(e){let t=this.livingDisposables.get(e);return t||(t={parent:null,source:null,isSingleton:!1,value:e,idx:r.idx++},this.livingDisposables.set(e,t)),t}trackDisposable(e){let t=this.getDisposableData(e);t.source||(t.source=new Error().stack)}setParent(e,t){let n=this.getDisposableData(e);n.parent=t}markAsDisposed(e){this.livingDisposables.delete(e)}markAsSingleton(e){this.getDisposableData(e).isSingleton=!0}getRootParent(e,t){let n=t.get(e);if(n)return n;let i=e.parent?this.getRootParent(this.getDisposableData(e.parent),t):e;return t.set(e,i),i}getTrackedDisposables(){let e=new Map;return[...this.livingDisposables.entries()].filter(([,n])=>n.source!==null&&!this.getRootParent(n,e).isSingleton).flatMap(([n])=>n)}computeLeakingDisposables(e=10,t){let n;if(t)n=t;else{let l=new Map,u=[...this.livingDisposables.values()].filter(c=>c.source!==null&&!this.getRootParent(c,l).isSingleton);if(u.length===0)return;let d=new Set(u.map(c=>c.value));if(n=u.filter(c=>!(c.parent&&d.has(c.parent))),n.length===0)throw new Error("There are cyclic diposable chains!")}if(!n)return;function i(l){function u(c,f){for(;c.length>0&&f.some(p=>typeof p=="string"?p===c[0]:c[0].match(p));)c.shift()}let d=l.source.split(`
`).map(c=>c.trim().replace("at ","")).filter(c=>c!=="");return u(d,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),d.reverse()}let o=new Ht;for(let l of n){let u=i(l);for(let d=0;d<=u.length;d++)o.add(u.slice(0,d).join(`
`),l)}n.sort(Ti(l=>l.idx,vi));let s="",a=0;for(let l of n.slice(0,e)){a++;let u=i(l),d=[];for(let c=0;c<u.length;c++){let f=u[c];f=`(shared with ${o.get(u.slice(0,c+1).join(`
`)).size}/${n.length} leaks) at ${f}`;let g=o.get(u.slice(0,c).join(`
`)),T=bi([...g].map(b=>i(b)[c]),b=>b);delete T[u[c]];for(let[b,h]of Object.entries(T))h&&d.unshift(`    - stacktraces of ${h.length} other leaks continue with ${b}`);d.unshift(f)}s+=`


==================== Leaking disposable ${a}/${n.length}: ${l.value.constructor.name} ====================
${d.join(`
`)}
============================================================

`}return n.length>e&&(s+=`


... and ${n.length-e} more leaking disposables

`),{leaks:n,details:s}}};function us(r){at=r}if(ls){let r="__is_disposable_tracked__";us(new class{trackDisposable(e){let t=new Error("Potentially leaked disposable").stack;setTimeout(()=>{e[r]||console.log(t)},3e3)}setParent(e,t){if(e&&e!==ce.None)try{e[r]=!0}catch{}}markAsDisposed(e){if(e&&e!==ce.None)try{e[r]=!0}catch{}}markAsSingleton(e){}})}function Hn(r){return at?.trackDisposable(r),r}function Gn(r){at?.markAsDisposed(r)}function $n(r,e){at?.setParent(r,e)}function cs(r,e){if(at)for(let t of r)at.setParent(t,e)}function Qn(r){if(st.is(r)){let e=[];for(let t of r)if(t)try{t.dispose()}catch(n){e.push(n)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(r)?[]:r}else if(r)return r.dispose(),r}function ki(...r){let e=Oe(()=>Qn(r));return cs(r,e),e}var jn=class{constructor(e){this._isDisposed=!1,this._fn=e,Hn(this)}dispose(){if(!this._isDisposed){if(!this._fn)throw new Error("Unbound disposable context: Need to use an arrow function to preserve the value of this");this._isDisposed=!0,Gn(this),this._fn()}}};function Oe(r){return new jn(r)}var we=class r{constructor(){this._toDispose=new Set;this._isDisposed=!1;Hn(this)}static{this.DISABLE_DISPOSED_WARNING=!1}dispose(){this._isDisposed||(Gn(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Qn(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e||e===ce.None)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return $n(e,this),this._isDisposed?r.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._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}deleteAndLeak(e){e&&this._toDispose.delete(e)&&$n(e,null)}assertNotDisposed(){this._isDisposed&&Ee(new je("Object disposed"))}},ce=class{constructor(){this._store=new we;Hn(this),$n(this._store,this)}static{this.None=Object.freeze({dispose(){}})}dispose(){Gn(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};var q=class r{static{this.Undefined=new r(void 0)}constructor(e){this.element=e,this.next=r.Undefined,this.prev=r.Undefined}},gt=class{constructor(){this._first=q.Undefined;this._last=q.Undefined;this._size=0}get size(){return this._size}isEmpty(){return this._first===q.Undefined}clear(){let e=this._first;for(;e!==q.Undefined;){let t=e.next;e.prev=q.Undefined,e.next=q.Undefined,e=t}this._first=q.Undefined,this._last=q.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let n=new q(e);if(this._first===q.Undefined)this._first=n,this._last=n;else if(t){let o=this._last;this._last=n,n.prev=o,o.next=n}else{let o=this._first;this._first=n,n.next=o,o.prev=n}this._size+=1;let i=!1;return()=>{i||(i=!0,this._remove(n))}}shift(){if(this._first!==q.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==q.Undefined){let e=this._last.element;return this._remove(this._last),e}}peek(){if(this._last!==q.Undefined)return this._last.element}_remove(e){if(e.prev!==q.Undefined&&e.next!==q.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===q.Undefined&&e.next===q.Undefined?(this._first=q.Undefined,this._last=q.Undefined):e.next===q.Undefined?(this._last=this._last.prev,this._last.next=q.Undefined):e.prev===q.Undefined&&(this._first=this._first.next,this._first.prev=q.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==q.Undefined;)yield e.element,e=e.next}};function ds(){return globalThis._VSCODE_NLS_MESSAGES}function Yn(){return globalThis._VSCODE_NLS_LANGUAGE}var fs=Yn()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function Ri(r,e){let t;return e.length===0?t=r:t=r.replace(/\{(\d+)\}/g,(n,i)=>{let o=i[0],s=e[o],a=n;return typeof s=="string"?a=s:(typeof s=="number"||typeof s=="boolean"||s===void 0||s===null)&&(a=String(s)),a}),fs&&(t="\uFF3B"+t.replace(/[aouei]/g,"$&$&")+"\uFF3D"),t}function te(r,e,...t){return Ri(typeof r=="number"?ps(r,e):e,t)}function ps(r,e){let t=ds()?.[r];if(typeof t!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${r} !!!`)}return t}var Ue="en",Yt=!1,Xt=!1,bt=!1,ms=!1,Ni=!1,Zn=!1,gs=!1,bs=!1,xs=!1,_s=!1,Gt,Qt=Ue,Ai=Ue,ys,Se,Ce=globalThis,de;typeof Ce.vscode<"u"&&typeof Ce.vscode.process<"u"?de=Ce.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(de=process);var Pi=typeof de?.versions?.electron=="string",Ts=Pi&&de?.type==="renderer";if(typeof de=="object"){Yt=de.platform==="win32",Xt=de.platform==="darwin",bt=de.platform==="linux",ms=bt&&!!de.env.SNAP&&!!de.env.SNAP_REVISION,gs=Pi,xs=!!de.env.CI||!!de.env.BUILD_ARTIFACTSTAGINGDIRECTORY||!!de.env.GITHUB_WORKSPACE,Gt=Ue,Qt=Ue;let r=de.env.VSCODE_NLS_CONFIG;if(r)try{let e=JSON.parse(r);Gt=e.userLocale,Ai=e.osLocale,Qt=e.resolvedLanguage||Ue,ys=e.languagePack?.translationsConfigFile}catch{}Ni=!0}else typeof navigator=="object"&&!Ts?(Se=navigator.userAgent,Yt=Se.indexOf("Windows")>=0,Xt=Se.indexOf("Macintosh")>=0,bs=(Se.indexOf("Macintosh")>=0||Se.indexOf("iPad")>=0||Se.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,bt=Se.indexOf("Linux")>=0,_s=Se?.indexOf("Mobi")>=0,Zn=!0,Qt=Yn()||Ue,Gt=navigator.language.toLowerCase(),Ai=Gt):console.error("Unable to resolve platform.");var Xn=0;Xt?Xn=1:Yt?Xn=3:bt&&(Xn=2);var ue=Yt,xt=Xt,_t=bt;var Di=Ni;var Ge=Zn,vs=Zn&&typeof Ce.importScripts=="function",Oi=vs?Ce.origin:void 0;var _e=Se,Me=Qt,Is;(n=>{function r(){return Me}n.value=r;function e(){return Me.length===2?Me==="en":Me.length>=3?Me[0]==="e"&&Me[1]==="n"&&Me[2]==="-":!1}n.isDefaultVariant=e;function t(){return Me==="en"}n.isDefault=t})(Is||={});var Es=typeof Ce.postMessage=="function"&&!Ce.importScripts,Mi=(()=>{if(Es){let r=[];Ce.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,i=r.length;n<i;n++){let o=r[n];if(o.id===t.data.vscodeScheduleAsyncWork){r.splice(n,1),o.callback();return}}});let e=0;return t=>{let n=++e;r.push({id:n,callback:t}),Ce.postMessage({vscodeScheduleAsyncWork:n},"*")}}return r=>setTimeout(r)})();var Jn=!!(_e&&_e.indexOf("Chrome")>=0),Ui=!!(_e&&_e.indexOf("Firefox")>=0),Bi=!!(!Jn&&_e&&_e.indexOf("Safari")>=0),Fi=!!(_e&&_e.indexOf("Edg/")>=0),Vl=!!(_e&&_e.indexOf("Android")>=0);var Qe,er=globalThis.vscode;if(typeof er<"u"&&typeof er.process<"u"){let r=er.process;Qe={get platform(){return r.platform},get arch(){return r.arch},get env(){return r.env},cwd(){return r.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?Qe={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:Qe={get platform(){return ue?"win32":xt?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};var yt=Qe.cwd,Zt=Qe.env,Vi=Qe.platform,zl=Qe.arch;var Ss=globalThis.performance.now.bind(globalThis.performance),Jt=class r{static create(e){return new r(e)}constructor(e){this._now=e===!1?Date.now:Ss,this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}};var Wi=!1,Ls=!1,ks=100,qi=6e4;function zi(){return!!Zt.VSCODE_DEV}var Tt;(ze=>{ze.None=()=>ce.None;function e(S){if(Ls){let{onDidAddListener:v}=S,I=ut.create(),w=0;S.onDidAddListener=()=>{++w===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),I.print()),v?.()}}}function t(S,v,I){return p(S,()=>{},0,void 0,v??!0,void 0,I)}ze.defer=t;function n(S){return(v,I=null,w)=>{let C=!1,A;return A=S(D=>{if(!C)return A?A.dispose():C=!0,v.call(I,D)},null,w),C&&A.dispose(),A}}ze.once=n;function i(S,v){return ze.once(ze.filter(S,v))}ze.onceIf=i;function o(S,v,I){return c((w,C=null,A)=>S(D=>w.call(C,v(D)),null,A),I)}ze.map=o;function s(S,v,I){return c((w,C=null,A)=>S(D=>{v(D),w.call(C,D)},null,A),I)}ze.forEach=s;function a(S,v,I){return c((w,C=null,A)=>S(D=>v(D)&&w.call(C,D),null,A),I)}ze.filter=a;function l(S){return S}ze.signal=l;function u(...S){return(v,I=null,w)=>{let C=ki(...S.map(A=>A(D=>v.call(I,D))));return f(C,w)}}ze.any=u;function d(S,v,I,w){let C=I;return o(S,A=>(C=v(C,A),C),w)}ze.reduce=d;function c(S,v){let I,w={onWillAddFirstListener(){I=S(C.fire,C)},onDidRemoveLastListener(){I?.dispose()}};v||e(w);let C=new ne(w);return v?.add(C),C.event}function f(S,v){return v instanceof Array?v.push(S):v&&v.add(S),S}function p(S,v,I=100,w=!1,C=!1,A,D){let Y,V,ee,X=0,oe,Ie={leakWarningThreshold:A,onWillAddFirstListener(){Y=S(li=>{X++,V=v(V,li),w&&!ee&&($e.fire(V),V=void 0),oe=()=>{let ui=V;V=void 0,ee=void 0,(!w||X>1)&&$e.fire(ui),X=0},typeof I=="number"?(ee&&clearTimeout(ee),ee=setTimeout(oe,I)):ee===void 0&&(ee=null,queueMicrotask(oe))})},onWillRemoveListener(){C&&X>0&&oe?.()},onDidRemoveLastListener(){oe=void 0,Y.dispose()}};D||e(Ie);let $e=new ne(Ie);return D?.add($e),$e.event}ze.debounce=p;function g(S,v=0,I,w){return ze.debounce(S,(C,A)=>C?(C.push(A),C):[A],v,void 0,I??!0,void 0,w)}ze.accumulate=g;function T(S,v,I=100,w=!0,C=!0,A,D){let Y,V,ee,X=0,oe={leakWarningThreshold:A,onWillAddFirstListener(){Y=S($e=>{X++,V=v(V,$e),ee===void 0&&(w&&(Ie.fire(V),V=void 0,X=0),typeof I=="number"?ee=setTimeout(()=>{C&&X>0&&Ie.fire(V),V=void 0,ee=void 0,X=0},I):(ee=0,queueMicrotask(()=>{C&&X>0&&Ie.fire(V),V=void 0,ee=void 0,X=0})))})},onDidRemoveLastListener(){Y.dispose()}};D||e(oe);let Ie=new ne(oe);return D?.add(Ie),Ie.event}ze.throttle=T;function b(S,v=(w,C)=>w===C,I){let w=!0,C;return a(S,A=>{let D=w||!v(A,C);return w=!1,C=A,D},I)}ze.latch=b;function h(S,v,I){return[ze.filter(S,v,I),ze.filter(S,w=>!v(w),I)]}ze.split=h;function x(S,v,I=!1,w=[],C){let A=w.slice(),D;zi()&&(D={stack:ut.create(),timerId:setTimeout(()=>{A&&A.length>0&&D&&!D.warned&&(D.warned=!0,console.warn(`[Event.buffer][${v}] potential LEAK detected: ${A.length} events buffered for ${qi/1e3}s without being consumed. Buffered here:`),D.stack.print())},qi),warned:!1},C&&C.add(Oe(()=>clearTimeout(D.timerId))));let Y=()=>{D&&clearTimeout(D.timerId)},V=S(oe=>{A?(A.push(oe),zi()&&D&&!D.warned&&A.length>=ks&&(D.warned=!0,console.warn(`[Event.buffer][${v}] potential LEAK detected: ${A.length} events buffered without being consumed. Buffered here:`),D.stack.print())):X.fire(oe)});C&&C.add(V);let ee=()=>{A?.forEach(oe=>X.fire(oe)),A=null,Y()},X=new ne({onWillAddFirstListener(){V||(V=S(oe=>X.fire(oe)),C&&C.add(V))},onDidAddFirstListener(){A&&(I?setTimeout(ee):ee())},onDidRemoveLastListener(){V&&V.dispose(),V=null,Y()}});return C&&C.add(X),X.event}ze.buffer=x;function m(S,v){return(w,C,A)=>{let D=v(new R);return S(function(Y){let V=D.evaluate(Y);V!==L&&w.call(C,V)},void 0,A)}}ze.chain=m;let L=Symbol("HaltChainable");class R{constructor(){this.steps=[]}map(v){return this.steps.push(v),this}forEach(v){return this.steps.push(I=>(v(I),I)),this}filter(v){return this.steps.push(I=>v(I)?I:L),this}reduce(v,I){let w=I;return this.steps.push(C=>(w=v(w,C),w)),this}latch(v=(I,w)=>I===w){let I=!0,w;return this.steps.push(C=>{let A=I||!v(C,w);return I=!1,w=C,A?C:L}),this}evaluate(v){for(let I of this.steps)if(v=I(v),v===L)break;return v}}function z(S,v,I=w=>w){let w=(...Y)=>D.fire(I(...Y)),C=()=>S.on(v,w),A=()=>S.removeListener(v,w),D=new ne({onWillAddFirstListener:C,onDidRemoveLastListener:A});return D.event}ze.fromNodeEventEmitter=z;function y(S,v,I=w=>w){let w=(...Y)=>D.fire(I(...Y)),C=()=>S.addEventListener(v,w),A=()=>S.removeEventListener(v,w),D=new ne({onWillAddFirstListener:C,onDidRemoveLastListener:A});return D.event}ze.fromDOMEventEmitter=y;function _(S,v){let I,w,C=new Promise(A=>{w=n(S)(A),or(w,v),I=()=>{ji(w,v)}});return C.cancel=I,v&&C.finally(()=>ji(w,v)),C}ze.toPromise=_;function k(S,v){return S(I=>v.fire(I))}ze.forward=k;function K(S,v,I){return v(I),S(w=>v(w))}ze.runAndSubscribe=K;class U{constructor(v,I){this._observable=v;this._counter=0;this._hasChanged=!1;let w={onWillAddFirstListener:()=>{v.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{v.removeObserver(this)}};I||e(w),this.emitter=new ne(w),I&&I.add(this.emitter)}beginUpdate(v){this._counter++}handlePossibleChange(v){}handleChange(v,I){this._hasChanged=!0}endUpdate(v){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function P(S,v){return new U(S,v).emitter.event}ze.fromObservable=P;function De(S){return(v,I,w)=>{let C=0,A=!1,D={beginUpdate(){C++},endUpdate(){C--,C===0&&(S.reportChanges(),A&&(A=!1,v.call(I)))},handlePossibleChange(){},handleChange(){A=!0}};S.addObserver(D),S.reportChanges();let Y={dispose(){S.removeObserver(D)}};return or(Y,w),Y}}ze.fromObservableLight=De})(Tt||={});var tr=class r{constructor(e){this.listenerCount=0;this.invocationCount=0;this.elapsedOverall=0;this.durations=[];this.name=`${e}_${r._idPool++}`,r.all.add(this)}static{this.all=new Set}static{this._idPool=0}start(e){this._stopWatch=new Jt,this.listenerCount=e}stop(){if(this._stopWatch){let e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}},$i=-1;var nr=class r{constructor(e,t,n=(r._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e;this.threshold=t;this.name=n;this._warnCountdown=0}static{this._idPool=1}dispose(){this._stacks?.clear()}check(e,t){let n=this.threshold;if(n<=0||t<n)return;this._stacks||(this._stacks=new Map);let i=this._stacks.get(e.value)||0;if(this._stacks.set(e.value,i+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=n*.5;let[o,s]=this.getMostFrequentStack(),a=/^[0-9a-f]+$/i.test(this.name)?void 0:this.name,l=`[${this.name}] potential listener LEAK detected, having ${t} listeners already. MOST frequent listener (${s}):`;console.warn(l),console.warn(o);let u=s/t>.3?"dominated":"popular",d=new en(u,l,o,t,a);this._errorHandler(d)}return()=>{let o=this._stacks.get(e.value)||0;this._stacks.set(e.value,o-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,t=0;for(let[n,i]of this._stacks)(!e||t<i)&&(e=[n,i],t=i);return e}},ut=class r{constructor(e){this.value=e}static create(){let e=new Error;return new r(e.stack??"")}print(){console.warn(this.value.split(`
`).slice(2).join(`
`))}},en=class r extends Error{constructor(e,t,n,i,o){super(o?`[${o}] potential listener LEAK detected, ${e}`:`potential listener LEAK detected, ${e}`),this.name="ListenerLeakError",this.kind=e,this.listenerCount=i,this.details=t,this.stack=n}static is(e){return e instanceof r||e instanceof Error&&typeof e.kind=="string"&&typeof e.listenerCount=="number"}},rr=class extends en{constructor(e,t,n,i,o){super(e,t,n,i,o),this.name="ListenerRefusalError"}},Rs=0,lt=class{constructor(e){this.value=e;this.id=Rs++}},As=2,Ns=(r,e)=>{if(r instanceof lt)e(r);else for(let t=0;t<r.length;t++){let n=r[t];n&&e(n)}},ne=class{constructor(e){this._size=0;this._options=e,this._leakageMon=$i>0||this._options?.leakWarningThreshold?new nr(e?.onListenerError??Ee,this._options?.leakWarningThreshold??$i,this._options?.leakWarningName):void 0,this._perfMon=this._options?._profName?new tr(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(Wi){let e=this._listeners;queueMicrotask(()=>{Ns(e,t=>t.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??=(e,t,n)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let l=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(l);let u=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],d=u[1]/this._size>.3?"dominated":"popular",c=new rr(d,`${l}. HINT: Stack shows most frequent listener (${u[1]}-times)`,u[0],this._size,this._options?.leakWarningName);return(this._options?.onListenerError||Ee)(c),ce.None}if(this._disposed)return ce.None;t&&(e=e.bind(t));let i=new lt(e),o,s;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(i.stack=ut.create(),o=this._leakageMon.check(i.stack,this._size+1)),Wi&&(i.stack=s??ut.create()),this._listeners?this._listeners instanceof lt?(this._deliveryQueue??=new ir,this._listeners=[this._listeners,i]):this._listeners.push(i):(this._options?.onWillAddFirstListener?.(this),this._listeners=i,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;let a=Oe(()=>{o?.(),this._removeListener(i)});return or(a,n),a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,n=t.indexOf(e);if(n===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[n]=void 0;let i=this._deliveryQueue.current===this;if(this._size*As<=t.length){let o=0;for(let s=0;s<t.length;s++)t[s]?t[o++]=t[s]:i&&o<this._deliveryQueue.end&&(this._deliveryQueue.end--,o<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=o}}_deliver(e,t){if(!e)return;let n=this._options?.onListenerError||Ee;if(!n){e.value(t);return}try{e.value(t)}catch(i){n(i)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof lt)this._deliver(this._listeners,e);else{let t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}this._perfMon?.stop()}hasListeners(){return this._size>0}};var ir=class{constructor(){this.i=-1;this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}};function or(r,e){e instanceof we?e.add(r):Array.isArray(e)&&e.push(r)}function ji(r,e){if(e instanceof we)e.delete(r);else if(Array.isArray(e)){let t=e.indexOf(r);t!==-1&&e.splice(t,1)}r.dispose()}var Hi=Object.freeze(function(r,e){let t=setTimeout(r.bind(e),0);return{dispose(){clearTimeout(t)}}}),Ps;(n=>{function r(i){return i===n.None||i===n.Cancelled||i instanceof sr?!0:!i||typeof i!="object"?!1:typeof i.isCancellationRequested=="boolean"&&typeof i.onCancellationRequested=="function"}n.isCancellationToken=r,n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Tt.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Hi})})(Ps||={});var sr=class{constructor(){this._isCancelled=!1;this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Hi:(this._emitter||(this._emitter=new ne),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}};function Os(r){return r}var tn=class{constructor(e,t){this.lastCache=void 0;this.lastArgKey=void 0;typeof e=="function"?(this._fn=e,this._computeKey=Os):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){let t=this._computeKey(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this._fn(e)),this.lastCache}};var fe=class{constructor(e){this.executor=e;this._state=0}get hasValue(){return this._state===2}get value(){if(this._state===0){this._state=1;try{this._value=this.executor()}catch(e){this._error=e}finally{this._state=2}}else if(this._state===1)throw new Error("Cannot read the value of a lazy that is being initialized");if(this._error)throw this._error;return this._value}get rawValue(){return this._value}};function ar(r){return r<0?0:r>255?255:r|0}function Ye(r){return r<0?0:r>4294967295?4294967295:r|0}function Zi(r){return!r||typeof r!="string"?!0:r.trim().length===0}function Ji(r){return r.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function eo(r,e,t={}){if(!r)throw new Error("Cannot create regex from empty string");e||(r=Ji(r)),t.wholeWord&&(/\B/.test(r.charAt(0))||(r="\\b"+r),/\B/.test(r.charAt(r.length-1))||(r=r+"\\b"));let n="";return t.global&&(n+="g"),t.matchCase||(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),new RegExp(r,n)}function to(r){return r.split(/\r\n|\r|\n/)}function nn(r){for(let e=0,t=r.length;e<t;e++){let n=r.charCodeAt(e);if(n!==32&&n!==9)return e}return-1}function no(r,e=r.length-1){for(let t=e;t>=0;t--){let n=r.charCodeAt(t);if(n!==32&&n!==9)return t}return-1}function ro(r,e){return r<e?-1:r>e?1:0}function Us(r,e,t=0,n=r.length,i=0,o=e.length){for(;t<n&&i<o;t++,i++){let l=r.charCodeAt(t),u=e.charCodeAt(i);if(l<u)return-1;if(l>u)return 1}let s=n-t,a=o-i;return s<a?-1:s>a?1:0}function io(r,e,t=0,n=r.length,i=0,o=e.length){for(;t<n&&i<o;t++,i++){let l=r.charCodeAt(t),u=e.charCodeAt(i);if(l===u)continue;if(l>=128||u>=128)return Us(r.toLowerCase(),e.toLowerCase(),t,n,i,o);Gi(l)&&(l-=32),Gi(u)&&(u-=32);let d=l-u;if(d!==0)return d}let s=n-t,a=o-i;return s<a?-1:s>a?1:0}function Gi(r){return r>=97&&r<=122}function ur(r){return r>=65&&r<=90}function vt(r,e){return r.length===e.length&&io(r,e)===0}function cr(r,e){let t=e.length;return t<=r.length&&io(r,e,0,t)===0}function ct(r){return 55296<=r&&r<=56319}function rn(r){return 56320<=r&&r<=57343}function dr(r,e){return(r-55296<<10)+(e-56320)+65536}function oo(r,e,t){let n=r.charCodeAt(t);if(ct(n)&&t+1<e){let i=r.charCodeAt(t+1);if(rn(i))return dr(n,i)}return n}var lr;function Bs(){return/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}function on(r){return lr||(lr=Bs()),lr.test(r)}var Fs=/^[\t\n\r\x20-\x7E]*$/;function so(r){return Fs.test(r)}var Ks=/[\u2028\u2029]/;function sn(r){return Ks.test(r)}var Vs=/(?:\x1b\[|\x9b)[=?>!]?[\d;:]*["$#'* ]?[a-zA-Z@^`{}|~]/,Ws=/(?:\x1b\]|\x9d).*?(?:\x1b\\|\x07|\x9c)/,qs=/\x1b(?:[ #%\(\)\*\+\-\.\/]?[a-zA-Z0-9\|}~@])/,mu=new RegExp("(?:"+[Vs.source,Ws.source,qs.source].join("|")+")","g");var ao=String.fromCharCode(65279);function lo(r){return!!(r&&r.length>0&&r.charCodeAt(0)===65279)}var Qi=class r{static{this._INSTANCE=null}static getInstance(){return r._INSTANCE||(r._INSTANCE=new r),r._INSTANCE}constructor(){this._data=zs()}getGraphemeBreakType(e){if(e<32)return e===10?3:e===13?2:4;if(e<127)return 0;let t=this._data,n=t.length/3,i=1;for(;i<=n;)if(e<t[3*i])i=2*i;else if(e>t[3*i+1])i=2*i+1;else return t[3*i+2];return 0}};function zs(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}var Yi=class r{constructor(e){this.confusableDictionary=e}static{this.ambiguousCharacterData=new fe(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,1523,96,8242,96,1370,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,118002,50,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,118003,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,118004,52,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,118005,53,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,118006,54,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,118007,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,118008,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,118009,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,117974,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,117975,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71913,67,71922,67,65315,67,8557,67,8450,67,8493,67,117976,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,117977,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,117978,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,117979,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,117980,71,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,117981,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,117983,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,117984,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,118001,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,117982,108,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,117985,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,117986,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,117987,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,118000,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,117988,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,117989,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,117990,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,117991,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,117992,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,117993,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,117994,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,117995,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71910,87,71919,87,117996,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,117997,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,117998,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,71909,90,66293,90,65338,90,8484,90,8488,90,117999,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65283,35,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"cs":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"es":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"fr":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"it":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ja":[8211,45,8218,44,65281,33,8216,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65292,44,65297,49,65307,59],"ko":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pt-BR":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ru":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"zh-hans":[160,32,65374,126,8218,44,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65297,49],"zh-hant":[8211,45,65374,126,8218,44,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89]}'))}static{this.cache=new tn(e=>{let t=e.split(",");function n(c){let f=new Map;for(let p=0;p<c.length;p+=2)f.set(c[p],c[p+1]);return f}function i(c,f){let p=new Map(c);for(let[g,T]of f)p.set(g,T);return p}function o(c,f){if(!c)return f;let p=new Map;for(let[g,T]of c)f.has(g)&&p.set(g,T);return p}let s=this.ambiguousCharacterData.value,a=t.filter(c=>!c.startsWith("_")&&Object.hasOwn(s,c));a.length===0&&(a=["_default"]);let l;for(let c of a){let f=n(s[c]);l=o(l,f)}let u=n(s._common),d=i(u,l);return new r(d)})}static getInstance(e){return r.cache.get(Array.from(e).join(","))}static{this._locales=new fe(()=>Object.keys(r.ambiguousCharacterData.value).filter(e=>!e.startsWith("_")))}static getLocales(){return r._locales.value}isAmbiguous(e){return this.confusableDictionary.has(e)}containsAmbiguousCharacter(e){for(let t=0;t<e.length;t++){let n=e.codePointAt(t);if(typeof n=="number"&&this.isAmbiguous(n))return!0}return!1}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}},Xi=class r{static getRawData(){return JSON.parse('{"_common":[11,12,13,127,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999],"cs":[173,8203,12288],"de":[173,8203,12288],"es":[8203,12288],"fr":[173,8203,12288],"it":[160,173,12288],"ja":[173],"ko":[173,12288],"pl":[173,8203,12288],"pt-BR":[173,8203,12288],"qps-ploc":[160,173,8203,12288],"ru":[173,12288],"tr":[160,173,8203,12288],"zh-hans":[160,173,8203,12288],"zh-hant":[173,12288]}')}static{this._data=void 0}static getData(){return this._data||(this._data=new Set([...Object.values(r.getRawData())].flat())),this._data}static isInvisibleCharacter(e){return r.getData().has(e)}static containsInvisibleCharacter(e){for(let t=0;t<e.length;t++){let n=e.codePointAt(t);if(typeof n=="number"&&(r.isInvisibleCharacter(n)||n===32))return!0}return!1}static get codePoints(){return r.getData()}};var fr="default",$s="$initialize";var pr=class{constructor(e,t,n,i,o){this.vsWorker=e;this.req=t;this.channel=n;this.method=i;this.args=o;this.type=0}},an=class{constructor(e,t,n,i){this.vsWorker=e;this.seq=t;this.res=n;this.err=i;this.type=1}},hr=class{constructor(e,t,n,i,o){this.vsWorker=e;this.req=t;this.channel=n;this.eventName=i;this.arg=o;this.type=2}},mr=class{constructor(e,t,n){this.vsWorker=e;this.req=t;this.event=n;this.type=3}},gr=class{constructor(e,t){this.vsWorker=e;this.req=t;this.type=4}},br=class{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}async sendMessage(e,t,n){let i=String(++this._lastSentReq);return new Promise((o,s)=>{this._pendingReplies[i]={resolve:o,reject:s},this._send(new pr(this._workerId,i,e,t,n))})}listen(e,t,n){let i=null,o=new ne({onWillAddFirstListener:()=>{i=String(++this._lastSentReq),this._pendingEmitters.set(i,o),this._send(new hr(this._workerId,i,e,t,n))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(i),this._send(new gr(this._workerId,i)),i=null}});return o.event}handleMessage(e){!e||!e.vsWorker||this._workerId!==-1&&e.vsWorker!==this._workerId||this._handleMessage(e)}createProxyToRemoteChannel(e,t){let n={get:(i,o)=>(typeof o=="string"&&!i[o]&&(co(o)?i[o]=s=>this.listen(e,o,s):uo(o)?i[o]=this.listen(e,o,void 0):o.charCodeAt(0)===36&&(i[o]=async(...s)=>(await t?.(),this.sendMessage(e,o,s)))),i[o])};return new Proxy(Object.create(null),n)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq]){console.warn("Got reply to unknown seq");return}let t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let n=e.err;if(e.err.$isError){let i=new Error;i.name=e.err.name,i.message=e.err.message,i.stack=e.err.stack,n=i}t.reject(n);return}t.resolve(e.res)}_handleRequestMessage(e){let t=e.req;this._handler.handleMessage(e.channel,e.method,e.args).then(i=>{this._send(new an(this._workerId,t,i,void 0))},i=>{i.detail instanceof Error&&(i.detail=jt(i.detail)),this._send(new an(this._workerId,t,void 0,jt(i)))})}_handleSubscribeEventMessage(e){let t=e.req,n=this._handler.handleEvent(e.channel,e.eventName,e.arg)(i=>{this._send(new mr(this._workerId,t,i))});this._pendingEvents.set(t,n)}_handleEventMessage(e){let t=this._pendingEmitters.get(e.req);if(t===void 0){console.warn("Got event for unknown req");return}t.fire(e.event)}_handleUnsubscribeEventMessage(e){let t=this._pendingEvents.get(e.req);if(t===void 0){console.warn("Got unsubscribe for unknown req");return}t.dispose(),this._pendingEvents.delete(e.req)}_send(e){let t=[];if(e.type===0)for(let n=0;n<e.args.length;n++){let i=e.args[n];i instanceof ArrayBuffer&&t.push(i)}else e.type===1&&e.res instanceof ArrayBuffer&&t.push(e.res);this._handler.sendMessage(e,t)}};function uo(r){return r[0]==="o"&&r[1]==="n"&&ur(r.charCodeAt(2))}function co(r){return/^onDynamic/.test(r)&&ur(r.charCodeAt(9))}var ln=class{constructor(e,t){this._localChannels=new Map;this._remoteChannels=new Map;this._protocol=new br({sendMessage:(n,i)=>{e(n,i)},handleMessage:(n,i,o)=>this._handleMessage(n,i,o),handleEvent:(n,i,o)=>this._handleEvent(n,i,o)}),this.requestHandler=t(this)}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,t,n){if(e===fr&&t===$s)return this.initialize(n[0]);let i=e===fr?this.requestHandler:this._localChannels.get(e);if(!i)return Promise.reject(new Error(`Missing channel ${e} on worker thread`));let o=i[t];if(typeof o!="function")return Promise.reject(new Error(`Missing method ${t} on worker thread channel ${e}`));try{return Promise.resolve(o.apply(i,n))}catch(s){return Promise.reject(s)}}_handleEvent(e,t,n){let i=e===fr?this.requestHandler:this._localChannels.get(e);if(!i)throw new Error(`Missing channel ${e} on worker thread`);if(co(t)){let o=i[t];if(typeof o!="function")throw new Error(`Missing dynamic event ${t} on request handler.`);let s=o.call(i,n);if(typeof s!="function")throw new Error(`Missing dynamic event ${t} on request handler.`);return s}if(uo(t)){let o=i[t];if(typeof o!="function")throw new Error(`Missing event ${t} on request handler.`);return o}throw new Error(`Malformed event name ${t}`)}setChannel(e,t){this._localChannels.set(e,t)}getChannel(e){let t=this._remoteChannels.get(e);return t===void 0&&(t=this._protocol.createProxyToRemoteChannel(e),this._remoteChannels.set(e,t)),t}async initialize(e){this._protocol.setWorkerId(e)}};var xr=!1;function js(r){if(xr)throw new Error("WebWorker already initialized!");xr=!0;let e=new ln(t=>globalThis.postMessage(t),t=>r(t));return globalThis.onmessage=t=>{e.onmessage(t.data)},e}function fo(r){globalThis.onmessage=e=>{xr||js(r)}}var se=class{constructor(e,t,n,i){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}};var It=typeof Buffer<"u",Gs=new fe(()=>new Uint8Array(256)),_r,yr,Le=class r{static alloc(e){return It?new r(Buffer.allocUnsafe(e)):new r(new Uint8Array(e))}static wrap(e){return It&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new r(e)}static fromString(e,t){return!(t?.dontUseNodeBuffer||!1)&&It?new r(Buffer.from(e)):(_r||(_r=new TextEncoder),new r(_r.encode(e)))}static fromByteArray(e){let t=r.alloc(e.length);for(let n=0,i=e.length;n<i;n++)t.buffer[n]=e[n];return t}static concat(e,t){if(typeof t>"u"){t=0;for(let o=0,s=e.length;o<s;o++)t+=e[o].byteLength}let n=r.alloc(t),i=0;for(let o=0,s=e.length;o<s;o++){let a=e[o];n.set(a,i),i+=a.byteLength}return n}static isNativeBuffer(e){return It&&Buffer.isBuffer(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}clone(){let e=r.alloc(this.byteLength);return e.set(this),e}toString(){return It?this.buffer.toString():(yr||(yr=new TextDecoder(void 0,{ignoreBOM:!0})),yr.decode(this.buffer))}slice(e,t){return new r(this.buffer.subarray(e,t))}set(e,t){if(e instanceof r)this.buffer.set(e.buffer,t);else if(e instanceof Uint8Array)this.buffer.set(e,t);else if(e instanceof ArrayBuffer)this.buffer.set(new Uint8Array(e),t);else if(ArrayBuffer.isView(e))this.buffer.set(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),t);else throw new Error("Unknown argument 'array'")}readUInt32BE(e){return Et(this.buffer,e)}writeUInt32BE(e,t){wt(this.buffer,e,t)}readUInt32LE(e){return Ys(this.buffer,e)}writeUInt32LE(e,t){Xs(this.buffer,e,t)}readUInt8(e){return Zs(this.buffer,e)}writeUInt8(e,t){Js(this.buffer,e,t)}indexOf(e,t=0){return Qs(this.buffer,e instanceof r?e.buffer:e,t)}equals(e){return this===e?!0:this.byteLength!==e.byteLength?!1:this.buffer.every((t,n)=>t===e.buffer[n])}};function Qs(r,e,t=0){let n=e.byteLength,i=r.byteLength;if(n===0)return 0;if(n===1)return r.indexOf(e[0],t);if(n>i-t)return-1;let o=Gs.value;o.fill(e.length);for(let u=0;u<e.length;u++)o[e[u]]=e.length-u-1;let s=t+e.length-1,a=s,l=-1;for(;s<i;)if(r[s]===e[a]){if(a===0){l=s;break}s--,a--}else s+=Math.max(e.length-a,o[r[s]]),a=e.length-1;return l}function ho(r,e){return r[e+0]<<0>>>0|r[e+1]<<8>>>0}function mo(r,e,t){r[t+0]=e&255,e=e>>>8,r[t+1]=e&255}function Et(r,e){return r[e]*2**24+r[e+1]*2**16+r[e+2]*2**8+r[e+3]}function wt(r,e,t){r[t+3]=e,e=e>>>8,r[t+2]=e,e=e>>>8,r[t+1]=e,e=e>>>8,r[t]=e}function Ys(r,e){return r[e+0]<<0>>>0|r[e+1]<<8>>>0|r[e+2]<<16>>>0|r[e+3]<<24>>>0}function Xs(r,e,t){r[t+0]=e&255,e=e>>>8,r[t+1]=e&255,e=e>>>8,r[t+2]=e&255,e=e>>>8,r[t+3]=e&255}function Zs(r,e){return r[e]}function Js(r,e,t){r[t]=e}function Tr(r){let e=0,t=0,n=0,i=new Uint8Array(Math.floor(r.length/4*3)),o=a=>{switch(t){case 3:i[n++]=e|a,t=0;break;case 2:i[n++]=e|a>>>2,e=a<<6,t=3;break;case 1:i[n++]=e|a>>>4,e=a<<4,t=2;break;default:e=a<<2,t=1}};for(let a=0;a<r.length;a++){let l=r.charCodeAt(a);if(l>=65&&l<=90)o(l-65);else if(l>=97&&l<=122)o(l-97+26);else if(l>=48&&l<=57)o(l-48+52);else if(l===43||l===45)o(62);else if(l===47||l===95)o(63);else{if(l===61)break;throw new SyntaxError(`Unexpected base64 character ${r[a]}`)}}let s=n;for(;t>0;)o(0);return Le.wrap(i).slice(0,s)}var ea="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ta="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";function vr({buffer:r},e=!0,t=!1){let n=t?ta:ea,i="",o=r.byteLength%3,s=0;for(;s<r.byteLength-o;s+=3){let a=r[s+0],l=r[s+1],u=r[s+2];i+=n[a>>>2],i+=n[(a<<4|l>>>4)&63],i+=n[(l<<2|u>>>6)&63],i+=n[u&63]}if(o===1){let a=r[s+0];i+=n[a>>>2],i+=n[a<<4&63],e&&(i+="==")}else if(o===2){let a=r[s+0],l=r[s+1];i+=n[a>>>2],i+=n[(a<<4|l>>>4)&63],i+=n[l<<2&63],e&&(i+="=")}return i}var po="0123456789abcdef";function go({buffer:r}){let e="";for(let t=0;t<r.length;t++){let n=r[t];e+=po[n>>>4],e+=po[n&15]}return e}function _o(r){return be(r,0)}function be(r,e){switch(typeof r){case"object":return r===null?pe(349,e):Array.isArray(r)?ra(r,e):ia(r,e);case"string":return un(r,e);case"boolean":return na(r,e);case"number":return pe(r,e);case"undefined":return pe(937,e);default:return pe(617,e)}}function pe(r,e){return(e<<5)-e+r|0}function na(r,e){return pe(r?433:863,e)}function un(r,e){e=pe(149417,e);for(let t=0,n=r.length;t<n;t++)e=pe(r.charCodeAt(t),e);return e}function ra(r,e){return e=pe(104579,e),r.reduce((t,n)=>be(n,t),e)}function ia(r,e){return e=pe(181387,e),Object.keys(r).sort().reduce((t,n)=>(t=un(n,t),be(r[n],t)),e)}function Ir(r,e,t=32){let n=t-e,i=~((1<<n)-1);return(r<<e|(i&r)>>>n)>>>0}function St(r,e=32){return r instanceof ArrayBuffer?go(Le.wrap(new Uint8Array(r))):(r>>>0).toString(16).padStart(e/4,"0")}var xo=class r{constructor(){this._h0=1732584193;this._h1=4023233417;this._h2=2562383102;this._h3=271733878;this._h4=3285377520;this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}static{this._bigBlock32=new DataView(new ArrayBuffer(320))}update(e){let t=e.length;if(t===0)return;let n=this._buff,i=this._buffLen,o=this._leftoverHighSurrogate,s,a;for(o!==0?(s=o,a=-1,o=0):(s=e.charCodeAt(0),a=0);;){let l=s;if(ct(s))if(a+1<t){let u=e.charCodeAt(a+1);rn(u)?(a++,l=dr(s,u)):l=65533}else{o=s;break}else rn(s)&&(l=65533);if(i=this._push(n,i,l),a++,a<t)s=e.charCodeAt(a);else break}this._buffLen=i,this._leftoverHighSurrogate=o}_push(e,t,n){return n<128?e[t++]=n:n<2048?(e[t++]=192|(n&1984)>>>6,e[t++]=128|(n&63)>>>0):n<65536?(e[t++]=224|(n&61440)>>>12,e[t++]=128|(n&4032)>>>6,e[t++]=128|(n&63)>>>0):(e[t++]=240|(n&1835008)>>>18,e[t++]=128|(n&258048)>>>12,e[t++]=128|(n&4032)>>>6,e[t++]=128|(n&63)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),St(this._h0)+St(this._h1)+St(this._h2)+St(this._h3)+St(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,this._buff.subarray(this._buffLen).fill(0),this._buffLen>56&&(this._step(),this._buff.fill(0));let e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){let e=r._bigBlock32,t=this._buffDV;for(let c=0;c<64;c+=4)e.setUint32(c,t.getUint32(c,!1),!1);for(let c=64;c<320;c+=4)e.setUint32(c,Ir(e.getUint32(c-12,!1)^e.getUint32(c-32,!1)^e.getUint32(c-56,!1)^e.getUint32(c-64,!1),1),!1);let n=this._h0,i=this._h1,o=this._h2,s=this._h3,a=this._h4,l,u,d;for(let c=0;c<80;c++)c<20?(l=i&o|~i&s,u=1518500249):c<40?(l=i^o^s,u=1859775393):c<60?(l=i&o|i&s|o&s,u=2400959708):(l=i^o^s,u=3395469782),d=Ir(n,5)+l+a+u+e.getUint32(c*4,!1)&4294967295,a=s,s=o,o=Ir(i,30),i=n,n=d;this._h0=this._h0+n&4294967295,this._h1=this._h1+i&4294967295,this._h2=this._h2+o&4294967295,this._h3=this._h3+s&4294967295,this._h4=this._h4+a&4294967295}};var Be=class{static Assert(e,t){if(!e)throw new Error(t)}},Fe=class{static Copy(e,t,n,i,o){for(let s=0;s<o;s++)n[i+s]=e[t+s]}static Copy2(e,t,n,i,o){for(let s=0;s<o;s++)n[i+s]=e[t+s]}};var cn=class{constructor(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new se(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}},Ct=class r{constructor(e,t,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=e,this._modifiedSequence=t;let[i,o,s]=r._getElements(e),[a,l,u]=r._getElements(t);this._hasStrings=s&&u,this._originalStringElements=i,this._originalElementsOrHash=o,this._modifiedStringElements=a,this._modifiedElementsOrHash=l,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&typeof e[0]=="string"}static _getElements(e){let t=e.getElements();if(r._isStringArray(t)){let n=new Int32Array(t.length);for(let i=0,o=t.length;i<o;i++)n[i]=un(t[i],0);return[t,n,!0]}return t instanceof Int32Array?[[],t,!1]:[[],new Int32Array(t),!1]}ElementsAreEqual(e,t){return this._originalElementsOrHash[e]!==this._modifiedElementsOrHash[t]?!1:this._hasStrings?this._originalStringElements[e]===this._modifiedStringElements[t]:!0}ElementsAreStrictEqual(e,t){if(!this.ElementsAreEqual(e,t))return!1;let n=r._getStrictElement(this._originalSequence,e),i=r._getStrictElement(this._modifiedSequence,t);return n===i}static _getStrictElement(e,t){return typeof e.getStrictElement=="function"?e.getStrictElement(t):null}OriginalElementsAreEqual(e,t){return this._originalElementsOrHash[e]!==this._originalElementsOrHash[t]?!1:this._hasStrings?this._originalStringElements[e]===this._originalStringElements[t]:!0}ModifiedElementsAreEqual(e,t){return this._modifiedElementsOrHash[e]!==this._modifiedElementsOrHash[t]?!1:this._hasStrings?this._modifiedStringElements[e]===this._modifiedStringElements[t]:!0}ComputeDiff(e){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,e)}_ComputeDiff(e,t,n,i,o){let s=[!1],a=this.ComputeDiffRecursive(e,t,n,i,s);return o&&(a=this.PrettifyChanges(a)),{quitEarly:s[0],changes:a}}ComputeDiffRecursive(e,t,n,i,o){for(o[0]=!1;e<=t&&n<=i&&this.ElementsAreEqual(e,n);)e++,n++;for(;t>=e&&i>=n&&this.ElementsAreEqual(t,i);)t--,i--;if(e>t||n>i){let c;return n<=i?(Be.Assert(e===t+1,"originalStart should only be one more than originalEnd"),c=[new se(e,0,n,i-n+1)]):e<=t?(Be.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),c=[new se(e,t-e+1,n,0)]):(Be.Assert(e===t+1,"originalStart should only be one more than originalEnd"),Be.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),c=[]),c}let s=[0],a=[0],l=this.ComputeRecursionPoint(e,t,n,i,s,a,o),u=s[0],d=a[0];if(l!==null)return l;if(!o[0]){let c=this.ComputeDiffRecursive(e,u,n,d,o),f=[];return o[0]?f=[new se(u+1,t-(u+1)+1,d+1,i-(d+1)+1)]:f=this.ComputeDiffRecursive(u+1,t,d+1,i,o),this.ConcatenateChanges(c,f)}return[new se(e,t-e+1,n,i-n+1)]}WALKTRACE(e,t,n,i,o,s,a,l,u,d,c,f,p,g,T,b,h,x){let m=null,L=null,R=new cn,z=t,y=n,_=p[0]-b[0]-i,k=-1073741824,K=this.m_forwardHistory.length-1;do{let U=_+e;U===z||U<y&&u[U-1]<u[U+1]?(c=u[U+1],g=c-_-i,c<k&&R.MarkNextChange(),k=c,R.AddModifiedElement(c+1,g),_=U+1-e):(c=u[U-1]+1,g=c-_-i,c<k&&R.MarkNextChange(),k=c-1,R.AddOriginalElement(c,g+1),_=U-1-e),K>=0&&(u=this.m_forwardHistory[K],e=u[0],z=1,y=u.length-1)}while(--K>=-1);if(m=R.getReverseChanges(),x[0]){let U=p[0]+1,P=b[0]+1;if(m!==null&&m.length>0){let De=m[m.length-1];U=Math.max(U,De.getOriginalEnd()),P=Math.max(P,De.getModifiedEnd())}L=[new se(U,f-U+1,P,T-P+1)]}else{R=new cn,z=s,y=a,_=p[0]-b[0]-l,k=1073741824,K=h?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{let U=_+o;U===z||U<y&&d[U-1]>=d[U+1]?(c=d[U+1]-1,g=c-_-l,c>k&&R.MarkNextChange(),k=c+1,R.AddOriginalElement(c+1,g+1),_=U+1-o):(c=d[U-1],g=c-_-l,c>k&&R.MarkNextChange(),k=c,R.AddModifiedElement(c+1,g+1),_=U-1-o),K>=0&&(d=this.m_reverseHistory[K],o=d[0],z=1,y=d.length-1)}while(--K>=-1);L=R.getChanges()}return this.ConcatenateChanges(m,L)}ComputeRecursionPoint(e,t,n,i,o,s,a){let l=0,u=0,d=0,c=0,f=0,p=0;e--,n--,o[0]=0,s[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];let g=t-e+(i-n),T=g+1,b=new Int32Array(T),h=new Int32Array(T),x=i-n,m=t-e,L=e-n,R=t-i,y=(m-x)%2===0;b[x]=e,h[m]=t,a[0]=!1;for(let _=1;_<=g/2+1;_++){let k=0,K=0;d=this.ClipDiagonalBound(x-_,_,x,T),c=this.ClipDiagonalBound(x+_,_,x,T);for(let P=d;P<=c;P+=2){P===d||P<c&&b[P-1]<b[P+1]?l=b[P+1]:l=b[P-1]+1,u=l-(P-x)-L;let De=l;for(;l<t&&u<i&&this.ElementsAreEqual(l+1,u+1);)l++,u++;if(b[P]=l,l+u>k+K&&(k=l,K=u),!y&&Math.abs(P-m)<=_-1&&l>=h[P])return o[0]=l,s[0]=u,De<=h[P]&&_<=1448?this.WALKTRACE(x,d,c,L,m,f,p,R,b,h,l,t,o,u,i,s,y,a):null}let U=(k-e+(K-n)-_)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(k,U))return a[0]=!0,o[0]=k,s[0]=K,U>0&&_<=1448?this.WALKTRACE(x,d,c,L,m,f,p,R,b,h,l,t,o,u,i,s,y,a):(e++,n++,[new se(e,t-e+1,n,i-n+1)]);f=this.ClipDiagonalBound(m-_,_,m,T),p=this.ClipDiagonalBound(m+_,_,m,T);for(let P=f;P<=p;P+=2){P===f||P<p&&h[P-1]>=h[P+1]?l=h[P+1]-1:l=h[P-1],u=l-(P-m)-R;let De=l;for(;l>e&&u>n&&this.ElementsAreEqual(l,u);)l--,u--;if(h[P]=l,y&&Math.abs(P-x)<=_&&l<=b[P])return o[0]=l,s[0]=u,De>=b[P]&&_<=1448?this.WALKTRACE(x,d,c,L,m,f,p,R,b,h,l,t,o,u,i,s,y,a):null}if(_<=1447){let P=new Int32Array(c-d+2);P[0]=x-d+1,Fe.Copy2(b,d,P,1,c-d+1),this.m_forwardHistory.push(P),P=new Int32Array(p-f+2),P[0]=m-f+1,Fe.Copy2(h,f,P,1,p-f+1),this.m_reverseHistory.push(P)}}return this.WALKTRACE(x,d,c,L,m,f,p,R,b,h,l,t,o,u,i,s,y,a)}PrettifyChanges(e){for(let t=0;t<e.length;t++){let n=e[t],i=t<e.length-1?e[t+1].originalStart:this._originalElementsOrHash.length,o=t<e.length-1?e[t+1].modifiedStart:this._modifiedElementsOrHash.length,s=n.originalLength>0,a=n.modifiedLength>0;for(;n.originalStart+n.originalLength<i&&n.modifiedStart+n.modifiedLength<o&&(!s||this.OriginalElementsAreEqual(n.originalStart,n.originalStart+n.originalLength))&&(!a||this.ModifiedElementsAreEqual(n.modifiedStart,n.modifiedStart+n.modifiedLength));){let u=this.ElementsAreStrictEqual(n.originalStart,n.modifiedStart);if(this.ElementsAreStrictEqual(n.originalStart+n.originalLength,n.modifiedStart+n.modifiedLength)&&!u)break;n.originalStart++,n.modifiedStart++}let l=[null];if(t<e.length-1&&this.ChangesOverlap(e[t],e[t+1],l)){e[t]=l[0],e.splice(t+1,1),t--;continue}}for(let t=e.length-1;t>=0;t--){let n=e[t],i=0,o=0;if(t>0){let c=e[t-1];i=c.originalStart+c.originalLength,o=c.modifiedStart+c.modifiedLength}let s=n.originalLength>0,a=n.modifiedLength>0,l=0,u=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let c=1;;c++){let f=n.originalStart-c,p=n.modifiedStart-c;if(f<i||p<o||s&&!this.OriginalElementsAreEqual(f,f+n.originalLength)||a&&!this.ModifiedElementsAreEqual(p,p+n.modifiedLength))break;let T=(f===i&&p===o?5:0)+this._boundaryScore(f,n.originalLength,p,n.modifiedLength);T>u&&(u=T,l=c)}n.originalStart-=l,n.modifiedStart-=l;let d=[null];if(t>0&&this.ChangesOverlap(e[t-1],e[t],d)){e[t-1]=d[0],e.splice(t,1),t++;continue}}if(this._hasStrings)for(let t=1,n=e.length;t<n;t++){let i=e[t-1],o=e[t],s=o.originalStart-i.originalStart-i.originalLength,a=i.originalStart,l=o.originalStart+o.originalLength,u=l-a,d=i.modifiedStart,c=o.modifiedStart+o.modifiedLength,f=c-d;if(s<5&&u<20&&f<20){let p=this._findBetterContiguousSequence(a,u,d,f,s);if(p){let[g,T]=p;(g!==i.originalStart+i.originalLength||T!==i.modifiedStart+i.modifiedLength)&&(i.originalLength=g-i.originalStart,i.modifiedLength=T-i.modifiedStart,o.originalStart=g+s,o.modifiedStart=T+s,o.originalLength=l-o.originalStart,o.modifiedLength=c-o.modifiedStart)}}}return e}_findBetterContiguousSequence(e,t,n,i,o){if(t<o||i<o)return null;let s=e+t-o+1,a=n+i-o+1,l=0,u=0,d=0;for(let c=e;c<s;c++)for(let f=n;f<a;f++){let p=this._contiguousSequenceScore(c,f,o);p>0&&p>l&&(l=p,u=c,d=f)}return l>0?[u,d]:null}_contiguousSequenceScore(e,t,n){let i=0;for(let o=0;o<n;o++){if(!this.ElementsAreEqual(e+o,t+o))return 0;i+=this._originalStringElements[e+o].length}return i}_OriginalIsBoundary(e){return e<=0||e>=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){let n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){let n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(e,t,n,i){let o=this._OriginalRegionIsBoundary(e,t)?1:0,s=this._ModifiedRegionIsBoundary(n,i)?1:0;return o+s}ConcatenateChanges(e,t){let n=[];if(e.length===0||t.length===0)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){let i=new Array(e.length+t.length-1);return Fe.Copy(e,0,i,0,e.length-1),i[e.length-1]=n[0],Fe.Copy(t,1,i,e.length,t.length-1),i}else{let i=new Array(e.length+t.length);return Fe.Copy(e,0,i,0,e.length),Fe.Copy(t,0,i,e.length,t.length),i}}ChangesOverlap(e,t,n){if(Be.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),Be.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){let i=e.originalStart,o=e.originalLength,s=e.modifiedStart,a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(o=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new se(i,o,s,a),!0}else return n[0]=null,!1}ClipDiagonalBound(e,t,n,i){if(e>=0&&e<i)return e;let o=n,s=i-n-1,a=t%2===0;if(e<0){let l=o%2===0;return a===l?0:1}else{let l=s%2===0;return a===l?i-1:i-2}}},ke=new Uint32Array(65536),oa=(r,e)=>{let t=r.length,n=e.length,i=1<<t-1,o=-1,s=0,a=t,l=t;for(;l--;)ke[r.charCodeAt(l)]|=1<<l;for(l=0;l<n;l++){let u=ke[e.charCodeAt(l)],d=u|s;u|=(u&o)+o^o,s|=~(u|o),o&=u,s&i&&a++,o&i&&a--,s=s<<1|1,o=o<<1|~(d|s),s&=d}for(l=t;l--;)ke[r.charCodeAt(l)]=0;return a};function sa(r,e){let t=r.length,n=e.length,i=[],o=[],s=Math.ceil(t/32),a=Math.ceil(n/32);for(let g=0;g<s;g++)i[g]=-1,o[g]=0;let l=0;for(;l<a-1;l++){let g=0,T=-1,b=l*32,h=Math.min(32,n)+b;for(let x=b;x<h;x++)ke[e.charCodeAt(x)]|=1<<x;for(let x=0;x<t;x++){let m=ke[r.charCodeAt(x)],L=i[x/32|0]>>>x&1,R=o[x/32|0]>>>x&1,z=m|g,y=((m|R)&T)+T^T|m|R,_=g|~(y|T),k=T&y;_>>>31^L&&(i[x/32|0]^=1<<x),k>>>31^R&&(o[x/32|0]^=1<<x),_=_<<1|L,k=k<<1|R,T=k|~(z|_),g=_&z}for(let x=b;x<h;x++)ke[e.charCodeAt(x)]=0}let u=0,d=-1,c=l*32,f=Math.min(32,n-c)+c;for(let g=c;g<f;g++)ke[e.charCodeAt(g)]|=1<<g;let p=n;for(let g=0;g<t;g++){let T=ke[r.charCodeAt(g)],b=i[g/32|0]>>>g&1,h=o[g/32|0]>>>g&1,x=T|u,m=((T|h)&d)+d^d|T|h,L=u|~(m|d),R=d&m;p+=L>>>n-1&1,p-=R>>>n-1&1,L>>>31^b&&(i[g/32|0]^=1<<g),R>>>31^h&&(o[g/32|0]^=1<<g),L=L<<1|b,R=R<<1|h,d=R|~(x|L),u=L&x}for(let g=c;g<f;g++)ke[e.charCodeAt(g)]=0;return p}function yo(r,e){if(r.length<e.length){let t=e;e=r,r=t}return e.length===0?r.length:r.length<=32?oa(r,e):sa(r,e)}var aa=65,la=97,ua=90,ca=122,Xe=46,Z=47,he=92,Re=58,da=63,dn=class extends Error{constructor(e,t,n){let i;typeof t=="string"&&t.indexOf("not ")===0?(i="must not be",t=t.replace(/^not /,"")):i="must be";let o=e.indexOf(".")!==-1?"property":"argument",s=`The "${e}" ${o} ${i} of type ${t}`;s+=`. Received type ${typeof n}`,super(s),this.code="ERR_INVALID_ARG_TYPE"}};function fa(r,e){if(r===null||typeof r!="object")throw new dn(e,"Object",r)}function j(r,e){if(typeof r!="string")throw new dn(e,"string",r)}var me=Vi==="win32";function O(r){return r===Z||r===he}function Er(r){return r===Z}function Ae(r){return r>=aa&&r<=ua||r>=la&&r<=ca}function fn(r,e,t,n){let i="",o=0,s=-1,a=0,l=0;for(let u=0;u<=r.length;++u){if(u<r.length)l=r.charCodeAt(u);else{if(n(l))break;l=Z}if(n(l)){if(!(s===u-1||a===1))if(a===2){if(i.length<2||o!==2||i.charCodeAt(i.length-1)!==Xe||i.charCodeAt(i.length-2)!==Xe){if(i.length>2){let d=i.lastIndexOf(t);d===-1?(i="",o=0):(i=i.slice(0,d),o=i.length-1-i.lastIndexOf(t)),s=u,a=0;continue}else if(i.length!==0){i="",o=0,s=u,a=0;continue}}e&&(i+=i.length>0?`${t}..`:"..",o=2)}else i.length>0?i+=`${t}${r.slice(s+1,u)}`:i=r.slice(s+1,u),o=u-s-1;s=u,a=0}else l===Xe&&a!==-1?++a:a=-1}return i}function pa(r){return r?`${r[0]==="."?"":"."}${r}`:""}function To(r,e){fa(e,"pathObject");let t=e.dir||e.root,n=e.base||`${e.name||""}${pa(e.ext)}`;return t?t===e.root?`${t}${n}`:`${t}${r}${n}`:n}var H={resolve(...r){let e="",t="",n=!1;for(let i=r.length-1;i>=-1;i--){let o;if(i>=0){if(o=r[i],j(o,`paths[${i}]`),o.length===0)continue}else e.length===0?o=yt():(o=Zt[`=${e}`]||yt(),(o===void 0||o.slice(0,2).toLowerCase()!==e.toLowerCase()&&o.charCodeAt(2)===he)&&(o=`${e}\\`));let s=o.length,a=0,l="",u=!1,d=o.charCodeAt(0);if(s===1)O(d)&&(a=1,u=!0);else if(O(d))if(u=!0,O(o.charCodeAt(1))){let c=2,f=c;for(;c<s&&!O(o.charCodeAt(c));)c++;if(c<s&&c!==f){let p=o.slice(f,c);for(f=c;c<s&&O(o.charCodeAt(c));)c++;if(c<s&&c!==f){for(f=c;c<s&&!O(o.charCodeAt(c));)c++;(c===s||c!==f)&&(l=`\\\\${p}\\${o.slice(f,c)}`,a=c)}}}else a=1;else Ae(d)&&o.charCodeAt(1)===Re&&(l=o.slice(0,2),a=2,s>2&&O(o.charCodeAt(2))&&(u=!0,a=3));if(l.length>0)if(e.length>0){if(l.toLowerCase()!==e.toLowerCase())continue}else e=l;if(n){if(e.length>0)break}else if(t=`${o.slice(a)}\\${t}`,n=u,u&&e.length>0)break}return t=fn(t,!n,"\\",O),n?`${e}\\${t}`:`${e}${t}`||"."},normalize(r){j(r,"path");let e=r.length;if(e===0)return".";let t=0,n,i=!1,o=r.charCodeAt(0);if(e===1)return Er(o)?"\\":r;if(O(o))if(i=!0,O(r.charCodeAt(1))){let a=2,l=a;for(;a<e&&!O(r.charCodeAt(a));)a++;if(a<e&&a!==l){let u=r.slice(l,a);for(l=a;a<e&&O(r.charCodeAt(a));)a++;if(a<e&&a!==l){for(l=a;a<e&&!O(r.charCodeAt(a));)a++;if(a===e)return`\\\\${u}\\${r.slice(l)}\\`;a!==l&&(n=`\\\\${u}\\${r.slice(l,a)}`,t=a)}}}else t=1;else Ae(o)&&r.charCodeAt(1)===Re&&(n=r.slice(0,2),t=2,e>2&&O(r.charCodeAt(2))&&(i=!0,t=3));let s=t<e?fn(r.slice(t),!i,"\\",O):"";if(s.length===0&&!i&&(s="."),s.length>0&&O(r.charCodeAt(e-1))&&(s+="\\"),!i&&n===void 0&&r.includes(":")){if(s.length>=2&&Ae(s.charCodeAt(0))&&s.charCodeAt(1)===Re)return`.\\${s}`;let a=r.indexOf(":");do if(a===e-1||O(r.charCodeAt(a+1)))return`.\\${s}`;while((a=r.indexOf(":",a+1))!==-1)}return n===void 0?i?`\\${s}`:s:i?`${n}\\${s}`:`${n}${s}`},isAbsolute(r){j(r,"path");let e=r.length;if(e===0)return!1;let t=r.charCodeAt(0);return O(t)||e>2&&Ae(t)&&r.charCodeAt(1)===Re&&O(r.charCodeAt(2))},join(...r){if(r.length===0)return".";let e,t;for(let o=0;o<r.length;++o){let s=r[o];j(s,"path"),s.length>0&&(e===void 0?e=t=s:e+=`\\${s}`)}if(e===void 0)return".";let n=!0,i=0;if(typeof t=="string"&&O(t.charCodeAt(0))){++i;let o=t.length;o>1&&O(t.charCodeAt(1))&&(++i,o>2&&(O(t.charCodeAt(2))?++i:n=!1))}if(n){for(;i<e.length&&O(e.charCodeAt(i));)i++;i>=2&&(e=`\\${e.slice(i)}`)}return H.normalize(e)},relative(r,e){if(j(r,"from"),j(e,"to"),r===e)return"";let t=H.resolve(r),n=H.resolve(e);if(t===n||(r=t.toLowerCase(),e=n.toLowerCase(),r===e))return"";if(t.length!==r.length||n.length!==e.length){let g=t.split("\\"),T=n.split("\\");g[g.length-1]===""&&g.pop(),T[T.length-1]===""&&T.pop();let b=g.length,h=T.length,x=b<h?b:h,m;for(m=0;m<x&&g[m].toLowerCase()===T[m].toLowerCase();m++);return m===0?n:m===x?h>x?T.slice(m).join("\\"):b>x?"..\\".repeat(b-1-m)+"..":"":"..\\".repeat(b-m)+T.slice(m).join("\\")}let i=0;for(;i<r.length&&r.charCodeAt(i)===he;)i++;let o=r.length;for(;o-1>i&&r.charCodeAt(o-1)===he;)o--;let s=o-i,a=0;for(;a<e.length&&e.charCodeAt(a)===he;)a++;let l=e.length;for(;l-1>a&&e.charCodeAt(l-1)===he;)l--;let u=l-a,d=s<u?s:u,c=-1,f=0;for(;f<d;f++){let g=r.charCodeAt(i+f);if(g!==e.charCodeAt(a+f))break;g===he&&(c=f)}if(f!==d){if(c===-1)return n}else{if(u>d){if(e.charCodeAt(a+f)===he)return n.slice(a+f+1);if(f===2)return n.slice(a+f)}s>d&&(r.charCodeAt(i+f)===he?c=f:f===2&&(c=3)),c===-1&&(c=0)}let p="";for(f=i+c+1;f<=o;++f)(f===o||r.charCodeAt(f)===he)&&(p+=p.length===0?"..":"\\..");return a+=c,p.length>0?`${p}${n.slice(a,l)}`:(n.charCodeAt(a)===he&&++a,n.slice(a,l))},toNamespacedPath(r){if(typeof r!="string"||r.length===0)return r;let e=H.resolve(r);if(e.length<=2)return r;if(e.charCodeAt(0)===he){if(e.charCodeAt(1)===he){let t=e.charCodeAt(2);if(t!==da&&t!==Xe)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(Ae(e.charCodeAt(0))&&e.charCodeAt(1)===Re&&e.charCodeAt(2)===he)return`\\\\?\\${e}`;return e},dirname(r){j(r,"path");let e=r.length;if(e===0)return".";let t=-1,n=0,i=r.charCodeAt(0);if(e===1)return O(i)?r:".";if(O(i)){if(t=n=1,O(r.charCodeAt(1))){let a=2,l=a;for(;a<e&&!O(r.charCodeAt(a));)a++;if(a<e&&a!==l){for(l=a;a<e&&O(r.charCodeAt(a));)a++;if(a<e&&a!==l){for(l=a;a<e&&!O(r.charCodeAt(a));)a++;if(a===e)return r;a!==l&&(t=n=a+1)}}}}else Ae(i)&&r.charCodeAt(1)===Re&&(t=e>2&&O(r.charCodeAt(2))?3:2,n=t);let o=-1,s=!0;for(let a=e-1;a>=n;--a)if(O(r.charCodeAt(a))){if(!s){o=a;break}}else s=!1;if(o===-1){if(t===-1)return".";o=t}return r.slice(0,o)},basename(r,e){e!==void 0&&j(e,"suffix"),j(r,"path");let t=0,n=-1,i=!0,o;if(r.length>=2&&Ae(r.charCodeAt(0))&&r.charCodeAt(1)===Re&&(t=2),e!==void 0&&e.length>0&&e.length<=r.length){if(e===r)return"";let s=e.length-1,a=-1;for(o=r.length-1;o>=t;--o){let l=r.charCodeAt(o);if(O(l)){if(!i){t=o+1;break}}else a===-1&&(i=!1,a=o+1),s>=0&&(l===e.charCodeAt(s)?--s===-1&&(n=o):(s=-1,n=a))}return t===n?n=a:n===-1&&(n=r.length),r.slice(t,n)}for(o=r.length-1;o>=t;--o)if(O(r.charCodeAt(o))){if(!i){t=o+1;break}}else n===-1&&(i=!1,n=o+1);return n===-1?"":r.slice(t,n)},extname(r){j(r,"path");let e=0,t=-1,n=0,i=-1,o=!0,s=0;r.length>=2&&r.charCodeAt(1)===Re&&Ae(r.charCodeAt(0))&&(e=n=2);for(let a=r.length-1;a>=e;--a){let l=r.charCodeAt(a);if(O(l)){if(!o){n=a+1;break}continue}i===-1&&(o=!1,i=a+1),l===Xe?t===-1?t=a:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||i===-1||s===0||s===1&&t===i-1&&t===n+1?"":r.slice(t,i)},format:To.bind(null,"\\"),parse(r){j(r,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return e;let t=r.length,n=0,i=r.charCodeAt(0);if(t===1)return O(i)?(e.root=e.dir=r,e):(e.base=e.name=r,e);if(O(i)){if(n=1,O(r.charCodeAt(1))){let c=2,f=c;for(;c<t&&!O(r.charCodeAt(c));)c++;if(c<t&&c!==f){for(f=c;c<t&&O(r.charCodeAt(c));)c++;if(c<t&&c!==f){for(f=c;c<t&&!O(r.charCodeAt(c));)c++;c===t?n=c:c!==f&&(n=c+1)}}}}else if(Ae(i)&&r.charCodeAt(1)===Re){if(t<=2)return e.root=e.dir=r,e;if(n=2,O(r.charCodeAt(2))){if(t===3)return e.root=e.dir=r,e;n=3}}n>0&&(e.root=r.slice(0,n));let o=-1,s=n,a=-1,l=!0,u=r.length-1,d=0;for(;u>=n;--u){if(i=r.charCodeAt(u),O(i)){if(!l){s=u+1;break}continue}a===-1&&(l=!1,a=u+1),i===Xe?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1)}return a!==-1&&(o===-1||d===0||d===1&&o===a-1&&o===s+1?e.base=e.name=r.slice(s,a):(e.name=r.slice(s,o),e.base=r.slice(s,a),e.ext=r.slice(o,a))),s>0&&s!==n?e.dir=r.slice(0,s-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},ha=(()=>{if(me){let r=/\\/g;return()=>{let e=yt().replace(r,"/");return e.slice(e.indexOf("/"))}}return()=>yt()})(),M={resolve(...r){let e="",t=!1;for(let n=r.length-1;n>=0&&!t;n--){let i=r[n];j(i,`paths[${n}]`),i.length!==0&&(e=`${i}/${e}`,t=i.charCodeAt(0)===Z)}if(!t){let n=ha();e=`${n}/${e}`,t=n.charCodeAt(0)===Z}return e=fn(e,!t,"/",Er),t?`/${e}`:e.length>0?e:"."},normalize(r){if(j(r,"path"),r.length===0)return".";let e=r.charCodeAt(0)===Z,t=r.charCodeAt(r.length-1)===Z;return r=fn(r,!e,"/",Er),r.length===0?e?"/":t?"./":".":(t&&(r+="/"),e?`/${r}`:r)},isAbsolute(r){return j(r,"path"),r.length>0&&r.charCodeAt(0)===Z},join(...r){if(r.length===0)return".";let e=[];for(let t=0;t<r.length;++t){let n=r[t];j(n,"path"),n.length>0&&e.push(n)}return e.length===0?".":M.normalize(e.join("/"))},relative(r,e){if(j(r,"from"),j(e,"to"),r===e||(r=M.resolve(r),e=M.resolve(e),r===e))return"";let t=1,n=r.length,i=n-t,o=1,s=e.length-o,a=i<s?i:s,l=-1,u=0;for(;u<a;u++){let c=r.charCodeAt(t+u);if(c!==e.charCodeAt(o+u))break;c===Z&&(l=u)}if(u===a)if(s>a){if(e.charCodeAt(o+u)===Z)return e.slice(o+u+1);if(u===0)return e.slice(o+u)}else i>a&&(r.charCodeAt(t+u)===Z?l=u:u===0&&(l=0));let d="";for(u=t+l+1;u<=n;++u)(u===n||r.charCodeAt(u)===Z)&&(d+=d.length===0?"..":"/..");return`${d}${e.slice(o+l)}`},toNamespacedPath(r){return r},dirname(r){if(j(r,"path"),r.length===0)return".";let e=r.charCodeAt(0)===Z,t=-1,n=!0;for(let i=r.length-1;i>=1;--i)if(r.charCodeAt(i)===Z){if(!n){t=i;break}}else n=!1;return t===-1?e?"/":".":e&&t===1?"//":r.slice(0,t)},basename(r,e){e!==void 0&&j(e,"suffix"),j(r,"path");let t=0,n=-1,i=!0,o;if(e!==void 0&&e.length>0&&e.length<=r.length){if(e===r)return"";let s=e.length-1,a=-1;for(o=r.length-1;o>=0;--o){let l=r.charCodeAt(o);if(l===Z){if(!i){t=o+1;break}}else a===-1&&(i=!1,a=o+1),s>=0&&(l===e.charCodeAt(s)?--s===-1&&(n=o):(s=-1,n=a))}return t===n?n=a:n===-1&&(n=r.length),r.slice(t,n)}for(o=r.length-1;o>=0;--o)if(r.charCodeAt(o)===Z){if(!i){t=o+1;break}}else n===-1&&(i=!1,n=o+1);return n===-1?"":r.slice(t,n)},extname(r){j(r,"path");let e=-1,t=0,n=-1,i=!0,o=0;for(let s=r.length-1;s>=0;--s){let a=r[s];if(a==="/"){if(!i){t=s+1;break}continue}n===-1&&(i=!1,n=s+1),a==="."?e===-1?e=s:o!==1&&(o=1):e!==-1&&(o=-1)}return e===-1||n===-1||o===0||o===1&&e===n-1&&e===t+1?"":r.slice(e,n)},format:To.bind(null,"/"),parse(r){j(r,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return e;let t=r.charCodeAt(0)===Z,n;t?(e.root="/",n=1):n=0;let i=-1,o=0,s=-1,a=!0,l=r.length-1,u=0;for(;l>=n;--l){let d=r.charCodeAt(l);if(d===Z){if(!a){o=l+1;break}continue}s===-1&&(a=!1,s=l+1),d===Xe?i===-1?i=l:u!==1&&(u=1):i!==-1&&(u=-1)}if(s!==-1){let d=o===0&&t?1:o;i===-1||u===0||u===1&&i===s-1&&i===o+1?e.base=e.name=r.slice(d,s):(e.name=r.slice(d,i),e.base=r.slice(d,s),e.ext=r.slice(i,s))}return o>0?e.dir=r.slice(0,o-1):t&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};M.win32=H.win32=H;M.posix=H.posix=M;var Lt=me?H.normalize:M.normalize,ma=me?H.isAbsolute:M.isAbsolute,wr=me?H.join:M.join,vo=me?H.resolve:M.resolve,Io=me?H.relative:M.relative,Eo=me?H.dirname:M.dirname,wo=me?H.basename:M.basename,So=me?H.extname:M.extname,Gu=me?H.format:M.format,Qu=me?H.parse:M.parse,Yu=me?H.toNamespacedPath:M.toNamespacedPath,Ze=me?H.sep:M.sep,Xu=me?H.delimiter:M.delimiter;var ga=/^\w[\w\d+.-]*$/,ba=/^\//,xa=/^\/\//;function _a(r,e){if(!r.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${r.authority}", path: "${r.path}", query: "${r.query}", fragment: "${r.fragment}"}`);if(r.scheme&&!ga.test(r.scheme)){let t=[...r.scheme.matchAll(/[^\w\d+.-]/gu)],n=t.length>0?` Found '${t[0][0]}' at index ${t[0].index} (${t.length} total)`:"";throw new Error(`[UriError]: Scheme contains illegal characters.${n} (len:${r.scheme.length})`)}if(r.path){if(r.authority){if(!ba.test(r.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(xa.test(r.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function ya(r,e){return!r&&!e?"file":r}function Ta(r,e){switch(r){case"https":case"http":case"file":e?e[0]!==xe&&(e=xe+e):e=xe;break}return e}var W="",xe="/",va=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,G=class r{static isUri(e){return e instanceof r?!0:!e||typeof e!="object"?!1:typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="string"&&typeof e.with=="function"&&typeof e.toString=="function"}constructor(e,t,n,i,o,s=!1){typeof e=="object"?(this.scheme=e.scheme||W,this.authority=e.authority||W,this.path=e.path||W,this.query=e.query||W,this.fragment=e.fragment||W):(this.scheme=ya(e,s),this.authority=t||W,this.path=Ta(this.scheme,n||W),this.query=i||W,this.fragment=o||W,_a(this,s))}get fsPath(){return kt(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:i,query:o,fragment:s}=e;return t===void 0?t=this.scheme:t===null&&(t=W),n===void 0?n=this.authority:n===null&&(n=W),i===void 0?i=this.path:i===null&&(i=W),o===void 0?o=this.query:o===null&&(o=W),s===void 0?s=this.fragment:s===null&&(s=W),t===this.scheme&&n===this.authority&&i===this.path&&o===this.query&&s===this.fragment?this:new Ke(t,n,i,o,s)}static parse(e,t=!1){let n=va.exec(e);return n?new Ke(n[2]||W,pn(n[4]||W),pn(n[5]||W),pn(n[7]||W),pn(n[9]||W),t):new Ke(W,W,W,W,W)}static file(e){let t=W;if(ue&&(e=e.replace(/\\/g,xe)),e[0]===xe&&e[1]===xe){let n=e.indexOf(xe,2);n===-1?(t=e.substring(2),e=xe):(t=e.substring(2,n),e=e.substring(n)||xe)}return new Ke("file",t,e,W,W)}static from(e,t){return new Ke(e.scheme,e.authority,e.path,e.query,e.fragment,t)}static joinPath(e,...t){if(!e.path)throw new Error(`[UriError]: cannot call joinPath on URI without path: ${e.toString()}`);let n;return ue&&e.scheme==="file"?n=r.file(H.join(kt(e,!0),...t)).path:n=M.join(e.path,...t),e.with({path:n})}toString(e=!1){return Cr(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof r)return e;{let t=new Ke(e);return t._formatted=e.external??null,t._fsPath=e._sep===ko?e.fsPath??null:null,t}}else return e}[Symbol.for("debug.description")](){return`URI(${this.toString()})`}};var ko=ue?1:void 0,Ke=class extends G{constructor(){super(...arguments);this._formatted=null;this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=kt(this,!1)),this._fsPath}toString(t=!1){return t?Cr(this,!0):(this._formatted||(this._formatted=Cr(this,!1)),this._formatted)}toJSON(){let t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=ko),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}},Ro={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 Co(r,e,t){let n,i=-1;for(let o=0;o<r.length;o++){let s=r.charCodeAt(o);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||s===45||s===46||s===95||s===126||e&&s===47||t&&s===91||t&&s===93||t&&s===58)i!==-1&&(n+=encodeURIComponent(r.substring(i,o)),i=-1),n!==void 0&&(n+=r.charAt(o));else{n===void 0&&(n=r.substr(0,o));let a=Ro[s];a!==void 0?(i!==-1&&(n+=encodeURIComponent(r.substring(i,o)),i=-1),n+=a):i===-1&&(i=o)}}return i!==-1&&(n+=encodeURIComponent(r.substring(i))),n!==void 0?n:r}function Ia(r){let e;for(let t=0;t<r.length;t++){let n=r.charCodeAt(t);n===35||n===63?(e===void 0&&(e=r.substr(0,t)),e+=Ro[n]):e!==void 0&&(e+=r[t])}return e!==void 0?e:r}function kt(r,e){let t;return r.authority&&r.path.length>1&&r.scheme==="file"?t=`//${r.authority}${r.path}`:r.path.charCodeAt(0)===47&&(r.path.charCodeAt(1)>=65&&r.path.charCodeAt(1)<=90||r.path.charCodeAt(1)>=97&&r.path.charCodeAt(1)<=122)&&r.path.charCodeAt(2)===58?e?t=r.path.substr(1):t=r.path[1].toLowerCase()+r.path.substr(2):t=r.path,ue&&(t=t.replace(/\//g,"\\")),t}function Cr(r,e){let t=e?Ia:Co,n="",{scheme:i,authority:o,path:s,query:a,fragment:l}=r;if(i&&(n+=i,n+=":"),(o||i==="file")&&(n+=xe,n+=xe),o){let u=o.indexOf("@");if(u!==-1){let d=o.substr(0,u);o=o.substr(u+1),u=d.lastIndexOf(":"),u===-1?n+=t(d,!1,!1):(n+=t(d.substr(0,u),!1,!1),n+=":",n+=t(d.substr(u+1),!1,!0)),n+="@"}o=o.toLowerCase(),u=o.lastIndexOf(":"),u===-1?n+=t(o,!1,!0):(n+=t(o.substr(0,u),!1,!0),n+=o.substr(u))}if(s){if(s.length>=3&&s.charCodeAt(0)===47&&s.charCodeAt(2)===58){let u=s.charCodeAt(1);u>=65&&u<=90&&(s=`/${String.fromCharCode(u+32)}:${s.substr(3)}`)}else if(s.length>=2&&s.charCodeAt(1)===58){let u=s.charCodeAt(0);u>=65&&u<=90&&(s=`${String.fromCharCode(u+32)}:${s.substr(2)}`)}n+=t(s,!0,!1)}return a&&(n+="?",n+=t(a,!1,!1)),l&&(n+="#",n+=e?l:Co(l,!1,!1)),n}function Ao(r){try{return decodeURIComponent(r)}catch{return r.length>3?r.substr(0,3)+Ao(r.substr(3)):r}}var Lo=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function pn(r){return r.match(Lo)?r.replace(Lo,e=>Ao(e)):r}function Lr(r,e){let t=Object.create(null);for(let[n,i]of Object.entries(r))e(n,i)&&(t[n]=i);return t}var Je=class{constructor(e,t){this._findMatchBrand=void 0;this.range=e,this.matches=t}};var hn=class{constructor(e,t,n){this.regex=e,this.wordSeparators=t,this.simpleSearch=n}},mn=class{constructor(e,t,n){this.reverseEdits=e;this.changes=t;this.trimAutoWhitespaceLineNumbers=n}};var ae=class r{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new r(e,t)}delta(e=0,t=0){return this.with(Math.max(1,this.lineNumber+e),Math.max(1,this.column+t))}equals(e){return r.equals(this,e)}static equals(e,t){return!e&&!t?!0:!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return r.isBefore(this,e)}static isBefore(e,t){return e.lineNumber<t.lineNumber?!0:t.lineNumber<e.lineNumber?!1:e.column<t.column}isBeforeOrEqual(e){return r.isBeforeOrEqual(this,e)}static isBeforeOrEqual(e,t){return e.lineNumber<t.lineNumber?!0:t.lineNumber<e.lineNumber?!1:e.column<=t.column}static compare(e,t){let n=e.lineNumber|0,i=t.lineNumber|0;if(n===i){let o=e.column|0,s=t.column|0;return o-s}return n-i}clone(){return new r(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(e){return new r(e.lineNumber,e.column)}static isIPosition(e){return!!e&&typeof e.lineNumber=="number"&&typeof e.column=="number"}toJSON(){return{lineNumber:this.lineNumber,column:this.column}}};var $=class r{constructor(e,t,n,i){e>n||e===n&&t>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=i)}isEmpty(){return r.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return r.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumber<e.startLineNumber||t.lineNumber>e.endLineNumber||t.lineNumber===e.startLineNumber&&t.column<e.startColumn||t.lineNumber===e.endLineNumber&&t.column>e.endColumn)}static strictContainsPosition(e,t){return!(t.lineNumber<e.startLineNumber||t.lineNumber>e.endLineNumber||t.lineNumber===e.startLineNumber&&t.column<=e.startColumn||t.lineNumber===e.endLineNumber&&t.column>=e.endColumn)}containsRange(e){return r.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber||t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>e.endColumn)}strictContainsRange(e){return r.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber||t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)}plusRange(e){return r.plusRange(this,e)}static plusRange(e,t){let n,i,o,s;return t.startLineNumber<e.startLineNumber?(n=t.startLineNumber,i=t.startColumn):t.startLineNumber===e.startLineNumber?(n=t.startLineNumber,i=Math.min(t.startColumn,e.startColumn)):(n=e.startLineNumber,i=e.startColumn),t.endLineNumber>e.endLineNumber?(o=t.endLineNumber,s=t.endColumn):t.endLineNumber===e.endLineNumber?(o=t.endLineNumber,s=Math.max(t.endColumn,e.endColumn)):(o=e.endLineNumber,s=e.endColumn),new r(n,i,o,s)}intersectRanges(e){return r.intersectRanges(this,e)}static intersectRanges(e,t){let n=e.startLineNumber,i=e.startColumn,o=e.endLineNumber,s=e.endColumn,a=t.startLineNumber,l=t.startColumn,u=t.endLineNumber,d=t.endColumn;return n<a?(n=a,i=l):n===a&&(i=Math.max(i,l)),o>u?(o=u,s=d):o===u&&(s=Math.min(s,d)),n>o||n===o&&i>s?null:new r(n,i,o,s)}equalsRange(e){return r.equalsRange(this,e)}static equalsRange(e,t){return!e&&!t?!0:!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return r.getEndPosition(this)}static getEndPosition(e){return new ae(e.endLineNumber,e.endColumn)}getStartPosition(){return r.getStartPosition(this)}static getStartPosition(e){return new ae(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new r(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new r(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return r.collapseToStart(this)}static collapseToStart(e){return new r(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return r.collapseToEnd(this)}static collapseToEnd(e){return new r(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new r(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}isSingleLine(){return this.startLineNumber===this.endLineNumber}static fromPositions(e,t=e){return new r(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new r(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return!!e&&typeof e.startLineNumber=="number"&&typeof e.startColumn=="number"&&typeof e.endLineNumber=="number"&&typeof e.endColumn=="number"}static areIntersectingOrTouching(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<t.startColumn||t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<e.startColumn)}static areIntersecting(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<=t.startColumn||t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<=e.startColumn)}static areOnlyIntersecting(e,t){return!(e.endLineNumber<t.startLineNumber-1||e.endLineNumber===t.startLineNumber&&e.endColumn<t.startColumn-1||t.endLineNumber<e.startLineNumber-1||t.endLineNumber===e.startLineNumber&&t.endColumn<e.startColumn-1)}static compareRangesUsingStarts(e,t){if(e&&t){let o=e.startLineNumber|0,s=t.startLineNumber|0;if(o===s){let a=e.startColumn|0,l=t.startColumn|0;if(a===l){let u=e.endLineNumber|0,d=t.endLineNumber|0;if(u===d){let c=e.endColumn|0,f=t.endColumn|0;return c-f}return u-d}return a-l}return o-s}return(e?1:0)-(t?1:0)}static compareRangesUsingEnds(e,t){return e.endLineNumber===t.endLineNumber?e.endColumn===t.endColumn?e.startLineNumber===t.startLineNumber?e.startColumn-t.startColumn:e.startLineNumber-t.startLineNumber:e.endColumn-t.endColumn:e.endLineNumber-t.endLineNumber}static spansMultipleLines(e){return e.endLineNumber>e.startLineNumber}toJSON(){return this}};var ft=class{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==E)return gn(this.right);let e=this;for(;e.parent!==E&&e.parent.left!==e;)e=e.parent;return e.parent===E?E:e.parent}prev(){if(this.left!==E)return Rr(this.left);let e=this;for(;e.parent!==E&&e.parent.right!==e;)e=e.parent;return e.parent===E?E:e.parent}detach(){this.parent=null,this.left=null,this.right=null}};var E=new ft(null,0);E.parent=E;E.left=E;E.right=E;E.color=0;function gn(r){for(;r.left!==E;)r=r.left;return r}function Rr(r){for(;r.right!==E;)r=r.right;return r}function Ar(r){return r===E?0:r.size_left+r.piece.length+Ar(r.right)}function Nr(r){return r===E?0:r.lf_left+r.piece.lineFeedCnt+Nr(r.right)}function kr(){E.parent=E}function At(r,e){let t=e.right;t.size_left+=e.size_left+(e.piece?e.piece.length:0),t.lf_left+=e.lf_left+(e.piece?e.piece.lineFeedCnt:0),e.right=t.left,t.left!==E&&(t.left.parent=e),t.parent=e.parent,e.parent===E?r.root=t:e.parent.left===e?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t}function Nt(r,e){let t=e.left;e.left=t.right,t.right!==E&&(t.right.parent=e),t.parent=e.parent,e.size_left-=t.size_left+(t.piece?t.piece.length:0),e.lf_left-=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),e.parent===E?r.root=t:e===e.parent.right?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t}function Pt(r,e){let t,n;if(e.left===E?(n=e,t=n.right):e.right===E?(n=e,t=n.left):(n=gn(e.right),t=n.right),n===r.root){r.root=t,t.color=0,e.detach(),kr(),r.root.parent=E;return}let i=n.color===1;if(n===n.parent.left?n.parent.left=t:n.parent.right=t,n===e?(t.parent=n.parent,Rt(r,t)):(n.parent===e?t.parent=n:t.parent=n.parent,Rt(r,t),n.left=e.left,n.right=e.right,n.parent=e.parent,n.color=e.color,e===r.root?r.root=n:e===e.parent.left?e.parent.left=n:e.parent.right=n,n.left!==E&&(n.left.parent=n),n.right!==E&&(n.right.parent=n),n.size_left=e.size_left,n.lf_left=e.lf_left,Rt(r,n)),e.detach(),t.parent.left===t){let s=Ar(t),a=Nr(t);if(s!==t.parent.size_left||a!==t.parent.lf_left){let l=s-t.parent.size_left,u=a-t.parent.lf_left;t.parent.size_left=s,t.parent.lf_left=a,ye(r,t.parent,l,u)}}if(Rt(r,t.parent),i){kr();return}let o;for(;t!==r.root&&t.color===0;)t===t.parent.left?(o=t.parent.right,o.color===1&&(o.color=0,t.parent.color=1,At(r,t.parent),o=t.parent.right),o.left.color===0&&o.right.color===0?(o.color=1,t=t.parent):(o.right.color===0&&(o.left.color=0,o.color=1,Nt(r,o),o=t.parent.right),o.color=t.parent.color,t.parent.color=0,o.right.color=0,At(r,t.parent),t=r.root)):(o=t.parent.left,o.color===1&&(o.color=0,t.parent.color=1,Nt(r,t.parent),o=t.parent.left),o.left.color===0&&o.right.color===0?(o.color=1,t=t.parent):(o.left.color===0&&(o.right.color=0,o.color=1,At(r,o),o=t.parent.left),o.color=t.parent.color,t.parent.color=0,o.left.color=0,Nt(r,t.parent),t=r.root));t.color=0,kr()}function Pr(r,e){for(Rt(r,e);e!==r.root&&e.parent.color===1;)if(e.parent===e.parent.parent.left){let t=e.parent.parent.right;t.color===1?(e.parent.color=0,t.color=0,e.parent.parent.color=1,e=e.parent.parent):(e===e.parent.right&&(e=e.parent,At(r,e)),e.parent.color=0,e.parent.parent.color=1,Nt(r,e.parent.parent))}else{let t=e.parent.parent.left;t.color===1?(e.parent.color=0,t.color=0,e.parent.parent.color=1,e=e.parent.parent):(e===e.parent.left&&(e=e.parent,Nt(r,e)),e.parent.color=0,e.parent.parent.color=1,At(r,e.parent.parent))}r.root.color=0}function ye(r,e,t,n){for(;e!==r.root&&e!==E;)e.parent.left===e&&(e.parent.size_left+=t,e.parent.lf_left+=n),e=e.parent}function Rt(r,e){let t=0,n=0;if(e!==r.root){for(;e!==r.root&&e===e.parent.right;)e=e.parent;if(e!==r.root)for(e=e.parent,t=Ar(e.left)-e.size_left,n=Nr(e.left)-e.lf_left,e.size_left+=t,e.lf_left+=n;e!==r.root&&(t!==0||n!==0);)e.parent.left===e&&(e.parent.size_left+=t,e.parent.lf_left+=n),e=e.parent}}var Ea=60,wa=Ea*60,Dr=wa*24,_c=Dr*7,yc=Dr*30,Tc=Dr*365;var No={DateTimeFormat(r,e){return new fe(()=>{try{return new Intl.DateTimeFormat(r,e)}catch{return new Intl.DateTimeFormat(void 0,e)}})},Collator(r,e){return new fe(()=>{try{return new Intl.Collator(r,e)}catch{return new Intl.Collator(void 0,e)}})},Segmenter(r,e){return new fe(()=>{try{return new Intl.Segmenter(r,e)}catch{return new Intl.Segmenter(void 0,e)}})},Locale(r,e){return new fe(()=>{try{return new Intl.Locale(r,e)}catch{return new Intl.Locale(Ue,e)}})},NumberFormat(r,e){return new fe(()=>{try{return new Intl.NumberFormat(r,e)}catch{return new Intl.NumberFormat(void 0,e)}})}};var bn=class r{constructor(e){let t=ar(e);this._defaultValue=t,this._asciiMap=r._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){let t=new Uint8Array(256);return t.fill(e),t}set(e,t){let n=ar(t);e>=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}};var Or=class extends bn{constructor(t,n){super(0);this._segmenter=null;this._cachedLine=null;this._cachedSegments=[];this.intlSegmenterLocales=n,this.intlSegmenterLocales.length>0?this._segmenter=No.Segmenter(this.intlSegmenterLocales,{granularity:"word"}):this._segmenter=null;for(let i=0,o=t.length;i<o;i++)this.set(t.charCodeAt(i),2);this.set(32,1),this.set(9,1)}findPrevIntlWordBeforeOrAtOffset(t,n){let i=null;for(let o of this._getIntlSegmenterWordsOnLine(t)){if(o.index>n)break;i=o}return i}findNextIntlWordAtOrAfterOffset(t,n){for(let i of this._getIntlSegmenterWordsOnLine(t))if(!(i.index<n))return i;return null}_getIntlSegmenterWordsOnLine(t){return this._segmenter?this._cachedLine===t?this._cachedSegments:(this._cachedLine=t,this._cachedSegments=this._filterWordSegments(this._segmenter.value.segment(t)),this._cachedSegments):[]}_filterWordSegments(t){let n=[];for(let i of t)this._isWordLike(i)&&n.push(i);return n}_isWordLike(t){return!!t.isWordLike}},Po=new ot(10);function Do(r,e){let t=`${r}/${e.join(",")}`,n=Po.get(t);return n||(n=new Or(r,e),Po.set(t,n)),n}var xn=class{constructor(e,t,n,i){this.searchString=e,this.isRegex=t,this.matchCase=n,this.wordSeparators=i}parseSearchRequest(){if(this.searchString==="")return null;let e;this.isRegex?e=Ca(this.searchString):e=this.searchString.indexOf(`
`)>=0;let t=null;try{t=eo(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch{return null}if(!t)return null;let n=!this.isRegex&&!e;return n&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(n=this.matchCase),new hn(t,this.wordSeparators?Do(this.wordSeparators,[]):null,n?this.searchString:null)}};function Ca(r){if(!r||r.length===0)return!1;for(let e=0,t=r.length;e<t;e++){let n=r.charCodeAt(e);if(n===10)return!0;if(n===92){if(e++,e>=t)break;let i=r.charCodeAt(e);if(i===110||i===114||i===87)return!0}}return!1}function Mr(r,e,t){if(!t)return new Je(r,null);let n=[];for(let i=0,o=e.length;i<o;i++)n[i]=e[i];return new Je(r,n)}function La(r,e,t,n,i){if(n===0)return!0;let o=e.charCodeAt(n-1);if(r.get(o)!==0||o===13||o===10)return!0;if(i>0){let s=e.charCodeAt(n);if(r.get(s)!==0)return!0}return!1}function ka(r,e,t,n,i){if(n+i===t)return!0;let o=e.charCodeAt(n+i);if(r.get(o)!==0||o===13||o===10)return!0;if(i>0){let s=e.charCodeAt(n+i-1);if(r.get(s)!==0)return!0}return!1}function Ur(r,e,t,n,i){return La(r,e,t,n,i)&&ka(r,e,t,n,i)}var _n=class{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){let t=e.length,n;do{if(this._prevMatchStartIndex+this._prevMatchLength===t||(n=this._searchRegex.exec(e),!n))return null;let i=n.index,o=n[0].length;if(i===this._prevMatchStartIndex&&o===this._prevMatchLength){if(o===0){oo(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=i,this._prevMatchLength=o,!this._wordSeparators||Ur(this._wordSeparators,e,t,i,o))return n}while(n);return null}};var Ne=65535;function Oo(r){let e;return r[r.length-1]<65536?e=new Uint16Array(r.length):e=new Uint32Array(r.length),e.set(r,0),e}var Br=class{constructor(e,t,n,i,o){this.lineStarts=e;this.cr=t;this.lf=n;this.crlf=i;this.isBasicASCII=o}};function Te(r,e=!0){let t=[0],n=1;for(let i=0,o=r.length;i<o;i++){let s=r.charCodeAt(i);s===13?i+1<o&&r.charCodeAt(i+1)===10?(t[n++]=i+2,i++):t[n++]=i+1:s===10&&(t[n++]=i+1)}return e?Oo(t):t}function Mo(r,e){r.length=0,r[0]=0;let t=1,n=0,i=0,o=0,s=!0;for(let l=0,u=e.length;l<u;l++){let d=e.charCodeAt(l);d===13?l+1<u&&e.charCodeAt(l+1)===10?(o++,r[t++]=l+2,l++):(n++,r[t++]=l+1):d===10?(i++,r[t++]=l+1):s&&d!==9&&(d<32||d>126)&&(s=!1)}let a=new Br(Oo(r),n,i,o,s);return r.length=0,a}var re=class{constructor(e,t,n,i,o){this.bufferIndex=e,this.start=t,this.end=n,this.lineFeedCnt=i,this.length=o}},ve=class{constructor(e,t){this.buffer=e,this.lineStarts=t}},Fr=class{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==E&&e.iterate(e.root,n=>(n!==E&&this._pieces.push(n.piece),!0))}read(){return this._pieces.length===0?this._index===0?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:this._index===0?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}},Kr=class{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){let n=this._cache[t];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){let n=this._cache[t];if(n.nodeStartLineNumber&&n.nodeStartLineNumber<e&&n.nodeStartLineNumber+n.node.piece.lineFeedCnt>=e)return n}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1,n=this._cache;for(let i=0;i<n.length;i++){let o=n[i];if(o.node.parent===null||o.nodeStartOffset>=e){n[i]=null,t=!0;continue}}if(t){let i=[];for(let o of n)o!==null&&i.push(o);this._cache=i}}},yn=class{constructor(e,t,n){this.create(e,t,n)}create(e,t,n){this._buffers=[new ve("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=E,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=n;let i=null;for(let o=0,s=e.length;o<s;o++)if(e[o].buffer.length>0){e[o].lineStarts||(e[o].lineStarts=Te(e[o].buffer));let a=new re(o+1,{line:0,column:0},{line:e[o].lineStarts.length-1,column:e[o].buffer.length-e[o].lineStarts[e[o].lineStarts.length-1]},e[o].lineStarts.length-1,e[o].buffer.length);this._buffers.push(e[o]),i=this.rbInsertRight(i,a)}this._searchCache=new Kr(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){let t=Ne,n=t-Math.floor(t/3),i=n*2,o="",s=0,a=[];if(this.iterate(this.root,l=>{let u=this.getNodeContent(l),d=u.length;if(s<=n||s+d<i)return o+=u,s+=d,!0;let c=o.replace(/\r\n|\r|\n/g,e);return a.push(new ve(c,Te(c))),o=u,s=d,!0}),s>0){let l=o.replace(/\r\n|\r|\n/g,e);a.push(new ve(l,Te(l)))}this.create(a,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new Fr(this,e)}equal(e){if(this.getLength()!==e.getLength()||this.getLineCount()!==e.getLineCount())return!1;let t=0;return this.iterate(this.root,i=>{if(i===E)return!0;let o=this.getNodeContent(i),s=o.length,a=e.nodeAt(t),l=e.nodeAt(t+s),u=e.getValueInRange2(a,l);return t+=s,o===u})}getOffsetAt(e,t){let n=0,i=this.root;for(;i!==E;)if(i.left!==E&&i.lf_left+1>=e)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt+1>=e){n+=i.size_left;let o=this.getAccumulatedValue(i,e-i.lf_left-2);return n+=o+t-1}else e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right;return n}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,n=0,i=e;for(;t!==E;)if(t.size_left!==0&&t.size_left>=e)t=t.left;else if(t.size_left+t.piece.length>=e){let o=this.getIndexOf(t,e-t.size_left);if(n+=t.lf_left+o.index,o.index===0){let s=this.getOffsetAt(n+1,1),a=i-s;return new ae(n+1,a+1)}return new ae(n+1,o.remainder+1)}else if(e-=t.size_left+t.piece.length,n+=t.lf_left+t.piece.lineFeedCnt,t.right===E){let o=this.getOffsetAt(n+1,1),s=i-e-o;return new ae(n+1,s+1)}else t=t.right;return new ae(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";let n=this.nodeAt2(e.startLineNumber,e.startColumn),i=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(n,i);return t?t!==this._EOL||!this._EOLNormalized?o.replace(/\r\n|\r|\n/g,t):t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o}getValueInRange2(e,t){if(e.node===t.node){let a=e.node,l=this._buffers[a.piece.bufferIndex].buffer,u=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);return l.substring(u+e.remainder,u+t.remainder)}let n=e.node,i=this._buffers[n.piece.bufferIndex].buffer,o=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start),s=i.substring(o+e.remainder,o+n.piece.length);for(n=n.next();n!==E;){let a=this._buffers[n.piece.bufferIndex].buffer,l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);if(n===t.node){s+=a.substring(l,l+t.remainder);break}else s+=a.substr(l,n.piece.length);n=n.next()}return s}getLinesContent(){let e=[],t=0,n="",i=!1;return this.iterate(this.root,o=>{if(o===E)return!0;let s=o.piece,a=s.length;if(a===0)return!0;let l=this._buffers[s.bufferIndex].buffer,u=this._buffers[s.bufferIndex].lineStarts,d=s.start.line,c=s.end.line,f=u[d]+s.start.column;if(i&&(l.charCodeAt(f)===10&&(f++,a--),e[t++]=n,n="",i=!1,a===0))return!0;if(d===c)return!this._EOLNormalized&&l.charCodeAt(f+a-1)===13?(i=!0,n+=l.substr(f,a-1)):n+=l.substr(f,a),!0;n+=this._EOLNormalized?l.substring(f,Math.max(f,u[d+1]-this._EOLLength)):l.substring(f,u[d+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=n;for(let p=d+1;p<c;p++)n=this._EOLNormalized?l.substring(u[p],u[p+1]-this._EOLLength):l.substring(u[p],u[p+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=n;return!this._EOLNormalized&&l.charCodeAt(u[c]+s.end.column-1)===13?(i=!0,s.end.column===0?t--:n=l.substr(u[c],s.end.column-1)):n=l.substr(u[c],s.end.column),!0}),i&&(e[t++]=n,n=""),e[t++]=n,e}getLength(){return this._length}getLineCount(){return this._lineCnt}getLineContent(e){return this._lastVisitedLine.lineNumber===e?this._lastVisitedLine.value:(this._lastVisitedLine.lineNumber=e,e===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(e):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(e,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(e).replace(/(\r\n|\r|\n)$/,""),this._lastVisitedLine.value)}_getCharCode(e){if(e.remainder===e.node.piece.length){let t=e.node.next();if(!t)return 0;let n=this._buffers[t.piece.bufferIndex],i=this.offsetInBuffer(t.piece.bufferIndex,t.piece.start);return n.buffer.charCodeAt(i)}else{let t=this._buffers[e.node.piece.bufferIndex],i=this.offsetInBuffer(e.node.piece.bufferIndex,e.node.piece.start)+e.remainder;return t.buffer.charCodeAt(i)}}getLineCharCode(e,t){let n=this.nodeAt2(e,t+1);return this._getCharCode(n)}getLineLength(e){if(e===this.getLineCount()){let t=this.getOffsetAt(e,1);return this.getLength()-t}return this.getOffsetAt(e+1,1)-this.getOffsetAt(e,1)-this._EOLLength}getCharCode(e){let t=this.nodeAt(e);return this._getCharCode(t)}getNearestChunk(e){let t=this.nodeAt(e);if(t.remainder===t.node.piece.length){let n=t.node.next();if(!n||n===E)return"";let i=this._buffers[n.piece.bufferIndex],o=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i.buffer.substring(o,o+n.piece.length)}else{let n=this._buffers[t.node.piece.bufferIndex],i=this.offsetInBuffer(t.node.piece.bufferIndex,t.node.piece.start),o=i+t.remainder,s=i+t.node.piece.length;return n.buffer.substring(o,s)}}findMatchesInNode(e,t,n,i,o,s,a,l,u,d,c){let f=this._buffers[e.piece.bufferIndex],p=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start),g=this.offsetInBuffer(e.piece.bufferIndex,o),T=this.offsetInBuffer(e.piece.bufferIndex,s),b,h={line:0,column:0},x,m;t._wordSeparators?(x=f.buffer.substring(g,T),m=L=>L+g,t.reset(0)):(x=f.buffer,m=L=>L,t.reset(g));do if(b=t.next(x),b){if(m(b.index)>=T)return d;this.positionInBuffer(e,m(b.index)-p,h);let L=this.getLineFeedCnt(e.piece.bufferIndex,o,h),R=h.line===o.line?h.column-o.column+i:h.column+1,z=R+b[0].length;if(c[d++]=Mr(new $(n+L,R,n+L,z),b,l),m(b.index)+b[0].length>=T||d>=u)return d}while(b);return d}findMatchesLineByLine(e,t,n,i){let o=[],s=0,a=new _n(t.wordSeparators,t.regex),l=this.nodeAt2(e.startLineNumber,e.startColumn);if(l===null)return[];let u=this.nodeAt2(e.endLineNumber,e.endColumn);if(u===null)return[];let d=this.positionInBuffer(l.node,l.remainder),c=this.positionInBuffer(u.node,u.remainder);if(l.node===u.node)return this.findMatchesInNode(l.node,a,e.startLineNumber,e.startColumn,d,c,t,n,i,s,o),o;let f=e.startLineNumber,p=l.node;for(;p!==u.node;){let T=this.getLineFeedCnt(p.piece.bufferIndex,d,p.piece.end);if(T>=1){let h=this._buffers[p.piece.bufferIndex].lineStarts,x=this.offsetInBuffer(p.piece.bufferIndex,p.piece.start),m=h[d.line+T],L=f===e.startLineNumber?e.startColumn:1;if(s=this.findMatchesInNode(p,a,f,L,d,this.positionInBuffer(p,m-x),t,n,i,s,o),s>=i)return o;f+=T}let b=f===e.startLineNumber?e.startColumn-1:0;if(f===e.endLineNumber){let h=this.getLineContent(f).substring(b,e.endColumn-1);return s=this._findMatchesInLine(t,a,h,e.endLineNumber,b,s,o,n,i),o}if(s=this._findMatchesInLine(t,a,this.getLineContent(f).substr(b),f,b,s,o,n,i),s>=i)return o;f++,l=this.nodeAt2(f,1),p=l.node,d=this.positionInBuffer(l.node,l.remainder)}if(f===e.endLineNumber){let T=f===e.startLineNumber?e.startColumn-1:0,b=this.getLineContent(f).substring(T,e.endColumn-1);return s=this._findMatchesInLine(t,a,b,e.endLineNumber,T,s,o,n,i),o}let g=f===e.startLineNumber?e.startColumn:1;return s=this.findMatchesInNode(u.node,a,f,g,d,c,t,n,i,s,o),o}_findMatchesInLine(e,t,n,i,o,s,a,l,u){let d=e.wordSeparators;if(!l&&e.simpleSearch){let f=e.simpleSearch,p=f.length,g=n.length,T=-p;for(;(T=n.indexOf(f,T+p))!==-1;)if((!d||Ur(d,n,g,T,p))&&(a[s++]=new Je(new $(i,T+1+o,i,T+1+p+o),null),s>=u))return s;return s}let c;t.reset(0);do if(c=t.next(n),c&&(a[s++]=Mr(new $(i,c.index+1+o,i,c.index+1+c[0].length+o),c,l),s>=u))return s;while(c);return s}insert(e,t,n=!1){if(this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==E){let{node:i,remainder:o,nodeStartOffset:s}=this.nodeAt(e),a=i.piece,l=a.bufferIndex,u=this.positionInBuffer(i,o);if(i.piece.bufferIndex===0&&a.end.line===this._lastChangeBufferPos.line&&a.end.column===this._lastChangeBufferPos.column&&s+a.length===e&&t.length<Ne){this.appendToNode(i,t),this.computeBufferMetadata();return}if(s===e)this.insertContentToNodeLeft(t,i),this._searchCache.validate(e);else if(s+i.piece.length>e){let d=[],c=new re(a.bufferIndex,u,a.end,this.getLineFeedCnt(a.bufferIndex,u,a.end),this.offsetInBuffer(l,a.end)-this.offsetInBuffer(l,u));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&this.nodeCharCodeAt(i,o)===10){let T={line:c.start.line+1,column:0};c=new re(c.bufferIndex,T,c.end,this.getLineFeedCnt(c.bufferIndex,T,c.end),c.length-1),t+=`
`}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(this.nodeCharCodeAt(i,o-1)===13){let T=this.positionInBuffer(i,o-1);this.deleteNodeTail(i,T),t="\r"+t,i.piece.length===0&&d.push(i)}else this.deleteNodeTail(i,u);else this.deleteNodeTail(i,u);let f=this.createNewPieces(t);c.length>0&&this.rbInsertRight(i,c);let p=i;for(let g=0;g<f.length;g++)p=this.rbInsertRight(p,f[g]);this.deleteNodes(d)}else this.insertContentToNodeRight(t,i)}else{let i=this.createNewPieces(t),o=this.rbInsertLeft(null,i[0]);for(let s=1;s<i.length;s++)o=this.rbInsertRight(o,i[s])}this.computeBufferMetadata()}delete(e,t){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",t<=0||this.root===E)return;let n=this.nodeAt(e),i=this.nodeAt(e+t),o=n.node,s=i.node;if(o===s){let f=this.positionInBuffer(o,n.remainder),p=this.positionInBuffer(o,i.remainder);if(n.nodeStartOffset===e){if(t===o.piece.length){let g=o.next();Pt(this,o),this.validateCRLFWithPrevNode(g),this.computeBufferMetadata();return}this.deleteNodeHead(o,p),this._searchCache.validate(e),this.validateCRLFWithPrevNode(o),this.computeBufferMetadata();return}if(n.nodeStartOffset+o.piece.length===e+t){this.deleteNodeTail(o,f),this.validateCRLFWithNextNode(o),this.computeBufferMetadata();return}this.shrinkNode(o,f,p),this.computeBufferMetadata();return}let a=[],l=this.positionInBuffer(o,n.remainder);this.deleteNodeTail(o,l),this._searchCache.validate(e),o.piece.length===0&&a.push(o);let u=this.positionInBuffer(s,i.remainder);this.deleteNodeHead(s,u),s.piece.length===0&&a.push(s);let d=o.next();for(let f=d;f!==E&&f!==s;f=f.next())a.push(f);let c=o.piece.length===0?o.prev():o;this.deleteNodes(a),this.validateCRLFWithNextNode(c),this.computeBufferMetadata()}insertContentToNodeLeft(e,t){let n=[];if(this.shouldCheckCRLF()&&this.endWithCR(e)&&this.startWithLF(t)){let s=t.piece,a={line:s.start.line+1,column:0},l=new re(s.bufferIndex,a,s.end,this.getLineFeedCnt(s.bufferIndex,a,s.end),s.length-1);t.piece=l,e+=`
`,ye(this,t,-1,-1),t.piece.length===0&&n.push(t)}let i=this.createNewPieces(e),o=this.rbInsertLeft(t,i[i.length-1]);for(let s=i.length-2;s>=0;s--)o=this.rbInsertLeft(o,i[s]);this.validateCRLFWithPrevNode(o),this.deleteNodes(n)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+=`
`);let n=this.createNewPieces(e),i=this.rbInsertRight(t,n[0]),o=i;for(let s=1;s<n.length;s++)o=this.rbInsertRight(o,n[s]);this.validateCRLFWithPrevNode(i)}positionInBuffer(e,t,n){let i=e.piece,o=e.piece.bufferIndex,s=this._buffers[o].lineStarts,l=s[i.start.line]+i.start.column+t,u=i.start.line,d=i.end.line,c=0,f=0,p=0;for(;u<=d&&(c=u+(d-u)/2|0,p=s[c],c!==d);)if(f=s[c+1],l<p)d=c-1;else if(l>=f)u=c+1;else break;return n?(n.line=c,n.column=l-p,null):{line:c,column:l-p}}getLineFeedCnt(e,t,n){if(n.column===0)return n.line-t.line;let i=this._buffers[e].lineStarts;if(n.line===i.length-1)return n.line-t.line;let o=i[n.line+1],s=i[n.line]+n.column;if(o>s+1)return n.line-t.line;let a=s-1;return this._buffers[e].buffer.charCodeAt(a)===13?n.line-t.line+1:n.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;t<e.length;t++)Pt(this,e[t])}createNewPieces(e){if(e.length>Ne){let d=[];for(;e.length>Ne;){let f=e.charCodeAt(Ne-1),p;f===13||f>=55296&&f<=56319?(p=e.substring(0,Ne-1),e=e.substring(Ne-1)):(p=e.substring(0,Ne),e=e.substring(Ne));let g=Te(p);d.push(new re(this._buffers.length,{line:0,column:0},{line:g.length-1,column:p.length-g[g.length-1]},g.length-1,p.length)),this._buffers.push(new ve(p,g))}let c=Te(e);return d.push(new re(this._buffers.length,{line:0,column:0},{line:c.length-1,column:e.length-c[c.length-1]},c.length-1,e.length)),this._buffers.push(new ve(e,c)),d}let t=this._buffers[0].buffer.length,n=Te(e,!1),i=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&t!==0&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},i=this._lastChangeBufferPos;for(let d=0;d<n.length;d++)n[d]+=t+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(n.slice(1)),this._buffers[0].buffer+="_"+e,t+=1}else{if(t!==0)for(let d=0;d<n.length;d++)n[d]+=t;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(n.slice(1)),this._buffers[0].buffer+=e}let o=this._buffers[0].buffer.length,s=this._buffers[0].lineStarts.length-1,a=o-this._buffers[0].lineStarts[s],l={line:s,column:a},u=new re(0,i,l,this.getLineFeedCnt(0,i,l),o-t);return this._lastChangeBufferPos=l,[u]}getLinesRawContent(){return this.getContentOfSubTree(this.root)}getLineRawContent(e,t=0){let n=this.root,i="",o=this._searchCache.get2(e);if(o){n=o.node;let s=this.getAccumulatedValue(n,e-o.nodeStartLineNumber-1),a=this._buffers[n.piece.bufferIndex].buffer,l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);if(o.nodeStartLineNumber+n.piece.lineFeedCnt===e)i=a.substring(l+s,l+n.piece.length);else{let u=this.getAccumulatedValue(n,e-o.nodeStartLineNumber);return a.substring(l+s,l+u-t)}}else{let s=0,a=e;for(;n!==E;)if(n.left!==E&&n.lf_left>=e-1)n=n.left;else if(n.lf_left+n.piece.lineFeedCnt>e-1){let l=this.getAccumulatedValue(n,e-n.lf_left-2),u=this.getAccumulatedValue(n,e-n.lf_left-1),d=this._buffers[n.piece.bufferIndex].buffer,c=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return s+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:s,nodeStartLineNumber:a-(e-1-n.lf_left)}),d.substring(c+l,c+u-t)}else if(n.lf_left+n.piece.lineFeedCnt===e-1){let l=this.getAccumulatedValue(n,e-n.lf_left-2),u=this._buffers[n.piece.bufferIndex].buffer,d=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i=u.substring(d+l,d+n.piece.length);break}else e-=n.lf_left+n.piece.lineFeedCnt,s+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==E;){let s=this._buffers[n.piece.bufferIndex].buffer;if(n.piece.lineFeedCnt>0){let a=this.getAccumulatedValue(n,0),l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i+=s.substring(l,l+a-t),i}else{let a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i+=s.substr(a,n.piece.length)}n=n.next()}return i}computeBufferMetadata(){let e=this.root,t=1,n=0;for(;e!==E;)t+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=n,this._searchCache.validate(this._length)}getIndexOf(e,t){let n=e.piece,i=this.positionInBuffer(e,t),o=i.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===t){let s=this.getLineFeedCnt(e.piece.bufferIndex,n.start,i);if(s!==o)return{index:s,remainder:0}}return{index:o,remainder:i.column}}getAccumulatedValue(e,t){if(t<0)return 0;let n=e.piece,i=this._buffers[n.bufferIndex].lineStarts,o=n.start.line+t+1;return o>n.end.line?i[n.end.line]+n.end.column-i[n.start.line]-n.start.column:i[o]-i[n.start.line]-n.start.column}deleteNodeTail(e,t){let n=e.piece,i=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.end),s=t,a=this.offsetInBuffer(n.bufferIndex,s),l=this.getLineFeedCnt(n.bufferIndex,n.start,s),u=l-i,d=a-o,c=n.length+d;e.piece=new re(n.bufferIndex,n.start,s,l,c),ye(this,e,d,u)}deleteNodeHead(e,t){let n=e.piece,i=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.start),s=t,a=this.getLineFeedCnt(n.bufferIndex,s,n.end),l=this.offsetInBuffer(n.bufferIndex,s),u=a-i,d=o-l,c=n.length+d;e.piece=new re(n.bufferIndex,s,n.end,a,c),ye(this,e,d,u)}shrinkNode(e,t,n){let i=e.piece,o=i.start,s=i.end,a=i.length,l=i.lineFeedCnt,u=t,d=this.getLineFeedCnt(i.bufferIndex,i.start,u),c=this.offsetInBuffer(i.bufferIndex,t)-this.offsetInBuffer(i.bufferIndex,o);e.piece=new re(i.bufferIndex,i.start,u,d,c),ye(this,e,c-a,d-l);let f=new re(i.bufferIndex,n,s,this.getLineFeedCnt(i.bufferIndex,n,s),this.offsetInBuffer(i.bufferIndex,s)-this.offsetInBuffer(i.bufferIndex,n)),p=this.rbInsertRight(e,f);this.validateCRLFWithPrevNode(p)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+=`
`);let n=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),i=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;let o=Te(t,!1);for(let p=0;p<o.length;p++)o[p]+=i;if(n){let p=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:i-p}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(o.slice(1));let s=this._buffers[0].lineStarts.length-1,a=this._buffers[0].buffer.length-this._buffers[0].lineStarts[s],l={line:s,column:a},u=e.piece.length+t.length,d=e.piece.lineFeedCnt,c=this.getLineFeedCnt(0,e.piece.start,l),f=c-d;e.piece=new re(e.piece.bufferIndex,e.piece.start,l,c,u),this._lastChangeBufferPos=l,ye(this,e,t.length,f)}nodeAt(e){let t=this.root,n=this._searchCache.get(e);if(n)return{node:n.node,nodeStartOffset:n.nodeStartOffset,remainder:e-n.nodeStartOffset};let i=0;for(;t!==E;)if(t.size_left>e)t=t.left;else if(t.size_left+t.piece.length>=e){i+=t.size_left;let o={node:t,remainder:e-t.size_left,nodeStartOffset:i};return this._searchCache.set(o),o}else e-=t.size_left+t.piece.length,i+=t.size_left+t.piece.length,t=t.right;return null}nodeAt2(e,t){let n=this.root,i=0;for(;n!==E;)if(n.left!==E&&n.lf_left>=e-1)n=n.left;else if(n.lf_left+n.piece.lineFeedCnt>e-1){let o=this.getAccumulatedValue(n,e-n.lf_left-2),s=this.getAccumulatedValue(n,e-n.lf_left-1);return i+=n.size_left,{node:n,remainder:Math.min(o+t-1,s),nodeStartOffset:i}}else if(n.lf_left+n.piece.lineFeedCnt===e-1){let o=this.getAccumulatedValue(n,e-n.lf_left-2);if(o+t-1<=n.piece.length)return{node:n,remainder:o+t-1,nodeStartOffset:i};t-=n.piece.length-o;break}else e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right;for(n=n.next();n!==E;){if(n.piece.lineFeedCnt>0){let o=this.getAccumulatedValue(n,0),s=this.offsetOfNode(n);return{node:n,remainder:Math.min(t-1,o),nodeStartOffset:s}}else if(n.piece.length>=t-1){let o=this.offsetOfNode(n);return{node:n,remainder:t-1,nodeStartOffset:o}}else t-=n.piece.length;n=n.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;let n=this._buffers[e.piece.bufferIndex],i=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return n.buffer.charCodeAt(i)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===`
`)}startWithLF(e){if(typeof e=="string")return e.charCodeAt(0)===10;if(e===E||e.piece.lineFeedCnt===0)return!1;let t=e.piece,n=this._buffers[t.bufferIndex].lineStarts,i=t.start.line,o=n[i]+t.start.column;return i===n.length-1||n[i+1]>o+1?!1:this._buffers[t.bufferIndex].buffer.charCodeAt(o)===10}endWithCR(e){return typeof e=="string"?e.charCodeAt(e.length-1)===13:e===E||e.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(e,e.piece.length-1)===13}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){let t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){let t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){let n=[],i=this._buffers[e.piece.bufferIndex].lineStarts,o;e.piece.end.column===0?o={line:e.piece.end.line-1,column:i[e.piece.end.line]-i[e.piece.end.line-1]-1}:o={line:e.piece.end.line,column:e.piece.end.column-1};let s=e.piece.length-1,a=e.piece.lineFeedCnt-1;e.piece=new re(e.piece.bufferIndex,e.piece.start,o,a,s),ye(this,e,-1,-1),e.piece.length===0&&n.push(e);let l={line:t.piece.start.line+1,column:0},u=t.piece.length-1,d=this.getLineFeedCnt(t.piece.bufferIndex,l,t.piece.end);t.piece=new re(t.piece.bufferIndex,l,t.piece.end,d,u),ye(this,t,-1,-1),t.piece.length===0&&n.push(t);let c=this.createNewPieces(`\r
`);this.rbInsertRight(e,c[0]);for(let f=0;f<n.length;f++)Pt(this,n[f])}adjustCarriageReturnFromNext(e,t){if(this.shouldCheckCRLF()&&this.endWithCR(e)){let n=t.next();if(this.startWithLF(n)){if(e+=`
`,n.piece.length===1)Pt(this,n);else{let i=n.piece,o={line:i.start.line+1,column:0},s=i.length-1,a=this.getLineFeedCnt(i.bufferIndex,o,i.end);n.piece=new re(i.bufferIndex,o,i.end,a,s),ye(this,n,-1,-1)}return!0}}return!1}iterate(e,t){if(e===E)return t(E);let n=this.iterate(e.left,t);return n&&t(e)&&this.iterate(e.right,t)}getNodeContent(e){if(e===E)return"";let t=this._buffers[e.piece.bufferIndex],n=e.piece,i=this.offsetInBuffer(n.bufferIndex,n.start),o=this.offsetInBuffer(n.bufferIndex,n.end);return t.buffer.substring(i,o)}getPieceContent(e){let t=this._buffers[e.bufferIndex],n=this.offsetInBuffer(e.bufferIndex,e.start),i=this.offsetInBuffer(e.bufferIndex,e.end);return t.buffer.substring(n,i)}rbInsertRight(e,t){let n=new ft(t,1);if(n.left=E,n.right=E,n.parent=E,n.size_left=0,n.lf_left=0,this.root===E)this.root=n,n.color=0;else if(e.right===E)e.right=n,n.parent=e;else{let o=gn(e.right);o.left=n,n.parent=o}return Pr(this,n),n}rbInsertLeft(e,t){let n=new ft(t,1);if(n.left=E,n.right=E,n.parent=E,n.size_left=0,n.lf_left=0,this.root===E)this.root=n,n.color=0;else if(e.left===E)e.left=n,n.parent=e;else{let i=Rr(e.left);i.right=n,n.parent=i}return Pr(this,n),n}getContentOfSubTree(e){let t="";return this.iterate(e,n=>(t+=this.getNodeContent(n),!0)),t}};function Tn(r){let e=0,t=0,n=0,i=0;for(let o=0,s=r.length;o<s;o++){let a=r.charCodeAt(o);a===13?(e===0&&(t=o),e++,o+1<s&&r.charCodeAt(o+1)===10?(i|=2,o++):i|=3,n=o+1):a===10&&(i|=1,e===0&&(t=o),e++,n=o+1)}return e===0&&(t=r.length),[e,t,r.length-n,i]}var Vr;function Ra(){return Vr||(Vr=new TextDecoder("UTF-16LE")),Vr}function Uo(r,e,t){let n=new Uint16Array(r.buffer,e,t);return t>0&&(n[0]===65279||n[0]===65534)?Aa(r,e,t):Ra().decode(n)}function Aa(r,e,t){let n=[],i=0;for(let o=0;o<t;o++){let s=ho(r,e);e+=2,n[i++]=String.fromCharCode(s)}return n.join("")}function vn(r){return r.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}var In=class r{constructor(e,t,n,i){this.oldPosition=e;this.oldText=t;this.newPosition=n;this.newText=i}get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${vn(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${vn(this.oldText)}")`:`(replace@${this.oldPosition} "${vn(this.oldText)}" with "${vn(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,n){let i=t.length;wt(e,i,n),n+=4;for(let o=0;o<i;o++)mo(e,t.charCodeAt(o),n),n+=2;return n}static _readString(e,t){let n=Et(e,t);return t+=4,Uo(e,t,n)}writeSize(){return 8+r._writeStringSize(this.oldText)+r._writeStringSize(this.newText)}write(e,t){return wt(e,this.oldPosition,t),t+=4,wt(e,this.newPosition,t),t+=4,t=r._writeString(e,this.oldText,t),t=r._writeString(e,this.newText,t),t}static read(e,t,n){let i=Et(e,t);t+=4;let o=Et(e,t);t+=4;let s=r._readString(e,t);t+=r._writeStringSize(s);let a=r._readString(e,t);return t+=r._writeStringSize(a),n.push(new r(i,s,o,a)),t}};var En=class r extends ce{constructor(t,n,i,o,s,a,l){super();this._onDidChangeContent=this._register(new ne);this._BOM=n,this._mightContainNonBasicASCII=!a,this._mightContainRTL=o,this._mightContainUnusualLineTerminators=s,this._pieceTree=new yn(t,i,l)}get onDidChangeContent(){return this._onDidChangeContent.event}equals(t){return!(t instanceof r)||this._BOM!==t._BOM||this.getEOL()!==t.getEOL()?!1:this._pieceTree.equal(t._pieceTree)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(t){return this._pieceTree.createSnapshot(t?this._BOM:"")}getOffsetAt(t,n){return this._pieceTree.getOffsetAt(t,n)}getPositionAt(t){return this._pieceTree.getPositionAt(t)}getRangeAt(t,n){let i=t+n,o=this.getPositionAt(t),s=this.getPositionAt(i);return new $(o.lineNumber,o.column,s.lineNumber,s.column)}getValueInRange(t,n=0){if(t.isEmpty())return"";let i=this._getEndOfLine(n);return this._pieceTree.getValueInRange(t,i)}getValueLengthInRange(t,n=0){if(t.isEmpty())return 0;if(t.startLineNumber===t.endLineNumber)return t.endColumn-t.startColumn;let i=this.getOffsetAt(t.startLineNumber,t.startColumn),o=this.getOffsetAt(t.endLineNumber,t.endColumn),s=0,a=this._getEndOfLine(n),l=this.getEOL();if(a.length!==l.length){let u=a.length-l.length,d=t.endLineNumber-t.startLineNumber;s=u*d}return o-i+s}getCharacterCountInRange(t,n=0){if(this._mightContainNonBasicASCII){let i=0,o=t.startLineNumber,s=t.endLineNumber;for(let a=o;a<=s;a++){let l=this.getLineContent(a),u=a===o?t.startColumn-1:0,d=a===s?t.endColumn-1:l.length;for(let c=u;c<d;c++)ct(l.charCodeAt(c))?(i=i+1,c=c+1):i=i+1}return i+=this._getEndOfLine(n).length*(s-o),i}return this.getValueLengthInRange(t,n)}getNearestChunk(t){return this._pieceTree.getNearestChunk(t)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(t){return this._pieceTree.getLineContent(t)}getLineCharCode(t,n){return this._pieceTree.getLineCharCode(t,n)}getCharCode(t){return this._pieceTree.getCharCode(t)}getLineLength(t){return this._pieceTree.getLineLength(t)}getLineMinColumn(t){return 1}getLineMaxColumn(t){return this.getLineLength(t)+1}getLineFirstNonWhitespaceColumn(t){let n=nn(this.getLineContent(t));return n===-1?0:n+1}getLineLastNonWhitespaceColumn(t){let n=no(this.getLineContent(t));return n===-1?0:n+2}_getEndOfLine(t){switch(t){case 1:return`
`;case 2:return`\r
`;case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(t){this._pieceTree.setEOL(t)}applyEdits(t,n,i){let o=this._mightContainRTL,s=this._mightContainUnusualLineTerminators,a=this._mightContainNonBasicASCII,l=!0,u=[];for(let b=0;b<t.length;b++){let h=t[b];l&&h._isTracked&&(l=!1);let x=h.range;if(h.text){let y=!0;a||(y=!so(h.text),a=y),!o&&y&&(o=on(h.text)),!s&&y&&(s=sn(h.text))}let m="",L=0,R=0,z=0;if(h.text){let y;[L,R,z,y]=Tn(h.text);let _=this.getEOL(),k=_===`\r
`?2:1;y===0||y===k?m=h.text:m=h.text.replace(/\r\n|\r|\n/g,_)}u[b]={sortIndex:b,identifier:h.identifier||null,range:x,rangeOffset:this.getOffsetAt(x.startLineNumber,x.startColumn),rangeLength:this.getValueLengthInRange(x),text:m,eolCount:L,firstLineLength:R,lastLineLength:z,forceMoveMarkers:!!h.forceMoveMarkers,isAutoWhitespaceEdit:h.isAutoWhitespaceEdit||!1}}u.sort(r._sortOpsAscending);let d=!1;for(let b=0,h=u.length-1;b<h;b++){let x=u[b].range.getEndPosition(),m=u[b+1].range.getStartPosition();if(m.isBeforeOrEqual(x)){if(m.isBefore(x))throw new Error("Overlapping ranges are not allowed!");d=!0}}l&&(u=this._reduceOperations(u));let c=i||n?r._getInverseEditRanges(u):[],f=[];if(n)for(let b=0;b<u.length;b++){let h=u[b],x=c[b];if(h.isAutoWhitespaceEdit&&h.range.isEmpty())for(let m=x.startLineNumber;m<=x.endLineNumber;m++){let L="";m===x.startLineNumber&&(L=this.getLineContent(h.range.startLineNumber),nn(L)!==-1)||f.push({lineNumber:m,oldContent:L})}}let p=null;if(i){let b=0;p=[];for(let h=0;h<u.length;h++){let x=u[h],m=c[h],L=this.getValueInRange(x.range),R=x.rangeOffset+b;b+=x.text.length-L.length,p[h]={sortIndex:x.sortIndex,identifier:x.identifier,range:m,text:L,textChange:new In(x.rangeOffset,L,R,x.text)}}d||p.sort((h,x)=>h.sortIndex-x.sortIndex)}this._mightContainRTL=o,this._mightContainUnusualLineTerminators=s,this._mightContainNonBasicASCII=a;let g=this._doApplyEdits(u),T=null;if(n&&f.length>0){f.sort((b,h)=>h.lineNumber-b.lineNumber),T=[];for(let b=0,h=f.length;b<h;b++){let x=f[b].lineNumber;if(b>0&&f[b-1].lineNumber===x)continue;let m=f[b].oldContent,L=this.getLineContent(x);L.length===0||L===m||nn(L)!==-1||T.push(x)}}return this._onDidChangeContent.fire(),new mn(p,g,T)}_reduceOperations(t){return t.length<1e3?t:[this._toSingleEditOperation(t)]}_toSingleEditOperation(t){let n=!1,i=t[0].range,o=t[t.length-1].range,s=new $(i.startLineNumber,i.startColumn,o.endLineNumber,o.endColumn),a=i.startLineNumber,l=i.startColumn,u=[];for(let g=0,T=t.length;g<T;g++){let b=t[g],h=b.range;n=n||b.forceMoveMarkers,u.push(this.getValueInRange(new $(a,l,h.startLineNumber,h.startColumn))),b.text.length>0&&u.push(b.text),a=h.endLineNumber,l=h.endColumn}let d=u.join(""),[c,f,p]=Tn(d);return{sortIndex:0,identifier:t[0].identifier,range:s,rangeOffset:this.getOffsetAt(s.startLineNumber,s.startColumn),rangeLength:this.getValueLengthInRange(s,0),text:d,eolCount:c,firstLineLength:f,lastLineLength:p,forceMoveMarkers:n,isAutoWhitespaceEdit:!1}}_doApplyEdits(t){t.sort(r._sortOpsDescending);let n=[];for(let i=0;i<t.length;i++){let o=t[i],s=o.range.startLineNumber,a=o.range.startColumn,l=o.range.endLineNumber,u=o.range.endColumn;if(s===l&&a===u&&o.text.length===0)continue;o.text?(this._pieceTree.delete(o.rangeOffset,o.rangeLength),this._pieceTree.insert(o.rangeOffset,o.text,!0)):this._pieceTree.delete(o.rangeOffset,o.rangeLength);let d=new $(s,a,l,u);n.push({range:d,rangeLength:o.rangeLength,text:o.text,rangeOffset:o.rangeOffset,forceMoveMarkers:o.forceMoveMarkers})}return n}findMatchesLineByLine(t,n,i,o){return this._pieceTree.findMatchesLineByLine(t,n,i,o)}getPieceTree(){return this._pieceTree}static _getInverseEditRange(t,n){let i=t.startLineNumber,o=t.startColumn,[s,a,l]=Tn(n),u;if(n.length>0){let d=s+1;d===1?u=new $(i,o,i,o+a):u=new $(i,o,i+d-1,l+1)}else u=new $(i,o,i,o);return u}static _getInverseEditRanges(t){let n=[],i=0,o=0,s=null;for(let a=0,l=t.length;a<l;a++){let u=t[a],d,c;s?s.range.endLineNumber===u.range.startLineNumber?(d=i,c=o+(u.range.startColumn-s.range.endColumn)):(d=i+(u.range.startLineNumber-s.range.endLineNumber),c=u.range.startColumn):(d=u.range.startLineNumber,c=u.range.startColumn);let f;if(u.text.length>0){let p=u.eolCount+1;p===1?f=new $(d,c,d,c+u.firstLineLength):f=new $(d,c,d+p-1,u.lastLineLength+1)}else f=new $(d,c,d,c);i=f.endLineNumber,o=f.endColumn,n.push(f),s=u}return n}static _sortOpsAscending(t,n){let i=$.compareRangesUsingEnds(t.range,n.range);return i===0?t.sortIndex-n.sortIndex:i}static _sortOpsDescending(t,n){let i=$.compareRangesUsingEnds(t.range,n.range);return i===0?n.sortIndex-t.sortIndex:-i}};var Wr=class{constructor(e,t,n,i,o,s,a,l,u){this._chunks=e;this._bom=t;this._cr=n;this._lf=i;this._crlf=o;this._containsRTL=s;this._containsUnusualLineTerminators=a;this._isBasicASCII=l;this._normalizeEOL=u}_getEOL(e){let t=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return t===0?e===1?`
`:`\r
`:n>t/2?`\r
`:`
`}create(e){let t=this._getEOL(e),n=this._chunks;if(this._normalizeEOL&&(t===`\r
`&&(this._cr>0||this._lf>0)||t===`
`&&(this._cr>0||this._crlf>0)))for(let o=0,s=n.length;o<s;o++){let a=n[o].buffer.replace(/\r\n|\r|\n/g,t),l=Te(a);n[o]=new ve(a,l)}let i=new En(n,this._bom,t,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:i,disposable:i}}getFirstLineText(e){return this._chunks[0].buffer.substr(0,e).split(/\r\n|\r|\n/)[0]}},wn=class{constructor(){this.chunks=[],this.BOM="",this._hasPreviousChar=!1,this._previousChar=0,this._tmpLineStarts=[],this.cr=0,this.lf=0,this.crlf=0,this.containsRTL=!1,this.containsUnusualLineTerminators=!1,this.isBasicASCII=!0}acceptChunk(e){if(e.length===0)return;this.chunks.length===0&&lo(e)&&(this.BOM=ao,e=e.substr(1));let t=e.charCodeAt(e.length-1);t===13||t>=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){!t&&e.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){let t=Mo(this._tmpLineStarts,e);this.chunks.push(new ve(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,t.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=on(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=sn(e)))}finish(e=!0){return this._finish(),new Wr(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;let e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);let t=Te(e.buffer);e.lineStarts=t,this._previousChar===13&&this.cr++}}};function Ve(r){return r===47||r===92}function qr(r){return r.replace(/[\\/]/g,M.sep)}function Bo(r){return r.indexOf("/")===-1&&(r=qr(r)),/^[a-zA-Z]:(\/|$)/.test(r)&&(r="/"+r),r}function zr(r,e=M.sep){if(!r)return"";let t=r.length,n=r.charCodeAt(0);if(Ve(n)){if(Ve(r.charCodeAt(1))&&!Ve(r.charCodeAt(2))){let o=3,s=o;for(;o<t&&!Ve(r.charCodeAt(o));o++);if(s!==o&&!Ve(r.charCodeAt(o+1))){for(o+=1;o<t;o++)if(Ve(r.charCodeAt(o)))return r.slice(0,o+1).replace(/[\\/]/g,e)}}return e}else if(Pa(n)&&r.charCodeAt(1)===58)return Ve(r.charCodeAt(2))?r.slice(0,2)+e:r.slice(0,2);let i=r.indexOf("://");if(i!==-1){for(i+=3;i<t;i++)if(Ve(r.charCodeAt(i)))return r.slice(0,i+1)}return""}function Sn(r,e,t,n=!1){let i=n?M.sep:Ze;if(r===e)return!0;if(!r||!e||((r.indexOf("..")>=0||e.indexOf("..")>=0)&&(r=n?M.normalize(r):Lt(r),e=n?M.normalize(e):Lt(e)),e.length>r.length))return!1;if(t){if(!cr(r,e))return!1;if(e.length===r.length)return!0;let s=e.length;return e.charAt(e.length-1)===i&&s--,r.charAt(s)===i}return e.charAt(e.length-1)!==i&&(e+=i),r.indexOf(e)===0}function Pa(r){return r>=65&&r<=90||r>=97&&r<=122}var B;(N=>(N.inMemory="inmemory",N.vscode="vscode",N.internal="private",N.walkThrough="walkThrough",N.walkThroughSnippet="walkThroughSnippet",N.http="http",N.https="https",N.file="file",N.mailto="mailto",N.untitled="untitled",N.data="data",N.command="command",N.vscodeRemote="vscode-remote",N.vscodeRemoteResource="vscode-remote-resource",N.vscodeManagedRemoteResource="vscode-managed-remote-resource",N.vscodeUserData="vscode-userdata",N.vscodeCustomEditor="vscode-custom-editor",N.vscodeNotebookCell="vscode-notebook-cell",N.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",N.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",N.vscodeNotebookCellOutput="vscode-notebook-cell-output",N.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",N.vscodeNotebookMetadata="vscode-notebook-metadata",N.vscodeInteractiveInput="vscode-interactive-input",N.vscodeSettings="vscode-settings",N.vscodeWorkspaceTrust="vscode-workspace-trust",N.vscodeTerminal="vscode-terminal",N.vscodeImageCarousel="vscode-image-carousel",N.vscodeChatCodeBlock="vscode-chat-code-block",N.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",N.vscodeChatEditor="vscode-chat-editor",N.vscodeChatInput="chatSessionInput",N.vscodeLocalChatSession="vscode-chat-session",N.webviewPanel="webview-panel",N.vscodeWebview="vscode-webview",N.vscodeBrowser="vscode-browser",N.extension="extension",N.vscodeFileResource="vscode-file",N.tmp="tmp",N.vsls="vsls",N.vscodeSourceControl="vscode-scm",N.commentsInput="comment",N.codeSetting="code-setting",N.outputChannel="output",N.accessibleView="accessible-view",N.chatEditingSnapshotScheme="chat-editing-snapshot-text-model",N.chatEditingModel="chat-editing-text-model",N.copilotPr="copilot-pr"))(B||={});var Oa="tkn",$r=class{constructor(){this._hosts=Object.create(null);this._ports=Object.create(null);this._connectionTokens=Object.create(null);this._preferredWebSchema="http";this._delegate=null;this._serverRootPath="/"}setPreferredWebSchema(e){this._preferredWebSchema=e}setDelegate(e){this._delegate=e}setServerRootPath(e,t){this._serverRootPath=M.join(t??"/",Ua(e))}getServerRootPath(){return this._serverRootPath}get _remoteResourcesPath(){return M.join(this._serverRootPath,B.vscodeRemoteResource)}set(e,t,n){this._hosts[e]=t,this._ports[e]=n}setConnectionToken(e,t){this._connectionTokens[e]=t}getPreferredWebSchema(){return this._preferredWebSchema}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(a){return fi(a),e}let t=e.authority,n=this._hosts[t];n&&n.indexOf(":")!==-1&&n.indexOf("[")===-1&&(n=`[${n}]`);let i=this._ports[t],o=this._connectionTokens[t],s=`path=${encodeURIComponent(e.path)}`;return typeof o=="string"&&(s+=`&${Oa}=${encodeURIComponent(o)}`),G.from({scheme:Ge?this._preferredWebSchema:B.vscodeRemoteResource,authority:`${n}:${i}`,path:Ge?(window.location.pathname+"/"+this._remoteResourcesPath).replace(/\/\/+/g,"/"):this._remoteResourcesPath,query:s})}},Ma=new $r;function Ua(r){return`${r.quality??"oss"}-${r.commit??"dev"}`}var Ba="vscode-app",jr=class r{static{this.FALLBACK_AUTHORITY=Ba}asBrowserUri(e){let t=this.toUri(e);return this.uriToBrowserUri(t)}uriToBrowserUri(e){return e.scheme===B.vscodeRemote?Ma.rewrite(e):e.scheme===B.file&&(Di||Oi===`${B.vscodeFileResource}://${r.FALLBACK_AUTHORITY}`)?e.with({scheme:B.vscodeFileResource,authority:e.authority||r.FALLBACK_AUTHORITY,query:null,fragment:null}):e}asFileUri(e){let t=this.toUri(e);return this.uriToFileUri(t)}uriToFileUri(e){return e.scheme===B.vscodeFileResource?e.with({scheme:B.file,authority:e.authority!==r.FALLBACK_AUTHORITY?e.authority:null,query:null,fragment:null}):e}toUri(e){if(G.isUri(e))return e;if(globalThis._VSCODE_FILE_ROOT){let t=globalThis._VSCODE_FILE_ROOT;if(/^\w[\w\d+.-]*:\/\//.test(t))return G.joinPath(G.parse(t,!0),e);let n=wr(t,e);return G.file(n)}throw new Error("Cannot determine URI for module id!")}},M1=new jr,U1=Object.freeze({"Cache-Control":"no-cache, no-store"}),B1=Object.freeze({"Document-Policy":"include-js-call-stacks-in-crash-reports"}),Fa;(o=>{let r=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);o.CoopAndCoep=Object.freeze(r.get("3"));let t="vscode-coi";function n(s){let a;typeof s=="string"?a=new URL(s).searchParams:s instanceof URL?a=s.searchParams:G.isUri(s)&&(a=new URL(s.toString(!0)).searchParams);let l=a?.get(t);if(l)return r.get(l)}o.getHeadersFromQuery=n;function i(s,a,l){if(!globalThis.crossOriginIsolated)return;let u=a&&l?"3":l?"2":"1";s instanceof URLSearchParams?s.set(t,u):s[t]=u}o.addSearchParam=i})(Fa||={});function Pe(r){return kt(r,!0)}var Dt=class{constructor(e){this._ignorePathCasing=e}compare(e,t,n=!1){return e===t?0:ro(this.getComparisonKey(e,n),this.getComparisonKey(t,n))}isEqual(e,t,n=!1){return e===t?!0:!e||!t?!1:this.getComparisonKey(e,n)===this.getComparisonKey(t,n)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}ignorePathCasing(e){return this._ignorePathCasing(e)}isEqualOrParent(e,t,n=!1){if(e.scheme===t.scheme){if(e.scheme===B.file)return Sn(Pe(e),Pe(t),this._ignorePathCasing(e))&&e.query===t.query&&(n||e.fragment===t.fragment);if(Fo(e.authority,t.authority))return Sn(e.path,t.path,this._ignorePathCasing(e),!0)&&e.query===t.query&&(n||e.fragment===t.fragment)}return!1}joinPath(e,...t){return G.joinPath(e,...t)}basenameOrAuthority(e){return Ka(e)||e.authority}basename(e,t){return M.basename(e.path,t)}extname(e){return M.extname(e.path)}dirname(e){if(e.path.length===0)return e;let t;return e.scheme===B.file?t=G.file(Eo(Pe(e))).path:(t=M.dirname(e.path),e.authority&&t.length&&t.charCodeAt(0)!==47&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return e.scheme===B.file?t=G.file(Lt(Pe(e))).path:t=M.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!Fo(e.authority,t.authority))return;if(e.scheme===B.file){let o=Io(Pe(e),Pe(t));return ue?qr(o):o}let n=e.path||"/",i=t.path||"/";if(this._ignorePathCasing(e)){let o=0;for(let s=Math.min(n.length,i.length);o<s&&!(n.charCodeAt(o)!==i.charCodeAt(o)&&n.charAt(o).toLowerCase()!==i.charAt(o).toLowerCase());o++);n=i.substr(0,o)+n.substr(o)}return M.relative(n,i)}resolvePath(e,t){if(e.scheme===B.file){let n=G.file(vo(Pe(e),t));return e.with({authority:n.authority,path:n.path})}return t=Bo(t),e.with({path:M.resolve(e.path,t)})}isAbsolutePath(e){return!!e.path&&e.path[0]==="/"}isEqualAuthority(e,t){return e===t||e!==void 0&&t!==void 0&&vt(e,t)}hasTrailingPathSeparator(e,t=Ze){if(e.scheme===B.file){let n=Pe(e);return n.length>zr(n).length&&n[n.length-1]===t}else{let n=e.path;return n.length>1&&n.charCodeAt(n.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=Ze){return Ko(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=Ze){let n=!1;if(e.scheme===B.file){let i=Pe(e);n=i!==void 0&&i.length===zr(i).length&&i[i.length-1]===t}else{t="/";let i=e.path;n=i.length===1&&i.charCodeAt(i.length-1)===47}return!n&&!Ko(e,t)?e.with({path:e.path+"/"}):e}},F=new Dt(()=>!1),$1=new Dt(r=>r.scheme===B.file?!_t:!0),j1=new Dt(r=>!0),H1=F.isEqual.bind(F),G1=F.isEqualOrParent.bind(F),Q1=F.getComparisonKey.bind(F),Y1=F.basenameOrAuthority.bind(F),Ka=F.basename.bind(F),X1=F.extname.bind(F),Z1=F.dirname.bind(F),J1=F.joinPath.bind(F),ed=F.normalizePath.bind(F),td=F.relativePath.bind(F),nd=F.resolvePath.bind(F),rd=F.isAbsolutePath.bind(F),Fo=F.isEqualAuthority.bind(F),Ko=F.hasTrailingPathSeparator.bind(F),id=F.removeTrailingPathSeparator.bind(F),od=F.addTrailingPathSeparator.bind(F);var Va;(o=>{o.META_DATA_LABEL="label",o.META_DATA_DESCRIPTION="description",o.META_DATA_SIZE="size",o.META_DATA_MIME="mime";function i(s){let a=new Map;s.path.substring(s.path.indexOf(";")+1,s.path.lastIndexOf(";")).split(";").forEach(d=>{let[c,f]=d.split(":");c&&f&&a.set(c,f)});let u=s.path.substring(0,s.path.indexOf(";"));return u&&a.set(o.META_DATA_MIME,u),a}o.parseMetaData=i})(Va||={});var Id=2**31-1;var Wa,Hr;(function(){let r=globalThis;typeof r.requestIdleCallback!="function"||typeof r.cancelIdleCallback!="function"?Hr=(e,t,n)=>{Mi(()=>{if(i)return;let o=Date.now()+15;t(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,o-Date.now())}}))});let i=!1;return{dispose(){i||(i=!0)}}}:Hr=(e,t,n)=>{let i=e.requestIdleCallback(t,typeof n=="number"?{timeout:n}:void 0),o=!1;return{dispose(){o||(o=!0,e.cancelIdleCallback(i))}}},Wa=(e,t)=>Hr(globalThis,e,t)})();var Cn=class r{static fromPromise(e){let t=new r;return t.settleWith(e),t}get isRejected(){return this.outcome?.outcome===1}get isResolved(){return this.outcome?.outcome===0}get isSettled(){return!!this.outcome}get value(){return this.outcome?.outcome===0?this.outcome?.value:void 0}constructor(){this.p=new Promise((e,t)=>{this.completeCallback=e,this.errorCallback=t})}complete(e){return this.isSettled?Promise.resolve():new Promise(t=>{this.completeCallback(e),this.outcome={outcome:0,value:e},t()})}error(e){return this.isSettled?Promise.resolve():new Promise(t=>{this.errorCallback(e),this.outcome={outcome:1,value:e},t()})}settleWith(e){return e.then(t=>this.complete(t),t=>this.error(t))}cancel(){return this.error(new it)}},qa;(t=>{async function r(n){let i,o=await Promise.all(n.map(s=>s.then(a=>a,a=>{i||(i=a)})));if(typeof i<"u")throw i;return o}t.settled=r;function e(n){return new Promise(async(i,o)=>{try{await n(i,o)}catch(s){o(s)}})}t.withAsyncBody=e})(qa||={});var Vo=class r{static fromArray(e){return new r(t=>{t.emitMany(e)})}static fromPromise(e){return new r(async t=>{t.emitMany(await e)})}static fromPromisesResolveOrder(e){return new r(async t=>{await Promise.all(e.map(async n=>t.emitOne(await n)))})}static merge(e){return new r(async t=>{await Promise.all(e.map(async n=>{for await(let i of n)t.emitOne(i)}))})}static{this.EMPTY=r.fromArray([])}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new ne,queueMicrotask(async()=>{let n={emitOne:i=>this.emitOne(i),emitMany:i=>this.emitMany(i),reject:i=>this.reject(i)};try{await Promise.resolve(e(n)),this.resolve()}catch(i){this.reject(i)}finally{n.emitOne=()=>{},n.emitMany=()=>{},n.reject=()=>{}}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(e<this._results.length)return{done:!1,value:this._results[e++]};if(this._state===1)return{done:!0,value:void 0};await Tt.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(e,t){return new r(async n=>{for await(let i of e)n.emitOne(t(i))})}map(e){return r.map(this,e)}static filter(e,t){return new r(async n=>{for await(let i of e)t(i)&&n.emitOne(i)})}filter(e){return r.filter(this,e)}static coalesce(e){return r.filter(e,t=>!!t)}coalesce(){return r.coalesce(this)}static async toPromise(e){let t=[];for await(let n of e)t.push(n);return t}toPromise(){return r.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}};var Gr=class{constructor(){this._unsatisfiedConsumers=[];this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(e){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){let t=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(t,e)}else this._unconsumedValues.push(e)}produceFinal(e){this._ensureNoFinalValue(),this._finalValue=e;for(let t of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(t,e);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new je("ProducerConsumer: cannot produce after final value has been set")}_resolveOrRejectDeferred(e,t){t.ok?e.complete(t.value):e.error(t.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){let e=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return e.ok?Promise.resolve(e.value):Promise.reject(e.error)}else{let e=new Cn;return this._unsatisfiedConsumers.push(e),e.p}}},Wo=class r{constructor(e,t){this._onReturn=t;this._producerConsumer=new Gr;this._iterator={next:()=>this._producerConsumer.consume(),return:()=>(this._onReturn?.(),Promise.resolve({done:!0,value:void 0})),throw:async e=>(this._finishError(e),{done:!0,value:void 0})};queueMicrotask(async()=>{let n=e({emitOne:i=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:i}}),emitMany:i=>{for(let o of i)this._producerConsumer.produce({ok:!0,value:{done:!1,value:o}})},reject:i=>this._finishError(i)});if(!this._producerConsumer.hasFinalValue)try{await n,this._finishOk()}catch(i){this._finishError(i)}})}static fromArray(e){return new r(t=>{t.emitMany(e)})}static fromPromise(e){return new r(async t=>{t.emitMany(await e)})}static fromPromisesResolveOrder(e){return new r(async t=>{await Promise.all(e.map(async n=>t.emitOne(await n)))})}static merge(e){return new r(async t=>{await Promise.all(e.map(async n=>{for await(let i of n)t.emitOne(i)}))})}static{this.EMPTY=r.fromArray([])}static map(e,t){return new r(async n=>{for await(let i of e)n.emitOne(t(i))})}static tee(e){let t,n,i=new Cn,o=async()=>{if(!(!t||!n))try{for await(let l of e)t.emitOne(l),n.emitOne(l)}catch(l){t.reject(l),n.reject(l)}finally{i.complete()}},s=new r(async l=>(t=l,o(),i.p)),a=new r(async l=>(n=l,o(),i.p));return[s,a]}map(e){return r.map(this,e)}static coalesce(e){return r.filter(e,t=>!!t)}coalesce(){return r.coalesce(this)}static filter(e,t){return new r(async n=>{for await(let i of e)t(i)&&n.emitOne(i)})}filter(e){return r.filter(this,e)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(e){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:e})}[Symbol.asyncIterator](){return this._iterator}};var Ud=new ot(1e4);var et=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list",html:"text/html"});function Qr(...r){switch(r.length){case 1:return te(2417,null,r[0]);case 2:return te(2418,null,r[0],r[1]);case 3:return te(2419,null,r[0],r[1],r[2]);default:return}}var $a=te(2416,null),ja=te(2415,null),We=class r{constructor(){this._input="";this._start=0;this._current=0;this._tokens=[];this._errors=[];this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(e){switch(e.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return e.isTripleEq?"===":"==";case 4:return e.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:return">";case 8:return">=";case 9:return"=~";case 10:return e.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 17:return e.lexeme;case 18:return e.lexeme;case 19:return e.lexeme;case 20:return"EOF";default:throw pi(`unhandled token type: ${JSON.stringify(e)}; have you forgotten to add a case?`)}}static{this._regexFlags=new Set(["i","g","s","m","y","u"].map(e=>e.charCodeAt(0)))}static{this._keywords=new Map([["not",14],["in",13],["false",12],["true",11]])}get errors(){return this._errors}reset(e){return this._input=e,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){for(;!this._isAtEnd();)switch(this._start=this._current,this._advance()){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){let t=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:t})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){let t=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:t})}else this._match(126)?this._addToken(9):this._error(Qr("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(Qr("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(Qr("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(e){return this._isAtEnd()||this._input.charCodeAt(this._current)!==e?!1:(this._current++,!0)}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(e){this._tokens.push({type:e,offset:this._start})}_error(e){let t=this._start,n=this._input.substring(this._start,this._current),i={type:19,offset:this._start,lexeme:n};this._errors.push({offset:t,lexeme:n,additionalInfo:e}),this._tokens.push(i)}_string(){this.stringRe.lastIndex=this._start;let e=this.stringRe.exec(this._input);if(e){this._current=this._start+e[0].length;let t=this._input.substring(this._start,this._current),n=r._keywords.get(t);n?this._addToken(n):this._tokens.push({type:17,lexeme:t,offset:this._start})}}_quotedString(){for(;this._peek()!==39&&!this._isAtEnd();)this._advance();if(this._isAtEnd()){this._error($a);return}this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1})}_regex(){let e=this._current,t=!1,n=!1;for(;;){if(e>=this._input.length){this._current=e,this._error(ja);return}let o=this._input.charCodeAt(e);if(t)t=!1;else if(o===47&&!n){e++;break}else o===91?n=!0:o===92?t=!0:o===93&&(n=!1);e++}for(;e<this._input.length&&r._regexFlags.has(this._input.charCodeAt(e));)e++;this._current=e;let i=this._input.substring(this._start,this._current);this._tokens.push({type:10,lexeme:i,offset:this._start})}_isAtEnd(){return this._current>=this._input.length}};var qe;(i=>{i.serviceIds=new Map,i.DI_TARGET="$di$target",i.DI_DEPENDENCIES="$di$dependencies";function n(o){return o[i.DI_DEPENDENCIES]||[]}i.getServiceDependencies=n})(qe||={});var zd=Ot("instantiationService");function Ha(r,e,t){e[qe.DI_TARGET]===e?e[qe.DI_DEPENDENCIES].push({id:r,index:t}):(e[qe.DI_DEPENDENCIES]=[{id:r,index:t}],e[qe.DI_TARGET]=e)}function Ot(r){if(qe.serviceIds.has(r))return qe.serviceIds.get(r);let e=function(t,n,i){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");Ha(e,t,i)};return e.toString=()=>r,qe.serviceIds.set(r,e),e}var Q=new Map;Q.set("false",!1);Q.set("true",!0);Q.set("isMac",xt);Q.set("isLinux",_t);Q.set("isWindows",ue);Q.set("isWeb",Ge);Q.set("isMacNative",xt&&!Ge);Q.set("isEdge",Fi);Q.set("isFirefox",Ui);Q.set("isChrome",Jn);Q.set("isSafari",Bi);var Ga=Object.prototype.hasOwnProperty;var Qa={regexParsingWithErrorRecovery:!0},Ya=te(2396,null),Xa=te(2397,null),Za=te(2399,null),qo=te(2395,null),Ja=te(2402,null),el=te(2403,null),tl=te(2400,null),nl=te(2401,null),Yr=class r{constructor(e=Qa){this._config=e;this._scanner=new We;this._tokens=[];this._current=0;this._parsingErrors=[];this._flagsGYRe=/g|y/g}static{this._parseError=new Error}get lexingErrors(){return this._scanner.errors}get parsingErrors(){return this._parsingErrors}parse(e){if(e===""){this._parsingErrors.push({message:Ya,offset:0,lexeme:"",additionalInfo:Xa});return}this._tokens=this._scanner.reset(e).scan(),this._current=0,this._parsingErrors=[];try{let t=this._expr();if(!this._isAtEnd()){let n=this._peek(),i=n.type===17?el:void 0;throw this._parsingErrors.push({message:Ja,offset:n.offset,lexeme:We.getLexeme(n),additionalInfo:i}),r._parseError}return t}catch(t){if(t!==r._parseError)throw t;return}}_expr(){return this._or()}_or(){let e=[this._and()];for(;this._matchOne(16);){let t=this._and();e.push(t)}return e.length===1?e[0]:J.or(...e)}_and(){let e=[this._term()];for(;this._matchOne(15);){let t=this._term();e.push(t)}return e.length===1?e[0]:J.and(...e)}_term(){if(this._matchOne(2)){let e=this._peek();switch(e.type){case 11:return this._advance(),ie.INSTANCE;case 12:return this._advance(),le.INSTANCE;case 0:{this._advance();let t=this._expr();return this._consume(1,qo),t?.negate()}case 17:return this._advance(),nt.create(e.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",e)}}return this._primary()}_primary(){let e=this._peek();switch(e.type){case 11:return this._advance(),J.true();case 12:return this._advance(),J.false();case 0:{this._advance();let t=this._expr();return this._consume(1,qo),t}case 17:{let t=e.lexeme;if(this._advance(),this._matchOne(9)){let i=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),i.type!==10)throw this._errExpectedButGot("REGEX",i);let o=i.lexeme,s=o.lastIndexOf("/"),a=s===o.length-1?void 0:this._removeFlagsGY(o.substring(s+1)),l;try{l=new RegExp(o.substring(1,s),a)}catch{throw this._errExpectedButGot("REGEX",i)}return Wt.create(t,l)}switch(i.type){case 10:case 19:{let o=[i.lexeme];this._advance();let s=this._peek(),a=0;for(let f=0;f<i.lexeme.length;f++)i.lexeme.charCodeAt(f)===40?a++:i.lexeme.charCodeAt(f)===41&&a--;for(;!this._isAtEnd()&&s.type!==15&&s.type!==16;){switch(s.type){case 0:a++;break;case 1:a--;break;case 10:case 18:for(let f=0;f<s.lexeme.length;f++)s.lexeme.charCodeAt(f)===40?a++:i.lexeme.charCodeAt(f)===41&&a--}if(a<0)break;o.push(We.getLexeme(s)),this._advance(),s=this._peek()}let l=o.join(""),u=l.lastIndexOf("/"),d=u===l.length-1?void 0:this._removeFlagsGY(l.substring(u+1)),c;try{c=new RegExp(l.substring(1,u),d)}catch{throw this._errExpectedButGot("REGEX",i)}return J.regex(t,c)}case 18:{let o=i.lexeme;this._advance();let s=null;if(!Zi(o)){let a=o.indexOf("/"),l=o.lastIndexOf("/");if(a!==l&&a>=0){let u=o.slice(a+1,l),d=o[l+1]==="i"?"i":"";try{s=new RegExp(u,d)}catch{throw this._errExpectedButGot("REGEX",i)}}}if(s===null)throw this._errExpectedButGot("REGEX",i);return Wt.create(t,s)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,Za);let i=this._value();return J.notIn(t,i)}switch(this._peek().type){case 3:{this._advance();let i=this._value();if(this._previous().type===18)return J.equals(t,i);switch(i){case"true":return J.has(t);case"false":return J.not(t);default:return J.equals(t,i)}}case 4:{this._advance();let i=this._value();if(this._previous().type===18)return J.notEquals(t,i);switch(i){case"true":return J.not(t);case"false":return J.has(t);default:return J.notEquals(t,i)}}case 5:return this._advance(),Kt.create(t,this._value());case 6:return this._advance(),Vt.create(t,this._value());case 7:return this._advance(),pt.create(t,this._value());case 8:return this._advance(),Ft.create(t,this._value());case 13:return this._advance(),J.in(t,this._value());default:return J.has(t)}}case 20:throw this._parsingErrors.push({message:tl,offset:e.offset,lexeme:"",additionalInfo:nl}),r._parseError;default:throw this._errExpectedButGot(`true | false | KEY 
	| KEY '=~' REGEX 
	| KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value`,this._peek())}}_value(){let e=this._peek();switch(e.type){case 17:case 18:return this._advance(),e.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(e){return e.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(e){return this._check(e)?(this._advance(),!0):!1}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(e,t){if(this._check(e))return this._advance();throw this._errExpectedButGot(t,this._peek())}_errExpectedButGot(e,t,n){let i=te(2398,null,e,We.getLexeme(t)),o=t.offset,s=We.getLexeme(t);return this._parsingErrors.push({message:i,offset:o,lexeme:s,additionalInfo:n}),r._parseError}_check(e){return this._peek().type===e}_peek(){return this._tokens[this._current]}_isAtEnd(){return this._peek().type===20}},J=class{static false(){return ie.INSTANCE}static true(){return le.INSTANCE}static has(e){return tt.create(e)}static equals(e,t){return Ut.create(e,t)}static notEquals(e,t){return Bt.create(e,t)}static regex(e,t){return Wt.create(e,t)}static in(e,t){return Ln.create(e,t)}static notIn(e,t){return kn.create(e,t)}static not(e){return nt.create(e)}static and(...e){return Rn.create(e,null,!0)}static or(...e){return qt.create(e,null,!0)}static greater(e,t){return pt.create(e,t)}static greaterEquals(e,t){return Ft.create(e,t)}static smaller(e,t){return Kt.create(e,t)}static smallerEquals(e,t){return Vt.create(e,t)}static{this._parser=new Yr({regexParsingWithErrorRecovery:!1})}static deserialize(e){return e==null?void 0:this._parser.parse(e)}};function Mt(r,e){return r.cmp(e)}var ie=class r{constructor(){this.type=0}static{this.INSTANCE=new r}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}map(e){return this}negate(){return le.INSTANCE}},le=class r{constructor(){this.type=1}static{this.INSTANCE=new r}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}map(e){return this}negate(){return ie.INSTANCE}},tt=class r{constructor(e,t){this.key=e;this.negated=t;this.type=2}static create(e,t=null){let n=Q.get(e);return typeof n=="boolean"?n?le.INSTANCE:ie.INSTANCE:new r(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:jo(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){let e=Q.get(this.key);return typeof e=="boolean"?e?le.INSTANCE:ie.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}map(e){return e.mapDefined(this.key)}negate(){return this.negated||(this.negated=nt.create(this.key,this)),this.negated}},Ut=class r{constructor(e,t,n){this.key=e;this.value=t;this.negated=n;this.type=4}static create(e,t,n=null){if(typeof t=="boolean")return t?tt.create(e,n):nt.create(e,n);let i=Q.get(e);return typeof i=="boolean"?t===(i?"true":"false")?le.INSTANCE:ie.INSTANCE:new r(e,t,n)}cmp(e){return e.type!==this.type?this.type-e.type:rt(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){let e=Q.get(this.key);if(typeof e=="boolean"){let t=e?"true":"false";return this.value===t?le.INSTANCE:ie.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}map(e){return e.mapEquals(this.key,this.value)}negate(){return this.negated||(this.negated=Bt.create(this.key,this.value,this)),this.negated}},Ln=class r{constructor(e,t){this.key=e;this.valueKey=t;this.type=10;this.negated=null}static create(e,t){return new r(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:rt(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type?this.key===e.key&&this.valueKey===e.valueKey:!1}substituteConstants(){return this}evaluate(e){let t=e.getValue(this.valueKey),n=e.getValue(this.key);if(Array.isArray(t)){if(t.includes(n))return!0;if(ue&&typeof n=="string"&&n.startsWith("file:///")){let i=n.toLowerCase();return t.some(o=>typeof o=="string"&&o.toLowerCase()===i)}return!1}if(typeof n=="string"&&typeof t=="object"&&t!==null){if(Ga.call(t,n))return!0;if(ue&&n.startsWith("file:///")){let i=n.toLowerCase();return Object.keys(t).some(o=>o.toLowerCase()===i)}return!1}return!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}map(e){return e.mapIn(this.key,this.valueKey)}negate(){return this.negated||(this.negated=kn.create(this.key,this.valueKey)),this.negated}},kn=class r{constructor(e,t){this.key=e;this.valueKey=t;this.type=11;this._negated=Ln.create(e,t)}static create(e,t){return new r(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type?this._negated.equals(e._negated):!1}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}map(e){return e.mapNotIn(this.key,this.valueKey)}negate(){return this._negated}},Bt=class r{constructor(e,t,n){this.key=e;this.value=t;this.negated=n;this.type=5}static create(e,t,n=null){if(typeof t=="boolean")return t?nt.create(e,n):tt.create(e,n);let i=Q.get(e);return typeof i=="boolean"?t===(i?"true":"false")?ie.INSTANCE:le.INSTANCE:new r(e,t,n)}cmp(e){return e.type!==this.type?this.type-e.type:rt(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){let e=Q.get(this.key);if(typeof e=="boolean"){let t=e?"true":"false";return this.value===t?ie.INSTANCE:le.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}map(e){return e.mapNotEquals(this.key,this.value)}negate(){return this.negated||(this.negated=Ut.create(this.key,this.value,this)),this.negated}},nt=class r{constructor(e,t){this.key=e;this.negated=t;this.type=3}static create(e,t=null){let n=Q.get(e);return typeof n=="boolean"?n?ie.INSTANCE:le.INSTANCE:new r(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:jo(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){let e=Q.get(this.key);return typeof e=="boolean"?e?ie.INSTANCE:le.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}map(e){return e.mapNot(this.key)}negate(){return this.negated||(this.negated=tt.create(this.key,this)),this.negated}};function An(r,e){if(typeof r=="string"){let t=parseFloat(r);isNaN(t)||(r=t)}return typeof r=="string"||typeof r=="number"?e(r):ie.INSTANCE}var pt=class r{constructor(e,t,n){this.key=e;this.value=t;this.negated=n;this.type=12}static create(e,t,n=null){return An(t,i=>new r(e,i,n))}cmp(e){return e.type!==this.type?this.type-e.type:rt(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}map(e){return e.mapGreater(this.key,this.value)}negate(){return this.negated||(this.negated=Vt.create(this.key,this.value,this)),this.negated}},Ft=class r{constructor(e,t,n){this.key=e;this.value=t;this.negated=n;this.type=13}static create(e,t,n=null){return An(t,i=>new r(e,i,n))}cmp(e){return e.type!==this.type?this.type-e.type:rt(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}map(e){return e.mapGreaterEquals(this.key,this.value)}negate(){return this.negated||(this.negated=Kt.create(this.key,this.value,this)),this.negated}},Kt=class r{constructor(e,t,n){this.key=e;this.value=t;this.negated=n;this.type=14}static create(e,t,n=null){return An(t,i=>new r(e,i,n))}cmp(e){return e.type!==this.type?this.type-e.type:rt(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}map(e){return e.mapSmaller(this.key,this.value)}negate(){return this.negated||(this.negated=Ft.create(this.key,this.value,this)),this.negated}},Vt=class r{constructor(e,t,n){this.key=e;this.value=t;this.negated=n;this.type=15}static create(e,t,n=null){return An(t,i=>new r(e,i,n))}cmp(e){return e.type!==this.type?this.type-e.type:rt(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return typeof this.value=="string"?!1:parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}map(e){return e.mapSmallerEquals(this.key,this.value)}negate(){return this.negated||(this.negated=pt.create(this.key,this.value,this)),this.negated}},Wt=class r{constructor(e,t){this.key=e;this.regexp=t;this.type=7;this.negated=null}static create(e,t){return new r(e,t)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.key<e.key)return-1;if(this.key>e.key)return 1;let t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return t<n?-1:t>n?1:0}equals(e){if(e.type===this.type){let t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return this.key===e.key&&t===n}return!1}substituteConstants(){return this}evaluate(e){let t=e.getValue(this.key);return this.regexp?this.regexp.test(t):!1}serialize(){let e=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}map(e){return e.mapRegex(this.key,this.regexp)}negate(){return this.negated||(this.negated=Xr.create(this)),this.negated}},Xr=class r{constructor(e){this._actual=e;this.type=8}static create(e){return new r(e)}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type?this._actual.equals(e._actual):!1}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}map(e){return new r(this._actual.map(e))}negate(){return this._actual}};function $o(r){let e=null;for(let t=0,n=r.length;t<n;t++){let i=r[t].substituteConstants();if(r[t]!==i&&e===null){e=[];for(let o=0;o<t;o++)e[o]=r[o]}e!==null&&(e[t]=i)}return e===null?r:e}var Rn=class r{constructor(e,t){this.expr=e;this.negated=t;this.type=6}static create(e,t,n){return r._normalizeArr(e,t,n)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let t=0,n=this.expr.length;t<n;t++){let i=Mt(this.expr[t],e.expr[t]);if(i!==0)return i}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let t=0,n=this.expr.length;t<n;t++)if(!this.expr[t].equals(e.expr[t]))return!1;return!0}return!1}substituteConstants(){let e=$o(this.expr);return e===this.expr?this:r.create(e,this.negated,!1)}evaluate(e){for(let t=0,n=this.expr.length;t<n;t++)if(!this.expr[t].evaluate(e))return!1;return!0}static _normalizeArr(e,t,n){let i=[],o=!1;for(let s of e)if(s){if(s.type===1){o=!0;continue}if(s.type===0)return ie.INSTANCE;if(s.type===6){i.push(...s.expr);continue}i.push(s)}if(i.length===0&&o)return le.INSTANCE;if(i.length!==0){if(i.length===1)return i[0];i.sort(Mt);for(let s=1;s<i.length;s++)i[s-1].equals(i[s])&&(i.splice(s,1),s--);if(i.length===1)return i[0];for(;i.length>1;){let s=i[i.length-1];if(s.type!==9)break;i.pop();let a=i.pop(),l=i.length===0,u=qt.create(s.expr.map(d=>r.create([d,a],null,n)),null,l);u&&(i.push(u),i.sort(Mt))}if(i.length===1)return i[0];if(n){for(let s=0;s<i.length;s++)for(let a=s+1;a<i.length;a++)if(i[s].negate().equals(i[a]))return ie.INSTANCE;if(i.length===1)return i[0]}return new r(i,t)}}serialize(){return this.expr.map(e=>e.serialize()).join(" && ")}keys(){let e=[];for(let t of this.expr)e.push(...t.keys());return e}map(e){return new r(this.expr.map(t=>t.map(e)),null)}negate(){if(!this.negated){let e=[];for(let t of this.expr)e.push(t.negate());this.negated=qt.create(e,this,!0)}return this.negated}},qt=class r{constructor(e,t){this.expr=e;this.negated=t;this.type=9}static create(e,t,n){return r._normalizeArr(e,t,n)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let t=0,n=this.expr.length;t<n;t++){let i=Mt(this.expr[t],e.expr[t]);if(i!==0)return i}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let t=0,n=this.expr.length;t<n;t++)if(!this.expr[t].equals(e.expr[t]))return!1;return!0}return!1}substituteConstants(){let e=$o(this.expr);return e===this.expr?this:r.create(e,this.negated,!1)}evaluate(e){for(let t=0,n=this.expr.length;t<n;t++)if(this.expr[t].evaluate(e))return!0;return!1}static _normalizeArr(e,t,n){let i=[],o=!1;if(e){for(let s=0,a=e.length;s<a;s++){let l=e[s];if(l){if(l.type===0){o=!0;continue}if(l.type===1)return le.INSTANCE;if(l.type===9){i=i.concat(l.expr);continue}i.push(l)}}if(i.length===0&&o)return ie.INSTANCE;i.sort(Mt)}if(i.length!==0){if(i.length===1)return i[0];for(let s=1;s<i.length;s++)i[s-1].equals(i[s])&&(i.splice(s,1),s--);if(i.length===1)return i[0];if(n){for(let s=0;s<i.length;s++)for(let a=s+1;a<i.length;a++)if(i[s].negate().equals(i[a]))return le.INSTANCE;if(i.length===1)return i[0]}return new r(i,t)}}serialize(){return this.expr.map(e=>e.serialize()).join(" || ")}keys(){let e=[];for(let t of this.expr)e.push(...t.keys());return e}map(e){return new r(this.expr.map(t=>t.map(e)),null)}negate(){if(!this.negated){let e=[];for(let t of this.expr)e.push(t.negate());for(;e.length>1;){let t=e.shift(),n=e.shift(),i=[];for(let o of zo(t))for(let s of zo(n))i.push(Rn.create([o,s],null,!1));e.unshift(r.create(i,null,!1))}this.negated=r.create(e,this,!0)}return this.negated}},zt=class r extends tt{static{this._info=[]}static all(){return r._info.values()}constructor(e,t,n){super(e,null),this._defaultValue=t,typeof n=="object"?r._info.push({...n,key:e}):n!==!0&&r._info.push({key:e,description:n,type:t!=null?typeof t:void 0})}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return Ut.create(this.key,e)}notEqualsTo(e){return Bt.create(this.key,e)}greater(e){return pt.create(this.key,e)}},rf=Ot("contextKeyService");function jo(r,e){return r<e?-1:r>e?1:0}function rt(r,e,t,n){return r<t?-1:r>t?1:e<n?-1:e>n?1:0}function zo(r){return r.type===9?r.expr:[r]}var $t=class{constructor(e,t=[],n=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=n}};var rl=[];function Ho(r,e,t){e instanceof $t||(e=new $t(e,[],!!t)),rl.push([r,e])}var il=Ot("notebookDocumentService"),Zr=["W","X","Y","Z","a","b","c","d","e","f"],ol=new RegExp(`^[${Zr.join("")}]+`),Go=7;function Nn(r){if(r.scheme!==B.vscodeNotebookCell)return;let e=r.fragment.indexOf("s");if(e<0)return;let t=parseInt(r.fragment.substring(0,e).replace(ol,""),Go),n=Tr(r.fragment.substring(e+1)).toString();if(!isNaN(t))return{handle:t,notebook:r.with({scheme:n,fragment:null})}}function Qo(r,e){let t=e.toString(Go),i=`${t.length<Zr.length?Zr[t.length-1]:"z"}${t}s${vr(Le.fromString(r.scheme),!0,!0)}`;return r.with({scheme:B.vscodeNotebookCell,fragment:i})}function Yo(r){if(r.scheme!==B.vscodeNotebookMetadata)return;let e=Tr(r.fragment).toString();return r.with({scheme:e,fragment:null})}function Xo(r){let e=`${vr(Le.fromString(r.scheme),!0,!0)}`;return r.with({scheme:B.vscodeNotebookMetadata,fragment:e})}function ei(r){if(r.scheme!==B.vscodeNotebookCellOutput)return;let e=new URLSearchParams(r.query),t=e.get("openIn");if(!t)return;let n=e.get("outputId")??void 0,i=Nn(r.with({scheme:B.vscodeNotebookCell,query:null})),o=e.get("outputIndex")?parseInt(e.get("outputIndex")||"",10):void 0,s=i?i.notebook:r.with({scheme:e.get("notebookScheme")||B.file,fragment:null,query:null}),a=e.get("cellIndex")?parseInt(e.get("cellIndex")||"",10):void 0;return{notebook:s,openIn:t,outputId:n,outputIndex:o,cellHandle:i?.handle,cellFragment:r.fragment,cellIndex:a}}var Jr=class{constructor(){this._documents=new He}getNotebook(e){if(e.scheme===B.vscodeNotebookCell){let t=Nn(e);if(t){let n=this._documents.get(t.notebook);if(n)return n}}if(e.scheme===B.vscodeNotebookCellOutput){let t=ei(e);if(t){let n=this._documents.get(t.notebook);if(n)return n}}return this._documents.get(e)}addNotebookDocument(e){this._documents.set(e.uri,e)}removeNotebookDocument(e){this._documents.delete(e.uri)}};Ho(il,Jr,1);var Cf=["application/json","application/javascript","text/html","image/svg+xml",et.latex,et.markdown,"image/png","image/jpeg",et.text],Lf=[et.latex,et.markdown,"application/json","text/html","image/svg+xml","image/png","image/jpeg",et.text];var sl;(n=>{n.scheme=B.vscodeNotebookMetadata;function e(i){return Xo(i)}n.generate=e;function t(i){return Yo(i)}n.parse=t})(sl||={});var al;(u=>{u.scheme=B.vscodeNotebookCell;function e(d,c){return Qo(d,c)}u.generate=e;function t(d){return Nn(d)}u.parse=t;function n(d,c){return d.with({scheme:B.vscodeNotebookCellOutput,query:new URLSearchParams({openIn:"editor",outputId:c??"",notebookScheme:d.scheme!==B.file?d.scheme:""}).toString()})}u.generateCellOutputUriWithId=n;function i(d,c,f){return d.with({scheme:B.vscodeNotebookCellOutput,fragment:c.fragment,query:new URLSearchParams({openIn:"notebook",outputIndex:String(f)}).toString()})}u.generateCellOutputUriWithIndex=i;function o(d,c,f,p,g){return d.with({scheme:B.vscodeNotebookCellOutput,query:new URLSearchParams({openIn:"notebookOutputEditor",notebook:d.toString(),cellIndex:String(f),outputId:p,outputIndex:String(g)}).toString()})}u.generateOutputEditorUri=o;function s(d){return ei(d)}u.parseCellOutputUri=s;function a(d,c,f){return u.generate(d,c).with({scheme:f})}u.generateCellPropertyUri=a;function l(d,c){if(d.scheme===c)return u.parse(d.with({scheme:u.scheme}))}u.parseCellPropertyUri=l})(al||={});var kf=new zt("notebookEditorCursorAtBoundary","none"),Rf=new zt("notebookEditorCursorAtLineBoundary","none");var Zo=class r{static{this._prefix="notebook/"}static create(e,t){return`${r._prefix}${e}/${t??e}`}static parse(e){if(e.startsWith(r._prefix)){let t=e.substring(r._prefix.length).split("/");if(t.length===2)return{notebookType:t[0],viewType:t[1]}}}},Af=new TextDecoder;var ll="\x1B[A",Nf=ll.split("").map(r=>r.charCodeAt(0));var ul="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function cl(r=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(let t of ul)r.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}var dl=cl();function ti(r){let e=dl;if(r&&r instanceof RegExp)if(r.global)e=r;else{let t="g";r.ignoreCase&&(t+="i"),r.multiline&&(t+="m"),r.unicode&&(t+="u"),e=new RegExp(r.source,t)}return e.lastIndex=0,e}var Jo=new gt;Jo.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function ni(r,e,t,n,i){if(e=ti(e),i||(i=st.first(Jo)),t.length>i.maxLen){let u=r-i.maxLen/2;return u<0?u=0:n+=u,t=t.substring(u,r+i.maxLen/2),ni(r,e,t,n,i)}let o=Date.now(),s=r-1-n,a=-1,l=null;for(let u=1;!(Date.now()-o>=i.timeBudget);u++){let d=s-i.windowSize*u;e.lastIndex=Math.max(0,d);let c=fl(e,t,s,a);if(!c&&l||(l=c,d<=0))break;a=d}if(l){let u={word:l[0],startColumn:n+1+l.index,endColumn:n+1+l.index+l[0].length};return e.lastIndex=0,u}return null}function fl(r,e,t,n){let i;for(;i=r.exec(e);){let o=i.index||0;if(o<=t&&r.lastIndex>=t)return i;if(n>0&&o>n)return null}return null}var Pn=class{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}getCount(){return this.values.length}insertValues(e,t){e=Ye(e);let n=this.values,i=this.prefixSum,o=t.length;return o===0?!1:(this.values=new Uint32Array(n.length+o),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+o),this.values.set(t,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=Ye(e),t=Ye(t),this.values[e]===t?!1:(this.values[e]=t,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)}removeValues(e,t){e=Ye(e),t=Ye(t);let n=this.values,i=this.prefixSum;if(e>=n.length)return!1;let o=n.length-e;return t>=o&&(t=o),t===0?!1:(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=Ye(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;t===0&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,n=this.values.length-1,i=0,o=0,s=0;for(;t<=n;)if(i=t+(n-t)/2|0,o=this.prefixSum[i],s=o-this.values[i],e<s)n=i-1;else if(e>=o)t=i+1;else break;return new ri(i,e-s)}};var ri=class{constructor(e,t){this.index=e;this.remainder=t;this._prefixSumIndexOfResultBrand=void 0;this.index=e,this.remainder=t}};var Dn=class{constructor(e,t,n,i){this._uri=e,this._lines=t,this._eol=n,this._versionId=i,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);let t=e.changes;for(let n of t)this._acceptDeleteRange(n.range),this._acceptInsertText(new ae(n.range.startLineNumber,n.range.startColumn),n.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){let e=this._eol.length,t=this._lines.length,n=new Uint32Array(t);for(let i=0;i<t;i++)n[i]=this._lines[i].length+e;this._lineStarts=new Pn(n)}}_setLineText(e,t){this._lines[e]=t,this._lineStarts&&this._lineStarts.setValue(e,this._lines[e].length+this._eol.length)}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.startLineNumber-1].substring(e.endColumn-1));return}this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.endLineNumber-1].substring(e.endColumn-1)),this._lines.splice(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,t){if(t.length===0)return;let n=to(t);if(n.length===1){this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+n[0]+this._lines[e.lineNumber-1].substring(e.column-1));return}n[n.length-1]+=this._lines[e.lineNumber-1].substring(e.column-1),this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+n[0]);let i=new Uint32Array(n.length-1);for(let o=1;o<n.length;o++)this._lines.splice(e.lineNumber+o-1,0,n[o]),i[o-1]=n[o].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(e.lineNumber,i)}};var op=60*1e3;var On=class extends Dn{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){let t=[];for(let n=0;n<this._lines.length;n++){let i=this._lines[n],o=this.offsetAt(new ae(n+1,1)),s=i.matchAll(e);for(let a of s)(a.index||a.index===0)&&(a.index=a.index+o),t.push(a)}return t}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(e){return this._lines[e-1]}getWordAtPosition(e,t){let n=ni(e.column,ti(t),this._lines[e.lineNumber-1],0);return n?new $(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn):null}getWordUntilPosition(e,t){let n=this.getWordAtPosition(e,t);return n?{word:this._lines[e.lineNumber-1].substring(n.startColumn-1,e.column-1),startColumn:n.startColumn,endColumn:e.column}:{word:"",startColumn:e.column,endColumn:e.column}}words(e){let t=this._lines,n=this._wordenize.bind(this),i=0,o="",s=0,a=[];return{*[Symbol.iterator](){for(;;)if(s<a.length){let l=o.substring(a[s].start,a[s].end);s+=1,yield l}else if(i<t.length)o=t[i],a=n(o,e),s=0,i+=1;else break}}}getLineWords(e,t){let n=this._lines[e-1],i=this._wordenize(n,t),o=[];for(let s of i)o.push({word:n.substring(s.start,s.end),startColumn:s.start+1,endColumn:s.end+1});return o}_wordenize(e,t){let n=[],i;for(t.lastIndex=0;(i=t.exec(e))&&i[0].length!==0;)n.push({start:i.index,end:i.index+i[0].length});return n}getValueInRange(e){if(e=this._validateRange(e),e.startLineNumber===e.endLineNumber)return this._lines[e.startLineNumber-1].substring(e.startColumn-1,e.endColumn-1);let t=this._eol,n=e.startLineNumber-1,i=e.endLineNumber-1,o=[];o.push(this._lines[n].substring(e.startColumn-1));for(let s=n+1;s<i;s++)o.push(this._lines[s]);return o.push(this._lines[i].substring(0,e.endColumn-1)),o.join(t)}offsetAt(e){return e=this._validatePosition(e),this._ensureLineStarts(),this._lineStarts.getPrefixSum(e.lineNumber-2)+(e.column-1)}positionAt(e){e=Math.floor(e),e=Math.max(0,e),this._ensureLineStarts();let t=this._lineStarts.getIndexOf(e),n=this._lines[t.index].length;return{lineNumber:1+t.index,column:1+Math.min(t.remainder,n)}}_validateRange(e){let t=this._validatePosition({lineNumber:e.startLineNumber,column:e.startColumn}),n=this._validatePosition({lineNumber:e.endLineNumber,column:e.endColumn});return t.lineNumber!==e.startLineNumber||t.column!==e.startColumn||n.lineNumber!==e.endLineNumber||n.column!==e.endColumn?{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:n.lineNumber,endColumn:n.column}:e}_validatePosition(e){if(!ae.isIPosition(e))throw new Error("bad position");let{lineNumber:t,column:n}=e,i=!1;if(t<1)t=1,n=1,i=!0;else if(t>this._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,i=!0;else{let o=this._lines[t-1].length+1;n<1?(n=1,i=!0):n>o&&(n=o,i=!0)}return i?{lineNumber:t,column:n}:e}};function ts(r,e){let t={modifiedToOriginal:new Map,originalToModified:new Map},n=[],i=new Map,o=new Set,s=new Map,a=(u,d)=>{if(i.has(u))return!1;let c=s.get(u)?.dist??Number.MAX_SAFE_INTEGER;return d.editCount<c},l=(u,d)=>{i.set(d,u),o.add(u)};for(let u=0;u<r.length;u++){let d=r[u],{index:c,editCount:f,percentage:p}=es({cell:d,index:u},e,!0,t,a);c>=0&&f===0?(l(u,c),n.push({modified:u,original:c,dist:f,percentage:p,possibleOriginal:c})):(s.set(c,{dist:f,modifiedIndex:u}),n.push({modified:u,original:-1,dist:f,percentage:p,possibleOriginal:c}))}return n.forEach((u,d)=>{if(u.original>=0)return;let c=d>0?n.slice(0,d).reverse().find(y=>y.original>=0):void 0,f=c?.original??-1,p=c?.modified??-1,g=n.slice(d+1).find(y=>y.original>=0),T=new Set,b=n.findIndex((y,_)=>_>d&&y.original>=0),h=b>=0?n[b].original:-1;e.forEach((y,_)=>{if(i.has(_)){T.add(_);return}g&&_>=g.original&&T.add(_),h>=0&&_>h&&T.add(_)});let x=r[d];if(u.original===-1&&u.possibleOriginal>=0&&!T.has(u.possibleOriginal)&&a(u.possibleOriginal,{editCount:u.dist})){l(d,u.possibleOriginal),u.original=u.possibleOriginal;return}if(f>0&&p>0&&f===p&&(b>=0?b:r.length-1)===(h>=0?h:e.length-1)&&!T.has(d)&&d<e.length){let y=(b>=0?b:r.length)-p,_=(h>=0?h:e.length)-f;if(y===_&&x.cellKind===e[d].cellKind){l(d,d),u.original=d;return}}let{index:m,percentage:L}=es({cell:x,index:d},e,!1,t,(y,_)=>{if(T.has(y))return!1;if(b>0||f>0){let k=t.originalToModified.get(y);if(k&&f<y&&Array.from(k).find(([U,P])=>U===d||U>=b||o.has(d)?!1:P.editCount<_.editCount))return!1}return!T.has(y)});if(m>=0&&d>0&&n[d-1].original===m-1){l(d,m),n[d].original=m;return}let R=d>0&&e.length>n[d-1].original?n[d-1].original+1:-1,z=d>0&&R>=0&&R<e.length?e[R].getValue():void 0;if(m>=0&&d>0&&typeof z=="string"&&!i.has(R)&&(x.getValue().includes(z)||z.includes(x.getValue()))){l(d,R),n[d].original=R;return}if(L<90||d===0&&n.length===1){l(d,m),n[d].original=m;return}}),n}function es({cell:r,index:e},t,n,i,o){let s=1/0,a=-1,l=r.internalMetadata?.internalId;if(l){let d=t.findIndex(c=>c.internalMetadata?.internalId===l);if(d>=0)return{index:d,editCount:0,percentage:Number.MAX_SAFE_INTEGER}}for(let d=0;d<t.length;d++){if(t[d].cellKind!==r.cellKind)continue;let c=t[d].getValue(),f=i.modifiedToOriginal.get(e)??new Map,p=f.get(d)??{editCount:pl(r,t[d])};f.set(d,p),i.modifiedToOriginal.set(e,f);let g=i.originalToModified.get(d)??new Map;if(g.set(e,p),i.originalToModified.set(d,g),!!o(d,p)&&!(c.length===0&&n)){if(c===r.getValue()&&r.getValue().length>0)return{index:d,editCount:0,percentage:0};p.editCount<s&&(s=p.editCount,a=d)}}if(a===-1)return{index:-1,editCount:Number.MAX_SAFE_INTEGER,percentage:Number.MAX_SAFE_INTEGER};let u=!r.getValue().length&&!t[a].getValue().length?0:r.getValue().length?s*100/r.getValue().length:Number.MAX_SAFE_INTEGER;return{index:a,editCount:s,percentage:u}}function pl(r,e){return r.getValue()===e.getValue()?0:yo(r.getValue(),e.getValue())}var Mn=(function(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let r=new Uint8Array(16),e=[];for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return function(){crypto.getRandomValues(r),r[6]=r[6]&15|64,r[8]=r[8]&63|128;let n=0,i="";return i+=e[r[n++]],i+=e[r[n++]],i+=e[r[n++]],i+=e[r[n++]],i+="-",i+=e[r[n++]],i+=e[r[n++]],i+="-",i+=e[r[n++]],i+=e[r[n++]],i+="-",i+=e[r[n++]],i+=e[r[n++]],i+="-",i+=e[r[n++]],i+=e[r[n++]],i+=e[r[n++]],i+=e[r[n++]],i+=e[r[n++]],i+=e[r[n++]],i}})();function ii(r,e,t){let n=t.cellsDiff.changes,i=[],o=0,s=0,a=-1;for(let l=0;l<n.length;l++){let u=n[l];for(let c=0;c<u.originalStart-o;c++){let f=r.cells[o+c],p=e.cells[s+c];f.getHashValue()===p.getHashValue()?i.push({originalCellIndex:o+c,modifiedCellIndex:s+c,type:"unchanged"}):(a===-1&&(a=i.length),i.push({originalCellIndex:o+c,modifiedCellIndex:s+c,type:"modified"}))}let d=hl(u,r,e);d.length&&a===-1&&(a=i.length),i.push(...d),o=u.originalStart+u.originalLength,s=u.modifiedStart+u.modifiedLength}for(let l=o;l<r.cells.length;l++)i.push({originalCellIndex:l,modifiedCellIndex:l-o+s,type:"unchanged"});return{cellDiffInfo:i,firstChangeIndex:a}}function hl(r,e,t){let n=[],i=Math.min(r.originalLength,r.modifiedLength);for(let o=0;o<i;o++){let s=e.cells[r.originalStart+o],a=t.cells[r.modifiedStart+o];if(s.cellKind!==a.cellKind)n.push({originalCellIndex:r.originalStart+o,type:"delete"}),n.push({modifiedCellIndex:r.modifiedStart+o,type:"insert"});else{let l=s.equal(a);n.push({originalCellIndex:r.originalStart+o,modifiedCellIndex:r.modifiedStart+o,type:l?"unchanged":"modified"})}}for(let o=i;o<r.originalLength;o++)n.push({originalCellIndex:r.originalStart+o,type:"delete"});for(let o=i;o<r.modifiedLength;o++)n.push({modifiedCellIndex:r.modifiedStart+o,type:"insert"});return n}var ns="unmatchedOriginalCell",Un=class{constructor(e,t,n,i,o,s,a,l,u,d){this.handle=e;this._eol=i;this.language=s;this.cellKind=a;this.outputs=l;this.metadata=u;this.internalMetadata=d;this.textModel=new On(t,n,i,o)}get eol(){return this._eol===`\r
`?2:1}onEvents(e){this.textModel.onEvents(e),this._hash=void 0}getValue(){return this.textModel.getValue()}getLinesContent(){return this.textModel.getLinesContent()}getComparisonValue(){return this._hash??=this._getHash()}_getHash(){let e=pe(104579,0);e=be(this.language,e),e=be(this.getValue(),e),e=be(this.metadata,e),e=be(this.internalMetadata?.internalId||"",e);for(let n of this.outputs){e=be(n.metadata,e);for(let i of n.outputs)e=be(i.mime,e)}let t=this.outputs.flatMap(n=>n.outputs.map(i=>_o(Array.from(i.data.buffer))));for(let n of t)e=pe(n,e);return e}},oi=class{constructor(e,t,n,i){this.uri=e;this.cells=t;this.metadata=n;this.transientDocumentMetadata=i}acceptModelChanged(e){e.rawEvents.forEach(t=>{if(t.kind===1)this._spliceNotebookCells(t.changes);else if(t.kind===2){let n=this.cells.splice(t.index,1);this.cells.splice(t.newIdx,0,...n)}else if(t.kind===8){let n=this.cells[t.index];n.outputs=t.outputs}else if(t.kind===5){this._assertIndex(t.index);let n=this.cells[t.index];n.language=t.language}else if(t.kind===7){this._assertIndex(t.index);let n=this.cells[t.index];n.metadata=t.metadata}else if(t.kind===12){this._assertIndex(t.index);let n=this.cells[t.index];n.internalMetadata=t.internalMetadata}else t.kind===11&&(this.metadata=t.metadata)})}_assertIndex(e){if(e<0||e>=this.cells.length)throw new Error(`Illegal index ${e}. Cells length: ${this.cells.length}`)}_spliceNotebookCells(e){e.reverse().forEach(t=>{let i=t[2].map(o=>new Un(o.handle,G.parse(o.url),o.source,o.eol,o.versionId,o.language,o.cellKind,o.outputs,o.metadata));this.cells.splice(t[0],t[1],...i)})}},ht=class r{constructor(e){this.hashValue=e}static create(e){let t=e.cells.map(n=>n.getComparisonValue());return new r(t)}static createWithCellId(e,t){let n=e.map(i=>t?`${be(i.internalMetadata?.internalId,pe(104579,0))}#${i.getComparisonValue()}`:`${be(i.internalMetadata?.internalId,pe(104579,0))}}`);return new r(n)}getElements(){return this.hashValue}},si=class{constructor(){this._requestHandlerBrand=void 0;this._models=Object.create(null)}dispose(){}$acceptNewModel(e,t,n,i){this._models[e]=new oi(G.parse(e),i.map(o=>new Un(o.handle,G.parse(o.url),o.source,o.eol,o.versionId,o.language,o.cellKind,o.outputs,o.metadata,o.internalMetadata)),t,n)}$acceptModelChanged(e,t){this._models[e]?.acceptModelChanged(t)}$acceptCellModelChanged(e,t,n){this._models[e].cells.find(o=>o.handle===t)?.onEvents(n)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}async $computeDiff(e,t){let n=this._getModel(e),i=this._getModel(t),o=new Bn(n),s=new Bn(i),a=Lr(n.metadata,h=>!n.transientDocumentMetadata[h]),l=Lr(i.metadata,h=>!i.transientDocumentMetadata[h]),u=JSON.stringify(a)!==JSON.stringify(l),d=new Ct(ht.create(n),ht.create(i)).ComputeDiff(!1);if(d.changes.length===0)return{metadataChanged:u,cellsDiff:d};if(ii(o,s,{cellsDiff:{changes:d.changes,quitEarly:!1},metadataChanged:!1}).cellDiffInfo.every(h=>h.type==="modified"||h.type==="unchanged"))return{metadataChanged:u,cellsDiff:d};let f=this.canComputeDiffWithCellIds(n,i);if(!f){let h=ts(i.cells,n.cells);h.some(x=>x.original!==-1)&&(this.updateCellIdsBasedOnMappings(h,n.cells,i.cells),f=!0)}if(!f)return{metadataChanged:u,cellsDiff:d};let p=new Ct(ht.createWithCellId(n.cells),ht.createWithCellId(i.cells)).ComputeDiff(!1),g=ii(o,s,{cellsDiff:{changes:p.changes,quitEarly:!1},metadataChanged:!1}).cellDiffInfo,T=0,b=[];return p.changes.forEach(h=>{if(!h.originalLength&&h.modifiedLength){let x=g.findIndex(m=>m.type==="insert"&&m.modifiedCellIndex===h.modifiedStart);g.slice(T,x).forEach(m=>{if(m.type==="unchanged"||m.type==="modified"){let L=n.cells[m.originalCellIndex],R=i.cells[m.modifiedCellIndex];(m.type==="modified"||L.getComparisonValue()!==R.getComparisonValue())&&b.push(new se(m.originalCellIndex,1,m.modifiedCellIndex,1))}}),b.push(h),T=x+1}else if(h.originalLength&&!h.modifiedLength){let x=g.findIndex(m=>m.type==="delete"&&m.originalCellIndex===h.originalStart);g.slice(T,x).forEach(m=>{if(m.type==="unchanged"||m.type==="modified"){let L=n.cells[m.originalCellIndex],R=i.cells[m.modifiedCellIndex];(m.type==="modified"||L.getComparisonValue()!==R.getComparisonValue())&&b.push(new se(m.originalCellIndex,1,m.modifiedCellIndex,1))}}),b.push(h),T=x+1}else{let x=g.findIndex(m=>m.type==="delete"&&m.originalCellIndex===h.originalStart||m.type==="insert"&&m.modifiedCellIndex===h.modifiedStart);g.slice(T,x).forEach(m=>{if(m.type==="unchanged"||m.type==="modified"){let L=n.cells[m.originalCellIndex],R=i.cells[m.modifiedCellIndex];(m.type==="modified"||L.getComparisonValue()!==R.getComparisonValue())&&b.push(new se(m.originalCellIndex,1,m.modifiedCellIndex,1))}}),b.push(h),T=x+1}}),g.slice(T).forEach(h=>{if(h.type==="unchanged"||h.type==="modified"){let x=n.cells[h.originalCellIndex],m=i.cells[h.modifiedCellIndex];(h.type==="modified"||x.getComparisonValue()!==m.getComparisonValue())&&b.push(new se(h.originalCellIndex,1,h.modifiedCellIndex,1))}}),{metadataChanged:u,cellsDiff:{changes:b,quitEarly:!1}}}canComputeDiffWithCellIds(e,t){return this.canComputeDiffWithCellInternalIds(e,t)||this.canComputeDiffWithCellMetadataIds(e,t)}canComputeDiffWithCellInternalIds(e,t){let n=e.cells.map((o,s)=>({index:s,id:o.internalMetadata?.internalId||""})),i=t.cells.map((o,s)=>({index:s,id:o.internalMetadata?.internalId||""}));return n.some(o=>!o.id)||i.some(o=>!o.id)?!1:n.some(o=>i.find(s=>s.id===o.id))}canComputeDiffWithCellMetadataIds(e,t){let n=e.cells.map((o,s)=>({index:s,id:o.metadata?.id||""})),i=t.cells.map((o,s)=>({index:s,id:o.metadata?.id||""}));return n.some(o=>!o.id)||i.some(o=>!o.id)||n.every(o=>!i.find(s=>s.id===o.id))?!1:(e.cells.map((o,s)=>{o.internalMetadata=o.internalMetadata||{},o.internalMetadata.internalId=o.metadata?.id||""}),t.cells.map((o,s)=>{o.internalMetadata=o.internalMetadata||{},o.internalMetadata.internalId=o.metadata?.id||""}),!0)}isOriginalCellMatchedWithModifiedCell(e){return(e.internalMetadata?.internalId||"").startsWith(ns)}updateCellIdsBasedOnMappings(e,t,n){let i=new Map;return t.map((o,s)=>{o.internalMetadata=o.internalMetadata||{internalId:""},o.internalMetadata.internalId=`${ns}${Mn()}`;let a=e.find(l=>l.original===s);a&&(o.internalMetadata.internalId=Mn(),i.set(a.modified,o.internalMetadata.internalId))}),n.map((o,s)=>{o.internalMetadata=o.internalMetadata||{internalId:""},o.internalMetadata.internalId=i.get(s)??Mn()}),!0}$canPromptRecommendation(e){let n=this._getModel(e).cells;for(let i=0;i<n.length;i++){let o=n[i];if(o.cellKind===1||o.language!=="python")continue;let a=new xn("import\\s*pandas|from\\s*pandas",!0,!1,null).parseSearchRequest();if(!a)continue;let l=new wn;l.acceptChunk(o.getValue());let d=l.finish(!0).create(o.eol).textBuffer,c=d.getLineCount(),f=Math.min(c,20),p=new $(1,1,f,d.getLineLength(f)+1);if(d.findMatchesLineByLine(p,a,!0,1).length>0)return!0}return!1}_getModel(e){return this._models[e]}};function rs(){return new si}var Bn=class{constructor(e){this.notebook=e;this.cells=e.cells.map(t=>new ai(t))}},ai=class{constructor(e){this.cell=e}get cellKind(){return this.cell.cellKind}getHashValue(){return this.cell.getComparisonValue()}equal(e){return e.cellKind!==this.cellKind?!1:this.getHashValue()===e.getHashValue()}};fo(rs);
