From 25cc1596a68df2c2f154a22c965b1e897d655ad3 Mon Sep 17 00:00:00 2001 From: heapwolf Date: Thu, 25 Apr 2024 15:00:02 +0200 Subject: [PATCH] refactor(build): remove esbuild as much as possible --- build.js | 38 +- importmap.json | 8 +- package.json | 12 +- socket.ini | 2 +- src/components/confirm.js | 2 +- src/components/editor.js | 4 +- src/components/git-status.js | 3 +- src/components/patch-requests.js | 3 +- src/components/project.js | 2 +- src/components/properties.js | 3 +- src/components/publish.js | 4 +- src/components/relative-date.js | 2 +- src/components/sprite.js | 2 +- src/components/subscribe.js | 4 +- src/components/terminal.js | 8 +- src/lib/vs/editor/editor.worker.js | 12449 +- src/lib/vs/language/css/css.worker.js | 49667 +--- src/lib/vs/language/html/html.worker.js | 28938 +-- src/lib/vs/language/json/json.worker.js | 19902 +- src/lib/vs/language/typescript/ts.worker.js | 211855 ++--------------- src/vendor.js | 6 + 21 files changed, 14726 insertions(+), 308188 deletions(-) create mode 100644 src/vendor.js diff --git a/build.js b/build.js index 71a96eb..ff575e8 100644 --- a/build.js +++ b/build.js @@ -1,30 +1,10 @@ #!/usr/bin/env node -import path from 'node:path' -import fs from 'node:fs/promises' - +// +// Most newer modules don't need to be bundled. But the monaco +// and xterm packages rely on bundler-features heavily. +// import esbuild from 'esbuild' -const __dirname = path.dirname(new URL(import.meta.url).pathname) - -const cp = async (a, b) => fs.cp( - path.resolve(a), - path.join(b, path.basename(a)), - { recursive: true, force: true } -) - -async function copy (target) { - await cp('src/index.html', target) - await cp('src/vm.js', target) - await cp('src/preview.js', target) - await cp('src/worker.js', target) - await cp('icons/icon.png', target) - await cp('src/settings.json', target) - await cp('src/fonts', target) - await cp('src/lib', target) - await cp('src/pages', target) - await cp('src/css', target) -} - async function main (argv) { const workerEntryPoints = [ 'vs/language/json/json.worker.js', @@ -37,25 +17,25 @@ async function main (argv) { await esbuild.build({ entryPoints: workerEntryPoints.map((entry) => `node_modules/monaco-editor/esm/${entry}`), bundle: true, - minify: false, + minify: true, format: 'iife', outbase: 'node_modules/monaco-editor/esm/', outdir: 'src/lib' }) const params = { - entryPoints: ['src/index.js'], + entryPoints: ['src/vendor.js'], format: 'esm', bundle: true, - minify: false, + minify: true, sourcemap: false, - external: ['socket:*', 'node:*'], loader: { '.ttf': 'file' } } const target = process.env.PREFIX + if (!target) { console.log('This script should not be run directly. It will be run by the SSC command.') process.exit(0) @@ -65,8 +45,8 @@ async function main (argv) { ...params, outdir: target } + await esbuild.build(opts) - await copy(target) } main(process.argv.slice(2)) diff --git a/importmap.json b/importmap.json index 2019ac7..8086764 100644 --- a/importmap.json +++ b/importmap.json @@ -2,11 +2,7 @@ "imports": { "@socketsupply/tonic": "npm:@socketsupply/tonic", "@socketsupply/components": "npm:@socketsupply/components", - "@socketsupply/components/*": "npm:@socketsupply/components/*", - "@socketsupply/indexed": "npm:@socketsupply/indexed", - "monaco-editor": "npm:monaco-editor", - "xterm": "npm:xterm", - "xterm-addon-fit": "npm:xterm-addon-fit", - "xterm-addon-search": "npm:xterm-addon-search" + "@socketsupply/components/dialog": "npm:@socketsupply/components/dialog", + "@socketsupply/indexed": "npm:@socketsupply/indexed" } } diff --git a/package.json b/package.json index 999dade..f308a76 100644 --- a/package.json +++ b/package.json @@ -9,15 +9,12 @@ "type": "git" }, "devDependencies": { - "@socketsupply/components": "^14.0.13", - "@socketsupply/indexed": "^1.0.3", - "@socketsupply/tonic": "^15.1.2", - "esbuild": "^0.20.0", "monaco-editor": "^0.46.0", - "standard": "^17.1.0", "xterm": "^5.3.0", "xterm-addon-fit": "^0.8.0", - "xterm-addon-search": "^0.13.0" + "xterm-addon-search": "^0.13.0", + "esbuild": "^0.20.0", + "standard": "^17.1.0" }, "scripts": { "build": "ssc build -r -o", @@ -27,6 +24,9 @@ "author": "Socket Supply Co. ", "license": "MIT", "dependencies": { + "@socketsupply/indexed": "^1.0.3", + "@socketsupply/tonic": "^15.1.2", + "@socketsupply/components": "^14.1.0", "@socketsupply/socket": "^0.5.4" } } diff --git a/socket.ini b/socket.ini index 6dd15b7..9f6d07d 100644 --- a/socket.ini +++ b/socket.ini @@ -46,7 +46,7 @@ name = "union" output = "build" ; The build script. It runs before the `[build] copy` phase. -; script = "node build.js" +script = "node build.js" ; Key value pairs added to the envrionment. [env] diff --git a/src/components/confirm.js b/src/components/confirm.js index 7589a2c..0f29a77 100644 --- a/src/components/confirm.js +++ b/src/components/confirm.js @@ -1,4 +1,4 @@ -import { TonicDialog } from 'npm:@socketsupply/components/dialog' +import { TonicDialog } from '@socketsupply/components/dialog' class DialogConfirm extends TonicDialog { async prompt (opts) { diff --git a/src/components/editor.js b/src/components/editor.js index d293c65..dc5db52 100644 --- a/src/components/editor.js +++ b/src/components/editor.js @@ -2,8 +2,8 @@ import fs from 'socket:fs' import path from 'socket:path' import { sha256 } from 'socket:network' -import * as monaco from 'npm:monaco-editor' -import Tonic from 'npm:@socketsupply/tonic' +import Tonic from '@socketsupply/tonic' +import { monaco } from '../vendor.js' function rgbaToHex (rgbaString) { const rgbaValues = rgbaString.match(/\d+/g) diff --git a/src/components/git-status.js b/src/components/git-status.js index 204a024..faca8b0 100644 --- a/src/components/git-status.js +++ b/src/components/git-status.js @@ -1,6 +1,7 @@ -import Tonic from 'npm:@socketsupply/tonic' import { exec } from 'socket:child_process' +import Tonic from '@socketsupply/tonic' + class GitStatus extends Tonic { async * render () { yield this.html` diff --git a/src/components/patch-requests.js b/src/components/patch-requests.js index ce54d97..e121226 100644 --- a/src/components/patch-requests.js +++ b/src/components/patch-requests.js @@ -1,8 +1,9 @@ -import Tonic from 'npm:@socketsupply/tonic' import path from 'socket:path' import fs from 'socket:fs' import { exec } from 'socket:child_process' +import Tonic from '@socketsupply/tonic' + class PatchRequests extends Tonic { async click (e) { const el = Tonic.match(e.target, '[data-event]') diff --git a/src/components/project.js b/src/components/project.js index 2d84187..98c0e58 100644 --- a/src/components/project.js +++ b/src/components/project.js @@ -4,7 +4,7 @@ import path from 'socket:path' import { lookup } from 'socket:mime' import { cp, rm } from '../lib/fs.js' -import Tonic from 'npm:@socketsupply/tonic' +import Tonic from '@socketsupply/tonic' const EXPANDED_STATE = 1 const CLOSED_STATE = 0 diff --git a/src/components/properties.js b/src/components/properties.js index 79dd41a..13e9261 100644 --- a/src/components/properties.js +++ b/src/components/properties.js @@ -1,6 +1,7 @@ -import Tonic from 'npm:@socketsupply/tonic' import process from 'socket:process' +import Tonic from '@socketsupply/tonic' + import Config from '../lib/config.js' class AppProperties extends Tonic { diff --git a/src/components/publish.js b/src/components/publish.js index 07c8838..a47e3d9 100644 --- a/src/components/publish.js +++ b/src/components/publish.js @@ -2,8 +2,8 @@ import fs from 'socket:fs' import path from 'socket:path' import { exec, execSync } from 'socket:child_process' -import Tonic from 'npm:@socketsupply/tonic' -import { TonicDialog } from 'npm:@socketsupply/components/dialog' +import Tonic from '@socketsupply/tonic' +import { TonicDialog } from '@socketsupply/components/dialog' export class DialogPublish extends TonicDialog { click (e) { diff --git a/src/components/relative-date.js b/src/components/relative-date.js index e3aa289..9837df1 100644 --- a/src/components/relative-date.js +++ b/src/components/relative-date.js @@ -1,4 +1,4 @@ -import Tonic from 'npm:@socketsupply/tonic' +import Tonic from '@socketsupply/tonic' const T_YEARS = 1000 * 60 * 60 * 24 * 365 const T_MONTHS = 1000 * 60 * 60 * 24 * 30 diff --git a/src/components/sprite.js b/src/components/sprite.js index 982daa8..cb0554f 100644 --- a/src/components/sprite.js +++ b/src/components/sprite.js @@ -1,4 +1,4 @@ -import Tonic from 'npm:@socketsupply/tonic' +import Tonic from '@socketsupply/tonic' class AppSprite extends Tonic { render () { diff --git a/src/components/subscribe.js b/src/components/subscribe.js index b3130e9..a5c4b56 100644 --- a/src/components/subscribe.js +++ b/src/components/subscribe.js @@ -2,8 +2,8 @@ import fs from 'socket:fs' import path from 'socket:path' import { Encryption, sha256 } from 'socket:network' -import Tonic from 'npm:@socketsupply/tonic' -import { TonicDialog } from 'npm:@socketsupply/components/dialog' +import Tonic from '@socketsupply/tonic' +import { TonicDialog } from '@socketsupply/components/dialog' export class DialogSubscribe extends TonicDialog { async show () { diff --git a/src/components/terminal.js b/src/components/terminal.js index 67d7070..b74993e 100644 --- a/src/components/terminal.js +++ b/src/components/terminal.js @@ -1,7 +1,7 @@ -import Tonic from 'npm:@socketsupply/tonic' -import { Terminal } from 'npm:xterm' -import { FitAddon as Resizer } from 'npm:xterm-addon-fit' -import { SearchAddon as Search } from 'npm:xterm-addon-search' +import Tonic from '@socketsupply/tonic' +import { Terminal } from '../vendor.js' +import { Resizer } from '../vendor.js' +import { Search } from '../vendor.js' // const SECOND = 1000 // const MAX_ROWS = 30 * SECOND diff --git a/src/lib/vs/editor/editor.worker.js b/src/lib/vs/editor/editor.worker.js index e72ceed..a29b259 100644 --- a/src/lib/vs/editor/editor.worker.js +++ b/src/lib/vs/editor/editor.worker.js @@ -1,12442 +1,11 @@ -(() => { - // node_modules/monaco-editor/esm/vs/base/common/errors.js - var ErrorHandler = class { - constructor() { - this.listeners = []; - this.unexpectedErrorHandler = function(e) { - setTimeout(() => { - if (e.stack) { - if (ErrorNoTelemetry.isErrorNoTelemetry(e)) { - throw new ErrorNoTelemetry(e.message + "\n\n" + e.stack); - } - throw new Error(e.message + "\n\n" + e.stack); - } - throw e; - }, 0); - }; - } - emit(e) { - this.listeners.forEach((listener) => { - listener(e); - }); - } - onUnexpectedError(e) { - this.unexpectedErrorHandler(e); - this.emit(e); - } - // For external errors, we don't want the listeners to be called - onUnexpectedExternalError(e) { - this.unexpectedErrorHandler(e); - } - }; - var errorHandler = new ErrorHandler(); - function onUnexpectedError(e) { - if (!isCancellationError(e)) { - errorHandler.onUnexpectedError(e); - } - return void 0; - } - function transformErrorForSerialization(error) { - if (error instanceof Error) { - const { name, message } = error; - const stack = error.stacktrace || error.stack; - return { - $isError: true, - name, - message, - stack, - noTelemetry: ErrorNoTelemetry.isErrorNoTelemetry(error) - }; - } - return error; - } - var canceledName = "Canceled"; - function isCancellationError(error) { - if (error instanceof CancellationError) { - return true; - } - return error instanceof Error && error.name === canceledName && error.message === canceledName; - } - var CancellationError = class extends Error { - constructor() { - super(canceledName); - this.name = this.message; - } - }; - var ErrorNoTelemetry = class _ErrorNoTelemetry extends Error { - constructor(msg) { - super(msg); - this.name = "CodeExpectedError"; - } - static fromError(err) { - if (err instanceof _ErrorNoTelemetry) { - return err; - } - const result = new _ErrorNoTelemetry(); - result.message = err.message; - result.stack = err.stack; - return result; - } - static isErrorNoTelemetry(err) { - return err.name === "CodeExpectedError"; - } - }; - var BugIndicatingError = class _BugIndicatingError extends Error { - constructor(message) { - super(message || "An unexpected bug occurred."); - Object.setPrototypeOf(this, _BugIndicatingError.prototype); - } - }; +(()=>{var pn=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?ot.isErrorNoTelemetry(t)?new ot(t.message+` - // node_modules/monaco-editor/esm/vs/base/common/functional.js - function createSingleCallFunction(fn, fnDidRunCallback) { - const _this = this; - let didCall = false; - let result; - return function() { - if (didCall) { - return result; - } - didCall = true; - if (fnDidRunCallback) { - try { - result = fn.apply(_this, arguments); - } finally { - fnDidRunCallback(); - } - } else { - result = fn.apply(_this, arguments); - } - return result; - }; - } +`+t.stack):new Error(t.message+` - // node_modules/monaco-editor/esm/vs/base/common/iterator.js - var Iterable; - (function(Iterable2) { - function is(thing) { - return thing && typeof thing === "object" && typeof thing[Symbol.iterator] === "function"; - } - Iterable2.is = is; - const _empty2 = Object.freeze([]); - function empty() { - return _empty2; - } - Iterable2.empty = empty; - function* single(element) { - yield element; - } - Iterable2.single = single; - function wrap(iterableOrElement) { - if (is(iterableOrElement)) { - return iterableOrElement; - } else { - return single(iterableOrElement); - } - } - Iterable2.wrap = wrap; - function from(iterable) { - return iterable || _empty2; - } - Iterable2.from = from; - function* reverse(array) { - for (let i = array.length - 1; i >= 0; i--) { - yield array[i]; - } - } - Iterable2.reverse = reverse; - function isEmpty(iterable) { - return !iterable || iterable[Symbol.iterator]().next().done === true; - } - Iterable2.isEmpty = isEmpty; - function first(iterable) { - return iterable[Symbol.iterator]().next().value; - } - Iterable2.first = first; - function some(iterable, predicate) { - for (const element of iterable) { - if (predicate(element)) { - return true; - } - } - return false; - } - Iterable2.some = some; - function find(iterable, predicate) { - for (const element of iterable) { - if (predicate(element)) { - return element; - } - } - return void 0; - } - Iterable2.find = find; - function* filter(iterable, predicate) { - for (const element of iterable) { - if (predicate(element)) { - yield element; - } - } - } - Iterable2.filter = filter; - function* map(iterable, fn) { - let index = 0; - for (const element of iterable) { - yield fn(element, index++); - } - } - Iterable2.map = map; - function* concat(...iterables) { - for (const iterable of iterables) { - yield* iterable; - } - } - Iterable2.concat = concat; - function reduce(iterable, reducer, initialValue) { - let value = initialValue; - for (const element of iterable) { - value = reducer(value, element); - } - return value; - } - Iterable2.reduce = reduce; - function* slice(arr, from2, to = arr.length) { - if (from2 < 0) { - from2 += arr.length; - } - if (to < 0) { - to += arr.length; - } else if (to > arr.length) { - to = arr.length; - } - for (; from2 < to; from2++) { - yield arr[from2]; - } - } - Iterable2.slice = slice; - function consume(iterable, atMost = Number.POSITIVE_INFINITY) { - const consumed = []; - if (atMost === 0) { - return [consumed, iterable]; - } - const iterator = iterable[Symbol.iterator](); - for (let i = 0; i < atMost; i++) { - const next = iterator.next(); - if (next.done) { - return [consumed, Iterable2.empty()]; - } - consumed.push(next.value); - } - return [consumed, { [Symbol.iterator]() { - return iterator; - } }]; - } - Iterable2.consume = consume; - async function asyncToArray(iterable) { - const result = []; - for await (const item of iterable) { - result.push(item); - } - return Promise.resolve(result); - } - Iterable2.asyncToArray = asyncToArray; - })(Iterable || (Iterable = {})); - - // node_modules/monaco-editor/esm/vs/base/common/lifecycle.js - var TRACK_DISPOSABLES = false; - var disposableTracker = null; - function setDisposableTracker(tracker) { - disposableTracker = tracker; - } - if (TRACK_DISPOSABLES) { - const __is_disposable_tracked__ = "__is_disposable_tracked__"; - setDisposableTracker(new class { - trackDisposable(x) { - const stack = new Error("Potentially leaked disposable").stack; - setTimeout(() => { - if (!x[__is_disposable_tracked__]) { - console.log(stack); - } - }, 3e3); - } - setParent(child, parent) { - if (child && child !== Disposable.None) { - try { - child[__is_disposable_tracked__] = true; - } catch (_a4) { - } - } - } - markAsDisposed(disposable) { - if (disposable && disposable !== Disposable.None) { - try { - disposable[__is_disposable_tracked__] = true; - } catch (_a4) { - } - } - } - markAsSingleton(disposable) { - } - }()); - } - function trackDisposable(x) { - disposableTracker === null || disposableTracker === void 0 ? void 0 : disposableTracker.trackDisposable(x); - return x; - } - function markAsDisposed(disposable) { - disposableTracker === null || disposableTracker === void 0 ? void 0 : disposableTracker.markAsDisposed(disposable); - } - function setParentOfDisposable(child, parent) { - disposableTracker === null || disposableTracker === void 0 ? void 0 : disposableTracker.setParent(child, parent); - } - function setParentOfDisposables(children, parent) { - if (!disposableTracker) { - return; - } - for (const child of children) { - disposableTracker.setParent(child, parent); - } - } - function dispose(arg) { - if (Iterable.is(arg)) { - const errors = []; - for (const d of arg) { - if (d) { - try { - d.dispose(); - } catch (e) { - errors.push(e); - } - } - } - if (errors.length === 1) { - throw errors[0]; - } else if (errors.length > 1) { - throw new AggregateError(errors, "Encountered errors while disposing of store"); - } - return Array.isArray(arg) ? [] : arg; - } else if (arg) { - arg.dispose(); - return arg; - } - } - function combinedDisposable(...disposables) { - const parent = toDisposable(() => dispose(disposables)); - setParentOfDisposables(disposables, parent); - return parent; - } - function toDisposable(fn) { - const self = trackDisposable({ - dispose: createSingleCallFunction(() => { - markAsDisposed(self); - fn(); - }) - }); - return self; - } - var DisposableStore = class _DisposableStore { - constructor() { - this._toDispose = /* @__PURE__ */ new Set(); - this._isDisposed = false; - trackDisposable(this); - } - /** - * Dispose of all registered disposables and mark this object as disposed. - * - * Any future disposables added to this object will be disposed of on `add`. - */ - dispose() { - if (this._isDisposed) { - return; - } - markAsDisposed(this); - this._isDisposed = true; - this.clear(); - } - /** - * @return `true` if this object has been disposed of. - */ - get isDisposed() { - return this._isDisposed; - } - /** - * Dispose of all registered disposables but do not mark this object as disposed. - */ - clear() { - if (this._toDispose.size === 0) { - return; - } - try { - dispose(this._toDispose); - } finally { - this._toDispose.clear(); - } - } - /** - * Add a new {@link IDisposable disposable} to the collection. - */ - add(o) { - if (!o) { - return o; - } - if (o === this) { - throw new Error("Cannot register a disposable on itself!"); - } - setParentOfDisposable(o, this); - if (this._isDisposed) { - if (!_DisposableStore.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); - } - } else { - this._toDispose.add(o); - } - return o; - } - /** - * Deletes the value from the store, but does not dispose it. - */ - deleteAndLeak(o) { - if (!o) { - return; - } - if (this._toDispose.has(o)) { - this._toDispose.delete(o); - setParentOfDisposable(o, null); - } - } - }; - DisposableStore.DISABLE_DISPOSED_WARNING = false; - var Disposable = class { - constructor() { - this._store = new DisposableStore(); - trackDisposable(this); - setParentOfDisposable(this._store, this); - } - dispose() { - markAsDisposed(this); - this._store.dispose(); - } - /** - * Adds `o` to the collection of disposables managed by this object. - */ - _register(o) { - if (o === this) { - throw new Error("Cannot register a disposable on itself!"); - } - return this._store.add(o); - } - }; - Disposable.None = Object.freeze({ dispose() { - } }); - - // node_modules/monaco-editor/esm/vs/base/common/linkedList.js - var Node = class _Node { - constructor(element) { - this.element = element; - this.next = _Node.Undefined; - this.prev = _Node.Undefined; - } - }; - Node.Undefined = new Node(void 0); - var LinkedList = class { - constructor() { - this._first = Node.Undefined; - this._last = Node.Undefined; - this._size = 0; - } - get size() { - return this._size; - } - isEmpty() { - return this._first === Node.Undefined; - } - clear() { - let node = this._first; - while (node !== Node.Undefined) { - const next = node.next; - node.prev = Node.Undefined; - node.next = Node.Undefined; - node = next; - } - this._first = Node.Undefined; - this._last = Node.Undefined; - this._size = 0; - } - unshift(element) { - return this._insert(element, false); - } - push(element) { - return this._insert(element, true); - } - _insert(element, atTheEnd) { - const newNode = new Node(element); - if (this._first === Node.Undefined) { - this._first = newNode; - this._last = newNode; - } else if (atTheEnd) { - const oldLast = this._last; - this._last = newNode; - newNode.prev = oldLast; - oldLast.next = newNode; - } else { - const oldFirst = this._first; - this._first = newNode; - newNode.next = oldFirst; - oldFirst.prev = newNode; - } - this._size += 1; - let didRemove = false; - return () => { - if (!didRemove) { - didRemove = true; - this._remove(newNode); - } - }; - } - shift() { - if (this._first === Node.Undefined) { - return void 0; - } else { - const res = this._first.element; - this._remove(this._first); - return res; - } - } - pop() { - if (this._last === Node.Undefined) { - return void 0; - } else { - const res = this._last.element; - this._remove(this._last); - return res; - } - } - _remove(node) { - if (node.prev !== Node.Undefined && node.next !== Node.Undefined) { - const anchor = node.prev; - anchor.next = node.next; - node.next.prev = anchor; - } else if (node.prev === Node.Undefined && node.next === Node.Undefined) { - this._first = Node.Undefined; - this._last = Node.Undefined; - } else if (node.next === Node.Undefined) { - this._last = this._last.prev; - this._last.next = Node.Undefined; - } else if (node.prev === Node.Undefined) { - this._first = this._first.next; - this._first.prev = Node.Undefined; - } - this._size -= 1; - } - *[Symbol.iterator]() { - let node = this._first; - while (node !== Node.Undefined) { - yield node.element; - node = node.next; - } - } - }; - - // node_modules/monaco-editor/esm/vs/base/common/stopwatch.js - var hasPerformanceNow = globalThis.performance && typeof globalThis.performance.now === "function"; - var StopWatch = class _StopWatch { - static create(highResolution) { - return new _StopWatch(highResolution); - } - constructor(highResolution) { - this._now = hasPerformanceNow && highResolution === false ? Date.now : globalThis.performance.now.bind(globalThis.performance); - this._startTime = this._now(); - this._stopTime = -1; - } - stop() { - this._stopTime = this._now(); - } - elapsed() { - if (this._stopTime !== -1) { - return this._stopTime - this._startTime; - } - return this._now() - this._startTime; - } - }; - - // node_modules/monaco-editor/esm/vs/base/common/event.js - var _enableDisposeWithListenerWarning = false; - var _enableSnapshotPotentialLeakWarning = false; - var Event; - (function(Event2) { - Event2.None = () => Disposable.None; - function _addLeakageTraceLogic(options) { - if (_enableSnapshotPotentialLeakWarning) { - const { onDidAddListener: origListenerDidAdd } = options; - const stack = Stacktrace.create(); - let count = 0; - options.onDidAddListener = () => { - if (++count === 2) { - console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"); - stack.print(); - } - origListenerDidAdd === null || origListenerDidAdd === void 0 ? void 0 : origListenerDidAdd(); - }; - } - } - function defer(event, disposable) { - return debounce(event, () => void 0, 0, void 0, true, void 0, disposable); - } - Event2.defer = defer; - function once2(event) { - return (listener, thisArgs = null, disposables) => { - let didFire = false; - let result = void 0; - result = event((e) => { - if (didFire) { - return; - } else if (result) { - result.dispose(); - } else { - didFire = true; - } - return listener.call(thisArgs, e); - }, null, disposables); - if (didFire) { - result.dispose(); - } - return result; - }; - } - Event2.once = once2; - function map(event, map2, disposable) { - return snapshot((listener, thisArgs = null, disposables) => event((i) => listener.call(thisArgs, map2(i)), null, disposables), disposable); - } - Event2.map = map; - function forEach(event, each, disposable) { - return snapshot((listener, thisArgs = null, disposables) => event((i) => { - each(i); - listener.call(thisArgs, i); - }, null, disposables), disposable); - } - Event2.forEach = forEach; - function filter(event, filter2, disposable) { - return snapshot((listener, thisArgs = null, disposables) => event((e) => filter2(e) && listener.call(thisArgs, e), null, disposables), disposable); - } - Event2.filter = filter; - function signal(event) { - return event; - } - Event2.signal = signal; - function any(...events) { - return (listener, thisArgs = null, disposables) => { - const disposable = combinedDisposable(...events.map((event) => event((e) => listener.call(thisArgs, e)))); - return addAndReturnDisposable(disposable, disposables); - }; - } - Event2.any = any; - function reduce(event, merge, initial, disposable) { - let output = initial; - return map(event, (e) => { - output = merge(output, e); - return output; - }, disposable); - } - Event2.reduce = reduce; - function snapshot(event, disposable) { - let listener; - const options = { - onWillAddFirstListener() { - listener = event(emitter.fire, emitter); - }, - onDidRemoveLastListener() { - listener === null || listener === void 0 ? void 0 : listener.dispose(); - } - }; - if (!disposable) { - _addLeakageTraceLogic(options); - } - const emitter = new Emitter(options); - disposable === null || disposable === void 0 ? void 0 : disposable.add(emitter); - return emitter.event; - } - function addAndReturnDisposable(d, store) { - if (store instanceof Array) { - store.push(d); - } else if (store) { - store.add(d); - } - return d; - } - function debounce(event, merge, delay = 100, leading = false, flushOnListenerRemove = false, leakWarningThreshold, disposable) { - let subscription; - let output = void 0; - let handle = void 0; - let numDebouncedCalls = 0; - let doFire; - const options = { - leakWarningThreshold, - onWillAddFirstListener() { - subscription = event((cur) => { - numDebouncedCalls++; - output = merge(output, cur); - if (leading && !handle) { - emitter.fire(output); - output = void 0; - } - doFire = () => { - const _output = output; - output = void 0; - handle = void 0; - if (!leading || numDebouncedCalls > 1) { - emitter.fire(_output); - } - numDebouncedCalls = 0; - }; - if (typeof delay === "number") { - clearTimeout(handle); - handle = setTimeout(doFire, delay); - } else { - if (handle === void 0) { - handle = 0; - queueMicrotask(doFire); - } - } - }); - }, - onWillRemoveListener() { - if (flushOnListenerRemove && numDebouncedCalls > 0) { - doFire === null || doFire === void 0 ? void 0 : doFire(); - } - }, - onDidRemoveLastListener() { - doFire = void 0; - subscription.dispose(); - } - }; - if (!disposable) { - _addLeakageTraceLogic(options); - } - const emitter = new Emitter(options); - disposable === null || disposable === void 0 ? void 0 : disposable.add(emitter); - return emitter.event; - } - Event2.debounce = debounce; - function accumulate(event, delay = 0, disposable) { - return Event2.debounce(event, (last, e) => { - if (!last) { - return [e]; - } - last.push(e); - return last; - }, delay, void 0, true, void 0, disposable); - } - Event2.accumulate = accumulate; - function latch(event, equals3 = (a, b) => a === b, disposable) { - let firstCall = true; - let cache; - return filter(event, (value) => { - const shouldEmit = firstCall || !equals3(value, cache); - firstCall = false; - cache = value; - return shouldEmit; - }, disposable); - } - Event2.latch = latch; - function split(event, isT, disposable) { - return [ - Event2.filter(event, isT, disposable), - Event2.filter(event, (e) => !isT(e), disposable) - ]; - } - Event2.split = split; - function buffer(event, flushAfterTimeout = false, _buffer = [], disposable) { - let buffer2 = _buffer.slice(); - let listener = event((e) => { - if (buffer2) { - buffer2.push(e); - } else { - emitter.fire(e); - } - }); - if (disposable) { - disposable.add(listener); - } - const flush = () => { - buffer2 === null || buffer2 === void 0 ? void 0 : buffer2.forEach((e) => emitter.fire(e)); - buffer2 = null; - }; - const emitter = new Emitter({ - onWillAddFirstListener() { - if (!listener) { - listener = event((e) => emitter.fire(e)); - if (disposable) { - disposable.add(listener); - } - } - }, - onDidAddFirstListener() { - if (buffer2) { - if (flushAfterTimeout) { - setTimeout(flush); - } else { - flush(); - } - } - }, - onDidRemoveLastListener() { - if (listener) { - listener.dispose(); - } - listener = null; - } - }); - if (disposable) { - disposable.add(emitter); - } - return emitter.event; - } - Event2.buffer = buffer; - function chain(event, sythensize) { - const fn = (listener, thisArgs, disposables) => { - const cs = sythensize(new ChainableSynthesis()); - return event(function(value) { - const result = cs.evaluate(value); - if (result !== HaltChainable) { - listener.call(thisArgs, result); - } - }, void 0, disposables); - }; - return fn; - } - Event2.chain = chain; - const HaltChainable = Symbol("HaltChainable"); - class ChainableSynthesis { - constructor() { - this.steps = []; - } - map(fn) { - this.steps.push(fn); - return this; - } - forEach(fn) { - this.steps.push((v) => { - fn(v); - return v; - }); - return this; - } - filter(fn) { - this.steps.push((v) => fn(v) ? v : HaltChainable); - return this; - } - reduce(merge, initial) { - let last = initial; - this.steps.push((v) => { - last = merge(last, v); - return last; - }); - return this; - } - latch(equals3 = (a, b) => a === b) { - let firstCall = true; - let cache; - this.steps.push((value) => { - const shouldEmit = firstCall || !equals3(value, cache); - firstCall = false; - cache = value; - return shouldEmit ? value : HaltChainable; - }); - return this; - } - evaluate(value) { - for (const step of this.steps) { - value = step(value); - if (value === HaltChainable) { - break; - } - } - return value; - } - } - function fromNodeEventEmitter(emitter, eventName, map2 = (id) => id) { - const fn = (...args) => result.fire(map2(...args)); - const onFirstListenerAdd = () => emitter.on(eventName, fn); - const onLastListenerRemove = () => emitter.removeListener(eventName, fn); - const result = new Emitter({ onWillAddFirstListener: onFirstListenerAdd, onDidRemoveLastListener: onLastListenerRemove }); - return result.event; - } - Event2.fromNodeEventEmitter = fromNodeEventEmitter; - function fromDOMEventEmitter(emitter, eventName, map2 = (id) => id) { - const fn = (...args) => result.fire(map2(...args)); - const onFirstListenerAdd = () => emitter.addEventListener(eventName, fn); - const onLastListenerRemove = () => emitter.removeEventListener(eventName, fn); - const result = new Emitter({ onWillAddFirstListener: onFirstListenerAdd, onDidRemoveLastListener: onLastListenerRemove }); - return result.event; - } - Event2.fromDOMEventEmitter = fromDOMEventEmitter; - function toPromise(event) { - return new Promise((resolve2) => once2(event)(resolve2)); - } - Event2.toPromise = toPromise; - function fromPromise(promise) { - const result = new Emitter(); - promise.then((res) => { - result.fire(res); - }, () => { - result.fire(void 0); - }).finally(() => { - result.dispose(); - }); - return result.event; - } - Event2.fromPromise = fromPromise; - function runAndSubscribe(event, handler, initial) { - handler(initial); - return event((e) => handler(e)); - } - Event2.runAndSubscribe = runAndSubscribe; - class EmitterObserver { - constructor(_observable, store) { - this._observable = _observable; - this._counter = 0; - this._hasChanged = false; - const options = { - onWillAddFirstListener: () => { - _observable.addObserver(this); - }, - onDidRemoveLastListener: () => { - _observable.removeObserver(this); - } - }; - if (!store) { - _addLeakageTraceLogic(options); - } - this.emitter = new Emitter(options); - if (store) { - store.add(this.emitter); - } - } - beginUpdate(_observable) { - this._counter++; - } - handlePossibleChange(_observable) { - } - handleChange(_observable, _change) { - this._hasChanged = true; - } - endUpdate(_observable) { - this._counter--; - if (this._counter === 0) { - this._observable.reportChanges(); - if (this._hasChanged) { - this._hasChanged = false; - this.emitter.fire(this._observable.get()); - } - } - } - } - function fromObservable(obs, store) { - const observer = new EmitterObserver(obs, store); - return observer.emitter.event; - } - Event2.fromObservable = fromObservable; - function fromObservableLight(observable) { - return (listener, thisArgs, disposables) => { - let count = 0; - let didChange = false; - const observer = { - beginUpdate() { - count++; - }, - endUpdate() { - count--; - if (count === 0) { - observable.reportChanges(); - if (didChange) { - didChange = false; - listener.call(thisArgs); - } - } - }, - handlePossibleChange() { - }, - handleChange() { - didChange = true; - } - }; - observable.addObserver(observer); - observable.reportChanges(); - const disposable = { - dispose() { - observable.removeObserver(observer); - } - }; - if (disposables instanceof DisposableStore) { - disposables.add(disposable); - } else if (Array.isArray(disposables)) { - disposables.push(disposable); - } - return disposable; - }; - } - Event2.fromObservableLight = fromObservableLight; - })(Event || (Event = {})); - var EventProfiling = class _EventProfiling { - constructor(name) { - this.listenerCount = 0; - this.invocationCount = 0; - this.elapsedOverall = 0; - this.durations = []; - this.name = `${name}_${_EventProfiling._idPool++}`; - _EventProfiling.all.add(this); - } - start(listenerCount) { - this._stopWatch = new StopWatch(); - this.listenerCount = listenerCount; - } - stop() { - if (this._stopWatch) { - const elapsed = this._stopWatch.elapsed(); - this.durations.push(elapsed); - this.elapsedOverall += elapsed; - this.invocationCount += 1; - this._stopWatch = void 0; - } - } - }; - EventProfiling.all = /* @__PURE__ */ new Set(); - EventProfiling._idPool = 0; - var _globalLeakWarningThreshold = -1; - var LeakageMonitor = class { - constructor(threshold, name = Math.random().toString(18).slice(2, 5)) { - this.threshold = threshold; - this.name = name; - this._warnCountdown = 0; - } - dispose() { - var _a4; - (_a4 = this._stacks) === null || _a4 === void 0 ? void 0 : _a4.clear(); - } - check(stack, listenerCount) { - const threshold = this.threshold; - if (threshold <= 0 || listenerCount < threshold) { - return void 0; - } - if (!this._stacks) { - this._stacks = /* @__PURE__ */ new Map(); - } - const count = this._stacks.get(stack.value) || 0; - this._stacks.set(stack.value, count + 1); - this._warnCountdown -= 1; - if (this._warnCountdown <= 0) { - this._warnCountdown = threshold * 0.5; - let topStack; - let topCount = 0; - for (const [stack2, count2] of this._stacks) { - if (!topStack || topCount < count2) { - topStack = stack2; - topCount = count2; - } - } - console.warn(`[${this.name}] potential listener LEAK detected, having ${listenerCount} listeners already. MOST frequent listener (${topCount}):`); - console.warn(topStack); - } - return () => { - const count2 = this._stacks.get(stack.value) || 0; - this._stacks.set(stack.value, count2 - 1); - }; - } - }; - var Stacktrace = class _Stacktrace { - static create() { - var _a4; - return new _Stacktrace((_a4 = new Error().stack) !== null && _a4 !== void 0 ? _a4 : ""); - } - constructor(value) { - this.value = value; - } - print() { - console.warn(this.value.split("\n").slice(2).join("\n")); - } - }; - var UniqueContainer = class { - constructor(value) { - this.value = value; - } - }; - var compactionThreshold = 2; - var forEachListener = (listeners, fn) => { - if (listeners instanceof UniqueContainer) { - fn(listeners); - } else { - for (let i = 0; i < listeners.length; i++) { - const l = listeners[i]; - if (l) { - fn(l); - } - } - } - }; - var Emitter = class { - constructor(options) { - var _a4, _b2, _c, _d, _e; - this._size = 0; - this._options = options; - this._leakageMon = _globalLeakWarningThreshold > 0 || ((_a4 = this._options) === null || _a4 === void 0 ? void 0 : _a4.leakWarningThreshold) ? new LeakageMonitor((_c = (_b2 = this._options) === null || _b2 === void 0 ? void 0 : _b2.leakWarningThreshold) !== null && _c !== void 0 ? _c : _globalLeakWarningThreshold) : void 0; - this._perfMon = ((_d = this._options) === null || _d === void 0 ? void 0 : _d._profName) ? new EventProfiling(this._options._profName) : void 0; - this._deliveryQueue = (_e = this._options) === null || _e === void 0 ? void 0 : _e.deliveryQueue; - } - dispose() { - var _a4, _b2, _c, _d; - if (!this._disposed) { - this._disposed = true; - if (((_a4 = this._deliveryQueue) === null || _a4 === void 0 ? void 0 : _a4.current) === this) { - this._deliveryQueue.reset(); - } - if (this._listeners) { - if (_enableDisposeWithListenerWarning) { - const listeners = this._listeners; - queueMicrotask(() => { - forEachListener(listeners, (l) => { - var _a5; - return (_a5 = l.stack) === null || _a5 === void 0 ? void 0 : _a5.print(); - }); - }); - } - this._listeners = void 0; - this._size = 0; - } - (_c = (_b2 = this._options) === null || _b2 === void 0 ? void 0 : _b2.onDidRemoveLastListener) === null || _c === void 0 ? void 0 : _c.call(_b2); - (_d = this._leakageMon) === null || _d === void 0 ? void 0 : _d.dispose(); - } - } - /** - * For the public to allow to subscribe - * to events from this Emitter - */ - get event() { - var _a4; - (_a4 = this._event) !== null && _a4 !== void 0 ? _a4 : this._event = (callback, thisArgs, disposables) => { - var _a5, _b2, _c, _d, _e; - if (this._leakageMon && this._size > this._leakageMon.threshold * 3) { - console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`); - return Disposable.None; - } - if (this._disposed) { - return Disposable.None; - } - if (thisArgs) { - callback = callback.bind(thisArgs); - } - const contained = new UniqueContainer(callback); - let removeMonitor; - let stack; - if (this._leakageMon && this._size >= Math.ceil(this._leakageMon.threshold * 0.2)) { - contained.stack = Stacktrace.create(); - removeMonitor = this._leakageMon.check(contained.stack, this._size + 1); - } - if (_enableDisposeWithListenerWarning) { - contained.stack = stack !== null && stack !== void 0 ? stack : Stacktrace.create(); - } - if (!this._listeners) { - (_b2 = (_a5 = this._options) === null || _a5 === void 0 ? void 0 : _a5.onWillAddFirstListener) === null || _b2 === void 0 ? void 0 : _b2.call(_a5, this); - this._listeners = contained; - (_d = (_c = this._options) === null || _c === void 0 ? void 0 : _c.onDidAddFirstListener) === null || _d === void 0 ? void 0 : _d.call(_c, this); - } else if (this._listeners instanceof UniqueContainer) { - (_e = this._deliveryQueue) !== null && _e !== void 0 ? _e : this._deliveryQueue = new EventDeliveryQueuePrivate(); - this._listeners = [this._listeners, contained]; - } else { - this._listeners.push(contained); - } - this._size++; - const result = toDisposable(() => { - removeMonitor === null || removeMonitor === void 0 ? void 0 : removeMonitor(); - this._removeListener(contained); - }); - if (disposables instanceof DisposableStore) { - disposables.add(result); - } else if (Array.isArray(disposables)) { - disposables.push(result); - } - return result; - }; - return this._event; - } - _removeListener(listener) { - var _a4, _b2, _c, _d; - (_b2 = (_a4 = this._options) === null || _a4 === void 0 ? void 0 : _a4.onWillRemoveListener) === null || _b2 === void 0 ? void 0 : _b2.call(_a4, this); - if (!this._listeners) { - return; - } - if (this._size === 1) { - this._listeners = void 0; - (_d = (_c = this._options) === null || _c === void 0 ? void 0 : _c.onDidRemoveLastListener) === null || _d === void 0 ? void 0 : _d.call(_c, this); - this._size = 0; - return; - } - const listeners = this._listeners; - const index = listeners.indexOf(listener); - if (index === -1) { - console.log("disposed?", this._disposed); - console.log("size?", this._size); - console.log("arr?", JSON.stringify(this._listeners)); - throw new Error("Attempted to dispose unknown listener"); - } - this._size--; - listeners[index] = void 0; - const adjustDeliveryQueue = this._deliveryQueue.current === this; - if (this._size * compactionThreshold <= listeners.length) { - let n = 0; - for (let i = 0; i < listeners.length; i++) { - if (listeners[i]) { - listeners[n++] = listeners[i]; - } else if (adjustDeliveryQueue) { - this._deliveryQueue.end--; - if (n < this._deliveryQueue.i) { - this._deliveryQueue.i--; - } - } - } - listeners.length = n; - } - } - _deliver(listener, value) { - var _a4; - if (!listener) { - return; - } - const errorHandler2 = ((_a4 = this._options) === null || _a4 === void 0 ? void 0 : _a4.onListenerError) || onUnexpectedError; - if (!errorHandler2) { - listener.value(value); - return; - } - try { - listener.value(value); - } catch (e) { - errorHandler2(e); - } - } - /** Delivers items in the queue. Assumes the queue is ready to go. */ - _deliverQueue(dq) { - const listeners = dq.current._listeners; - while (dq.i < dq.end) { - this._deliver(listeners[dq.i++], dq.value); - } - dq.reset(); - } - /** - * To be kept private to fire an event to - * subscribers - */ - fire(event) { - var _a4, _b2, _c, _d; - if ((_a4 = this._deliveryQueue) === null || _a4 === void 0 ? void 0 : _a4.current) { - this._deliverQueue(this._deliveryQueue); - (_b2 = this._perfMon) === null || _b2 === void 0 ? void 0 : _b2.stop(); - } - (_c = this._perfMon) === null || _c === void 0 ? void 0 : _c.start(this._size); - if (!this._listeners) { - } else if (this._listeners instanceof UniqueContainer) { - this._deliver(this._listeners, event); - } else { - const dq = this._deliveryQueue; - dq.enqueue(this, event, this._listeners.length); - this._deliverQueue(dq); - } - (_d = this._perfMon) === null || _d === void 0 ? void 0 : _d.stop(); - } - hasListeners() { - return this._size > 0; - } - }; - var EventDeliveryQueuePrivate = class { - constructor() { - this.i = -1; - this.end = 0; - } - enqueue(emitter, value, end) { - this.i = 0; - this.end = end; - this.current = emitter; - this.value = value; - } - reset() { - this.i = this.end; - this.current = void 0; - this.value = void 0; - } - }; - - // node_modules/monaco-editor/esm/vs/base/common/types.js - function isString(str) { - return typeof str === "string"; - } - - // node_modules/monaco-editor/esm/vs/base/common/objects.js - function getAllPropertyNames(obj) { - let res = []; - while (Object.prototype !== obj) { - res = res.concat(Object.getOwnPropertyNames(obj)); - obj = Object.getPrototypeOf(obj); - } - return res; - } - function getAllMethodNames(obj) { - const methods = []; - for (const prop of getAllPropertyNames(obj)) { - if (typeof obj[prop] === "function") { - methods.push(prop); - } - } - return methods; - } - function createProxyObject(methodNames, invoke) { - const createProxyMethod = (method) => { - return function() { - const args = Array.prototype.slice.call(arguments, 0); - return invoke(method, args); - }; - }; - const result = {}; - for (const methodName of methodNames) { - result[methodName] = createProxyMethod(methodName); - } - return result; - } - - // node_modules/monaco-editor/esm/vs/nls.js - var isPseudo = typeof document !== "undefined" && document.location && document.location.hash.indexOf("pseudo=true") >= 0; - function _format(message, args) { - let result; - if (args.length === 0) { - result = message; - } else { - result = message.replace(/\{(\d+)\}/g, (match, rest) => { - const index = rest[0]; - const arg = args[index]; - let result2 = match; - if (typeof arg === "string") { - result2 = arg; - } else if (typeof arg === "number" || typeof arg === "boolean" || arg === void 0 || arg === null) { - result2 = String(arg); - } - return result2; - }); - } - if (isPseudo) { - result = "\uFF3B" + result.replace(/[aouei]/g, "$&$&") + "\uFF3D"; - } - return result; - } - function localize(data, message, ...args) { - return _format(message, args); - } - function getConfiguredDefaultLocale(_) { - return void 0; - } - - // node_modules/monaco-editor/esm/vs/base/common/platform.js - var _a; - var LANGUAGE_DEFAULT = "en"; - var _isWindows = false; - var _isMacintosh = false; - var _isLinux = false; - var _isLinuxSnap = false; - var _isNative = false; - var _isWeb = false; - var _isElectron = false; - var _isIOS = false; - var _isCI = false; - var _isMobile = false; - var _locale = void 0; - var _language = LANGUAGE_DEFAULT; - var _platformLocale = LANGUAGE_DEFAULT; - var _translationsConfigFile = void 0; - var _userAgent = void 0; - var $globalThis = globalThis; - var nodeProcess = void 0; - if (typeof $globalThis.vscode !== "undefined" && typeof $globalThis.vscode.process !== "undefined") { - nodeProcess = $globalThis.vscode.process; - } else if (typeof process !== "undefined") { - nodeProcess = process; - } - var isElectronProcess = typeof ((_a = nodeProcess === null || nodeProcess === void 0 ? void 0 : nodeProcess.versions) === null || _a === void 0 ? void 0 : _a.electron) === "string"; - var isElectronRenderer = isElectronProcess && (nodeProcess === null || nodeProcess === void 0 ? void 0 : nodeProcess.type) === "renderer"; - if (typeof nodeProcess === "object") { - _isWindows = nodeProcess.platform === "win32"; - _isMacintosh = nodeProcess.platform === "darwin"; - _isLinux = nodeProcess.platform === "linux"; - _isLinuxSnap = _isLinux && !!nodeProcess.env["SNAP"] && !!nodeProcess.env["SNAP_REVISION"]; - _isElectron = isElectronProcess; - _isCI = !!nodeProcess.env["CI"] || !!nodeProcess.env["BUILD_ARTIFACTSTAGINGDIRECTORY"]; - _locale = LANGUAGE_DEFAULT; - _language = LANGUAGE_DEFAULT; - const rawNlsConfig = nodeProcess.env["VSCODE_NLS_CONFIG"]; - if (rawNlsConfig) { - try { - const nlsConfig = JSON.parse(rawNlsConfig); - const resolved = nlsConfig.availableLanguages["*"]; - _locale = nlsConfig.locale; - _platformLocale = nlsConfig.osLocale; - _language = resolved ? resolved : LANGUAGE_DEFAULT; - _translationsConfigFile = nlsConfig._translationsConfigFile; - } catch (e) { - } - } - _isNative = true; - } else if (typeof navigator === "object" && !isElectronRenderer) { - _userAgent = navigator.userAgent; - _isWindows = _userAgent.indexOf("Windows") >= 0; - _isMacintosh = _userAgent.indexOf("Macintosh") >= 0; - _isIOS = (_userAgent.indexOf("Macintosh") >= 0 || _userAgent.indexOf("iPad") >= 0 || _userAgent.indexOf("iPhone") >= 0) && !!navigator.maxTouchPoints && navigator.maxTouchPoints > 0; - _isLinux = _userAgent.indexOf("Linux") >= 0; - _isMobile = (_userAgent === null || _userAgent === void 0 ? void 0 : _userAgent.indexOf("Mobi")) >= 0; - _isWeb = true; - const configuredLocale = getConfiguredDefaultLocale( - // This call _must_ be done in the file that calls `nls.getConfiguredDefaultLocale` - // to ensure that the NLS AMD Loader plugin has been loaded and configured. - // This is because the loader plugin decides what the default locale is based on - // how it's able to resolve the strings. - localize({ key: "ensureLoaderPluginIsLoaded", comment: ["{Locked}"] }, "_") - ); - _locale = configuredLocale || LANGUAGE_DEFAULT; - _language = _locale; - _platformLocale = navigator.language; - } else { - console.error("Unable to resolve platform."); - } - var _platform = 0; - if (_isMacintosh) { - _platform = 1; - } else if (_isWindows) { - _platform = 3; - } else if (_isLinux) { - _platform = 2; - } - var isWindows = _isWindows; - var isMacintosh = _isMacintosh; - var isWebWorker = _isWeb && typeof $globalThis.importScripts === "function"; - var webWorkerOrigin = isWebWorker ? $globalThis.origin : void 0; - var userAgent = _userAgent; - var setTimeout0IsFaster = typeof $globalThis.postMessage === "function" && !$globalThis.importScripts; - var setTimeout0 = (() => { - if (setTimeout0IsFaster) { - const pending = []; - $globalThis.addEventListener("message", (e) => { - if (e.data && e.data.vscodeScheduleAsyncWork) { - for (let i = 0, len = pending.length; i < len; i++) { - const candidate = pending[i]; - if (candidate.id === e.data.vscodeScheduleAsyncWork) { - pending.splice(i, 1); - candidate.callback(); - return; - } - } - } - }); - let lastId = 0; - return (callback) => { - const myId = ++lastId; - pending.push({ - id: myId, - callback - }); - $globalThis.postMessage({ vscodeScheduleAsyncWork: myId }, "*"); - }; - } - return (callback) => setTimeout(callback); - })(); - var isChrome = !!(userAgent && userAgent.indexOf("Chrome") >= 0); - var isFirefox = !!(userAgent && userAgent.indexOf("Firefox") >= 0); - var isSafari = !!(!isChrome && (userAgent && userAgent.indexOf("Safari") >= 0)); - var isEdge = !!(userAgent && userAgent.indexOf("Edg/") >= 0); - var isAndroid = !!(userAgent && userAgent.indexOf("Android") >= 0); - - // node_modules/monaco-editor/esm/vs/base/common/cache.js - var LRUCachedFunction = class { - constructor(fn) { - this.fn = fn; - this.lastCache = void 0; - this.lastArgKey = void 0; - } - get(arg) { - const key = JSON.stringify(arg); - if (this.lastArgKey !== key) { - this.lastArgKey = key; - this.lastCache = this.fn(arg); - } - return this.lastCache; - } - }; - - // node_modules/monaco-editor/esm/vs/base/common/lazy.js - var Lazy = class { - constructor(executor) { - this.executor = executor; - this._didRun = false; - } - /** - * Get the wrapped value. - * - * This will force evaluation of the lazy value if it has not been resolved yet. Lazy values are only - * resolved once. `getValue` will re-throw exceptions that are hit while resolving the value - */ - get value() { - if (!this._didRun) { - try { - this._value = this.executor(); - } catch (err) { - this._error = err; - } finally { - this._didRun = true; - } - } - if (this._error) { - throw this._error; - } - return this._value; - } - /** - * Get the wrapped value without forcing evaluation. - */ - get rawValue() { - return this._value; - } - }; - - // node_modules/monaco-editor/esm/vs/base/common/strings.js - var _a2; - function escapeRegExpCharacters(value) { - return value.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g, "\\$&"); - } - function splitLines(str) { - return str.split(/\r\n|\r|\n/); - } - function firstNonWhitespaceIndex(str) { - for (let i = 0, len = str.length; i < len; i++) { - const chCode = str.charCodeAt(i); - if (chCode !== 32 && chCode !== 9) { - return i; - } - } - return -1; - } - function lastNonWhitespaceIndex(str, startIndex = str.length - 1) { - for (let i = startIndex; i >= 0; i--) { - const chCode = str.charCodeAt(i); - if (chCode !== 32 && chCode !== 9) { - return i; - } - } - return -1; - } - function isUpperAsciiLetter(code) { - return code >= 65 && code <= 90; - } - function isHighSurrogate(charCode) { - return 55296 <= charCode && charCode <= 56319; - } - function isLowSurrogate(charCode) { - return 56320 <= charCode && charCode <= 57343; - } - function computeCodePoint(highSurrogate, lowSurrogate) { - return (highSurrogate - 55296 << 10) + (lowSurrogate - 56320) + 65536; - } - function getNextCodePoint(str, len, offset) { - const charCode = str.charCodeAt(offset); - if (isHighSurrogate(charCode) && offset + 1 < len) { - const nextCharCode = str.charCodeAt(offset + 1); - if (isLowSurrogate(nextCharCode)) { - return computeCodePoint(charCode, nextCharCode); - } - } - return charCode; - } - var IS_BASIC_ASCII = /^[\t\n\r\x20-\x7E]*$/; - function isBasicASCII(str) { - return IS_BASIC_ASCII.test(str); - } - var UTF8_BOM_CHARACTER = String.fromCharCode( - 65279 - /* CharCode.UTF8_BOM */ - ); - var GraphemeBreakTree = class _GraphemeBreakTree { - static getInstance() { - if (!_GraphemeBreakTree._INSTANCE) { - _GraphemeBreakTree._INSTANCE = new _GraphemeBreakTree(); - } - return _GraphemeBreakTree._INSTANCE; - } - constructor() { - this._data = getGraphemeBreakRawData(); - } - getGraphemeBreakType(codePoint) { - if (codePoint < 32) { - if (codePoint === 10) { - return 3; - } - if (codePoint === 13) { - return 2; - } - return 4; - } - if (codePoint < 127) { - return 0; - } - const data = this._data; - const nodeCount = data.length / 3; - let nodeIndex = 1; - while (nodeIndex <= nodeCount) { - if (codePoint < data[3 * nodeIndex]) { - nodeIndex = 2 * nodeIndex; - } else if (codePoint > data[3 * nodeIndex + 1]) { - nodeIndex = 2 * nodeIndex + 1; - } else { - return data[3 * nodeIndex + 2]; - } - } - return 0; - } - }; - GraphemeBreakTree._INSTANCE = null; - function getGraphemeBreakRawData() { - 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 AmbiguousCharacters = class { - static getInstance(locales) { - return _a2.cache.get(Array.from(locales)); - } - static getLocales() { - return _a2._locales.value; - } - constructor(confusableDictionary) { - this.confusableDictionary = confusableDictionary; - } - isAmbiguous(codePoint) { - return this.confusableDictionary.has(codePoint); - } - /** - * Returns the non basic ASCII code point that the given code point can be confused, - * or undefined if such code point does note exist. - */ - getPrimaryConfusable(codePoint) { - return this.confusableDictionary.get(codePoint); - } - getConfusableCodePoints() { - return new Set(this.confusableDictionary.keys()); - } - }; - _a2 = AmbiguousCharacters; - AmbiguousCharacters.ambiguousCharacterData = new Lazy(() => { - return 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,8218,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,8242,96,1370,96,1523,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,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,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,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,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,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,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,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,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,71922,67,71913,67,65315,67,8557,67,8450,67,8493,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,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,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,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,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,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,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,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,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,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,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,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,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,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,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,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,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,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,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,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,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,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,71919,87,71910,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,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,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,66293,90,71909,90,65338,90,8484,90,8488,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,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,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,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,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,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,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,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,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,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,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,65283,35,65292,44,65307,59],"ko":[8211,45,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,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,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,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,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,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[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,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,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,65283,35,65307,59]}'); - }); - AmbiguousCharacters.cache = new LRUCachedFunction((locales) => { - function arrayToMap(arr) { - const result = /* @__PURE__ */ new Map(); - for (let i = 0; i < arr.length; i += 2) { - result.set(arr[i], arr[i + 1]); - } - return result; - } - function mergeMaps(map1, map2) { - const result = new Map(map1); - for (const [key, value] of map2) { - result.set(key, value); - } - return result; - } - function intersectMaps(map1, map2) { - if (!map1) { - return map2; - } - const result = /* @__PURE__ */ new Map(); - for (const [key, value] of map1) { - if (map2.has(key)) { - result.set(key, value); - } - } - return result; - } - const data = _a2.ambiguousCharacterData.value; - let filteredLocales = locales.filter((l) => !l.startsWith("_") && l in data); - if (filteredLocales.length === 0) { - filteredLocales = ["_default"]; - } - let languageSpecificMap = void 0; - for (const locale of filteredLocales) { - const map2 = arrayToMap(data[locale]); - languageSpecificMap = intersectMaps(languageSpecificMap, map2); - } - const commonMap = arrayToMap(data["_common"]); - const map = mergeMaps(commonMap, languageSpecificMap); - return new _a2(map); - }); - AmbiguousCharacters._locales = new Lazy(() => Object.keys(_a2.ambiguousCharacterData.value).filter((k) => !k.startsWith("_"))); - var InvisibleCharacters = class _InvisibleCharacters { - static getRawData() { - return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,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,12288,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]"); - } - static getData() { - if (!this._data) { - this._data = new Set(_InvisibleCharacters.getRawData()); - } - return this._data; - } - static isInvisibleCharacter(codePoint) { - return _InvisibleCharacters.getData().has(codePoint); - } - static get codePoints() { - return _InvisibleCharacters.getData(); - } - }; - InvisibleCharacters._data = void 0; - - // node_modules/monaco-editor/esm/vs/base/common/worker/simpleWorker.js - var INITIALIZE = "$initialize"; - var RequestMessage = class { - constructor(vsWorker, req, method, args) { - this.vsWorker = vsWorker; - this.req = req; - this.method = method; - this.args = args; - this.type = 0; - } - }; - var ReplyMessage = class { - constructor(vsWorker, seq, res, err) { - this.vsWorker = vsWorker; - this.seq = seq; - this.res = res; - this.err = err; - this.type = 1; - } - }; - var SubscribeEventMessage = class { - constructor(vsWorker, req, eventName, arg) { - this.vsWorker = vsWorker; - this.req = req; - this.eventName = eventName; - this.arg = arg; - this.type = 2; - } - }; - var EventMessage = class { - constructor(vsWorker, req, event) { - this.vsWorker = vsWorker; - this.req = req; - this.event = event; - this.type = 3; - } - }; - var UnsubscribeEventMessage = class { - constructor(vsWorker, req) { - this.vsWorker = vsWorker; - this.req = req; - this.type = 4; - } - }; - var SimpleWorkerProtocol = class { - constructor(handler) { - this._workerId = -1; - this._handler = handler; - this._lastSentReq = 0; - this._pendingReplies = /* @__PURE__ */ Object.create(null); - this._pendingEmitters = /* @__PURE__ */ new Map(); - this._pendingEvents = /* @__PURE__ */ new Map(); - } - setWorkerId(workerId) { - this._workerId = workerId; - } - sendMessage(method, args) { - const req = String(++this._lastSentReq); - return new Promise((resolve2, reject) => { - this._pendingReplies[req] = { - resolve: resolve2, - reject - }; - this._send(new RequestMessage(this._workerId, req, method, args)); - }); - } - listen(eventName, arg) { - let req = null; - const emitter = new Emitter({ - onWillAddFirstListener: () => { - req = String(++this._lastSentReq); - this._pendingEmitters.set(req, emitter); - this._send(new SubscribeEventMessage(this._workerId, req, eventName, arg)); - }, - onDidRemoveLastListener: () => { - this._pendingEmitters.delete(req); - this._send(new UnsubscribeEventMessage(this._workerId, req)); - req = null; - } - }); - return emitter.event; - } - handleMessage(message) { - if (!message || !message.vsWorker) { - return; - } - if (this._workerId !== -1 && message.vsWorker !== this._workerId) { - return; - } - this._handleMessage(message); - } - _handleMessage(msg) { - switch (msg.type) { - case 1: - return this._handleReplyMessage(msg); - case 0: - return this._handleRequestMessage(msg); - case 2: - return this._handleSubscribeEventMessage(msg); - case 3: - return this._handleEventMessage(msg); - case 4: - return this._handleUnsubscribeEventMessage(msg); - } - } - _handleReplyMessage(replyMessage) { - if (!this._pendingReplies[replyMessage.seq]) { - console.warn("Got reply to unknown seq"); - return; - } - const reply = this._pendingReplies[replyMessage.seq]; - delete this._pendingReplies[replyMessage.seq]; - if (replyMessage.err) { - let err = replyMessage.err; - if (replyMessage.err.$isError) { - err = new Error(); - err.name = replyMessage.err.name; - err.message = replyMessage.err.message; - err.stack = replyMessage.err.stack; - } - reply.reject(err); - return; - } - reply.resolve(replyMessage.res); - } - _handleRequestMessage(requestMessage) { - const req = requestMessage.req; - const result = this._handler.handleMessage(requestMessage.method, requestMessage.args); - result.then((r) => { - this._send(new ReplyMessage(this._workerId, req, r, void 0)); - }, (e) => { - if (e.detail instanceof Error) { - e.detail = transformErrorForSerialization(e.detail); - } - this._send(new ReplyMessage(this._workerId, req, void 0, transformErrorForSerialization(e))); - }); - } - _handleSubscribeEventMessage(msg) { - const req = msg.req; - const disposable = this._handler.handleEvent(msg.eventName, msg.arg)((event) => { - this._send(new EventMessage(this._workerId, req, event)); - }); - this._pendingEvents.set(req, disposable); - } - _handleEventMessage(msg) { - if (!this._pendingEmitters.has(msg.req)) { - console.warn("Got event for unknown req"); - return; - } - this._pendingEmitters.get(msg.req).fire(msg.event); - } - _handleUnsubscribeEventMessage(msg) { - if (!this._pendingEvents.has(msg.req)) { - console.warn("Got unsubscribe for unknown req"); - return; - } - this._pendingEvents.get(msg.req).dispose(); - this._pendingEvents.delete(msg.req); - } - _send(msg) { - const transfer = []; - if (msg.type === 0) { - for (let i = 0; i < msg.args.length; i++) { - if (msg.args[i] instanceof ArrayBuffer) { - transfer.push(msg.args[i]); - } - } - } else if (msg.type === 1) { - if (msg.res instanceof ArrayBuffer) { - transfer.push(msg.res); - } - } - this._handler.sendMessage(msg, transfer); - } - }; - function propertyIsEvent(name) { - return name[0] === "o" && name[1] === "n" && isUpperAsciiLetter(name.charCodeAt(2)); - } - function propertyIsDynamicEvent(name) { - return /^onDynamic/.test(name) && isUpperAsciiLetter(name.charCodeAt(9)); - } - function createProxyObject2(methodNames, invoke, proxyListen) { - const createProxyMethod = (method) => { - return function() { - const args = Array.prototype.slice.call(arguments, 0); - return invoke(method, args); - }; - }; - const createProxyDynamicEvent = (eventName) => { - return function(arg) { - return proxyListen(eventName, arg); - }; - }; - const result = {}; - for (const methodName of methodNames) { - if (propertyIsDynamicEvent(methodName)) { - result[methodName] = createProxyDynamicEvent(methodName); - continue; - } - if (propertyIsEvent(methodName)) { - result[methodName] = proxyListen(methodName, void 0); - continue; - } - result[methodName] = createProxyMethod(methodName); - } - return result; - } - var SimpleWorkerServer = class { - constructor(postMessage, requestHandlerFactory) { - this._requestHandlerFactory = requestHandlerFactory; - this._requestHandler = null; - this._protocol = new SimpleWorkerProtocol({ - sendMessage: (msg, transfer) => { - postMessage(msg, transfer); - }, - handleMessage: (method, args) => this._handleMessage(method, args), - handleEvent: (eventName, arg) => this._handleEvent(eventName, arg) - }); - } - onmessage(msg) { - this._protocol.handleMessage(msg); - } - _handleMessage(method, args) { - if (method === INITIALIZE) { - return this.initialize(args[0], args[1], args[2], args[3]); - } - if (!this._requestHandler || typeof this._requestHandler[method] !== "function") { - return Promise.reject(new Error("Missing requestHandler or method: " + method)); - } - try { - return Promise.resolve(this._requestHandler[method].apply(this._requestHandler, args)); - } catch (e) { - return Promise.reject(e); - } - } - _handleEvent(eventName, arg) { - if (!this._requestHandler) { - throw new Error(`Missing requestHandler`); - } - if (propertyIsDynamicEvent(eventName)) { - const event = this._requestHandler[eventName].call(this._requestHandler, arg); - if (typeof event !== "function") { - throw new Error(`Missing dynamic event ${eventName} on request handler.`); - } - return event; - } - if (propertyIsEvent(eventName)) { - const event = this._requestHandler[eventName]; - if (typeof event !== "function") { - throw new Error(`Missing event ${eventName} on request handler.`); - } - return event; - } - throw new Error(`Malformed event name ${eventName}`); - } - initialize(workerId, loaderConfig, moduleId, hostMethods) { - this._protocol.setWorkerId(workerId); - const proxyMethodRequest = (method, args) => { - return this._protocol.sendMessage(method, args); - }; - const proxyListen = (eventName, arg) => { - return this._protocol.listen(eventName, arg); - }; - const hostProxy = createProxyObject2(hostMethods, proxyMethodRequest, proxyListen); - if (this._requestHandlerFactory) { - this._requestHandler = this._requestHandlerFactory(hostProxy); - return Promise.resolve(getAllMethodNames(this._requestHandler)); - } - if (loaderConfig) { - if (typeof loaderConfig.baseUrl !== "undefined") { - delete loaderConfig["baseUrl"]; - } - if (typeof loaderConfig.paths !== "undefined") { - if (typeof loaderConfig.paths.vs !== "undefined") { - delete loaderConfig.paths["vs"]; - } - } - if (typeof loaderConfig.trustedTypesPolicy !== "undefined") { - delete loaderConfig["trustedTypesPolicy"]; - } - loaderConfig.catchError = true; - globalThis.require.config(loaderConfig); - } - return new Promise((resolve2, reject) => { - const req = globalThis.require; - req([moduleId], (module) => { - this._requestHandler = module.create(hostProxy); - if (!this._requestHandler) { - reject(new Error(`No RequestHandler!`)); - return; - } - resolve2(getAllMethodNames(this._requestHandler)); - }, reject); - }); - } - }; - - // node_modules/monaco-editor/esm/vs/base/common/diff/diffChange.js - var DiffChange = class { - /** - * Constructs a new DiffChange with the given sequence information - * and content. - */ - constructor(originalStart, originalLength, modifiedStart, modifiedLength) { - this.originalStart = originalStart; - this.originalLength = originalLength; - this.modifiedStart = modifiedStart; - this.modifiedLength = modifiedLength; - } - /** - * The end point (exclusive) of the change in the original sequence. - */ - getOriginalEnd() { - return this.originalStart + this.originalLength; - } - /** - * The end point (exclusive) of the change in the modified sequence. - */ - getModifiedEnd() { - return this.modifiedStart + this.modifiedLength; - } - }; - - // node_modules/monaco-editor/esm/vs/base/common/hash.js - function numberHash(val, initialHashVal) { - return (initialHashVal << 5) - initialHashVal + val | 0; - } - function stringHash(s, hashVal) { - hashVal = numberHash(149417, hashVal); - for (let i = 0, length = s.length; i < length; i++) { - hashVal = numberHash(s.charCodeAt(i), hashVal); - } - return hashVal; - } - function leftRotate(value, bits, totalBits = 32) { - const delta = totalBits - bits; - const mask = ~((1 << delta) - 1); - return (value << bits | (mask & value) >>> delta) >>> 0; - } - function fill(dest, index = 0, count = dest.byteLength, value = 0) { - for (let i = 0; i < count; i++) { - dest[index + i] = value; - } - } - function leftPad(value, length, char = "0") { - while (value.length < length) { - value = char + value; - } - return value; - } - function toHexString(bufferOrValue, bitsize = 32) { - if (bufferOrValue instanceof ArrayBuffer) { - return Array.from(new Uint8Array(bufferOrValue)).map((b) => b.toString(16).padStart(2, "0")).join(""); - } - return leftPad((bufferOrValue >>> 0).toString(16), bitsize / 4); - } - var StringSHA1 = class _StringSHA1 { - constructor() { - this._h0 = 1732584193; - this._h1 = 4023233417; - this._h2 = 2562383102; - this._h3 = 271733878; - this._h4 = 3285377520; - this._buff = new Uint8Array( - 64 + 3 - /* to fit any utf-8 */ - ); - this._buffDV = new DataView(this._buff.buffer); - this._buffLen = 0; - this._totalLen = 0; - this._leftoverHighSurrogate = 0; - this._finished = false; - } - update(str) { - const strLen = str.length; - if (strLen === 0) { - return; - } - const buff = this._buff; - let buffLen = this._buffLen; - let leftoverHighSurrogate = this._leftoverHighSurrogate; - let charCode; - let offset; - if (leftoverHighSurrogate !== 0) { - charCode = leftoverHighSurrogate; - offset = -1; - leftoverHighSurrogate = 0; - } else { - charCode = str.charCodeAt(0); - offset = 0; - } - while (true) { - let codePoint = charCode; - if (isHighSurrogate(charCode)) { - if (offset + 1 < strLen) { - const nextCharCode = str.charCodeAt(offset + 1); - if (isLowSurrogate(nextCharCode)) { - offset++; - codePoint = computeCodePoint(charCode, nextCharCode); - } else { - codePoint = 65533; - } - } else { - leftoverHighSurrogate = charCode; - break; - } - } else if (isLowSurrogate(charCode)) { - codePoint = 65533; - } - buffLen = this._push(buff, buffLen, codePoint); - offset++; - if (offset < strLen) { - charCode = str.charCodeAt(offset); - } else { - break; - } - } - this._buffLen = buffLen; - this._leftoverHighSurrogate = leftoverHighSurrogate; - } - _push(buff, buffLen, codePoint) { - if (codePoint < 128) { - buff[buffLen++] = codePoint; - } else if (codePoint < 2048) { - buff[buffLen++] = 192 | (codePoint & 1984) >>> 6; - buff[buffLen++] = 128 | (codePoint & 63) >>> 0; - } else if (codePoint < 65536) { - buff[buffLen++] = 224 | (codePoint & 61440) >>> 12; - buff[buffLen++] = 128 | (codePoint & 4032) >>> 6; - buff[buffLen++] = 128 | (codePoint & 63) >>> 0; - } else { - buff[buffLen++] = 240 | (codePoint & 1835008) >>> 18; - buff[buffLen++] = 128 | (codePoint & 258048) >>> 12; - buff[buffLen++] = 128 | (codePoint & 4032) >>> 6; - buff[buffLen++] = 128 | (codePoint & 63) >>> 0; - } - if (buffLen >= 64) { - this._step(); - buffLen -= 64; - this._totalLen += 64; - buff[0] = buff[64 + 0]; - buff[1] = buff[64 + 1]; - buff[2] = buff[64 + 2]; - } - return buffLen; - } - digest() { - if (!this._finished) { - this._finished = true; - if (this._leftoverHighSurrogate) { - this._leftoverHighSurrogate = 0; - this._buffLen = this._push( - this._buff, - this._buffLen, - 65533 - /* SHA1Constant.UNICODE_REPLACEMENT */ - ); - } - this._totalLen += this._buffLen; - this._wrapUp(); - } - return toHexString(this._h0) + toHexString(this._h1) + toHexString(this._h2) + toHexString(this._h3) + toHexString(this._h4); - } - _wrapUp() { - this._buff[this._buffLen++] = 128; - fill(this._buff, this._buffLen); - if (this._buffLen > 56) { - this._step(); - fill(this._buff); - } - const ml = 8 * this._totalLen; - this._buffDV.setUint32(56, Math.floor(ml / 4294967296), false); - this._buffDV.setUint32(60, ml % 4294967296, false); - this._step(); - } - _step() { - const bigBlock32 = _StringSHA1._bigBlock32; - const data = this._buffDV; - for (let j = 0; j < 64; j += 4) { - bigBlock32.setUint32(j, data.getUint32(j, false), false); - } - for (let j = 64; j < 320; j += 4) { - bigBlock32.setUint32(j, leftRotate(bigBlock32.getUint32(j - 12, false) ^ bigBlock32.getUint32(j - 32, false) ^ bigBlock32.getUint32(j - 56, false) ^ bigBlock32.getUint32(j - 64, false), 1), false); - } - let a = this._h0; - let b = this._h1; - let c = this._h2; - let d = this._h3; - let e = this._h4; - let f, k; - let temp; - for (let j = 0; j < 80; j++) { - if (j < 20) { - f = b & c | ~b & d; - k = 1518500249; - } else if (j < 40) { - f = b ^ c ^ d; - k = 1859775393; - } else if (j < 60) { - f = b & c | b & d | c & d; - k = 2400959708; - } else { - f = b ^ c ^ d; - k = 3395469782; - } - temp = leftRotate(a, 5) + f + e + k + bigBlock32.getUint32(j * 4, false) & 4294967295; - e = d; - d = c; - c = leftRotate(b, 30); - b = a; - a = temp; - } - this._h0 = this._h0 + a & 4294967295; - this._h1 = this._h1 + b & 4294967295; - this._h2 = this._h2 + c & 4294967295; - this._h3 = this._h3 + d & 4294967295; - this._h4 = this._h4 + e & 4294967295; - } - }; - StringSHA1._bigBlock32 = new DataView(new ArrayBuffer(320)); - - // node_modules/monaco-editor/esm/vs/base/common/diff/diff.js - var StringDiffSequence = class { - constructor(source) { - this.source = source; - } - getElements() { - const source = this.source; - const characters = new Int32Array(source.length); - for (let i = 0, len = source.length; i < len; i++) { - characters[i] = source.charCodeAt(i); - } - return characters; - } - }; - function stringDiff(original, modified, pretty) { - return new LcsDiff(new StringDiffSequence(original), new StringDiffSequence(modified)).ComputeDiff(pretty).changes; - } - var Debug = class { - static Assert(condition, message) { - if (!condition) { - throw new Error(message); - } - } - }; - var MyArray = class { - /** - * Copies a range of elements from an Array starting at the specified source index and pastes - * them to another Array starting at the specified destination index. The length and the indexes - * are specified as 64-bit integers. - * sourceArray: - * The Array that contains the data to copy. - * sourceIndex: - * A 64-bit integer that represents the index in the sourceArray at which copying begins. - * destinationArray: - * The Array that receives the data. - * destinationIndex: - * A 64-bit integer that represents the index in the destinationArray at which storing begins. - * length: - * A 64-bit integer that represents the number of elements to copy. - */ - static Copy(sourceArray, sourceIndex, destinationArray, destinationIndex, length) { - for (let i = 0; i < length; i++) { - destinationArray[destinationIndex + i] = sourceArray[sourceIndex + i]; - } - } - static Copy2(sourceArray, sourceIndex, destinationArray, destinationIndex, length) { - for (let i = 0; i < length; i++) { - destinationArray[destinationIndex + i] = sourceArray[sourceIndex + i]; - } - } - }; - var DiffChangeHelper = class { - /** - * Constructs a new DiffChangeHelper for the given DiffSequences. - */ - constructor() { - this.m_changes = []; - this.m_originalStart = 1073741824; - this.m_modifiedStart = 1073741824; - this.m_originalCount = 0; - this.m_modifiedCount = 0; - } - /** - * Marks the beginning of the next change in the set of differences. - */ - MarkNextChange() { - if (this.m_originalCount > 0 || this.m_modifiedCount > 0) { - this.m_changes.push(new DiffChange(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; - } - /** - * Adds the original element at the given position to the elements - * affected by the current change. The modified index gives context - * to the change position with respect to the original sequence. - * @param originalIndex The index of the original element to add. - * @param modifiedIndex The index of the modified element that provides corresponding position in the modified sequence. - */ - AddOriginalElement(originalIndex, modifiedIndex) { - this.m_originalStart = Math.min(this.m_originalStart, originalIndex); - this.m_modifiedStart = Math.min(this.m_modifiedStart, modifiedIndex); - this.m_originalCount++; - } - /** - * Adds the modified element at the given position to the elements - * affected by the current change. The original index gives context - * to the change position with respect to the modified sequence. - * @param originalIndex The index of the original element that provides corresponding position in the original sequence. - * @param modifiedIndex The index of the modified element to add. - */ - AddModifiedElement(originalIndex, modifiedIndex) { - this.m_originalStart = Math.min(this.m_originalStart, originalIndex); - this.m_modifiedStart = Math.min(this.m_modifiedStart, modifiedIndex); - this.m_modifiedCount++; - } - /** - * Retrieves all of the changes marked by the class. - */ - getChanges() { - if (this.m_originalCount > 0 || this.m_modifiedCount > 0) { - this.MarkNextChange(); - } - return this.m_changes; - } - /** - * Retrieves all of the changes marked by the class in the reverse order - */ - getReverseChanges() { - if (this.m_originalCount > 0 || this.m_modifiedCount > 0) { - this.MarkNextChange(); - } - this.m_changes.reverse(); - return this.m_changes; - } - }; - var LcsDiff = class _LcsDiff { - /** - * Constructs the DiffFinder - */ - constructor(originalSequence, modifiedSequence, continueProcessingPredicate = null) { - this.ContinueProcessingPredicate = continueProcessingPredicate; - this._originalSequence = originalSequence; - this._modifiedSequence = modifiedSequence; - const [originalStringElements, originalElementsOrHash, originalHasStrings] = _LcsDiff._getElements(originalSequence); - const [modifiedStringElements, modifiedElementsOrHash, modifiedHasStrings] = _LcsDiff._getElements(modifiedSequence); - this._hasStrings = originalHasStrings && modifiedHasStrings; - this._originalStringElements = originalStringElements; - this._originalElementsOrHash = originalElementsOrHash; - this._modifiedStringElements = modifiedStringElements; - this._modifiedElementsOrHash = modifiedElementsOrHash; - this.m_forwardHistory = []; - this.m_reverseHistory = []; - } - static _isStringArray(arr) { - return arr.length > 0 && typeof arr[0] === "string"; - } - static _getElements(sequence) { - const elements = sequence.getElements(); - if (_LcsDiff._isStringArray(elements)) { - const hashes = new Int32Array(elements.length); - for (let i = 0, len = elements.length; i < len; i++) { - hashes[i] = stringHash(elements[i], 0); - } - return [elements, hashes, true]; - } - if (elements instanceof Int32Array) { - return [[], elements, false]; - } - return [[], new Int32Array(elements), false]; - } - ElementsAreEqual(originalIndex, newIndex) { - if (this._originalElementsOrHash[originalIndex] !== this._modifiedElementsOrHash[newIndex]) { - return false; - } - return this._hasStrings ? this._originalStringElements[originalIndex] === this._modifiedStringElements[newIndex] : true; - } - ElementsAreStrictEqual(originalIndex, newIndex) { - if (!this.ElementsAreEqual(originalIndex, newIndex)) { - return false; - } - const originalElement = _LcsDiff._getStrictElement(this._originalSequence, originalIndex); - const modifiedElement = _LcsDiff._getStrictElement(this._modifiedSequence, newIndex); - return originalElement === modifiedElement; - } - static _getStrictElement(sequence, index) { - if (typeof sequence.getStrictElement === "function") { - return sequence.getStrictElement(index); - } - return null; - } - OriginalElementsAreEqual(index1, index2) { - if (this._originalElementsOrHash[index1] !== this._originalElementsOrHash[index2]) { - return false; - } - return this._hasStrings ? this._originalStringElements[index1] === this._originalStringElements[index2] : true; - } - ModifiedElementsAreEqual(index1, index2) { - if (this._modifiedElementsOrHash[index1] !== this._modifiedElementsOrHash[index2]) { - return false; - } - return this._hasStrings ? this._modifiedStringElements[index1] === this._modifiedStringElements[index2] : true; - } - ComputeDiff(pretty) { - return this._ComputeDiff(0, this._originalElementsOrHash.length - 1, 0, this._modifiedElementsOrHash.length - 1, pretty); - } - /** - * Computes the differences between the original and modified input - * sequences on the bounded range. - * @returns An array of the differences between the two input sequences. - */ - _ComputeDiff(originalStart, originalEnd, modifiedStart, modifiedEnd, pretty) { - const quitEarlyArr = [false]; - let changes = this.ComputeDiffRecursive(originalStart, originalEnd, modifiedStart, modifiedEnd, quitEarlyArr); - if (pretty) { - changes = this.PrettifyChanges(changes); - } - return { - quitEarly: quitEarlyArr[0], - changes - }; - } - /** - * Private helper method which computes the differences on the bounded range - * recursively. - * @returns An array of the differences between the two input sequences. - */ - ComputeDiffRecursive(originalStart, originalEnd, modifiedStart, modifiedEnd, quitEarlyArr) { - quitEarlyArr[0] = false; - while (originalStart <= originalEnd && modifiedStart <= modifiedEnd && this.ElementsAreEqual(originalStart, modifiedStart)) { - originalStart++; - modifiedStart++; - } - while (originalEnd >= originalStart && modifiedEnd >= modifiedStart && this.ElementsAreEqual(originalEnd, modifiedEnd)) { - originalEnd--; - modifiedEnd--; - } - if (originalStart > originalEnd || modifiedStart > modifiedEnd) { - let changes; - if (modifiedStart <= modifiedEnd) { - Debug.Assert(originalStart === originalEnd + 1, "originalStart should only be one more than originalEnd"); - changes = [ - new DiffChange(originalStart, 0, modifiedStart, modifiedEnd - modifiedStart + 1) - ]; - } else if (originalStart <= originalEnd) { - Debug.Assert(modifiedStart === modifiedEnd + 1, "modifiedStart should only be one more than modifiedEnd"); - changes = [ - new DiffChange(originalStart, originalEnd - originalStart + 1, modifiedStart, 0) - ]; - } else { - Debug.Assert(originalStart === originalEnd + 1, "originalStart should only be one more than originalEnd"); - Debug.Assert(modifiedStart === modifiedEnd + 1, "modifiedStart should only be one more than modifiedEnd"); - changes = []; - } - return changes; - } - const midOriginalArr = [0]; - const midModifiedArr = [0]; - const result = this.ComputeRecursionPoint(originalStart, originalEnd, modifiedStart, modifiedEnd, midOriginalArr, midModifiedArr, quitEarlyArr); - const midOriginal = midOriginalArr[0]; - const midModified = midModifiedArr[0]; - if (result !== null) { - return result; - } else if (!quitEarlyArr[0]) { - const leftChanges = this.ComputeDiffRecursive(originalStart, midOriginal, modifiedStart, midModified, quitEarlyArr); - let rightChanges = []; - if (!quitEarlyArr[0]) { - rightChanges = this.ComputeDiffRecursive(midOriginal + 1, originalEnd, midModified + 1, modifiedEnd, quitEarlyArr); - } else { - rightChanges = [ - new DiffChange(midOriginal + 1, originalEnd - (midOriginal + 1) + 1, midModified + 1, modifiedEnd - (midModified + 1) + 1) - ]; - } - return this.ConcatenateChanges(leftChanges, rightChanges); - } - return [ - new DiffChange(originalStart, originalEnd - originalStart + 1, modifiedStart, modifiedEnd - modifiedStart + 1) - ]; - } - WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr) { - let forwardChanges = null; - let reverseChanges = null; - let changeHelper = new DiffChangeHelper(); - let diagonalMin = diagonalForwardStart; - let diagonalMax = diagonalForwardEnd; - let diagonalRelative = midOriginalArr[0] - midModifiedArr[0] - diagonalForwardOffset; - let lastOriginalIndex = -1073741824; - let historyIndex = this.m_forwardHistory.length - 1; - do { - const diagonal = diagonalRelative + diagonalForwardBase; - if (diagonal === diagonalMin || diagonal < diagonalMax && forwardPoints[diagonal - 1] < forwardPoints[diagonal + 1]) { - originalIndex = forwardPoints[diagonal + 1]; - modifiedIndex = originalIndex - diagonalRelative - diagonalForwardOffset; - if (originalIndex < lastOriginalIndex) { - changeHelper.MarkNextChange(); - } - lastOriginalIndex = originalIndex; - changeHelper.AddModifiedElement(originalIndex + 1, modifiedIndex); - diagonalRelative = diagonal + 1 - diagonalForwardBase; - } else { - originalIndex = forwardPoints[diagonal - 1] + 1; - modifiedIndex = originalIndex - diagonalRelative - diagonalForwardOffset; - if (originalIndex < lastOriginalIndex) { - changeHelper.MarkNextChange(); - } - lastOriginalIndex = originalIndex - 1; - changeHelper.AddOriginalElement(originalIndex, modifiedIndex + 1); - diagonalRelative = diagonal - 1 - diagonalForwardBase; - } - if (historyIndex >= 0) { - forwardPoints = this.m_forwardHistory[historyIndex]; - diagonalForwardBase = forwardPoints[0]; - diagonalMin = 1; - diagonalMax = forwardPoints.length - 1; - } - } while (--historyIndex >= -1); - forwardChanges = changeHelper.getReverseChanges(); - if (quitEarlyArr[0]) { - let originalStartPoint = midOriginalArr[0] + 1; - let modifiedStartPoint = midModifiedArr[0] + 1; - if (forwardChanges !== null && forwardChanges.length > 0) { - const lastForwardChange = forwardChanges[forwardChanges.length - 1]; - originalStartPoint = Math.max(originalStartPoint, lastForwardChange.getOriginalEnd()); - modifiedStartPoint = Math.max(modifiedStartPoint, lastForwardChange.getModifiedEnd()); - } - reverseChanges = [ - new DiffChange(originalStartPoint, originalEnd - originalStartPoint + 1, modifiedStartPoint, modifiedEnd - modifiedStartPoint + 1) - ]; - } else { - changeHelper = new DiffChangeHelper(); - diagonalMin = diagonalReverseStart; - diagonalMax = diagonalReverseEnd; - diagonalRelative = midOriginalArr[0] - midModifiedArr[0] - diagonalReverseOffset; - lastOriginalIndex = 1073741824; - historyIndex = deltaIsEven ? this.m_reverseHistory.length - 1 : this.m_reverseHistory.length - 2; - do { - const diagonal = diagonalRelative + diagonalReverseBase; - if (diagonal === diagonalMin || diagonal < diagonalMax && reversePoints[diagonal - 1] >= reversePoints[diagonal + 1]) { - originalIndex = reversePoints[diagonal + 1] - 1; - modifiedIndex = originalIndex - diagonalRelative - diagonalReverseOffset; - if (originalIndex > lastOriginalIndex) { - changeHelper.MarkNextChange(); - } - lastOriginalIndex = originalIndex + 1; - changeHelper.AddOriginalElement(originalIndex + 1, modifiedIndex + 1); - diagonalRelative = diagonal + 1 - diagonalReverseBase; - } else { - originalIndex = reversePoints[diagonal - 1]; - modifiedIndex = originalIndex - diagonalRelative - diagonalReverseOffset; - if (originalIndex > lastOriginalIndex) { - changeHelper.MarkNextChange(); - } - lastOriginalIndex = originalIndex; - changeHelper.AddModifiedElement(originalIndex + 1, modifiedIndex + 1); - diagonalRelative = diagonal - 1 - diagonalReverseBase; - } - if (historyIndex >= 0) { - reversePoints = this.m_reverseHistory[historyIndex]; - diagonalReverseBase = reversePoints[0]; - diagonalMin = 1; - diagonalMax = reversePoints.length - 1; - } - } while (--historyIndex >= -1); - reverseChanges = changeHelper.getChanges(); - } - return this.ConcatenateChanges(forwardChanges, reverseChanges); - } - /** - * Given the range to compute the diff on, this method finds the point: - * (midOriginal, midModified) - * that exists in the middle of the LCS of the two sequences and - * is the point at which the LCS problem may be broken down recursively. - * This method will try to keep the LCS trace in memory. If the LCS recursion - * point is calculated and the full trace is available in memory, then this method - * will return the change list. - * @param originalStart The start bound of the original sequence range - * @param originalEnd The end bound of the original sequence range - * @param modifiedStart The start bound of the modified sequence range - * @param modifiedEnd The end bound of the modified sequence range - * @param midOriginal The middle point of the original sequence range - * @param midModified The middle point of the modified sequence range - * @returns The diff changes, if available, otherwise null - */ - ComputeRecursionPoint(originalStart, originalEnd, modifiedStart, modifiedEnd, midOriginalArr, midModifiedArr, quitEarlyArr) { - let originalIndex = 0, modifiedIndex = 0; - let diagonalForwardStart = 0, diagonalForwardEnd = 0; - let diagonalReverseStart = 0, diagonalReverseEnd = 0; - originalStart--; - modifiedStart--; - midOriginalArr[0] = 0; - midModifiedArr[0] = 0; - this.m_forwardHistory = []; - this.m_reverseHistory = []; - const maxDifferences = originalEnd - originalStart + (modifiedEnd - modifiedStart); - const numDiagonals = maxDifferences + 1; - const forwardPoints = new Int32Array(numDiagonals); - const reversePoints = new Int32Array(numDiagonals); - const diagonalForwardBase = modifiedEnd - modifiedStart; - const diagonalReverseBase = originalEnd - originalStart; - const diagonalForwardOffset = originalStart - modifiedStart; - const diagonalReverseOffset = originalEnd - modifiedEnd; - const delta = diagonalReverseBase - diagonalForwardBase; - const deltaIsEven = delta % 2 === 0; - forwardPoints[diagonalForwardBase] = originalStart; - reversePoints[diagonalReverseBase] = originalEnd; - quitEarlyArr[0] = false; - for (let numDifferences = 1; numDifferences <= maxDifferences / 2 + 1; numDifferences++) { - let furthestOriginalIndex = 0; - let furthestModifiedIndex = 0; - diagonalForwardStart = this.ClipDiagonalBound(diagonalForwardBase - numDifferences, numDifferences, diagonalForwardBase, numDiagonals); - diagonalForwardEnd = this.ClipDiagonalBound(diagonalForwardBase + numDifferences, numDifferences, diagonalForwardBase, numDiagonals); - for (let diagonal = diagonalForwardStart; diagonal <= diagonalForwardEnd; diagonal += 2) { - if (diagonal === diagonalForwardStart || diagonal < diagonalForwardEnd && forwardPoints[diagonal - 1] < forwardPoints[diagonal + 1]) { - originalIndex = forwardPoints[diagonal + 1]; - } else { - originalIndex = forwardPoints[diagonal - 1] + 1; - } - modifiedIndex = originalIndex - (diagonal - diagonalForwardBase) - diagonalForwardOffset; - const tempOriginalIndex = originalIndex; - while (originalIndex < originalEnd && modifiedIndex < modifiedEnd && this.ElementsAreEqual(originalIndex + 1, modifiedIndex + 1)) { - originalIndex++; - modifiedIndex++; - } - forwardPoints[diagonal] = originalIndex; - if (originalIndex + modifiedIndex > furthestOriginalIndex + furthestModifiedIndex) { - furthestOriginalIndex = originalIndex; - furthestModifiedIndex = modifiedIndex; - } - if (!deltaIsEven && Math.abs(diagonal - diagonalReverseBase) <= numDifferences - 1) { - if (originalIndex >= reversePoints[diagonal]) { - midOriginalArr[0] = originalIndex; - midModifiedArr[0] = modifiedIndex; - if (tempOriginalIndex <= reversePoints[diagonal] && 1447 > 0 && numDifferences <= 1447 + 1) { - return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr); - } else { - return null; - } - } - } - } - const matchLengthOfLongest = (furthestOriginalIndex - originalStart + (furthestModifiedIndex - modifiedStart) - numDifferences) / 2; - if (this.ContinueProcessingPredicate !== null && !this.ContinueProcessingPredicate(furthestOriginalIndex, matchLengthOfLongest)) { - quitEarlyArr[0] = true; - midOriginalArr[0] = furthestOriginalIndex; - midModifiedArr[0] = furthestModifiedIndex; - if (matchLengthOfLongest > 0 && 1447 > 0 && numDifferences <= 1447 + 1) { - return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr); - } else { - originalStart++; - modifiedStart++; - return [ - new DiffChange(originalStart, originalEnd - originalStart + 1, modifiedStart, modifiedEnd - modifiedStart + 1) - ]; - } - } - diagonalReverseStart = this.ClipDiagonalBound(diagonalReverseBase - numDifferences, numDifferences, diagonalReverseBase, numDiagonals); - diagonalReverseEnd = this.ClipDiagonalBound(diagonalReverseBase + numDifferences, numDifferences, diagonalReverseBase, numDiagonals); - for (let diagonal = diagonalReverseStart; diagonal <= diagonalReverseEnd; diagonal += 2) { - if (diagonal === diagonalReverseStart || diagonal < diagonalReverseEnd && reversePoints[diagonal - 1] >= reversePoints[diagonal + 1]) { - originalIndex = reversePoints[diagonal + 1] - 1; - } else { - originalIndex = reversePoints[diagonal - 1]; - } - modifiedIndex = originalIndex - (diagonal - diagonalReverseBase) - diagonalReverseOffset; - const tempOriginalIndex = originalIndex; - while (originalIndex > originalStart && modifiedIndex > modifiedStart && this.ElementsAreEqual(originalIndex, modifiedIndex)) { - originalIndex--; - modifiedIndex--; - } - reversePoints[diagonal] = originalIndex; - if (deltaIsEven && Math.abs(diagonal - diagonalForwardBase) <= numDifferences) { - if (originalIndex <= forwardPoints[diagonal]) { - midOriginalArr[0] = originalIndex; - midModifiedArr[0] = modifiedIndex; - if (tempOriginalIndex >= forwardPoints[diagonal] && 1447 > 0 && numDifferences <= 1447 + 1) { - return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr); - } else { - return null; - } - } - } - } - if (numDifferences <= 1447) { - let temp = new Int32Array(diagonalForwardEnd - diagonalForwardStart + 2); - temp[0] = diagonalForwardBase - diagonalForwardStart + 1; - MyArray.Copy2(forwardPoints, diagonalForwardStart, temp, 1, diagonalForwardEnd - diagonalForwardStart + 1); - this.m_forwardHistory.push(temp); - temp = new Int32Array(diagonalReverseEnd - diagonalReverseStart + 2); - temp[0] = diagonalReverseBase - diagonalReverseStart + 1; - MyArray.Copy2(reversePoints, diagonalReverseStart, temp, 1, diagonalReverseEnd - diagonalReverseStart + 1); - this.m_reverseHistory.push(temp); - } - } - return this.WALKTRACE(diagonalForwardBase, diagonalForwardStart, diagonalForwardEnd, diagonalForwardOffset, diagonalReverseBase, diagonalReverseStart, diagonalReverseEnd, diagonalReverseOffset, forwardPoints, reversePoints, originalIndex, originalEnd, midOriginalArr, modifiedIndex, modifiedEnd, midModifiedArr, deltaIsEven, quitEarlyArr); - } - /** - * Shifts the given changes to provide a more intuitive diff. - * While the first element in a diff matches the first element after the diff, - * we shift the diff down. - * - * @param changes The list of changes to shift - * @returns The shifted changes - */ - PrettifyChanges(changes) { - for (let i = 0; i < changes.length; i++) { - const change = changes[i]; - const originalStop = i < changes.length - 1 ? changes[i + 1].originalStart : this._originalElementsOrHash.length; - const modifiedStop = i < changes.length - 1 ? changes[i + 1].modifiedStart : this._modifiedElementsOrHash.length; - const checkOriginal = change.originalLength > 0; - const checkModified = change.modifiedLength > 0; - while (change.originalStart + change.originalLength < originalStop && change.modifiedStart + change.modifiedLength < modifiedStop && (!checkOriginal || this.OriginalElementsAreEqual(change.originalStart, change.originalStart + change.originalLength)) && (!checkModified || this.ModifiedElementsAreEqual(change.modifiedStart, change.modifiedStart + change.modifiedLength))) { - const startStrictEqual = this.ElementsAreStrictEqual(change.originalStart, change.modifiedStart); - const endStrictEqual = this.ElementsAreStrictEqual(change.originalStart + change.originalLength, change.modifiedStart + change.modifiedLength); - if (endStrictEqual && !startStrictEqual) { - break; - } - change.originalStart++; - change.modifiedStart++; - } - const mergedChangeArr = [null]; - if (i < changes.length - 1 && this.ChangesOverlap(changes[i], changes[i + 1], mergedChangeArr)) { - changes[i] = mergedChangeArr[0]; - changes.splice(i + 1, 1); - i--; - continue; - } - } - for (let i = changes.length - 1; i >= 0; i--) { - const change = changes[i]; - let originalStop = 0; - let modifiedStop = 0; - if (i > 0) { - const prevChange = changes[i - 1]; - originalStop = prevChange.originalStart + prevChange.originalLength; - modifiedStop = prevChange.modifiedStart + prevChange.modifiedLength; - } - const checkOriginal = change.originalLength > 0; - const checkModified = change.modifiedLength > 0; - let bestDelta = 0; - let bestScore = this._boundaryScore(change.originalStart, change.originalLength, change.modifiedStart, change.modifiedLength); - for (let delta = 1; ; delta++) { - const originalStart = change.originalStart - delta; - const modifiedStart = change.modifiedStart - delta; - if (originalStart < originalStop || modifiedStart < modifiedStop) { - break; - } - if (checkOriginal && !this.OriginalElementsAreEqual(originalStart, originalStart + change.originalLength)) { - break; - } - if (checkModified && !this.ModifiedElementsAreEqual(modifiedStart, modifiedStart + change.modifiedLength)) { - break; - } - const touchingPreviousChange = originalStart === originalStop && modifiedStart === modifiedStop; - const score2 = (touchingPreviousChange ? 5 : 0) + this._boundaryScore(originalStart, change.originalLength, modifiedStart, change.modifiedLength); - if (score2 > bestScore) { - bestScore = score2; - bestDelta = delta; - } - } - change.originalStart -= bestDelta; - change.modifiedStart -= bestDelta; - const mergedChangeArr = [null]; - if (i > 0 && this.ChangesOverlap(changes[i - 1], changes[i], mergedChangeArr)) { - changes[i - 1] = mergedChangeArr[0]; - changes.splice(i, 1); - i++; - continue; - } - } - if (this._hasStrings) { - for (let i = 1, len = changes.length; i < len; i++) { - const aChange = changes[i - 1]; - const bChange = changes[i]; - const matchedLength = bChange.originalStart - aChange.originalStart - aChange.originalLength; - const aOriginalStart = aChange.originalStart; - const bOriginalEnd = bChange.originalStart + bChange.originalLength; - const abOriginalLength = bOriginalEnd - aOriginalStart; - const aModifiedStart = aChange.modifiedStart; - const bModifiedEnd = bChange.modifiedStart + bChange.modifiedLength; - const abModifiedLength = bModifiedEnd - aModifiedStart; - if (matchedLength < 5 && abOriginalLength < 20 && abModifiedLength < 20) { - const t = this._findBetterContiguousSequence(aOriginalStart, abOriginalLength, aModifiedStart, abModifiedLength, matchedLength); - if (t) { - const [originalMatchStart, modifiedMatchStart] = t; - if (originalMatchStart !== aChange.originalStart + aChange.originalLength || modifiedMatchStart !== aChange.modifiedStart + aChange.modifiedLength) { - aChange.originalLength = originalMatchStart - aChange.originalStart; - aChange.modifiedLength = modifiedMatchStart - aChange.modifiedStart; - bChange.originalStart = originalMatchStart + matchedLength; - bChange.modifiedStart = modifiedMatchStart + matchedLength; - bChange.originalLength = bOriginalEnd - bChange.originalStart; - bChange.modifiedLength = bModifiedEnd - bChange.modifiedStart; - } - } - } - } - } - return changes; - } - _findBetterContiguousSequence(originalStart, originalLength, modifiedStart, modifiedLength, desiredLength) { - if (originalLength < desiredLength || modifiedLength < desiredLength) { - return null; - } - const originalMax = originalStart + originalLength - desiredLength + 1; - const modifiedMax = modifiedStart + modifiedLength - desiredLength + 1; - let bestScore = 0; - let bestOriginalStart = 0; - let bestModifiedStart = 0; - for (let i = originalStart; i < originalMax; i++) { - for (let j = modifiedStart; j < modifiedMax; j++) { - const score2 = this._contiguousSequenceScore(i, j, desiredLength); - if (score2 > 0 && score2 > bestScore) { - bestScore = score2; - bestOriginalStart = i; - bestModifiedStart = j; - } - } - } - if (bestScore > 0) { - return [bestOriginalStart, bestModifiedStart]; - } - return null; - } - _contiguousSequenceScore(originalStart, modifiedStart, length) { - let score2 = 0; - for (let l = 0; l < length; l++) { - if (!this.ElementsAreEqual(originalStart + l, modifiedStart + l)) { - return 0; - } - score2 += this._originalStringElements[originalStart + l].length; - } - return score2; - } - _OriginalIsBoundary(index) { - if (index <= 0 || index >= this._originalElementsOrHash.length - 1) { - return true; - } - return this._hasStrings && /^\s*$/.test(this._originalStringElements[index]); - } - _OriginalRegionIsBoundary(originalStart, originalLength) { - if (this._OriginalIsBoundary(originalStart) || this._OriginalIsBoundary(originalStart - 1)) { - return true; - } - if (originalLength > 0) { - const originalEnd = originalStart + originalLength; - if (this._OriginalIsBoundary(originalEnd - 1) || this._OriginalIsBoundary(originalEnd)) { - return true; - } - } - return false; - } - _ModifiedIsBoundary(index) { - if (index <= 0 || index >= this._modifiedElementsOrHash.length - 1) { - return true; - } - return this._hasStrings && /^\s*$/.test(this._modifiedStringElements[index]); - } - _ModifiedRegionIsBoundary(modifiedStart, modifiedLength) { - if (this._ModifiedIsBoundary(modifiedStart) || this._ModifiedIsBoundary(modifiedStart - 1)) { - return true; - } - if (modifiedLength > 0) { - const modifiedEnd = modifiedStart + modifiedLength; - if (this._ModifiedIsBoundary(modifiedEnd - 1) || this._ModifiedIsBoundary(modifiedEnd)) { - return true; - } - } - return false; - } - _boundaryScore(originalStart, originalLength, modifiedStart, modifiedLength) { - const originalScore = this._OriginalRegionIsBoundary(originalStart, originalLength) ? 1 : 0; - const modifiedScore = this._ModifiedRegionIsBoundary(modifiedStart, modifiedLength) ? 1 : 0; - return originalScore + modifiedScore; - } - /** - * Concatenates the two input DiffChange lists and returns the resulting - * list. - * @param The left changes - * @param The right changes - * @returns The concatenated list - */ - ConcatenateChanges(left, right) { - const mergedChangeArr = []; - if (left.length === 0 || right.length === 0) { - return right.length > 0 ? right : left; - } else if (this.ChangesOverlap(left[left.length - 1], right[0], mergedChangeArr)) { - const result = new Array(left.length + right.length - 1); - MyArray.Copy(left, 0, result, 0, left.length - 1); - result[left.length - 1] = mergedChangeArr[0]; - MyArray.Copy(right, 1, result, left.length, right.length - 1); - return result; - } else { - const result = new Array(left.length + right.length); - MyArray.Copy(left, 0, result, 0, left.length); - MyArray.Copy(right, 0, result, left.length, right.length); - return result; - } - } - /** - * Returns true if the two changes overlap and can be merged into a single - * change - * @param left The left change - * @param right The right change - * @param mergedChange The merged change if the two overlap, null otherwise - * @returns True if the two changes overlap - */ - ChangesOverlap(left, right, mergedChangeArr) { - Debug.Assert(left.originalStart <= right.originalStart, "Left change is not less than or equal to right change"); - Debug.Assert(left.modifiedStart <= right.modifiedStart, "Left change is not less than or equal to right change"); - if (left.originalStart + left.originalLength >= right.originalStart || left.modifiedStart + left.modifiedLength >= right.modifiedStart) { - const originalStart = left.originalStart; - let originalLength = left.originalLength; - const modifiedStart = left.modifiedStart; - let modifiedLength = left.modifiedLength; - if (left.originalStart + left.originalLength >= right.originalStart) { - originalLength = right.originalStart + right.originalLength - left.originalStart; - } - if (left.modifiedStart + left.modifiedLength >= right.modifiedStart) { - modifiedLength = right.modifiedStart + right.modifiedLength - left.modifiedStart; - } - mergedChangeArr[0] = new DiffChange(originalStart, originalLength, modifiedStart, modifiedLength); - return true; - } else { - mergedChangeArr[0] = null; - return false; - } - } - /** - * Helper method used to clip a diagonal index to the range of valid - * diagonals. This also decides whether or not the diagonal index, - * if it exceeds the boundary, should be clipped to the boundary or clipped - * one inside the boundary depending on the Even/Odd status of the boundary - * and numDifferences. - * @param diagonal The index of the diagonal to clip. - * @param numDifferences The current number of differences being iterated upon. - * @param diagonalBaseIndex The base reference diagonal. - * @param numDiagonals The total number of diagonals. - * @returns The clipped diagonal index. - */ - ClipDiagonalBound(diagonal, numDifferences, diagonalBaseIndex, numDiagonals) { - if (diagonal >= 0 && diagonal < numDiagonals) { - return diagonal; - } - const diagonalsBelow = diagonalBaseIndex; - const diagonalsAbove = numDiagonals - diagonalBaseIndex - 1; - const diffEven = numDifferences % 2 === 0; - if (diagonal < 0) { - const lowerBoundEven = diagonalsBelow % 2 === 0; - return diffEven === lowerBoundEven ? 0 : 1; - } else { - const upperBoundEven = diagonalsAbove % 2 === 0; - return diffEven === upperBoundEven ? numDiagonals - 1 : numDiagonals - 2; - } - } - }; - - // node_modules/monaco-editor/esm/vs/base/common/process.js - var safeProcess; - var vscodeGlobal = globalThis.vscode; - if (typeof vscodeGlobal !== "undefined" && typeof vscodeGlobal.process !== "undefined") { - const sandboxProcess = vscodeGlobal.process; - safeProcess = { - get platform() { - return sandboxProcess.platform; - }, - get arch() { - return sandboxProcess.arch; - }, - get env() { - return sandboxProcess.env; - }, - cwd() { - return sandboxProcess.cwd(); - } - }; - } else if (typeof process !== "undefined") { - safeProcess = { - get platform() { - return process.platform; - }, - get arch() { - return process.arch; - }, - get env() { - return process.env; - }, - cwd() { - return process.env["VSCODE_CWD"] || process.cwd(); - } - }; - } else { - safeProcess = { - // Supported - get platform() { - return isWindows ? "win32" : isMacintosh ? "darwin" : "linux"; - }, - get arch() { - return void 0; - }, - // Unsupported - get env() { - return {}; - }, - cwd() { - return "/"; - } - }; - } - var cwd = safeProcess.cwd; - var env = safeProcess.env; - var platform = safeProcess.platform; - - // node_modules/monaco-editor/esm/vs/base/common/path.js - var CHAR_UPPERCASE_A = 65; - var CHAR_LOWERCASE_A = 97; - var CHAR_UPPERCASE_Z = 90; - var CHAR_LOWERCASE_Z = 122; - var CHAR_DOT = 46; - var CHAR_FORWARD_SLASH = 47; - var CHAR_BACKWARD_SLASH = 92; - var CHAR_COLON = 58; - var CHAR_QUESTION_MARK = 63; - var ErrorInvalidArgType = class extends Error { - constructor(name, expected, actual) { - let determiner; - if (typeof expected === "string" && expected.indexOf("not ") === 0) { - determiner = "must not be"; - expected = expected.replace(/^not /, ""); - } else { - determiner = "must be"; - } - const type = name.indexOf(".") !== -1 ? "property" : "argument"; - let msg = `The "${name}" ${type} ${determiner} of type ${expected}`; - msg += `. Received type ${typeof actual}`; - super(msg); - this.code = "ERR_INVALID_ARG_TYPE"; - } - }; - function validateObject(pathObject, name) { - if (pathObject === null || typeof pathObject !== "object") { - throw new ErrorInvalidArgType(name, "Object", pathObject); - } - } - function validateString(value, name) { - if (typeof value !== "string") { - throw new ErrorInvalidArgType(name, "string", value); - } - } - var platformIsWin32 = platform === "win32"; - function isPathSeparator(code) { - return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; - } - function isPosixPathSeparator(code) { - return code === CHAR_FORWARD_SLASH; - } - function isWindowsDeviceRoot(code) { - return code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z || code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z; - } - function normalizeString(path, allowAboveRoot, separator, isPathSeparator2) { - let res = ""; - let lastSegmentLength = 0; - let lastSlash = -1; - let dots = 0; - let code = 0; - for (let i = 0; i <= path.length; ++i) { - if (i < path.length) { - code = path.charCodeAt(i); - } else if (isPathSeparator2(code)) { - break; - } else { - code = CHAR_FORWARD_SLASH; - } - if (isPathSeparator2(code)) { - if (lastSlash === i - 1 || dots === 1) { - } else if (dots === 2) { - if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== CHAR_DOT || res.charCodeAt(res.length - 2) !== CHAR_DOT) { - if (res.length > 2) { - const lastSlashIndex = res.lastIndexOf(separator); - if (lastSlashIndex === -1) { - res = ""; - lastSegmentLength = 0; - } else { - res = res.slice(0, lastSlashIndex); - lastSegmentLength = res.length - 1 - res.lastIndexOf(separator); - } - lastSlash = i; - dots = 0; - continue; - } else if (res.length !== 0) { - res = ""; - lastSegmentLength = 0; - lastSlash = i; - dots = 0; - continue; - } - } - if (allowAboveRoot) { - res += res.length > 0 ? `${separator}..` : ".."; - lastSegmentLength = 2; - } - } else { - if (res.length > 0) { - res += `${separator}${path.slice(lastSlash + 1, i)}`; - } else { - res = path.slice(lastSlash + 1, i); - } - lastSegmentLength = i - lastSlash - 1; - } - lastSlash = i; - dots = 0; - } else if (code === CHAR_DOT && dots !== -1) { - ++dots; - } else { - dots = -1; - } - } - return res; - } - function _format2(sep2, pathObject) { - validateObject(pathObject, "pathObject"); - const dir = pathObject.dir || pathObject.root; - const base = pathObject.base || `${pathObject.name || ""}${pathObject.ext || ""}`; - if (!dir) { - return base; - } - return dir === pathObject.root ? `${dir}${base}` : `${dir}${sep2}${base}`; - } - var win32 = { - // path.resolve([from ...], to) - resolve(...pathSegments) { - let resolvedDevice = ""; - let resolvedTail = ""; - let resolvedAbsolute = false; - for (let i = pathSegments.length - 1; i >= -1; i--) { - let path; - if (i >= 0) { - path = pathSegments[i]; - validateString(path, "path"); - if (path.length === 0) { - continue; - } - } else if (resolvedDevice.length === 0) { - path = cwd(); - } else { - path = env[`=${resolvedDevice}`] || cwd(); - if (path === void 0 || path.slice(0, 2).toLowerCase() !== resolvedDevice.toLowerCase() && path.charCodeAt(2) === CHAR_BACKWARD_SLASH) { - path = `${resolvedDevice}\\`; - } - } - const len = path.length; - let rootEnd = 0; - let device = ""; - let isAbsolute = false; - const code = path.charCodeAt(0); - if (len === 1) { - if (isPathSeparator(code)) { - rootEnd = 1; - isAbsolute = true; - } - } else if (isPathSeparator(code)) { - isAbsolute = true; - if (isPathSeparator(path.charCodeAt(1))) { - let j = 2; - let last = j; - while (j < len && !isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j < len && j !== last) { - const firstPart = path.slice(last, j); - last = j; - while (j < len && isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j < len && j !== last) { - last = j; - while (j < len && !isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j === len || j !== last) { - device = `\\\\${firstPart}\\${path.slice(last, j)}`; - rootEnd = j; - } - } - } - } else { - rootEnd = 1; - } - } else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) { - device = path.slice(0, 2); - rootEnd = 2; - if (len > 2 && isPathSeparator(path.charCodeAt(2))) { - isAbsolute = true; - rootEnd = 3; - } - } - if (device.length > 0) { - if (resolvedDevice.length > 0) { - if (device.toLowerCase() !== resolvedDevice.toLowerCase()) { - continue; - } - } else { - resolvedDevice = device; - } - } - if (resolvedAbsolute) { - if (resolvedDevice.length > 0) { - break; - } - } else { - resolvedTail = `${path.slice(rootEnd)}\\${resolvedTail}`; - resolvedAbsolute = isAbsolute; - if (isAbsolute && resolvedDevice.length > 0) { - break; - } - } - } - resolvedTail = normalizeString(resolvedTail, !resolvedAbsolute, "\\", isPathSeparator); - return resolvedAbsolute ? `${resolvedDevice}\\${resolvedTail}` : `${resolvedDevice}${resolvedTail}` || "."; - }, - normalize(path) { - validateString(path, "path"); - const len = path.length; - if (len === 0) { - return "."; - } - let rootEnd = 0; - let device; - let isAbsolute = false; - const code = path.charCodeAt(0); - if (len === 1) { - return isPosixPathSeparator(code) ? "\\" : path; - } - if (isPathSeparator(code)) { - isAbsolute = true; - if (isPathSeparator(path.charCodeAt(1))) { - let j = 2; - let last = j; - while (j < len && !isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j < len && j !== last) { - const firstPart = path.slice(last, j); - last = j; - while (j < len && isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j < len && j !== last) { - last = j; - while (j < len && !isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j === len) { - return `\\\\${firstPart}\\${path.slice(last)}\\`; - } - if (j !== last) { - device = `\\\\${firstPart}\\${path.slice(last, j)}`; - rootEnd = j; - } - } - } - } else { - rootEnd = 1; - } - } else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) { - device = path.slice(0, 2); - rootEnd = 2; - if (len > 2 && isPathSeparator(path.charCodeAt(2))) { - isAbsolute = true; - rootEnd = 3; - } - } - let tail = rootEnd < len ? normalizeString(path.slice(rootEnd), !isAbsolute, "\\", isPathSeparator) : ""; - if (tail.length === 0 && !isAbsolute) { - tail = "."; - } - if (tail.length > 0 && isPathSeparator(path.charCodeAt(len - 1))) { - tail += "\\"; - } - if (device === void 0) { - return isAbsolute ? `\\${tail}` : tail; - } - return isAbsolute ? `${device}\\${tail}` : `${device}${tail}`; - }, - isAbsolute(path) { - validateString(path, "path"); - const len = path.length; - if (len === 0) { - return false; - } - const code = path.charCodeAt(0); - return isPathSeparator(code) || // Possible device root - len > 2 && isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON && isPathSeparator(path.charCodeAt(2)); - }, - join(...paths) { - if (paths.length === 0) { - return "."; - } - let joined; - let firstPart; - for (let i = 0; i < paths.length; ++i) { - const arg = paths[i]; - validateString(arg, "path"); - if (arg.length > 0) { - if (joined === void 0) { - joined = firstPart = arg; - } else { - joined += `\\${arg}`; - } - } - } - if (joined === void 0) { - return "."; - } - let needsReplace = true; - let slashCount = 0; - if (typeof firstPart === "string" && isPathSeparator(firstPart.charCodeAt(0))) { - ++slashCount; - const firstLen = firstPart.length; - if (firstLen > 1 && isPathSeparator(firstPart.charCodeAt(1))) { - ++slashCount; - if (firstLen > 2) { - if (isPathSeparator(firstPart.charCodeAt(2))) { - ++slashCount; - } else { - needsReplace = false; - } - } - } - } - if (needsReplace) { - while (slashCount < joined.length && isPathSeparator(joined.charCodeAt(slashCount))) { - slashCount++; - } - if (slashCount >= 2) { - joined = `\\${joined.slice(slashCount)}`; - } - } - return win32.normalize(joined); - }, - // It will solve the relative path from `from` to `to`, for instance: - // from = 'C:\\orandea\\test\\aaa' - // to = 'C:\\orandea\\impl\\bbb' - // The output of the function should be: '..\\..\\impl\\bbb' - relative(from, to) { - validateString(from, "from"); - validateString(to, "to"); - if (from === to) { - return ""; - } - const fromOrig = win32.resolve(from); - const toOrig = win32.resolve(to); - if (fromOrig === toOrig) { - return ""; - } - from = fromOrig.toLowerCase(); - to = toOrig.toLowerCase(); - if (from === to) { - return ""; - } - let fromStart = 0; - while (fromStart < from.length && from.charCodeAt(fromStart) === CHAR_BACKWARD_SLASH) { - fromStart++; - } - let fromEnd = from.length; - while (fromEnd - 1 > fromStart && from.charCodeAt(fromEnd - 1) === CHAR_BACKWARD_SLASH) { - fromEnd--; - } - const fromLen = fromEnd - fromStart; - let toStart = 0; - while (toStart < to.length && to.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) { - toStart++; - } - let toEnd = to.length; - while (toEnd - 1 > toStart && to.charCodeAt(toEnd - 1) === CHAR_BACKWARD_SLASH) { - toEnd--; - } - const toLen = toEnd - toStart; - const length = fromLen < toLen ? fromLen : toLen; - let lastCommonSep = -1; - let i = 0; - for (; i < length; i++) { - const fromCode = from.charCodeAt(fromStart + i); - if (fromCode !== to.charCodeAt(toStart + i)) { - break; - } else if (fromCode === CHAR_BACKWARD_SLASH) { - lastCommonSep = i; - } - } - if (i !== length) { - if (lastCommonSep === -1) { - return toOrig; - } - } else { - if (toLen > length) { - if (to.charCodeAt(toStart + i) === CHAR_BACKWARD_SLASH) { - return toOrig.slice(toStart + i + 1); - } - if (i === 2) { - return toOrig.slice(toStart + i); - } - } - if (fromLen > length) { - if (from.charCodeAt(fromStart + i) === CHAR_BACKWARD_SLASH) { - lastCommonSep = i; - } else if (i === 2) { - lastCommonSep = 3; - } - } - if (lastCommonSep === -1) { - lastCommonSep = 0; - } - } - let out = ""; - for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) { - if (i === fromEnd || from.charCodeAt(i) === CHAR_BACKWARD_SLASH) { - out += out.length === 0 ? ".." : "\\.."; - } - } - toStart += lastCommonSep; - if (out.length > 0) { - return `${out}${toOrig.slice(toStart, toEnd)}`; - } - if (toOrig.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) { - ++toStart; - } - return toOrig.slice(toStart, toEnd); - }, - toNamespacedPath(path) { - if (typeof path !== "string" || path.length === 0) { - return path; - } - const resolvedPath = win32.resolve(path); - if (resolvedPath.length <= 2) { - return path; - } - if (resolvedPath.charCodeAt(0) === CHAR_BACKWARD_SLASH) { - if (resolvedPath.charCodeAt(1) === CHAR_BACKWARD_SLASH) { - const code = resolvedPath.charCodeAt(2); - if (code !== CHAR_QUESTION_MARK && code !== CHAR_DOT) { - return `\\\\?\\UNC\\${resolvedPath.slice(2)}`; - } - } - } else if (isWindowsDeviceRoot(resolvedPath.charCodeAt(0)) && resolvedPath.charCodeAt(1) === CHAR_COLON && resolvedPath.charCodeAt(2) === CHAR_BACKWARD_SLASH) { - return `\\\\?\\${resolvedPath}`; - } - return path; - }, - dirname(path) { - validateString(path, "path"); - const len = path.length; - if (len === 0) { - return "."; - } - let rootEnd = -1; - let offset = 0; - const code = path.charCodeAt(0); - if (len === 1) { - return isPathSeparator(code) ? path : "."; - } - if (isPathSeparator(code)) { - rootEnd = offset = 1; - if (isPathSeparator(path.charCodeAt(1))) { - let j = 2; - let last = j; - while (j < len && !isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j < len && j !== last) { - last = j; - while (j < len && isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j < len && j !== last) { - last = j; - while (j < len && !isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j === len) { - return path; - } - if (j !== last) { - rootEnd = offset = j + 1; - } - } - } - } - } else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) { - rootEnd = len > 2 && isPathSeparator(path.charCodeAt(2)) ? 3 : 2; - offset = rootEnd; - } - let end = -1; - let matchedSlash = true; - for (let i = len - 1; i >= offset; --i) { - if (isPathSeparator(path.charCodeAt(i))) { - if (!matchedSlash) { - end = i; - break; - } - } else { - matchedSlash = false; - } - } - if (end === -1) { - if (rootEnd === -1) { - return "."; - } - end = rootEnd; - } - return path.slice(0, end); - }, - basename(path, ext) { - if (ext !== void 0) { - validateString(ext, "ext"); - } - validateString(path, "path"); - let start = 0; - let end = -1; - let matchedSlash = true; - let i; - if (path.length >= 2 && isWindowsDeviceRoot(path.charCodeAt(0)) && path.charCodeAt(1) === CHAR_COLON) { - start = 2; - } - if (ext !== void 0 && ext.length > 0 && ext.length <= path.length) { - if (ext === path) { - return ""; - } - let extIdx = ext.length - 1; - let firstNonSlashEnd = -1; - for (i = path.length - 1; i >= start; --i) { - const code = path.charCodeAt(i); - if (isPathSeparator(code)) { - if (!matchedSlash) { - start = i + 1; - break; - } - } else { - if (firstNonSlashEnd === -1) { - matchedSlash = false; - firstNonSlashEnd = i + 1; - } - if (extIdx >= 0) { - if (code === ext.charCodeAt(extIdx)) { - if (--extIdx === -1) { - end = i; - } - } else { - extIdx = -1; - end = firstNonSlashEnd; - } - } - } - } - if (start === end) { - end = firstNonSlashEnd; - } else if (end === -1) { - end = path.length; - } - return path.slice(start, end); - } - for (i = path.length - 1; i >= start; --i) { - if (isPathSeparator(path.charCodeAt(i))) { - if (!matchedSlash) { - start = i + 1; - break; - } - } else if (end === -1) { - matchedSlash = false; - end = i + 1; - } - } - if (end === -1) { - return ""; - } - return path.slice(start, end); - }, - extname(path) { - validateString(path, "path"); - let start = 0; - let startDot = -1; - let startPart = 0; - let end = -1; - let matchedSlash = true; - let preDotState = 0; - if (path.length >= 2 && path.charCodeAt(1) === CHAR_COLON && isWindowsDeviceRoot(path.charCodeAt(0))) { - start = startPart = 2; - } - for (let i = path.length - 1; i >= start; --i) { - const code = path.charCodeAt(i); - if (isPathSeparator(code)) { - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - matchedSlash = false; - end = i + 1; - } - if (code === CHAR_DOT) { - if (startDot === -1) { - startDot = i; - } else if (preDotState !== 1) { - preDotState = 1; - } - } else if (startDot !== -1) { - preDotState = -1; - } - } - if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot - preDotState === 0 || // The (right-most) trimmed path component is exactly '..' - preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { - return ""; - } - return path.slice(startDot, end); - }, - format: _format2.bind(null, "\\"), - parse(path) { - validateString(path, "path"); - const ret = { root: "", dir: "", base: "", ext: "", name: "" }; - if (path.length === 0) { - return ret; - } - const len = path.length; - let rootEnd = 0; - let code = path.charCodeAt(0); - if (len === 1) { - if (isPathSeparator(code)) { - ret.root = ret.dir = path; - return ret; - } - ret.base = ret.name = path; - return ret; - } - if (isPathSeparator(code)) { - rootEnd = 1; - if (isPathSeparator(path.charCodeAt(1))) { - let j = 2; - let last = j; - while (j < len && !isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j < len && j !== last) { - last = j; - while (j < len && isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j < len && j !== last) { - last = j; - while (j < len && !isPathSeparator(path.charCodeAt(j))) { - j++; - } - if (j === len) { - rootEnd = j; - } else if (j !== last) { - rootEnd = j + 1; - } - } - } - } - } else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) { - if (len <= 2) { - ret.root = ret.dir = path; - return ret; - } - rootEnd = 2; - if (isPathSeparator(path.charCodeAt(2))) { - if (len === 3) { - ret.root = ret.dir = path; - return ret; - } - rootEnd = 3; - } - } - if (rootEnd > 0) { - ret.root = path.slice(0, rootEnd); - } - let startDot = -1; - let startPart = rootEnd; - let end = -1; - let matchedSlash = true; - let i = path.length - 1; - let preDotState = 0; - for (; i >= rootEnd; --i) { - code = path.charCodeAt(i); - if (isPathSeparator(code)) { - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - matchedSlash = false; - end = i + 1; - } - if (code === CHAR_DOT) { - if (startDot === -1) { - startDot = i; - } else if (preDotState !== 1) { - preDotState = 1; - } - } else if (startDot !== -1) { - preDotState = -1; - } - } - if (end !== -1) { - if (startDot === -1 || // We saw a non-dot character immediately before the dot - preDotState === 0 || // The (right-most) trimmed path component is exactly '..' - preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { - ret.base = ret.name = path.slice(startPart, end); - } else { - ret.name = path.slice(startPart, startDot); - ret.base = path.slice(startPart, end); - ret.ext = path.slice(startDot, end); - } - } - if (startPart > 0 && startPart !== rootEnd) { - ret.dir = path.slice(0, startPart - 1); - } else { - ret.dir = ret.root; - } - return ret; - }, - sep: "\\", - delimiter: ";", - win32: null, - posix: null - }; - var posixCwd = (() => { - if (platformIsWin32) { - const regexp = /\\/g; - return () => { - const cwd2 = cwd().replace(regexp, "/"); - return cwd2.slice(cwd2.indexOf("/")); - }; - } - return () => cwd(); - })(); - var posix = { - // path.resolve([from ...], to) - resolve(...pathSegments) { - let resolvedPath = ""; - let resolvedAbsolute = false; - for (let i = pathSegments.length - 1; i >= -1 && !resolvedAbsolute; i--) { - const path = i >= 0 ? pathSegments[i] : posixCwd(); - validateString(path, "path"); - if (path.length === 0) { - continue; - } - resolvedPath = `${path}/${resolvedPath}`; - resolvedAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH; - } - resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute, "/", isPosixPathSeparator); - if (resolvedAbsolute) { - return `/${resolvedPath}`; - } - return resolvedPath.length > 0 ? resolvedPath : "."; - }, - normalize(path) { - validateString(path, "path"); - if (path.length === 0) { - return "."; - } - const isAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH; - const trailingSeparator = path.charCodeAt(path.length - 1) === CHAR_FORWARD_SLASH; - path = normalizeString(path, !isAbsolute, "/", isPosixPathSeparator); - if (path.length === 0) { - if (isAbsolute) { - return "/"; - } - return trailingSeparator ? "./" : "."; - } - if (trailingSeparator) { - path += "/"; - } - return isAbsolute ? `/${path}` : path; - }, - isAbsolute(path) { - validateString(path, "path"); - return path.length > 0 && path.charCodeAt(0) === CHAR_FORWARD_SLASH; - }, - join(...paths) { - if (paths.length === 0) { - return "."; - } - let joined; - for (let i = 0; i < paths.length; ++i) { - const arg = paths[i]; - validateString(arg, "path"); - if (arg.length > 0) { - if (joined === void 0) { - joined = arg; - } else { - joined += `/${arg}`; - } - } - } - if (joined === void 0) { - return "."; - } - return posix.normalize(joined); - }, - relative(from, to) { - validateString(from, "from"); - validateString(to, "to"); - if (from === to) { - return ""; - } - from = posix.resolve(from); - to = posix.resolve(to); - if (from === to) { - return ""; - } - const fromStart = 1; - const fromEnd = from.length; - const fromLen = fromEnd - fromStart; - const toStart = 1; - const toLen = to.length - toStart; - const length = fromLen < toLen ? fromLen : toLen; - let lastCommonSep = -1; - let i = 0; - for (; i < length; i++) { - const fromCode = from.charCodeAt(fromStart + i); - if (fromCode !== to.charCodeAt(toStart + i)) { - break; - } else if (fromCode === CHAR_FORWARD_SLASH) { - lastCommonSep = i; - } - } - if (i === length) { - if (toLen > length) { - if (to.charCodeAt(toStart + i) === CHAR_FORWARD_SLASH) { - return to.slice(toStart + i + 1); - } - if (i === 0) { - return to.slice(toStart + i); - } - } else if (fromLen > length) { - if (from.charCodeAt(fromStart + i) === CHAR_FORWARD_SLASH) { - lastCommonSep = i; - } else if (i === 0) { - lastCommonSep = 0; - } - } - } - let out = ""; - for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) { - if (i === fromEnd || from.charCodeAt(i) === CHAR_FORWARD_SLASH) { - out += out.length === 0 ? ".." : "/.."; - } - } - return `${out}${to.slice(toStart + lastCommonSep)}`; - }, - toNamespacedPath(path) { - return path; - }, - dirname(path) { - validateString(path, "path"); - if (path.length === 0) { - return "."; - } - const hasRoot = path.charCodeAt(0) === CHAR_FORWARD_SLASH; - let end = -1; - let matchedSlash = true; - for (let i = path.length - 1; i >= 1; --i) { - if (path.charCodeAt(i) === CHAR_FORWARD_SLASH) { - if (!matchedSlash) { - end = i; - break; - } - } else { - matchedSlash = false; - } - } - if (end === -1) { - return hasRoot ? "/" : "."; - } - if (hasRoot && end === 1) { - return "//"; - } - return path.slice(0, end); - }, - basename(path, ext) { - if (ext !== void 0) { - validateString(ext, "ext"); - } - validateString(path, "path"); - let start = 0; - let end = -1; - let matchedSlash = true; - let i; - if (ext !== void 0 && ext.length > 0 && ext.length <= path.length) { - if (ext === path) { - return ""; - } - let extIdx = ext.length - 1; - let firstNonSlashEnd = -1; - for (i = path.length - 1; i >= 0; --i) { - const code = path.charCodeAt(i); - if (code === CHAR_FORWARD_SLASH) { - if (!matchedSlash) { - start = i + 1; - break; - } - } else { - if (firstNonSlashEnd === -1) { - matchedSlash = false; - firstNonSlashEnd = i + 1; - } - if (extIdx >= 0) { - if (code === ext.charCodeAt(extIdx)) { - if (--extIdx === -1) { - end = i; - } - } else { - extIdx = -1; - end = firstNonSlashEnd; - } - } - } - } - if (start === end) { - end = firstNonSlashEnd; - } else if (end === -1) { - end = path.length; - } - return path.slice(start, end); - } - for (i = path.length - 1; i >= 0; --i) { - if (path.charCodeAt(i) === CHAR_FORWARD_SLASH) { - if (!matchedSlash) { - start = i + 1; - break; - } - } else if (end === -1) { - matchedSlash = false; - end = i + 1; - } - } - if (end === -1) { - return ""; - } - return path.slice(start, end); - }, - extname(path) { - validateString(path, "path"); - let startDot = -1; - let startPart = 0; - let end = -1; - let matchedSlash = true; - let preDotState = 0; - for (let i = path.length - 1; i >= 0; --i) { - const code = path.charCodeAt(i); - if (code === CHAR_FORWARD_SLASH) { - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - matchedSlash = false; - end = i + 1; - } - if (code === CHAR_DOT) { - if (startDot === -1) { - startDot = i; - } else if (preDotState !== 1) { - preDotState = 1; - } - } else if (startDot !== -1) { - preDotState = -1; - } - } - if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot - preDotState === 0 || // The (right-most) trimmed path component is exactly '..' - preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { - return ""; - } - return path.slice(startDot, end); - }, - format: _format2.bind(null, "/"), - parse(path) { - validateString(path, "path"); - const ret = { root: "", dir: "", base: "", ext: "", name: "" }; - if (path.length === 0) { - return ret; - } - const isAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH; - let start; - if (isAbsolute) { - ret.root = "/"; - start = 1; - } else { - start = 0; - } - let startDot = -1; - let startPart = 0; - let end = -1; - let matchedSlash = true; - let i = path.length - 1; - let preDotState = 0; - for (; i >= start; --i) { - const code = path.charCodeAt(i); - if (code === CHAR_FORWARD_SLASH) { - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - matchedSlash = false; - end = i + 1; - } - if (code === CHAR_DOT) { - if (startDot === -1) { - startDot = i; - } else if (preDotState !== 1) { - preDotState = 1; - } - } else if (startDot !== -1) { - preDotState = -1; - } - } - if (end !== -1) { - const start2 = startPart === 0 && isAbsolute ? 1 : startPart; - if (startDot === -1 || // We saw a non-dot character immediately before the dot - preDotState === 0 || // The (right-most) trimmed path component is exactly '..' - preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { - ret.base = ret.name = path.slice(start2, end); - } else { - ret.name = path.slice(start2, startDot); - ret.base = path.slice(start2, end); - ret.ext = path.slice(startDot, end); - } - } - if (startPart > 0) { - ret.dir = path.slice(0, startPart - 1); - } else if (isAbsolute) { - ret.dir = "/"; - } - return ret; - }, - sep: "/", - delimiter: ":", - win32: null, - posix: null - }; - posix.win32 = win32.win32 = win32; - posix.posix = win32.posix = posix; - var normalize = platformIsWin32 ? win32.normalize : posix.normalize; - var resolve = platformIsWin32 ? win32.resolve : posix.resolve; - var relative = platformIsWin32 ? win32.relative : posix.relative; - var dirname = platformIsWin32 ? win32.dirname : posix.dirname; - var basename = platformIsWin32 ? win32.basename : posix.basename; - var extname = platformIsWin32 ? win32.extname : posix.extname; - var sep = platformIsWin32 ? win32.sep : posix.sep; - - // node_modules/monaco-editor/esm/vs/base/common/uri.js - var _schemePattern = /^\w[\w\d+.-]*$/; - var _singleSlashStart = /^\//; - var _doubleSlashStart = /^\/\//; - function _validateUri(ret, _strict) { - if (!ret.scheme && _strict) { - throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${ret.authority}", path: "${ret.path}", query: "${ret.query}", fragment: "${ret.fragment}"}`); - } - if (ret.scheme && !_schemePattern.test(ret.scheme)) { - throw new Error("[UriError]: Scheme contains illegal characters."); - } - if (ret.path) { - if (ret.authority) { - if (!_singleSlashStart.test(ret.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 (_doubleSlashStart.test(ret.path)) { - throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")'); - } - } - } - } - function _schemeFix(scheme, _strict) { - if (!scheme && !_strict) { - return "file"; - } - return scheme; - } - function _referenceResolution(scheme, path) { - switch (scheme) { - case "https": - case "http": - case "file": - if (!path) { - path = _slash; - } else if (path[0] !== _slash) { - path = _slash + path; - } - break; - } - return path; - } - var _empty = ""; - var _slash = "/"; - var _regexp = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/; - var URI = class _URI { - static isUri(thing) { - if (thing instanceof _URI) { - return true; - } - if (!thing) { - return false; - } - return typeof thing.authority === "string" && typeof thing.fragment === "string" && typeof thing.path === "string" && typeof thing.query === "string" && typeof thing.scheme === "string" && typeof thing.fsPath === "string" && typeof thing.with === "function" && typeof thing.toString === "function"; - } - /** - * @internal - */ - constructor(schemeOrData, authority, path, query, fragment, _strict = false) { - if (typeof schemeOrData === "object") { - this.scheme = schemeOrData.scheme || _empty; - this.authority = schemeOrData.authority || _empty; - this.path = schemeOrData.path || _empty; - this.query = schemeOrData.query || _empty; - this.fragment = schemeOrData.fragment || _empty; - } else { - this.scheme = _schemeFix(schemeOrData, _strict); - this.authority = authority || _empty; - this.path = _referenceResolution(this.scheme, path || _empty); - this.query = query || _empty; - this.fragment = fragment || _empty; - _validateUri(this, _strict); - } - } - // ---- filesystem path ----------------------- - /** - * Returns a string representing the corresponding file system path of this URI. - * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the - * platform specific path separator. - * - * * Will *not* validate the path for invalid characters and semantics. - * * Will *not* look at the scheme of this URI. - * * The result shall *not* be used for display purposes but for accessing a file on disk. - * - * - * The *difference* to `URI#path` is the use of the platform specific separator and the handling - * of UNC paths. See the below sample of a file-uri with an authority (UNC path). - * - * ```ts - const u = URI.parse('file://server/c$/folder/file.txt') - u.authority === 'server' - u.path === '/shares/c$/file.txt' - u.fsPath === '\\server\c$\folder\file.txt' - ``` - * - * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path, - * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working - * with URIs that represent files on disk (`file` scheme). - */ - get fsPath() { - return uriToFsPath(this, false); - } - // ---- modify to new ------------------------- - with(change) { - if (!change) { - return this; - } - let { scheme, authority, path, query, fragment } = change; - if (scheme === void 0) { - scheme = this.scheme; - } else if (scheme === null) { - scheme = _empty; - } - if (authority === void 0) { - authority = this.authority; - } else if (authority === null) { - authority = _empty; - } - if (path === void 0) { - path = this.path; - } else if (path === null) { - path = _empty; - } - if (query === void 0) { - query = this.query; - } else if (query === null) { - query = _empty; - } - if (fragment === void 0) { - fragment = this.fragment; - } else if (fragment === null) { - fragment = _empty; - } - if (scheme === this.scheme && authority === this.authority && path === this.path && query === this.query && fragment === this.fragment) { - return this; - } - return new Uri(scheme, authority, path, query, fragment); - } - // ---- parse & validate ------------------------ - /** - * Creates a new URI from a string, e.g. `http://www.example.com/some/path`, - * `file:///usr/home`, or `scheme:with/path`. - * - * @param value A string which represents an URI (see `URI#toString`). - */ - static parse(value, _strict = false) { - const match = _regexp.exec(value); - if (!match) { - return new Uri(_empty, _empty, _empty, _empty, _empty); - } - return new Uri(match[2] || _empty, percentDecode(match[4] || _empty), percentDecode(match[5] || _empty), percentDecode(match[7] || _empty), percentDecode(match[9] || _empty), _strict); - } - /** - * Creates a new URI from a file system path, e.g. `c:\my\files`, - * `/usr/home`, or `\\server\share\some\path`. - * - * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument - * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as** - * `URI.parse('file://' + path)` because the path might contain characters that are - * interpreted (# and ?). See the following sample: - * ```ts - const good = URI.file('/coding/c#/project1'); - good.scheme === 'file'; - good.path === '/coding/c#/project1'; - good.fragment === ''; - const bad = URI.parse('file://' + '/coding/c#/project1'); - bad.scheme === 'file'; - bad.path === '/coding/c'; // path is now broken - bad.fragment === '/project1'; - ``` - * - * @param path A file system path (see `URI#fsPath`) - */ - static file(path) { - let authority = _empty; - if (isWindows) { - path = path.replace(/\\/g, _slash); - } - if (path[0] === _slash && path[1] === _slash) { - const idx = path.indexOf(_slash, 2); - if (idx === -1) { - authority = path.substring(2); - path = _slash; - } else { - authority = path.substring(2, idx); - path = path.substring(idx) || _slash; - } - } - return new Uri("file", authority, path, _empty, _empty); - } - /** - * Creates new URI from uri components. - * - * Unless `strict` is `true` the scheme is defaults to be `file`. This function performs - * validation and should be used for untrusted uri components retrieved from storage, - * user input, command arguments etc - */ - static from(components, strict) { - const result = new Uri(components.scheme, components.authority, components.path, components.query, components.fragment, strict); - return result; - } - /** - * Join a URI path with path fragments and normalizes the resulting path. - * - * @param uri The input URI. - * @param pathFragment The path fragment to add to the URI path. - * @returns The resulting URI. - */ - static joinPath(uri, ...pathFragment) { - if (!uri.path) { - throw new Error(`[UriError]: cannot call joinPath on URI without path`); - } - let newPath; - if (isWindows && uri.scheme === "file") { - newPath = _URI.file(win32.join(uriToFsPath(uri, true), ...pathFragment)).path; - } else { - newPath = posix.join(uri.path, ...pathFragment); - } - return uri.with({ path: newPath }); - } - // ---- printing/externalize --------------------------- - /** - * Creates a string representation for this URI. It's guaranteed that calling - * `URI.parse` with the result of this function creates an URI which is equal - * to this URI. - * - * * The result shall *not* be used for display purposes but for externalization or transport. - * * The result will be encoded using the percentage encoding and encoding happens mostly - * ignore the scheme-specific encoding rules. - * - * @param skipEncoding Do not encode the result, default is `false` - */ - toString(skipEncoding = false) { - return _asFormatted(this, skipEncoding); - } - toJSON() { - return this; - } - static revive(data) { - var _a4, _b2; - if (!data) { - return data; - } else if (data instanceof _URI) { - return data; - } else { - const result = new Uri(data); - result._formatted = (_a4 = data.external) !== null && _a4 !== void 0 ? _a4 : null; - result._fsPath = data._sep === _pathSepMarker ? (_b2 = data.fsPath) !== null && _b2 !== void 0 ? _b2 : null : null; - return result; - } - } - }; - var _pathSepMarker = isWindows ? 1 : void 0; - var Uri = class extends URI { - constructor() { - super(...arguments); - this._formatted = null; - this._fsPath = null; - } - get fsPath() { - if (!this._fsPath) { - this._fsPath = uriToFsPath(this, false); - } - return this._fsPath; - } - toString(skipEncoding = false) { - if (!skipEncoding) { - if (!this._formatted) { - this._formatted = _asFormatted(this, false); - } - return this._formatted; - } else { - return _asFormatted(this, true); - } - } - toJSON() { - const res = { - $mid: 1 - /* MarshalledId.Uri */ - }; - if (this._fsPath) { - res.fsPath = this._fsPath; - res._sep = _pathSepMarker; - } - if (this._formatted) { - res.external = this._formatted; - } - if (this.path) { - res.path = this.path; - } - if (this.scheme) { - res.scheme = this.scheme; - } - if (this.authority) { - res.authority = this.authority; - } - if (this.query) { - res.query = this.query; - } - if (this.fragment) { - res.fragment = this.fragment; - } - return res; - } - }; - var encodeTable = { - [ - 58 - /* CharCode.Colon */ - ]: "%3A", - // gen-delims - [ - 47 - /* CharCode.Slash */ - ]: "%2F", - [ - 63 - /* CharCode.QuestionMark */ - ]: "%3F", - [ - 35 - /* CharCode.Hash */ - ]: "%23", - [ - 91 - /* CharCode.OpenSquareBracket */ - ]: "%5B", - [ - 93 - /* CharCode.CloseSquareBracket */ - ]: "%5D", - [ - 64 - /* CharCode.AtSign */ - ]: "%40", - [ - 33 - /* CharCode.ExclamationMark */ - ]: "%21", - // sub-delims - [ - 36 - /* CharCode.DollarSign */ - ]: "%24", - [ - 38 - /* CharCode.Ampersand */ - ]: "%26", - [ - 39 - /* CharCode.SingleQuote */ - ]: "%27", - [ - 40 - /* CharCode.OpenParen */ - ]: "%28", - [ - 41 - /* CharCode.CloseParen */ - ]: "%29", - [ - 42 - /* CharCode.Asterisk */ - ]: "%2A", - [ - 43 - /* CharCode.Plus */ - ]: "%2B", - [ - 44 - /* CharCode.Comma */ - ]: "%2C", - [ - 59 - /* CharCode.Semicolon */ - ]: "%3B", - [ - 61 - /* CharCode.Equals */ - ]: "%3D", - [ - 32 - /* CharCode.Space */ - ]: "%20" - }; - function encodeURIComponentFast(uriComponent, isPath, isAuthority) { - let res = void 0; - let nativeEncodePos = -1; - for (let pos = 0; pos < uriComponent.length; pos++) { - const code = uriComponent.charCodeAt(pos); - if (code >= 97 && code <= 122 || code >= 65 && code <= 90 || code >= 48 && code <= 57 || code === 45 || code === 46 || code === 95 || code === 126 || isPath && code === 47 || isAuthority && code === 91 || isAuthority && code === 93 || isAuthority && code === 58) { - if (nativeEncodePos !== -1) { - res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos)); - nativeEncodePos = -1; - } - if (res !== void 0) { - res += uriComponent.charAt(pos); - } - } else { - if (res === void 0) { - res = uriComponent.substr(0, pos); - } - const escaped = encodeTable[code]; - if (escaped !== void 0) { - if (nativeEncodePos !== -1) { - res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos)); - nativeEncodePos = -1; - } - res += escaped; - } else if (nativeEncodePos === -1) { - nativeEncodePos = pos; - } - } - } - if (nativeEncodePos !== -1) { - res += encodeURIComponent(uriComponent.substring(nativeEncodePos)); - } - return res !== void 0 ? res : uriComponent; - } - function encodeURIComponentMinimal(path) { - let res = void 0; - for (let pos = 0; pos < path.length; pos++) { - const code = path.charCodeAt(pos); - if (code === 35 || code === 63) { - if (res === void 0) { - res = path.substr(0, pos); - } - res += encodeTable[code]; - } else { - if (res !== void 0) { - res += path[pos]; - } - } - } - return res !== void 0 ? res : path; - } - function uriToFsPath(uri, keepDriveLetterCasing) { - let value; - if (uri.authority && uri.path.length > 1 && uri.scheme === "file") { - value = `//${uri.authority}${uri.path}`; - } else if (uri.path.charCodeAt(0) === 47 && (uri.path.charCodeAt(1) >= 65 && uri.path.charCodeAt(1) <= 90 || uri.path.charCodeAt(1) >= 97 && uri.path.charCodeAt(1) <= 122) && uri.path.charCodeAt(2) === 58) { - if (!keepDriveLetterCasing) { - value = uri.path[1].toLowerCase() + uri.path.substr(2); - } else { - value = uri.path.substr(1); - } - } else { - value = uri.path; - } - if (isWindows) { - value = value.replace(/\//g, "\\"); - } - return value; - } - function _asFormatted(uri, skipEncoding) { - const encoder = !skipEncoding ? encodeURIComponentFast : encodeURIComponentMinimal; - let res = ""; - let { scheme, authority, path, query, fragment } = uri; - if (scheme) { - res += scheme; - res += ":"; - } - if (authority || scheme === "file") { - res += _slash; - res += _slash; - } - if (authority) { - let idx = authority.indexOf("@"); - if (idx !== -1) { - const userinfo = authority.substr(0, idx); - authority = authority.substr(idx + 1); - idx = userinfo.lastIndexOf(":"); - if (idx === -1) { - res += encoder(userinfo, false, false); - } else { - res += encoder(userinfo.substr(0, idx), false, false); - res += ":"; - res += encoder(userinfo.substr(idx + 1), false, true); - } - res += "@"; - } - authority = authority.toLowerCase(); - idx = authority.lastIndexOf(":"); - if (idx === -1) { - res += encoder(authority, false, true); - } else { - res += encoder(authority.substr(0, idx), false, true); - res += authority.substr(idx); - } - } - if (path) { - if (path.length >= 3 && path.charCodeAt(0) === 47 && path.charCodeAt(2) === 58) { - const code = path.charCodeAt(1); - if (code >= 65 && code <= 90) { - path = `/${String.fromCharCode(code + 32)}:${path.substr(3)}`; - } - } else if (path.length >= 2 && path.charCodeAt(1) === 58) { - const code = path.charCodeAt(0); - if (code >= 65 && code <= 90) { - path = `${String.fromCharCode(code + 32)}:${path.substr(2)}`; - } - } - res += encoder(path, true, false); - } - if (query) { - res += "?"; - res += encoder(query, false, false); - } - if (fragment) { - res += "#"; - res += !skipEncoding ? encodeURIComponentFast(fragment, false, false) : fragment; - } - return res; - } - function decodeURIComponentGraceful(str) { - try { - return decodeURIComponent(str); - } catch (_a4) { - if (str.length > 3) { - return str.substr(0, 3) + decodeURIComponentGraceful(str.substr(3)); - } else { - return str; - } - } - } - var _rEncodedAsHex = /(%[0-9A-Za-z][0-9A-Za-z])+/g; - function percentDecode(str) { - if (!str.match(_rEncodedAsHex)) { - return str; - } - return str.replace(_rEncodedAsHex, (match) => decodeURIComponentGraceful(match)); - } - - // node_modules/monaco-editor/esm/vs/editor/common/core/position.js - var Position = class _Position { - constructor(lineNumber, column) { - this.lineNumber = lineNumber; - this.column = column; - } - /** - * Create a new position from this position. - * - * @param newLineNumber new line number - * @param newColumn new column - */ - with(newLineNumber = this.lineNumber, newColumn = this.column) { - if (newLineNumber === this.lineNumber && newColumn === this.column) { - return this; - } else { - return new _Position(newLineNumber, newColumn); - } - } - /** - * Derive a new position from this position. - * - * @param deltaLineNumber line number delta - * @param deltaColumn column delta - */ - delta(deltaLineNumber = 0, deltaColumn = 0) { - return this.with(this.lineNumber + deltaLineNumber, this.column + deltaColumn); - } - /** - * Test if this position equals other position - */ - equals(other) { - return _Position.equals(this, other); - } - /** - * Test if position `a` equals position `b` - */ - static equals(a, b) { - if (!a && !b) { - return true; - } - return !!a && !!b && a.lineNumber === b.lineNumber && a.column === b.column; - } - /** - * Test if this position is before other position. - * If the two positions are equal, the result will be false. - */ - isBefore(other) { - return _Position.isBefore(this, other); - } - /** - * Test if position `a` is before position `b`. - * If the two positions are equal, the result will be false. - */ - static isBefore(a, b) { - if (a.lineNumber < b.lineNumber) { - return true; - } - if (b.lineNumber < a.lineNumber) { - return false; - } - return a.column < b.column; - } - /** - * Test if this position is before other position. - * If the two positions are equal, the result will be true. - */ - isBeforeOrEqual(other) { - return _Position.isBeforeOrEqual(this, other); - } - /** - * Test if position `a` is before position `b`. - * If the two positions are equal, the result will be true. - */ - static isBeforeOrEqual(a, b) { - if (a.lineNumber < b.lineNumber) { - return true; - } - if (b.lineNumber < a.lineNumber) { - return false; - } - return a.column <= b.column; - } - /** - * A function that compares positions, useful for sorting - */ - static compare(a, b) { - const aLineNumber = a.lineNumber | 0; - const bLineNumber = b.lineNumber | 0; - if (aLineNumber === bLineNumber) { - const aColumn = a.column | 0; - const bColumn = b.column | 0; - return aColumn - bColumn; - } - return aLineNumber - bLineNumber; - } - /** - * Clone this position. - */ - clone() { - return new _Position(this.lineNumber, this.column); - } - /** - * Convert to a human-readable representation. - */ - toString() { - return "(" + this.lineNumber + "," + this.column + ")"; - } - // --- - /** - * Create a `Position` from an `IPosition`. - */ - static lift(pos) { - return new _Position(pos.lineNumber, pos.column); - } - /** - * Test if `obj` is an `IPosition`. - */ - static isIPosition(obj) { - return obj && typeof obj.lineNumber === "number" && typeof obj.column === "number"; - } - toJSON() { - return { - lineNumber: this.lineNumber, - column: this.column - }; - } - }; - - // node_modules/monaco-editor/esm/vs/editor/common/core/range.js - var Range = class _Range { - constructor(startLineNumber, startColumn, endLineNumber, endColumn) { - if (startLineNumber > endLineNumber || startLineNumber === endLineNumber && startColumn > endColumn) { - this.startLineNumber = endLineNumber; - this.startColumn = endColumn; - this.endLineNumber = startLineNumber; - this.endColumn = startColumn; - } else { - this.startLineNumber = startLineNumber; - this.startColumn = startColumn; - this.endLineNumber = endLineNumber; - this.endColumn = endColumn; - } - } - /** - * Test if this range is empty. - */ - isEmpty() { - return _Range.isEmpty(this); - } - /** - * Test if `range` is empty. - */ - static isEmpty(range) { - return range.startLineNumber === range.endLineNumber && range.startColumn === range.endColumn; - } - /** - * Test if position is in this range. If the position is at the edges, will return true. - */ - containsPosition(position) { - return _Range.containsPosition(this, position); - } - /** - * Test if `position` is in `range`. If the position is at the edges, will return true. - */ - static containsPosition(range, position) { - if (position.lineNumber < range.startLineNumber || position.lineNumber > range.endLineNumber) { - return false; - } - if (position.lineNumber === range.startLineNumber && position.column < range.startColumn) { - return false; - } - if (position.lineNumber === range.endLineNumber && position.column > range.endColumn) { - return false; - } - return true; - } - /** - * Test if `position` is in `range`. If the position is at the edges, will return false. - * @internal - */ - static strictContainsPosition(range, position) { - if (position.lineNumber < range.startLineNumber || position.lineNumber > range.endLineNumber) { - return false; - } - if (position.lineNumber === range.startLineNumber && position.column <= range.startColumn) { - return false; - } - if (position.lineNumber === range.endLineNumber && position.column >= range.endColumn) { - return false; - } - return true; - } - /** - * Test if range is in this range. If the range is equal to this range, will return true. - */ - containsRange(range) { - return _Range.containsRange(this, range); - } - /** - * Test if `otherRange` is in `range`. If the ranges are equal, will return true. - */ - static containsRange(range, otherRange) { - if (otherRange.startLineNumber < range.startLineNumber || otherRange.endLineNumber < range.startLineNumber) { - return false; - } - if (otherRange.startLineNumber > range.endLineNumber || otherRange.endLineNumber > range.endLineNumber) { - return false; - } - if (otherRange.startLineNumber === range.startLineNumber && otherRange.startColumn < range.startColumn) { - return false; - } - if (otherRange.endLineNumber === range.endLineNumber && otherRange.endColumn > range.endColumn) { - return false; - } - return true; - } - /** - * Test if `range` is strictly in this range. `range` must start after and end before this range for the result to be true. - */ - strictContainsRange(range) { - return _Range.strictContainsRange(this, range); - } - /** - * Test if `otherRange` is strictly in `range` (must start after, and end before). If the ranges are equal, will return false. - */ - static strictContainsRange(range, otherRange) { - if (otherRange.startLineNumber < range.startLineNumber || otherRange.endLineNumber < range.startLineNumber) { - return false; - } - if (otherRange.startLineNumber > range.endLineNumber || otherRange.endLineNumber > range.endLineNumber) { - return false; - } - if (otherRange.startLineNumber === range.startLineNumber && otherRange.startColumn <= range.startColumn) { - return false; - } - if (otherRange.endLineNumber === range.endLineNumber && otherRange.endColumn >= range.endColumn) { - return false; - } - return true; - } - /** - * A reunion of the two ranges. - * The smallest position will be used as the start point, and the largest one as the end point. - */ - plusRange(range) { - return _Range.plusRange(this, range); - } - /** - * A reunion of the two ranges. - * The smallest position will be used as the start point, and the largest one as the end point. - */ - static plusRange(a, b) { - let startLineNumber; - let startColumn; - let endLineNumber; - let endColumn; - if (b.startLineNumber < a.startLineNumber) { - startLineNumber = b.startLineNumber; - startColumn = b.startColumn; - } else if (b.startLineNumber === a.startLineNumber) { - startLineNumber = b.startLineNumber; - startColumn = Math.min(b.startColumn, a.startColumn); - } else { - startLineNumber = a.startLineNumber; - startColumn = a.startColumn; - } - if (b.endLineNumber > a.endLineNumber) { - endLineNumber = b.endLineNumber; - endColumn = b.endColumn; - } else if (b.endLineNumber === a.endLineNumber) { - endLineNumber = b.endLineNumber; - endColumn = Math.max(b.endColumn, a.endColumn); - } else { - endLineNumber = a.endLineNumber; - endColumn = a.endColumn; - } - return new _Range(startLineNumber, startColumn, endLineNumber, endColumn); - } - /** - * A intersection of the two ranges. - */ - intersectRanges(range) { - return _Range.intersectRanges(this, range); - } - /** - * A intersection of the two ranges. - */ - static intersectRanges(a, b) { - let resultStartLineNumber = a.startLineNumber; - let resultStartColumn = a.startColumn; - let resultEndLineNumber = a.endLineNumber; - let resultEndColumn = a.endColumn; - const otherStartLineNumber = b.startLineNumber; - const otherStartColumn = b.startColumn; - const otherEndLineNumber = b.endLineNumber; - const otherEndColumn = b.endColumn; - if (resultStartLineNumber < otherStartLineNumber) { - resultStartLineNumber = otherStartLineNumber; - resultStartColumn = otherStartColumn; - } else if (resultStartLineNumber === otherStartLineNumber) { - resultStartColumn = Math.max(resultStartColumn, otherStartColumn); - } - if (resultEndLineNumber > otherEndLineNumber) { - resultEndLineNumber = otherEndLineNumber; - resultEndColumn = otherEndColumn; - } else if (resultEndLineNumber === otherEndLineNumber) { - resultEndColumn = Math.min(resultEndColumn, otherEndColumn); - } - if (resultStartLineNumber > resultEndLineNumber) { - return null; - } - if (resultStartLineNumber === resultEndLineNumber && resultStartColumn > resultEndColumn) { - return null; - } - return new _Range(resultStartLineNumber, resultStartColumn, resultEndLineNumber, resultEndColumn); - } - /** - * Test if this range equals other. - */ - equalsRange(other) { - return _Range.equalsRange(this, other); - } - /** - * Test if range `a` equals `b`. - */ - static equalsRange(a, b) { - if (!a && !b) { - return true; - } - return !!a && !!b && a.startLineNumber === b.startLineNumber && a.startColumn === b.startColumn && a.endLineNumber === b.endLineNumber && a.endColumn === b.endColumn; - } - /** - * Return the end position (which will be after or equal to the start position) - */ - getEndPosition() { - return _Range.getEndPosition(this); - } - /** - * Return the end position (which will be after or equal to the start position) - */ - static getEndPosition(range) { - return new Position(range.endLineNumber, range.endColumn); - } - /** - * Return the start position (which will be before or equal to the end position) - */ - getStartPosition() { - return _Range.getStartPosition(this); - } - /** - * Return the start position (which will be before or equal to the end position) - */ - static getStartPosition(range) { - return new Position(range.startLineNumber, range.startColumn); - } - /** - * Transform to a user presentable string representation. - */ - toString() { - return "[" + this.startLineNumber + "," + this.startColumn + " -> " + this.endLineNumber + "," + this.endColumn + "]"; - } - /** - * Create a new range using this range's start position, and using endLineNumber and endColumn as the end position. - */ - setEndPosition(endLineNumber, endColumn) { - return new _Range(this.startLineNumber, this.startColumn, endLineNumber, endColumn); - } - /** - * Create a new range using this range's end position, and using startLineNumber and startColumn as the start position. - */ - setStartPosition(startLineNumber, startColumn) { - return new _Range(startLineNumber, startColumn, this.endLineNumber, this.endColumn); - } - /** - * Create a new empty range using this range's start position. - */ - collapseToStart() { - return _Range.collapseToStart(this); - } - /** - * Create a new empty range using this range's start position. - */ - static collapseToStart(range) { - return new _Range(range.startLineNumber, range.startColumn, range.startLineNumber, range.startColumn); - } - /** - * Create a new empty range using this range's end position. - */ - collapseToEnd() { - return _Range.collapseToEnd(this); - } - /** - * Create a new empty range using this range's end position. - */ - static collapseToEnd(range) { - return new _Range(range.endLineNumber, range.endColumn, range.endLineNumber, range.endColumn); - } - /** - * Moves the range by the given amount of lines. - */ - delta(lineCount) { - return new _Range(this.startLineNumber + lineCount, this.startColumn, this.endLineNumber + lineCount, this.endColumn); - } - // --- - static fromPositions(start, end = start) { - return new _Range(start.lineNumber, start.column, end.lineNumber, end.column); - } - static lift(range) { - if (!range) { - return null; - } - return new _Range(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn); - } - /** - * Test if `obj` is an `IRange`. - */ - static isIRange(obj) { - return obj && typeof obj.startLineNumber === "number" && typeof obj.startColumn === "number" && typeof obj.endLineNumber === "number" && typeof obj.endColumn === "number"; - } - /** - * Test if the two ranges are touching in any way. - */ - static areIntersectingOrTouching(a, b) { - if (a.endLineNumber < b.startLineNumber || a.endLineNumber === b.startLineNumber && a.endColumn < b.startColumn) { - return false; - } - if (b.endLineNumber < a.startLineNumber || b.endLineNumber === a.startLineNumber && b.endColumn < a.startColumn) { - return false; - } - return true; - } - /** - * Test if the two ranges are intersecting. If the ranges are touching it returns true. - */ - static areIntersecting(a, b) { - if (a.endLineNumber < b.startLineNumber || a.endLineNumber === b.startLineNumber && a.endColumn <= b.startColumn) { - return false; - } - if (b.endLineNumber < a.startLineNumber || b.endLineNumber === a.startLineNumber && b.endColumn <= a.startColumn) { - return false; - } - return true; - } - /** - * A function that compares ranges, useful for sorting ranges - * It will first compare ranges on the startPosition and then on the endPosition - */ - static compareRangesUsingStarts(a, b) { - if (a && b) { - const aStartLineNumber = a.startLineNumber | 0; - const bStartLineNumber = b.startLineNumber | 0; - if (aStartLineNumber === bStartLineNumber) { - const aStartColumn = a.startColumn | 0; - const bStartColumn = b.startColumn | 0; - if (aStartColumn === bStartColumn) { - const aEndLineNumber = a.endLineNumber | 0; - const bEndLineNumber = b.endLineNumber | 0; - if (aEndLineNumber === bEndLineNumber) { - const aEndColumn = a.endColumn | 0; - const bEndColumn = b.endColumn | 0; - return aEndColumn - bEndColumn; - } - return aEndLineNumber - bEndLineNumber; - } - return aStartColumn - bStartColumn; - } - return aStartLineNumber - bStartLineNumber; - } - const aExists = a ? 1 : 0; - const bExists = b ? 1 : 0; - return aExists - bExists; - } - /** - * A function that compares ranges, useful for sorting ranges - * It will first compare ranges on the endPosition and then on the startPosition - */ - static compareRangesUsingEnds(a, b) { - if (a.endLineNumber === b.endLineNumber) { - if (a.endColumn === b.endColumn) { - if (a.startLineNumber === b.startLineNumber) { - return a.startColumn - b.startColumn; - } - return a.startLineNumber - b.startLineNumber; - } - return a.endColumn - b.endColumn; - } - return a.endLineNumber - b.endLineNumber; - } - /** - * Test if the range spans multiple lines. - */ - static spansMultipleLines(range) { - return range.endLineNumber > range.startLineNumber; - } - toJSON() { - return this; - } - }; - - // node_modules/monaco-editor/esm/vs/base/common/arrays.js - function equals(one, other, itemEquals = (a, b) => a === b) { - if (one === other) { - return true; - } - if (!one || !other) { - return false; - } - if (one.length !== other.length) { - return false; - } - for (let i = 0, len = one.length; i < len; i++) { - if (!itemEquals(one[i], other[i])) { - return false; - } - } - return true; - } - function* groupAdjacentBy(items, shouldBeGrouped) { - let currentGroup; - let last; - for (const item of items) { - if (last !== void 0 && shouldBeGrouped(last, item)) { - currentGroup.push(item); - } else { - if (currentGroup) { - yield currentGroup; - } - currentGroup = [item]; - } - last = item; - } - if (currentGroup) { - yield currentGroup; - } - } - function forEachAdjacent(arr, f) { - for (let i = 0; i <= arr.length; i++) { - f(i === 0 ? void 0 : arr[i - 1], i === arr.length ? void 0 : arr[i]); - } - } - function forEachWithNeighbors(arr, f) { - for (let i = 0; i < arr.length; i++) { - f(i === 0 ? void 0 : arr[i - 1], arr[i], i + 1 === arr.length ? void 0 : arr[i + 1]); - } - } - function pushMany(arr, items) { - for (const item of items) { - arr.push(item); - } - } - var CompareResult; - (function(CompareResult2) { - function isLessThan(result) { - return result < 0; - } - CompareResult2.isLessThan = isLessThan; - function isLessThanOrEqual(result) { - return result <= 0; - } - CompareResult2.isLessThanOrEqual = isLessThanOrEqual; - function isGreaterThan(result) { - return result > 0; - } - CompareResult2.isGreaterThan = isGreaterThan; - function isNeitherLessOrGreaterThan(result) { - return result === 0; - } - CompareResult2.isNeitherLessOrGreaterThan = isNeitherLessOrGreaterThan; - CompareResult2.greaterThan = 1; - CompareResult2.lessThan = -1; - CompareResult2.neitherLessOrGreaterThan = 0; - })(CompareResult || (CompareResult = {})); - function compareBy(selector, comparator) { - return (a, b) => comparator(selector(a), selector(b)); - } - var numberComparator = (a, b) => a - b; - function reverseOrder(comparator) { - return (a, b) => -comparator(a, b); - } - var CallbackIterable = class _CallbackIterable { - constructor(iterate) { - this.iterate = iterate; - } - toArray() { - const result = []; - this.iterate((item) => { - result.push(item); - return true; - }); - return result; - } - filter(predicate) { - return new _CallbackIterable((cb) => this.iterate((item) => predicate(item) ? cb(item) : true)); - } - map(mapFn) { - return new _CallbackIterable((cb) => this.iterate((item) => cb(mapFn(item)))); - } - findLast(predicate) { - let result; - this.iterate((item) => { - if (predicate(item)) { - result = item; - } - return true; - }); - return result; - } - findLastMaxBy(comparator) { - let result; - let first = true; - this.iterate((item) => { - if (first || CompareResult.isGreaterThan(comparator(item, result))) { - first = false; - result = item; - } - return true; - }); - return result; - } - }; - CallbackIterable.empty = new CallbackIterable((_callback) => { - }); - - // node_modules/monaco-editor/esm/vs/base/common/uint.js - function toUint8(v) { - if (v < 0) { - return 0; - } - if (v > 255) { - return 255; - } - return v | 0; - } - function toUint32(v) { - if (v < 0) { - return 0; - } - if (v > 4294967295) { - return 4294967295; - } - return v | 0; - } - - // node_modules/monaco-editor/esm/vs/editor/common/model/prefixSumComputer.js - var PrefixSumComputer = class { - constructor(values) { - this.values = values; - this.prefixSum = new Uint32Array(values.length); - this.prefixSumValidIndex = new Int32Array(1); - this.prefixSumValidIndex[0] = -1; - } - insertValues(insertIndex, insertValues) { - insertIndex = toUint32(insertIndex); - const oldValues = this.values; - const oldPrefixSum = this.prefixSum; - const insertValuesLen = insertValues.length; - if (insertValuesLen === 0) { - return false; - } - this.values = new Uint32Array(oldValues.length + insertValuesLen); - this.values.set(oldValues.subarray(0, insertIndex), 0); - this.values.set(oldValues.subarray(insertIndex), insertIndex + insertValuesLen); - this.values.set(insertValues, insertIndex); - if (insertIndex - 1 < this.prefixSumValidIndex[0]) { - this.prefixSumValidIndex[0] = insertIndex - 1; - } - this.prefixSum = new Uint32Array(this.values.length); - if (this.prefixSumValidIndex[0] >= 0) { - this.prefixSum.set(oldPrefixSum.subarray(0, this.prefixSumValidIndex[0] + 1)); - } - return true; - } - setValue(index, value) { - index = toUint32(index); - value = toUint32(value); - if (this.values[index] === value) { - return false; - } - this.values[index] = value; - if (index - 1 < this.prefixSumValidIndex[0]) { - this.prefixSumValidIndex[0] = index - 1; - } - return true; - } - removeValues(startIndex, count) { - startIndex = toUint32(startIndex); - count = toUint32(count); - const oldValues = this.values; - const oldPrefixSum = this.prefixSum; - if (startIndex >= oldValues.length) { - return false; - } - const maxCount = oldValues.length - startIndex; - if (count >= maxCount) { - count = maxCount; - } - if (count === 0) { - return false; - } - this.values = new Uint32Array(oldValues.length - count); - this.values.set(oldValues.subarray(0, startIndex), 0); - this.values.set(oldValues.subarray(startIndex + count), startIndex); - this.prefixSum = new Uint32Array(this.values.length); - if (startIndex - 1 < this.prefixSumValidIndex[0]) { - this.prefixSumValidIndex[0] = startIndex - 1; - } - if (this.prefixSumValidIndex[0] >= 0) { - this.prefixSum.set(oldPrefixSum.subarray(0, this.prefixSumValidIndex[0] + 1)); - } - return true; - } - getTotalSum() { - if (this.values.length === 0) { - return 0; - } - return this._getPrefixSum(this.values.length - 1); - } - /** - * Returns the sum of the first `index + 1` many items. - * @returns `SUM(0 <= j <= index, values[j])`. - */ - getPrefixSum(index) { - if (index < 0) { - return 0; - } - index = toUint32(index); - return this._getPrefixSum(index); - } - _getPrefixSum(index) { - if (index <= this.prefixSumValidIndex[0]) { - return this.prefixSum[index]; - } - let startIndex = this.prefixSumValidIndex[0] + 1; - if (startIndex === 0) { - this.prefixSum[0] = this.values[0]; - startIndex++; - } - if (index >= this.values.length) { - index = this.values.length - 1; - } - for (let i = startIndex; i <= index; i++) { - this.prefixSum[i] = this.prefixSum[i - 1] + this.values[i]; - } - this.prefixSumValidIndex[0] = Math.max(this.prefixSumValidIndex[0], index); - return this.prefixSum[index]; - } - getIndexOf(sum) { - sum = Math.floor(sum); - this.getTotalSum(); - let low = 0; - let high = this.values.length - 1; - let mid = 0; - let midStop = 0; - let midStart = 0; - while (low <= high) { - mid = low + (high - low) / 2 | 0; - midStop = this.prefixSum[mid]; - midStart = midStop - this.values[mid]; - if (sum < midStart) { - high = mid - 1; - } else if (sum >= midStop) { - low = mid + 1; - } else { - break; - } - } - return new PrefixSumIndexOfResult(mid, sum - midStart); - } - }; - var PrefixSumIndexOfResult = class { - constructor(index, remainder) { - this.index = index; - this.remainder = remainder; - this._prefixSumIndexOfResultBrand = void 0; - this.index = index; - this.remainder = remainder; - } - }; - - // node_modules/monaco-editor/esm/vs/editor/common/model/mirrorTextModel.js - var MirrorTextModel = class { - constructor(uri, lines, eol, versionId) { - this._uri = uri; - this._lines = lines; - this._eol = eol; - this._versionId = versionId; - this._lineStarts = null; - this._cachedTextValue = null; - } - dispose() { - this._lines.length = 0; - } - get version() { - return this._versionId; - } - getText() { - if (this._cachedTextValue === null) { - this._cachedTextValue = this._lines.join(this._eol); - } - return this._cachedTextValue; - } - onEvents(e) { - if (e.eol && e.eol !== this._eol) { - this._eol = e.eol; - this._lineStarts = null; - } - const changes = e.changes; - for (const change of changes) { - this._acceptDeleteRange(change.range); - this._acceptInsertText(new Position(change.range.startLineNumber, change.range.startColumn), change.text); - } - this._versionId = e.versionId; - this._cachedTextValue = null; - } - _ensureLineStarts() { - if (!this._lineStarts) { - const eolLength = this._eol.length; - const linesLength = this._lines.length; - const lineStartValues = new Uint32Array(linesLength); - for (let i = 0; i < linesLength; i++) { - lineStartValues[i] = this._lines[i].length + eolLength; - } - this._lineStarts = new PrefixSumComputer(lineStartValues); - } - } - /** - * All changes to a line's text go through this method - */ - _setLineText(lineIndex, newValue) { - this._lines[lineIndex] = newValue; - if (this._lineStarts) { - this._lineStarts.setValue(lineIndex, this._lines[lineIndex].length + this._eol.length); - } - } - _acceptDeleteRange(range) { - if (range.startLineNumber === range.endLineNumber) { - if (range.startColumn === range.endColumn) { - return; - } - this._setLineText(range.startLineNumber - 1, this._lines[range.startLineNumber - 1].substring(0, range.startColumn - 1) + this._lines[range.startLineNumber - 1].substring(range.endColumn - 1)); - return; - } - this._setLineText(range.startLineNumber - 1, this._lines[range.startLineNumber - 1].substring(0, range.startColumn - 1) + this._lines[range.endLineNumber - 1].substring(range.endColumn - 1)); - this._lines.splice(range.startLineNumber, range.endLineNumber - range.startLineNumber); - if (this._lineStarts) { - this._lineStarts.removeValues(range.startLineNumber, range.endLineNumber - range.startLineNumber); - } - } - _acceptInsertText(position, insertText) { - if (insertText.length === 0) { - return; - } - const insertLines = splitLines(insertText); - if (insertLines.length === 1) { - this._setLineText(position.lineNumber - 1, this._lines[position.lineNumber - 1].substring(0, position.column - 1) + insertLines[0] + this._lines[position.lineNumber - 1].substring(position.column - 1)); - return; - } - insertLines[insertLines.length - 1] += this._lines[position.lineNumber - 1].substring(position.column - 1); - this._setLineText(position.lineNumber - 1, this._lines[position.lineNumber - 1].substring(0, position.column - 1) + insertLines[0]); - const newLengths = new Uint32Array(insertLines.length - 1); - for (let i = 1; i < insertLines.length; i++) { - this._lines.splice(position.lineNumber + i - 1, 0, insertLines[i]); - newLengths[i - 1] = insertLines[i].length + this._eol.length; - } - if (this._lineStarts) { - this._lineStarts.insertValues(position.lineNumber, newLengths); - } - } - }; - - // node_modules/monaco-editor/esm/vs/editor/common/core/wordHelper.js - var USUAL_WORD_SEPARATORS = "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?"; - function createWordRegExp(allowInWords = "") { - let source = "(-?\\d*\\.\\d\\w*)|([^"; - for (const sep2 of USUAL_WORD_SEPARATORS) { - if (allowInWords.indexOf(sep2) >= 0) { - continue; - } - source += "\\" + sep2; - } - source += "\\s]+)"; - return new RegExp(source, "g"); - } - var DEFAULT_WORD_REGEXP = createWordRegExp(); - function ensureValidWordDefinition(wordDefinition) { - let result = DEFAULT_WORD_REGEXP; - if (wordDefinition && wordDefinition instanceof RegExp) { - if (!wordDefinition.global) { - let flags = "g"; - if (wordDefinition.ignoreCase) { - flags += "i"; - } - if (wordDefinition.multiline) { - flags += "m"; - } - if (wordDefinition.unicode) { - flags += "u"; - } - result = new RegExp(wordDefinition.source, flags); - } else { - result = wordDefinition; - } - } - result.lastIndex = 0; - return result; - } - var _defaultConfig = new LinkedList(); - _defaultConfig.unshift({ - maxLen: 1e3, - windowSize: 15, - timeBudget: 150 - }); - function getWordAtText(column, wordDefinition, text, textOffset, config) { - wordDefinition = ensureValidWordDefinition(wordDefinition); - if (!config) { - config = Iterable.first(_defaultConfig); - } - if (text.length > config.maxLen) { - let start = column - config.maxLen / 2; - if (start < 0) { - start = 0; - } else { - textOffset += start; - } - text = text.substring(start, column + config.maxLen / 2); - return getWordAtText(column, wordDefinition, text, textOffset, config); - } - const t1 = Date.now(); - const pos = column - 1 - textOffset; - let prevRegexIndex = -1; - let match = null; - for (let i = 1; ; i++) { - if (Date.now() - t1 >= config.timeBudget) { - break; - } - const regexIndex = pos - config.windowSize * i; - wordDefinition.lastIndex = Math.max(0, regexIndex); - const thisMatch = _findRegexMatchEnclosingPosition(wordDefinition, text, pos, prevRegexIndex); - if (!thisMatch && match) { - break; - } - match = thisMatch; - if (regexIndex <= 0) { - break; - } - prevRegexIndex = regexIndex; - } - if (match) { - const result = { - word: match[0], - startColumn: textOffset + 1 + match.index, - endColumn: textOffset + 1 + match.index + match[0].length - }; - wordDefinition.lastIndex = 0; - return result; - } - return null; - } - function _findRegexMatchEnclosingPosition(wordDefinition, text, pos, stopPos) { - let match; - while (match = wordDefinition.exec(text)) { - const matchIndex = match.index || 0; - if (matchIndex <= pos && wordDefinition.lastIndex >= pos) { - return match; - } else if (stopPos > 0 && matchIndex > stopPos) { - return null; - } - } - return null; - } - - // node_modules/monaco-editor/esm/vs/editor/common/core/characterClassifier.js - var CharacterClassifier = class _CharacterClassifier { - constructor(_defaultValue) { - const defaultValue = toUint8(_defaultValue); - this._defaultValue = defaultValue; - this._asciiMap = _CharacterClassifier._createAsciiMap(defaultValue); - this._map = /* @__PURE__ */ new Map(); - } - static _createAsciiMap(defaultValue) { - const asciiMap = new Uint8Array(256); - asciiMap.fill(defaultValue); - return asciiMap; - } - set(charCode, _value) { - const value = toUint8(_value); - if (charCode >= 0 && charCode < 256) { - this._asciiMap[charCode] = value; - } else { - this._map.set(charCode, value); - } - } - get(charCode) { - if (charCode >= 0 && charCode < 256) { - return this._asciiMap[charCode]; - } else { - return this._map.get(charCode) || this._defaultValue; - } - } - clear() { - this._asciiMap.fill(this._defaultValue); - this._map.clear(); - } - }; - - // node_modules/monaco-editor/esm/vs/editor/common/languages/linkComputer.js - var Uint8Matrix = class { - constructor(rows, cols, defaultValue) { - const data = new Uint8Array(rows * cols); - for (let i = 0, len = rows * cols; i < len; i++) { - data[i] = defaultValue; - } - this._data = data; - this.rows = rows; - this.cols = cols; - } - get(row, col) { - return this._data[row * this.cols + col]; - } - set(row, col, value) { - this._data[row * this.cols + col] = value; - } - }; - var StateMachine = class { - constructor(edges) { - let maxCharCode = 0; - let maxState = 0; - for (let i = 0, len = edges.length; i < len; i++) { - const [from, chCode, to] = edges[i]; - if (chCode > maxCharCode) { - maxCharCode = chCode; - } - if (from > maxState) { - maxState = from; - } - if (to > maxState) { - maxState = to; - } - } - maxCharCode++; - maxState++; - const states = new Uint8Matrix( - maxState, - maxCharCode, - 0 - /* State.Invalid */ - ); - for (let i = 0, len = edges.length; i < len; i++) { - const [from, chCode, to] = edges[i]; - states.set(from, chCode, to); - } - this._states = states; - this._maxCharCode = maxCharCode; - } - nextState(currentState, chCode) { - if (chCode < 0 || chCode >= this._maxCharCode) { - return 0; - } - return this._states.get(currentState, chCode); - } - }; - var _stateMachine = null; - function getStateMachine() { - if (_stateMachine === null) { - _stateMachine = new StateMachine([ - [ - 1, - 104, - 2 - /* State.H */ - ], - [ - 1, - 72, - 2 - /* State.H */ - ], - [ - 1, - 102, - 6 - /* State.F */ - ], - [ - 1, - 70, - 6 - /* State.F */ - ], - [ - 2, - 116, - 3 - /* State.HT */ - ], - [ - 2, - 84, - 3 - /* State.HT */ - ], - [ - 3, - 116, - 4 - /* State.HTT */ - ], - [ - 3, - 84, - 4 - /* State.HTT */ - ], - [ - 4, - 112, - 5 - /* State.HTTP */ - ], - [ - 4, - 80, - 5 - /* State.HTTP */ - ], - [ - 5, - 115, - 9 - /* State.BeforeColon */ - ], - [ - 5, - 83, - 9 - /* State.BeforeColon */ - ], - [ - 5, - 58, - 10 - /* State.AfterColon */ - ], - [ - 6, - 105, - 7 - /* State.FI */ - ], - [ - 6, - 73, - 7 - /* State.FI */ - ], - [ - 7, - 108, - 8 - /* State.FIL */ - ], - [ - 7, - 76, - 8 - /* State.FIL */ - ], - [ - 8, - 101, - 9 - /* State.BeforeColon */ - ], - [ - 8, - 69, - 9 - /* State.BeforeColon */ - ], - [ - 9, - 58, - 10 - /* State.AfterColon */ - ], - [ - 10, - 47, - 11 - /* State.AlmostThere */ - ], - [ - 11, - 47, - 12 - /* State.End */ - ] - ]); - } - return _stateMachine; - } - var _classifier = null; - function getClassifier() { - if (_classifier === null) { - _classifier = new CharacterClassifier( - 0 - /* CharacterClass.None */ - ); - const FORCE_TERMINATION_CHARACTERS = ` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026`; - for (let i = 0; i < FORCE_TERMINATION_CHARACTERS.length; i++) { - _classifier.set( - FORCE_TERMINATION_CHARACTERS.charCodeAt(i), - 1 - /* CharacterClass.ForceTermination */ - ); - } - const CANNOT_END_WITH_CHARACTERS = ".,;:"; - for (let i = 0; i < CANNOT_END_WITH_CHARACTERS.length; i++) { - _classifier.set( - CANNOT_END_WITH_CHARACTERS.charCodeAt(i), - 2 - /* CharacterClass.CannotEndIn */ - ); - } - } - return _classifier; - } - var LinkComputer = class _LinkComputer { - static _createLink(classifier, line, lineNumber, linkBeginIndex, linkEndIndex) { - let lastIncludedCharIndex = linkEndIndex - 1; - do { - const chCode = line.charCodeAt(lastIncludedCharIndex); - const chClass = classifier.get(chCode); - if (chClass !== 2) { - break; - } - lastIncludedCharIndex--; - } while (lastIncludedCharIndex > linkBeginIndex); - if (linkBeginIndex > 0) { - const charCodeBeforeLink = line.charCodeAt(linkBeginIndex - 1); - const lastCharCodeInLink = line.charCodeAt(lastIncludedCharIndex); - if (charCodeBeforeLink === 40 && lastCharCodeInLink === 41 || charCodeBeforeLink === 91 && lastCharCodeInLink === 93 || charCodeBeforeLink === 123 && lastCharCodeInLink === 125) { - lastIncludedCharIndex--; - } - } - return { - range: { - startLineNumber: lineNumber, - startColumn: linkBeginIndex + 1, - endLineNumber: lineNumber, - endColumn: lastIncludedCharIndex + 2 - }, - url: line.substring(linkBeginIndex, lastIncludedCharIndex + 1) - }; - } - static computeLinks(model, stateMachine = getStateMachine()) { - const classifier = getClassifier(); - const result = []; - for (let i = 1, lineCount = model.getLineCount(); i <= lineCount; i++) { - const line = model.getLineContent(i); - const len = line.length; - let j = 0; - let linkBeginIndex = 0; - let linkBeginChCode = 0; - let state = 1; - let hasOpenParens = false; - let hasOpenSquareBracket = false; - let inSquareBrackets = false; - let hasOpenCurlyBracket = false; - while (j < len) { - let resetStateMachine = false; - const chCode = line.charCodeAt(j); - if (state === 13) { - let chClass; - switch (chCode) { - case 40: - hasOpenParens = true; - chClass = 0; - break; - case 41: - chClass = hasOpenParens ? 0 : 1; - break; - case 91: - inSquareBrackets = true; - hasOpenSquareBracket = true; - chClass = 0; - break; - case 93: - inSquareBrackets = false; - chClass = hasOpenSquareBracket ? 0 : 1; - break; - case 123: - hasOpenCurlyBracket = true; - chClass = 0; - break; - case 125: - chClass = hasOpenCurlyBracket ? 0 : 1; - break; - case 39: - case 34: - case 96: - if (linkBeginChCode === chCode) { - chClass = 1; - } else if (linkBeginChCode === 39 || linkBeginChCode === 34 || linkBeginChCode === 96) { - chClass = 0; - } else { - chClass = 1; - } - break; - case 42: - chClass = linkBeginChCode === 42 ? 1 : 0; - break; - case 124: - chClass = linkBeginChCode === 124 ? 1 : 0; - break; - case 32: - chClass = inSquareBrackets ? 0 : 1; - break; - default: - chClass = classifier.get(chCode); - } - if (chClass === 1) { - result.push(_LinkComputer._createLink(classifier, line, i, linkBeginIndex, j)); - resetStateMachine = true; - } - } else if (state === 12) { - let chClass; - if (chCode === 91) { - hasOpenSquareBracket = true; - chClass = 0; - } else { - chClass = classifier.get(chCode); - } - if (chClass === 1) { - resetStateMachine = true; - } else { - state = 13; - } - } else { - state = stateMachine.nextState(state, chCode); - if (state === 0) { - resetStateMachine = true; - } - } - if (resetStateMachine) { - state = 1; - hasOpenParens = false; - hasOpenSquareBracket = false; - hasOpenCurlyBracket = false; - linkBeginIndex = j + 1; - linkBeginChCode = chCode; - } - j++; - } - if (state === 13) { - result.push(_LinkComputer._createLink(classifier, line, i, linkBeginIndex, len)); - } - } - return result; - } - }; - function computeLinks(model) { - if (!model || typeof model.getLineCount !== "function" || typeof model.getLineContent !== "function") { - return []; - } - return LinkComputer.computeLinks(model); - } - - // node_modules/monaco-editor/esm/vs/editor/common/languages/supports/inplaceReplaceSupport.js - var BasicInplaceReplace = class { - constructor() { - this._defaultValueSet = [ - ["true", "false"], - ["True", "False"], - ["Private", "Public", "Friend", "ReadOnly", "Partial", "Protected", "WriteOnly"], - ["public", "protected", "private"] - ]; - } - navigateValueSet(range1, text1, range2, text2, up) { - if (range1 && text1) { - const result = this.doNavigateValueSet(text1, up); - if (result) { - return { - range: range1, - value: result - }; - } - } - if (range2 && text2) { - const result = this.doNavigateValueSet(text2, up); - if (result) { - return { - range: range2, - value: result - }; - } - } - return null; - } - doNavigateValueSet(text, up) { - const numberResult = this.numberReplace(text, up); - if (numberResult !== null) { - return numberResult; - } - return this.textReplace(text, up); - } - numberReplace(value, up) { - const precision = Math.pow(10, value.length - (value.lastIndexOf(".") + 1)); - let n1 = Number(value); - const n2 = parseFloat(value); - if (!isNaN(n1) && !isNaN(n2) && n1 === n2) { - if (n1 === 0 && !up) { - return null; - } else { - n1 = Math.floor(n1 * precision); - n1 += up ? precision : -precision; - return String(n1 / precision); - } - } - return null; - } - textReplace(value, up) { - return this.valueSetsReplace(this._defaultValueSet, value, up); - } - valueSetsReplace(valueSets, value, up) { - let result = null; - for (let i = 0, len = valueSets.length; result === null && i < len; i++) { - result = this.valueSetReplace(valueSets[i], value, up); - } - return result; - } - valueSetReplace(valueSet, value, up) { - let idx = valueSet.indexOf(value); - if (idx >= 0) { - idx += up ? 1 : -1; - if (idx < 0) { - idx = valueSet.length - 1; - } else { - idx %= valueSet.length; - } - return valueSet[idx]; - } - return null; - } - }; - BasicInplaceReplace.INSTANCE = new BasicInplaceReplace(); - - // node_modules/monaco-editor/esm/vs/base/common/cancellation.js - var shortcutEvent = Object.freeze(function(callback, context) { - const handle = setTimeout(callback.bind(context), 0); - return { dispose() { - clearTimeout(handle); - } }; - }); - var CancellationToken; - (function(CancellationToken2) { - function isCancellationToken(thing) { - if (thing === CancellationToken2.None || thing === CancellationToken2.Cancelled) { - return true; - } - if (thing instanceof MutableToken) { - return true; - } - if (!thing || typeof thing !== "object") { - return false; - } - return typeof thing.isCancellationRequested === "boolean" && typeof thing.onCancellationRequested === "function"; - } - CancellationToken2.isCancellationToken = isCancellationToken; - CancellationToken2.None = Object.freeze({ - isCancellationRequested: false, - onCancellationRequested: Event.None - }); - CancellationToken2.Cancelled = Object.freeze({ - isCancellationRequested: true, - onCancellationRequested: shortcutEvent - }); - })(CancellationToken || (CancellationToken = {})); - var MutableToken = class { - constructor() { - this._isCancelled = false; - this._emitter = null; - } - cancel() { - if (!this._isCancelled) { - this._isCancelled = true; - if (this._emitter) { - this._emitter.fire(void 0); - this.dispose(); - } - } - } - get isCancellationRequested() { - return this._isCancelled; - } - get onCancellationRequested() { - if (this._isCancelled) { - return shortcutEvent; - } - if (!this._emitter) { - this._emitter = new Emitter(); - } - return this._emitter.event; - } - dispose() { - if (this._emitter) { - this._emitter.dispose(); - this._emitter = null; - } - } - }; - var CancellationTokenSource = class { - constructor(parent) { - this._token = void 0; - this._parentListener = void 0; - this._parentListener = parent && parent.onCancellationRequested(this.cancel, this); - } - get token() { - if (!this._token) { - this._token = new MutableToken(); - } - return this._token; - } - cancel() { - if (!this._token) { - this._token = CancellationToken.Cancelled; - } else if (this._token instanceof MutableToken) { - this._token.cancel(); - } - } - dispose(cancel = false) { - var _a4; - if (cancel) { - this.cancel(); - } - (_a4 = this._parentListener) === null || _a4 === void 0 ? void 0 : _a4.dispose(); - if (!this._token) { - this._token = CancellationToken.None; - } else if (this._token instanceof MutableToken) { - this._token.dispose(); - } - } - }; - - // node_modules/monaco-editor/esm/vs/base/common/keyCodes.js - var KeyCodeStrMap = class { - constructor() { - this._keyCodeToStr = []; - this._strToKeyCode = /* @__PURE__ */ Object.create(null); - } - define(keyCode, str) { - this._keyCodeToStr[keyCode] = str; - this._strToKeyCode[str.toLowerCase()] = keyCode; - } - keyCodeToStr(keyCode) { - return this._keyCodeToStr[keyCode]; - } - strToKeyCode(str) { - return this._strToKeyCode[str.toLowerCase()] || 0; - } - }; - var uiMap = new KeyCodeStrMap(); - var userSettingsUSMap = new KeyCodeStrMap(); - var userSettingsGeneralMap = new KeyCodeStrMap(); - var EVENT_KEY_CODE_MAP = new Array(230); - var NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE = {}; - var scanCodeIntToStr = []; - var scanCodeStrToInt = /* @__PURE__ */ Object.create(null); - var scanCodeLowerCaseStrToInt = /* @__PURE__ */ Object.create(null); - var IMMUTABLE_CODE_TO_KEY_CODE = []; - var IMMUTABLE_KEY_CODE_TO_CODE = []; - for (let i = 0; i <= 193; i++) { - IMMUTABLE_CODE_TO_KEY_CODE[i] = -1; - } - for (let i = 0; i <= 132; i++) { - IMMUTABLE_KEY_CODE_TO_CODE[i] = -1; - } - (function() { - const empty = ""; - const mappings = [ - // immutable, scanCode, scanCodeStr, keyCode, keyCodeStr, eventKeyCode, vkey, usUserSettingsLabel, generalUserSettingsLabel - [1, 0, "None", 0, "unknown", 0, "VK_UNKNOWN", empty, empty], - [1, 1, "Hyper", 0, empty, 0, empty, empty, empty], - [1, 2, "Super", 0, empty, 0, empty, empty, empty], - [1, 3, "Fn", 0, empty, 0, empty, empty, empty], - [1, 4, "FnLock", 0, empty, 0, empty, empty, empty], - [1, 5, "Suspend", 0, empty, 0, empty, empty, empty], - [1, 6, "Resume", 0, empty, 0, empty, empty, empty], - [1, 7, "Turbo", 0, empty, 0, empty, empty, empty], - [1, 8, "Sleep", 0, empty, 0, "VK_SLEEP", empty, empty], - [1, 9, "WakeUp", 0, empty, 0, empty, empty, empty], - [0, 10, "KeyA", 31, "A", 65, "VK_A", empty, empty], - [0, 11, "KeyB", 32, "B", 66, "VK_B", empty, empty], - [0, 12, "KeyC", 33, "C", 67, "VK_C", empty, empty], - [0, 13, "KeyD", 34, "D", 68, "VK_D", empty, empty], - [0, 14, "KeyE", 35, "E", 69, "VK_E", empty, empty], - [0, 15, "KeyF", 36, "F", 70, "VK_F", empty, empty], - [0, 16, "KeyG", 37, "G", 71, "VK_G", empty, empty], - [0, 17, "KeyH", 38, "H", 72, "VK_H", empty, empty], - [0, 18, "KeyI", 39, "I", 73, "VK_I", empty, empty], - [0, 19, "KeyJ", 40, "J", 74, "VK_J", empty, empty], - [0, 20, "KeyK", 41, "K", 75, "VK_K", empty, empty], - [0, 21, "KeyL", 42, "L", 76, "VK_L", empty, empty], - [0, 22, "KeyM", 43, "M", 77, "VK_M", empty, empty], - [0, 23, "KeyN", 44, "N", 78, "VK_N", empty, empty], - [0, 24, "KeyO", 45, "O", 79, "VK_O", empty, empty], - [0, 25, "KeyP", 46, "P", 80, "VK_P", empty, empty], - [0, 26, "KeyQ", 47, "Q", 81, "VK_Q", empty, empty], - [0, 27, "KeyR", 48, "R", 82, "VK_R", empty, empty], - [0, 28, "KeyS", 49, "S", 83, "VK_S", empty, empty], - [0, 29, "KeyT", 50, "T", 84, "VK_T", empty, empty], - [0, 30, "KeyU", 51, "U", 85, "VK_U", empty, empty], - [0, 31, "KeyV", 52, "V", 86, "VK_V", empty, empty], - [0, 32, "KeyW", 53, "W", 87, "VK_W", empty, empty], - [0, 33, "KeyX", 54, "X", 88, "VK_X", empty, empty], - [0, 34, "KeyY", 55, "Y", 89, "VK_Y", empty, empty], - [0, 35, "KeyZ", 56, "Z", 90, "VK_Z", empty, empty], - [0, 36, "Digit1", 22, "1", 49, "VK_1", empty, empty], - [0, 37, "Digit2", 23, "2", 50, "VK_2", empty, empty], - [0, 38, "Digit3", 24, "3", 51, "VK_3", empty, empty], - [0, 39, "Digit4", 25, "4", 52, "VK_4", empty, empty], - [0, 40, "Digit5", 26, "5", 53, "VK_5", empty, empty], - [0, 41, "Digit6", 27, "6", 54, "VK_6", empty, empty], - [0, 42, "Digit7", 28, "7", 55, "VK_7", empty, empty], - [0, 43, "Digit8", 29, "8", 56, "VK_8", empty, empty], - [0, 44, "Digit9", 30, "9", 57, "VK_9", empty, empty], - [0, 45, "Digit0", 21, "0", 48, "VK_0", empty, empty], - [1, 46, "Enter", 3, "Enter", 13, "VK_RETURN", empty, empty], - [1, 47, "Escape", 9, "Escape", 27, "VK_ESCAPE", empty, empty], - [1, 48, "Backspace", 1, "Backspace", 8, "VK_BACK", empty, empty], - [1, 49, "Tab", 2, "Tab", 9, "VK_TAB", empty, empty], - [1, 50, "Space", 10, "Space", 32, "VK_SPACE", empty, empty], - [0, 51, "Minus", 88, "-", 189, "VK_OEM_MINUS", "-", "OEM_MINUS"], - [0, 52, "Equal", 86, "=", 187, "VK_OEM_PLUS", "=", "OEM_PLUS"], - [0, 53, "BracketLeft", 92, "[", 219, "VK_OEM_4", "[", "OEM_4"], - [0, 54, "BracketRight", 94, "]", 221, "VK_OEM_6", "]", "OEM_6"], - [0, 55, "Backslash", 93, "\\", 220, "VK_OEM_5", "\\", "OEM_5"], - [0, 56, "IntlHash", 0, empty, 0, empty, empty, empty], - // has been dropped from the w3c spec - [0, 57, "Semicolon", 85, ";", 186, "VK_OEM_1", ";", "OEM_1"], - [0, 58, "Quote", 95, "'", 222, "VK_OEM_7", "'", "OEM_7"], - [0, 59, "Backquote", 91, "`", 192, "VK_OEM_3", "`", "OEM_3"], - [0, 60, "Comma", 87, ",", 188, "VK_OEM_COMMA", ",", "OEM_COMMA"], - [0, 61, "Period", 89, ".", 190, "VK_OEM_PERIOD", ".", "OEM_PERIOD"], - [0, 62, "Slash", 90, "/", 191, "VK_OEM_2", "/", "OEM_2"], - [1, 63, "CapsLock", 8, "CapsLock", 20, "VK_CAPITAL", empty, empty], - [1, 64, "F1", 59, "F1", 112, "VK_F1", empty, empty], - [1, 65, "F2", 60, "F2", 113, "VK_F2", empty, empty], - [1, 66, "F3", 61, "F3", 114, "VK_F3", empty, empty], - [1, 67, "F4", 62, "F4", 115, "VK_F4", empty, empty], - [1, 68, "F5", 63, "F5", 116, "VK_F5", empty, empty], - [1, 69, "F6", 64, "F6", 117, "VK_F6", empty, empty], - [1, 70, "F7", 65, "F7", 118, "VK_F7", empty, empty], - [1, 71, "F8", 66, "F8", 119, "VK_F8", empty, empty], - [1, 72, "F9", 67, "F9", 120, "VK_F9", empty, empty], - [1, 73, "F10", 68, "F10", 121, "VK_F10", empty, empty], - [1, 74, "F11", 69, "F11", 122, "VK_F11", empty, empty], - [1, 75, "F12", 70, "F12", 123, "VK_F12", empty, empty], - [1, 76, "PrintScreen", 0, empty, 0, empty, empty, empty], - [1, 77, "ScrollLock", 84, "ScrollLock", 145, "VK_SCROLL", empty, empty], - [1, 78, "Pause", 7, "PauseBreak", 19, "VK_PAUSE", empty, empty], - [1, 79, "Insert", 19, "Insert", 45, "VK_INSERT", empty, empty], - [1, 80, "Home", 14, "Home", 36, "VK_HOME", empty, empty], - [1, 81, "PageUp", 11, "PageUp", 33, "VK_PRIOR", empty, empty], - [1, 82, "Delete", 20, "Delete", 46, "VK_DELETE", empty, empty], - [1, 83, "End", 13, "End", 35, "VK_END", empty, empty], - [1, 84, "PageDown", 12, "PageDown", 34, "VK_NEXT", empty, empty], - [1, 85, "ArrowRight", 17, "RightArrow", 39, "VK_RIGHT", "Right", empty], - [1, 86, "ArrowLeft", 15, "LeftArrow", 37, "VK_LEFT", "Left", empty], - [1, 87, "ArrowDown", 18, "DownArrow", 40, "VK_DOWN", "Down", empty], - [1, 88, "ArrowUp", 16, "UpArrow", 38, "VK_UP", "Up", empty], - [1, 89, "NumLock", 83, "NumLock", 144, "VK_NUMLOCK", empty, empty], - [1, 90, "NumpadDivide", 113, "NumPad_Divide", 111, "VK_DIVIDE", empty, empty], - [1, 91, "NumpadMultiply", 108, "NumPad_Multiply", 106, "VK_MULTIPLY", empty, empty], - [1, 92, "NumpadSubtract", 111, "NumPad_Subtract", 109, "VK_SUBTRACT", empty, empty], - [1, 93, "NumpadAdd", 109, "NumPad_Add", 107, "VK_ADD", empty, empty], - [1, 94, "NumpadEnter", 3, empty, 0, empty, empty, empty], - [1, 95, "Numpad1", 99, "NumPad1", 97, "VK_NUMPAD1", empty, empty], - [1, 96, "Numpad2", 100, "NumPad2", 98, "VK_NUMPAD2", empty, empty], - [1, 97, "Numpad3", 101, "NumPad3", 99, "VK_NUMPAD3", empty, empty], - [1, 98, "Numpad4", 102, "NumPad4", 100, "VK_NUMPAD4", empty, empty], - [1, 99, "Numpad5", 103, "NumPad5", 101, "VK_NUMPAD5", empty, empty], - [1, 100, "Numpad6", 104, "NumPad6", 102, "VK_NUMPAD6", empty, empty], - [1, 101, "Numpad7", 105, "NumPad7", 103, "VK_NUMPAD7", empty, empty], - [1, 102, "Numpad8", 106, "NumPad8", 104, "VK_NUMPAD8", empty, empty], - [1, 103, "Numpad9", 107, "NumPad9", 105, "VK_NUMPAD9", empty, empty], - [1, 104, "Numpad0", 98, "NumPad0", 96, "VK_NUMPAD0", empty, empty], - [1, 105, "NumpadDecimal", 112, "NumPad_Decimal", 110, "VK_DECIMAL", empty, empty], - [0, 106, "IntlBackslash", 97, "OEM_102", 226, "VK_OEM_102", empty, empty], - [1, 107, "ContextMenu", 58, "ContextMenu", 93, empty, empty, empty], - [1, 108, "Power", 0, empty, 0, empty, empty, empty], - [1, 109, "NumpadEqual", 0, empty, 0, empty, empty, empty], - [1, 110, "F13", 71, "F13", 124, "VK_F13", empty, empty], - [1, 111, "F14", 72, "F14", 125, "VK_F14", empty, empty], - [1, 112, "F15", 73, "F15", 126, "VK_F15", empty, empty], - [1, 113, "F16", 74, "F16", 127, "VK_F16", empty, empty], - [1, 114, "F17", 75, "F17", 128, "VK_F17", empty, empty], - [1, 115, "F18", 76, "F18", 129, "VK_F18", empty, empty], - [1, 116, "F19", 77, "F19", 130, "VK_F19", empty, empty], - [1, 117, "F20", 78, "F20", 131, "VK_F20", empty, empty], - [1, 118, "F21", 79, "F21", 132, "VK_F21", empty, empty], - [1, 119, "F22", 80, "F22", 133, "VK_F22", empty, empty], - [1, 120, "F23", 81, "F23", 134, "VK_F23", empty, empty], - [1, 121, "F24", 82, "F24", 135, "VK_F24", empty, empty], - [1, 122, "Open", 0, empty, 0, empty, empty, empty], - [1, 123, "Help", 0, empty, 0, empty, empty, empty], - [1, 124, "Select", 0, empty, 0, empty, empty, empty], - [1, 125, "Again", 0, empty, 0, empty, empty, empty], - [1, 126, "Undo", 0, empty, 0, empty, empty, empty], - [1, 127, "Cut", 0, empty, 0, empty, empty, empty], - [1, 128, "Copy", 0, empty, 0, empty, empty, empty], - [1, 129, "Paste", 0, empty, 0, empty, empty, empty], - [1, 130, "Find", 0, empty, 0, empty, empty, empty], - [1, 131, "AudioVolumeMute", 117, "AudioVolumeMute", 173, "VK_VOLUME_MUTE", empty, empty], - [1, 132, "AudioVolumeUp", 118, "AudioVolumeUp", 175, "VK_VOLUME_UP", empty, empty], - [1, 133, "AudioVolumeDown", 119, "AudioVolumeDown", 174, "VK_VOLUME_DOWN", empty, empty], - [1, 134, "NumpadComma", 110, "NumPad_Separator", 108, "VK_SEPARATOR", empty, empty], - [0, 135, "IntlRo", 115, "ABNT_C1", 193, "VK_ABNT_C1", empty, empty], - [1, 136, "KanaMode", 0, empty, 0, empty, empty, empty], - [0, 137, "IntlYen", 0, empty, 0, empty, empty, empty], - [1, 138, "Convert", 0, empty, 0, empty, empty, empty], - [1, 139, "NonConvert", 0, empty, 0, empty, empty, empty], - [1, 140, "Lang1", 0, empty, 0, empty, empty, empty], - [1, 141, "Lang2", 0, empty, 0, empty, empty, empty], - [1, 142, "Lang3", 0, empty, 0, empty, empty, empty], - [1, 143, "Lang4", 0, empty, 0, empty, empty, empty], - [1, 144, "Lang5", 0, empty, 0, empty, empty, empty], - [1, 145, "Abort", 0, empty, 0, empty, empty, empty], - [1, 146, "Props", 0, empty, 0, empty, empty, empty], - [1, 147, "NumpadParenLeft", 0, empty, 0, empty, empty, empty], - [1, 148, "NumpadParenRight", 0, empty, 0, empty, empty, empty], - [1, 149, "NumpadBackspace", 0, empty, 0, empty, empty, empty], - [1, 150, "NumpadMemoryStore", 0, empty, 0, empty, empty, empty], - [1, 151, "NumpadMemoryRecall", 0, empty, 0, empty, empty, empty], - [1, 152, "NumpadMemoryClear", 0, empty, 0, empty, empty, empty], - [1, 153, "NumpadMemoryAdd", 0, empty, 0, empty, empty, empty], - [1, 154, "NumpadMemorySubtract", 0, empty, 0, empty, empty, empty], - [1, 155, "NumpadClear", 131, "Clear", 12, "VK_CLEAR", empty, empty], - [1, 156, "NumpadClearEntry", 0, empty, 0, empty, empty, empty], - [1, 0, empty, 5, "Ctrl", 17, "VK_CONTROL", empty, empty], - [1, 0, empty, 4, "Shift", 16, "VK_SHIFT", empty, empty], - [1, 0, empty, 6, "Alt", 18, "VK_MENU", empty, empty], - [1, 0, empty, 57, "Meta", 91, "VK_COMMAND", empty, empty], - [1, 157, "ControlLeft", 5, empty, 0, "VK_LCONTROL", empty, empty], - [1, 158, "ShiftLeft", 4, empty, 0, "VK_LSHIFT", empty, empty], - [1, 159, "AltLeft", 6, empty, 0, "VK_LMENU", empty, empty], - [1, 160, "MetaLeft", 57, empty, 0, "VK_LWIN", empty, empty], - [1, 161, "ControlRight", 5, empty, 0, "VK_RCONTROL", empty, empty], - [1, 162, "ShiftRight", 4, empty, 0, "VK_RSHIFT", empty, empty], - [1, 163, "AltRight", 6, empty, 0, "VK_RMENU", empty, empty], - [1, 164, "MetaRight", 57, empty, 0, "VK_RWIN", empty, empty], - [1, 165, "BrightnessUp", 0, empty, 0, empty, empty, empty], - [1, 166, "BrightnessDown", 0, empty, 0, empty, empty, empty], - [1, 167, "MediaPlay", 0, empty, 0, empty, empty, empty], - [1, 168, "MediaRecord", 0, empty, 0, empty, empty, empty], - [1, 169, "MediaFastForward", 0, empty, 0, empty, empty, empty], - [1, 170, "MediaRewind", 0, empty, 0, empty, empty, empty], - [1, 171, "MediaTrackNext", 124, "MediaTrackNext", 176, "VK_MEDIA_NEXT_TRACK", empty, empty], - [1, 172, "MediaTrackPrevious", 125, "MediaTrackPrevious", 177, "VK_MEDIA_PREV_TRACK", empty, empty], - [1, 173, "MediaStop", 126, "MediaStop", 178, "VK_MEDIA_STOP", empty, empty], - [1, 174, "Eject", 0, empty, 0, empty, empty, empty], - [1, 175, "MediaPlayPause", 127, "MediaPlayPause", 179, "VK_MEDIA_PLAY_PAUSE", empty, empty], - [1, 176, "MediaSelect", 128, "LaunchMediaPlayer", 181, "VK_MEDIA_LAUNCH_MEDIA_SELECT", empty, empty], - [1, 177, "LaunchMail", 129, "LaunchMail", 180, "VK_MEDIA_LAUNCH_MAIL", empty, empty], - [1, 178, "LaunchApp2", 130, "LaunchApp2", 183, "VK_MEDIA_LAUNCH_APP2", empty, empty], - [1, 179, "LaunchApp1", 0, empty, 0, "VK_MEDIA_LAUNCH_APP1", empty, empty], - [1, 180, "SelectTask", 0, empty, 0, empty, empty, empty], - [1, 181, "LaunchScreenSaver", 0, empty, 0, empty, empty, empty], - [1, 182, "BrowserSearch", 120, "BrowserSearch", 170, "VK_BROWSER_SEARCH", empty, empty], - [1, 183, "BrowserHome", 121, "BrowserHome", 172, "VK_BROWSER_HOME", empty, empty], - [1, 184, "BrowserBack", 122, "BrowserBack", 166, "VK_BROWSER_BACK", empty, empty], - [1, 185, "BrowserForward", 123, "BrowserForward", 167, "VK_BROWSER_FORWARD", empty, empty], - [1, 186, "BrowserStop", 0, empty, 0, "VK_BROWSER_STOP", empty, empty], - [1, 187, "BrowserRefresh", 0, empty, 0, "VK_BROWSER_REFRESH", empty, empty], - [1, 188, "BrowserFavorites", 0, empty, 0, "VK_BROWSER_FAVORITES", empty, empty], - [1, 189, "ZoomToggle", 0, empty, 0, empty, empty, empty], - [1, 190, "MailReply", 0, empty, 0, empty, empty, empty], - [1, 191, "MailForward", 0, empty, 0, empty, empty, empty], - [1, 192, "MailSend", 0, empty, 0, empty, empty, empty], - // See https://lists.w3.org/Archives/Public/www-dom/2010JulSep/att-0182/keyCode-spec.html - // If an Input Method Editor is processing key input and the event is keydown, return 229. - [1, 0, empty, 114, "KeyInComposition", 229, empty, empty, empty], - [1, 0, empty, 116, "ABNT_C2", 194, "VK_ABNT_C2", empty, empty], - [1, 0, empty, 96, "OEM_8", 223, "VK_OEM_8", empty, empty], - [1, 0, empty, 0, empty, 0, "VK_KANA", empty, empty], - [1, 0, empty, 0, empty, 0, "VK_HANGUL", empty, empty], - [1, 0, empty, 0, empty, 0, "VK_JUNJA", empty, empty], - [1, 0, empty, 0, empty, 0, "VK_FINAL", empty, empty], - [1, 0, empty, 0, empty, 0, "VK_HANJA", empty, empty], - [1, 0, empty, 0, empty, 0, "VK_KANJI", empty, empty], - [1, 0, empty, 0, empty, 0, "VK_CONVERT", empty, empty], - [1, 0, empty, 0, empty, 0, "VK_NONCONVERT", empty, empty], - [1, 0, empty, 0, empty, 0, "VK_ACCEPT", empty, empty], - [1, 0, empty, 0, empty, 0, "VK_MODECHANGE", empty, empty], - [1, 0, empty, 0, empty, 0, "VK_SELECT", empty, empty], - [1, 0, empty, 0, empty, 0, "VK_PRINT", empty, empty], - [1, 0, empty, 0, empty, 0, "VK_EXECUTE", empty, empty], - [1, 0, empty, 0, empty, 0, "VK_SNAPSHOT", empty, empty], - [1, 0, empty, 0, empty, 0, "VK_HELP", empty, empty], - [1, 0, empty, 0, empty, 0, "VK_APPS", empty, empty], - [1, 0, empty, 0, empty, 0, "VK_PROCESSKEY", empty, empty], - [1, 0, empty, 0, empty, 0, "VK_PACKET", empty, empty], - [1, 0, empty, 0, empty, 0, "VK_DBE_SBCSCHAR", empty, empty], - [1, 0, empty, 0, empty, 0, "VK_DBE_DBCSCHAR", empty, empty], - [1, 0, empty, 0, empty, 0, "VK_ATTN", empty, empty], - [1, 0, empty, 0, empty, 0, "VK_CRSEL", empty, empty], - [1, 0, empty, 0, empty, 0, "VK_EXSEL", empty, empty], - [1, 0, empty, 0, empty, 0, "VK_EREOF", empty, empty], - [1, 0, empty, 0, empty, 0, "VK_PLAY", empty, empty], - [1, 0, empty, 0, empty, 0, "VK_ZOOM", empty, empty], - [1, 0, empty, 0, empty, 0, "VK_NONAME", empty, empty], - [1, 0, empty, 0, empty, 0, "VK_PA1", empty, empty], - [1, 0, empty, 0, empty, 0, "VK_OEM_CLEAR", empty, empty] - ]; - const seenKeyCode = []; - const seenScanCode = []; - for (const mapping of mappings) { - const [immutable, scanCode, scanCodeStr, keyCode, keyCodeStr, eventKeyCode, vkey, usUserSettingsLabel, generalUserSettingsLabel] = mapping; - if (!seenScanCode[scanCode]) { - seenScanCode[scanCode] = true; - scanCodeIntToStr[scanCode] = scanCodeStr; - scanCodeStrToInt[scanCodeStr] = scanCode; - scanCodeLowerCaseStrToInt[scanCodeStr.toLowerCase()] = scanCode; - if (immutable) { - IMMUTABLE_CODE_TO_KEY_CODE[scanCode] = keyCode; - if (keyCode !== 0 && keyCode !== 3 && keyCode !== 5 && keyCode !== 4 && keyCode !== 6 && keyCode !== 57) { - IMMUTABLE_KEY_CODE_TO_CODE[keyCode] = scanCode; - } - } - } - if (!seenKeyCode[keyCode]) { - seenKeyCode[keyCode] = true; - if (!keyCodeStr) { - throw new Error(`String representation missing for key code ${keyCode} around scan code ${scanCodeStr}`); - } - uiMap.define(keyCode, keyCodeStr); - userSettingsUSMap.define(keyCode, usUserSettingsLabel || keyCodeStr); - userSettingsGeneralMap.define(keyCode, generalUserSettingsLabel || usUserSettingsLabel || keyCodeStr); - } - if (eventKeyCode) { - EVENT_KEY_CODE_MAP[eventKeyCode] = keyCode; - } - if (vkey) { - NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE[vkey] = keyCode; - } - } - IMMUTABLE_KEY_CODE_TO_CODE[ - 3 - /* KeyCode.Enter */ - ] = 46; - })(); - var KeyCodeUtils; - (function(KeyCodeUtils2) { - function toString(keyCode) { - return uiMap.keyCodeToStr(keyCode); - } - KeyCodeUtils2.toString = toString; - function fromString(key) { - return uiMap.strToKeyCode(key); - } - KeyCodeUtils2.fromString = fromString; - function toUserSettingsUS(keyCode) { - return userSettingsUSMap.keyCodeToStr(keyCode); - } - KeyCodeUtils2.toUserSettingsUS = toUserSettingsUS; - function toUserSettingsGeneral(keyCode) { - return userSettingsGeneralMap.keyCodeToStr(keyCode); - } - KeyCodeUtils2.toUserSettingsGeneral = toUserSettingsGeneral; - function fromUserSettings(key) { - return userSettingsUSMap.strToKeyCode(key) || userSettingsGeneralMap.strToKeyCode(key); - } - KeyCodeUtils2.fromUserSettings = fromUserSettings; - function toElectronAccelerator(keyCode) { - if (keyCode >= 98 && keyCode <= 113) { - return null; - } - switch (keyCode) { - case 16: - return "Up"; - case 18: - return "Down"; - case 15: - return "Left"; - case 17: - return "Right"; - } - return uiMap.keyCodeToStr(keyCode); - } - KeyCodeUtils2.toElectronAccelerator = toElectronAccelerator; - })(KeyCodeUtils || (KeyCodeUtils = {})); - function KeyChord(firstPart, secondPart) { - const chordPart = (secondPart & 65535) << 16 >>> 0; - return (firstPart | chordPart) >>> 0; - } - - // node_modules/monaco-editor/esm/vs/editor/common/core/selection.js - var Selection = class _Selection extends Range { - constructor(selectionStartLineNumber, selectionStartColumn, positionLineNumber, positionColumn) { - super(selectionStartLineNumber, selectionStartColumn, positionLineNumber, positionColumn); - this.selectionStartLineNumber = selectionStartLineNumber; - this.selectionStartColumn = selectionStartColumn; - this.positionLineNumber = positionLineNumber; - this.positionColumn = positionColumn; - } - /** - * Transform to a human-readable representation. - */ - toString() { - return "[" + this.selectionStartLineNumber + "," + this.selectionStartColumn + " -> " + this.positionLineNumber + "," + this.positionColumn + "]"; - } - /** - * Test if equals other selection. - */ - equalsSelection(other) { - return _Selection.selectionsEqual(this, other); - } - /** - * Test if the two selections are equal. - */ - static selectionsEqual(a, b) { - return a.selectionStartLineNumber === b.selectionStartLineNumber && a.selectionStartColumn === b.selectionStartColumn && a.positionLineNumber === b.positionLineNumber && a.positionColumn === b.positionColumn; - } - /** - * Get directions (LTR or RTL). - */ - getDirection() { - if (this.selectionStartLineNumber === this.startLineNumber && this.selectionStartColumn === this.startColumn) { - return 0; - } - return 1; - } - /** - * Create a new selection with a different `positionLineNumber` and `positionColumn`. - */ - setEndPosition(endLineNumber, endColumn) { - if (this.getDirection() === 0) { - return new _Selection(this.startLineNumber, this.startColumn, endLineNumber, endColumn); - } - return new _Selection(endLineNumber, endColumn, this.startLineNumber, this.startColumn); - } - /** - * Get the position at `positionLineNumber` and `positionColumn`. - */ - getPosition() { - return new Position(this.positionLineNumber, this.positionColumn); - } - /** - * Get the position at the start of the selection. - */ - getSelectionStart() { - return new Position(this.selectionStartLineNumber, this.selectionStartColumn); - } - /** - * Create a new selection with a different `selectionStartLineNumber` and `selectionStartColumn`. - */ - setStartPosition(startLineNumber, startColumn) { - if (this.getDirection() === 0) { - return new _Selection(startLineNumber, startColumn, this.endLineNumber, this.endColumn); - } - return new _Selection(this.endLineNumber, this.endColumn, startLineNumber, startColumn); - } - // ---- - /** - * Create a `Selection` from one or two positions - */ - static fromPositions(start, end = start) { - return new _Selection(start.lineNumber, start.column, end.lineNumber, end.column); - } - /** - * Creates a `Selection` from a range, given a direction. - */ - static fromRange(range, direction) { - if (direction === 0) { - return new _Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn); - } else { - return new _Selection(range.endLineNumber, range.endColumn, range.startLineNumber, range.startColumn); - } - } - /** - * Create a `Selection` from an `ISelection`. - */ - static liftSelection(sel) { - return new _Selection(sel.selectionStartLineNumber, sel.selectionStartColumn, sel.positionLineNumber, sel.positionColumn); - } - /** - * `a` equals `b`. - */ - static selectionsArrEqual(a, b) { - if (a && !b || !a && b) { - return false; - } - if (!a && !b) { - return true; - } - if (a.length !== b.length) { - return false; - } - for (let i = 0, len = a.length; i < len; i++) { - if (!this.selectionsEqual(a[i], b[i])) { - return false; - } - } - return true; - } - /** - * Test if `obj` is an `ISelection`. - */ - static isISelection(obj) { - return obj && typeof obj.selectionStartLineNumber === "number" && typeof obj.selectionStartColumn === "number" && typeof obj.positionLineNumber === "number" && typeof obj.positionColumn === "number"; - } - /** - * Create with a direction. - */ - static createWithDirection(startLineNumber, startColumn, endLineNumber, endColumn, direction) { - if (direction === 0) { - return new _Selection(startLineNumber, startColumn, endLineNumber, endColumn); - } - return new _Selection(endLineNumber, endColumn, startLineNumber, startColumn); - } - }; - - // node_modules/monaco-editor/esm/vs/base/common/codicons.js - var _codiconFontCharacters = /* @__PURE__ */ Object.create(null); - function register(id, fontCharacter) { - if (isString(fontCharacter)) { - const val = _codiconFontCharacters[fontCharacter]; - if (val === void 0) { - throw new Error(`${id} references an unknown codicon: ${fontCharacter}`); - } - fontCharacter = val; - } - _codiconFontCharacters[id] = fontCharacter; - return { id }; - } - var Codicon = { - // built-in icons, with image name - add: register("add", 6e4), - plus: register("plus", 6e4), - gistNew: register("gist-new", 6e4), - repoCreate: register("repo-create", 6e4), - lightbulb: register("lightbulb", 60001), - lightBulb: register("light-bulb", 60001), - repo: register("repo", 60002), - repoDelete: register("repo-delete", 60002), - gistFork: register("gist-fork", 60003), - repoForked: register("repo-forked", 60003), - gitPullRequest: register("git-pull-request", 60004), - gitPullRequestAbandoned: register("git-pull-request-abandoned", 60004), - recordKeys: register("record-keys", 60005), - keyboard: register("keyboard", 60005), - tag: register("tag", 60006), - tagAdd: register("tag-add", 60006), - tagRemove: register("tag-remove", 60006), - gitPullRequestLabel: register("git-pull-request-label", 60006), - person: register("person", 60007), - personFollow: register("person-follow", 60007), - personOutline: register("person-outline", 60007), - personFilled: register("person-filled", 60007), - gitBranch: register("git-branch", 60008), - gitBranchCreate: register("git-branch-create", 60008), - gitBranchDelete: register("git-branch-delete", 60008), - sourceControl: register("source-control", 60008), - mirror: register("mirror", 60009), - mirrorPublic: register("mirror-public", 60009), - star: register("star", 60010), - starAdd: register("star-add", 60010), - starDelete: register("star-delete", 60010), - starEmpty: register("star-empty", 60010), - comment: register("comment", 60011), - commentAdd: register("comment-add", 60011), - alert: register("alert", 60012), - warning: register("warning", 60012), - search: register("search", 60013), - searchSave: register("search-save", 60013), - logOut: register("log-out", 60014), - signOut: register("sign-out", 60014), - logIn: register("log-in", 60015), - signIn: register("sign-in", 60015), - eye: register("eye", 60016), - eyeUnwatch: register("eye-unwatch", 60016), - eyeWatch: register("eye-watch", 60016), - circleFilled: register("circle-filled", 60017), - primitiveDot: register("primitive-dot", 60017), - closeDirty: register("close-dirty", 60017), - debugBreakpoint: register("debug-breakpoint", 60017), - debugBreakpointDisabled: register("debug-breakpoint-disabled", 60017), - debugBreakpointPending: register("debug-breakpoint-pending", 60377), - debugHint: register("debug-hint", 60017), - primitiveSquare: register("primitive-square", 60018), - edit: register("edit", 60019), - pencil: register("pencil", 60019), - info: register("info", 60020), - issueOpened: register("issue-opened", 60020), - gistPrivate: register("gist-private", 60021), - gitForkPrivate: register("git-fork-private", 60021), - lock: register("lock", 60021), - mirrorPrivate: register("mirror-private", 60021), - close: register("close", 60022), - removeClose: register("remove-close", 60022), - x: register("x", 60022), - repoSync: register("repo-sync", 60023), - sync: register("sync", 60023), - clone: register("clone", 60024), - desktopDownload: register("desktop-download", 60024), - beaker: register("beaker", 60025), - microscope: register("microscope", 60025), - vm: register("vm", 60026), - deviceDesktop: register("device-desktop", 60026), - file: register("file", 60027), - fileText: register("file-text", 60027), - more: register("more", 60028), - ellipsis: register("ellipsis", 60028), - kebabHorizontal: register("kebab-horizontal", 60028), - mailReply: register("mail-reply", 60029), - reply: register("reply", 60029), - organization: register("organization", 60030), - organizationFilled: register("organization-filled", 60030), - organizationOutline: register("organization-outline", 60030), - newFile: register("new-file", 60031), - fileAdd: register("file-add", 60031), - newFolder: register("new-folder", 60032), - fileDirectoryCreate: register("file-directory-create", 60032), - trash: register("trash", 60033), - trashcan: register("trashcan", 60033), - history: register("history", 60034), - clock: register("clock", 60034), - folder: register("folder", 60035), - fileDirectory: register("file-directory", 60035), - symbolFolder: register("symbol-folder", 60035), - logoGithub: register("logo-github", 60036), - markGithub: register("mark-github", 60036), - github: register("github", 60036), - terminal: register("terminal", 60037), - console: register("console", 60037), - repl: register("repl", 60037), - zap: register("zap", 60038), - symbolEvent: register("symbol-event", 60038), - error: register("error", 60039), - stop: register("stop", 60039), - variable: register("variable", 60040), - symbolVariable: register("symbol-variable", 60040), - array: register("array", 60042), - symbolArray: register("symbol-array", 60042), - symbolModule: register("symbol-module", 60043), - symbolPackage: register("symbol-package", 60043), - symbolNamespace: register("symbol-namespace", 60043), - symbolObject: register("symbol-object", 60043), - symbolMethod: register("symbol-method", 60044), - symbolFunction: register("symbol-function", 60044), - symbolConstructor: register("symbol-constructor", 60044), - symbolBoolean: register("symbol-boolean", 60047), - symbolNull: register("symbol-null", 60047), - symbolNumeric: register("symbol-numeric", 60048), - symbolNumber: register("symbol-number", 60048), - symbolStructure: register("symbol-structure", 60049), - symbolStruct: register("symbol-struct", 60049), - symbolParameter: register("symbol-parameter", 60050), - symbolTypeParameter: register("symbol-type-parameter", 60050), - symbolKey: register("symbol-key", 60051), - symbolText: register("symbol-text", 60051), - symbolReference: register("symbol-reference", 60052), - goToFile: register("go-to-file", 60052), - symbolEnum: register("symbol-enum", 60053), - symbolValue: register("symbol-value", 60053), - symbolRuler: register("symbol-ruler", 60054), - symbolUnit: register("symbol-unit", 60054), - activateBreakpoints: register("activate-breakpoints", 60055), - archive: register("archive", 60056), - arrowBoth: register("arrow-both", 60057), - arrowDown: register("arrow-down", 60058), - arrowLeft: register("arrow-left", 60059), - arrowRight: register("arrow-right", 60060), - arrowSmallDown: register("arrow-small-down", 60061), - arrowSmallLeft: register("arrow-small-left", 60062), - arrowSmallRight: register("arrow-small-right", 60063), - arrowSmallUp: register("arrow-small-up", 60064), - arrowUp: register("arrow-up", 60065), - bell: register("bell", 60066), - bold: register("bold", 60067), - book: register("book", 60068), - bookmark: register("bookmark", 60069), - debugBreakpointConditionalUnverified: register("debug-breakpoint-conditional-unverified", 60070), - debugBreakpointConditional: register("debug-breakpoint-conditional", 60071), - debugBreakpointConditionalDisabled: register("debug-breakpoint-conditional-disabled", 60071), - debugBreakpointDataUnverified: register("debug-breakpoint-data-unverified", 60072), - debugBreakpointData: register("debug-breakpoint-data", 60073), - debugBreakpointDataDisabled: register("debug-breakpoint-data-disabled", 60073), - debugBreakpointLogUnverified: register("debug-breakpoint-log-unverified", 60074), - debugBreakpointLog: register("debug-breakpoint-log", 60075), - debugBreakpointLogDisabled: register("debug-breakpoint-log-disabled", 60075), - briefcase: register("briefcase", 60076), - broadcast: register("broadcast", 60077), - browser: register("browser", 60078), - bug: register("bug", 60079), - calendar: register("calendar", 60080), - caseSensitive: register("case-sensitive", 60081), - check: register("check", 60082), - checklist: register("checklist", 60083), - chevronDown: register("chevron-down", 60084), - dropDownButton: register("drop-down-button", 60084), - chevronLeft: register("chevron-left", 60085), - chevronRight: register("chevron-right", 60086), - chevronUp: register("chevron-up", 60087), - chromeClose: register("chrome-close", 60088), - chromeMaximize: register("chrome-maximize", 60089), - chromeMinimize: register("chrome-minimize", 60090), - chromeRestore: register("chrome-restore", 60091), - circle: register("circle", 60092), - circleOutline: register("circle-outline", 60092), - debugBreakpointUnverified: register("debug-breakpoint-unverified", 60092), - circleSlash: register("circle-slash", 60093), - circuitBoard: register("circuit-board", 60094), - clearAll: register("clear-all", 60095), - clippy: register("clippy", 60096), - closeAll: register("close-all", 60097), - cloudDownload: register("cloud-download", 60098), - cloudUpload: register("cloud-upload", 60099), - code: register("code", 60100), - collapseAll: register("collapse-all", 60101), - colorMode: register("color-mode", 60102), - commentDiscussion: register("comment-discussion", 60103), - compareChanges: register("compare-changes", 60157), - creditCard: register("credit-card", 60105), - dash: register("dash", 60108), - dashboard: register("dashboard", 60109), - database: register("database", 60110), - debugContinue: register("debug-continue", 60111), - debugDisconnect: register("debug-disconnect", 60112), - debugPause: register("debug-pause", 60113), - debugRestart: register("debug-restart", 60114), - debugStart: register("debug-start", 60115), - debugStepInto: register("debug-step-into", 60116), - debugStepOut: register("debug-step-out", 60117), - debugStepOver: register("debug-step-over", 60118), - debugStop: register("debug-stop", 60119), - debug: register("debug", 60120), - deviceCameraVideo: register("device-camera-video", 60121), - deviceCamera: register("device-camera", 60122), - deviceMobile: register("device-mobile", 60123), - diffAdded: register("diff-added", 60124), - diffIgnored: register("diff-ignored", 60125), - diffModified: register("diff-modified", 60126), - diffRemoved: register("diff-removed", 60127), - diffRenamed: register("diff-renamed", 60128), - diff: register("diff", 60129), - discard: register("discard", 60130), - editorLayout: register("editor-layout", 60131), - emptyWindow: register("empty-window", 60132), - exclude: register("exclude", 60133), - extensions: register("extensions", 60134), - eyeClosed: register("eye-closed", 60135), - fileBinary: register("file-binary", 60136), - fileCode: register("file-code", 60137), - fileMedia: register("file-media", 60138), - filePdf: register("file-pdf", 60139), - fileSubmodule: register("file-submodule", 60140), - fileSymlinkDirectory: register("file-symlink-directory", 60141), - fileSymlinkFile: register("file-symlink-file", 60142), - fileZip: register("file-zip", 60143), - files: register("files", 60144), - filter: register("filter", 60145), - flame: register("flame", 60146), - foldDown: register("fold-down", 60147), - foldUp: register("fold-up", 60148), - fold: register("fold", 60149), - folderActive: register("folder-active", 60150), - folderOpened: register("folder-opened", 60151), - gear: register("gear", 60152), - gift: register("gift", 60153), - gistSecret: register("gist-secret", 60154), - gist: register("gist", 60155), - gitCommit: register("git-commit", 60156), - gitCompare: register("git-compare", 60157), - gitMerge: register("git-merge", 60158), - githubAction: register("github-action", 60159), - githubAlt: register("github-alt", 60160), - globe: register("globe", 60161), - grabber: register("grabber", 60162), - graph: register("graph", 60163), - gripper: register("gripper", 60164), - heart: register("heart", 60165), - home: register("home", 60166), - horizontalRule: register("horizontal-rule", 60167), - hubot: register("hubot", 60168), - inbox: register("inbox", 60169), - issueClosed: register("issue-closed", 60324), - issueReopened: register("issue-reopened", 60171), - issues: register("issues", 60172), - italic: register("italic", 60173), - jersey: register("jersey", 60174), - json: register("json", 60175), - bracket: register("bracket", 60175), - kebabVertical: register("kebab-vertical", 60176), - key: register("key", 60177), - law: register("law", 60178), - lightbulbAutofix: register("lightbulb-autofix", 60179), - linkExternal: register("link-external", 60180), - link: register("link", 60181), - listOrdered: register("list-ordered", 60182), - listUnordered: register("list-unordered", 60183), - liveShare: register("live-share", 60184), - loading: register("loading", 60185), - location: register("location", 60186), - mailRead: register("mail-read", 60187), - mail: register("mail", 60188), - markdown: register("markdown", 60189), - megaphone: register("megaphone", 60190), - mention: register("mention", 60191), - milestone: register("milestone", 60192), - gitPullRequestMilestone: register("git-pull-request-milestone", 60192), - mortarBoard: register("mortar-board", 60193), - move: register("move", 60194), - multipleWindows: register("multiple-windows", 60195), - mute: register("mute", 60196), - noNewline: register("no-newline", 60197), - note: register("note", 60198), - octoface: register("octoface", 60199), - openPreview: register("open-preview", 60200), - package: register("package", 60201), - paintcan: register("paintcan", 60202), - pin: register("pin", 60203), - play: register("play", 60204), - run: register("run", 60204), - plug: register("plug", 60205), - preserveCase: register("preserve-case", 60206), - preview: register("preview", 60207), - project: register("project", 60208), - pulse: register("pulse", 60209), - question: register("question", 60210), - quote: register("quote", 60211), - radioTower: register("radio-tower", 60212), - reactions: register("reactions", 60213), - references: register("references", 60214), - refresh: register("refresh", 60215), - regex: register("regex", 60216), - remoteExplorer: register("remote-explorer", 60217), - remote: register("remote", 60218), - remove: register("remove", 60219), - replaceAll: register("replace-all", 60220), - replace: register("replace", 60221), - repoClone: register("repo-clone", 60222), - repoForcePush: register("repo-force-push", 60223), - repoPull: register("repo-pull", 60224), - repoPush: register("repo-push", 60225), - report: register("report", 60226), - requestChanges: register("request-changes", 60227), - rocket: register("rocket", 60228), - rootFolderOpened: register("root-folder-opened", 60229), - rootFolder: register("root-folder", 60230), - rss: register("rss", 60231), - ruby: register("ruby", 60232), - saveAll: register("save-all", 60233), - saveAs: register("save-as", 60234), - save: register("save", 60235), - screenFull: register("screen-full", 60236), - screenNormal: register("screen-normal", 60237), - searchStop: register("search-stop", 60238), - server: register("server", 60240), - settingsGear: register("settings-gear", 60241), - settings: register("settings", 60242), - shield: register("shield", 60243), - smiley: register("smiley", 60244), - sortPrecedence: register("sort-precedence", 60245), - splitHorizontal: register("split-horizontal", 60246), - splitVertical: register("split-vertical", 60247), - squirrel: register("squirrel", 60248), - starFull: register("star-full", 60249), - starHalf: register("star-half", 60250), - symbolClass: register("symbol-class", 60251), - symbolColor: register("symbol-color", 60252), - symbolCustomColor: register("symbol-customcolor", 60252), - symbolConstant: register("symbol-constant", 60253), - symbolEnumMember: register("symbol-enum-member", 60254), - symbolField: register("symbol-field", 60255), - symbolFile: register("symbol-file", 60256), - symbolInterface: register("symbol-interface", 60257), - symbolKeyword: register("symbol-keyword", 60258), - symbolMisc: register("symbol-misc", 60259), - symbolOperator: register("symbol-operator", 60260), - symbolProperty: register("symbol-property", 60261), - wrench: register("wrench", 60261), - wrenchSubaction: register("wrench-subaction", 60261), - symbolSnippet: register("symbol-snippet", 60262), - tasklist: register("tasklist", 60263), - telescope: register("telescope", 60264), - textSize: register("text-size", 60265), - threeBars: register("three-bars", 60266), - thumbsdown: register("thumbsdown", 60267), - thumbsup: register("thumbsup", 60268), - tools: register("tools", 60269), - triangleDown: register("triangle-down", 60270), - triangleLeft: register("triangle-left", 60271), - triangleRight: register("triangle-right", 60272), - triangleUp: register("triangle-up", 60273), - twitter: register("twitter", 60274), - unfold: register("unfold", 60275), - unlock: register("unlock", 60276), - unmute: register("unmute", 60277), - unverified: register("unverified", 60278), - verified: register("verified", 60279), - versions: register("versions", 60280), - vmActive: register("vm-active", 60281), - vmOutline: register("vm-outline", 60282), - vmRunning: register("vm-running", 60283), - watch: register("watch", 60284), - whitespace: register("whitespace", 60285), - wholeWord: register("whole-word", 60286), - window: register("window", 60287), - wordWrap: register("word-wrap", 60288), - zoomIn: register("zoom-in", 60289), - zoomOut: register("zoom-out", 60290), - listFilter: register("list-filter", 60291), - listFlat: register("list-flat", 60292), - listSelection: register("list-selection", 60293), - selection: register("selection", 60293), - listTree: register("list-tree", 60294), - debugBreakpointFunctionUnverified: register("debug-breakpoint-function-unverified", 60295), - debugBreakpointFunction: register("debug-breakpoint-function", 60296), - debugBreakpointFunctionDisabled: register("debug-breakpoint-function-disabled", 60296), - debugStackframeActive: register("debug-stackframe-active", 60297), - circleSmallFilled: register("circle-small-filled", 60298), - debugStackframeDot: register("debug-stackframe-dot", 60298), - debugStackframe: register("debug-stackframe", 60299), - debugStackframeFocused: register("debug-stackframe-focused", 60299), - debugBreakpointUnsupported: register("debug-breakpoint-unsupported", 60300), - symbolString: register("symbol-string", 60301), - debugReverseContinue: register("debug-reverse-continue", 60302), - debugStepBack: register("debug-step-back", 60303), - debugRestartFrame: register("debug-restart-frame", 60304), - callIncoming: register("call-incoming", 60306), - callOutgoing: register("call-outgoing", 60307), - menu: register("menu", 60308), - expandAll: register("expand-all", 60309), - feedback: register("feedback", 60310), - gitPullRequestReviewer: register("git-pull-request-reviewer", 60310), - groupByRefType: register("group-by-ref-type", 60311), - ungroupByRefType: register("ungroup-by-ref-type", 60312), - account: register("account", 60313), - gitPullRequestAssignee: register("git-pull-request-assignee", 60313), - bellDot: register("bell-dot", 60314), - debugConsole: register("debug-console", 60315), - library: register("library", 60316), - output: register("output", 60317), - runAll: register("run-all", 60318), - syncIgnored: register("sync-ignored", 60319), - pinned: register("pinned", 60320), - githubInverted: register("github-inverted", 60321), - debugAlt: register("debug-alt", 60305), - serverProcess: register("server-process", 60322), - serverEnvironment: register("server-environment", 60323), - pass: register("pass", 60324), - stopCircle: register("stop-circle", 60325), - playCircle: register("play-circle", 60326), - record: register("record", 60327), - debugAltSmall: register("debug-alt-small", 60328), - vmConnect: register("vm-connect", 60329), - cloud: register("cloud", 60330), - merge: register("merge", 60331), - exportIcon: register("export", 60332), - graphLeft: register("graph-left", 60333), - magnet: register("magnet", 60334), - notebook: register("notebook", 60335), - redo: register("redo", 60336), - checkAll: register("check-all", 60337), - pinnedDirty: register("pinned-dirty", 60338), - passFilled: register("pass-filled", 60339), - circleLargeFilled: register("circle-large-filled", 60340), - circleLarge: register("circle-large", 60341), - circleLargeOutline: register("circle-large-outline", 60341), - combine: register("combine", 60342), - gather: register("gather", 60342), - table: register("table", 60343), - variableGroup: register("variable-group", 60344), - typeHierarchy: register("type-hierarchy", 60345), - typeHierarchySub: register("type-hierarchy-sub", 60346), - typeHierarchySuper: register("type-hierarchy-super", 60347), - gitPullRequestCreate: register("git-pull-request-create", 60348), - runAbove: register("run-above", 60349), - runBelow: register("run-below", 60350), - notebookTemplate: register("notebook-template", 60351), - debugRerun: register("debug-rerun", 60352), - workspaceTrusted: register("workspace-trusted", 60353), - workspaceUntrusted: register("workspace-untrusted", 60354), - workspaceUnspecified: register("workspace-unspecified", 60355), - terminalCmd: register("terminal-cmd", 60356), - terminalDebian: register("terminal-debian", 60357), - terminalLinux: register("terminal-linux", 60358), - terminalPowershell: register("terminal-powershell", 60359), - terminalTmux: register("terminal-tmux", 60360), - terminalUbuntu: register("terminal-ubuntu", 60361), - terminalBash: register("terminal-bash", 60362), - arrowSwap: register("arrow-swap", 60363), - copy: register("copy", 60364), - personAdd: register("person-add", 60365), - filterFilled: register("filter-filled", 60366), - wand: register("wand", 60367), - debugLineByLine: register("debug-line-by-line", 60368), - inspect: register("inspect", 60369), - layers: register("layers", 60370), - layersDot: register("layers-dot", 60371), - layersActive: register("layers-active", 60372), - compass: register("compass", 60373), - compassDot: register("compass-dot", 60374), - compassActive: register("compass-active", 60375), - azure: register("azure", 60376), - issueDraft: register("issue-draft", 60377), - gitPullRequestClosed: register("git-pull-request-closed", 60378), - gitPullRequestDraft: register("git-pull-request-draft", 60379), - debugAll: register("debug-all", 60380), - debugCoverage: register("debug-coverage", 60381), - runErrors: register("run-errors", 60382), - folderLibrary: register("folder-library", 60383), - debugContinueSmall: register("debug-continue-small", 60384), - beakerStop: register("beaker-stop", 60385), - graphLine: register("graph-line", 60386), - graphScatter: register("graph-scatter", 60387), - pieChart: register("pie-chart", 60388), - bracketDot: register("bracket-dot", 60389), - bracketError: register("bracket-error", 60390), - lockSmall: register("lock-small", 60391), - azureDevops: register("azure-devops", 60392), - verifiedFilled: register("verified-filled", 60393), - newLine: register("newline", 60394), - layout: register("layout", 60395), - layoutActivitybarLeft: register("layout-activitybar-left", 60396), - layoutActivitybarRight: register("layout-activitybar-right", 60397), - layoutPanelLeft: register("layout-panel-left", 60398), - layoutPanelCenter: register("layout-panel-center", 60399), - layoutPanelJustify: register("layout-panel-justify", 60400), - layoutPanelRight: register("layout-panel-right", 60401), - layoutPanel: register("layout-panel", 60402), - layoutSidebarLeft: register("layout-sidebar-left", 60403), - layoutSidebarRight: register("layout-sidebar-right", 60404), - layoutStatusbar: register("layout-statusbar", 60405), - layoutMenubar: register("layout-menubar", 60406), - layoutCentered: register("layout-centered", 60407), - layoutSidebarRightOff: register("layout-sidebar-right-off", 60416), - layoutPanelOff: register("layout-panel-off", 60417), - layoutSidebarLeftOff: register("layout-sidebar-left-off", 60418), - target: register("target", 60408), - indent: register("indent", 60409), - recordSmall: register("record-small", 60410), - errorSmall: register("error-small", 60411), - arrowCircleDown: register("arrow-circle-down", 60412), - arrowCircleLeft: register("arrow-circle-left", 60413), - arrowCircleRight: register("arrow-circle-right", 60414), - arrowCircleUp: register("arrow-circle-up", 60415), - heartFilled: register("heart-filled", 60420), - map: register("map", 60421), - mapFilled: register("map-filled", 60422), - circleSmall: register("circle-small", 60423), - bellSlash: register("bell-slash", 60424), - bellSlashDot: register("bell-slash-dot", 60425), - commentUnresolved: register("comment-unresolved", 60426), - gitPullRequestGoToChanges: register("git-pull-request-go-to-changes", 60427), - gitPullRequestNewChanges: register("git-pull-request-new-changes", 60428), - searchFuzzy: register("search-fuzzy", 60429), - commentDraft: register("comment-draft", 60430), - send: register("send", 60431), - sparkle: register("sparkle", 60432), - insert: register("insert", 60433), - mic: register("mic", 60434), - thumbsDownFilled: register("thumbsdown-filled", 60435), - thumbsUpFilled: register("thumbsup-filled", 60436), - coffee: register("coffee", 60437), - snake: register("snake", 60438), - game: register("game", 60439), - vr: register("vr", 60440), - chip: register("chip", 60441), - piano: register("piano", 60442), - music: register("music", 60443), - micFilled: register("mic-filled", 60444), - gitFetch: register("git-fetch", 60445), - copilot: register("copilot", 60446), - lightbulbSparkle: register("lightbulb-sparkle", 60447), - lightbulbSparkleAutofix: register("lightbulb-sparkle-autofix", 60447), - robot: register("robot", 60448), - sparkleFilled: register("sparkle-filled", 60449), - diffSingle: register("diff-single", 60450), - diffMultiple: register("diff-multiple", 60451), - surroundWith: register("surround-with", 60452), - gitStash: register("git-stash", 60454), - gitStashApply: register("git-stash-apply", 60455), - gitStashPop: register("git-stash-pop", 60456), - // derived icons, that could become separate icons - dialogError: register("dialog-error", "error"), - dialogWarning: register("dialog-warning", "warning"), - dialogInfo: register("dialog-info", "info"), - dialogClose: register("dialog-close", "close"), - treeItemExpanded: register("tree-item-expanded", "chevron-down"), - // collapsed is done with rotation - treeFilterOnTypeOn: register("tree-filter-on-type-on", "list-filter"), - treeFilterOnTypeOff: register("tree-filter-on-type-off", "list-selection"), - treeFilterClear: register("tree-filter-clear", "close"), - treeItemLoading: register("tree-item-loading", "loading"), - menuSelection: register("menu-selection", "check"), - menuSubmenu: register("menu-submenu", "chevron-right"), - menuBarMore: register("menubar-more", "more"), - scrollbarButtonLeft: register("scrollbar-button-left", "triangle-left"), - scrollbarButtonRight: register("scrollbar-button-right", "triangle-right"), - scrollbarButtonUp: register("scrollbar-button-up", "triangle-up"), - scrollbarButtonDown: register("scrollbar-button-down", "triangle-down"), - toolBarMore: register("toolbar-more", "more"), - quickInputBack: register("quick-input-back", "arrow-left") - }; - - // node_modules/monaco-editor/esm/vs/editor/common/tokenizationRegistry.js - var TokenizationRegistry = class { - constructor() { - this._tokenizationSupports = /* @__PURE__ */ new Map(); - this._factories = /* @__PURE__ */ new Map(); - this._onDidChange = new Emitter(); - this.onDidChange = this._onDidChange.event; - this._colorMap = null; - } - handleChange(languageIds) { - this._onDidChange.fire({ - changedLanguages: languageIds, - changedColorMap: false - }); - } - register(languageId, support) { - this._tokenizationSupports.set(languageId, support); - this.handleChange([languageId]); - return toDisposable(() => { - if (this._tokenizationSupports.get(languageId) !== support) { - return; - } - this._tokenizationSupports.delete(languageId); - this.handleChange([languageId]); - }); - } - get(languageId) { - return this._tokenizationSupports.get(languageId) || null; - } - registerFactory(languageId, factory) { - var _a4; - (_a4 = this._factories.get(languageId)) === null || _a4 === void 0 ? void 0 : _a4.dispose(); - const myData = new TokenizationSupportFactoryData(this, languageId, factory); - this._factories.set(languageId, myData); - return toDisposable(() => { - const v = this._factories.get(languageId); - if (!v || v !== myData) { - return; - } - this._factories.delete(languageId); - v.dispose(); - }); - } - async getOrCreate(languageId) { - const tokenizationSupport = this.get(languageId); - if (tokenizationSupport) { - return tokenizationSupport; - } - const factory = this._factories.get(languageId); - if (!factory || factory.isResolved) { - return null; - } - await factory.resolve(); - return this.get(languageId); - } - isResolved(languageId) { - const tokenizationSupport = this.get(languageId); - if (tokenizationSupport) { - return true; - } - const factory = this._factories.get(languageId); - if (!factory || factory.isResolved) { - return true; - } - return false; - } - setColorMap(colorMap) { - this._colorMap = colorMap; - this._onDidChange.fire({ - changedLanguages: Array.from(this._tokenizationSupports.keys()), - changedColorMap: true - }); - } - getColorMap() { - return this._colorMap; - } - getDefaultBackground() { - if (this._colorMap && this._colorMap.length > 2) { - return this._colorMap[ - 2 - /* ColorId.DefaultBackground */ - ]; - } - return null; - } - }; - var TokenizationSupportFactoryData = class extends Disposable { - get isResolved() { - return this._isResolved; - } - constructor(_registry, _languageId, _factory) { - super(); - this._registry = _registry; - this._languageId = _languageId; - this._factory = _factory; - this._isDisposed = false; - this._resolvePromise = null; - this._isResolved = false; - } - dispose() { - this._isDisposed = true; - super.dispose(); - } - async resolve() { - if (!this._resolvePromise) { - this._resolvePromise = this._create(); - } - return this._resolvePromise; - } - async _create() { - const value = await this._factory.tokenizationSupport; - this._isResolved = true; - if (value && !this._isDisposed) { - this._register(this._registry.register(this._languageId, value)); - } - } - }; - - // node_modules/monaco-editor/esm/vs/editor/common/languages.js - var Token = class { - constructor(offset, type, language) { - this.offset = offset; - this.type = type; - this.language = language; - this._tokenBrand = void 0; - } - toString() { - return "(" + this.offset + ", " + this.type + ")"; - } - }; - var CompletionItemKinds; - (function(CompletionItemKinds2) { - const byKind = /* @__PURE__ */ new Map(); - byKind.set(0, Codicon.symbolMethod); - byKind.set(1, Codicon.symbolFunction); - byKind.set(2, Codicon.symbolConstructor); - byKind.set(3, Codicon.symbolField); - byKind.set(4, Codicon.symbolVariable); - byKind.set(5, Codicon.symbolClass); - byKind.set(6, Codicon.symbolStruct); - byKind.set(7, Codicon.symbolInterface); - byKind.set(8, Codicon.symbolModule); - byKind.set(9, Codicon.symbolProperty); - byKind.set(10, Codicon.symbolEvent); - byKind.set(11, Codicon.symbolOperator); - byKind.set(12, Codicon.symbolUnit); - byKind.set(13, Codicon.symbolValue); - byKind.set(15, Codicon.symbolEnum); - byKind.set(14, Codicon.symbolConstant); - byKind.set(15, Codicon.symbolEnum); - byKind.set(16, Codicon.symbolEnumMember); - byKind.set(17, Codicon.symbolKeyword); - byKind.set(27, Codicon.symbolSnippet); - byKind.set(18, Codicon.symbolText); - byKind.set(19, Codicon.symbolColor); - byKind.set(20, Codicon.symbolFile); - byKind.set(21, Codicon.symbolReference); - byKind.set(22, Codicon.symbolCustomColor); - byKind.set(23, Codicon.symbolFolder); - byKind.set(24, Codicon.symbolTypeParameter); - byKind.set(25, Codicon.account); - byKind.set(26, Codicon.issues); - function toIcon(kind) { - let codicon = byKind.get(kind); - if (!codicon) { - console.info("No codicon found for CompletionItemKind " + kind); - codicon = Codicon.symbolProperty; - } - return codicon; - } - CompletionItemKinds2.toIcon = toIcon; - const data = /* @__PURE__ */ new Map(); - data.set( - "method", - 0 - /* CompletionItemKind.Method */ - ); - data.set( - "function", - 1 - /* CompletionItemKind.Function */ - ); - data.set( - "constructor", - 2 - /* CompletionItemKind.Constructor */ - ); - data.set( - "field", - 3 - /* CompletionItemKind.Field */ - ); - data.set( - "variable", - 4 - /* CompletionItemKind.Variable */ - ); - data.set( - "class", - 5 - /* CompletionItemKind.Class */ - ); - data.set( - "struct", - 6 - /* CompletionItemKind.Struct */ - ); - data.set( - "interface", - 7 - /* CompletionItemKind.Interface */ - ); - data.set( - "module", - 8 - /* CompletionItemKind.Module */ - ); - data.set( - "property", - 9 - /* CompletionItemKind.Property */ - ); - data.set( - "event", - 10 - /* CompletionItemKind.Event */ - ); - data.set( - "operator", - 11 - /* CompletionItemKind.Operator */ - ); - data.set( - "unit", - 12 - /* CompletionItemKind.Unit */ - ); - data.set( - "value", - 13 - /* CompletionItemKind.Value */ - ); - data.set( - "constant", - 14 - /* CompletionItemKind.Constant */ - ); - data.set( - "enum", - 15 - /* CompletionItemKind.Enum */ - ); - data.set( - "enum-member", - 16 - /* CompletionItemKind.EnumMember */ - ); - data.set( - "enumMember", - 16 - /* CompletionItemKind.EnumMember */ - ); - data.set( - "keyword", - 17 - /* CompletionItemKind.Keyword */ - ); - data.set( - "snippet", - 27 - /* CompletionItemKind.Snippet */ - ); - data.set( - "text", - 18 - /* CompletionItemKind.Text */ - ); - data.set( - "color", - 19 - /* CompletionItemKind.Color */ - ); - data.set( - "file", - 20 - /* CompletionItemKind.File */ - ); - data.set( - "reference", - 21 - /* CompletionItemKind.Reference */ - ); - data.set( - "customcolor", - 22 - /* CompletionItemKind.Customcolor */ - ); - data.set( - "folder", - 23 - /* CompletionItemKind.Folder */ - ); - data.set( - "type-parameter", - 24 - /* CompletionItemKind.TypeParameter */ - ); - data.set( - "typeParameter", - 24 - /* CompletionItemKind.TypeParameter */ - ); - data.set( - "account", - 25 - /* CompletionItemKind.User */ - ); - data.set( - "issue", - 26 - /* CompletionItemKind.Issue */ - ); - function fromString(value, strict) { - let res = data.get(value); - if (typeof res === "undefined" && !strict) { - res = 9; - } - return res; - } - CompletionItemKinds2.fromString = fromString; - })(CompletionItemKinds || (CompletionItemKinds = {})); - var InlineCompletionTriggerKind; - (function(InlineCompletionTriggerKind3) { - InlineCompletionTriggerKind3[InlineCompletionTriggerKind3["Automatic"] = 0] = "Automatic"; - InlineCompletionTriggerKind3[InlineCompletionTriggerKind3["Explicit"] = 1] = "Explicit"; - })(InlineCompletionTriggerKind || (InlineCompletionTriggerKind = {})); - var SignatureHelpTriggerKind; - (function(SignatureHelpTriggerKind3) { - SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["Invoke"] = 1] = "Invoke"; - SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["TriggerCharacter"] = 2] = "TriggerCharacter"; - SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["ContentChange"] = 3] = "ContentChange"; - })(SignatureHelpTriggerKind || (SignatureHelpTriggerKind = {})); - var DocumentHighlightKind; - (function(DocumentHighlightKind3) { - DocumentHighlightKind3[DocumentHighlightKind3["Text"] = 0] = "Text"; - DocumentHighlightKind3[DocumentHighlightKind3["Read"] = 1] = "Read"; - DocumentHighlightKind3[DocumentHighlightKind3["Write"] = 2] = "Write"; - })(DocumentHighlightKind || (DocumentHighlightKind = {})); - var symbolKindNames = { - [ - 17 - /* SymbolKind.Array */ - ]: localize("Array", "array"), - [ - 16 - /* SymbolKind.Boolean */ - ]: localize("Boolean", "boolean"), - [ - 4 - /* SymbolKind.Class */ - ]: localize("Class", "class"), - [ - 13 - /* SymbolKind.Constant */ - ]: localize("Constant", "constant"), - [ - 8 - /* SymbolKind.Constructor */ - ]: localize("Constructor", "constructor"), - [ - 9 - /* SymbolKind.Enum */ - ]: localize("Enum", "enumeration"), - [ - 21 - /* SymbolKind.EnumMember */ - ]: localize("EnumMember", "enumeration member"), - [ - 23 - /* SymbolKind.Event */ - ]: localize("Event", "event"), - [ - 7 - /* SymbolKind.Field */ - ]: localize("Field", "field"), - [ - 0 - /* SymbolKind.File */ - ]: localize("File", "file"), - [ - 11 - /* SymbolKind.Function */ - ]: localize("Function", "function"), - [ - 10 - /* SymbolKind.Interface */ - ]: localize("Interface", "interface"), - [ - 19 - /* SymbolKind.Key */ - ]: localize("Key", "key"), - [ - 5 - /* SymbolKind.Method */ - ]: localize("Method", "method"), - [ - 1 - /* SymbolKind.Module */ - ]: localize("Module", "module"), - [ - 2 - /* SymbolKind.Namespace */ - ]: localize("Namespace", "namespace"), - [ - 20 - /* SymbolKind.Null */ - ]: localize("Null", "null"), - [ - 15 - /* SymbolKind.Number */ - ]: localize("Number", "number"), - [ - 18 - /* SymbolKind.Object */ - ]: localize("Object", "object"), - [ - 24 - /* SymbolKind.Operator */ - ]: localize("Operator", "operator"), - [ - 3 - /* SymbolKind.Package */ - ]: localize("Package", "package"), - [ - 6 - /* SymbolKind.Property */ - ]: localize("Property", "property"), - [ - 14 - /* SymbolKind.String */ - ]: localize("String", "string"), - [ - 22 - /* SymbolKind.Struct */ - ]: localize("Struct", "struct"), - [ - 25 - /* SymbolKind.TypeParameter */ - ]: localize("TypeParameter", "type parameter"), - [ - 12 - /* SymbolKind.Variable */ - ]: localize("Variable", "variable") - }; - var SymbolKinds; - (function(SymbolKinds2) { - const byKind = /* @__PURE__ */ new Map(); - byKind.set(0, Codicon.symbolFile); - byKind.set(1, Codicon.symbolModule); - byKind.set(2, Codicon.symbolNamespace); - byKind.set(3, Codicon.symbolPackage); - byKind.set(4, Codicon.symbolClass); - byKind.set(5, Codicon.symbolMethod); - byKind.set(6, Codicon.symbolProperty); - byKind.set(7, Codicon.symbolField); - byKind.set(8, Codicon.symbolConstructor); - byKind.set(9, Codicon.symbolEnum); - byKind.set(10, Codicon.symbolInterface); - byKind.set(11, Codicon.symbolFunction); - byKind.set(12, Codicon.symbolVariable); - byKind.set(13, Codicon.symbolConstant); - byKind.set(14, Codicon.symbolString); - byKind.set(15, Codicon.symbolNumber); - byKind.set(16, Codicon.symbolBoolean); - byKind.set(17, Codicon.symbolArray); - byKind.set(18, Codicon.symbolObject); - byKind.set(19, Codicon.symbolKey); - byKind.set(20, Codicon.symbolNull); - byKind.set(21, Codicon.symbolEnumMember); - byKind.set(22, Codicon.symbolStruct); - byKind.set(23, Codicon.symbolEvent); - byKind.set(24, Codicon.symbolOperator); - byKind.set(25, Codicon.symbolTypeParameter); - function toIcon(kind) { - let icon = byKind.get(kind); - if (!icon) { - console.info("No codicon found for SymbolKind " + kind); - icon = Codicon.symbolProperty; - } - return icon; - } - SymbolKinds2.toIcon = toIcon; - })(SymbolKinds || (SymbolKinds = {})); - var FoldingRangeKind = class _FoldingRangeKind { - /** - * Returns a {@link FoldingRangeKind} for the given value. - * - * @param value of the kind. - */ - static fromValue(value) { - switch (value) { - case "comment": - return _FoldingRangeKind.Comment; - case "imports": - return _FoldingRangeKind.Imports; - case "region": - return _FoldingRangeKind.Region; - } - return new _FoldingRangeKind(value); - } - /** - * Creates a new {@link FoldingRangeKind}. - * - * @param value of the kind. - */ - constructor(value) { - this.value = value; - } - }; - FoldingRangeKind.Comment = new FoldingRangeKind("comment"); - FoldingRangeKind.Imports = new FoldingRangeKind("imports"); - FoldingRangeKind.Region = new FoldingRangeKind("region"); - var Command; - (function(Command2) { - function is(obj) { - if (!obj || typeof obj !== "object") { - return false; - } - return typeof obj.id === "string" && typeof obj.title === "string"; - } - Command2.is = is; - })(Command || (Command = {})); - var InlayHintKind; - (function(InlayHintKind3) { - InlayHintKind3[InlayHintKind3["Type"] = 1] = "Type"; - InlayHintKind3[InlayHintKind3["Parameter"] = 2] = "Parameter"; - })(InlayHintKind || (InlayHintKind = {})); - var TokenizationRegistry2 = new TokenizationRegistry(); - - // node_modules/monaco-editor/esm/vs/editor/common/standalone/standaloneEnums.js - var AccessibilitySupport; - (function(AccessibilitySupport2) { - AccessibilitySupport2[AccessibilitySupport2["Unknown"] = 0] = "Unknown"; - AccessibilitySupport2[AccessibilitySupport2["Disabled"] = 1] = "Disabled"; - AccessibilitySupport2[AccessibilitySupport2["Enabled"] = 2] = "Enabled"; - })(AccessibilitySupport || (AccessibilitySupport = {})); - var CodeActionTriggerType; - (function(CodeActionTriggerType2) { - CodeActionTriggerType2[CodeActionTriggerType2["Invoke"] = 1] = "Invoke"; - CodeActionTriggerType2[CodeActionTriggerType2["Auto"] = 2] = "Auto"; - })(CodeActionTriggerType || (CodeActionTriggerType = {})); - var CompletionItemInsertTextRule; - (function(CompletionItemInsertTextRule2) { - CompletionItemInsertTextRule2[CompletionItemInsertTextRule2["None"] = 0] = "None"; - CompletionItemInsertTextRule2[CompletionItemInsertTextRule2["KeepWhitespace"] = 1] = "KeepWhitespace"; - CompletionItemInsertTextRule2[CompletionItemInsertTextRule2["InsertAsSnippet"] = 4] = "InsertAsSnippet"; - })(CompletionItemInsertTextRule || (CompletionItemInsertTextRule = {})); - var CompletionItemKind; - (function(CompletionItemKind2) { - CompletionItemKind2[CompletionItemKind2["Method"] = 0] = "Method"; - CompletionItemKind2[CompletionItemKind2["Function"] = 1] = "Function"; - CompletionItemKind2[CompletionItemKind2["Constructor"] = 2] = "Constructor"; - CompletionItemKind2[CompletionItemKind2["Field"] = 3] = "Field"; - CompletionItemKind2[CompletionItemKind2["Variable"] = 4] = "Variable"; - CompletionItemKind2[CompletionItemKind2["Class"] = 5] = "Class"; - CompletionItemKind2[CompletionItemKind2["Struct"] = 6] = "Struct"; - CompletionItemKind2[CompletionItemKind2["Interface"] = 7] = "Interface"; - CompletionItemKind2[CompletionItemKind2["Module"] = 8] = "Module"; - CompletionItemKind2[CompletionItemKind2["Property"] = 9] = "Property"; - CompletionItemKind2[CompletionItemKind2["Event"] = 10] = "Event"; - CompletionItemKind2[CompletionItemKind2["Operator"] = 11] = "Operator"; - CompletionItemKind2[CompletionItemKind2["Unit"] = 12] = "Unit"; - CompletionItemKind2[CompletionItemKind2["Value"] = 13] = "Value"; - CompletionItemKind2[CompletionItemKind2["Constant"] = 14] = "Constant"; - CompletionItemKind2[CompletionItemKind2["Enum"] = 15] = "Enum"; - CompletionItemKind2[CompletionItemKind2["EnumMember"] = 16] = "EnumMember"; - CompletionItemKind2[CompletionItemKind2["Keyword"] = 17] = "Keyword"; - CompletionItemKind2[CompletionItemKind2["Text"] = 18] = "Text"; - CompletionItemKind2[CompletionItemKind2["Color"] = 19] = "Color"; - CompletionItemKind2[CompletionItemKind2["File"] = 20] = "File"; - CompletionItemKind2[CompletionItemKind2["Reference"] = 21] = "Reference"; - CompletionItemKind2[CompletionItemKind2["Customcolor"] = 22] = "Customcolor"; - CompletionItemKind2[CompletionItemKind2["Folder"] = 23] = "Folder"; - CompletionItemKind2[CompletionItemKind2["TypeParameter"] = 24] = "TypeParameter"; - CompletionItemKind2[CompletionItemKind2["User"] = 25] = "User"; - CompletionItemKind2[CompletionItemKind2["Issue"] = 26] = "Issue"; - CompletionItemKind2[CompletionItemKind2["Snippet"] = 27] = "Snippet"; - })(CompletionItemKind || (CompletionItemKind = {})); - var CompletionItemTag; - (function(CompletionItemTag2) { - CompletionItemTag2[CompletionItemTag2["Deprecated"] = 1] = "Deprecated"; - })(CompletionItemTag || (CompletionItemTag = {})); - var CompletionTriggerKind; - (function(CompletionTriggerKind2) { - CompletionTriggerKind2[CompletionTriggerKind2["Invoke"] = 0] = "Invoke"; - CompletionTriggerKind2[CompletionTriggerKind2["TriggerCharacter"] = 1] = "TriggerCharacter"; - CompletionTriggerKind2[CompletionTriggerKind2["TriggerForIncompleteCompletions"] = 2] = "TriggerForIncompleteCompletions"; - })(CompletionTriggerKind || (CompletionTriggerKind = {})); - var ContentWidgetPositionPreference; - (function(ContentWidgetPositionPreference2) { - ContentWidgetPositionPreference2[ContentWidgetPositionPreference2["EXACT"] = 0] = "EXACT"; - ContentWidgetPositionPreference2[ContentWidgetPositionPreference2["ABOVE"] = 1] = "ABOVE"; - ContentWidgetPositionPreference2[ContentWidgetPositionPreference2["BELOW"] = 2] = "BELOW"; - })(ContentWidgetPositionPreference || (ContentWidgetPositionPreference = {})); - var CursorChangeReason; - (function(CursorChangeReason2) { - CursorChangeReason2[CursorChangeReason2["NotSet"] = 0] = "NotSet"; - CursorChangeReason2[CursorChangeReason2["ContentFlush"] = 1] = "ContentFlush"; - CursorChangeReason2[CursorChangeReason2["RecoverFromMarkers"] = 2] = "RecoverFromMarkers"; - CursorChangeReason2[CursorChangeReason2["Explicit"] = 3] = "Explicit"; - CursorChangeReason2[CursorChangeReason2["Paste"] = 4] = "Paste"; - CursorChangeReason2[CursorChangeReason2["Undo"] = 5] = "Undo"; - CursorChangeReason2[CursorChangeReason2["Redo"] = 6] = "Redo"; - })(CursorChangeReason || (CursorChangeReason = {})); - var DefaultEndOfLine; - (function(DefaultEndOfLine2) { - DefaultEndOfLine2[DefaultEndOfLine2["LF"] = 1] = "LF"; - DefaultEndOfLine2[DefaultEndOfLine2["CRLF"] = 2] = "CRLF"; - })(DefaultEndOfLine || (DefaultEndOfLine = {})); - var DocumentHighlightKind2; - (function(DocumentHighlightKind3) { - DocumentHighlightKind3[DocumentHighlightKind3["Text"] = 0] = "Text"; - DocumentHighlightKind3[DocumentHighlightKind3["Read"] = 1] = "Read"; - DocumentHighlightKind3[DocumentHighlightKind3["Write"] = 2] = "Write"; - })(DocumentHighlightKind2 || (DocumentHighlightKind2 = {})); - var EditorAutoIndentStrategy; - (function(EditorAutoIndentStrategy2) { - EditorAutoIndentStrategy2[EditorAutoIndentStrategy2["None"] = 0] = "None"; - EditorAutoIndentStrategy2[EditorAutoIndentStrategy2["Keep"] = 1] = "Keep"; - EditorAutoIndentStrategy2[EditorAutoIndentStrategy2["Brackets"] = 2] = "Brackets"; - EditorAutoIndentStrategy2[EditorAutoIndentStrategy2["Advanced"] = 3] = "Advanced"; - EditorAutoIndentStrategy2[EditorAutoIndentStrategy2["Full"] = 4] = "Full"; - })(EditorAutoIndentStrategy || (EditorAutoIndentStrategy = {})); - var EditorOption; - (function(EditorOption2) { - EditorOption2[EditorOption2["acceptSuggestionOnCommitCharacter"] = 0] = "acceptSuggestionOnCommitCharacter"; - EditorOption2[EditorOption2["acceptSuggestionOnEnter"] = 1] = "acceptSuggestionOnEnter"; - EditorOption2[EditorOption2["accessibilitySupport"] = 2] = "accessibilitySupport"; - EditorOption2[EditorOption2["accessibilityPageSize"] = 3] = "accessibilityPageSize"; - EditorOption2[EditorOption2["ariaLabel"] = 4] = "ariaLabel"; - EditorOption2[EditorOption2["ariaRequired"] = 5] = "ariaRequired"; - EditorOption2[EditorOption2["autoClosingBrackets"] = 6] = "autoClosingBrackets"; - EditorOption2[EditorOption2["autoClosingComments"] = 7] = "autoClosingComments"; - EditorOption2[EditorOption2["screenReaderAnnounceInlineSuggestion"] = 8] = "screenReaderAnnounceInlineSuggestion"; - EditorOption2[EditorOption2["autoClosingDelete"] = 9] = "autoClosingDelete"; - EditorOption2[EditorOption2["autoClosingOvertype"] = 10] = "autoClosingOvertype"; - EditorOption2[EditorOption2["autoClosingQuotes"] = 11] = "autoClosingQuotes"; - EditorOption2[EditorOption2["autoIndent"] = 12] = "autoIndent"; - EditorOption2[EditorOption2["automaticLayout"] = 13] = "automaticLayout"; - EditorOption2[EditorOption2["autoSurround"] = 14] = "autoSurround"; - EditorOption2[EditorOption2["bracketPairColorization"] = 15] = "bracketPairColorization"; - EditorOption2[EditorOption2["guides"] = 16] = "guides"; - EditorOption2[EditorOption2["codeLens"] = 17] = "codeLens"; - EditorOption2[EditorOption2["codeLensFontFamily"] = 18] = "codeLensFontFamily"; - EditorOption2[EditorOption2["codeLensFontSize"] = 19] = "codeLensFontSize"; - EditorOption2[EditorOption2["colorDecorators"] = 20] = "colorDecorators"; - EditorOption2[EditorOption2["colorDecoratorsLimit"] = 21] = "colorDecoratorsLimit"; - EditorOption2[EditorOption2["columnSelection"] = 22] = "columnSelection"; - EditorOption2[EditorOption2["comments"] = 23] = "comments"; - EditorOption2[EditorOption2["contextmenu"] = 24] = "contextmenu"; - EditorOption2[EditorOption2["copyWithSyntaxHighlighting"] = 25] = "copyWithSyntaxHighlighting"; - EditorOption2[EditorOption2["cursorBlinking"] = 26] = "cursorBlinking"; - EditorOption2[EditorOption2["cursorSmoothCaretAnimation"] = 27] = "cursorSmoothCaretAnimation"; - EditorOption2[EditorOption2["cursorStyle"] = 28] = "cursorStyle"; - EditorOption2[EditorOption2["cursorSurroundingLines"] = 29] = "cursorSurroundingLines"; - EditorOption2[EditorOption2["cursorSurroundingLinesStyle"] = 30] = "cursorSurroundingLinesStyle"; - EditorOption2[EditorOption2["cursorWidth"] = 31] = "cursorWidth"; - EditorOption2[EditorOption2["disableLayerHinting"] = 32] = "disableLayerHinting"; - EditorOption2[EditorOption2["disableMonospaceOptimizations"] = 33] = "disableMonospaceOptimizations"; - EditorOption2[EditorOption2["domReadOnly"] = 34] = "domReadOnly"; - EditorOption2[EditorOption2["dragAndDrop"] = 35] = "dragAndDrop"; - EditorOption2[EditorOption2["dropIntoEditor"] = 36] = "dropIntoEditor"; - EditorOption2[EditorOption2["emptySelectionClipboard"] = 37] = "emptySelectionClipboard"; - EditorOption2[EditorOption2["experimentalWhitespaceRendering"] = 38] = "experimentalWhitespaceRendering"; - EditorOption2[EditorOption2["extraEditorClassName"] = 39] = "extraEditorClassName"; - EditorOption2[EditorOption2["fastScrollSensitivity"] = 40] = "fastScrollSensitivity"; - EditorOption2[EditorOption2["find"] = 41] = "find"; - EditorOption2[EditorOption2["fixedOverflowWidgets"] = 42] = "fixedOverflowWidgets"; - EditorOption2[EditorOption2["folding"] = 43] = "folding"; - EditorOption2[EditorOption2["foldingStrategy"] = 44] = "foldingStrategy"; - EditorOption2[EditorOption2["foldingHighlight"] = 45] = "foldingHighlight"; - EditorOption2[EditorOption2["foldingImportsByDefault"] = 46] = "foldingImportsByDefault"; - EditorOption2[EditorOption2["foldingMaximumRegions"] = 47] = "foldingMaximumRegions"; - EditorOption2[EditorOption2["unfoldOnClickAfterEndOfLine"] = 48] = "unfoldOnClickAfterEndOfLine"; - EditorOption2[EditorOption2["fontFamily"] = 49] = "fontFamily"; - EditorOption2[EditorOption2["fontInfo"] = 50] = "fontInfo"; - EditorOption2[EditorOption2["fontLigatures"] = 51] = "fontLigatures"; - EditorOption2[EditorOption2["fontSize"] = 52] = "fontSize"; - EditorOption2[EditorOption2["fontWeight"] = 53] = "fontWeight"; - EditorOption2[EditorOption2["fontVariations"] = 54] = "fontVariations"; - EditorOption2[EditorOption2["formatOnPaste"] = 55] = "formatOnPaste"; - EditorOption2[EditorOption2["formatOnType"] = 56] = "formatOnType"; - EditorOption2[EditorOption2["glyphMargin"] = 57] = "glyphMargin"; - EditorOption2[EditorOption2["gotoLocation"] = 58] = "gotoLocation"; - EditorOption2[EditorOption2["hideCursorInOverviewRuler"] = 59] = "hideCursorInOverviewRuler"; - EditorOption2[EditorOption2["hover"] = 60] = "hover"; - EditorOption2[EditorOption2["inDiffEditor"] = 61] = "inDiffEditor"; - EditorOption2[EditorOption2["inlineSuggest"] = 62] = "inlineSuggest"; - EditorOption2[EditorOption2["letterSpacing"] = 63] = "letterSpacing"; - EditorOption2[EditorOption2["lightbulb"] = 64] = "lightbulb"; - EditorOption2[EditorOption2["lineDecorationsWidth"] = 65] = "lineDecorationsWidth"; - EditorOption2[EditorOption2["lineHeight"] = 66] = "lineHeight"; - EditorOption2[EditorOption2["lineNumbers"] = 67] = "lineNumbers"; - EditorOption2[EditorOption2["lineNumbersMinChars"] = 68] = "lineNumbersMinChars"; - EditorOption2[EditorOption2["linkedEditing"] = 69] = "linkedEditing"; - EditorOption2[EditorOption2["links"] = 70] = "links"; - EditorOption2[EditorOption2["matchBrackets"] = 71] = "matchBrackets"; - EditorOption2[EditorOption2["minimap"] = 72] = "minimap"; - EditorOption2[EditorOption2["mouseStyle"] = 73] = "mouseStyle"; - EditorOption2[EditorOption2["mouseWheelScrollSensitivity"] = 74] = "mouseWheelScrollSensitivity"; - EditorOption2[EditorOption2["mouseWheelZoom"] = 75] = "mouseWheelZoom"; - EditorOption2[EditorOption2["multiCursorMergeOverlapping"] = 76] = "multiCursorMergeOverlapping"; - EditorOption2[EditorOption2["multiCursorModifier"] = 77] = "multiCursorModifier"; - EditorOption2[EditorOption2["multiCursorPaste"] = 78] = "multiCursorPaste"; - EditorOption2[EditorOption2["multiCursorLimit"] = 79] = "multiCursorLimit"; - EditorOption2[EditorOption2["occurrencesHighlight"] = 80] = "occurrencesHighlight"; - EditorOption2[EditorOption2["overviewRulerBorder"] = 81] = "overviewRulerBorder"; - EditorOption2[EditorOption2["overviewRulerLanes"] = 82] = "overviewRulerLanes"; - EditorOption2[EditorOption2["padding"] = 83] = "padding"; - EditorOption2[EditorOption2["pasteAs"] = 84] = "pasteAs"; - EditorOption2[EditorOption2["parameterHints"] = 85] = "parameterHints"; - EditorOption2[EditorOption2["peekWidgetDefaultFocus"] = 86] = "peekWidgetDefaultFocus"; - EditorOption2[EditorOption2["definitionLinkOpensInPeek"] = 87] = "definitionLinkOpensInPeek"; - EditorOption2[EditorOption2["quickSuggestions"] = 88] = "quickSuggestions"; - EditorOption2[EditorOption2["quickSuggestionsDelay"] = 89] = "quickSuggestionsDelay"; - EditorOption2[EditorOption2["readOnly"] = 90] = "readOnly"; - EditorOption2[EditorOption2["readOnlyMessage"] = 91] = "readOnlyMessage"; - EditorOption2[EditorOption2["renameOnType"] = 92] = "renameOnType"; - EditorOption2[EditorOption2["renderControlCharacters"] = 93] = "renderControlCharacters"; - EditorOption2[EditorOption2["renderFinalNewline"] = 94] = "renderFinalNewline"; - EditorOption2[EditorOption2["renderLineHighlight"] = 95] = "renderLineHighlight"; - EditorOption2[EditorOption2["renderLineHighlightOnlyWhenFocus"] = 96] = "renderLineHighlightOnlyWhenFocus"; - EditorOption2[EditorOption2["renderValidationDecorations"] = 97] = "renderValidationDecorations"; - EditorOption2[EditorOption2["renderWhitespace"] = 98] = "renderWhitespace"; - EditorOption2[EditorOption2["revealHorizontalRightPadding"] = 99] = "revealHorizontalRightPadding"; - EditorOption2[EditorOption2["roundedSelection"] = 100] = "roundedSelection"; - EditorOption2[EditorOption2["rulers"] = 101] = "rulers"; - EditorOption2[EditorOption2["scrollbar"] = 102] = "scrollbar"; - EditorOption2[EditorOption2["scrollBeyondLastColumn"] = 103] = "scrollBeyondLastColumn"; - EditorOption2[EditorOption2["scrollBeyondLastLine"] = 104] = "scrollBeyondLastLine"; - EditorOption2[EditorOption2["scrollPredominantAxis"] = 105] = "scrollPredominantAxis"; - EditorOption2[EditorOption2["selectionClipboard"] = 106] = "selectionClipboard"; - EditorOption2[EditorOption2["selectionHighlight"] = 107] = "selectionHighlight"; - EditorOption2[EditorOption2["selectOnLineNumbers"] = 108] = "selectOnLineNumbers"; - EditorOption2[EditorOption2["showFoldingControls"] = 109] = "showFoldingControls"; - EditorOption2[EditorOption2["showUnused"] = 110] = "showUnused"; - EditorOption2[EditorOption2["snippetSuggestions"] = 111] = "snippetSuggestions"; - EditorOption2[EditorOption2["smartSelect"] = 112] = "smartSelect"; - EditorOption2[EditorOption2["smoothScrolling"] = 113] = "smoothScrolling"; - EditorOption2[EditorOption2["stickyScroll"] = 114] = "stickyScroll"; - EditorOption2[EditorOption2["stickyTabStops"] = 115] = "stickyTabStops"; - EditorOption2[EditorOption2["stopRenderingLineAfter"] = 116] = "stopRenderingLineAfter"; - EditorOption2[EditorOption2["suggest"] = 117] = "suggest"; - EditorOption2[EditorOption2["suggestFontSize"] = 118] = "suggestFontSize"; - EditorOption2[EditorOption2["suggestLineHeight"] = 119] = "suggestLineHeight"; - EditorOption2[EditorOption2["suggestOnTriggerCharacters"] = 120] = "suggestOnTriggerCharacters"; - EditorOption2[EditorOption2["suggestSelection"] = 121] = "suggestSelection"; - EditorOption2[EditorOption2["tabCompletion"] = 122] = "tabCompletion"; - EditorOption2[EditorOption2["tabIndex"] = 123] = "tabIndex"; - EditorOption2[EditorOption2["unicodeHighlighting"] = 124] = "unicodeHighlighting"; - EditorOption2[EditorOption2["unusualLineTerminators"] = 125] = "unusualLineTerminators"; - EditorOption2[EditorOption2["useShadowDOM"] = 126] = "useShadowDOM"; - EditorOption2[EditorOption2["useTabStops"] = 127] = "useTabStops"; - EditorOption2[EditorOption2["wordBreak"] = 128] = "wordBreak"; - EditorOption2[EditorOption2["wordSeparators"] = 129] = "wordSeparators"; - EditorOption2[EditorOption2["wordWrap"] = 130] = "wordWrap"; - EditorOption2[EditorOption2["wordWrapBreakAfterCharacters"] = 131] = "wordWrapBreakAfterCharacters"; - EditorOption2[EditorOption2["wordWrapBreakBeforeCharacters"] = 132] = "wordWrapBreakBeforeCharacters"; - EditorOption2[EditorOption2["wordWrapColumn"] = 133] = "wordWrapColumn"; - EditorOption2[EditorOption2["wordWrapOverride1"] = 134] = "wordWrapOverride1"; - EditorOption2[EditorOption2["wordWrapOverride2"] = 135] = "wordWrapOverride2"; - EditorOption2[EditorOption2["wrappingIndent"] = 136] = "wrappingIndent"; - EditorOption2[EditorOption2["wrappingStrategy"] = 137] = "wrappingStrategy"; - EditorOption2[EditorOption2["showDeprecated"] = 138] = "showDeprecated"; - EditorOption2[EditorOption2["inlayHints"] = 139] = "inlayHints"; - EditorOption2[EditorOption2["editorClassName"] = 140] = "editorClassName"; - EditorOption2[EditorOption2["pixelRatio"] = 141] = "pixelRatio"; - EditorOption2[EditorOption2["tabFocusMode"] = 142] = "tabFocusMode"; - EditorOption2[EditorOption2["layoutInfo"] = 143] = "layoutInfo"; - EditorOption2[EditorOption2["wrappingInfo"] = 144] = "wrappingInfo"; - EditorOption2[EditorOption2["defaultColorDecorators"] = 145] = "defaultColorDecorators"; - EditorOption2[EditorOption2["colorDecoratorsActivatedOn"] = 146] = "colorDecoratorsActivatedOn"; - EditorOption2[EditorOption2["inlineCompletionsAccessibilityVerbose"] = 147] = "inlineCompletionsAccessibilityVerbose"; - })(EditorOption || (EditorOption = {})); - var EndOfLinePreference; - (function(EndOfLinePreference2) { - EndOfLinePreference2[EndOfLinePreference2["TextDefined"] = 0] = "TextDefined"; - EndOfLinePreference2[EndOfLinePreference2["LF"] = 1] = "LF"; - EndOfLinePreference2[EndOfLinePreference2["CRLF"] = 2] = "CRLF"; - })(EndOfLinePreference || (EndOfLinePreference = {})); - var EndOfLineSequence; - (function(EndOfLineSequence2) { - EndOfLineSequence2[EndOfLineSequence2["LF"] = 0] = "LF"; - EndOfLineSequence2[EndOfLineSequence2["CRLF"] = 1] = "CRLF"; - })(EndOfLineSequence || (EndOfLineSequence = {})); - var GlyphMarginLane; - (function(GlyphMarginLane3) { - GlyphMarginLane3[GlyphMarginLane3["Left"] = 1] = "Left"; - GlyphMarginLane3[GlyphMarginLane3["Center"] = 2] = "Center"; - GlyphMarginLane3[GlyphMarginLane3["Right"] = 3] = "Right"; - })(GlyphMarginLane || (GlyphMarginLane = {})); - var IndentAction; - (function(IndentAction2) { - IndentAction2[IndentAction2["None"] = 0] = "None"; - IndentAction2[IndentAction2["Indent"] = 1] = "Indent"; - IndentAction2[IndentAction2["IndentOutdent"] = 2] = "IndentOutdent"; - IndentAction2[IndentAction2["Outdent"] = 3] = "Outdent"; - })(IndentAction || (IndentAction = {})); - var InjectedTextCursorStops; - (function(InjectedTextCursorStops3) { - InjectedTextCursorStops3[InjectedTextCursorStops3["Both"] = 0] = "Both"; - InjectedTextCursorStops3[InjectedTextCursorStops3["Right"] = 1] = "Right"; - InjectedTextCursorStops3[InjectedTextCursorStops3["Left"] = 2] = "Left"; - InjectedTextCursorStops3[InjectedTextCursorStops3["None"] = 3] = "None"; - })(InjectedTextCursorStops || (InjectedTextCursorStops = {})); - var InlayHintKind2; - (function(InlayHintKind3) { - InlayHintKind3[InlayHintKind3["Type"] = 1] = "Type"; - InlayHintKind3[InlayHintKind3["Parameter"] = 2] = "Parameter"; - })(InlayHintKind2 || (InlayHintKind2 = {})); - var InlineCompletionTriggerKind2; - (function(InlineCompletionTriggerKind3) { - InlineCompletionTriggerKind3[InlineCompletionTriggerKind3["Automatic"] = 0] = "Automatic"; - InlineCompletionTriggerKind3[InlineCompletionTriggerKind3["Explicit"] = 1] = "Explicit"; - })(InlineCompletionTriggerKind2 || (InlineCompletionTriggerKind2 = {})); - var KeyCode; - (function(KeyCode2) { - KeyCode2[KeyCode2["DependsOnKbLayout"] = -1] = "DependsOnKbLayout"; - KeyCode2[KeyCode2["Unknown"] = 0] = "Unknown"; - KeyCode2[KeyCode2["Backspace"] = 1] = "Backspace"; - KeyCode2[KeyCode2["Tab"] = 2] = "Tab"; - KeyCode2[KeyCode2["Enter"] = 3] = "Enter"; - KeyCode2[KeyCode2["Shift"] = 4] = "Shift"; - KeyCode2[KeyCode2["Ctrl"] = 5] = "Ctrl"; - KeyCode2[KeyCode2["Alt"] = 6] = "Alt"; - KeyCode2[KeyCode2["PauseBreak"] = 7] = "PauseBreak"; - KeyCode2[KeyCode2["CapsLock"] = 8] = "CapsLock"; - KeyCode2[KeyCode2["Escape"] = 9] = "Escape"; - KeyCode2[KeyCode2["Space"] = 10] = "Space"; - KeyCode2[KeyCode2["PageUp"] = 11] = "PageUp"; - KeyCode2[KeyCode2["PageDown"] = 12] = "PageDown"; - KeyCode2[KeyCode2["End"] = 13] = "End"; - KeyCode2[KeyCode2["Home"] = 14] = "Home"; - KeyCode2[KeyCode2["LeftArrow"] = 15] = "LeftArrow"; - KeyCode2[KeyCode2["UpArrow"] = 16] = "UpArrow"; - KeyCode2[KeyCode2["RightArrow"] = 17] = "RightArrow"; - KeyCode2[KeyCode2["DownArrow"] = 18] = "DownArrow"; - KeyCode2[KeyCode2["Insert"] = 19] = "Insert"; - KeyCode2[KeyCode2["Delete"] = 20] = "Delete"; - KeyCode2[KeyCode2["Digit0"] = 21] = "Digit0"; - KeyCode2[KeyCode2["Digit1"] = 22] = "Digit1"; - KeyCode2[KeyCode2["Digit2"] = 23] = "Digit2"; - KeyCode2[KeyCode2["Digit3"] = 24] = "Digit3"; - KeyCode2[KeyCode2["Digit4"] = 25] = "Digit4"; - KeyCode2[KeyCode2["Digit5"] = 26] = "Digit5"; - KeyCode2[KeyCode2["Digit6"] = 27] = "Digit6"; - KeyCode2[KeyCode2["Digit7"] = 28] = "Digit7"; - KeyCode2[KeyCode2["Digit8"] = 29] = "Digit8"; - KeyCode2[KeyCode2["Digit9"] = 30] = "Digit9"; - KeyCode2[KeyCode2["KeyA"] = 31] = "KeyA"; - KeyCode2[KeyCode2["KeyB"] = 32] = "KeyB"; - KeyCode2[KeyCode2["KeyC"] = 33] = "KeyC"; - KeyCode2[KeyCode2["KeyD"] = 34] = "KeyD"; - KeyCode2[KeyCode2["KeyE"] = 35] = "KeyE"; - KeyCode2[KeyCode2["KeyF"] = 36] = "KeyF"; - KeyCode2[KeyCode2["KeyG"] = 37] = "KeyG"; - KeyCode2[KeyCode2["KeyH"] = 38] = "KeyH"; - KeyCode2[KeyCode2["KeyI"] = 39] = "KeyI"; - KeyCode2[KeyCode2["KeyJ"] = 40] = "KeyJ"; - KeyCode2[KeyCode2["KeyK"] = 41] = "KeyK"; - KeyCode2[KeyCode2["KeyL"] = 42] = "KeyL"; - KeyCode2[KeyCode2["KeyM"] = 43] = "KeyM"; - KeyCode2[KeyCode2["KeyN"] = 44] = "KeyN"; - KeyCode2[KeyCode2["KeyO"] = 45] = "KeyO"; - KeyCode2[KeyCode2["KeyP"] = 46] = "KeyP"; - KeyCode2[KeyCode2["KeyQ"] = 47] = "KeyQ"; - KeyCode2[KeyCode2["KeyR"] = 48] = "KeyR"; - KeyCode2[KeyCode2["KeyS"] = 49] = "KeyS"; - KeyCode2[KeyCode2["KeyT"] = 50] = "KeyT"; - KeyCode2[KeyCode2["KeyU"] = 51] = "KeyU"; - KeyCode2[KeyCode2["KeyV"] = 52] = "KeyV"; - KeyCode2[KeyCode2["KeyW"] = 53] = "KeyW"; - KeyCode2[KeyCode2["KeyX"] = 54] = "KeyX"; - KeyCode2[KeyCode2["KeyY"] = 55] = "KeyY"; - KeyCode2[KeyCode2["KeyZ"] = 56] = "KeyZ"; - KeyCode2[KeyCode2["Meta"] = 57] = "Meta"; - KeyCode2[KeyCode2["ContextMenu"] = 58] = "ContextMenu"; - KeyCode2[KeyCode2["F1"] = 59] = "F1"; - KeyCode2[KeyCode2["F2"] = 60] = "F2"; - KeyCode2[KeyCode2["F3"] = 61] = "F3"; - KeyCode2[KeyCode2["F4"] = 62] = "F4"; - KeyCode2[KeyCode2["F5"] = 63] = "F5"; - KeyCode2[KeyCode2["F6"] = 64] = "F6"; - KeyCode2[KeyCode2["F7"] = 65] = "F7"; - KeyCode2[KeyCode2["F8"] = 66] = "F8"; - KeyCode2[KeyCode2["F9"] = 67] = "F9"; - KeyCode2[KeyCode2["F10"] = 68] = "F10"; - KeyCode2[KeyCode2["F11"] = 69] = "F11"; - KeyCode2[KeyCode2["F12"] = 70] = "F12"; - KeyCode2[KeyCode2["F13"] = 71] = "F13"; - KeyCode2[KeyCode2["F14"] = 72] = "F14"; - KeyCode2[KeyCode2["F15"] = 73] = "F15"; - KeyCode2[KeyCode2["F16"] = 74] = "F16"; - KeyCode2[KeyCode2["F17"] = 75] = "F17"; - KeyCode2[KeyCode2["F18"] = 76] = "F18"; - KeyCode2[KeyCode2["F19"] = 77] = "F19"; - KeyCode2[KeyCode2["F20"] = 78] = "F20"; - KeyCode2[KeyCode2["F21"] = 79] = "F21"; - KeyCode2[KeyCode2["F22"] = 80] = "F22"; - KeyCode2[KeyCode2["F23"] = 81] = "F23"; - KeyCode2[KeyCode2["F24"] = 82] = "F24"; - KeyCode2[KeyCode2["NumLock"] = 83] = "NumLock"; - KeyCode2[KeyCode2["ScrollLock"] = 84] = "ScrollLock"; - KeyCode2[KeyCode2["Semicolon"] = 85] = "Semicolon"; - KeyCode2[KeyCode2["Equal"] = 86] = "Equal"; - KeyCode2[KeyCode2["Comma"] = 87] = "Comma"; - KeyCode2[KeyCode2["Minus"] = 88] = "Minus"; - KeyCode2[KeyCode2["Period"] = 89] = "Period"; - KeyCode2[KeyCode2["Slash"] = 90] = "Slash"; - KeyCode2[KeyCode2["Backquote"] = 91] = "Backquote"; - KeyCode2[KeyCode2["BracketLeft"] = 92] = "BracketLeft"; - KeyCode2[KeyCode2["Backslash"] = 93] = "Backslash"; - KeyCode2[KeyCode2["BracketRight"] = 94] = "BracketRight"; - KeyCode2[KeyCode2["Quote"] = 95] = "Quote"; - KeyCode2[KeyCode2["OEM_8"] = 96] = "OEM_8"; - KeyCode2[KeyCode2["IntlBackslash"] = 97] = "IntlBackslash"; - KeyCode2[KeyCode2["Numpad0"] = 98] = "Numpad0"; - KeyCode2[KeyCode2["Numpad1"] = 99] = "Numpad1"; - KeyCode2[KeyCode2["Numpad2"] = 100] = "Numpad2"; - KeyCode2[KeyCode2["Numpad3"] = 101] = "Numpad3"; - KeyCode2[KeyCode2["Numpad4"] = 102] = "Numpad4"; - KeyCode2[KeyCode2["Numpad5"] = 103] = "Numpad5"; - KeyCode2[KeyCode2["Numpad6"] = 104] = "Numpad6"; - KeyCode2[KeyCode2["Numpad7"] = 105] = "Numpad7"; - KeyCode2[KeyCode2["Numpad8"] = 106] = "Numpad8"; - KeyCode2[KeyCode2["Numpad9"] = 107] = "Numpad9"; - KeyCode2[KeyCode2["NumpadMultiply"] = 108] = "NumpadMultiply"; - KeyCode2[KeyCode2["NumpadAdd"] = 109] = "NumpadAdd"; - KeyCode2[KeyCode2["NUMPAD_SEPARATOR"] = 110] = "NUMPAD_SEPARATOR"; - KeyCode2[KeyCode2["NumpadSubtract"] = 111] = "NumpadSubtract"; - KeyCode2[KeyCode2["NumpadDecimal"] = 112] = "NumpadDecimal"; - KeyCode2[KeyCode2["NumpadDivide"] = 113] = "NumpadDivide"; - KeyCode2[KeyCode2["KEY_IN_COMPOSITION"] = 114] = "KEY_IN_COMPOSITION"; - KeyCode2[KeyCode2["ABNT_C1"] = 115] = "ABNT_C1"; - KeyCode2[KeyCode2["ABNT_C2"] = 116] = "ABNT_C2"; - KeyCode2[KeyCode2["AudioVolumeMute"] = 117] = "AudioVolumeMute"; - KeyCode2[KeyCode2["AudioVolumeUp"] = 118] = "AudioVolumeUp"; - KeyCode2[KeyCode2["AudioVolumeDown"] = 119] = "AudioVolumeDown"; - KeyCode2[KeyCode2["BrowserSearch"] = 120] = "BrowserSearch"; - KeyCode2[KeyCode2["BrowserHome"] = 121] = "BrowserHome"; - KeyCode2[KeyCode2["BrowserBack"] = 122] = "BrowserBack"; - KeyCode2[KeyCode2["BrowserForward"] = 123] = "BrowserForward"; - KeyCode2[KeyCode2["MediaTrackNext"] = 124] = "MediaTrackNext"; - KeyCode2[KeyCode2["MediaTrackPrevious"] = 125] = "MediaTrackPrevious"; - KeyCode2[KeyCode2["MediaStop"] = 126] = "MediaStop"; - KeyCode2[KeyCode2["MediaPlayPause"] = 127] = "MediaPlayPause"; - KeyCode2[KeyCode2["LaunchMediaPlayer"] = 128] = "LaunchMediaPlayer"; - KeyCode2[KeyCode2["LaunchMail"] = 129] = "LaunchMail"; - KeyCode2[KeyCode2["LaunchApp2"] = 130] = "LaunchApp2"; - KeyCode2[KeyCode2["Clear"] = 131] = "Clear"; - KeyCode2[KeyCode2["MAX_VALUE"] = 132] = "MAX_VALUE"; - })(KeyCode || (KeyCode = {})); - var MarkerSeverity; - (function(MarkerSeverity2) { - MarkerSeverity2[MarkerSeverity2["Hint"] = 1] = "Hint"; - MarkerSeverity2[MarkerSeverity2["Info"] = 2] = "Info"; - MarkerSeverity2[MarkerSeverity2["Warning"] = 4] = "Warning"; - MarkerSeverity2[MarkerSeverity2["Error"] = 8] = "Error"; - })(MarkerSeverity || (MarkerSeverity = {})); - var MarkerTag; - (function(MarkerTag2) { - MarkerTag2[MarkerTag2["Unnecessary"] = 1] = "Unnecessary"; - MarkerTag2[MarkerTag2["Deprecated"] = 2] = "Deprecated"; - })(MarkerTag || (MarkerTag = {})); - var MinimapPosition; - (function(MinimapPosition3) { - MinimapPosition3[MinimapPosition3["Inline"] = 1] = "Inline"; - MinimapPosition3[MinimapPosition3["Gutter"] = 2] = "Gutter"; - })(MinimapPosition || (MinimapPosition = {})); - var MouseTargetType; - (function(MouseTargetType2) { - MouseTargetType2[MouseTargetType2["UNKNOWN"] = 0] = "UNKNOWN"; - MouseTargetType2[MouseTargetType2["TEXTAREA"] = 1] = "TEXTAREA"; - MouseTargetType2[MouseTargetType2["GUTTER_GLYPH_MARGIN"] = 2] = "GUTTER_GLYPH_MARGIN"; - MouseTargetType2[MouseTargetType2["GUTTER_LINE_NUMBERS"] = 3] = "GUTTER_LINE_NUMBERS"; - MouseTargetType2[MouseTargetType2["GUTTER_LINE_DECORATIONS"] = 4] = "GUTTER_LINE_DECORATIONS"; - MouseTargetType2[MouseTargetType2["GUTTER_VIEW_ZONE"] = 5] = "GUTTER_VIEW_ZONE"; - MouseTargetType2[MouseTargetType2["CONTENT_TEXT"] = 6] = "CONTENT_TEXT"; - MouseTargetType2[MouseTargetType2["CONTENT_EMPTY"] = 7] = "CONTENT_EMPTY"; - MouseTargetType2[MouseTargetType2["CONTENT_VIEW_ZONE"] = 8] = "CONTENT_VIEW_ZONE"; - MouseTargetType2[MouseTargetType2["CONTENT_WIDGET"] = 9] = "CONTENT_WIDGET"; - MouseTargetType2[MouseTargetType2["OVERVIEW_RULER"] = 10] = "OVERVIEW_RULER"; - MouseTargetType2[MouseTargetType2["SCROLLBAR"] = 11] = "SCROLLBAR"; - MouseTargetType2[MouseTargetType2["OVERLAY_WIDGET"] = 12] = "OVERLAY_WIDGET"; - MouseTargetType2[MouseTargetType2["OUTSIDE_EDITOR"] = 13] = "OUTSIDE_EDITOR"; - })(MouseTargetType || (MouseTargetType = {})); - var OverlayWidgetPositionPreference; - (function(OverlayWidgetPositionPreference2) { - OverlayWidgetPositionPreference2[OverlayWidgetPositionPreference2["TOP_RIGHT_CORNER"] = 0] = "TOP_RIGHT_CORNER"; - OverlayWidgetPositionPreference2[OverlayWidgetPositionPreference2["BOTTOM_RIGHT_CORNER"] = 1] = "BOTTOM_RIGHT_CORNER"; - OverlayWidgetPositionPreference2[OverlayWidgetPositionPreference2["TOP_CENTER"] = 2] = "TOP_CENTER"; - })(OverlayWidgetPositionPreference || (OverlayWidgetPositionPreference = {})); - var OverviewRulerLane; - (function(OverviewRulerLane3) { - OverviewRulerLane3[OverviewRulerLane3["Left"] = 1] = "Left"; - OverviewRulerLane3[OverviewRulerLane3["Center"] = 2] = "Center"; - OverviewRulerLane3[OverviewRulerLane3["Right"] = 4] = "Right"; - OverviewRulerLane3[OverviewRulerLane3["Full"] = 7] = "Full"; - })(OverviewRulerLane || (OverviewRulerLane = {})); - var PositionAffinity; - (function(PositionAffinity2) { - PositionAffinity2[PositionAffinity2["Left"] = 0] = "Left"; - PositionAffinity2[PositionAffinity2["Right"] = 1] = "Right"; - PositionAffinity2[PositionAffinity2["None"] = 2] = "None"; - PositionAffinity2[PositionAffinity2["LeftOfInjectedText"] = 3] = "LeftOfInjectedText"; - PositionAffinity2[PositionAffinity2["RightOfInjectedText"] = 4] = "RightOfInjectedText"; - })(PositionAffinity || (PositionAffinity = {})); - var RenderLineNumbersType; - (function(RenderLineNumbersType2) { - RenderLineNumbersType2[RenderLineNumbersType2["Off"] = 0] = "Off"; - RenderLineNumbersType2[RenderLineNumbersType2["On"] = 1] = "On"; - RenderLineNumbersType2[RenderLineNumbersType2["Relative"] = 2] = "Relative"; - RenderLineNumbersType2[RenderLineNumbersType2["Interval"] = 3] = "Interval"; - RenderLineNumbersType2[RenderLineNumbersType2["Custom"] = 4] = "Custom"; - })(RenderLineNumbersType || (RenderLineNumbersType = {})); - var RenderMinimap; - (function(RenderMinimap2) { - RenderMinimap2[RenderMinimap2["None"] = 0] = "None"; - RenderMinimap2[RenderMinimap2["Text"] = 1] = "Text"; - RenderMinimap2[RenderMinimap2["Blocks"] = 2] = "Blocks"; - })(RenderMinimap || (RenderMinimap = {})); - var ScrollType; - (function(ScrollType2) { - ScrollType2[ScrollType2["Smooth"] = 0] = "Smooth"; - ScrollType2[ScrollType2["Immediate"] = 1] = "Immediate"; - })(ScrollType || (ScrollType = {})); - var ScrollbarVisibility; - (function(ScrollbarVisibility2) { - ScrollbarVisibility2[ScrollbarVisibility2["Auto"] = 1] = "Auto"; - ScrollbarVisibility2[ScrollbarVisibility2["Hidden"] = 2] = "Hidden"; - ScrollbarVisibility2[ScrollbarVisibility2["Visible"] = 3] = "Visible"; - })(ScrollbarVisibility || (ScrollbarVisibility = {})); - var SelectionDirection; - (function(SelectionDirection2) { - SelectionDirection2[SelectionDirection2["LTR"] = 0] = "LTR"; - SelectionDirection2[SelectionDirection2["RTL"] = 1] = "RTL"; - })(SelectionDirection || (SelectionDirection = {})); - var ShowLightbulbIconMode; - (function(ShowLightbulbIconMode2) { - ShowLightbulbIconMode2["Off"] = "off"; - ShowLightbulbIconMode2["OnCode"] = "onCode"; - ShowLightbulbIconMode2["On"] = "on"; - })(ShowLightbulbIconMode || (ShowLightbulbIconMode = {})); - var SignatureHelpTriggerKind2; - (function(SignatureHelpTriggerKind3) { - SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["Invoke"] = 1] = "Invoke"; - SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["TriggerCharacter"] = 2] = "TriggerCharacter"; - SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["ContentChange"] = 3] = "ContentChange"; - })(SignatureHelpTriggerKind2 || (SignatureHelpTriggerKind2 = {})); - var SymbolKind; - (function(SymbolKind2) { - SymbolKind2[SymbolKind2["File"] = 0] = "File"; - SymbolKind2[SymbolKind2["Module"] = 1] = "Module"; - SymbolKind2[SymbolKind2["Namespace"] = 2] = "Namespace"; - SymbolKind2[SymbolKind2["Package"] = 3] = "Package"; - SymbolKind2[SymbolKind2["Class"] = 4] = "Class"; - SymbolKind2[SymbolKind2["Method"] = 5] = "Method"; - SymbolKind2[SymbolKind2["Property"] = 6] = "Property"; - SymbolKind2[SymbolKind2["Field"] = 7] = "Field"; - SymbolKind2[SymbolKind2["Constructor"] = 8] = "Constructor"; - SymbolKind2[SymbolKind2["Enum"] = 9] = "Enum"; - SymbolKind2[SymbolKind2["Interface"] = 10] = "Interface"; - SymbolKind2[SymbolKind2["Function"] = 11] = "Function"; - SymbolKind2[SymbolKind2["Variable"] = 12] = "Variable"; - SymbolKind2[SymbolKind2["Constant"] = 13] = "Constant"; - SymbolKind2[SymbolKind2["String"] = 14] = "String"; - SymbolKind2[SymbolKind2["Number"] = 15] = "Number"; - SymbolKind2[SymbolKind2["Boolean"] = 16] = "Boolean"; - SymbolKind2[SymbolKind2["Array"] = 17] = "Array"; - SymbolKind2[SymbolKind2["Object"] = 18] = "Object"; - SymbolKind2[SymbolKind2["Key"] = 19] = "Key"; - SymbolKind2[SymbolKind2["Null"] = 20] = "Null"; - SymbolKind2[SymbolKind2["EnumMember"] = 21] = "EnumMember"; - SymbolKind2[SymbolKind2["Struct"] = 22] = "Struct"; - SymbolKind2[SymbolKind2["Event"] = 23] = "Event"; - SymbolKind2[SymbolKind2["Operator"] = 24] = "Operator"; - SymbolKind2[SymbolKind2["TypeParameter"] = 25] = "TypeParameter"; - })(SymbolKind || (SymbolKind = {})); - var SymbolTag; - (function(SymbolTag2) { - SymbolTag2[SymbolTag2["Deprecated"] = 1] = "Deprecated"; - })(SymbolTag || (SymbolTag = {})); - var TextEditorCursorBlinkingStyle; - (function(TextEditorCursorBlinkingStyle2) { - TextEditorCursorBlinkingStyle2[TextEditorCursorBlinkingStyle2["Hidden"] = 0] = "Hidden"; - TextEditorCursorBlinkingStyle2[TextEditorCursorBlinkingStyle2["Blink"] = 1] = "Blink"; - TextEditorCursorBlinkingStyle2[TextEditorCursorBlinkingStyle2["Smooth"] = 2] = "Smooth"; - TextEditorCursorBlinkingStyle2[TextEditorCursorBlinkingStyle2["Phase"] = 3] = "Phase"; - TextEditorCursorBlinkingStyle2[TextEditorCursorBlinkingStyle2["Expand"] = 4] = "Expand"; - TextEditorCursorBlinkingStyle2[TextEditorCursorBlinkingStyle2["Solid"] = 5] = "Solid"; - })(TextEditorCursorBlinkingStyle || (TextEditorCursorBlinkingStyle = {})); - var TextEditorCursorStyle; - (function(TextEditorCursorStyle2) { - TextEditorCursorStyle2[TextEditorCursorStyle2["Line"] = 1] = "Line"; - TextEditorCursorStyle2[TextEditorCursorStyle2["Block"] = 2] = "Block"; - TextEditorCursorStyle2[TextEditorCursorStyle2["Underline"] = 3] = "Underline"; - TextEditorCursorStyle2[TextEditorCursorStyle2["LineThin"] = 4] = "LineThin"; - TextEditorCursorStyle2[TextEditorCursorStyle2["BlockOutline"] = 5] = "BlockOutline"; - TextEditorCursorStyle2[TextEditorCursorStyle2["UnderlineThin"] = 6] = "UnderlineThin"; - })(TextEditorCursorStyle || (TextEditorCursorStyle = {})); - var TrackedRangeStickiness; - (function(TrackedRangeStickiness2) { - TrackedRangeStickiness2[TrackedRangeStickiness2["AlwaysGrowsWhenTypingAtEdges"] = 0] = "AlwaysGrowsWhenTypingAtEdges"; - TrackedRangeStickiness2[TrackedRangeStickiness2["NeverGrowsWhenTypingAtEdges"] = 1] = "NeverGrowsWhenTypingAtEdges"; - TrackedRangeStickiness2[TrackedRangeStickiness2["GrowsOnlyWhenTypingBefore"] = 2] = "GrowsOnlyWhenTypingBefore"; - TrackedRangeStickiness2[TrackedRangeStickiness2["GrowsOnlyWhenTypingAfter"] = 3] = "GrowsOnlyWhenTypingAfter"; - })(TrackedRangeStickiness || (TrackedRangeStickiness = {})); - var WrappingIndent; - (function(WrappingIndent2) { - WrappingIndent2[WrappingIndent2["None"] = 0] = "None"; - WrappingIndent2[WrappingIndent2["Same"] = 1] = "Same"; - WrappingIndent2[WrappingIndent2["Indent"] = 2] = "Indent"; - WrappingIndent2[WrappingIndent2["DeepIndent"] = 3] = "DeepIndent"; - })(WrappingIndent || (WrappingIndent = {})); - - // node_modules/monaco-editor/esm/vs/editor/common/services/editorBaseApi.js - var KeyMod = class { - static chord(firstPart, secondPart) { - return KeyChord(firstPart, secondPart); - } - }; - KeyMod.CtrlCmd = 2048; - KeyMod.Shift = 1024; - KeyMod.Alt = 512; - KeyMod.WinCtrl = 256; - function createMonacoBaseAPI() { - return { - editor: void 0, - // undefined override expected here - languages: void 0, - // undefined override expected here - CancellationTokenSource, - Emitter, - KeyCode, - KeyMod, - Position, - Range, - Selection, - SelectionDirection, - MarkerSeverity, - MarkerTag, - Uri: URI, - Token - }; - } - - // node_modules/monaco-editor/esm/vs/editor/common/core/wordCharacterClassifier.js - var WordCharacterClassifier = class extends CharacterClassifier { - constructor(wordSeparators) { - super( - 0 - /* WordCharacterClass.Regular */ - ); - for (let i = 0, len = wordSeparators.length; i < len; i++) { - this.set( - wordSeparators.charCodeAt(i), - 2 - /* WordCharacterClass.WordSeparator */ - ); - } - this.set( - 32, - 1 - /* WordCharacterClass.Whitespace */ - ); - this.set( - 9, - 1 - /* WordCharacterClass.Whitespace */ - ); - } - }; - function once(computeFn) { - const cache = {}; - return (input) => { - if (!cache.hasOwnProperty(input)) { - cache[input] = computeFn(input); - } - return cache[input]; - }; - } - var getMapForWordSeparators = once((input) => new WordCharacterClassifier(input)); - - // node_modules/monaco-editor/esm/vs/editor/common/model.js - var OverviewRulerLane2; - (function(OverviewRulerLane3) { - OverviewRulerLane3[OverviewRulerLane3["Left"] = 1] = "Left"; - OverviewRulerLane3[OverviewRulerLane3["Center"] = 2] = "Center"; - OverviewRulerLane3[OverviewRulerLane3["Right"] = 4] = "Right"; - OverviewRulerLane3[OverviewRulerLane3["Full"] = 7] = "Full"; - })(OverviewRulerLane2 || (OverviewRulerLane2 = {})); - var GlyphMarginLane2; - (function(GlyphMarginLane3) { - GlyphMarginLane3[GlyphMarginLane3["Left"] = 1] = "Left"; - GlyphMarginLane3[GlyphMarginLane3["Center"] = 2] = "Center"; - GlyphMarginLane3[GlyphMarginLane3["Right"] = 3] = "Right"; - })(GlyphMarginLane2 || (GlyphMarginLane2 = {})); - var MinimapPosition2; - (function(MinimapPosition3) { - MinimapPosition3[MinimapPosition3["Inline"] = 1] = "Inline"; - MinimapPosition3[MinimapPosition3["Gutter"] = 2] = "Gutter"; - })(MinimapPosition2 || (MinimapPosition2 = {})); - var InjectedTextCursorStops2; - (function(InjectedTextCursorStops3) { - InjectedTextCursorStops3[InjectedTextCursorStops3["Both"] = 0] = "Both"; - InjectedTextCursorStops3[InjectedTextCursorStops3["Right"] = 1] = "Right"; - InjectedTextCursorStops3[InjectedTextCursorStops3["Left"] = 2] = "Left"; - InjectedTextCursorStops3[InjectedTextCursorStops3["None"] = 3] = "None"; - })(InjectedTextCursorStops2 || (InjectedTextCursorStops2 = {})); - - // node_modules/monaco-editor/esm/vs/editor/common/model/textModelSearch.js - function leftIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength) { - if (matchStartIndex === 0) { - return true; - } - const charBefore = text.charCodeAt(matchStartIndex - 1); - if (wordSeparators.get(charBefore) !== 0) { - return true; - } - if (charBefore === 13 || charBefore === 10) { - return true; - } - if (matchLength > 0) { - const firstCharInMatch = text.charCodeAt(matchStartIndex); - if (wordSeparators.get(firstCharInMatch) !== 0) { - return true; - } - } - return false; - } - function rightIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength) { - if (matchStartIndex + matchLength === textLength) { - return true; - } - const charAfter = text.charCodeAt(matchStartIndex + matchLength); - if (wordSeparators.get(charAfter) !== 0) { - return true; - } - if (charAfter === 13 || charAfter === 10) { - return true; - } - if (matchLength > 0) { - const lastCharInMatch = text.charCodeAt(matchStartIndex + matchLength - 1); - if (wordSeparators.get(lastCharInMatch) !== 0) { - return true; - } - } - return false; - } - function isValidMatch(wordSeparators, text, textLength, matchStartIndex, matchLength) { - return leftIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength) && rightIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength); - } - var Searcher = class { - constructor(wordSeparators, searchRegex) { - this._wordSeparators = wordSeparators; - this._searchRegex = searchRegex; - this._prevMatchStartIndex = -1; - this._prevMatchLength = 0; - } - reset(lastIndex) { - this._searchRegex.lastIndex = lastIndex; - this._prevMatchStartIndex = -1; - this._prevMatchLength = 0; - } - next(text) { - const textLength = text.length; - let m; - do { - if (this._prevMatchStartIndex + this._prevMatchLength === textLength) { - return null; - } - m = this._searchRegex.exec(text); - if (!m) { - return null; - } - const matchStartIndex = m.index; - const matchLength = m[0].length; - if (matchStartIndex === this._prevMatchStartIndex && matchLength === this._prevMatchLength) { - if (matchLength === 0) { - if (getNextCodePoint(text, textLength, this._searchRegex.lastIndex) > 65535) { - this._searchRegex.lastIndex += 2; - } else { - this._searchRegex.lastIndex += 1; - } - continue; - } - return null; - } - this._prevMatchStartIndex = matchStartIndex; - this._prevMatchLength = matchLength; - if (!this._wordSeparators || isValidMatch(this._wordSeparators, text, textLength, matchStartIndex, matchLength)) { - return m; - } - } while (m); - return null; - } - }; - - // node_modules/monaco-editor/esm/vs/base/common/assert.js - function assertNever(value, message = "Unreachable") { - throw new Error(message); - } - function assertFn(condition) { - if (!condition()) { - debugger; - condition(); - onUnexpectedError(new BugIndicatingError("Assertion Failed")); - } - } - function checkAdjacentItems(items, predicate) { - let i = 0; - while (i < items.length - 1) { - const a = items[i]; - const b = items[i + 1]; - if (!predicate(a, b)) { - return false; - } - i++; - } - return true; - } - - // node_modules/monaco-editor/esm/vs/editor/common/services/unicodeTextModelHighlighter.js - var UnicodeTextModelHighlighter = class { - static computeUnicodeHighlights(model, options, range) { - const startLine = range ? range.startLineNumber : 1; - const endLine = range ? range.endLineNumber : model.getLineCount(); - const codePointHighlighter = new CodePointHighlighter(options); - const candidates = codePointHighlighter.getCandidateCodePoints(); - let regex; - if (candidates === "allNonBasicAscii") { - regex = new RegExp("[^\\t\\n\\r\\x20-\\x7E]", "g"); - } else { - regex = new RegExp(`${buildRegExpCharClassExpr(Array.from(candidates))}`, "g"); - } - const searcher = new Searcher(null, regex); - const ranges = []; - let hasMore = false; - let m; - let ambiguousCharacterCount = 0; - let invisibleCharacterCount = 0; - let nonBasicAsciiCharacterCount = 0; - forLoop: - for (let lineNumber = startLine, lineCount = endLine; lineNumber <= lineCount; lineNumber++) { - const lineContent = model.getLineContent(lineNumber); - const lineLength = lineContent.length; - searcher.reset(0); - do { - m = searcher.next(lineContent); - if (m) { - let startIndex = m.index; - let endIndex = m.index + m[0].length; - if (startIndex > 0) { - const charCodeBefore = lineContent.charCodeAt(startIndex - 1); - if (isHighSurrogate(charCodeBefore)) { - startIndex--; - } - } - if (endIndex + 1 < lineLength) { - const charCodeBefore = lineContent.charCodeAt(endIndex - 1); - if (isHighSurrogate(charCodeBefore)) { - endIndex++; - } - } - const str = lineContent.substring(startIndex, endIndex); - let word = getWordAtText(startIndex + 1, DEFAULT_WORD_REGEXP, lineContent, 0); - if (word && word.endColumn <= startIndex + 1) { - word = null; - } - const highlightReason = codePointHighlighter.shouldHighlightNonBasicASCII(str, word ? word.word : null); - if (highlightReason !== 0) { - if (highlightReason === 3) { - ambiguousCharacterCount++; - } else if (highlightReason === 2) { - invisibleCharacterCount++; - } else if (highlightReason === 1) { - nonBasicAsciiCharacterCount++; - } else { - assertNever(highlightReason); - } - const MAX_RESULT_LENGTH = 1e3; - if (ranges.length >= MAX_RESULT_LENGTH) { - hasMore = true; - break forLoop; - } - ranges.push(new Range(lineNumber, startIndex + 1, lineNumber, endIndex + 1)); - } - } - } while (m); - } - return { - ranges, - hasMore, - ambiguousCharacterCount, - invisibleCharacterCount, - nonBasicAsciiCharacterCount - }; - } - static computeUnicodeHighlightReason(char, options) { - const codePointHighlighter = new CodePointHighlighter(options); - const reason = codePointHighlighter.shouldHighlightNonBasicASCII(char, null); - switch (reason) { - case 0: - return null; - case 2: - return { - kind: 1 - /* UnicodeHighlighterReasonKind.Invisible */ - }; - case 3: { - const codePoint = char.codePointAt(0); - const primaryConfusable = codePointHighlighter.ambiguousCharacters.getPrimaryConfusable(codePoint); - const notAmbiguousInLocales = AmbiguousCharacters.getLocales().filter((l) => !AmbiguousCharacters.getInstance(/* @__PURE__ */ new Set([...options.allowedLocales, l])).isAmbiguous(codePoint)); - return { kind: 0, confusableWith: String.fromCodePoint(primaryConfusable), notAmbiguousInLocales }; - } - case 1: - return { - kind: 2 - /* UnicodeHighlighterReasonKind.NonBasicAscii */ - }; - } - } - }; - function buildRegExpCharClassExpr(codePoints, flags) { - const src = `[${escapeRegExpCharacters(codePoints.map((i) => String.fromCodePoint(i)).join(""))}]`; - return src; - } - var CodePointHighlighter = class { - constructor(options) { - this.options = options; - this.allowedCodePoints = new Set(options.allowedCodePoints); - this.ambiguousCharacters = AmbiguousCharacters.getInstance(new Set(options.allowedLocales)); - } - getCandidateCodePoints() { - if (this.options.nonBasicASCII) { - return "allNonBasicAscii"; - } - const set = /* @__PURE__ */ new Set(); - if (this.options.invisibleCharacters) { - for (const cp of InvisibleCharacters.codePoints) { - if (!isAllowedInvisibleCharacter(String.fromCodePoint(cp))) { - set.add(cp); - } - } - } - if (this.options.ambiguousCharacters) { - for (const cp of this.ambiguousCharacters.getConfusableCodePoints()) { - set.add(cp); - } - } - for (const cp of this.allowedCodePoints) { - set.delete(cp); - } - return set; - } - shouldHighlightNonBasicASCII(character, wordContext) { - const codePoint = character.codePointAt(0); - if (this.allowedCodePoints.has(codePoint)) { - return 0; - } - if (this.options.nonBasicASCII) { - return 1; - } - let hasBasicASCIICharacters = false; - let hasNonConfusableNonBasicAsciiCharacter = false; - if (wordContext) { - for (const char of wordContext) { - const codePoint2 = char.codePointAt(0); - const isBasicASCII2 = isBasicASCII(char); - hasBasicASCIICharacters = hasBasicASCIICharacters || isBasicASCII2; - if (!isBasicASCII2 && !this.ambiguousCharacters.isAmbiguous(codePoint2) && !InvisibleCharacters.isInvisibleCharacter(codePoint2)) { - hasNonConfusableNonBasicAsciiCharacter = true; - } - } - } - if ( - /* Don't allow mixing weird looking characters with ASCII */ - !hasBasicASCIICharacters && /* Is there an obviously weird looking character? */ - hasNonConfusableNonBasicAsciiCharacter - ) { - return 0; - } - if (this.options.invisibleCharacters) { - if (!isAllowedInvisibleCharacter(character) && InvisibleCharacters.isInvisibleCharacter(codePoint)) { - return 2; - } - } - if (this.options.ambiguousCharacters) { - if (this.ambiguousCharacters.isAmbiguous(codePoint)) { - return 3; - } - } - return 0; - } - }; - function isAllowedInvisibleCharacter(character) { - return character === " " || character === "\n" || character === " "; - } - - // node_modules/monaco-editor/esm/vs/editor/common/diff/linesDiffComputer.js - var LinesDiff = class { - constructor(changes, moves, hitTimeout) { - this.changes = changes; - this.moves = moves; - this.hitTimeout = hitTimeout; - } - }; - var MovedText = class { - constructor(lineRangeMapping, changes) { - this.lineRangeMapping = lineRangeMapping; - this.changes = changes; - } - }; - - // node_modules/monaco-editor/esm/vs/editor/common/core/offsetRange.js - var OffsetRange = class _OffsetRange { - static addRange(range, sortedRanges) { - let i = 0; - while (i < sortedRanges.length && sortedRanges[i].endExclusive < range.start) { - i++; - } - let j = i; - while (j < sortedRanges.length && sortedRanges[j].start <= range.endExclusive) { - j++; - } - if (i === j) { - sortedRanges.splice(i, 0, range); - } else { - const start = Math.min(range.start, sortedRanges[i].start); - const end = Math.max(range.endExclusive, sortedRanges[j - 1].endExclusive); - sortedRanges.splice(i, j - i, new _OffsetRange(start, end)); - } - } - static ofLength(length) { - return new _OffsetRange(0, length); - } - static ofStartAndLength(start, length) { - return new _OffsetRange(start, start + length); - } - constructor(start, endExclusive) { - this.start = start; - this.endExclusive = endExclusive; - if (start > endExclusive) { - throw new BugIndicatingError(`Invalid range: ${this.toString()}`); - } - } - get isEmpty() { - return this.start === this.endExclusive; - } - delta(offset) { - return new _OffsetRange(this.start + offset, this.endExclusive + offset); - } - deltaStart(offset) { - return new _OffsetRange(this.start + offset, this.endExclusive); - } - deltaEnd(offset) { - return new _OffsetRange(this.start, this.endExclusive + offset); - } - get length() { - return this.endExclusive - this.start; - } - toString() { - return `[${this.start}, ${this.endExclusive})`; - } - contains(offset) { - return this.start <= offset && offset < this.endExclusive; - } - /** - * for all numbers n: range1.contains(n) or range2.contains(n) => range1.join(range2).contains(n) - * The joined range is the smallest range that contains both ranges. - */ - join(other) { - return new _OffsetRange(Math.min(this.start, other.start), Math.max(this.endExclusive, other.endExclusive)); - } - /** - * for all numbers n: range1.contains(n) and range2.contains(n) <=> range1.intersect(range2).contains(n) - * - * The resulting range is empty if the ranges do not intersect, but touch. - * If the ranges don't even touch, the result is undefined. - */ - intersect(other) { - const start = Math.max(this.start, other.start); - const end = Math.min(this.endExclusive, other.endExclusive); - if (start <= end) { - return new _OffsetRange(start, end); - } - return void 0; - } - intersects(other) { - const start = Math.max(this.start, other.start); - const end = Math.min(this.endExclusive, other.endExclusive); - return start < end; - } - isBefore(other) { - return this.endExclusive <= other.start; - } - isAfter(other) { - return this.start >= other.endExclusive; - } - slice(arr) { - return arr.slice(this.start, this.endExclusive); - } - /** - * Returns the given value if it is contained in this instance, otherwise the closest value that is contained. - * The range must not be empty. - */ - clip(value) { - if (this.isEmpty) { - throw new BugIndicatingError(`Invalid clipping range: ${this.toString()}`); - } - return Math.max(this.start, Math.min(this.endExclusive - 1, value)); - } - /** - * Returns `r := value + k * length` such that `r` is contained in this range. - * The range must not be empty. - * - * E.g. `[5, 10).clipCyclic(10) === 5`, `[5, 10).clipCyclic(11) === 6` and `[5, 10).clipCyclic(4) === 9`. - */ - clipCyclic(value) { - if (this.isEmpty) { - throw new BugIndicatingError(`Invalid clipping range: ${this.toString()}`); - } - if (value < this.start) { - return this.endExclusive - (this.start - value) % this.length; - } - if (value >= this.endExclusive) { - return this.start + (value - this.start) % this.length; - } - return value; - } - forEach(f) { - for (let i = this.start; i < this.endExclusive; i++) { - f(i); - } - } - }; - - // node_modules/monaco-editor/esm/vs/base/common/arraysFind.js - function findLastMonotonous(array, predicate) { - const idx = findLastIdxMonotonous(array, predicate); - return idx === -1 ? void 0 : array[idx]; - } - function findLastIdxMonotonous(array, predicate, startIdx = 0, endIdxEx = array.length) { - let i = startIdx; - let j = endIdxEx; - while (i < j) { - const k = Math.floor((i + j) / 2); - if (predicate(array[k])) { - i = k + 1; - } else { - j = k; - } - } - return i - 1; - } - function findFirstMonotonous(array, predicate) { - const idx = findFirstIdxMonotonousOrArrLen(array, predicate); - return idx === array.length ? void 0 : array[idx]; - } - function findFirstIdxMonotonousOrArrLen(array, predicate, startIdx = 0, endIdxEx = array.length) { - let i = startIdx; - let j = endIdxEx; - while (i < j) { - const k = Math.floor((i + j) / 2); - if (predicate(array[k])) { - j = k; - } else { - i = k + 1; - } - } - return i; - } - var MonotonousArray = class _MonotonousArray { - constructor(_array) { - this._array = _array; - this._findLastMonotonousLastIdx = 0; - } - /** - * The predicate must be monotonous, i.e. `arr.map(predicate)` must be like `[true, ..., true, false, ..., false]`! - * For subsequent calls, current predicate must be weaker than (or equal to) the previous predicate, i.e. more entries must be `true`. - */ - findLastMonotonous(predicate) { - if (_MonotonousArray.assertInvariants) { - if (this._prevFindLastPredicate) { - for (const item of this._array) { - if (this._prevFindLastPredicate(item) && !predicate(item)) { - throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate."); - } - } - } - this._prevFindLastPredicate = predicate; - } - const idx = findLastIdxMonotonous(this._array, predicate, this._findLastMonotonousLastIdx); - this._findLastMonotonousLastIdx = idx + 1; - return idx === -1 ? void 0 : this._array[idx]; - } - }; - MonotonousArray.assertInvariants = false; - - // node_modules/monaco-editor/esm/vs/editor/common/core/lineRange.js - var LineRange = class _LineRange { - static fromRangeInclusive(range) { - return new _LineRange(range.startLineNumber, range.endLineNumber + 1); - } - /** - * @param lineRanges An array of sorted line ranges. - */ - static joinMany(lineRanges) { - if (lineRanges.length === 0) { - return []; - } - let result = new LineRangeSet(lineRanges[0].slice()); - for (let i = 1; i < lineRanges.length; i++) { - result = result.getUnion(new LineRangeSet(lineRanges[i].slice())); - } - return result.ranges; - } - static ofLength(startLineNumber, length) { - return new _LineRange(startLineNumber, startLineNumber + length); - } - /** - * @internal - */ - static deserialize(lineRange) { - return new _LineRange(lineRange[0], lineRange[1]); - } - constructor(startLineNumber, endLineNumberExclusive) { - if (startLineNumber > endLineNumberExclusive) { - throw new BugIndicatingError(`startLineNumber ${startLineNumber} cannot be after endLineNumberExclusive ${endLineNumberExclusive}`); - } - this.startLineNumber = startLineNumber; - this.endLineNumberExclusive = endLineNumberExclusive; - } - /** - * Indicates if this line range contains the given line number. - */ - contains(lineNumber) { - return this.startLineNumber <= lineNumber && lineNumber < this.endLineNumberExclusive; - } - /** - * Indicates if this line range is empty. - */ - get isEmpty() { - return this.startLineNumber === this.endLineNumberExclusive; - } - /** - * Moves this line range by the given offset of line numbers. - */ - delta(offset) { - return new _LineRange(this.startLineNumber + offset, this.endLineNumberExclusive + offset); - } - deltaLength(offset) { - return new _LineRange(this.startLineNumber, this.endLineNumberExclusive + offset); - } - /** - * The number of lines this line range spans. - */ - get length() { - return this.endLineNumberExclusive - this.startLineNumber; - } - /** - * Creates a line range that combines this and the given line range. - */ - join(other) { - return new _LineRange(Math.min(this.startLineNumber, other.startLineNumber), Math.max(this.endLineNumberExclusive, other.endLineNumberExclusive)); - } - toString() { - return `[${this.startLineNumber},${this.endLineNumberExclusive})`; - } - /** - * The resulting range is empty if the ranges do not intersect, but touch. - * If the ranges don't even touch, the result is undefined. - */ - intersect(other) { - const startLineNumber = Math.max(this.startLineNumber, other.startLineNumber); - const endLineNumberExclusive = Math.min(this.endLineNumberExclusive, other.endLineNumberExclusive); - if (startLineNumber <= endLineNumberExclusive) { - return new _LineRange(startLineNumber, endLineNumberExclusive); - } - return void 0; - } - intersectsStrict(other) { - return this.startLineNumber < other.endLineNumberExclusive && other.startLineNumber < this.endLineNumberExclusive; - } - overlapOrTouch(other) { - return this.startLineNumber <= other.endLineNumberExclusive && other.startLineNumber <= this.endLineNumberExclusive; - } - equals(b) { - return this.startLineNumber === b.startLineNumber && this.endLineNumberExclusive === b.endLineNumberExclusive; - } - toInclusiveRange() { - if (this.isEmpty) { - return null; - } - return new Range(this.startLineNumber, 1, this.endLineNumberExclusive - 1, Number.MAX_SAFE_INTEGER); - } - toExclusiveRange() { - return new Range(this.startLineNumber, 1, this.endLineNumberExclusive, 1); - } - mapToLineArray(f) { - const result = []; - for (let lineNumber = this.startLineNumber; lineNumber < this.endLineNumberExclusive; lineNumber++) { - result.push(f(lineNumber)); - } - return result; - } - forEach(f) { - for (let lineNumber = this.startLineNumber; lineNumber < this.endLineNumberExclusive; lineNumber++) { - f(lineNumber); - } - } - /** - * @internal - */ - serialize() { - return [this.startLineNumber, this.endLineNumberExclusive]; - } - includes(lineNumber) { - return this.startLineNumber <= lineNumber && lineNumber < this.endLineNumberExclusive; - } - /** - * Converts this 1-based line range to a 0-based offset range (subtracts 1!). - * @internal - */ - toOffsetRange() { - return new OffsetRange(this.startLineNumber - 1, this.endLineNumberExclusive - 1); - } - }; - var LineRangeSet = class _LineRangeSet { - constructor(_normalizedRanges = []) { - this._normalizedRanges = _normalizedRanges; - } - get ranges() { - return this._normalizedRanges; - } - addRange(range) { - if (range.length === 0) { - return; - } - const joinRangeStartIdx = findFirstIdxMonotonousOrArrLen(this._normalizedRanges, (r) => r.endLineNumberExclusive >= range.startLineNumber); - const joinRangeEndIdxExclusive = findLastIdxMonotonous(this._normalizedRanges, (r) => r.startLineNumber <= range.endLineNumberExclusive) + 1; - if (joinRangeStartIdx === joinRangeEndIdxExclusive) { - this._normalizedRanges.splice(joinRangeStartIdx, 0, range); - } else if (joinRangeStartIdx === joinRangeEndIdxExclusive - 1) { - const joinRange = this._normalizedRanges[joinRangeStartIdx]; - this._normalizedRanges[joinRangeStartIdx] = joinRange.join(range); - } else { - const joinRange = this._normalizedRanges[joinRangeStartIdx].join(this._normalizedRanges[joinRangeEndIdxExclusive - 1]).join(range); - this._normalizedRanges.splice(joinRangeStartIdx, joinRangeEndIdxExclusive - joinRangeStartIdx, joinRange); - } - } - contains(lineNumber) { - const rangeThatStartsBeforeEnd = findLastMonotonous(this._normalizedRanges, (r) => r.startLineNumber <= lineNumber); - return !!rangeThatStartsBeforeEnd && rangeThatStartsBeforeEnd.endLineNumberExclusive > lineNumber; - } - intersects(range) { - const rangeThatStartsBeforeEnd = findLastMonotonous(this._normalizedRanges, (r) => r.startLineNumber < range.endLineNumberExclusive); - return !!rangeThatStartsBeforeEnd && rangeThatStartsBeforeEnd.endLineNumberExclusive > range.startLineNumber; - } - getUnion(other) { - if (this._normalizedRanges.length === 0) { - return other; - } - if (other._normalizedRanges.length === 0) { - return this; - } - const result = []; - let i1 = 0; - let i2 = 0; - let current = null; - while (i1 < this._normalizedRanges.length || i2 < other._normalizedRanges.length) { - let next = null; - if (i1 < this._normalizedRanges.length && i2 < other._normalizedRanges.length) { - const lineRange1 = this._normalizedRanges[i1]; - const lineRange2 = other._normalizedRanges[i2]; - if (lineRange1.startLineNumber < lineRange2.startLineNumber) { - next = lineRange1; - i1++; - } else { - next = lineRange2; - i2++; - } - } else if (i1 < this._normalizedRanges.length) { - next = this._normalizedRanges[i1]; - i1++; - } else { - next = other._normalizedRanges[i2]; - i2++; - } - if (current === null) { - current = next; - } else { - if (current.endLineNumberExclusive >= next.startLineNumber) { - current = new LineRange(current.startLineNumber, Math.max(current.endLineNumberExclusive, next.endLineNumberExclusive)); - } else { - result.push(current); - current = next; - } - } - } - if (current !== null) { - result.push(current); - } - return new _LineRangeSet(result); - } - /** - * Subtracts all ranges in this set from `range` and returns the result. - */ - subtractFrom(range) { - const joinRangeStartIdx = findFirstIdxMonotonousOrArrLen(this._normalizedRanges, (r) => r.endLineNumberExclusive >= range.startLineNumber); - const joinRangeEndIdxExclusive = findLastIdxMonotonous(this._normalizedRanges, (r) => r.startLineNumber <= range.endLineNumberExclusive) + 1; - if (joinRangeStartIdx === joinRangeEndIdxExclusive) { - return new _LineRangeSet([range]); - } - const result = []; - let startLineNumber = range.startLineNumber; - for (let i = joinRangeStartIdx; i < joinRangeEndIdxExclusive; i++) { - const r = this._normalizedRanges[i]; - if (r.startLineNumber > startLineNumber) { - result.push(new LineRange(startLineNumber, r.startLineNumber)); - } - startLineNumber = r.endLineNumberExclusive; - } - if (startLineNumber < range.endLineNumberExclusive) { - result.push(new LineRange(startLineNumber, range.endLineNumberExclusive)); - } - return new _LineRangeSet(result); - } - toString() { - return this._normalizedRanges.map((r) => r.toString()).join(", "); - } - getIntersection(other) { - const result = []; - let i1 = 0; - let i2 = 0; - while (i1 < this._normalizedRanges.length && i2 < other._normalizedRanges.length) { - const r1 = this._normalizedRanges[i1]; - const r2 = other._normalizedRanges[i2]; - const i = r1.intersect(r2); - if (i && !i.isEmpty) { - result.push(i); - } - if (r1.endLineNumberExclusive < r2.endLineNumberExclusive) { - i1++; - } else { - i2++; - } - } - return new _LineRangeSet(result); - } - getWithDelta(value) { - return new _LineRangeSet(this._normalizedRanges.map((r) => r.delta(value))); - } - }; - - // node_modules/monaco-editor/esm/vs/editor/common/diff/rangeMapping.js - var LineRangeMapping = class _LineRangeMapping { - static inverse(mapping, originalLineCount, modifiedLineCount) { - const result = []; - let lastOriginalEndLineNumber = 1; - let lastModifiedEndLineNumber = 1; - for (const m of mapping) { - const r2 = new _LineRangeMapping(new LineRange(lastOriginalEndLineNumber, m.original.startLineNumber), new LineRange(lastModifiedEndLineNumber, m.modified.startLineNumber)); - if (!r2.modified.isEmpty) { - result.push(r2); - } - lastOriginalEndLineNumber = m.original.endLineNumberExclusive; - lastModifiedEndLineNumber = m.modified.endLineNumberExclusive; - } - const r = new _LineRangeMapping(new LineRange(lastOriginalEndLineNumber, originalLineCount + 1), new LineRange(lastModifiedEndLineNumber, modifiedLineCount + 1)); - if (!r.modified.isEmpty) { - result.push(r); - } - return result; - } - static clip(mapping, originalRange, modifiedRange) { - const result = []; - for (const m of mapping) { - const original = m.original.intersect(originalRange); - const modified = m.modified.intersect(modifiedRange); - if (original && !original.isEmpty && modified && !modified.isEmpty) { - result.push(new _LineRangeMapping(original, modified)); - } - } - return result; - } - constructor(originalRange, modifiedRange) { - this.original = originalRange; - this.modified = modifiedRange; - } - toString() { - return `{${this.original.toString()}->${this.modified.toString()}}`; - } - flip() { - return new _LineRangeMapping(this.modified, this.original); - } - join(other) { - return new _LineRangeMapping(this.original.join(other.original), this.modified.join(other.modified)); - } - }; - var DetailedLineRangeMapping = class _DetailedLineRangeMapping extends LineRangeMapping { - constructor(originalRange, modifiedRange, innerChanges) { - super(originalRange, modifiedRange); - this.innerChanges = innerChanges; - } - flip() { - var _a4; - return new _DetailedLineRangeMapping(this.modified, this.original, (_a4 = this.innerChanges) === null || _a4 === void 0 ? void 0 : _a4.map((c) => c.flip())); - } - }; - var RangeMapping = class _RangeMapping { - constructor(originalRange, modifiedRange) { - this.originalRange = originalRange; - this.modifiedRange = modifiedRange; - } - toString() { - return `{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`; - } - flip() { - return new _RangeMapping(this.modifiedRange, this.originalRange); - } - }; - - // node_modules/monaco-editor/esm/vs/editor/common/diff/legacyLinesDiffComputer.js - var MINIMUM_MATCHING_CHARACTER_LENGTH = 3; - var LegacyLinesDiffComputer = class { - computeDiff(originalLines, modifiedLines, options) { - var _a4; - const diffComputer = new DiffComputer(originalLines, modifiedLines, { - maxComputationTime: options.maxComputationTimeMs, - shouldIgnoreTrimWhitespace: options.ignoreTrimWhitespace, - shouldComputeCharChanges: true, - shouldMakePrettyDiff: true, - shouldPostProcessCharChanges: true - }); - const result = diffComputer.computeDiff(); - const changes = []; - let lastChange = null; - for (const c of result.changes) { - let originalRange; - if (c.originalEndLineNumber === 0) { - originalRange = new LineRange(c.originalStartLineNumber + 1, c.originalStartLineNumber + 1); - } else { - originalRange = new LineRange(c.originalStartLineNumber, c.originalEndLineNumber + 1); - } - let modifiedRange; - if (c.modifiedEndLineNumber === 0) { - modifiedRange = new LineRange(c.modifiedStartLineNumber + 1, c.modifiedStartLineNumber + 1); - } else { - modifiedRange = new LineRange(c.modifiedStartLineNumber, c.modifiedEndLineNumber + 1); - } - let change = new DetailedLineRangeMapping(originalRange, modifiedRange, (_a4 = c.charChanges) === null || _a4 === void 0 ? void 0 : _a4.map((c2) => new RangeMapping(new Range(c2.originalStartLineNumber, c2.originalStartColumn, c2.originalEndLineNumber, c2.originalEndColumn), new Range(c2.modifiedStartLineNumber, c2.modifiedStartColumn, c2.modifiedEndLineNumber, c2.modifiedEndColumn)))); - if (lastChange) { - if (lastChange.modified.endLineNumberExclusive === change.modified.startLineNumber || lastChange.original.endLineNumberExclusive === change.original.startLineNumber) { - change = new DetailedLineRangeMapping(lastChange.original.join(change.original), lastChange.modified.join(change.modified), lastChange.innerChanges && change.innerChanges ? lastChange.innerChanges.concat(change.innerChanges) : void 0); - changes.pop(); - } - } - changes.push(change); - lastChange = change; - } - assertFn(() => { - return checkAdjacentItems(changes, (m1, m2) => m2.original.startLineNumber - m1.original.endLineNumberExclusive === m2.modified.startLineNumber - m1.modified.endLineNumberExclusive && // There has to be an unchanged line in between (otherwise both diffs should have been joined) - m1.original.endLineNumberExclusive < m2.original.startLineNumber && m1.modified.endLineNumberExclusive < m2.modified.startLineNumber); - }); - return new LinesDiff(changes, [], result.quitEarly); - } - }; - function computeDiff(originalSequence, modifiedSequence, continueProcessingPredicate, pretty) { - const diffAlgo = new LcsDiff(originalSequence, modifiedSequence, continueProcessingPredicate); - return diffAlgo.ComputeDiff(pretty); - } - var LineSequence = class { - constructor(lines) { - const startColumns = []; - const endColumns = []; - for (let i = 0, length = lines.length; i < length; i++) { - startColumns[i] = getFirstNonBlankColumn(lines[i], 1); - endColumns[i] = getLastNonBlankColumn(lines[i], 1); - } - this.lines = lines; - this._startColumns = startColumns; - this._endColumns = endColumns; - } - getElements() { - const elements = []; - for (let i = 0, len = this.lines.length; i < len; i++) { - elements[i] = this.lines[i].substring(this._startColumns[i] - 1, this._endColumns[i] - 1); - } - return elements; - } - getStrictElement(index) { - return this.lines[index]; - } - getStartLineNumber(i) { - return i + 1; - } - getEndLineNumber(i) { - return i + 1; - } - createCharSequence(shouldIgnoreTrimWhitespace, startIndex, endIndex) { - const charCodes = []; - const lineNumbers = []; - const columns = []; - let len = 0; - for (let index = startIndex; index <= endIndex; index++) { - const lineContent = this.lines[index]; - const startColumn = shouldIgnoreTrimWhitespace ? this._startColumns[index] : 1; - const endColumn = shouldIgnoreTrimWhitespace ? this._endColumns[index] : lineContent.length + 1; - for (let col = startColumn; col < endColumn; col++) { - charCodes[len] = lineContent.charCodeAt(col - 1); - lineNumbers[len] = index + 1; - columns[len] = col; - len++; - } - if (!shouldIgnoreTrimWhitespace && index < endIndex) { - charCodes[len] = 10; - lineNumbers[len] = index + 1; - columns[len] = lineContent.length + 1; - len++; - } - } - return new CharSequence(charCodes, lineNumbers, columns); - } - }; - var CharSequence = class { - constructor(charCodes, lineNumbers, columns) { - this._charCodes = charCodes; - this._lineNumbers = lineNumbers; - this._columns = columns; - } - toString() { - return "[" + this._charCodes.map((s, idx) => (s === 10 ? "\\n" : String.fromCharCode(s)) + `-(${this._lineNumbers[idx]},${this._columns[idx]})`).join(", ") + "]"; - } - _assertIndex(index, arr) { - if (index < 0 || index >= arr.length) { - throw new Error(`Illegal index`); - } - } - getElements() { - return this._charCodes; - } - getStartLineNumber(i) { - if (i > 0 && i === this._lineNumbers.length) { - return this.getEndLineNumber(i - 1); - } - this._assertIndex(i, this._lineNumbers); - return this._lineNumbers[i]; - } - getEndLineNumber(i) { - if (i === -1) { - return this.getStartLineNumber(i + 1); - } - this._assertIndex(i, this._lineNumbers); - if (this._charCodes[i] === 10) { - return this._lineNumbers[i] + 1; - } - return this._lineNumbers[i]; - } - getStartColumn(i) { - if (i > 0 && i === this._columns.length) { - return this.getEndColumn(i - 1); - } - this._assertIndex(i, this._columns); - return this._columns[i]; - } - getEndColumn(i) { - if (i === -1) { - return this.getStartColumn(i + 1); - } - this._assertIndex(i, this._columns); - if (this._charCodes[i] === 10) { - return 1; - } - return this._columns[i] + 1; - } - }; - var CharChange = class _CharChange { - constructor(originalStartLineNumber, originalStartColumn, originalEndLineNumber, originalEndColumn, modifiedStartLineNumber, modifiedStartColumn, modifiedEndLineNumber, modifiedEndColumn) { - this.originalStartLineNumber = originalStartLineNumber; - this.originalStartColumn = originalStartColumn; - this.originalEndLineNumber = originalEndLineNumber; - this.originalEndColumn = originalEndColumn; - this.modifiedStartLineNumber = modifiedStartLineNumber; - this.modifiedStartColumn = modifiedStartColumn; - this.modifiedEndLineNumber = modifiedEndLineNumber; - this.modifiedEndColumn = modifiedEndColumn; - } - static createFromDiffChange(diffChange, originalCharSequence, modifiedCharSequence) { - const originalStartLineNumber = originalCharSequence.getStartLineNumber(diffChange.originalStart); - const originalStartColumn = originalCharSequence.getStartColumn(diffChange.originalStart); - const originalEndLineNumber = originalCharSequence.getEndLineNumber(diffChange.originalStart + diffChange.originalLength - 1); - const originalEndColumn = originalCharSequence.getEndColumn(diffChange.originalStart + diffChange.originalLength - 1); - const modifiedStartLineNumber = modifiedCharSequence.getStartLineNumber(diffChange.modifiedStart); - const modifiedStartColumn = modifiedCharSequence.getStartColumn(diffChange.modifiedStart); - const modifiedEndLineNumber = modifiedCharSequence.getEndLineNumber(diffChange.modifiedStart + diffChange.modifiedLength - 1); - const modifiedEndColumn = modifiedCharSequence.getEndColumn(diffChange.modifiedStart + diffChange.modifiedLength - 1); - return new _CharChange(originalStartLineNumber, originalStartColumn, originalEndLineNumber, originalEndColumn, modifiedStartLineNumber, modifiedStartColumn, modifiedEndLineNumber, modifiedEndColumn); - } - }; - function postProcessCharChanges(rawChanges) { - if (rawChanges.length <= 1) { - return rawChanges; - } - const result = [rawChanges[0]]; - let prevChange = result[0]; - for (let i = 1, len = rawChanges.length; i < len; i++) { - const currChange = rawChanges[i]; - const originalMatchingLength = currChange.originalStart - (prevChange.originalStart + prevChange.originalLength); - const modifiedMatchingLength = currChange.modifiedStart - (prevChange.modifiedStart + prevChange.modifiedLength); - const matchingLength = Math.min(originalMatchingLength, modifiedMatchingLength); - if (matchingLength < MINIMUM_MATCHING_CHARACTER_LENGTH) { - prevChange.originalLength = currChange.originalStart + currChange.originalLength - prevChange.originalStart; - prevChange.modifiedLength = currChange.modifiedStart + currChange.modifiedLength - prevChange.modifiedStart; - } else { - result.push(currChange); - prevChange = currChange; - } - } - return result; - } - var LineChange = class _LineChange { - constructor(originalStartLineNumber, originalEndLineNumber, modifiedStartLineNumber, modifiedEndLineNumber, charChanges) { - this.originalStartLineNumber = originalStartLineNumber; - this.originalEndLineNumber = originalEndLineNumber; - this.modifiedStartLineNumber = modifiedStartLineNumber; - this.modifiedEndLineNumber = modifiedEndLineNumber; - this.charChanges = charChanges; - } - static createFromDiffResult(shouldIgnoreTrimWhitespace, diffChange, originalLineSequence, modifiedLineSequence, continueCharDiff, shouldComputeCharChanges, shouldPostProcessCharChanges) { - let originalStartLineNumber; - let originalEndLineNumber; - let modifiedStartLineNumber; - let modifiedEndLineNumber; - let charChanges = void 0; - if (diffChange.originalLength === 0) { - originalStartLineNumber = originalLineSequence.getStartLineNumber(diffChange.originalStart) - 1; - originalEndLineNumber = 0; - } else { - originalStartLineNumber = originalLineSequence.getStartLineNumber(diffChange.originalStart); - originalEndLineNumber = originalLineSequence.getEndLineNumber(diffChange.originalStart + diffChange.originalLength - 1); - } - if (diffChange.modifiedLength === 0) { - modifiedStartLineNumber = modifiedLineSequence.getStartLineNumber(diffChange.modifiedStart) - 1; - modifiedEndLineNumber = 0; - } else { - modifiedStartLineNumber = modifiedLineSequence.getStartLineNumber(diffChange.modifiedStart); - modifiedEndLineNumber = modifiedLineSequence.getEndLineNumber(diffChange.modifiedStart + diffChange.modifiedLength - 1); - } - if (shouldComputeCharChanges && diffChange.originalLength > 0 && diffChange.originalLength < 20 && diffChange.modifiedLength > 0 && diffChange.modifiedLength < 20 && continueCharDiff()) { - const originalCharSequence = originalLineSequence.createCharSequence(shouldIgnoreTrimWhitespace, diffChange.originalStart, diffChange.originalStart + diffChange.originalLength - 1); - const modifiedCharSequence = modifiedLineSequence.createCharSequence(shouldIgnoreTrimWhitespace, diffChange.modifiedStart, diffChange.modifiedStart + diffChange.modifiedLength - 1); - if (originalCharSequence.getElements().length > 0 && modifiedCharSequence.getElements().length > 0) { - let rawChanges = computeDiff(originalCharSequence, modifiedCharSequence, continueCharDiff, true).changes; - if (shouldPostProcessCharChanges) { - rawChanges = postProcessCharChanges(rawChanges); - } - charChanges = []; - for (let i = 0, length = rawChanges.length; i < length; i++) { - charChanges.push(CharChange.createFromDiffChange(rawChanges[i], originalCharSequence, modifiedCharSequence)); - } - } - } - return new _LineChange(originalStartLineNumber, originalEndLineNumber, modifiedStartLineNumber, modifiedEndLineNumber, charChanges); - } - }; - var DiffComputer = class { - constructor(originalLines, modifiedLines, opts) { - this.shouldComputeCharChanges = opts.shouldComputeCharChanges; - this.shouldPostProcessCharChanges = opts.shouldPostProcessCharChanges; - this.shouldIgnoreTrimWhitespace = opts.shouldIgnoreTrimWhitespace; - this.shouldMakePrettyDiff = opts.shouldMakePrettyDiff; - this.originalLines = originalLines; - this.modifiedLines = modifiedLines; - this.original = new LineSequence(originalLines); - this.modified = new LineSequence(modifiedLines); - this.continueLineDiff = createContinueProcessingPredicate(opts.maxComputationTime); - this.continueCharDiff = createContinueProcessingPredicate(opts.maxComputationTime === 0 ? 0 : Math.min(opts.maxComputationTime, 5e3)); - } - computeDiff() { - if (this.original.lines.length === 1 && this.original.lines[0].length === 0) { - if (this.modified.lines.length === 1 && this.modified.lines[0].length === 0) { - return { - quitEarly: false, - changes: [] - }; - } - return { - quitEarly: false, - changes: [{ - originalStartLineNumber: 1, - originalEndLineNumber: 1, - modifiedStartLineNumber: 1, - modifiedEndLineNumber: this.modified.lines.length, - charChanges: void 0 - }] - }; - } - if (this.modified.lines.length === 1 && this.modified.lines[0].length === 0) { - return { - quitEarly: false, - changes: [{ - originalStartLineNumber: 1, - originalEndLineNumber: this.original.lines.length, - modifiedStartLineNumber: 1, - modifiedEndLineNumber: 1, - charChanges: void 0 - }] - }; - } - const diffResult = computeDiff(this.original, this.modified, this.continueLineDiff, this.shouldMakePrettyDiff); - const rawChanges = diffResult.changes; - const quitEarly = diffResult.quitEarly; - if (this.shouldIgnoreTrimWhitespace) { - const lineChanges = []; - for (let i = 0, length = rawChanges.length; i < length; i++) { - lineChanges.push(LineChange.createFromDiffResult(this.shouldIgnoreTrimWhitespace, rawChanges[i], this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges)); - } - return { - quitEarly, - changes: lineChanges - }; - } - const result = []; - let originalLineIndex = 0; - let modifiedLineIndex = 0; - for (let i = -1, len = rawChanges.length; i < len; i++) { - const nextChange = i + 1 < len ? rawChanges[i + 1] : null; - const originalStop = nextChange ? nextChange.originalStart : this.originalLines.length; - const modifiedStop = nextChange ? nextChange.modifiedStart : this.modifiedLines.length; - while (originalLineIndex < originalStop && modifiedLineIndex < modifiedStop) { - const originalLine = this.originalLines[originalLineIndex]; - const modifiedLine = this.modifiedLines[modifiedLineIndex]; - if (originalLine !== modifiedLine) { - { - let originalStartColumn = getFirstNonBlankColumn(originalLine, 1); - let modifiedStartColumn = getFirstNonBlankColumn(modifiedLine, 1); - while (originalStartColumn > 1 && modifiedStartColumn > 1) { - const originalChar = originalLine.charCodeAt(originalStartColumn - 2); - const modifiedChar = modifiedLine.charCodeAt(modifiedStartColumn - 2); - if (originalChar !== modifiedChar) { - break; - } - originalStartColumn--; - modifiedStartColumn--; - } - if (originalStartColumn > 1 || modifiedStartColumn > 1) { - this._pushTrimWhitespaceCharChange(result, originalLineIndex + 1, 1, originalStartColumn, modifiedLineIndex + 1, 1, modifiedStartColumn); - } - } - { - let originalEndColumn = getLastNonBlankColumn(originalLine, 1); - let modifiedEndColumn = getLastNonBlankColumn(modifiedLine, 1); - const originalMaxColumn = originalLine.length + 1; - const modifiedMaxColumn = modifiedLine.length + 1; - while (originalEndColumn < originalMaxColumn && modifiedEndColumn < modifiedMaxColumn) { - const originalChar = originalLine.charCodeAt(originalEndColumn - 1); - const modifiedChar = originalLine.charCodeAt(modifiedEndColumn - 1); - if (originalChar !== modifiedChar) { - break; - } - originalEndColumn++; - modifiedEndColumn++; - } - if (originalEndColumn < originalMaxColumn || modifiedEndColumn < modifiedMaxColumn) { - this._pushTrimWhitespaceCharChange(result, originalLineIndex + 1, originalEndColumn, originalMaxColumn, modifiedLineIndex + 1, modifiedEndColumn, modifiedMaxColumn); - } - } - } - originalLineIndex++; - modifiedLineIndex++; - } - if (nextChange) { - result.push(LineChange.createFromDiffResult(this.shouldIgnoreTrimWhitespace, nextChange, this.original, this.modified, this.continueCharDiff, this.shouldComputeCharChanges, this.shouldPostProcessCharChanges)); - originalLineIndex += nextChange.originalLength; - modifiedLineIndex += nextChange.modifiedLength; - } - } - return { - quitEarly, - changes: result - }; - } - _pushTrimWhitespaceCharChange(result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn) { - if (this._mergeTrimWhitespaceCharChange(result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn)) { - return; - } - let charChanges = void 0; - if (this.shouldComputeCharChanges) { - charChanges = [new CharChange(originalLineNumber, originalStartColumn, originalLineNumber, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedLineNumber, modifiedEndColumn)]; - } - result.push(new LineChange(originalLineNumber, originalLineNumber, modifiedLineNumber, modifiedLineNumber, charChanges)); - } - _mergeTrimWhitespaceCharChange(result, originalLineNumber, originalStartColumn, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedEndColumn) { - const len = result.length; - if (len === 0) { - return false; - } - const prevChange = result[len - 1]; - if (prevChange.originalEndLineNumber === 0 || prevChange.modifiedEndLineNumber === 0) { - return false; - } - if (prevChange.originalEndLineNumber === originalLineNumber && prevChange.modifiedEndLineNumber === modifiedLineNumber) { - if (this.shouldComputeCharChanges && prevChange.charChanges) { - prevChange.charChanges.push(new CharChange(originalLineNumber, originalStartColumn, originalLineNumber, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedLineNumber, modifiedEndColumn)); - } - return true; - } - if (prevChange.originalEndLineNumber + 1 === originalLineNumber && prevChange.modifiedEndLineNumber + 1 === modifiedLineNumber) { - prevChange.originalEndLineNumber = originalLineNumber; - prevChange.modifiedEndLineNumber = modifiedLineNumber; - if (this.shouldComputeCharChanges && prevChange.charChanges) { - prevChange.charChanges.push(new CharChange(originalLineNumber, originalStartColumn, originalLineNumber, originalEndColumn, modifiedLineNumber, modifiedStartColumn, modifiedLineNumber, modifiedEndColumn)); - } - return true; - } - return false; - } - }; - function getFirstNonBlankColumn(txt, defaultValue) { - const r = firstNonWhitespaceIndex(txt); - if (r === -1) { - return defaultValue; - } - return r + 1; - } - function getLastNonBlankColumn(txt, defaultValue) { - const r = lastNonWhitespaceIndex(txt); - if (r === -1) { - return defaultValue; - } - return r + 2; - } - function createContinueProcessingPredicate(maximumRuntime) { - if (maximumRuntime === 0) { - return () => true; - } - const startTime = Date.now(); - return () => { - return Date.now() - startTime < maximumRuntime; - }; - } - - // node_modules/monaco-editor/esm/vs/editor/common/diff/defaultLinesDiffComputer/algorithms/diffAlgorithm.js - var DiffAlgorithmResult = class _DiffAlgorithmResult { - static trivial(seq1, seq2) { - return new _DiffAlgorithmResult([new SequenceDiff(OffsetRange.ofLength(seq1.length), OffsetRange.ofLength(seq2.length))], false); - } - static trivialTimedOut(seq1, seq2) { - return new _DiffAlgorithmResult([new SequenceDiff(OffsetRange.ofLength(seq1.length), OffsetRange.ofLength(seq2.length))], true); - } - constructor(diffs, hitTimeout) { - this.diffs = diffs; - this.hitTimeout = hitTimeout; - } - }; - var SequenceDiff = class _SequenceDiff { - static invert(sequenceDiffs, doc1Length) { - const result = []; - forEachAdjacent(sequenceDiffs, (a, b) => { - result.push(_SequenceDiff.fromOffsetPairs(a ? a.getEndExclusives() : OffsetPair.zero, b ? b.getStarts() : new OffsetPair(doc1Length, (a ? a.seq2Range.endExclusive - a.seq1Range.endExclusive : 0) + doc1Length))); - }); - return result; - } - static fromOffsetPairs(start, endExclusive) { - return new _SequenceDiff(new OffsetRange(start.offset1, endExclusive.offset1), new OffsetRange(start.offset2, endExclusive.offset2)); - } - constructor(seq1Range, seq2Range) { - this.seq1Range = seq1Range; - this.seq2Range = seq2Range; - } - swap() { - return new _SequenceDiff(this.seq2Range, this.seq1Range); - } - toString() { - return `${this.seq1Range} <-> ${this.seq2Range}`; - } - join(other) { - return new _SequenceDiff(this.seq1Range.join(other.seq1Range), this.seq2Range.join(other.seq2Range)); - } - delta(offset) { - if (offset === 0) { - return this; - } - return new _SequenceDiff(this.seq1Range.delta(offset), this.seq2Range.delta(offset)); - } - deltaStart(offset) { - if (offset === 0) { - return this; - } - return new _SequenceDiff(this.seq1Range.deltaStart(offset), this.seq2Range.deltaStart(offset)); - } - deltaEnd(offset) { - if (offset === 0) { - return this; - } - return new _SequenceDiff(this.seq1Range.deltaEnd(offset), this.seq2Range.deltaEnd(offset)); - } - intersect(other) { - const i1 = this.seq1Range.intersect(other.seq1Range); - const i2 = this.seq2Range.intersect(other.seq2Range); - if (!i1 || !i2) { - return void 0; - } - return new _SequenceDiff(i1, i2); - } - getStarts() { - return new OffsetPair(this.seq1Range.start, this.seq2Range.start); - } - getEndExclusives() { - return new OffsetPair(this.seq1Range.endExclusive, this.seq2Range.endExclusive); - } - }; - var OffsetPair = class _OffsetPair { - constructor(offset1, offset2) { - this.offset1 = offset1; - this.offset2 = offset2; - } - toString() { - return `${this.offset1} <-> ${this.offset2}`; - } - delta(offset) { - if (offset === 0) { - return this; - } - return new _OffsetPair(this.offset1 + offset, this.offset2 + offset); - } - equals(other) { - return this.offset1 === other.offset1 && this.offset2 === other.offset2; - } - }; - OffsetPair.zero = new OffsetPair(0, 0); - OffsetPair.max = new OffsetPair(Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER); - var InfiniteTimeout = class { - isValid() { - return true; - } - }; - InfiniteTimeout.instance = new InfiniteTimeout(); - var DateTimeout = class { - constructor(timeout) { - this.timeout = timeout; - this.startTime = Date.now(); - this.valid = true; - if (timeout <= 0) { - throw new BugIndicatingError("timeout must be positive"); - } - } - // Recommendation: Set a log-point `{this.disable()}` in the body - isValid() { - const valid = Date.now() - this.startTime < this.timeout; - if (!valid && this.valid) { - this.valid = false; - debugger; - } - return this.valid; - } - }; - - // node_modules/monaco-editor/esm/vs/editor/common/diff/defaultLinesDiffComputer/utils.js - var Array2D = class { - constructor(width, height) { - this.width = width; - this.height = height; - this.array = []; - this.array = new Array(width * height); - } - get(x, y) { - return this.array[x + y * this.width]; - } - set(x, y, value) { - this.array[x + y * this.width] = value; - } - }; - function isSpace(charCode) { - return charCode === 32 || charCode === 9; - } - var LineRangeFragment = class _LineRangeFragment { - static getKey(chr) { - let key = this.chrKeys.get(chr); - if (key === void 0) { - key = this.chrKeys.size; - this.chrKeys.set(chr, key); - } - return key; - } - constructor(range, lines, source) { - this.range = range; - this.lines = lines; - this.source = source; - this.histogram = []; - let counter = 0; - for (let i = range.startLineNumber - 1; i < range.endLineNumberExclusive - 1; i++) { - const line = lines[i]; - for (let j = 0; j < line.length; j++) { - counter++; - const chr = line[j]; - const key2 = _LineRangeFragment.getKey(chr); - this.histogram[key2] = (this.histogram[key2] || 0) + 1; - } - counter++; - const key = _LineRangeFragment.getKey("\n"); - this.histogram[key] = (this.histogram[key] || 0) + 1; - } - this.totalCount = counter; - } - computeSimilarity(other) { - var _a4, _b2; - let sumDifferences = 0; - const maxLength = Math.max(this.histogram.length, other.histogram.length); - for (let i = 0; i < maxLength; i++) { - sumDifferences += Math.abs(((_a4 = this.histogram[i]) !== null && _a4 !== void 0 ? _a4 : 0) - ((_b2 = other.histogram[i]) !== null && _b2 !== void 0 ? _b2 : 0)); - } - return 1 - sumDifferences / (this.totalCount + other.totalCount); - } - }; - LineRangeFragment.chrKeys = /* @__PURE__ */ new Map(); - - // node_modules/monaco-editor/esm/vs/editor/common/diff/defaultLinesDiffComputer/algorithms/dynamicProgrammingDiffing.js - var DynamicProgrammingDiffing = class { - compute(sequence1, sequence2, timeout = InfiniteTimeout.instance, equalityScore) { - if (sequence1.length === 0 || sequence2.length === 0) { - return DiffAlgorithmResult.trivial(sequence1, sequence2); - } - const lcsLengths = new Array2D(sequence1.length, sequence2.length); - const directions = new Array2D(sequence1.length, sequence2.length); - const lengths = new Array2D(sequence1.length, sequence2.length); - for (let s12 = 0; s12 < sequence1.length; s12++) { - for (let s22 = 0; s22 < sequence2.length; s22++) { - if (!timeout.isValid()) { - return DiffAlgorithmResult.trivialTimedOut(sequence1, sequence2); - } - const horizontalLen = s12 === 0 ? 0 : lcsLengths.get(s12 - 1, s22); - const verticalLen = s22 === 0 ? 0 : lcsLengths.get(s12, s22 - 1); - let extendedSeqScore; - if (sequence1.getElement(s12) === sequence2.getElement(s22)) { - if (s12 === 0 || s22 === 0) { - extendedSeqScore = 0; - } else { - extendedSeqScore = lcsLengths.get(s12 - 1, s22 - 1); - } - if (s12 > 0 && s22 > 0 && directions.get(s12 - 1, s22 - 1) === 3) { - extendedSeqScore += lengths.get(s12 - 1, s22 - 1); - } - extendedSeqScore += equalityScore ? equalityScore(s12, s22) : 1; - } else { - extendedSeqScore = -1; - } - const newValue = Math.max(horizontalLen, verticalLen, extendedSeqScore); - if (newValue === extendedSeqScore) { - const prevLen = s12 > 0 && s22 > 0 ? lengths.get(s12 - 1, s22 - 1) : 0; - lengths.set(s12, s22, prevLen + 1); - directions.set(s12, s22, 3); - } else if (newValue === horizontalLen) { - lengths.set(s12, s22, 0); - directions.set(s12, s22, 1); - } else if (newValue === verticalLen) { - lengths.set(s12, s22, 0); - directions.set(s12, s22, 2); - } - lcsLengths.set(s12, s22, newValue); - } - } - const result = []; - let lastAligningPosS1 = sequence1.length; - let lastAligningPosS2 = sequence2.length; - function reportDecreasingAligningPositions(s12, s22) { - if (s12 + 1 !== lastAligningPosS1 || s22 + 1 !== lastAligningPosS2) { - result.push(new SequenceDiff(new OffsetRange(s12 + 1, lastAligningPosS1), new OffsetRange(s22 + 1, lastAligningPosS2))); - } - lastAligningPosS1 = s12; - lastAligningPosS2 = s22; - } - let s1 = sequence1.length - 1; - let s2 = sequence2.length - 1; - while (s1 >= 0 && s2 >= 0) { - if (directions.get(s1, s2) === 3) { - reportDecreasingAligningPositions(s1, s2); - s1--; - s2--; - } else { - if (directions.get(s1, s2) === 1) { - s1--; - } else { - s2--; - } - } - } - reportDecreasingAligningPositions(-1, -1); - result.reverse(); - return new DiffAlgorithmResult(result, false); - } - }; - - // node_modules/monaco-editor/esm/vs/editor/common/diff/defaultLinesDiffComputer/algorithms/myersDiffAlgorithm.js - var MyersDiffAlgorithm = class { - compute(seq1, seq2, timeout = InfiniteTimeout.instance) { - if (seq1.length === 0 || seq2.length === 0) { - return DiffAlgorithmResult.trivial(seq1, seq2); - } - const seqX = seq1; - const seqY = seq2; - function getXAfterSnake(x, y) { - while (x < seqX.length && y < seqY.length && seqX.getElement(x) === seqY.getElement(y)) { - x++; - y++; - } - return x; - } - let d = 0; - const V = new FastInt32Array(); - V.set(0, getXAfterSnake(0, 0)); - const paths = new FastArrayNegativeIndices(); - paths.set(0, V.get(0) === 0 ? null : new SnakePath(null, 0, 0, V.get(0))); - let k = 0; - loop: - while (true) { - d++; - if (!timeout.isValid()) { - return DiffAlgorithmResult.trivialTimedOut(seqX, seqY); - } - const lowerBound = -Math.min(d, seqY.length + d % 2); - const upperBound = Math.min(d, seqX.length + d % 2); - for (k = lowerBound; k <= upperBound; k += 2) { - let step = 0; - const maxXofDLineTop = k === upperBound ? -1 : V.get(k + 1); - const maxXofDLineLeft = k === lowerBound ? -1 : V.get(k - 1) + 1; - step++; - const x = Math.min(Math.max(maxXofDLineTop, maxXofDLineLeft), seqX.length); - const y = x - k; - step++; - if (x > seqX.length || y > seqY.length) { - continue; - } - const newMaxX = getXAfterSnake(x, y); - V.set(k, newMaxX); - const lastPath = x === maxXofDLineTop ? paths.get(k + 1) : paths.get(k - 1); - paths.set(k, newMaxX !== x ? new SnakePath(lastPath, x, y, newMaxX - x) : lastPath); - if (V.get(k) === seqX.length && V.get(k) - k === seqY.length) { - break loop; - } - } - } - let path = paths.get(k); - const result = []; - let lastAligningPosS1 = seqX.length; - let lastAligningPosS2 = seqY.length; - while (true) { - const endX = path ? path.x + path.length : 0; - const endY = path ? path.y + path.length : 0; - if (endX !== lastAligningPosS1 || endY !== lastAligningPosS2) { - result.push(new SequenceDiff(new OffsetRange(endX, lastAligningPosS1), new OffsetRange(endY, lastAligningPosS2))); - } - if (!path) { - break; - } - lastAligningPosS1 = path.x; - lastAligningPosS2 = path.y; - path = path.prev; - } - result.reverse(); - return new DiffAlgorithmResult(result, false); - } - }; - var SnakePath = class { - constructor(prev, x, y, length) { - this.prev = prev; - this.x = x; - this.y = y; - this.length = length; - } - }; - var FastInt32Array = class { - constructor() { - this.positiveArr = new Int32Array(10); - this.negativeArr = new Int32Array(10); - } - get(idx) { - if (idx < 0) { - idx = -idx - 1; - return this.negativeArr[idx]; - } else { - return this.positiveArr[idx]; - } - } - set(idx, value) { - if (idx < 0) { - idx = -idx - 1; - if (idx >= this.negativeArr.length) { - const arr = this.negativeArr; - this.negativeArr = new Int32Array(arr.length * 2); - this.negativeArr.set(arr); - } - this.negativeArr[idx] = value; - } else { - if (idx >= this.positiveArr.length) { - const arr = this.positiveArr; - this.positiveArr = new Int32Array(arr.length * 2); - this.positiveArr.set(arr); - } - this.positiveArr[idx] = value; - } - } - }; - var FastArrayNegativeIndices = class { - constructor() { - this.positiveArr = []; - this.negativeArr = []; - } - get(idx) { - if (idx < 0) { - idx = -idx - 1; - return this.negativeArr[idx]; - } else { - return this.positiveArr[idx]; - } - } - set(idx, value) { - if (idx < 0) { - idx = -idx - 1; - this.negativeArr[idx] = value; - } else { - this.positiveArr[idx] = value; - } - } - }; - - // node_modules/monaco-editor/esm/vs/base/common/map.js - var _a3; - var _b; - var ResourceMapEntry = class { - constructor(uri, value) { - this.uri = uri; - this.value = value; - } - }; - function isEntries(arg) { - return Array.isArray(arg); - } - var ResourceMap = class _ResourceMap { - constructor(arg, toKey) { - this[_a3] = "ResourceMap"; - if (arg instanceof _ResourceMap) { - this.map = new Map(arg.map); - this.toKey = toKey !== null && toKey !== void 0 ? toKey : _ResourceMap.defaultToKey; - } else if (isEntries(arg)) { - this.map = /* @__PURE__ */ new Map(); - this.toKey = toKey !== null && toKey !== void 0 ? toKey : _ResourceMap.defaultToKey; - for (const [resource, value] of arg) { - this.set(resource, value); - } - } else { - this.map = /* @__PURE__ */ new Map(); - this.toKey = arg !== null && arg !== void 0 ? arg : _ResourceMap.defaultToKey; - } - } - set(resource, value) { - this.map.set(this.toKey(resource), new ResourceMapEntry(resource, value)); - return this; - } - get(resource) { - var _c; - return (_c = this.map.get(this.toKey(resource))) === null || _c === void 0 ? void 0 : _c.value; - } - has(resource) { - return this.map.has(this.toKey(resource)); - } - get size() { - return this.map.size; - } - clear() { - this.map.clear(); - } - delete(resource) { - return this.map.delete(this.toKey(resource)); - } - forEach(clb, thisArg) { - if (typeof thisArg !== "undefined") { - clb = clb.bind(thisArg); - } - for (const [_, entry] of this.map) { - clb(entry.value, entry.uri, this); - } - } - *values() { - for (const entry of this.map.values()) { - yield entry.value; - } - } - *keys() { - for (const entry of this.map.values()) { - yield entry.uri; - } - } - *entries() { - for (const entry of this.map.values()) { - yield [entry.uri, entry.value]; - } - } - *[(_a3 = Symbol.toStringTag, Symbol.iterator)]() { - for (const [, entry] of this.map) { - yield [entry.uri, entry.value]; - } - } - }; - ResourceMap.defaultToKey = (resource) => resource.toString(); - var LinkedMap = class { - constructor() { - this[_b] = "LinkedMap"; - this._map = /* @__PURE__ */ 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() { - var _c; - return (_c = this._head) === null || _c === void 0 ? void 0 : _c.value; - } - get last() { - var _c; - return (_c = this._tail) === null || _c === void 0 ? void 0 : _c.value; - } - has(key) { - return this._map.has(key); - } - get(key, touch = 0) { - const item = this._map.get(key); - if (!item) { - return void 0; - } - if (touch !== 0) { - this.touch(item, touch); - } - return item.value; - } - set(key, value, touch = 0) { - let item = this._map.get(key); - if (item) { - item.value = value; - if (touch !== 0) { - this.touch(item, touch); - } - } else { - item = { key, value, next: void 0, previous: void 0 }; - switch (touch) { - case 0: - this.addItemLast(item); - break; - case 1: - this.addItemFirst(item); - break; - case 2: - this.addItemLast(item); - break; - default: - this.addItemLast(item); - break; - } - this._map.set(key, item); - this._size++; - } - return this; - } - delete(key) { - return !!this.remove(key); - } - remove(key) { - const item = this._map.get(key); - if (!item) { - return void 0; - } - this._map.delete(key); - this.removeItem(item); - this._size--; - return item.value; - } - shift() { - if (!this._head && !this._tail) { - return void 0; - } - if (!this._head || !this._tail) { - throw new Error("Invalid list"); - } - const item = this._head; - this._map.delete(item.key); - this.removeItem(item); - this._size--; - return item.value; - } - forEach(callbackfn, thisArg) { - const state = this._state; - let current = this._head; - while (current) { - if (thisArg) { - callbackfn.bind(thisArg)(current.value, current.key, this); - } else { - callbackfn(current.value, current.key, this); - } - if (this._state !== state) { - throw new Error(`LinkedMap got modified during iteration.`); - } - current = current.next; - } - } - keys() { - const map = this; - const state = this._state; - let current = this._head; - const iterator = { - [Symbol.iterator]() { - return iterator; - }, - next() { - if (map._state !== state) { - throw new Error(`LinkedMap got modified during iteration.`); - } - if (current) { - const result = { value: current.key, done: false }; - current = current.next; - return result; - } else { - return { value: void 0, done: true }; - } - } - }; - return iterator; - } - values() { - const map = this; - const state = this._state; - let current = this._head; - const iterator = { - [Symbol.iterator]() { - return iterator; - }, - next() { - if (map._state !== state) { - throw new Error(`LinkedMap got modified during iteration.`); - } - if (current) { - const result = { value: current.value, done: false }; - current = current.next; - return result; - } else { - return { value: void 0, done: true }; - } - } - }; - return iterator; - } - entries() { - const map = this; - const state = this._state; - let current = this._head; - const iterator = { - [Symbol.iterator]() { - return iterator; - }, - next() { - if (map._state !== state) { - throw new Error(`LinkedMap got modified during iteration.`); - } - if (current) { - const result = { value: [current.key, current.value], done: false }; - current = current.next; - return result; - } else { - return { value: void 0, done: true }; - } - } - }; - return iterator; - } - [(_b = Symbol.toStringTag, Symbol.iterator)]() { - return this.entries(); - } - trimOld(newSize) { - if (newSize >= this.size) { - return; - } - if (newSize === 0) { - this.clear(); - return; - } - let current = this._head; - let currentSize = this.size; - while (current && currentSize > newSize) { - this._map.delete(current.key); - current = current.next; - currentSize--; - } - this._head = current; - this._size = currentSize; - if (current) { - current.previous = void 0; - } - this._state++; - } - addItemFirst(item) { - if (!this._head && !this._tail) { - this._tail = item; - } else if (!this._head) { - throw new Error("Invalid list"); - } else { - item.next = this._head; - this._head.previous = item; - } - this._head = item; - this._state++; - } - addItemLast(item) { - if (!this._head && !this._tail) { - this._head = item; - } else if (!this._tail) { - throw new Error("Invalid list"); - } else { - item.previous = this._tail; - this._tail.next = item; - } - this._tail = item; - this._state++; - } - removeItem(item) { - if (item === this._head && item === this._tail) { - this._head = void 0; - this._tail = void 0; - } else if (item === this._head) { - if (!item.next) { - throw new Error("Invalid list"); - } - item.next.previous = void 0; - this._head = item.next; - } else if (item === this._tail) { - if (!item.previous) { - throw new Error("Invalid list"); - } - item.previous.next = void 0; - this._tail = item.previous; - } else { - const next = item.next; - const previous = item.previous; - if (!next || !previous) { - throw new Error("Invalid list"); - } - next.previous = previous; - previous.next = next; - } - item.next = void 0; - item.previous = void 0; - this._state++; - } - touch(item, touch) { - if (!this._head || !this._tail) { - throw new Error("Invalid list"); - } - if (touch !== 1 && touch !== 2) { - return; - } - if (touch === 1) { - if (item === this._head) { - return; - } - const next = item.next; - const previous = item.previous; - if (item === this._tail) { - previous.next = void 0; - this._tail = previous; - } else { - next.previous = previous; - previous.next = next; - } - item.previous = void 0; - item.next = this._head; - this._head.previous = item; - this._head = item; - this._state++; - } else if (touch === 2) { - if (item === this._tail) { - return; - } - const next = item.next; - const previous = item.previous; - if (item === this._head) { - next.previous = void 0; - this._head = next; - } else { - next.previous = previous; - previous.next = next; - } - item.next = void 0; - item.previous = this._tail; - this._tail.next = item; - this._tail = item; - this._state++; - } - } - toJSON() { - const data = []; - this.forEach((value, key) => { - data.push([key, value]); - }); - return data; - } - fromJSON(data) { - this.clear(); - for (const [key, value] of data) { - this.set(key, value); - } - } - }; - var SetMap = class { - constructor() { - this.map = /* @__PURE__ */ new Map(); - } - add(key, value) { - let values = this.map.get(key); - if (!values) { - values = /* @__PURE__ */ new Set(); - this.map.set(key, values); - } - values.add(value); - } - delete(key, value) { - const values = this.map.get(key); - if (!values) { - return; - } - values.delete(value); - if (values.size === 0) { - this.map.delete(key); - } - } - forEach(key, fn) { - const values = this.map.get(key); - if (!values) { - return; - } - values.forEach(fn); - } - get(key) { - const values = this.map.get(key); - if (!values) { - return /* @__PURE__ */ new Set(); - } - return values; - } - }; - - // node_modules/monaco-editor/esm/vs/editor/common/diff/defaultLinesDiffComputer/linesSliceCharSequence.js - var LinesSliceCharSequence = class { - constructor(lines, lineRange, considerWhitespaceChanges) { - this.lines = lines; - this.considerWhitespaceChanges = considerWhitespaceChanges; - this.elements = []; - this.firstCharOffsetByLine = []; - this.additionalOffsetByLine = []; - let trimFirstLineFully = false; - if (lineRange.start > 0 && lineRange.endExclusive >= lines.length) { - lineRange = new OffsetRange(lineRange.start - 1, lineRange.endExclusive); - trimFirstLineFully = true; - } - this.lineRange = lineRange; - this.firstCharOffsetByLine[0] = 0; - for (let i = this.lineRange.start; i < this.lineRange.endExclusive; i++) { - let line = lines[i]; - let offset = 0; - if (trimFirstLineFully) { - offset = line.length; - line = ""; - trimFirstLineFully = false; - } else if (!considerWhitespaceChanges) { - const trimmedStartLine = line.trimStart(); - offset = line.length - trimmedStartLine.length; - line = trimmedStartLine.trimEnd(); - } - this.additionalOffsetByLine.push(offset); - for (let i2 = 0; i2 < line.length; i2++) { - this.elements.push(line.charCodeAt(i2)); - } - if (i < lines.length - 1) { - this.elements.push("\n".charCodeAt(0)); - this.firstCharOffsetByLine[i - this.lineRange.start + 1] = this.elements.length; - } - } - this.additionalOffsetByLine.push(0); - } - toString() { - return `Slice: "${this.text}"`; - } - get text() { - return this.getText(new OffsetRange(0, this.length)); - } - getText(range) { - return this.elements.slice(range.start, range.endExclusive).map((e) => String.fromCharCode(e)).join(""); - } - getElement(offset) { - return this.elements[offset]; - } - get length() { - return this.elements.length; - } - getBoundaryScore(length) { - const prevCategory = getCategory(length > 0 ? this.elements[length - 1] : -1); - const nextCategory = getCategory(length < this.elements.length ? this.elements[length] : -1); - if (prevCategory === 7 && nextCategory === 8) { - return 0; - } - if (prevCategory === 8) { - return 150; - } - let score2 = 0; - if (prevCategory !== nextCategory) { - score2 += 10; - if (prevCategory === 0 && nextCategory === 1) { - score2 += 1; - } - } - score2 += getCategoryBoundaryScore(prevCategory); - score2 += getCategoryBoundaryScore(nextCategory); - return score2; - } - translateOffset(offset) { - if (this.lineRange.isEmpty) { - return new Position(this.lineRange.start + 1, 1); - } - const i = findLastIdxMonotonous(this.firstCharOffsetByLine, (value) => value <= offset); - return new Position(this.lineRange.start + i + 1, offset - this.firstCharOffsetByLine[i] + this.additionalOffsetByLine[i] + 1); - } - translateRange(range) { - return Range.fromPositions(this.translateOffset(range.start), this.translateOffset(range.endExclusive)); - } - /** - * Finds the word that contains the character at the given offset - */ - findWordContaining(offset) { - if (offset < 0 || offset >= this.elements.length) { - return void 0; - } - if (!isWordChar(this.elements[offset])) { - return void 0; - } - let start = offset; - while (start > 0 && isWordChar(this.elements[start - 1])) { - start--; - } - let end = offset; - while (end < this.elements.length && isWordChar(this.elements[end])) { - end++; - } - return new OffsetRange(start, end); - } - countLinesIn(range) { - return this.translateOffset(range.endExclusive).lineNumber - this.translateOffset(range.start).lineNumber; - } - isStronglyEqual(offset1, offset2) { - return this.elements[offset1] === this.elements[offset2]; - } - extendToFullLines(range) { - var _a4, _b2; - const start = (_a4 = findLastMonotonous(this.firstCharOffsetByLine, (x) => x <= range.start)) !== null && _a4 !== void 0 ? _a4 : 0; - const end = (_b2 = findFirstMonotonous(this.firstCharOffsetByLine, (x) => range.endExclusive <= x)) !== null && _b2 !== void 0 ? _b2 : this.elements.length; - return new OffsetRange(start, end); - } - }; - function isWordChar(charCode) { - return charCode >= 97 && charCode <= 122 || charCode >= 65 && charCode <= 90 || charCode >= 48 && charCode <= 57; - } - var score = { - [ - 0 - /* CharBoundaryCategory.WordLower */ - ]: 0, - [ - 1 - /* CharBoundaryCategory.WordUpper */ - ]: 0, - [ - 2 - /* CharBoundaryCategory.WordNumber */ - ]: 0, - [ - 3 - /* CharBoundaryCategory.End */ - ]: 10, - [ - 4 - /* CharBoundaryCategory.Other */ - ]: 2, - [ - 5 - /* CharBoundaryCategory.Separator */ - ]: 30, - [ - 6 - /* CharBoundaryCategory.Space */ - ]: 3, - [ - 7 - /* CharBoundaryCategory.LineBreakCR */ - ]: 10, - [ - 8 - /* CharBoundaryCategory.LineBreakLF */ - ]: 10 - }; - function getCategoryBoundaryScore(category) { - return score[category]; - } - function getCategory(charCode) { - if (charCode === 10) { - return 8; - } else if (charCode === 13) { - return 7; - } else if (isSpace(charCode)) { - return 6; - } else if (charCode >= 97 && charCode <= 122) { - return 0; - } else if (charCode >= 65 && charCode <= 90) { - return 1; - } else if (charCode >= 48 && charCode <= 57) { - return 2; - } else if (charCode === -1) { - return 3; - } else if (charCode === 44 || charCode === 59) { - return 5; - } else { - return 4; - } - } - - // node_modules/monaco-editor/esm/vs/editor/common/diff/defaultLinesDiffComputer/computeMovedLines.js - function computeMovedLines(changes, originalLines, modifiedLines, hashedOriginalLines, hashedModifiedLines, timeout) { - let { moves, excludedChanges } = computeMovesFromSimpleDeletionsToSimpleInsertions(changes, originalLines, modifiedLines, timeout); - if (!timeout.isValid()) { - return []; - } - const filteredChanges = changes.filter((c) => !excludedChanges.has(c)); - const unchangedMoves = computeUnchangedMoves(filteredChanges, hashedOriginalLines, hashedModifiedLines, originalLines, modifiedLines, timeout); - pushMany(moves, unchangedMoves); - moves = joinCloseConsecutiveMoves(moves); - moves = moves.filter((current) => { - const lines = current.original.toOffsetRange().slice(originalLines).map((l) => l.trim()); - const originalText = lines.join("\n"); - return originalText.length >= 15 && countWhere(lines, (l) => l.length >= 2) >= 2; - }); - moves = removeMovesInSameDiff(changes, moves); - return moves; - } - function countWhere(arr, predicate) { - let count = 0; - for (const t of arr) { - if (predicate(t)) { - count++; - } - } - return count; - } - function computeMovesFromSimpleDeletionsToSimpleInsertions(changes, originalLines, modifiedLines, timeout) { - const moves = []; - const deletions = changes.filter((c) => c.modified.isEmpty && c.original.length >= 3).map((d) => new LineRangeFragment(d.original, originalLines, d)); - const insertions = new Set(changes.filter((c) => c.original.isEmpty && c.modified.length >= 3).map((d) => new LineRangeFragment(d.modified, modifiedLines, d))); - const excludedChanges = /* @__PURE__ */ new Set(); - for (const deletion of deletions) { - let highestSimilarity = -1; - let best; - for (const insertion of insertions) { - const similarity = deletion.computeSimilarity(insertion); - if (similarity > highestSimilarity) { - highestSimilarity = similarity; - best = insertion; - } - } - if (highestSimilarity > 0.9 && best) { - insertions.delete(best); - moves.push(new LineRangeMapping(deletion.range, best.range)); - excludedChanges.add(deletion.source); - excludedChanges.add(best.source); - } - if (!timeout.isValid()) { - return { moves, excludedChanges }; - } - } - return { moves, excludedChanges }; - } - function computeUnchangedMoves(changes, hashedOriginalLines, hashedModifiedLines, originalLines, modifiedLines, timeout) { - const moves = []; - const original3LineHashes = new SetMap(); - for (const change of changes) { - for (let i = change.original.startLineNumber; i < change.original.endLineNumberExclusive - 2; i++) { - const key = `${hashedOriginalLines[i - 1]}:${hashedOriginalLines[i + 1 - 1]}:${hashedOriginalLines[i + 2 - 1]}`; - original3LineHashes.add(key, { range: new LineRange(i, i + 3) }); - } - } - const possibleMappings = []; - changes.sort(compareBy((c) => c.modified.startLineNumber, numberComparator)); - for (const change of changes) { - let lastMappings = []; - for (let i = change.modified.startLineNumber; i < change.modified.endLineNumberExclusive - 2; i++) { - const key = `${hashedModifiedLines[i - 1]}:${hashedModifiedLines[i + 1 - 1]}:${hashedModifiedLines[i + 2 - 1]}`; - const currentModifiedRange = new LineRange(i, i + 3); - const nextMappings = []; - original3LineHashes.forEach(key, ({ range }) => { - for (const lastMapping of lastMappings) { - if (lastMapping.originalLineRange.endLineNumberExclusive + 1 === range.endLineNumberExclusive && lastMapping.modifiedLineRange.endLineNumberExclusive + 1 === currentModifiedRange.endLineNumberExclusive) { - lastMapping.originalLineRange = new LineRange(lastMapping.originalLineRange.startLineNumber, range.endLineNumberExclusive); - lastMapping.modifiedLineRange = new LineRange(lastMapping.modifiedLineRange.startLineNumber, currentModifiedRange.endLineNumberExclusive); - nextMappings.push(lastMapping); - return; - } - } - const mapping = { - modifiedLineRange: currentModifiedRange, - originalLineRange: range - }; - possibleMappings.push(mapping); - nextMappings.push(mapping); - }); - lastMappings = nextMappings; - } - if (!timeout.isValid()) { - return []; - } - } - possibleMappings.sort(reverseOrder(compareBy((m) => m.modifiedLineRange.length, numberComparator))); - const modifiedSet = new LineRangeSet(); - const originalSet = new LineRangeSet(); - for (const mapping of possibleMappings) { - const diffOrigToMod = mapping.modifiedLineRange.startLineNumber - mapping.originalLineRange.startLineNumber; - const modifiedSections = modifiedSet.subtractFrom(mapping.modifiedLineRange); - const originalTranslatedSections = originalSet.subtractFrom(mapping.originalLineRange).getWithDelta(diffOrigToMod); - const modifiedIntersectedSections = modifiedSections.getIntersection(originalTranslatedSections); - for (const s of modifiedIntersectedSections.ranges) { - if (s.length < 3) { - continue; - } - const modifiedLineRange = s; - const originalLineRange = s.delta(-diffOrigToMod); - moves.push(new LineRangeMapping(originalLineRange, modifiedLineRange)); - modifiedSet.addRange(modifiedLineRange); - originalSet.addRange(originalLineRange); - } - } - moves.sort(compareBy((m) => m.original.startLineNumber, numberComparator)); - const monotonousChanges = new MonotonousArray(changes); - for (let i = 0; i < moves.length; i++) { - const move = moves[i]; - const firstTouchingChangeOrig = monotonousChanges.findLastMonotonous((c) => c.original.startLineNumber <= move.original.startLineNumber); - const firstTouchingChangeMod = findLastMonotonous(changes, (c) => c.modified.startLineNumber <= move.modified.startLineNumber); - const linesAbove = Math.max(move.original.startLineNumber - firstTouchingChangeOrig.original.startLineNumber, move.modified.startLineNumber - firstTouchingChangeMod.modified.startLineNumber); - const lastTouchingChangeOrig = monotonousChanges.findLastMonotonous((c) => c.original.startLineNumber < move.original.endLineNumberExclusive); - const lastTouchingChangeMod = findLastMonotonous(changes, (c) => c.modified.startLineNumber < move.modified.endLineNumberExclusive); - const linesBelow = Math.max(lastTouchingChangeOrig.original.endLineNumberExclusive - move.original.endLineNumberExclusive, lastTouchingChangeMod.modified.endLineNumberExclusive - move.modified.endLineNumberExclusive); - let extendToTop; - for (extendToTop = 0; extendToTop < linesAbove; extendToTop++) { - const origLine = move.original.startLineNumber - extendToTop - 1; - const modLine = move.modified.startLineNumber - extendToTop - 1; - if (origLine > originalLines.length || modLine > modifiedLines.length) { - break; - } - if (modifiedSet.contains(modLine) || originalSet.contains(origLine)) { - break; - } - if (!areLinesSimilar(originalLines[origLine - 1], modifiedLines[modLine - 1], timeout)) { - break; - } - } - if (extendToTop > 0) { - originalSet.addRange(new LineRange(move.original.startLineNumber - extendToTop, move.original.startLineNumber)); - modifiedSet.addRange(new LineRange(move.modified.startLineNumber - extendToTop, move.modified.startLineNumber)); - } - let extendToBottom; - for (extendToBottom = 0; extendToBottom < linesBelow; extendToBottom++) { - const origLine = move.original.endLineNumberExclusive + extendToBottom; - const modLine = move.modified.endLineNumberExclusive + extendToBottom; - if (origLine > originalLines.length || modLine > modifiedLines.length) { - break; - } - if (modifiedSet.contains(modLine) || originalSet.contains(origLine)) { - break; - } - if (!areLinesSimilar(originalLines[origLine - 1], modifiedLines[modLine - 1], timeout)) { - break; - } - } - if (extendToBottom > 0) { - originalSet.addRange(new LineRange(move.original.endLineNumberExclusive, move.original.endLineNumberExclusive + extendToBottom)); - modifiedSet.addRange(new LineRange(move.modified.endLineNumberExclusive, move.modified.endLineNumberExclusive + extendToBottom)); - } - if (extendToTop > 0 || extendToBottom > 0) { - moves[i] = new LineRangeMapping(new LineRange(move.original.startLineNumber - extendToTop, move.original.endLineNumberExclusive + extendToBottom), new LineRange(move.modified.startLineNumber - extendToTop, move.modified.endLineNumberExclusive + extendToBottom)); - } - } - return moves; - } - function areLinesSimilar(line1, line2, timeout) { - if (line1.trim() === line2.trim()) { - return true; - } - if (line1.length > 300 && line2.length > 300) { - return false; - } - const myersDiffingAlgorithm = new MyersDiffAlgorithm(); - const result = myersDiffingAlgorithm.compute(new LinesSliceCharSequence([line1], new OffsetRange(0, 1), false), new LinesSliceCharSequence([line2], new OffsetRange(0, 1), false), timeout); - let commonNonSpaceCharCount = 0; - const inverted = SequenceDiff.invert(result.diffs, line1.length); - for (const seq of inverted) { - seq.seq1Range.forEach((idx) => { - if (!isSpace(line1.charCodeAt(idx))) { - commonNonSpaceCharCount++; - } - }); - } - function countNonWsChars(str) { - let count = 0; - for (let i = 0; i < line1.length; i++) { - if (!isSpace(str.charCodeAt(i))) { - count++; - } - } - return count; - } - const longerLineLength = countNonWsChars(line1.length > line2.length ? line1 : line2); - const r = commonNonSpaceCharCount / longerLineLength > 0.6 && longerLineLength > 10; - return r; - } - function joinCloseConsecutiveMoves(moves) { - if (moves.length === 0) { - return moves; - } - moves.sort(compareBy((m) => m.original.startLineNumber, numberComparator)); - const result = [moves[0]]; - for (let i = 1; i < moves.length; i++) { - const last = result[result.length - 1]; - const current = moves[i]; - const originalDist = current.original.startLineNumber - last.original.endLineNumberExclusive; - const modifiedDist = current.modified.startLineNumber - last.modified.endLineNumberExclusive; - const currentMoveAfterLast = originalDist >= 0 && modifiedDist >= 0; - if (currentMoveAfterLast && originalDist + modifiedDist <= 2) { - result[result.length - 1] = last.join(current); - continue; - } - result.push(current); - } - return result; - } - function removeMovesInSameDiff(changes, moves) { - const changesMonotonous = new MonotonousArray(changes); - moves = moves.filter((m) => { - const diffBeforeEndOfMoveOriginal = changesMonotonous.findLastMonotonous((c) => c.original.startLineNumber < m.original.endLineNumberExclusive) || new LineRangeMapping(new LineRange(1, 1), new LineRange(1, 1)); - const diffBeforeEndOfMoveModified = findLastMonotonous(changes, (c) => c.modified.startLineNumber < m.modified.endLineNumberExclusive); - const differentDiffs = diffBeforeEndOfMoveOriginal !== diffBeforeEndOfMoveModified; - return differentDiffs; - }); - return moves; - } - - // node_modules/monaco-editor/esm/vs/editor/common/diff/defaultLinesDiffComputer/heuristicSequenceOptimizations.js - function optimizeSequenceDiffs(sequence1, sequence2, sequenceDiffs) { - let result = sequenceDiffs; - result = joinSequenceDiffsByShifting(sequence1, sequence2, result); - result = joinSequenceDiffsByShifting(sequence1, sequence2, result); - result = shiftSequenceDiffs(sequence1, sequence2, result); - return result; - } - function joinSequenceDiffsByShifting(sequence1, sequence2, sequenceDiffs) { - if (sequenceDiffs.length === 0) { - return sequenceDiffs; - } - const result = []; - result.push(sequenceDiffs[0]); - for (let i = 1; i < sequenceDiffs.length; i++) { - const prevResult = result[result.length - 1]; - let cur = sequenceDiffs[i]; - if (cur.seq1Range.isEmpty || cur.seq2Range.isEmpty) { - const length = cur.seq1Range.start - prevResult.seq1Range.endExclusive; - let d; - for (d = 1; d <= length; d++) { - if (sequence1.getElement(cur.seq1Range.start - d) !== sequence1.getElement(cur.seq1Range.endExclusive - d) || sequence2.getElement(cur.seq2Range.start - d) !== sequence2.getElement(cur.seq2Range.endExclusive - d)) { - break; - } - } - d--; - if (d === length) { - result[result.length - 1] = new SequenceDiff(new OffsetRange(prevResult.seq1Range.start, cur.seq1Range.endExclusive - length), new OffsetRange(prevResult.seq2Range.start, cur.seq2Range.endExclusive - length)); - continue; - } - cur = cur.delta(-d); - } - result.push(cur); - } - const result2 = []; - for (let i = 0; i < result.length - 1; i++) { - const nextResult = result[i + 1]; - let cur = result[i]; - if (cur.seq1Range.isEmpty || cur.seq2Range.isEmpty) { - const length = nextResult.seq1Range.start - cur.seq1Range.endExclusive; - let d; - for (d = 0; d < length; d++) { - if (!sequence1.isStronglyEqual(cur.seq1Range.start + d, cur.seq1Range.endExclusive + d) || !sequence2.isStronglyEqual(cur.seq2Range.start + d, cur.seq2Range.endExclusive + d)) { - break; - } - } - if (d === length) { - result[i + 1] = new SequenceDiff(new OffsetRange(cur.seq1Range.start + length, nextResult.seq1Range.endExclusive), new OffsetRange(cur.seq2Range.start + length, nextResult.seq2Range.endExclusive)); - continue; - } - if (d > 0) { - cur = cur.delta(d); - } - } - result2.push(cur); - } - if (result.length > 0) { - result2.push(result[result.length - 1]); - } - return result2; - } - function shiftSequenceDiffs(sequence1, sequence2, sequenceDiffs) { - if (!sequence1.getBoundaryScore || !sequence2.getBoundaryScore) { - return sequenceDiffs; - } - for (let i = 0; i < sequenceDiffs.length; i++) { - const prevDiff = i > 0 ? sequenceDiffs[i - 1] : void 0; - const diff = sequenceDiffs[i]; - const nextDiff = i + 1 < sequenceDiffs.length ? sequenceDiffs[i + 1] : void 0; - const seq1ValidRange = new OffsetRange(prevDiff ? prevDiff.seq1Range.endExclusive + 1 : 0, nextDiff ? nextDiff.seq1Range.start - 1 : sequence1.length); - const seq2ValidRange = new OffsetRange(prevDiff ? prevDiff.seq2Range.endExclusive + 1 : 0, nextDiff ? nextDiff.seq2Range.start - 1 : sequence2.length); - if (diff.seq1Range.isEmpty) { - sequenceDiffs[i] = shiftDiffToBetterPosition(diff, sequence1, sequence2, seq1ValidRange, seq2ValidRange); - } else if (diff.seq2Range.isEmpty) { - sequenceDiffs[i] = shiftDiffToBetterPosition(diff.swap(), sequence2, sequence1, seq2ValidRange, seq1ValidRange).swap(); - } - } - return sequenceDiffs; - } - function shiftDiffToBetterPosition(diff, sequence1, sequence2, seq1ValidRange, seq2ValidRange) { - const maxShiftLimit = 100; - let deltaBefore = 1; - while (diff.seq1Range.start - deltaBefore >= seq1ValidRange.start && diff.seq2Range.start - deltaBefore >= seq2ValidRange.start && sequence2.isStronglyEqual(diff.seq2Range.start - deltaBefore, diff.seq2Range.endExclusive - deltaBefore) && deltaBefore < maxShiftLimit) { - deltaBefore++; - } - deltaBefore--; - let deltaAfter = 0; - while (diff.seq1Range.start + deltaAfter < seq1ValidRange.endExclusive && diff.seq2Range.endExclusive + deltaAfter < seq2ValidRange.endExclusive && sequence2.isStronglyEqual(diff.seq2Range.start + deltaAfter, diff.seq2Range.endExclusive + deltaAfter) && deltaAfter < maxShiftLimit) { - deltaAfter++; - } - if (deltaBefore === 0 && deltaAfter === 0) { - return diff; - } - let bestDelta = 0; - let bestScore = -1; - for (let delta = -deltaBefore; delta <= deltaAfter; delta++) { - const seq2OffsetStart = diff.seq2Range.start + delta; - const seq2OffsetEndExclusive = diff.seq2Range.endExclusive + delta; - const seq1Offset = diff.seq1Range.start + delta; - const score2 = sequence1.getBoundaryScore(seq1Offset) + sequence2.getBoundaryScore(seq2OffsetStart) + sequence2.getBoundaryScore(seq2OffsetEndExclusive); - if (score2 > bestScore) { - bestScore = score2; - bestDelta = delta; - } - } - return diff.delta(bestDelta); - } - function removeShortMatches(sequence1, sequence2, sequenceDiffs) { - const result = []; - for (const s of sequenceDiffs) { - const last = result[result.length - 1]; - if (!last) { - result.push(s); - continue; - } - if (s.seq1Range.start - last.seq1Range.endExclusive <= 2 || s.seq2Range.start - last.seq2Range.endExclusive <= 2) { - result[result.length - 1] = new SequenceDiff(last.seq1Range.join(s.seq1Range), last.seq2Range.join(s.seq2Range)); - } else { - result.push(s); - } - } - return result; - } - function extendDiffsToEntireWordIfAppropriate(sequence1, sequence2, sequenceDiffs) { - const equalMappings = SequenceDiff.invert(sequenceDiffs, sequence1.length); - const additional = []; - let lastPoint = new OffsetPair(0, 0); - function scanWord(pair, equalMapping) { - if (pair.offset1 < lastPoint.offset1 || pair.offset2 < lastPoint.offset2) { - return; - } - const w1 = sequence1.findWordContaining(pair.offset1); - const w2 = sequence2.findWordContaining(pair.offset2); - if (!w1 || !w2) { - return; - } - let w = new SequenceDiff(w1, w2); - const equalPart = w.intersect(equalMapping); - let equalChars1 = equalPart.seq1Range.length; - let equalChars2 = equalPart.seq2Range.length; - while (equalMappings.length > 0) { - const next = equalMappings[0]; - const intersects = next.seq1Range.intersects(w1) || next.seq2Range.intersects(w2); - if (!intersects) { - break; - } - const v1 = sequence1.findWordContaining(next.seq1Range.start); - const v2 = sequence2.findWordContaining(next.seq2Range.start); - const v = new SequenceDiff(v1, v2); - const equalPart2 = v.intersect(next); - equalChars1 += equalPart2.seq1Range.length; - equalChars2 += equalPart2.seq2Range.length; - w = w.join(v); - if (w.seq1Range.endExclusive >= next.seq1Range.endExclusive) { - equalMappings.shift(); - } else { - break; - } - } - if (equalChars1 + equalChars2 < (w.seq1Range.length + w.seq2Range.length) * 2 / 3) { - additional.push(w); - } - lastPoint = w.getEndExclusives(); - } - while (equalMappings.length > 0) { - const next = equalMappings.shift(); - if (next.seq1Range.isEmpty) { - continue; - } - scanWord(next.getStarts(), next); - scanWord(next.getEndExclusives().delta(-1), next); - } - const merged = mergeSequenceDiffs(sequenceDiffs, additional); - return merged; - } - function mergeSequenceDiffs(sequenceDiffs1, sequenceDiffs2) { - const result = []; - while (sequenceDiffs1.length > 0 || sequenceDiffs2.length > 0) { - const sd1 = sequenceDiffs1[0]; - const sd2 = sequenceDiffs2[0]; - let next; - if (sd1 && (!sd2 || sd1.seq1Range.start < sd2.seq1Range.start)) { - next = sequenceDiffs1.shift(); - } else { - next = sequenceDiffs2.shift(); - } - if (result.length > 0 && result[result.length - 1].seq1Range.endExclusive >= next.seq1Range.start) { - result[result.length - 1] = result[result.length - 1].join(next); - } else { - result.push(next); - } - } - return result; - } - function removeVeryShortMatchingLinesBetweenDiffs(sequence1, _sequence2, sequenceDiffs) { - let diffs = sequenceDiffs; - if (diffs.length === 0) { - return diffs; - } - let counter = 0; - let shouldRepeat; - do { - shouldRepeat = false; - const result = [ - diffs[0] - ]; - for (let i = 1; i < diffs.length; i++) { - let shouldJoinDiffs = function(before, after) { - const unchangedRange = new OffsetRange(lastResult.seq1Range.endExclusive, cur.seq1Range.start); - const unchangedText = sequence1.getText(unchangedRange); - const unchangedTextWithoutWs = unchangedText.replace(/\s/g, ""); - if (unchangedTextWithoutWs.length <= 4 && (before.seq1Range.length + before.seq2Range.length > 5 || after.seq1Range.length + after.seq2Range.length > 5)) { - return true; - } - return false; - }; - const cur = diffs[i]; - const lastResult = result[result.length - 1]; - const shouldJoin = shouldJoinDiffs(lastResult, cur); - if (shouldJoin) { - shouldRepeat = true; - result[result.length - 1] = result[result.length - 1].join(cur); - } else { - result.push(cur); - } - } - diffs = result; - } while (counter++ < 10 && shouldRepeat); - return diffs; - } - function removeVeryShortMatchingTextBetweenLongDiffs(sequence1, sequence2, sequenceDiffs) { - let diffs = sequenceDiffs; - if (diffs.length === 0) { - return diffs; - } - let counter = 0; - let shouldRepeat; - do { - shouldRepeat = false; - const result = [ - diffs[0] - ]; - for (let i = 1; i < diffs.length; i++) { - let shouldJoinDiffs = function(before, after) { - const unchangedRange = new OffsetRange(lastResult.seq1Range.endExclusive, cur.seq1Range.start); - const unchangedLineCount = sequence1.countLinesIn(unchangedRange); - if (unchangedLineCount > 5 || unchangedRange.length > 500) { - return false; - } - const unchangedText = sequence1.getText(unchangedRange).trim(); - if (unchangedText.length > 20 || unchangedText.split(/\r\n|\r|\n/).length > 1) { - return false; - } - const beforeLineCount1 = sequence1.countLinesIn(before.seq1Range); - const beforeSeq1Length = before.seq1Range.length; - const beforeLineCount2 = sequence2.countLinesIn(before.seq2Range); - const beforeSeq2Length = before.seq2Range.length; - const afterLineCount1 = sequence1.countLinesIn(after.seq1Range); - const afterSeq1Length = after.seq1Range.length; - const afterLineCount2 = sequence2.countLinesIn(after.seq2Range); - const afterSeq2Length = after.seq2Range.length; - const max = 2 * 40 + 50; - function cap(v) { - return Math.min(v, max); - } - if (Math.pow(Math.pow(cap(beforeLineCount1 * 40 + beforeSeq1Length), 1.5) + Math.pow(cap(beforeLineCount2 * 40 + beforeSeq2Length), 1.5), 1.5) + Math.pow(Math.pow(cap(afterLineCount1 * 40 + afterSeq1Length), 1.5) + Math.pow(cap(afterLineCount2 * 40 + afterSeq2Length), 1.5), 1.5) > (max ** 1.5) ** 1.5 * 1.3) { - return true; - } - return false; - }; - const cur = diffs[i]; - const lastResult = result[result.length - 1]; - const shouldJoin = shouldJoinDiffs(lastResult, cur); - if (shouldJoin) { - shouldRepeat = true; - result[result.length - 1] = result[result.length - 1].join(cur); - } else { - result.push(cur); - } - } - diffs = result; - } while (counter++ < 10 && shouldRepeat); - const newDiffs = []; - forEachWithNeighbors(diffs, (prev, cur, next) => { - let newDiff = cur; - function shouldMarkAsChanged(text) { - return text.length > 0 && text.trim().length <= 3 && cur.seq1Range.length + cur.seq2Range.length > 100; - } - const fullRange1 = sequence1.extendToFullLines(cur.seq1Range); - const prefix = sequence1.getText(new OffsetRange(fullRange1.start, cur.seq1Range.start)); - if (shouldMarkAsChanged(prefix)) { - newDiff = newDiff.deltaStart(-prefix.length); - } - const suffix = sequence1.getText(new OffsetRange(cur.seq1Range.endExclusive, fullRange1.endExclusive)); - if (shouldMarkAsChanged(suffix)) { - newDiff = newDiff.deltaEnd(suffix.length); - } - const availableSpace = SequenceDiff.fromOffsetPairs(prev ? prev.getEndExclusives() : OffsetPair.zero, next ? next.getStarts() : OffsetPair.max); - const result = newDiff.intersect(availableSpace); - if (newDiffs.length > 0 && result.getStarts().equals(newDiffs[newDiffs.length - 1].getEndExclusives())) { - newDiffs[newDiffs.length - 1] = newDiffs[newDiffs.length - 1].join(result); - } else { - newDiffs.push(result); - } - }); - return newDiffs; - } - - // node_modules/monaco-editor/esm/vs/editor/common/diff/defaultLinesDiffComputer/lineSequence.js - var LineSequence2 = class { - constructor(trimmedHash, lines) { - this.trimmedHash = trimmedHash; - this.lines = lines; - } - getElement(offset) { - return this.trimmedHash[offset]; - } - get length() { - return this.trimmedHash.length; - } - getBoundaryScore(length) { - const indentationBefore = length === 0 ? 0 : getIndentation(this.lines[length - 1]); - const indentationAfter = length === this.lines.length ? 0 : getIndentation(this.lines[length]); - return 1e3 - (indentationBefore + indentationAfter); - } - getText(range) { - return this.lines.slice(range.start, range.endExclusive).join("\n"); - } - isStronglyEqual(offset1, offset2) { - return this.lines[offset1] === this.lines[offset2]; - } - }; - function getIndentation(str) { - let i = 0; - while (i < str.length && (str.charCodeAt(i) === 32 || str.charCodeAt(i) === 9)) { - i++; - } - return i; - } - - // node_modules/monaco-editor/esm/vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer.js - var DefaultLinesDiffComputer = class { - constructor() { - this.dynamicProgrammingDiffing = new DynamicProgrammingDiffing(); - this.myersDiffingAlgorithm = new MyersDiffAlgorithm(); - } - computeDiff(originalLines, modifiedLines, options) { - if (originalLines.length <= 1 && equals(originalLines, modifiedLines, (a, b) => a === b)) { - return new LinesDiff([], [], false); - } - if (originalLines.length === 1 && originalLines[0].length === 0 || modifiedLines.length === 1 && modifiedLines[0].length === 0) { - return new LinesDiff([ - new DetailedLineRangeMapping(new LineRange(1, originalLines.length + 1), new LineRange(1, modifiedLines.length + 1), [ - new RangeMapping(new Range(1, 1, originalLines.length, originalLines[0].length + 1), new Range(1, 1, modifiedLines.length, modifiedLines[0].length + 1)) - ]) - ], [], false); - } - const timeout = options.maxComputationTimeMs === 0 ? InfiniteTimeout.instance : new DateTimeout(options.maxComputationTimeMs); - const considerWhitespaceChanges = !options.ignoreTrimWhitespace; - const perfectHashes = /* @__PURE__ */ new Map(); - function getOrCreateHash(text) { - let hash = perfectHashes.get(text); - if (hash === void 0) { - hash = perfectHashes.size; - perfectHashes.set(text, hash); - } - return hash; - } - const originalLinesHashes = originalLines.map((l) => getOrCreateHash(l.trim())); - const modifiedLinesHashes = modifiedLines.map((l) => getOrCreateHash(l.trim())); - const sequence1 = new LineSequence2(originalLinesHashes, originalLines); - const sequence2 = new LineSequence2(modifiedLinesHashes, modifiedLines); - const lineAlignmentResult = (() => { - if (sequence1.length + sequence2.length < 1700) { - return this.dynamicProgrammingDiffing.compute(sequence1, sequence2, timeout, (offset1, offset2) => originalLines[offset1] === modifiedLines[offset2] ? modifiedLines[offset2].length === 0 ? 0.1 : 1 + Math.log(1 + modifiedLines[offset2].length) : 0.99); - } - return this.myersDiffingAlgorithm.compute(sequence1, sequence2); - })(); - let lineAlignments = lineAlignmentResult.diffs; - let hitTimeout = lineAlignmentResult.hitTimeout; - lineAlignments = optimizeSequenceDiffs(sequence1, sequence2, lineAlignments); - lineAlignments = removeVeryShortMatchingLinesBetweenDiffs(sequence1, sequence2, lineAlignments); - const alignments = []; - const scanForWhitespaceChanges = (equalLinesCount) => { - if (!considerWhitespaceChanges) { - return; - } - for (let i = 0; i < equalLinesCount; i++) { - const seq1Offset = seq1LastStart + i; - const seq2Offset = seq2LastStart + i; - if (originalLines[seq1Offset] !== modifiedLines[seq2Offset]) { - const characterDiffs = this.refineDiff(originalLines, modifiedLines, new SequenceDiff(new OffsetRange(seq1Offset, seq1Offset + 1), new OffsetRange(seq2Offset, seq2Offset + 1)), timeout, considerWhitespaceChanges); - for (const a of characterDiffs.mappings) { - alignments.push(a); - } - if (characterDiffs.hitTimeout) { - hitTimeout = true; - } - } - } - }; - let seq1LastStart = 0; - let seq2LastStart = 0; - for (const diff of lineAlignments) { - assertFn(() => diff.seq1Range.start - seq1LastStart === diff.seq2Range.start - seq2LastStart); - const equalLinesCount = diff.seq1Range.start - seq1LastStart; - scanForWhitespaceChanges(equalLinesCount); - seq1LastStart = diff.seq1Range.endExclusive; - seq2LastStart = diff.seq2Range.endExclusive; - const characterDiffs = this.refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges); - if (characterDiffs.hitTimeout) { - hitTimeout = true; - } - for (const a of characterDiffs.mappings) { - alignments.push(a); - } - } - scanForWhitespaceChanges(originalLines.length - seq1LastStart); - const changes = lineRangeMappingFromRangeMappings(alignments, originalLines, modifiedLines); - let moves = []; - if (options.computeMoves) { - moves = this.computeMoves(changes, originalLines, modifiedLines, originalLinesHashes, modifiedLinesHashes, timeout, considerWhitespaceChanges); - } - assertFn(() => { - function validatePosition(pos, lines) { - if (pos.lineNumber < 1 || pos.lineNumber > lines.length) { - return false; - } - const line = lines[pos.lineNumber - 1]; - if (pos.column < 1 || pos.column > line.length + 1) { - return false; - } - return true; - } - function validateRange(range, lines) { - if (range.startLineNumber < 1 || range.startLineNumber > lines.length + 1) { - return false; - } - if (range.endLineNumberExclusive < 1 || range.endLineNumberExclusive > lines.length + 1) { - return false; - } - return true; - } - for (const c of changes) { - if (!c.innerChanges) { - return false; - } - for (const ic of c.innerChanges) { - const valid = validatePosition(ic.modifiedRange.getStartPosition(), modifiedLines) && validatePosition(ic.modifiedRange.getEndPosition(), modifiedLines) && validatePosition(ic.originalRange.getStartPosition(), originalLines) && validatePosition(ic.originalRange.getEndPosition(), originalLines); - if (!valid) { - return false; - } - } - if (!validateRange(c.modified, modifiedLines) || !validateRange(c.original, originalLines)) { - return false; - } - } - return true; - }); - return new LinesDiff(changes, moves, hitTimeout); - } - computeMoves(changes, originalLines, modifiedLines, hashedOriginalLines, hashedModifiedLines, timeout, considerWhitespaceChanges) { - const moves = computeMovedLines(changes, originalLines, modifiedLines, hashedOriginalLines, hashedModifiedLines, timeout); - const movesWithDiffs = moves.map((m) => { - const moveChanges = this.refineDiff(originalLines, modifiedLines, new SequenceDiff(m.original.toOffsetRange(), m.modified.toOffsetRange()), timeout, considerWhitespaceChanges); - const mappings = lineRangeMappingFromRangeMappings(moveChanges.mappings, originalLines, modifiedLines, true); - return new MovedText(m, mappings); - }); - return movesWithDiffs; - } - refineDiff(originalLines, modifiedLines, diff, timeout, considerWhitespaceChanges) { - const slice1 = new LinesSliceCharSequence(originalLines, diff.seq1Range, considerWhitespaceChanges); - const slice2 = new LinesSliceCharSequence(modifiedLines, diff.seq2Range, considerWhitespaceChanges); - const diffResult = slice1.length + slice2.length < 500 ? this.dynamicProgrammingDiffing.compute(slice1, slice2, timeout) : this.myersDiffingAlgorithm.compute(slice1, slice2, timeout); - let diffs = diffResult.diffs; - diffs = optimizeSequenceDiffs(slice1, slice2, diffs); - diffs = extendDiffsToEntireWordIfAppropriate(slice1, slice2, diffs); - diffs = removeShortMatches(slice1, slice2, diffs); - diffs = removeVeryShortMatchingTextBetweenLongDiffs(slice1, slice2, diffs); - const result = diffs.map((d) => new RangeMapping(slice1.translateRange(d.seq1Range), slice2.translateRange(d.seq2Range))); - return { - mappings: result, - hitTimeout: diffResult.hitTimeout - }; - } - }; - function lineRangeMappingFromRangeMappings(alignments, originalLines, modifiedLines, dontAssertStartLine = false) { - const changes = []; - for (const g of groupAdjacentBy(alignments.map((a) => getLineRangeMapping(a, originalLines, modifiedLines)), (a1, a2) => a1.original.overlapOrTouch(a2.original) || a1.modified.overlapOrTouch(a2.modified))) { - const first = g[0]; - const last = g[g.length - 1]; - changes.push(new DetailedLineRangeMapping(first.original.join(last.original), first.modified.join(last.modified), g.map((a) => a.innerChanges[0]))); - } - assertFn(() => { - if (!dontAssertStartLine) { - if (changes.length > 0 && changes[0].original.startLineNumber !== changes[0].modified.startLineNumber) { - return false; - } - } - return checkAdjacentItems(changes, (m1, m2) => m2.original.startLineNumber - m1.original.endLineNumberExclusive === m2.modified.startLineNumber - m1.modified.endLineNumberExclusive && // There has to be an unchanged line in between (otherwise both diffs should have been joined) - m1.original.endLineNumberExclusive < m2.original.startLineNumber && m1.modified.endLineNumberExclusive < m2.modified.startLineNumber); - }); - return changes; - } - function getLineRangeMapping(rangeMapping, originalLines, modifiedLines) { - let lineStartDelta = 0; - let lineEndDelta = 0; - if (rangeMapping.modifiedRange.endColumn === 1 && rangeMapping.originalRange.endColumn === 1 && rangeMapping.originalRange.startLineNumber + lineStartDelta <= rangeMapping.originalRange.endLineNumber && rangeMapping.modifiedRange.startLineNumber + lineStartDelta <= rangeMapping.modifiedRange.endLineNumber) { - lineEndDelta = -1; - } - if (rangeMapping.modifiedRange.startColumn - 1 >= modifiedLines[rangeMapping.modifiedRange.startLineNumber - 1].length && rangeMapping.originalRange.startColumn - 1 >= originalLines[rangeMapping.originalRange.startLineNumber - 1].length && rangeMapping.originalRange.startLineNumber <= rangeMapping.originalRange.endLineNumber + lineEndDelta && rangeMapping.modifiedRange.startLineNumber <= rangeMapping.modifiedRange.endLineNumber + lineEndDelta) { - lineStartDelta = 1; - } - const originalLineRange = new LineRange(rangeMapping.originalRange.startLineNumber + lineStartDelta, rangeMapping.originalRange.endLineNumber + 1 + lineEndDelta); - const modifiedLineRange = new LineRange(rangeMapping.modifiedRange.startLineNumber + lineStartDelta, rangeMapping.modifiedRange.endLineNumber + 1 + lineEndDelta); - return new DetailedLineRangeMapping(originalLineRange, modifiedLineRange, [rangeMapping]); - } - - // node_modules/monaco-editor/esm/vs/editor/common/diff/linesDiffComputers.js - var linesDiffComputers = { - getLegacy: () => new LegacyLinesDiffComputer(), - getDefault: () => new DefaultLinesDiffComputer() - }; - - // node_modules/monaco-editor/esm/vs/base/common/color.js - function roundFloat(number, decimalPoints) { - const decimal = Math.pow(10, decimalPoints); - return Math.round(number * decimal) / decimal; - } - var RGBA = class { - constructor(r, g, b, a = 1) { - this._rgbaBrand = void 0; - this.r = Math.min(255, Math.max(0, r)) | 0; - this.g = Math.min(255, Math.max(0, g)) | 0; - this.b = Math.min(255, Math.max(0, b)) | 0; - this.a = roundFloat(Math.max(Math.min(1, a), 0), 3); - } - static equals(a, b) { - return a.r === b.r && a.g === b.g && a.b === b.b && a.a === b.a; - } - }; - var HSLA = class _HSLA { - constructor(h, s, l, a) { - this._hslaBrand = void 0; - this.h = Math.max(Math.min(360, h), 0) | 0; - this.s = roundFloat(Math.max(Math.min(1, s), 0), 3); - this.l = roundFloat(Math.max(Math.min(1, l), 0), 3); - this.a = roundFloat(Math.max(Math.min(1, a), 0), 3); - } - static equals(a, b) { - return a.h === b.h && a.s === b.s && a.l === b.l && a.a === b.a; - } - /** - * Converts an RGB color value to HSL. Conversion formula - * adapted from http://en.wikipedia.org/wiki/HSL_color_space. - * Assumes r, g, and b are contained in the set [0, 255] and - * returns h in the set [0, 360], s, and l in the set [0, 1]. - */ - static fromRGBA(rgba) { - const r = rgba.r / 255; - const g = rgba.g / 255; - const b = rgba.b / 255; - const a = rgba.a; - const max = Math.max(r, g, b); - const min = Math.min(r, g, b); - let h = 0; - let s = 0; - const l = (min + max) / 2; - const chroma = max - min; - if (chroma > 0) { - s = Math.min(l <= 0.5 ? chroma / (2 * l) : chroma / (2 - 2 * l), 1); - switch (max) { - case r: - h = (g - b) / chroma + (g < b ? 6 : 0); - break; - case g: - h = (b - r) / chroma + 2; - break; - case b: - h = (r - g) / chroma + 4; - break; - } - h *= 60; - h = Math.round(h); - } - return new _HSLA(h, s, l, a); - } - static _hue2rgb(p, q, t) { - if (t < 0) { - t += 1; - } - if (t > 1) { - t -= 1; - } - if (t < 1 / 6) { - return p + (q - p) * 6 * t; - } - if (t < 1 / 2) { - return q; - } - if (t < 2 / 3) { - return p + (q - p) * (2 / 3 - t) * 6; - } - return p; - } - /** - * Converts an HSL color value to RGB. Conversion formula - * adapted from http://en.wikipedia.org/wiki/HSL_color_space. - * Assumes h in the set [0, 360] s, and l are contained in the set [0, 1] and - * returns r, g, and b in the set [0, 255]. - */ - static toRGBA(hsla) { - const h = hsla.h / 360; - const { s, l, a } = hsla; - let r, g, b; - if (s === 0) { - r = g = b = l; - } else { - const q = l < 0.5 ? l * (1 + s) : l + s - l * s; - const p = 2 * l - q; - r = _HSLA._hue2rgb(p, q, h + 1 / 3); - g = _HSLA._hue2rgb(p, q, h); - b = _HSLA._hue2rgb(p, q, h - 1 / 3); - } - return new RGBA(Math.round(r * 255), Math.round(g * 255), Math.round(b * 255), a); - } - }; - var HSVA = class _HSVA { - constructor(h, s, v, a) { - this._hsvaBrand = void 0; - this.h = Math.max(Math.min(360, h), 0) | 0; - this.s = roundFloat(Math.max(Math.min(1, s), 0), 3); - this.v = roundFloat(Math.max(Math.min(1, v), 0), 3); - this.a = roundFloat(Math.max(Math.min(1, a), 0), 3); - } - static equals(a, b) { - return a.h === b.h && a.s === b.s && a.v === b.v && a.a === b.a; - } - // from http://www.rapidtables.com/convert/color/rgb-to-hsv.htm - static fromRGBA(rgba) { - const r = rgba.r / 255; - const g = rgba.g / 255; - const b = rgba.b / 255; - const cmax = Math.max(r, g, b); - const cmin = Math.min(r, g, b); - const delta = cmax - cmin; - const s = cmax === 0 ? 0 : delta / cmax; - let m; - if (delta === 0) { - m = 0; - } else if (cmax === r) { - m = ((g - b) / delta % 6 + 6) % 6; - } else if (cmax === g) { - m = (b - r) / delta + 2; - } else { - m = (r - g) / delta + 4; - } - return new _HSVA(Math.round(m * 60), s, cmax, rgba.a); - } - // from http://www.rapidtables.com/convert/color/hsv-to-rgb.htm - static toRGBA(hsva) { - const { h, s, v, a } = hsva; - const c = v * s; - const x = c * (1 - Math.abs(h / 60 % 2 - 1)); - const m = v - c; - let [r, g, b] = [0, 0, 0]; - if (h < 60) { - r = c; - g = x; - } else if (h < 120) { - r = x; - g = c; - } else if (h < 180) { - g = c; - b = x; - } else if (h < 240) { - g = x; - b = c; - } else if (h < 300) { - r = x; - b = c; - } else if (h <= 360) { - r = c; - b = x; - } - r = Math.round((r + m) * 255); - g = Math.round((g + m) * 255); - b = Math.round((b + m) * 255); - return new RGBA(r, g, b, a); - } - }; - var Color = class _Color { - static fromHex(hex) { - return _Color.Format.CSS.parseHex(hex) || _Color.red; - } - static equals(a, b) { - if (!a && !b) { - return true; - } - if (!a || !b) { - return false; - } - return a.equals(b); - } - get hsla() { - if (this._hsla) { - return this._hsla; - } else { - return HSLA.fromRGBA(this.rgba); - } - } - get hsva() { - if (this._hsva) { - return this._hsva; - } - return HSVA.fromRGBA(this.rgba); - } - constructor(arg) { - if (!arg) { - throw new Error("Color needs a value"); - } else if (arg instanceof RGBA) { - this.rgba = arg; - } else if (arg instanceof HSLA) { - this._hsla = arg; - this.rgba = HSLA.toRGBA(arg); - } else if (arg instanceof HSVA) { - this._hsva = arg; - this.rgba = HSVA.toRGBA(arg); - } else { - throw new Error("Invalid color ctor argument"); - } - } - equals(other) { - return !!other && RGBA.equals(this.rgba, other.rgba) && HSLA.equals(this.hsla, other.hsla) && HSVA.equals(this.hsva, other.hsva); - } - /** - * http://www.w3.org/TR/WCAG20/#relativeluminancedef - * Returns the number in the set [0, 1]. O => Darkest Black. 1 => Lightest white. - */ - getRelativeLuminance() { - const R = _Color._relativeLuminanceForComponent(this.rgba.r); - const G = _Color._relativeLuminanceForComponent(this.rgba.g); - const B = _Color._relativeLuminanceForComponent(this.rgba.b); - const luminance = 0.2126 * R + 0.7152 * G + 0.0722 * B; - return roundFloat(luminance, 4); - } - static _relativeLuminanceForComponent(color) { - const c = color / 255; - return c <= 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4); - } - /** - * http://24ways.org/2010/calculating-color-contrast - * Return 'true' if lighter color otherwise 'false' - */ - isLighter() { - const yiq = (this.rgba.r * 299 + this.rgba.g * 587 + this.rgba.b * 114) / 1e3; - return yiq >= 128; - } - isLighterThan(another) { - const lum1 = this.getRelativeLuminance(); - const lum2 = another.getRelativeLuminance(); - return lum1 > lum2; - } - isDarkerThan(another) { - const lum1 = this.getRelativeLuminance(); - const lum2 = another.getRelativeLuminance(); - return lum1 < lum2; - } - lighten(factor) { - return new _Color(new HSLA(this.hsla.h, this.hsla.s, this.hsla.l + this.hsla.l * factor, this.hsla.a)); - } - darken(factor) { - return new _Color(new HSLA(this.hsla.h, this.hsla.s, this.hsla.l - this.hsla.l * factor, this.hsla.a)); - } - transparent(factor) { - const { r, g, b, a } = this.rgba; - return new _Color(new RGBA(r, g, b, a * factor)); - } - isTransparent() { - return this.rgba.a === 0; - } - isOpaque() { - return this.rgba.a === 1; - } - opposite() { - return new _Color(new RGBA(255 - this.rgba.r, 255 - this.rgba.g, 255 - this.rgba.b, this.rgba.a)); - } - makeOpaque(opaqueBackground) { - if (this.isOpaque() || opaqueBackground.rgba.a !== 1) { - return this; - } - const { r, g, b, a } = this.rgba; - return new _Color(new RGBA(opaqueBackground.rgba.r - a * (opaqueBackground.rgba.r - r), opaqueBackground.rgba.g - a * (opaqueBackground.rgba.g - g), opaqueBackground.rgba.b - a * (opaqueBackground.rgba.b - b), 1)); - } - toString() { - if (!this._toString) { - this._toString = _Color.Format.CSS.format(this); - } - return this._toString; - } - static getLighterColor(of, relative2, factor) { - if (of.isLighterThan(relative2)) { - return of; - } - factor = factor ? factor : 0.5; - const lum1 = of.getRelativeLuminance(); - const lum2 = relative2.getRelativeLuminance(); - factor = factor * (lum2 - lum1) / lum2; - return of.lighten(factor); - } - static getDarkerColor(of, relative2, factor) { - if (of.isDarkerThan(relative2)) { - return of; - } - factor = factor ? factor : 0.5; - const lum1 = of.getRelativeLuminance(); - const lum2 = relative2.getRelativeLuminance(); - factor = factor * (lum1 - lum2) / lum1; - return of.darken(factor); - } - }; - Color.white = new Color(new RGBA(255, 255, 255, 1)); - Color.black = new Color(new RGBA(0, 0, 0, 1)); - Color.red = new Color(new RGBA(255, 0, 0, 1)); - Color.blue = new Color(new RGBA(0, 0, 255, 1)); - Color.green = new Color(new RGBA(0, 255, 0, 1)); - Color.cyan = new Color(new RGBA(0, 255, 255, 1)); - Color.lightgrey = new Color(new RGBA(211, 211, 211, 1)); - Color.transparent = new Color(new RGBA(0, 0, 0, 0)); - (function(Color2) { - let Format; - (function(Format2) { - let CSS; - (function(CSS2) { - function formatRGB(color) { - if (color.rgba.a === 1) { - return `rgb(${color.rgba.r}, ${color.rgba.g}, ${color.rgba.b})`; - } - return Color2.Format.CSS.formatRGBA(color); - } - CSS2.formatRGB = formatRGB; - function formatRGBA(color) { - return `rgba(${color.rgba.r}, ${color.rgba.g}, ${color.rgba.b}, ${+color.rgba.a.toFixed(2)})`; - } - CSS2.formatRGBA = formatRGBA; - function formatHSL(color) { - if (color.hsla.a === 1) { - return `hsl(${color.hsla.h}, ${(color.hsla.s * 100).toFixed(2)}%, ${(color.hsla.l * 100).toFixed(2)}%)`; - } - return Color2.Format.CSS.formatHSLA(color); - } - CSS2.formatHSL = formatHSL; - function formatHSLA(color) { - return `hsla(${color.hsla.h}, ${(color.hsla.s * 100).toFixed(2)}%, ${(color.hsla.l * 100).toFixed(2)}%, ${color.hsla.a.toFixed(2)})`; - } - CSS2.formatHSLA = formatHSLA; - function _toTwoDigitHex(n) { - const r = n.toString(16); - return r.length !== 2 ? "0" + r : r; - } - function formatHex(color) { - return `#${_toTwoDigitHex(color.rgba.r)}${_toTwoDigitHex(color.rgba.g)}${_toTwoDigitHex(color.rgba.b)}`; - } - CSS2.formatHex = formatHex; - function formatHexA(color, compact = false) { - if (compact && color.rgba.a === 1) { - return Color2.Format.CSS.formatHex(color); - } - return `#${_toTwoDigitHex(color.rgba.r)}${_toTwoDigitHex(color.rgba.g)}${_toTwoDigitHex(color.rgba.b)}${_toTwoDigitHex(Math.round(color.rgba.a * 255))}`; - } - CSS2.formatHexA = formatHexA; - function format(color) { - if (color.isOpaque()) { - return Color2.Format.CSS.formatHex(color); - } - return Color2.Format.CSS.formatRGBA(color); - } - CSS2.format = format; - function parseHex(hex) { - const length = hex.length; - if (length === 0) { - return null; - } - if (hex.charCodeAt(0) !== 35) { - return null; - } - if (length === 7) { - const r = 16 * _parseHexDigit(hex.charCodeAt(1)) + _parseHexDigit(hex.charCodeAt(2)); - const g = 16 * _parseHexDigit(hex.charCodeAt(3)) + _parseHexDigit(hex.charCodeAt(4)); - const b = 16 * _parseHexDigit(hex.charCodeAt(5)) + _parseHexDigit(hex.charCodeAt(6)); - return new Color2(new RGBA(r, g, b, 1)); - } - if (length === 9) { - const r = 16 * _parseHexDigit(hex.charCodeAt(1)) + _parseHexDigit(hex.charCodeAt(2)); - const g = 16 * _parseHexDigit(hex.charCodeAt(3)) + _parseHexDigit(hex.charCodeAt(4)); - const b = 16 * _parseHexDigit(hex.charCodeAt(5)) + _parseHexDigit(hex.charCodeAt(6)); - const a = 16 * _parseHexDigit(hex.charCodeAt(7)) + _parseHexDigit(hex.charCodeAt(8)); - return new Color2(new RGBA(r, g, b, a / 255)); - } - if (length === 4) { - const r = _parseHexDigit(hex.charCodeAt(1)); - const g = _parseHexDigit(hex.charCodeAt(2)); - const b = _parseHexDigit(hex.charCodeAt(3)); - return new Color2(new RGBA(16 * r + r, 16 * g + g, 16 * b + b)); - } - if (length === 5) { - const r = _parseHexDigit(hex.charCodeAt(1)); - const g = _parseHexDigit(hex.charCodeAt(2)); - const b = _parseHexDigit(hex.charCodeAt(3)); - const a = _parseHexDigit(hex.charCodeAt(4)); - return new Color2(new RGBA(16 * r + r, 16 * g + g, 16 * b + b, (16 * a + a) / 255)); - } - return null; - } - CSS2.parseHex = parseHex; - function _parseHexDigit(charCode) { - switch (charCode) { - case 48: - return 0; - case 49: - return 1; - case 50: - return 2; - case 51: - return 3; - case 52: - return 4; - case 53: - return 5; - case 54: - return 6; - case 55: - return 7; - case 56: - return 8; - case 57: - return 9; - case 97: - return 10; - case 65: - return 10; - case 98: - return 11; - case 66: - return 11; - case 99: - return 12; - case 67: - return 12; - case 100: - return 13; - case 68: - return 13; - case 101: - return 14; - case 69: - return 14; - case 102: - return 15; - case 70: - return 15; - } - return 0; - } - })(CSS = Format2.CSS || (Format2.CSS = {})); - })(Format = Color2.Format || (Color2.Format = {})); - })(Color || (Color = {})); - - // node_modules/monaco-editor/esm/vs/editor/common/languages/defaultDocumentColorsComputer.js - function _parseCaptureGroups(captureGroups) { - const values = []; - for (const captureGroup of captureGroups) { - const parsedNumber = Number(captureGroup); - if (parsedNumber || parsedNumber === 0 && captureGroup.replace(/\s/g, "") !== "") { - values.push(parsedNumber); - } - } - return values; - } - function _toIColor(r, g, b, a) { - return { - red: r / 255, - blue: b / 255, - green: g / 255, - alpha: a - }; - } - function _findRange(model, match) { - const index = match.index; - const length = match[0].length; - if (!index) { - return; - } - const startPosition = model.positionAt(index); - const range = { - startLineNumber: startPosition.lineNumber, - startColumn: startPosition.column, - endLineNumber: startPosition.lineNumber, - endColumn: startPosition.column + length - }; - return range; - } - function _findHexColorInformation(range, hexValue) { - if (!range) { - return; - } - const parsedHexColor = Color.Format.CSS.parseHex(hexValue); - if (!parsedHexColor) { - return; - } - return { - range, - color: _toIColor(parsedHexColor.rgba.r, parsedHexColor.rgba.g, parsedHexColor.rgba.b, parsedHexColor.rgba.a) - }; - } - function _findRGBColorInformation(range, matches, isAlpha) { - if (!range || matches.length !== 1) { - return; - } - const match = matches[0]; - const captureGroups = match.values(); - const parsedRegex = _parseCaptureGroups(captureGroups); - return { - range, - color: _toIColor(parsedRegex[0], parsedRegex[1], parsedRegex[2], isAlpha ? parsedRegex[3] : 1) - }; - } - function _findHSLColorInformation(range, matches, isAlpha) { - if (!range || matches.length !== 1) { - return; - } - const match = matches[0]; - const captureGroups = match.values(); - const parsedRegex = _parseCaptureGroups(captureGroups); - const colorEquivalent = new Color(new HSLA(parsedRegex[0], parsedRegex[1] / 100, parsedRegex[2] / 100, isAlpha ? parsedRegex[3] : 1)); - return { - range, - color: _toIColor(colorEquivalent.rgba.r, colorEquivalent.rgba.g, colorEquivalent.rgba.b, colorEquivalent.rgba.a) - }; - } - function _findMatches(model, regex) { - if (typeof model === "string") { - return [...model.matchAll(regex)]; - } else { - return model.findMatches(regex); - } - } - function computeColors(model) { - const result = []; - const initialValidationRegex = /\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{3})\b|(#)([A-Fa-f0-9]{4})\b|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm; - const initialValidationMatches = _findMatches(model, initialValidationRegex); - if (initialValidationMatches.length > 0) { - for (const initialMatch of initialValidationMatches) { - const initialCaptureGroups = initialMatch.filter((captureGroup) => captureGroup !== void 0); - const colorScheme = initialCaptureGroups[1]; - const colorParameters = initialCaptureGroups[2]; - if (!colorParameters) { - continue; - } - let colorInformation; - if (colorScheme === "rgb") { - const regexParameters = /^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm; - colorInformation = _findRGBColorInformation(_findRange(model, initialMatch), _findMatches(colorParameters, regexParameters), false); - } else if (colorScheme === "rgba") { - const regexParameters = /^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm; - colorInformation = _findRGBColorInformation(_findRange(model, initialMatch), _findMatches(colorParameters, regexParameters), true); - } else if (colorScheme === "hsl") { - const regexParameters = /^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm; - colorInformation = _findHSLColorInformation(_findRange(model, initialMatch), _findMatches(colorParameters, regexParameters), false); - } else if (colorScheme === "hsla") { - const regexParameters = /^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm; - colorInformation = _findHSLColorInformation(_findRange(model, initialMatch), _findMatches(colorParameters, regexParameters), true); - } else if (colorScheme === "#") { - colorInformation = _findHexColorInformation(_findRange(model, initialMatch), colorScheme + colorParameters); - } - if (colorInformation) { - result.push(colorInformation); - } - } - } - return result; - } - function computeDefaultDocumentColors(model) { - if (!model || typeof model.getValue !== "function" || typeof model.positionAt !== "function") { - return []; - } - return computeColors(model); - } - - // node_modules/monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js - var MirrorModel = class extends MirrorTextModel { - get uri() { - return this._uri; - } - get eol() { - return this._eol; - } - getValue() { - return this.getText(); - } - findMatches(regex) { - const matches = []; - for (let i = 0; i < this._lines.length; i++) { - const line = this._lines[i]; - const offsetToAdd = this.offsetAt(new Position(i + 1, 1)); - const iteratorOverMatches = line.matchAll(regex); - for (const match of iteratorOverMatches) { - if (match.index || match.index === 0) { - match.index = match.index + offsetToAdd; - } - matches.push(match); - } - } - return matches; - } - getLinesContent() { - return this._lines.slice(0); - } - getLineCount() { - return this._lines.length; - } - getLineContent(lineNumber) { - return this._lines[lineNumber - 1]; - } - getWordAtPosition(position, wordDefinition) { - const wordAtText = getWordAtText(position.column, ensureValidWordDefinition(wordDefinition), this._lines[position.lineNumber - 1], 0); - if (wordAtText) { - return new Range(position.lineNumber, wordAtText.startColumn, position.lineNumber, wordAtText.endColumn); - } - return null; - } - words(wordDefinition) { - const lines = this._lines; - const wordenize = this._wordenize.bind(this); - let lineNumber = 0; - let lineText = ""; - let wordRangesIdx = 0; - let wordRanges = []; - return { - *[Symbol.iterator]() { - while (true) { - if (wordRangesIdx < wordRanges.length) { - const value = lineText.substring(wordRanges[wordRangesIdx].start, wordRanges[wordRangesIdx].end); - wordRangesIdx += 1; - yield value; - } else { - if (lineNumber < lines.length) { - lineText = lines[lineNumber]; - wordRanges = wordenize(lineText, wordDefinition); - wordRangesIdx = 0; - lineNumber += 1; - } else { - break; - } - } - } - } - }; - } - getLineWords(lineNumber, wordDefinition) { - const content = this._lines[lineNumber - 1]; - const ranges = this._wordenize(content, wordDefinition); - const words = []; - for (const range of ranges) { - words.push({ - word: content.substring(range.start, range.end), - startColumn: range.start + 1, - endColumn: range.end + 1 - }); - } - return words; - } - _wordenize(content, wordDefinition) { - const result = []; - let match; - wordDefinition.lastIndex = 0; - while (match = wordDefinition.exec(content)) { - if (match[0].length === 0) { - break; - } - result.push({ start: match.index, end: match.index + match[0].length }); - } - return result; - } - getValueInRange(range) { - range = this._validateRange(range); - if (range.startLineNumber === range.endLineNumber) { - return this._lines[range.startLineNumber - 1].substring(range.startColumn - 1, range.endColumn - 1); - } - const lineEnding = this._eol; - const startLineIndex = range.startLineNumber - 1; - const endLineIndex = range.endLineNumber - 1; - const resultLines = []; - resultLines.push(this._lines[startLineIndex].substring(range.startColumn - 1)); - for (let i = startLineIndex + 1; i < endLineIndex; i++) { - resultLines.push(this._lines[i]); - } - resultLines.push(this._lines[endLineIndex].substring(0, range.endColumn - 1)); - return resultLines.join(lineEnding); - } - offsetAt(position) { - position = this._validatePosition(position); - this._ensureLineStarts(); - return this._lineStarts.getPrefixSum(position.lineNumber - 2) + (position.column - 1); - } - positionAt(offset) { - offset = Math.floor(offset); - offset = Math.max(0, offset); - this._ensureLineStarts(); - const out = this._lineStarts.getIndexOf(offset); - const lineLength = this._lines[out.index].length; - return { - lineNumber: 1 + out.index, - column: 1 + Math.min(out.remainder, lineLength) - }; - } - _validateRange(range) { - const start = this._validatePosition({ lineNumber: range.startLineNumber, column: range.startColumn }); - const end = this._validatePosition({ lineNumber: range.endLineNumber, column: range.endColumn }); - if (start.lineNumber !== range.startLineNumber || start.column !== range.startColumn || end.lineNumber !== range.endLineNumber || end.column !== range.endColumn) { - return { - startLineNumber: start.lineNumber, - startColumn: start.column, - endLineNumber: end.lineNumber, - endColumn: end.column - }; - } - return range; - } - _validatePosition(position) { - if (!Position.isIPosition(position)) { - throw new Error("bad position"); - } - let { lineNumber, column } = position; - let hasChanged = false; - if (lineNumber < 1) { - lineNumber = 1; - column = 1; - hasChanged = true; - } else if (lineNumber > this._lines.length) { - lineNumber = this._lines.length; - column = this._lines[lineNumber - 1].length + 1; - hasChanged = true; - } else { - const maxCharacter = this._lines[lineNumber - 1].length + 1; - if (column < 1) { - column = 1; - hasChanged = true; - } else if (column > maxCharacter) { - column = maxCharacter; - hasChanged = true; - } - } - if (!hasChanged) { - return position; - } else { - return { lineNumber, column }; - } - } - }; - var EditorSimpleWorker = class _EditorSimpleWorker { - constructor(host, foreignModuleFactory) { - this._host = host; - this._models = /* @__PURE__ */ Object.create(null); - this._foreignModuleFactory = foreignModuleFactory; - this._foreignModule = null; - } - dispose() { - this._models = /* @__PURE__ */ Object.create(null); - } - _getModel(uri) { - return this._models[uri]; - } - _getModels() { - const all = []; - Object.keys(this._models).forEach((key) => all.push(this._models[key])); - return all; - } - acceptNewModel(data) { - this._models[data.url] = new MirrorModel(URI.parse(data.url), data.lines, data.EOL, data.versionId); - } - acceptModelChanged(strURL, e) { - if (!this._models[strURL]) { - return; - } - const model = this._models[strURL]; - model.onEvents(e); - } - acceptRemovedModel(strURL) { - if (!this._models[strURL]) { - return; - } - delete this._models[strURL]; - } - async computeUnicodeHighlights(url, options, range) { - const model = this._getModel(url); - if (!model) { - return { ranges: [], hasMore: false, ambiguousCharacterCount: 0, invisibleCharacterCount: 0, nonBasicAsciiCharacterCount: 0 }; - } - return UnicodeTextModelHighlighter.computeUnicodeHighlights(model, options, range); - } - // ---- BEGIN diff -------------------------------------------------------------------------- - async computeDiff(originalUrl, modifiedUrl, options, algorithm) { - const original = this._getModel(originalUrl); - const modified = this._getModel(modifiedUrl); - if (!original || !modified) { - return null; - } - const result = _EditorSimpleWorker.computeDiff(original, modified, options, algorithm); - return result; - } - static computeDiff(originalTextModel, modifiedTextModel, options, algorithm) { - const diffAlgorithm = algorithm === "advanced" ? linesDiffComputers.getDefault() : linesDiffComputers.getLegacy(); - const originalLines = originalTextModel.getLinesContent(); - const modifiedLines = modifiedTextModel.getLinesContent(); - const result = diffAlgorithm.computeDiff(originalLines, modifiedLines, options); - const identical = result.changes.length > 0 ? false : this._modelsAreIdentical(originalTextModel, modifiedTextModel); - function getLineChanges(changes) { - return changes.map((m) => { - var _a4; - return [m.original.startLineNumber, m.original.endLineNumberExclusive, m.modified.startLineNumber, m.modified.endLineNumberExclusive, (_a4 = m.innerChanges) === null || _a4 === void 0 ? void 0 : _a4.map((m2) => [ - m2.originalRange.startLineNumber, - m2.originalRange.startColumn, - m2.originalRange.endLineNumber, - m2.originalRange.endColumn, - m2.modifiedRange.startLineNumber, - m2.modifiedRange.startColumn, - m2.modifiedRange.endLineNumber, - m2.modifiedRange.endColumn - ])]; - }); - } - return { - identical, - quitEarly: result.hitTimeout, - changes: getLineChanges(result.changes), - moves: result.moves.map((m) => [ - m.lineRangeMapping.original.startLineNumber, - m.lineRangeMapping.original.endLineNumberExclusive, - m.lineRangeMapping.modified.startLineNumber, - m.lineRangeMapping.modified.endLineNumberExclusive, - getLineChanges(m.changes) - ]) - }; - } - static _modelsAreIdentical(original, modified) { - const originalLineCount = original.getLineCount(); - const modifiedLineCount = modified.getLineCount(); - if (originalLineCount !== modifiedLineCount) { - return false; - } - for (let line = 1; line <= originalLineCount; line++) { - const originalLine = original.getLineContent(line); - const modifiedLine = modified.getLineContent(line); - if (originalLine !== modifiedLine) { - return false; - } - } - return true; - } - async computeMoreMinimalEdits(modelUrl, edits, pretty) { - const model = this._getModel(modelUrl); - if (!model) { - return edits; - } - const result = []; - let lastEol = void 0; - edits = edits.slice(0).sort((a, b) => { - if (a.range && b.range) { - return Range.compareRangesUsingStarts(a.range, b.range); - } - const aRng = a.range ? 0 : 1; - const bRng = b.range ? 0 : 1; - return aRng - bRng; - }); - let writeIndex = 0; - for (let readIndex = 1; readIndex < edits.length; readIndex++) { - if (Range.getEndPosition(edits[writeIndex].range).equals(Range.getStartPosition(edits[readIndex].range))) { - edits[writeIndex].range = Range.fromPositions(Range.getStartPosition(edits[writeIndex].range), Range.getEndPosition(edits[readIndex].range)); - edits[writeIndex].text += edits[readIndex].text; - } else { - writeIndex++; - edits[writeIndex] = edits[readIndex]; - } - } - edits.length = writeIndex + 1; - for (let { range, text, eol } of edits) { - if (typeof eol === "number") { - lastEol = eol; - } - if (Range.isEmpty(range) && !text) { - continue; - } - const original = model.getValueInRange(range); - text = text.replace(/\r\n|\n|\r/g, model.eol); - if (original === text) { - continue; - } - if (Math.max(text.length, original.length) > _EditorSimpleWorker._diffLimit) { - result.push({ range, text }); - continue; - } - const changes = stringDiff(original, text, pretty); - const editOffset = model.offsetAt(Range.lift(range).getStartPosition()); - for (const change of changes) { - const start = model.positionAt(editOffset + change.originalStart); - const end = model.positionAt(editOffset + change.originalStart + change.originalLength); - const newEdit = { - text: text.substr(change.modifiedStart, change.modifiedLength), - range: { startLineNumber: start.lineNumber, startColumn: start.column, endLineNumber: end.lineNumber, endColumn: end.column } - }; - if (model.getValueInRange(newEdit.range) !== newEdit.text) { - result.push(newEdit); - } - } - } - if (typeof lastEol === "number") { - result.push({ eol: lastEol, text: "", range: { startLineNumber: 0, startColumn: 0, endLineNumber: 0, endColumn: 0 } }); - } - return result; - } - // ---- END minimal edits --------------------------------------------------------------- - async computeLinks(modelUrl) { - const model = this._getModel(modelUrl); - if (!model) { - return null; - } - return computeLinks(model); - } - // --- BEGIN default document colors ----------------------------------------------------------- - async computeDefaultDocumentColors(modelUrl) { - const model = this._getModel(modelUrl); - if (!model) { - return null; - } - return computeDefaultDocumentColors(model); - } - async textualSuggest(modelUrls, leadingWord, wordDef, wordDefFlags) { - const sw = new StopWatch(); - const wordDefRegExp = new RegExp(wordDef, wordDefFlags); - const seen = /* @__PURE__ */ new Set(); - outer: - for (const url of modelUrls) { - const model = this._getModel(url); - if (!model) { - continue; - } - for (const word of model.words(wordDefRegExp)) { - if (word === leadingWord || !isNaN(Number(word))) { - continue; - } - seen.add(word); - if (seen.size > _EditorSimpleWorker._suggestionsLimit) { - break outer; - } - } - } - return { words: Array.from(seen), duration: sw.elapsed() }; - } - // ---- END suggest -------------------------------------------------------------------------- - //#region -- word ranges -- - async computeWordRanges(modelUrl, range, wordDef, wordDefFlags) { - const model = this._getModel(modelUrl); - if (!model) { - return /* @__PURE__ */ Object.create(null); - } - const wordDefRegExp = new RegExp(wordDef, wordDefFlags); - const result = /* @__PURE__ */ Object.create(null); - for (let line = range.startLineNumber; line < range.endLineNumber; line++) { - const words = model.getLineWords(line, wordDefRegExp); - for (const word of words) { - if (!isNaN(Number(word.word))) { - continue; - } - let array = result[word.word]; - if (!array) { - array = []; - result[word.word] = array; - } - array.push({ - startLineNumber: line, - startColumn: word.startColumn, - endLineNumber: line, - endColumn: word.endColumn - }); - } - } - return result; - } - //#endregion - async navigateValueSet(modelUrl, range, up, wordDef, wordDefFlags) { - const model = this._getModel(modelUrl); - if (!model) { - return null; - } - const wordDefRegExp = new RegExp(wordDef, wordDefFlags); - if (range.startColumn === range.endColumn) { - range = { - startLineNumber: range.startLineNumber, - startColumn: range.startColumn, - endLineNumber: range.endLineNumber, - endColumn: range.endColumn + 1 - }; - } - const selectionText = model.getValueInRange(range); - const wordRange = model.getWordAtPosition({ lineNumber: range.startLineNumber, column: range.startColumn }, wordDefRegExp); - if (!wordRange) { - return null; - } - const word = model.getValueInRange(wordRange); - const result = BasicInplaceReplace.INSTANCE.navigateValueSet(range, selectionText, wordRange, word, up); - return result; - } - // ---- BEGIN foreign module support -------------------------------------------------------------------------- - loadForeignModule(moduleId, createData, foreignHostMethods) { - const proxyMethodRequest = (method, args) => { - return this._host.fhr(method, args); - }; - const foreignHost = createProxyObject(foreignHostMethods, proxyMethodRequest); - const ctx = { - host: foreignHost, - getMirrorModels: () => { - return this._getModels(); - } - }; - if (this._foreignModuleFactory) { - this._foreignModule = this._foreignModuleFactory(ctx, createData); - return Promise.resolve(getAllMethodNames(this._foreignModule)); - } - return Promise.reject(new Error(`Unexpected usage`)); - } - // foreign method request - fmr(method, args) { - if (!this._foreignModule || typeof this._foreignModule[method] !== "function") { - return Promise.reject(new Error("Missing requestHandler or method: " + method)); - } - try { - return Promise.resolve(this._foreignModule[method].apply(this._foreignModule, args)); - } catch (e) { - return Promise.reject(e); - } - } - }; - EditorSimpleWorker._diffLimit = 1e5; - EditorSimpleWorker._suggestionsLimit = 1e4; - if (typeof importScripts === "function") { - globalThis.monaco = createMonacoBaseAPI(); - } - - // node_modules/monaco-editor/esm/vs/editor/editor.worker.js - var initialized = false; - function initialize(foreignModule) { - if (initialized) { - return; - } - initialized = true; - const simpleWorker = new SimpleWorkerServer((msg) => { - globalThis.postMessage(msg); - }, (host) => new EditorSimpleWorker(host, foreignModule)); - globalThis.onmessage = (e) => { - simpleWorker.onmessage(e.data); - }; - } - globalThis.onmessage = (e) => { - if (!initialized) { - initialize(null); - } - }; -})(); +`+t.stack):t},0)}}emit(t){this.listeners.forEach(n=>{n(t)})}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}},Ri=new pn;function yt(e){yi(e)||Ri.onUnexpectedError(e)}function _n(e){if(e instanceof Error){let{name:t,message:n}=e,r=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:r,noTelemetry:ot.isErrorNoTelemetry(e)}}return e}var bn="Canceled";function yi(e){return e instanceof xn?!0:e instanceof Error&&e.name===bn&&e.message===bn}var xn=class extends Error{constructor(){super(bn),this.name=this.message}};var ot=class e extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof e)return t;let n=new e;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},ie=class e extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,e.prototype)}};function vn(e,t){let n=this,r=!1,i;return function(){if(r)return i;if(r=!0,t)try{i=e.apply(n,arguments)}finally{t()}else i=e.apply(n,arguments);return i}}var ze;(function(e){function t(b){return b&&typeof b=="object"&&typeof b[Symbol.iterator]=="function"}e.is=t;let n=Object.freeze([]);function r(){return n}e.empty=r;function*i(b){yield b}e.single=i;function s(b){return t(b)?b:i(b)}e.wrap=s;function o(b){return b||n}e.from=o;function*l(b){for(let L=b.length-1;L>=0;L--)yield b[L]}e.reverse=l;function u(b){return!b||b[Symbol.iterator]().next().done===!0}e.isEmpty=u;function c(b){return b[Symbol.iterator]().next().value}e.first=c;function f(b,L){for(let _ of b)if(L(_))return!0;return!1}e.some=f;function h(b,L){for(let _ of b)if(L(_))return _}e.find=h;function*d(b,L){for(let _ of b)L(_)&&(yield _)}e.filter=d;function*g(b,L){let _=0;for(let A of b)yield L(A,_++)}e.map=g;function*p(...b){for(let L of b)yield*L}e.concat=p;function m(b,L,_){let A=_;for(let y of b)A=L(A,y);return A}e.reduce=m;function*v(b,L,_=b.length){for(L<0&&(L+=b.length),_<0?_+=b.length:_>b.length&&(_=b.length);L<_;L++)yield b[L]}e.slice=v;function N(b,L=Number.POSITIVE_INFINITY){let _=[];if(L===0)return[_,b];let A=b[Symbol.iterator]();for(let y=0;y{t[e]||console.log(n)},3e3)}setParent(t,n){if(t&&t!==oe.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==oe.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function wn(e){return se?.trackDisposable(e),e}function Nn(e){se?.markAsDisposed(e)}function Ln(e,t){se?.setParent(e,t)}function Fi(e,t){if(se)for(let n of e)se.setParent(n,t)}function xr(e){if(ze.is(e)){let t=[];for(let n of e)if(n)try{n.dispose()}catch(r){t.push(r)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function _r(...e){let t=We(()=>xr(e));return Fi(e,t),t}function We(e){let t=wn({dispose:vn(()=>{Nn(t),e()})});return t}var ke=class e{constructor(){this._toDispose=new Set,this._isDisposed=!1,wn(this)}dispose(){this._isDisposed||(Nn(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{xr(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return Ln(t,this),this._isDisposed?e.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(t),t}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),Ln(t,null))}};ke.DISABLE_DISPOSED_WARNING=!1;var oe=class{constructor(){this._store=new ke,wn(this),Ln(this._store,this)}dispose(){Nn(this),this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}};oe.None=Object.freeze({dispose(){}});var z=class e{constructor(t){this.element=t,this.next=e.Undefined,this.prev=e.Undefined}};z.Undefined=new z(void 0);var at=class{constructor(){this._first=z.Undefined,this._last=z.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===z.Undefined}clear(){let t=this._first;for(;t!==z.Undefined;){let n=t.next;t.prev=z.Undefined,t.next=z.Undefined,t=n}this._first=z.Undefined,this._last=z.Undefined,this._size=0}unshift(t){return this._insert(t,!1)}push(t){return this._insert(t,!0)}_insert(t,n){let r=new z(t);if(this._first===z.Undefined)this._first=r,this._last=r;else if(n){let s=this._last;this._last=r,r.prev=s,s.next=r}else{let s=this._first;this._first=r,r.next=s,s.prev=r}this._size+=1;let i=!1;return()=>{i||(i=!0,this._remove(r))}}shift(){if(this._first!==z.Undefined){let t=this._first.element;return this._remove(this._first),t}}pop(){if(this._last!==z.Undefined){let t=this._last.element;return this._remove(this._last),t}}_remove(t){if(t.prev!==z.Undefined&&t.next!==z.Undefined){let n=t.prev;n.next=t.next,t.next.prev=n}else t.prev===z.Undefined&&t.next===z.Undefined?(this._first=z.Undefined,this._last=z.Undefined):t.next===z.Undefined?(this._last=this._last.prev,this._last.next=z.Undefined):t.prev===z.Undefined&&(this._first=this._first.next,this._first.prev=z.Undefined);this._size-=1}*[Symbol.iterator](){let t=this._first;for(;t!==z.Undefined;)yield t.element,t=t.next}};var ki=globalThis.performance&&typeof globalThis.performance.now=="function",Oe=class e{static create(t){return new e(t)}constructor(t){this._now=ki&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}};var vr=!1,Di=!1,Et;(function(e){e.None=()=>oe.None;function t(x){if(Di){let{onDidAddListener:w}=x,R=ut.create(),C=0;x.onDidAddListener=()=>{++C===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),R.print()),w?.()}}}function n(x,w){return d(x,()=>{},0,void 0,!0,void 0,w)}e.defer=n;function r(x){return(w,R=null,C)=>{let F=!1,D;return D=x(B=>{if(!F)return D?D.dispose():F=!0,w.call(R,B)},null,C),F&&D.dispose(),D}}e.once=r;function i(x,w,R){return f((C,F=null,D)=>x(B=>C.call(F,w(B)),null,D),R)}e.map=i;function s(x,w,R){return f((C,F=null,D)=>x(B=>{w(B),C.call(F,B)},null,D),R)}e.forEach=s;function o(x,w,R){return f((C,F=null,D)=>x(B=>w(B)&&C.call(F,B),null,D),R)}e.filter=o;function l(x){return x}e.signal=l;function u(...x){return(w,R=null,C)=>{let F=_r(...x.map(D=>D(B=>w.call(R,B))));return h(F,C)}}e.any=u;function c(x,w,R,C){let F=R;return i(x,D=>(F=w(F,D),F),C)}e.reduce=c;function f(x,w){let R,C={onWillAddFirstListener(){R=x(F.fire,F)},onDidRemoveLastListener(){R?.dispose()}};w||t(C);let F=new Y(C);return w?.add(F),F.event}function h(x,w){return w instanceof Array?w.push(x):w&&w.add(x),x}function d(x,w,R=100,C=!1,F=!1,D,B){let J,K,Ue,At=0,Fe,br={leakWarningThreshold:D,onWillAddFirstListener(){J=x(Ci=>{At++,K=w(K,Ci),C&&!Ue&&(Rt.fire(K),K=void 0),Fe=()=>{let Ai=K;K=void 0,Ue=void 0,(!C||At>1)&&Rt.fire(Ai),At=0},typeof R=="number"?(clearTimeout(Ue),Ue=setTimeout(Fe,R)):Ue===void 0&&(Ue=0,queueMicrotask(Fe))})},onWillRemoveListener(){F&&At>0&&Fe?.()},onDidRemoveLastListener(){Fe=void 0,J.dispose()}};B||t(br);let Rt=new Y(br);return B?.add(Rt),Rt.event}e.debounce=d;function g(x,w=0,R){return e.debounce(x,(C,F)=>C?(C.push(F),C):[F],w,void 0,!0,void 0,R)}e.accumulate=g;function p(x,w=(C,F)=>C===F,R){let C=!0,F;return o(x,D=>{let B=C||!w(D,F);return C=!1,F=D,B},R)}e.latch=p;function m(x,w,R){return[e.filter(x,w,R),e.filter(x,C=>!w(C),R)]}e.split=m;function v(x,w=!1,R=[],C){let F=R.slice(),D=x(K=>{F?F.push(K):J.fire(K)});C&&C.add(D);let B=()=>{F?.forEach(K=>J.fire(K)),F=null},J=new Y({onWillAddFirstListener(){D||(D=x(K=>J.fire(K)),C&&C.add(D))},onDidAddFirstListener(){F&&(w?setTimeout(B):B())},onDidRemoveLastListener(){D&&D.dispose(),D=null}});return C&&C.add(J),J.event}e.buffer=v;function N(x,w){return(C,F,D)=>{let B=w(new b);return x(function(J){let K=B.evaluate(J);K!==S&&C.call(F,K)},void 0,D)}}e.chain=N;let S=Symbol("HaltChainable");class b{constructor(){this.steps=[]}map(w){return this.steps.push(w),this}forEach(w){return this.steps.push(R=>(w(R),R)),this}filter(w){return this.steps.push(R=>w(R)?R:S),this}reduce(w,R){let C=R;return this.steps.push(F=>(C=w(C,F),C)),this}latch(w=(R,C)=>R===C){let R=!0,C;return this.steps.push(F=>{let D=R||!w(F,C);return R=!1,C=F,D?F:S}),this}evaluate(w){for(let R of this.steps)if(w=R(w),w===S)break;return w}}function L(x,w,R=C=>C){let C=(...J)=>B.fire(R(...J)),F=()=>x.on(w,C),D=()=>x.removeListener(w,C),B=new Y({onWillAddFirstListener:F,onDidRemoveLastListener:D});return B.event}e.fromNodeEventEmitter=L;function _(x,w,R=C=>C){let C=(...J)=>B.fire(R(...J)),F=()=>x.addEventListener(w,C),D=()=>x.removeEventListener(w,C),B=new Y({onWillAddFirstListener:F,onDidRemoveLastListener:D});return B.event}e.fromDOMEventEmitter=_;function A(x){return new Promise(w=>r(x)(w))}e.toPromise=A;function y(x){let w=new Y;return x.then(R=>{w.fire(R)},()=>{w.fire(void 0)}).finally(()=>{w.dispose()}),w.event}e.fromPromise=y;function E(x,w,R){return w(R),x(C=>w(C))}e.runAndSubscribe=E;class q{constructor(w,R){this._observable=w,this._counter=0,this._hasChanged=!1;let C={onWillAddFirstListener:()=>{w.addObserver(this)},onDidRemoveLastListener:()=>{w.removeObserver(this)}};R||t(C),this.emitter=new Y(C),R&&R.add(this.emitter)}beginUpdate(w){this._counter++}handlePossibleChange(w){}handleChange(w,R){this._hasChanged=!0}endUpdate(w){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function j(x,w){return new q(x,w).emitter.event}e.fromObservable=j;function T(x){return(w,R,C)=>{let F=0,D=!1,B={beginUpdate(){F++},endUpdate(){F--,F===0&&(x.reportChanges(),D&&(D=!1,w.call(R)))},handlePossibleChange(){},handleChange(){D=!0}};x.addObserver(B),x.reportChanges();let J={dispose(){x.removeObserver(B)}};return C instanceof ke?C.add(J):Array.isArray(C)&&C.push(J),J}}e.fromObservableLight=T})(Et||(Et={}));var lt=class e{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${e._idPool++}`,e.all.add(this)}start(t){this._stopWatch=new Oe,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};lt.all=new Set;lt._idPool=0;var Lr=-1,Sn=class{constructor(t,n=Math.random().toString(18).slice(2,5)){this.threshold=t,this.name=n,this._warnCountdown=0}dispose(){var t;(t=this._stacks)===null||t===void 0||t.clear()}check(t,n){let r=this.threshold;if(r<=0||n{let s=this._stacks.get(t.value)||0;this._stacks.set(t.value,s-1)}}},ut=class e{static create(){var t;return new e((t=new Error().stack)!==null&&t!==void 0?t:"")}constructor(t){this.value=t}print(){console.warn(this.value.split(` +`).slice(2).join(` +`))}},He=class{constructor(t){this.value=t}},Pi=2,Ii=(e,t)=>{if(e instanceof He)t(e);else for(let n=0;n0||!((n=this._options)===null||n===void 0)&&n.leakWarningThreshold?new Sn((i=(r=this._options)===null||r===void 0?void 0:r.leakWarningThreshold)!==null&&i!==void 0?i:Lr):void 0,this._perfMon=!((s=this._options)===null||s===void 0)&&s._profName?new lt(this._options._profName):void 0,this._deliveryQueue=(o=this._options)===null||o===void 0?void 0:o.deliveryQueue}dispose(){var t,n,r,i;if(!this._disposed){if(this._disposed=!0,((t=this._deliveryQueue)===null||t===void 0?void 0:t.current)===this&&this._deliveryQueue.reset(),this._listeners){if(vr){let s=this._listeners;queueMicrotask(()=>{Ii(s,o=>{var l;return(l=o.stack)===null||l===void 0?void 0:l.print()})})}this._listeners=void 0,this._size=0}(r=(n=this._options)===null||n===void 0?void 0:n.onDidRemoveLastListener)===null||r===void 0||r.call(n),(i=this._leakageMon)===null||i===void 0||i.dispose()}}get event(){var t;return(t=this._event)!==null&&t!==void 0||(this._event=(n,r,i)=>{var s,o,l,u,c;if(this._leakageMon&&this._size>this._leakageMon.threshold*3)return console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`),oe.None;if(this._disposed)return oe.None;r&&(n=n.bind(r));let f=new He(n),h,d;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(f.stack=ut.create(),h=this._leakageMon.check(f.stack,this._size+1)),vr&&(f.stack=d??ut.create()),this._listeners?this._listeners instanceof He?((c=this._deliveryQueue)!==null&&c!==void 0||(this._deliveryQueue=new Cn),this._listeners=[this._listeners,f]):this._listeners.push(f):((o=(s=this._options)===null||s===void 0?void 0:s.onWillAddFirstListener)===null||o===void 0||o.call(s,this),this._listeners=f,(u=(l=this._options)===null||l===void 0?void 0:l.onDidAddFirstListener)===null||u===void 0||u.call(l,this)),this._size++;let g=We(()=>{h?.(),this._removeListener(f)});return i instanceof ke?i.add(g):Array.isArray(i)&&i.push(g),g}),this._event}_removeListener(t){var n,r,i,s;if((r=(n=this._options)===null||n===void 0?void 0:n.onWillRemoveListener)===null||r===void 0||r.call(n,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(s=(i=this._options)===null||i===void 0?void 0:i.onDidRemoveLastListener)===null||s===void 0||s.call(i,this),this._size=0;return}let o=this._listeners,l=o.indexOf(t);if(l===-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--,o[l]=void 0;let u=this._deliveryQueue.current===this;if(this._size*Pi<=o.length){let c=0;for(let f=0;f0}};var Cn=class{constructor(){this.i=-1,this.end=0}enqueue(t,n,r){this.i=0,this.end=r,this.current=t,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}};function wr(e){return typeof e=="string"}function Ti(e){let t=[];for(;Object.prototype!==e;)t=t.concat(Object.getOwnPropertyNames(e)),e=Object.getPrototypeOf(e);return t}function ct(e){let t=[];for(let n of Ti(e))typeof e[n]=="function"&&t.push(n);return t}function Nr(e,t){let n=i=>function(){let s=Array.prototype.slice.call(arguments,0);return t(i,s)},r={};for(let i of e)r[i]=n(i);return r}var Bi=typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function Vi(e,t){let n;return t.length===0?n=e:n=e.replace(/\{(\d+)\}/g,(r,i)=>{let s=i[0],o=t[s],l=r;return typeof o=="string"?l=o:(typeof o=="number"||typeof o=="boolean"||o===void 0||o===null)&&(l=String(o)),l}),Bi&&(n="\uFF3B"+n.replace(/[aouei]/g,"$&$&")+"\uFF3D"),n}function U(e,t,...n){return Vi(t,n)}var An,$e="en",kt=!1,Dt=!1,Ft=!1,Ui=!1,zi=!1,Cr=!1,Wi=!1,Oi=!1,Hi=!1,$i=!1,Mt,Rn=$e,Sr=$e,Gi,ae,ge=globalThis,Z;typeof ge.vscode<"u"&&typeof ge.vscode.process<"u"?Z=ge.vscode.process:typeof process<"u"&&(Z=process);var Ar=typeof((An=Z?.versions)===null||An===void 0?void 0:An.electron)=="string",ji=Ar&&Z?.type==="renderer";if(typeof Z=="object"){kt=Z.platform==="win32",Dt=Z.platform==="darwin",Ft=Z.platform==="linux",Ui=Ft&&!!Z.env.SNAP&&!!Z.env.SNAP_REVISION,Wi=Ar,Hi=!!Z.env.CI||!!Z.env.BUILD_ARTIFACTSTAGINGDIRECTORY,Mt=$e,Rn=$e;let e=Z.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e),n=t.availableLanguages["*"];Mt=t.locale,Sr=t.osLocale,Rn=n||$e,Gi=t._translationsConfigFile}catch{}zi=!0}else typeof navigator=="object"&&!ji?(ae=navigator.userAgent,kt=ae.indexOf("Windows")>=0,Dt=ae.indexOf("Macintosh")>=0,Oi=(ae.indexOf("Macintosh")>=0||ae.indexOf("iPad")>=0||ae.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Ft=ae.indexOf("Linux")>=0,$i=ae?.indexOf("Mobi")>=0,Cr=!0,Mt=(U({key:"ensureLoaderPluginIsLoaded",comment:["{Locked}"]},"_"),void 0)||$e,Rn=Mt,Sr=navigator.language):console.error("Unable to resolve platform.");var yn=0;Dt?yn=1:kt?yn=3:Ft&&(yn=2);var De=kt,Rr=Dt;var Qi=Cr&&typeof ge.importScripts=="function",vo=Qi?ge.origin:void 0;var ce=ae;var Ji=typeof ge.postMessage=="function"&&!ge.importScripts,Lo=(()=>{if(Ji){let e=[];ge.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let r=0,i=e.length;r{let r=++t;e.push({id:r,callback:n}),ge.postMessage({vscodeScheduleAsyncWork:r},"*")}}return e=>setTimeout(e)})();var Xi=!!(ce&&ce.indexOf("Chrome")>=0),wo=!!(ce&&ce.indexOf("Firefox")>=0),No=!!(!Xi&&ce&&ce.indexOf("Safari")>=0),So=!!(ce&&ce.indexOf("Edg/")>=0),Co=!!(ce&&ce.indexOf("Android")>=0);var Pt=class{constructor(t){this.fn=t,this.lastCache=void 0,this.lastArgKey=void 0}get(t){let n=JSON.stringify(t);return this.lastArgKey!==n&&(this.lastArgKey=n,this.lastCache=this.fn(t)),this.lastCache}};var ht=class{constructor(t){this.executor=t,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(t){this._error=t}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}};var Ge;function yr(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function Er(e){return e.split(/\r\n|\r|\n/)}function Mr(e){for(let t=0,n=e.length;t=0;n--){let r=e.charCodeAt(n);if(r!==32&&r!==9)return n}return-1}function Mn(e){return e>=65&&e<=90}function je(e){return 55296<=e&&e<=56319}function It(e){return 56320<=e&&e<=57343}function Fn(e,t){return(e-55296<<10)+(t-56320)+65536}function kr(e,t,n){let r=e.charCodeAt(n);if(je(r)&&n+1n[3*i+1])i=2*i+1;else return n[3*i+2];return 0}};En._INSTANCE=null;function Zi(){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 he=class{static getInstance(t){return Ge.cache.get(Array.from(t))}static getLocales(){return Ge._locales.value}constructor(t){this.confusableDictionary=t}isAmbiguous(t){return this.confusableDictionary.has(t)}getPrimaryConfusable(t){return this.confusableDictionary.get(t)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}};Ge=he;he.ambiguousCharacterData=new ht(()=>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,8218,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,8242,96,1370,96,1523,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,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,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,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,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,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,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,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,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,71922,67,71913,67,65315,67,8557,67,8450,67,8493,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,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,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,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,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,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,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,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,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,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,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,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,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,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,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,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,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,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,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,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,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,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,71919,87,71910,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,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,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,66293,90,71909,90,65338,90,8484,90,8488,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,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,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,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,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,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,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,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,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,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,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,65283,35,65292,44,65307,59],"ko":[8211,45,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,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,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,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,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,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[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,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,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,65283,35,65307,59]}'));he.cache=new Pt(e=>{function t(c){let f=new Map;for(let h=0;h!c.startsWith("_")&&c in i);s.length===0&&(s=["_default"]);let o;for(let c of s){let f=t(i[c]);o=r(o,f)}let l=t(i._common),u=n(l,o);return new Ge(u)});he._locales=new ht(()=>Object.keys(Ge.ambiguousCharacterData.value).filter(e=>!e.startsWith("_")));var Pe=class e{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,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,12288,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]")}static getData(){return this._data||(this._data=new Set(e.getRawData())),this._data}static isInvisibleCharacter(t){return e.getData().has(t)}static get codePoints(){return e.getData()}};Pe._data=void 0;var Ki="$initialize";var kn=class{constructor(t,n,r,i){this.vsWorker=t,this.req=n,this.method=r,this.args=i,this.type=0}},Tt=class{constructor(t,n,r,i){this.vsWorker=t,this.seq=n,this.res=r,this.err=i,this.type=1}},Dn=class{constructor(t,n,r,i){this.vsWorker=t,this.req=n,this.eventName=r,this.arg=i,this.type=2}},Pn=class{constructor(t,n,r){this.vsWorker=t,this.req=n,this.event=r,this.type=3}},In=class{constructor(t,n){this.vsWorker=t,this.req=n,this.type=4}},Tn=class{constructor(t){this._workerId=-1,this._handler=t,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(t){this._workerId=t}sendMessage(t,n){let r=String(++this._lastSentReq);return new Promise((i,s)=>{this._pendingReplies[r]={resolve:i,reject:s},this._send(new kn(this._workerId,r,t,n))})}listen(t,n){let r=null,i=new Y({onWillAddFirstListener:()=>{r=String(++this._lastSentReq),this._pendingEmitters.set(r,i),this._send(new Dn(this._workerId,r,t,n))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(r),this._send(new In(this._workerId,r)),r=null}});return i.event}handleMessage(t){!t||!t.vsWorker||this._workerId!==-1&&t.vsWorker!==this._workerId||this._handleMessage(t)}_handleMessage(t){switch(t.type){case 1:return this._handleReplyMessage(t);case 0:return this._handleRequestMessage(t);case 2:return this._handleSubscribeEventMessage(t);case 3:return this._handleEventMessage(t);case 4:return this._handleUnsubscribeEventMessage(t)}}_handleReplyMessage(t){if(!this._pendingReplies[t.seq]){console.warn("Got reply to unknown seq");return}let n=this._pendingReplies[t.seq];if(delete this._pendingReplies[t.seq],t.err){let r=t.err;t.err.$isError&&(r=new Error,r.name=t.err.name,r.message=t.err.message,r.stack=t.err.stack),n.reject(r);return}n.resolve(t.res)}_handleRequestMessage(t){let n=t.req;this._handler.handleMessage(t.method,t.args).then(i=>{this._send(new Tt(this._workerId,n,i,void 0))},i=>{i.detail instanceof Error&&(i.detail=_n(i.detail)),this._send(new Tt(this._workerId,n,void 0,_n(i)))})}_handleSubscribeEventMessage(t){let n=t.req,r=this._handler.handleEvent(t.eventName,t.arg)(i=>{this._send(new Pn(this._workerId,n,i))});this._pendingEvents.set(n,r)}_handleEventMessage(t){if(!this._pendingEmitters.has(t.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(t.req).fire(t.event)}_handleUnsubscribeEventMessage(t){if(!this._pendingEvents.has(t.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(t.req).dispose(),this._pendingEvents.delete(t.req)}_send(t){let n=[];if(t.type===0)for(let r=0;rfunction(){let l=Array.prototype.slice.call(arguments,0);return t(o,l)},i=o=>function(l){return n(o,l)},s={};for(let o of e){if(Ir(o)){s[o]=i(o);continue}if(Pr(o)){s[o]=n(o,void 0);continue}s[o]=r(o)}return s}var Bt=class{constructor(t,n){this._requestHandlerFactory=n,this._requestHandler=null,this._protocol=new Tn({sendMessage:(r,i)=>{t(r,i)},handleMessage:(r,i)=>this._handleMessage(r,i),handleEvent:(r,i)=>this._handleEvent(r,i)})}onmessage(t){this._protocol.handleMessage(t)}_handleMessage(t,n){if(t===Ki)return this.initialize(n[0],n[1],n[2],n[3]);if(!this._requestHandler||typeof this._requestHandler[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._requestHandler[t].apply(this._requestHandler,n))}catch(r){return Promise.reject(r)}}_handleEvent(t,n){if(!this._requestHandler)throw new Error("Missing requestHandler");if(Ir(t)){let r=this._requestHandler[t].call(this._requestHandler,n);if(typeof r!="function")throw new Error(`Missing dynamic event ${t} on request handler.`);return r}if(Pr(t)){let r=this._requestHandler[t];if(typeof r!="function")throw new Error(`Missing event ${t} on request handler.`);return r}throw new Error(`Malformed event name ${t}`)}initialize(t,n,r,i){this._protocol.setWorkerId(t);let l=es(i,(u,c)=>this._protocol.sendMessage(u,c),(u,c)=>this._protocol.listen(u,c));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(l),Promise.resolve(ct(this._requestHandler))):(n&&(typeof n.baseUrl<"u"&&delete n.baseUrl,typeof n.paths<"u"&&typeof n.paths.vs<"u"&&delete n.paths.vs,typeof n.trustedTypesPolicy<"u"&&delete n.trustedTypesPolicy,n.catchError=!0,globalThis.require.config(n)),new Promise((u,c)=>{let f=globalThis.require;f([r],h=>{if(this._requestHandler=h.create(l),!this._requestHandler){c(new Error("No RequestHandler!"));return}u(ct(this._requestHandler))},c)}))}};var le=class{constructor(t,n,r,i){this.originalStart=t,this.originalLength=n,this.modifiedStart=r,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}};function Tr(e,t){return(t<<5)-t+e|0}function Vr(e,t){t=Tr(149417,t);for(let n=0,r=e.length;n>>r)>>>0}function Br(e,t=0,n=e.byteLength,r=0){for(let i=0;in.toString(16).padStart(2,"0")).join(""):ts((e>>>0).toString(16),t/4)}var Vn=class e{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}update(t){let n=t.length;if(n===0)return;let r=this._buff,i=this._buffLen,s=this._leftoverHighSurrogate,o,l;for(s!==0?(o=s,l=-1,s=0):(o=t.charCodeAt(0),l=0);;){let u=o;if(je(o))if(l+1>>6,t[n++]=128|(r&63)>>>0):r<65536?(t[n++]=224|(r&61440)>>>12,t[n++]=128|(r&4032)>>>6,t[n++]=128|(r&63)>>>0):(t[n++]=240|(r&1835008)>>>18,t[n++]=128|(r&258048)>>>12,t[n++]=128|(r&4032)>>>6,t[n++]=128|(r&63)>>>0),n>=64&&(this._step(),n-=64,this._totalLen+=64,t[0]=t[64],t[1]=t[65],t[2]=t[66]),n}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()),dt(this._h0)+dt(this._h1)+dt(this._h2)+dt(this._h3)+dt(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,Br(this._buff,this._buffLen),this._buffLen>56&&(this._step(),Br(this._buff));let t=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(t/4294967296),!1),this._buffDV.setUint32(60,t%4294967296,!1),this._step()}_step(){let t=e._bigBlock32,n=this._buffDV;for(let h=0;h<64;h+=4)t.setUint32(h,n.getUint32(h,!1),!1);for(let h=64;h<320;h+=4)t.setUint32(h,Bn(t.getUint32(h-12,!1)^t.getUint32(h-32,!1)^t.getUint32(h-56,!1)^t.getUint32(h-64,!1),1),!1);let r=this._h0,i=this._h1,s=this._h2,o=this._h3,l=this._h4,u,c,f;for(let h=0;h<80;h++)h<20?(u=i&s|~i&o,c=1518500249):h<40?(u=i^s^o,c=1859775393):h<60?(u=i&s|i&o|s&o,c=2400959708):(u=i^s^o,c=3395469782),f=Bn(r,5)+u+l+c+t.getUint32(h*4,!1)&4294967295,l=o,o=s,s=Bn(i,30),i=r,r=f;this._h0=this._h0+r&4294967295,this._h1=this._h1+i&4294967295,this._h2=this._h2+s&4294967295,this._h3=this._h3+o&4294967295,this._h4=this._h4+l&4294967295}};Vn._bigBlock32=new DataView(new ArrayBuffer(320));var Vt=class{constructor(t){this.source=t}getElements(){let t=this.source,n=new Int32Array(t.length);for(let r=0,i=t.length;r0||this.m_modifiedCount>0)&&this.m_changes.push(new le(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(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_originalCount++}AddModifiedElement(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),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}},mt=class e{constructor(t,n,r=null){this.ContinueProcessingPredicate=r,this._originalSequence=t,this._modifiedSequence=n;let[i,s,o]=e._getElements(t),[l,u,c]=e._getElements(n);this._hasStrings=o&&c,this._originalStringElements=i,this._originalElementsOrHash=s,this._modifiedStringElements=l,this._modifiedElementsOrHash=u,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(t){return t.length>0&&typeof t[0]=="string"}static _getElements(t){let n=t.getElements();if(e._isStringArray(n)){let r=new Int32Array(n.length);for(let i=0,s=n.length;i=t&&i>=r&&this.ElementsAreEqual(n,i);)n--,i--;if(t>n||r>i){let h;return r<=i?(xe.Assert(t===n+1,"originalStart should only be one more than originalEnd"),h=[new le(t,0,r,i-r+1)]):t<=n?(xe.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),h=[new le(t,n-t+1,r,0)]):(xe.Assert(t===n+1,"originalStart should only be one more than originalEnd"),xe.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),h=[]),h}let o=[0],l=[0],u=this.ComputeRecursionPoint(t,n,r,i,o,l,s),c=o[0],f=l[0];if(u!==null)return u;if(!s[0]){let h=this.ComputeDiffRecursive(t,c,r,f,s),d=[];return s[0]?d=[new le(c+1,n-(c+1)+1,f+1,i-(f+1)+1)]:d=this.ComputeDiffRecursive(c+1,n,f+1,i,s),this.ConcatenateChanges(h,d)}return[new le(t,n-t+1,r,i-r+1)]}WALKTRACE(t,n,r,i,s,o,l,u,c,f,h,d,g,p,m,v,N,S){let b=null,L=null,_=new qt,A=n,y=r,E=g[0]-v[0]-i,q=-1073741824,j=this.m_forwardHistory.length-1;do{let T=E+t;T===A||T=0&&(c=this.m_forwardHistory[j],t=c[0],A=1,y=c.length-1)}while(--j>=-1);if(b=_.getReverseChanges(),S[0]){let T=g[0]+1,x=v[0]+1;if(b!==null&&b.length>0){let w=b[b.length-1];T=Math.max(T,w.getOriginalEnd()),x=Math.max(x,w.getModifiedEnd())}L=[new le(T,d-T+1,x,m-x+1)]}else{_=new qt,A=o,y=l,E=g[0]-v[0]-u,q=1073741824,j=N?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{let T=E+s;T===A||T=f[T+1]?(h=f[T+1]-1,p=h-E-u,h>q&&_.MarkNextChange(),q=h+1,_.AddOriginalElement(h+1,p+1),E=T+1-s):(h=f[T-1],p=h-E-u,h>q&&_.MarkNextChange(),q=h,_.AddModifiedElement(h+1,p+1),E=T-1-s),j>=0&&(f=this.m_reverseHistory[j],s=f[0],A=1,y=f.length-1)}while(--j>=-1);L=_.getChanges()}return this.ConcatenateChanges(b,L)}ComputeRecursionPoint(t,n,r,i,s,o,l){let u=0,c=0,f=0,h=0,d=0,g=0;t--,r--,s[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];let p=n-t+(i-r),m=p+1,v=new Int32Array(m),N=new Int32Array(m),S=i-r,b=n-t,L=t-r,_=n-i,y=(b-S)%2===0;v[S]=t,N[b]=n,l[0]=!1;for(let E=1;E<=p/2+1;E++){let q=0,j=0;f=this.ClipDiagonalBound(S-E,E,S,m),h=this.ClipDiagonalBound(S+E,E,S,m);for(let x=f;x<=h;x+=2){x===f||xq+j&&(q=u,j=c),!y&&Math.abs(x-b)<=E-1&&u>=N[x])return s[0]=u,o[0]=c,w<=N[x]&&E<=1448?this.WALKTRACE(S,f,h,L,b,d,g,_,v,N,u,n,s,c,i,o,y,l):null}let T=(q-t+(j-r)-E)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(q,T))return l[0]=!0,s[0]=q,o[0]=j,T>0&&E<=1448?this.WALKTRACE(S,f,h,L,b,d,g,_,v,N,u,n,s,c,i,o,y,l):(t++,r++,[new le(t,n-t+1,r,i-r+1)]);d=this.ClipDiagonalBound(b-E,E,b,m),g=this.ClipDiagonalBound(b+E,E,b,m);for(let x=d;x<=g;x+=2){x===d||x=N[x+1]?u=N[x+1]-1:u=N[x-1],c=u-(x-b)-_;let w=u;for(;u>t&&c>r&&this.ElementsAreEqual(u,c);)u--,c--;if(N[x]=u,y&&Math.abs(x-S)<=E&&u<=v[x])return s[0]=u,o[0]=c,w>=v[x]&&E<=1448?this.WALKTRACE(S,f,h,L,b,d,g,_,v,N,u,n,s,c,i,o,y,l):null}if(E<=1447){let x=new Int32Array(h-f+2);x[0]=S-f+1,_e.Copy2(v,f,x,1,h-f+1),this.m_forwardHistory.push(x),x=new Int32Array(g-d+2),x[0]=b-d+1,_e.Copy2(N,d,x,1,g-d+1),this.m_reverseHistory.push(x)}}return this.WALKTRACE(S,f,h,L,b,d,g,_,v,N,u,n,s,c,i,o,y,l)}PrettifyChanges(t){for(let n=0;n0,l=r.modifiedLength>0;for(;r.originalStart+r.originalLength=0;n--){let r=t[n],i=0,s=0;if(n>0){let h=t[n-1];i=h.originalStart+h.originalLength,s=h.modifiedStart+h.modifiedLength}let o=r.originalLength>0,l=r.modifiedLength>0,u=0,c=this._boundaryScore(r.originalStart,r.originalLength,r.modifiedStart,r.modifiedLength);for(let h=1;;h++){let d=r.originalStart-h,g=r.modifiedStart-h;if(dc&&(c=m,u=h)}r.originalStart-=u,r.modifiedStart-=u;let f=[null];if(n>0&&this.ChangesOverlap(t[n-1],t[n],f)){t[n-1]=f[0],t.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,r=t.length;n0&&g>u&&(u=g,c=h,f=d)}return u>0?[c,f]:null}_contiguousSequenceScore(t,n,r){let i=0;for(let s=0;s=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[t])}_OriginalRegionIsBoundary(t,n){if(this._OriginalIsBoundary(t)||this._OriginalIsBoundary(t-1))return!0;if(n>0){let r=t+n;if(this._OriginalIsBoundary(r-1)||this._OriginalIsBoundary(r))return!0}return!1}_ModifiedIsBoundary(t){return t<=0||t>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[t])}_ModifiedRegionIsBoundary(t,n){if(this._ModifiedIsBoundary(t)||this._ModifiedIsBoundary(t-1))return!0;if(n>0){let r=t+n;if(this._ModifiedIsBoundary(r-1)||this._ModifiedIsBoundary(r))return!0}return!1}_boundaryScore(t,n,r,i){let s=this._OriginalRegionIsBoundary(t,n)?1:0,o=this._ModifiedRegionIsBoundary(r,i)?1:0;return s+o}ConcatenateChanges(t,n){let r=[];if(t.length===0||n.length===0)return n.length>0?n:t;if(this.ChangesOverlap(t[t.length-1],n[0],r)){let i=new Array(t.length+n.length-1);return _e.Copy(t,0,i,0,t.length-1),i[t.length-1]=r[0],_e.Copy(n,1,i,t.length,n.length-1),i}else{let i=new Array(t.length+n.length);return _e.Copy(t,0,i,0,t.length),_e.Copy(n,0,i,t.length,n.length),i}}ChangesOverlap(t,n,r){if(xe.Assert(t.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),xe.Assert(t.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),t.originalStart+t.originalLength>=n.originalStart||t.modifiedStart+t.modifiedLength>=n.modifiedStart){let i=t.originalStart,s=t.originalLength,o=t.modifiedStart,l=t.modifiedLength;return t.originalStart+t.originalLength>=n.originalStart&&(s=n.originalStart+n.originalLength-t.originalStart),t.modifiedStart+t.modifiedLength>=n.modifiedStart&&(l=n.modifiedStart+n.modifiedLength-t.modifiedStart),r[0]=new le(i,s,o,l),!0}else return r[0]=null,!1}ClipDiagonalBound(t,n,r,i){if(t>=0&&t=rs&&e<=ss||e>=is&&e<=os}function zt(e,t,n,r){let i="",s=0,o=-1,l=0,u=0;for(let c=0;c<=e.length;++c){if(c2){let f=i.lastIndexOf(n);f===-1?(i="",s=0):(i=i.slice(0,f),s=i.length-1-i.lastIndexOf(n)),o=c,l=0;continue}else if(i.length!==0){i="",s=0,o=c,l=0;continue}}t&&(i+=i.length>0?`${n}..`:"..",s=2)}else i.length>0?i+=`${n}${e.slice(o+1,c)}`:i=e.slice(o+1,c),s=c-o-1;o=c,l=0}else u===we&&l!==-1?++l:l=-1}return i}function Wr(e,t){ls(t,"pathObject");let n=t.dir||t.root,r=t.base||`${t.name||""}${t.ext||""}`;return n?n===t.root?`${n}${r}`:`${n}${e}${r}`:r}var ee={resolve(...e){let t="",n="",r=!1;for(let i=e.length-1;i>=-1;i--){let s;if(i>=0){if(s=e[i],H(s,"path"),s.length===0)continue}else t.length===0?s=gt():(s=Ur[`=${t}`]||gt(),(s===void 0||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===ne)&&(s=`${t}\\`));let o=s.length,l=0,u="",c=!1,f=s.charCodeAt(0);if(o===1)k(f)&&(l=1,c=!0);else if(k(f))if(c=!0,k(s.charCodeAt(1))){let h=2,d=h;for(;h2&&k(s.charCodeAt(2))&&(c=!0,l=3));if(u.length>0)if(t.length>0){if(u.toLowerCase()!==t.toLowerCase())continue}else t=u;if(r){if(t.length>0)break}else if(n=`${s.slice(l)}\\${n}`,r=c,c&&t.length>0)break}return n=zt(n,!r,"\\",k),r?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){H(e,"path");let t=e.length;if(t===0)return".";let n=0,r,i=!1,s=e.charCodeAt(0);if(t===1)return Un(s)?"\\":e;if(k(s))if(i=!0,k(e.charCodeAt(1))){let l=2,u=l;for(;l2&&k(e.charCodeAt(2))&&(i=!0,n=3));let o=n0&&k(e.charCodeAt(t-1))&&(o+="\\"),r===void 0?i?`\\${o}`:o:i?`${r}\\${o}`:`${r}${o}`},isAbsolute(e){H(e,"path");let t=e.length;if(t===0)return!1;let n=e.charCodeAt(0);return k(n)||t>2&&Le(n)&&e.charCodeAt(1)===ve&&k(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,n;for(let s=0;s0&&(t===void 0?t=n=o:t+=`\\${o}`)}if(t===void 0)return".";let r=!0,i=0;if(typeof n=="string"&&k(n.charCodeAt(0))){++i;let s=n.length;s>1&&k(n.charCodeAt(1))&&(++i,s>2&&(k(n.charCodeAt(2))?++i:r=!1))}if(r){for(;i=2&&(t=`\\${t.slice(i)}`)}return ee.normalize(t)},relative(e,t){if(H(e,"from"),H(t,"to"),e===t)return"";let n=ee.resolve(e),r=ee.resolve(t);if(n===r||(e=n.toLowerCase(),t=r.toLowerCase(),e===t))return"";let i=0;for(;ii&&e.charCodeAt(s-1)===ne;)s--;let o=s-i,l=0;for(;ll&&t.charCodeAt(u-1)===ne;)u--;let c=u-l,f=of){if(t.charCodeAt(l+d)===ne)return r.slice(l+d+1);if(d===2)return r.slice(l+d)}o>f&&(e.charCodeAt(i+d)===ne?h=d:d===2&&(h=3)),h===-1&&(h=0)}let g="";for(d=i+h+1;d<=s;++d)(d===s||e.charCodeAt(d)===ne)&&(g+=g.length===0?"..":"\\..");return l+=h,g.length>0?`${g}${r.slice(l,u)}`:(r.charCodeAt(l)===ne&&++l,r.slice(l,u))},toNamespacedPath(e){if(typeof e!="string"||e.length===0)return e;let t=ee.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===ne){if(t.charCodeAt(1)===ne){let n=t.charCodeAt(2);if(n!==as&&n!==we)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(Le(t.charCodeAt(0))&&t.charCodeAt(1)===ve&&t.charCodeAt(2)===ne)return`\\\\?\\${t}`;return e},dirname(e){H(e,"path");let t=e.length;if(t===0)return".";let n=-1,r=0,i=e.charCodeAt(0);if(t===1)return k(i)?e:".";if(k(i)){if(n=r=1,k(e.charCodeAt(1))){let l=2,u=l;for(;l2&&k(e.charCodeAt(2))?3:2,r=n);let s=-1,o=!0;for(let l=t-1;l>=r;--l)if(k(e.charCodeAt(l))){if(!o){s=l;break}}else o=!1;if(s===-1){if(n===-1)return".";s=n}return e.slice(0,s)},basename(e,t){t!==void 0&&H(t,"ext"),H(e,"path");let n=0,r=-1,i=!0,s;if(e.length>=2&&Le(e.charCodeAt(0))&&e.charCodeAt(1)===ve&&(n=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,l=-1;for(s=e.length-1;s>=n;--s){let u=e.charCodeAt(s);if(k(u)){if(!i){n=s+1;break}}else l===-1&&(i=!1,l=s+1),o>=0&&(u===t.charCodeAt(o)?--o===-1&&(r=s):(o=-1,r=l))}return n===r?r=l:r===-1&&(r=e.length),e.slice(n,r)}for(s=e.length-1;s>=n;--s)if(k(e.charCodeAt(s))){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":e.slice(n,r)},extname(e){H(e,"path");let t=0,n=-1,r=0,i=-1,s=!0,o=0;e.length>=2&&e.charCodeAt(1)===ve&&Le(e.charCodeAt(0))&&(t=r=2);for(let l=e.length-1;l>=t;--l){let u=e.charCodeAt(l);if(k(u)){if(!s){r=l+1;break}continue}i===-1&&(s=!1,i=l+1),u===we?n===-1?n=l:o!==1&&(o=1):n!==-1&&(o=-1)}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?"":e.slice(n,i)},format:Wr.bind(null,"\\"),parse(e){H(e,"path");let t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;let n=e.length,r=0,i=e.charCodeAt(0);if(n===1)return k(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(k(i)){if(r=1,k(e.charCodeAt(1))){let h=2,d=h;for(;h0&&(t.root=e.slice(0,r));let s=-1,o=r,l=-1,u=!0,c=e.length-1,f=0;for(;c>=r;--c){if(i=e.charCodeAt(c),k(i)){if(!u){o=c+1;break}continue}l===-1&&(u=!1,l=c+1),i===we?s===-1?s=c:f!==1&&(f=1):s!==-1&&(f=-1)}return l!==-1&&(s===-1||f===0||f===1&&s===l-1&&s===o+1?t.base=t.name=e.slice(o,l):(t.name=e.slice(o,s),t.base=e.slice(o,l),t.ext=e.slice(s,l))),o>0&&o!==r?t.dir=e.slice(0,o-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},us=(()=>{if(Ne){let e=/\\/g;return()=>{let t=gt().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>gt()})(),te={resolve(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:us();H(i,"path"),i.length!==0&&(t=`${i}/${t}`,n=i.charCodeAt(0)===X)}return t=zt(t,!n,"/",Un),n?`/${t}`:t.length>0?t:"."},normalize(e){if(H(e,"path"),e.length===0)return".";let t=e.charCodeAt(0)===X,n=e.charCodeAt(e.length-1)===X;return e=zt(e,!t,"/",Un),e.length===0?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return H(e,"path"),e.length>0&&e.charCodeAt(0)===X},join(...e){if(e.length===0)return".";let t;for(let n=0;n0&&(t===void 0?t=r:t+=`/${r}`)}return t===void 0?".":te.normalize(t)},relative(e,t){if(H(e,"from"),H(t,"to"),e===t||(e=te.resolve(e),t=te.resolve(t),e===t))return"";let n=1,r=e.length,i=r-n,s=1,o=t.length-s,l=il){if(t.charCodeAt(s+c)===X)return t.slice(s+c+1);if(c===0)return t.slice(s+c)}else i>l&&(e.charCodeAt(n+c)===X?u=c:c===0&&(u=0));let f="";for(c=n+u+1;c<=r;++c)(c===r||e.charCodeAt(c)===X)&&(f+=f.length===0?"..":"/..");return`${f}${t.slice(s+u)}`},toNamespacedPath(e){return e},dirname(e){if(H(e,"path"),e.length===0)return".";let t=e.charCodeAt(0)===X,n=-1,r=!0;for(let i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===X){if(!r){n=i;break}}else r=!1;return n===-1?t?"/":".":t&&n===1?"//":e.slice(0,n)},basename(e,t){t!==void 0&&H(t,"ext"),H(e,"path");let n=0,r=-1,i=!0,s;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,l=-1;for(s=e.length-1;s>=0;--s){let u=e.charCodeAt(s);if(u===X){if(!i){n=s+1;break}}else l===-1&&(i=!1,l=s+1),o>=0&&(u===t.charCodeAt(o)?--o===-1&&(r=s):(o=-1,r=l))}return n===r?r=l:r===-1&&(r=e.length),e.slice(n,r)}for(s=e.length-1;s>=0;--s)if(e.charCodeAt(s)===X){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":e.slice(n,r)},extname(e){H(e,"path");let t=-1,n=0,r=-1,i=!0,s=0;for(let o=e.length-1;o>=0;--o){let l=e.charCodeAt(o);if(l===X){if(!i){n=o+1;break}continue}r===-1&&(i=!1,r=o+1),l===we?t===-1?t=o:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||r===-1||s===0||s===1&&t===r-1&&t===n+1?"":e.slice(t,r)},format:Wr.bind(null,"/"),parse(e){H(e,"path");let t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;let n=e.charCodeAt(0)===X,r;n?(t.root="/",r=1):r=0;let i=-1,s=0,o=-1,l=!0,u=e.length-1,c=0;for(;u>=r;--u){let f=e.charCodeAt(u);if(f===X){if(!l){s=u+1;break}continue}o===-1&&(l=!1,o=u+1),f===we?i===-1?i=u:c!==1&&(c=1):i!==-1&&(c=-1)}if(o!==-1){let f=s===0&&n?1:s;i===-1||c===0||c===1&&i===o-1&&i===s+1?t.base=t.name=e.slice(f,o):(t.name=e.slice(f,i),t.base=e.slice(f,o),t.ext=e.slice(i,o))}return s>0?t.dir=e.slice(0,s-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};te.win32=ee.win32=ee;te.posix=ee.posix=te;var Ho=Ne?ee.normalize:te.normalize,$o=Ne?ee.resolve:te.resolve,Go=Ne?ee.relative:te.relative,jo=Ne?ee.dirname:te.dirname,Qo=Ne?ee.basename:te.basename,Jo=Ne?ee.extname:te.extname,Xo=Ne?ee.sep:te.sep;var hs=/^\w[\w\d+.-]*$/,fs=/^\//,ds=/^\/\//;function ms(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!hs.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!fs.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(ds.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function gs(e,t){return!e&&!t?"file":e}function ps(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==ue&&(t=ue+t):t=ue;break}return t}var W="",ue="/",bs=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,Ce=class e{static isUri(t){return t instanceof e?!0:t?typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="string"&&typeof t.with=="function"&&typeof t.toString=="function":!1}constructor(t,n,r,i,s,o=!1){typeof t=="object"?(this.scheme=t.scheme||W,this.authority=t.authority||W,this.path=t.path||W,this.query=t.query||W,this.fragment=t.fragment||W):(this.scheme=gs(t,o),this.authority=n||W,this.path=ps(this.scheme,r||W),this.query=i||W,this.fragment=s||W,ms(this,o))}get fsPath(){return zn(this,!1)}with(t){if(!t)return this;let{scheme:n,authority:r,path:i,query:s,fragment:o}=t;return n===void 0?n=this.scheme:n===null&&(n=W),r===void 0?r=this.authority:r===null&&(r=W),i===void 0?i=this.path:i===null&&(i=W),s===void 0?s=this.query:s===null&&(s=W),o===void 0?o=this.fragment:o===null&&(o=W),n===this.scheme&&r===this.authority&&i===this.path&&s===this.query&&o===this.fragment?this:new Se(n,r,i,s,o)}static parse(t,n=!1){let r=bs.exec(t);return r?new Se(r[2]||W,Wt(r[4]||W),Wt(r[5]||W),Wt(r[7]||W),Wt(r[9]||W),n):new Se(W,W,W,W,W)}static file(t){let n=W;if(De&&(t=t.replace(/\\/g,ue)),t[0]===ue&&t[1]===ue){let r=t.indexOf(ue,2);r===-1?(n=t.substring(2),t=ue):(n=t.substring(2,r),t=t.substring(r)||ue)}return new Se("file",n,t,W,W)}static from(t,n){return new Se(t.scheme,t.authority,t.path,t.query,t.fragment,n)}static joinPath(t,...n){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let r;return De&&t.scheme==="file"?r=e.file(ee.join(zn(t,!0),...n)).path:r=te.join(t.path,...n),t.with({path:r})}toString(t=!1){return Wn(this,t)}toJSON(){return this}static revive(t){var n,r;if(t){if(t instanceof e)return t;{let i=new Se(t);return i._formatted=(n=t.external)!==null&&n!==void 0?n:null,i._fsPath=t._sep===$r&&(r=t.fsPath)!==null&&r!==void 0?r:null,i}}else return t}},$r=De?1:void 0,Se=class extends Ce{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=zn(this,!1)),this._fsPath}toString(t=!1){return t?Wn(this,!0):(this._formatted||(this._formatted=Wn(this,!1)),this._formatted)}toJSON(){let t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=$r),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}},Gr={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 Or(e,t,n){let r,i=-1;for(let s=0;s=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||n&&o===91||n&&o===93||n&&o===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r!==void 0&&(r+=e.charAt(s));else{r===void 0&&(r=e.substr(0,s));let l=Gr[o];l!==void 0?(i!==-1&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r+=l):i===-1&&(i=s)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r!==void 0?r:e}function xs(e){let t;for(let n=0;n1&&e.scheme==="file"?n=`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?n=e.path.substr(1):n=e.path[1].toLowerCase()+e.path.substr(2):n=e.path,De&&(n=n.replace(/\//g,"\\")),n}function Wn(e,t){let n=t?xs:Or,r="",{scheme:i,authority:s,path:o,query:l,fragment:u}=e;if(i&&(r+=i,r+=":"),(s||i==="file")&&(r+=ue,r+=ue),s){let c=s.indexOf("@");if(c!==-1){let f=s.substr(0,c);s=s.substr(c+1),c=f.lastIndexOf(":"),c===-1?r+=n(f,!1,!1):(r+=n(f.substr(0,c),!1,!1),r+=":",r+=n(f.substr(c+1),!1,!0)),r+="@"}s=s.toLowerCase(),c=s.lastIndexOf(":"),c===-1?r+=n(s,!1,!0):(r+=n(s.substr(0,c),!1,!0),r+=s.substr(c))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){let c=o.charCodeAt(1);c>=65&&c<=90&&(o=`/${String.fromCharCode(c+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){let c=o.charCodeAt(0);c>=65&&c<=90&&(o=`${String.fromCharCode(c+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return l&&(r+="?",r+=n(l,!1,!1)),u&&(r+="#",r+=t?u:Or(u,!1,!1)),r}function jr(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+jr(e.substr(3)):e}}var Hr=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Wt(e){return e.match(Hr)?e.replace(Hr,t=>jr(t)):e}var Q=class e{constructor(t,n){this.lineNumber=t,this.column=n}with(t=this.lineNumber,n=this.column){return t===this.lineNumber&&n===this.column?this:new e(t,n)}delta(t=0,n=0){return this.with(this.lineNumber+t,this.column+n)}equals(t){return e.equals(this,t)}static equals(t,n){return!t&&!n?!0:!!t&&!!n&&t.lineNumber===n.lineNumber&&t.column===n.column}isBefore(t){return e.isBefore(this,t)}static isBefore(t,n){return t.lineNumberr||t===r&&n>i?(this.startLineNumber=r,this.startColumn=i,this.endLineNumber=t,this.endColumn=n):(this.startLineNumber=t,this.startColumn=n,this.endLineNumber=r,this.endColumn=i)}isEmpty(){return e.isEmpty(this)}static isEmpty(t){return t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn}containsPosition(t){return e.containsPosition(this,t)}static containsPosition(t,n){return!(n.lineNumbert.endLineNumber||n.lineNumber===t.startLineNumber&&n.columnt.endColumn)}static strictContainsPosition(t,n){return!(n.lineNumbert.endLineNumber||n.lineNumber===t.startLineNumber&&n.column<=t.startColumn||n.lineNumber===t.endLineNumber&&n.column>=t.endColumn)}containsRange(t){return e.containsRange(this,t)}static containsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumnt.endColumn)}strictContainsRange(t){return e.strictContainsRange(this,t)}static strictContainsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumn<=t.startColumn||n.endLineNumber===t.endLineNumber&&n.endColumn>=t.endColumn)}plusRange(t){return e.plusRange(this,t)}static plusRange(t,n){let r,i,s,o;return n.startLineNumbert.endLineNumber?(s=n.endLineNumber,o=n.endColumn):n.endLineNumber===t.endLineNumber?(s=n.endLineNumber,o=Math.max(n.endColumn,t.endColumn)):(s=t.endLineNumber,o=t.endColumn),new e(r,i,s,o)}intersectRanges(t){return e.intersectRanges(this,t)}static intersectRanges(t,n){let r=t.startLineNumber,i=t.startColumn,s=t.endLineNumber,o=t.endColumn,l=n.startLineNumber,u=n.startColumn,c=n.endLineNumber,f=n.endColumn;return rc?(s=c,o=f):s===c&&(o=Math.min(o,f)),r>s||r===s&&i>o?null:new e(r,i,s,o)}equalsRange(t){return e.equalsRange(this,t)}static equalsRange(t,n){return!t&&!n?!0:!!t&&!!n&&t.startLineNumber===n.startLineNumber&&t.startColumn===n.startColumn&&t.endLineNumber===n.endLineNumber&&t.endColumn===n.endColumn}getEndPosition(){return e.getEndPosition(this)}static getEndPosition(t){return new Q(t.endLineNumber,t.endColumn)}getStartPosition(){return e.getStartPosition(this)}static getStartPosition(t){return new Q(t.startLineNumber,t.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(t,n){return new e(this.startLineNumber,this.startColumn,t,n)}setStartPosition(t,n){return new e(t,n,this.endLineNumber,this.endColumn)}collapseToStart(){return e.collapseToStart(this)}static collapseToStart(t){return new e(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}collapseToEnd(){return e.collapseToEnd(this)}static collapseToEnd(t){return new e(t.endLineNumber,t.endColumn,t.endLineNumber,t.endColumn)}delta(t){return new e(this.startLineNumber+t,this.startColumn,this.endLineNumber+t,this.endColumn)}static fromPositions(t,n=t){return new e(t.lineNumber,t.column,n.lineNumber,n.column)}static lift(t){return t?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null}static isIRange(t){return t&&typeof t.startLineNumber=="number"&&typeof t.startColumn=="number"&&typeof t.endLineNumber=="number"&&typeof t.endColumn=="number"}static areIntersectingOrTouching(t,n){return!(t.endLineNumbert.startLineNumber}toJSON(){return this}};function Qr(e,t,n=(r,i)=>r===i){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let r=0,i=e.length;r0}e.isGreaterThan=r;function i(s){return s===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(On||(On={}));function pt(e,t){return(n,r)=>t(e(n),e(r))}var bt=(e,t)=>e-t;function Kr(e){return(t,n)=>-e(t,n)}var Ot=class e{constructor(t){this.iterate=t}toArray(){let t=[];return this.iterate(n=>(t.push(n),!0)),t}filter(t){return new e(n=>this.iterate(r=>t(r)?n(r):!0))}map(t){return new e(n=>this.iterate(r=>n(t(r))))}findLast(t){let n;return this.iterate(r=>(t(r)&&(n=r),!0)),n}findLastMaxBy(t){let n,r=!0;return this.iterate(i=>((r||On.isGreaterThan(t(i,n)))&&(r=!1,n=i),!0)),n}};Ot.empty=new Ot(e=>{});function Hn(e){return e<0?0:e>255?255:e|0}function Ie(e){return e<0?0:e>4294967295?4294967295:e|0}var Ht=class{constructor(t){this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(t,n){t=Ie(t);let r=this.values,i=this.prefixSum,s=n.length;return s===0?!1:(this.values=new Uint32Array(r.length+s),this.values.set(r.subarray(0,t),0),this.values.set(r.subarray(t),t+s),this.values.set(n,t),t-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(t,n){return t=Ie(t),n=Ie(n),this.values[t]===n?!1:(this.values[t]=n,t-1=r.length)return!1;let s=r.length-t;return n>=s&&(n=s),n===0?!1:(this.values=new Uint32Array(r.length-n),this.values.set(r.subarray(0,t),0),this.values.set(r.subarray(t+n),t),this.prefixSum=new Uint32Array(this.values.length),t-1=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(t){return t<0?0:(t=Ie(t),this._getPrefixSum(t))}_getPrefixSum(t){if(t<=this.prefixSumValidIndex[0])return this.prefixSum[t];let n=this.prefixSumValidIndex[0]+1;n===0&&(this.prefixSum[0]=this.values[0],n++),t>=this.values.length&&(t=this.values.length-1);for(let r=n;r<=t;r++)this.prefixSum[r]=this.prefixSum[r-1]+this.values[r];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],t),this.prefixSum[t]}getIndexOf(t){t=Math.floor(t),this.getTotalSum();let n=0,r=this.values.length-1,i=0,s=0,o=0;for(;n<=r;)if(i=n+(r-n)/2|0,s=this.prefixSum[i],o=s-this.values[i],t=s)n=i+1;else break;return new $n(i,t-o)}};var $n=class{constructor(t,n){this.index=t,this.remainder=n,this._prefixSumIndexOfResultBrand=void 0,this.index=t,this.remainder=n}};var $t=class{constructor(t,n,r,i){this._uri=t,this._lines=n,this._eol=r,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(t){t.eol&&t.eol!==this._eol&&(this._eol=t.eol,this._lineStarts=null);let n=t.changes;for(let r of n)this._acceptDeleteRange(r.range),this._acceptInsertText(new Q(r.range.startLineNumber,r.range.startColumn),r.text);this._versionId=t.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){let t=this._eol.length,n=this._lines.length,r=new Uint32Array(n);for(let i=0;i/?";function vs(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(let n of _s)e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}var Gn=vs();function jn(e){let t=Gn;if(e&&e instanceof RegExp)if(e.global)t=e;else{let n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}var e1=new at;e1.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function xt(e,t,n,r,i){if(t=jn(t),i||(i=ze.first(e1)),n.length>i.maxLen){let c=e-i.maxLen/2;return c<0?c=0:r+=c,n=n.substring(c,e+i.maxLen/2),xt(e,t,n,r,i)}let s=Date.now(),o=e-1-r,l=-1,u=null;for(let c=1;!(Date.now()-s>=i.timeBudget);c++){let f=o-i.windowSize*c;t.lastIndex=Math.max(0,f);let h=Ls(t,n,o,l);if(!h&&u||(u=h,f<=0))break;l=f}if(u){let c={word:u[0],startColumn:r+1+u.index,endColumn:r+1+u.index+u[0].length};return t.lastIndex=0,c}return null}function Ls(e,t,n,r){let i;for(;i=e.exec(t);){let s=i.index||0;if(s<=n&&e.lastIndex>=n)return i;if(r>0&&s>r)return null}return null}var Je=class e{constructor(t){let n=Hn(t);this._defaultValue=n,this._asciiMap=e._createAsciiMap(n),this._map=new Map}static _createAsciiMap(t){let n=new Uint8Array(256);return n.fill(t),n}set(t,n){let r=Hn(n);t>=0&&t<256?this._asciiMap[t]=r:this._map.set(t,r)}get(t){return t>=0&&t<256?this._asciiMap[t]:this._map.get(t)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}};var Jn=class{constructor(t,n,r){let i=new Uint8Array(t*n);for(let s=0,o=t*n;sn&&(n=u),l>r&&(r=l),c>r&&(r=c)}n++,r++;let i=new Jn(r,n,0);for(let s=0,o=t.length;s=this._maxCharCode?0:this._states.get(t,n)}},Qn=null;function ws(){return Qn===null&&(Qn=new Xn([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),Qn}var _t=null;function Ns(){if(_t===null){_t=new Je(0);let e=` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026`;for(let n=0;ni);if(i>0){let l=n.charCodeAt(i-1),u=n.charCodeAt(o);(l===40&&u===41||l===91&&u===93||l===123&&u===125)&&o--}return{range:{startLineNumber:r,startColumn:i+1,endLineNumber:r,endColumn:o+2},url:n.substring(i,o+1)}}static computeLinks(t,n=ws()){let r=Ns(),i=[];for(let s=1,o=t.getLineCount();s<=o;s++){let l=t.getLineContent(s),u=l.length,c=0,f=0,h=0,d=1,g=!1,p=!1,m=!1,v=!1;for(;c=0?(i+=r?1:-1,i<0?i=t.length-1:i%=t.length,t[i]):null}};Xe.INSTANCE=new Xe;var n1=Object.freeze(function(e,t){let n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}),Gt;(function(e){function t(n){return n===e.None||n===e.Cancelled||n instanceof Ye?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Et.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:n1})})(Gt||(Gt={}));var Ye=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?n1:(this._emitter||(this._emitter=new Y),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},jt=class{constructor(t){this._token=void 0,this._parentListener=void 0,this._parentListener=t&&t.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new Ye),this._token}cancel(){this._token?this._token instanceof Ye&&this._token.cancel():this._token=Gt.Cancelled}dispose(t=!1){var n;t&&this.cancel(),(n=this._parentListener)===null||n===void 0||n.dispose(),this._token?this._token instanceof Ye&&this._token.dispose():this._token=Gt.None}};var vt=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(t,n){this._keyCodeToStr[t]=n,this._strToKeyCode[n.toLowerCase()]=t}keyCodeToStr(t){return this._keyCodeToStr[t]}strToKeyCode(t){return this._strToKeyCode[t.toLowerCase()]||0}},Qt=new vt,Zn=new vt,Kn=new vt,Ss=new Array(230),Cs={},As=[],Rs=Object.create(null),ys=Object.create(null),i1=[],er=[];for(let e=0;e<=193;e++)i1[e]=-1;for(let e=0;e<=132;e++)er[e]=-1;(function(){let e="",t=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",e,e],[1,1,"Hyper",0,e,0,e,e,e],[1,2,"Super",0,e,0,e,e,e],[1,3,"Fn",0,e,0,e,e,e],[1,4,"FnLock",0,e,0,e,e,e],[1,5,"Suspend",0,e,0,e,e,e],[1,6,"Resume",0,e,0,e,e,e],[1,7,"Turbo",0,e,0,e,e,e],[1,8,"Sleep",0,e,0,"VK_SLEEP",e,e],[1,9,"WakeUp",0,e,0,e,e,e],[0,10,"KeyA",31,"A",65,"VK_A",e,e],[0,11,"KeyB",32,"B",66,"VK_B",e,e],[0,12,"KeyC",33,"C",67,"VK_C",e,e],[0,13,"KeyD",34,"D",68,"VK_D",e,e],[0,14,"KeyE",35,"E",69,"VK_E",e,e],[0,15,"KeyF",36,"F",70,"VK_F",e,e],[0,16,"KeyG",37,"G",71,"VK_G",e,e],[0,17,"KeyH",38,"H",72,"VK_H",e,e],[0,18,"KeyI",39,"I",73,"VK_I",e,e],[0,19,"KeyJ",40,"J",74,"VK_J",e,e],[0,20,"KeyK",41,"K",75,"VK_K",e,e],[0,21,"KeyL",42,"L",76,"VK_L",e,e],[0,22,"KeyM",43,"M",77,"VK_M",e,e],[0,23,"KeyN",44,"N",78,"VK_N",e,e],[0,24,"KeyO",45,"O",79,"VK_O",e,e],[0,25,"KeyP",46,"P",80,"VK_P",e,e],[0,26,"KeyQ",47,"Q",81,"VK_Q",e,e],[0,27,"KeyR",48,"R",82,"VK_R",e,e],[0,28,"KeyS",49,"S",83,"VK_S",e,e],[0,29,"KeyT",50,"T",84,"VK_T",e,e],[0,30,"KeyU",51,"U",85,"VK_U",e,e],[0,31,"KeyV",52,"V",86,"VK_V",e,e],[0,32,"KeyW",53,"W",87,"VK_W",e,e],[0,33,"KeyX",54,"X",88,"VK_X",e,e],[0,34,"KeyY",55,"Y",89,"VK_Y",e,e],[0,35,"KeyZ",56,"Z",90,"VK_Z",e,e],[0,36,"Digit1",22,"1",49,"VK_1",e,e],[0,37,"Digit2",23,"2",50,"VK_2",e,e],[0,38,"Digit3",24,"3",51,"VK_3",e,e],[0,39,"Digit4",25,"4",52,"VK_4",e,e],[0,40,"Digit5",26,"5",53,"VK_5",e,e],[0,41,"Digit6",27,"6",54,"VK_6",e,e],[0,42,"Digit7",28,"7",55,"VK_7",e,e],[0,43,"Digit8",29,"8",56,"VK_8",e,e],[0,44,"Digit9",30,"9",57,"VK_9",e,e],[0,45,"Digit0",21,"0",48,"VK_0",e,e],[1,46,"Enter",3,"Enter",13,"VK_RETURN",e,e],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",e,e],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",e,e],[1,49,"Tab",2,"Tab",9,"VK_TAB",e,e],[1,50,"Space",10,"Space",32,"VK_SPACE",e,e],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,e,0,e,e,e],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",e,e],[1,64,"F1",59,"F1",112,"VK_F1",e,e],[1,65,"F2",60,"F2",113,"VK_F2",e,e],[1,66,"F3",61,"F3",114,"VK_F3",e,e],[1,67,"F4",62,"F4",115,"VK_F4",e,e],[1,68,"F5",63,"F5",116,"VK_F5",e,e],[1,69,"F6",64,"F6",117,"VK_F6",e,e],[1,70,"F7",65,"F7",118,"VK_F7",e,e],[1,71,"F8",66,"F8",119,"VK_F8",e,e],[1,72,"F9",67,"F9",120,"VK_F9",e,e],[1,73,"F10",68,"F10",121,"VK_F10",e,e],[1,74,"F11",69,"F11",122,"VK_F11",e,e],[1,75,"F12",70,"F12",123,"VK_F12",e,e],[1,76,"PrintScreen",0,e,0,e,e,e],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",e,e],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",e,e],[1,79,"Insert",19,"Insert",45,"VK_INSERT",e,e],[1,80,"Home",14,"Home",36,"VK_HOME",e,e],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",e,e],[1,82,"Delete",20,"Delete",46,"VK_DELETE",e,e],[1,83,"End",13,"End",35,"VK_END",e,e],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",e,e],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",e],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",e],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",e],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",e],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",e,e],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",e,e],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",e,e],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",e,e],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",e,e],[1,94,"NumpadEnter",3,e,0,e,e,e],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",e,e],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",e,e],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",e,e],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",e,e],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",e,e],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",e,e],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",e,e],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",e,e],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",e,e],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",e,e],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",e,e],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",e,e],[1,107,"ContextMenu",58,"ContextMenu",93,e,e,e],[1,108,"Power",0,e,0,e,e,e],[1,109,"NumpadEqual",0,e,0,e,e,e],[1,110,"F13",71,"F13",124,"VK_F13",e,e],[1,111,"F14",72,"F14",125,"VK_F14",e,e],[1,112,"F15",73,"F15",126,"VK_F15",e,e],[1,113,"F16",74,"F16",127,"VK_F16",e,e],[1,114,"F17",75,"F17",128,"VK_F17",e,e],[1,115,"F18",76,"F18",129,"VK_F18",e,e],[1,116,"F19",77,"F19",130,"VK_F19",e,e],[1,117,"F20",78,"F20",131,"VK_F20",e,e],[1,118,"F21",79,"F21",132,"VK_F21",e,e],[1,119,"F22",80,"F22",133,"VK_F22",e,e],[1,120,"F23",81,"F23",134,"VK_F23",e,e],[1,121,"F24",82,"F24",135,"VK_F24",e,e],[1,122,"Open",0,e,0,e,e,e],[1,123,"Help",0,e,0,e,e,e],[1,124,"Select",0,e,0,e,e,e],[1,125,"Again",0,e,0,e,e,e],[1,126,"Undo",0,e,0,e,e,e],[1,127,"Cut",0,e,0,e,e,e],[1,128,"Copy",0,e,0,e,e,e],[1,129,"Paste",0,e,0,e,e,e],[1,130,"Find",0,e,0,e,e,e],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",e,e],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",e,e],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",e,e],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",e,e],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",e,e],[1,136,"KanaMode",0,e,0,e,e,e],[0,137,"IntlYen",0,e,0,e,e,e],[1,138,"Convert",0,e,0,e,e,e],[1,139,"NonConvert",0,e,0,e,e,e],[1,140,"Lang1",0,e,0,e,e,e],[1,141,"Lang2",0,e,0,e,e,e],[1,142,"Lang3",0,e,0,e,e,e],[1,143,"Lang4",0,e,0,e,e,e],[1,144,"Lang5",0,e,0,e,e,e],[1,145,"Abort",0,e,0,e,e,e],[1,146,"Props",0,e,0,e,e,e],[1,147,"NumpadParenLeft",0,e,0,e,e,e],[1,148,"NumpadParenRight",0,e,0,e,e,e],[1,149,"NumpadBackspace",0,e,0,e,e,e],[1,150,"NumpadMemoryStore",0,e,0,e,e,e],[1,151,"NumpadMemoryRecall",0,e,0,e,e,e],[1,152,"NumpadMemoryClear",0,e,0,e,e,e],[1,153,"NumpadMemoryAdd",0,e,0,e,e,e],[1,154,"NumpadMemorySubtract",0,e,0,e,e,e],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",e,e],[1,156,"NumpadClearEntry",0,e,0,e,e,e],[1,0,e,5,"Ctrl",17,"VK_CONTROL",e,e],[1,0,e,4,"Shift",16,"VK_SHIFT",e,e],[1,0,e,6,"Alt",18,"VK_MENU",e,e],[1,0,e,57,"Meta",91,"VK_COMMAND",e,e],[1,157,"ControlLeft",5,e,0,"VK_LCONTROL",e,e],[1,158,"ShiftLeft",4,e,0,"VK_LSHIFT",e,e],[1,159,"AltLeft",6,e,0,"VK_LMENU",e,e],[1,160,"MetaLeft",57,e,0,"VK_LWIN",e,e],[1,161,"ControlRight",5,e,0,"VK_RCONTROL",e,e],[1,162,"ShiftRight",4,e,0,"VK_RSHIFT",e,e],[1,163,"AltRight",6,e,0,"VK_RMENU",e,e],[1,164,"MetaRight",57,e,0,"VK_RWIN",e,e],[1,165,"BrightnessUp",0,e,0,e,e,e],[1,166,"BrightnessDown",0,e,0,e,e,e],[1,167,"MediaPlay",0,e,0,e,e,e],[1,168,"MediaRecord",0,e,0,e,e,e],[1,169,"MediaFastForward",0,e,0,e,e,e],[1,170,"MediaRewind",0,e,0,e,e,e],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",e,e],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",e,e],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",e,e],[1,174,"Eject",0,e,0,e,e,e],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",e,e],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",e,e],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",e,e],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",e,e],[1,179,"LaunchApp1",0,e,0,"VK_MEDIA_LAUNCH_APP1",e,e],[1,180,"SelectTask",0,e,0,e,e,e],[1,181,"LaunchScreenSaver",0,e,0,e,e,e],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",e,e],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",e,e],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",e,e],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",e,e],[1,186,"BrowserStop",0,e,0,"VK_BROWSER_STOP",e,e],[1,187,"BrowserRefresh",0,e,0,"VK_BROWSER_REFRESH",e,e],[1,188,"BrowserFavorites",0,e,0,"VK_BROWSER_FAVORITES",e,e],[1,189,"ZoomToggle",0,e,0,e,e,e],[1,190,"MailReply",0,e,0,e,e,e],[1,191,"MailForward",0,e,0,e,e,e],[1,192,"MailSend",0,e,0,e,e,e],[1,0,e,114,"KeyInComposition",229,e,e,e],[1,0,e,116,"ABNT_C2",194,"VK_ABNT_C2",e,e],[1,0,e,96,"OEM_8",223,"VK_OEM_8",e,e],[1,0,e,0,e,0,"VK_KANA",e,e],[1,0,e,0,e,0,"VK_HANGUL",e,e],[1,0,e,0,e,0,"VK_JUNJA",e,e],[1,0,e,0,e,0,"VK_FINAL",e,e],[1,0,e,0,e,0,"VK_HANJA",e,e],[1,0,e,0,e,0,"VK_KANJI",e,e],[1,0,e,0,e,0,"VK_CONVERT",e,e],[1,0,e,0,e,0,"VK_NONCONVERT",e,e],[1,0,e,0,e,0,"VK_ACCEPT",e,e],[1,0,e,0,e,0,"VK_MODECHANGE",e,e],[1,0,e,0,e,0,"VK_SELECT",e,e],[1,0,e,0,e,0,"VK_PRINT",e,e],[1,0,e,0,e,0,"VK_EXECUTE",e,e],[1,0,e,0,e,0,"VK_SNAPSHOT",e,e],[1,0,e,0,e,0,"VK_HELP",e,e],[1,0,e,0,e,0,"VK_APPS",e,e],[1,0,e,0,e,0,"VK_PROCESSKEY",e,e],[1,0,e,0,e,0,"VK_PACKET",e,e],[1,0,e,0,e,0,"VK_DBE_SBCSCHAR",e,e],[1,0,e,0,e,0,"VK_DBE_DBCSCHAR",e,e],[1,0,e,0,e,0,"VK_ATTN",e,e],[1,0,e,0,e,0,"VK_CRSEL",e,e],[1,0,e,0,e,0,"VK_EXSEL",e,e],[1,0,e,0,e,0,"VK_EREOF",e,e],[1,0,e,0,e,0,"VK_PLAY",e,e],[1,0,e,0,e,0,"VK_ZOOM",e,e],[1,0,e,0,e,0,"VK_NONAME",e,e],[1,0,e,0,e,0,"VK_PA1",e,e],[1,0,e,0,e,0,"VK_OEM_CLEAR",e,e]],n=[],r=[];for(let i of t){let[s,o,l,u,c,f,h,d,g]=i;if(r[o]||(r[o]=!0,As[o]=l,Rs[l]=o,ys[l.toLowerCase()]=o,s&&(i1[o]=u,u!==0&&u!==3&&u!==5&&u!==4&&u!==6&&u!==57&&(er[u]=o))),!n[u]){if(n[u]=!0,!c)throw new Error(`String representation missing for key code ${u} around scan code ${l}`);Qt.define(u,c),Zn.define(u,d||c),Kn.define(u,g||d||c)}f&&(Ss[f]=u),h&&(Cs[h]=u)}er[3]=46})();var r1;(function(e){function t(l){return Qt.keyCodeToStr(l)}e.toString=t;function n(l){return Qt.strToKeyCode(l)}e.fromString=n;function r(l){return Zn.keyCodeToStr(l)}e.toUserSettingsUS=r;function i(l){return Kn.keyCodeToStr(l)}e.toUserSettingsGeneral=i;function s(l){return Zn.strToKeyCode(l)||Kn.strToKeyCode(l)}e.fromUserSettings=s;function o(l){if(l>=98&&l<=113)return null;switch(l){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return Qt.keyCodeToStr(l)}e.toElectronAccelerator=o})(r1||(r1={}));function s1(e,t){let n=(t&65535)<<16>>>0;return(e|n)>>>0}var Jt=class e extends V{constructor(t,n,r,i){super(t,n,r,i),this.selectionStartLineNumber=t,this.selectionStartColumn=n,this.positionLineNumber=r,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(t){return e.selectionsEqual(this,t)}static selectionsEqual(t,n){return t.selectionStartLineNumber===n.selectionStartLineNumber&&t.selectionStartColumn===n.selectionStartColumn&&t.positionLineNumber===n.positionLineNumber&&t.positionColumn===n.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(t,n){return this.getDirection()===0?new e(this.startLineNumber,this.startColumn,t,n):new e(t,n,this.startLineNumber,this.startColumn)}getPosition(){return new Q(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new Q(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(t,n){return this.getDirection()===0?new e(t,n,this.endLineNumber,this.endColumn):new e(this.endLineNumber,this.endColumn,t,n)}static fromPositions(t,n=t){return new e(t.lineNumber,t.column,n.lineNumber,n.column)}static fromRange(t,n){return n===0?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new e(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)}static liftSelection(t){return new e(t.selectionStartLineNumber,t.selectionStartColumn,t.positionLineNumber,t.positionColumn)}static selectionsArrEqual(t,n){if(t&&!n||!t&&n)return!1;if(!t&&!n)return!0;if(t.length!==n.length)return!1;for(let r=0,i=t.length;r{this._tokenizationSupports.get(t)===n&&(this._tokenizationSupports.delete(t),this.handleChange([t]))})}get(t){return this._tokenizationSupports.get(t)||null}registerFactory(t,n){var r;(r=this._factories.get(t))===null||r===void 0||r.dispose();let i=new tr(this,t,n);return this._factories.set(t,i),We(()=>{let s=this._factories.get(t);!s||s!==i||(this._factories.delete(t),s.dispose())})}async getOrCreate(t){let n=this.get(t);if(n)return n;let r=this._factories.get(t);return!r||r.isResolved?null:(await r.resolve(),this.get(t))}isResolved(t){if(this.get(t))return!0;let r=this._factories.get(t);return!!(!r||r.isResolved)}setColorMap(t){this._colorMap=t,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}},tr=class extends oe{get isResolved(){return this._isResolved}constructor(t,n,r){super(),this._registry=t,this._languageId=n,this._factory=r,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){let t=await this._factory.tokenizationSupport;this._isResolved=!0,t&&!this._isDisposed&&this._register(this._registry.register(this._languageId,t))}};var Yt=class{constructor(t,n,r){this.offset=t,this.type=n,this.language=r,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}};var a1;(function(e){let t=new Map;t.set(0,M.symbolMethod),t.set(1,M.symbolFunction),t.set(2,M.symbolConstructor),t.set(3,M.symbolField),t.set(4,M.symbolVariable),t.set(5,M.symbolClass),t.set(6,M.symbolStruct),t.set(7,M.symbolInterface),t.set(8,M.symbolModule),t.set(9,M.symbolProperty),t.set(10,M.symbolEvent),t.set(11,M.symbolOperator),t.set(12,M.symbolUnit),t.set(13,M.symbolValue),t.set(15,M.symbolEnum),t.set(14,M.symbolConstant),t.set(15,M.symbolEnum),t.set(16,M.symbolEnumMember),t.set(17,M.symbolKeyword),t.set(27,M.symbolSnippet),t.set(18,M.symbolText),t.set(19,M.symbolColor),t.set(20,M.symbolFile),t.set(21,M.symbolReference),t.set(22,M.symbolCustomColor),t.set(23,M.symbolFolder),t.set(24,M.symbolTypeParameter),t.set(25,M.account),t.set(26,M.issues);function n(s){let o=t.get(s);return o||(console.info("No codicon found for CompletionItemKind "+s),o=M.symbolProperty),o}e.toIcon=n;let r=new Map;r.set("method",0),r.set("function",1),r.set("constructor",2),r.set("field",3),r.set("variable",4),r.set("class",5),r.set("struct",6),r.set("interface",7),r.set("module",8),r.set("property",9),r.set("event",10),r.set("operator",11),r.set("unit",12),r.set("value",13),r.set("constant",14),r.set("enum",15),r.set("enum-member",16),r.set("enumMember",16),r.set("keyword",17),r.set("snippet",27),r.set("text",18),r.set("color",19),r.set("file",20),r.set("reference",21),r.set("customcolor",22),r.set("folder",23),r.set("type-parameter",24),r.set("typeParameter",24),r.set("account",25),r.set("issue",26);function i(s,o){let l=r.get(s);return typeof l>"u"&&!o&&(l=9),l}e.fromString=i})(a1||(a1={}));var l1;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(l1||(l1={}));var u1;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(u1||(u1={}));var c1;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(c1||(c1={}));var Ta={17:U("Array","array"),16:U("Boolean","boolean"),4:U("Class","class"),13:U("Constant","constant"),8:U("Constructor","constructor"),9:U("Enum","enumeration"),21:U("EnumMember","enumeration member"),23:U("Event","event"),7:U("Field","field"),0:U("File","file"),11:U("Function","function"),10:U("Interface","interface"),19:U("Key","key"),5:U("Method","method"),1:U("Module","module"),2:U("Namespace","namespace"),20:U("Null","null"),15:U("Number","number"),18:U("Object","object"),24:U("Operator","operator"),3:U("Package","package"),6:U("Property","property"),14:U("String","string"),22:U("Struct","struct"),25:U("TypeParameter","type parameter"),12:U("Variable","variable")};var h1;(function(e){let t=new Map;t.set(0,M.symbolFile),t.set(1,M.symbolModule),t.set(2,M.symbolNamespace),t.set(3,M.symbolPackage),t.set(4,M.symbolClass),t.set(5,M.symbolMethod),t.set(6,M.symbolProperty),t.set(7,M.symbolField),t.set(8,M.symbolConstructor),t.set(9,M.symbolEnum),t.set(10,M.symbolInterface),t.set(11,M.symbolFunction),t.set(12,M.symbolVariable),t.set(13,M.symbolConstant),t.set(14,M.symbolString),t.set(15,M.symbolNumber),t.set(16,M.symbolBoolean),t.set(17,M.symbolArray),t.set(18,M.symbolObject),t.set(19,M.symbolKey),t.set(20,M.symbolNull),t.set(21,M.symbolEnumMember),t.set(22,M.symbolStruct),t.set(23,M.symbolEvent),t.set(24,M.symbolOperator),t.set(25,M.symbolTypeParameter);function n(r){let i=t.get(r);return i||(console.info("No codicon found for SymbolKind "+r),i=M.symbolProperty),i}e.toIcon=n})(h1||(h1={}));var Ae=class e{static fromValue(t){switch(t){case"comment":return e.Comment;case"imports":return e.Imports;case"region":return e.Region}return new e(t)}constructor(t){this.value=t}};Ae.Comment=new Ae("comment");Ae.Imports=new Ae("imports");Ae.Region=new Ae("region");var f1;(function(e){function t(n){return!n||typeof n!="object"?!1:typeof n.id=="string"&&typeof n.title=="string"}e.is=t})(f1||(f1={}));var d1;(function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(d1||(d1={}));var Ba=new Xt;var m1;(function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"})(m1||(m1={}));var g1;(function(e){e[e.Invoke=1]="Invoke",e[e.Auto=2]="Auto"})(g1||(g1={}));var p1;(function(e){e[e.None=0]="None",e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"})(p1||(p1={}));var b1;(function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"})(b1||(b1={}));var x1;(function(e){e[e.Deprecated=1]="Deprecated"})(x1||(x1={}));var _1;(function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(_1||(_1={}));var v1;(function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"})(v1||(v1={}));var L1;(function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"})(L1||(L1={}));var w1;(function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(w1||(w1={}));var N1;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(N1||(N1={}));var S1;(function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"})(S1||(S1={}));var C1;(function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.ariaRequired=5]="ariaRequired",e[e.autoClosingBrackets=6]="autoClosingBrackets",e[e.autoClosingComments=7]="autoClosingComments",e[e.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",e[e.autoClosingDelete=9]="autoClosingDelete",e[e.autoClosingOvertype=10]="autoClosingOvertype",e[e.autoClosingQuotes=11]="autoClosingQuotes",e[e.autoIndent=12]="autoIndent",e[e.automaticLayout=13]="automaticLayout",e[e.autoSurround=14]="autoSurround",e[e.bracketPairColorization=15]="bracketPairColorization",e[e.guides=16]="guides",e[e.codeLens=17]="codeLens",e[e.codeLensFontFamily=18]="codeLensFontFamily",e[e.codeLensFontSize=19]="codeLensFontSize",e[e.colorDecorators=20]="colorDecorators",e[e.colorDecoratorsLimit=21]="colorDecoratorsLimit",e[e.columnSelection=22]="columnSelection",e[e.comments=23]="comments",e[e.contextmenu=24]="contextmenu",e[e.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",e[e.cursorBlinking=26]="cursorBlinking",e[e.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",e[e.cursorStyle=28]="cursorStyle",e[e.cursorSurroundingLines=29]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",e[e.cursorWidth=31]="cursorWidth",e[e.disableLayerHinting=32]="disableLayerHinting",e[e.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",e[e.domReadOnly=34]="domReadOnly",e[e.dragAndDrop=35]="dragAndDrop",e[e.dropIntoEditor=36]="dropIntoEditor",e[e.emptySelectionClipboard=37]="emptySelectionClipboard",e[e.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",e[e.extraEditorClassName=39]="extraEditorClassName",e[e.fastScrollSensitivity=40]="fastScrollSensitivity",e[e.find=41]="find",e[e.fixedOverflowWidgets=42]="fixedOverflowWidgets",e[e.folding=43]="folding",e[e.foldingStrategy=44]="foldingStrategy",e[e.foldingHighlight=45]="foldingHighlight",e[e.foldingImportsByDefault=46]="foldingImportsByDefault",e[e.foldingMaximumRegions=47]="foldingMaximumRegions",e[e.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=49]="fontFamily",e[e.fontInfo=50]="fontInfo",e[e.fontLigatures=51]="fontLigatures",e[e.fontSize=52]="fontSize",e[e.fontWeight=53]="fontWeight",e[e.fontVariations=54]="fontVariations",e[e.formatOnPaste=55]="formatOnPaste",e[e.formatOnType=56]="formatOnType",e[e.glyphMargin=57]="glyphMargin",e[e.gotoLocation=58]="gotoLocation",e[e.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",e[e.hover=60]="hover",e[e.inDiffEditor=61]="inDiffEditor",e[e.inlineSuggest=62]="inlineSuggest",e[e.letterSpacing=63]="letterSpacing",e[e.lightbulb=64]="lightbulb",e[e.lineDecorationsWidth=65]="lineDecorationsWidth",e[e.lineHeight=66]="lineHeight",e[e.lineNumbers=67]="lineNumbers",e[e.lineNumbersMinChars=68]="lineNumbersMinChars",e[e.linkedEditing=69]="linkedEditing",e[e.links=70]="links",e[e.matchBrackets=71]="matchBrackets",e[e.minimap=72]="minimap",e[e.mouseStyle=73]="mouseStyle",e[e.mouseWheelScrollSensitivity=74]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=75]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=76]="multiCursorMergeOverlapping",e[e.multiCursorModifier=77]="multiCursorModifier",e[e.multiCursorPaste=78]="multiCursorPaste",e[e.multiCursorLimit=79]="multiCursorLimit",e[e.occurrencesHighlight=80]="occurrencesHighlight",e[e.overviewRulerBorder=81]="overviewRulerBorder",e[e.overviewRulerLanes=82]="overviewRulerLanes",e[e.padding=83]="padding",e[e.pasteAs=84]="pasteAs",e[e.parameterHints=85]="parameterHints",e[e.peekWidgetDefaultFocus=86]="peekWidgetDefaultFocus",e[e.definitionLinkOpensInPeek=87]="definitionLinkOpensInPeek",e[e.quickSuggestions=88]="quickSuggestions",e[e.quickSuggestionsDelay=89]="quickSuggestionsDelay",e[e.readOnly=90]="readOnly",e[e.readOnlyMessage=91]="readOnlyMessage",e[e.renameOnType=92]="renameOnType",e[e.renderControlCharacters=93]="renderControlCharacters",e[e.renderFinalNewline=94]="renderFinalNewline",e[e.renderLineHighlight=95]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=96]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=97]="renderValidationDecorations",e[e.renderWhitespace=98]="renderWhitespace",e[e.revealHorizontalRightPadding=99]="revealHorizontalRightPadding",e[e.roundedSelection=100]="roundedSelection",e[e.rulers=101]="rulers",e[e.scrollbar=102]="scrollbar",e[e.scrollBeyondLastColumn=103]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=104]="scrollBeyondLastLine",e[e.scrollPredominantAxis=105]="scrollPredominantAxis",e[e.selectionClipboard=106]="selectionClipboard",e[e.selectionHighlight=107]="selectionHighlight",e[e.selectOnLineNumbers=108]="selectOnLineNumbers",e[e.showFoldingControls=109]="showFoldingControls",e[e.showUnused=110]="showUnused",e[e.snippetSuggestions=111]="snippetSuggestions",e[e.smartSelect=112]="smartSelect",e[e.smoothScrolling=113]="smoothScrolling",e[e.stickyScroll=114]="stickyScroll",e[e.stickyTabStops=115]="stickyTabStops",e[e.stopRenderingLineAfter=116]="stopRenderingLineAfter",e[e.suggest=117]="suggest",e[e.suggestFontSize=118]="suggestFontSize",e[e.suggestLineHeight=119]="suggestLineHeight",e[e.suggestOnTriggerCharacters=120]="suggestOnTriggerCharacters",e[e.suggestSelection=121]="suggestSelection",e[e.tabCompletion=122]="tabCompletion",e[e.tabIndex=123]="tabIndex",e[e.unicodeHighlighting=124]="unicodeHighlighting",e[e.unusualLineTerminators=125]="unusualLineTerminators",e[e.useShadowDOM=126]="useShadowDOM",e[e.useTabStops=127]="useTabStops",e[e.wordBreak=128]="wordBreak",e[e.wordSeparators=129]="wordSeparators",e[e.wordWrap=130]="wordWrap",e[e.wordWrapBreakAfterCharacters=131]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=132]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=133]="wordWrapColumn",e[e.wordWrapOverride1=134]="wordWrapOverride1",e[e.wordWrapOverride2=135]="wordWrapOverride2",e[e.wrappingIndent=136]="wrappingIndent",e[e.wrappingStrategy=137]="wrappingStrategy",e[e.showDeprecated=138]="showDeprecated",e[e.inlayHints=139]="inlayHints",e[e.editorClassName=140]="editorClassName",e[e.pixelRatio=141]="pixelRatio",e[e.tabFocusMode=142]="tabFocusMode",e[e.layoutInfo=143]="layoutInfo",e[e.wrappingInfo=144]="wrappingInfo",e[e.defaultColorDecorators=145]="defaultColorDecorators",e[e.colorDecoratorsActivatedOn=146]="colorDecoratorsActivatedOn",e[e.inlineCompletionsAccessibilityVerbose=147]="inlineCompletionsAccessibilityVerbose"})(C1||(C1={}));var A1;(function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(A1||(A1={}));var R1;(function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"})(R1||(R1={}));var y1;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"})(y1||(y1={}));var E1;(function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"})(E1||(E1={}));var M1;(function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"})(M1||(M1={}));var F1;(function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(F1||(F1={}));var k1;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(k1||(k1={}));var Zt;(function(e){e[e.DependsOnKbLayout=-1]="DependsOnKbLayout",e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.Digit0=21]="Digit0",e[e.Digit1=22]="Digit1",e[e.Digit2=23]="Digit2",e[e.Digit3=24]="Digit3",e[e.Digit4=25]="Digit4",e[e.Digit5=26]="Digit5",e[e.Digit6=27]="Digit6",e[e.Digit7=28]="Digit7",e[e.Digit8=29]="Digit8",e[e.Digit9=30]="Digit9",e[e.KeyA=31]="KeyA",e[e.KeyB=32]="KeyB",e[e.KeyC=33]="KeyC",e[e.KeyD=34]="KeyD",e[e.KeyE=35]="KeyE",e[e.KeyF=36]="KeyF",e[e.KeyG=37]="KeyG",e[e.KeyH=38]="KeyH",e[e.KeyI=39]="KeyI",e[e.KeyJ=40]="KeyJ",e[e.KeyK=41]="KeyK",e[e.KeyL=42]="KeyL",e[e.KeyM=43]="KeyM",e[e.KeyN=44]="KeyN",e[e.KeyO=45]="KeyO",e[e.KeyP=46]="KeyP",e[e.KeyQ=47]="KeyQ",e[e.KeyR=48]="KeyR",e[e.KeyS=49]="KeyS",e[e.KeyT=50]="KeyT",e[e.KeyU=51]="KeyU",e[e.KeyV=52]="KeyV",e[e.KeyW=53]="KeyW",e[e.KeyX=54]="KeyX",e[e.KeyY=55]="KeyY",e[e.KeyZ=56]="KeyZ",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.F20=78]="F20",e[e.F21=79]="F21",e[e.F22=80]="F22",e[e.F23=81]="F23",e[e.F24=82]="F24",e[e.NumLock=83]="NumLock",e[e.ScrollLock=84]="ScrollLock",e[e.Semicolon=85]="Semicolon",e[e.Equal=86]="Equal",e[e.Comma=87]="Comma",e[e.Minus=88]="Minus",e[e.Period=89]="Period",e[e.Slash=90]="Slash",e[e.Backquote=91]="Backquote",e[e.BracketLeft=92]="BracketLeft",e[e.Backslash=93]="Backslash",e[e.BracketRight=94]="BracketRight",e[e.Quote=95]="Quote",e[e.OEM_8=96]="OEM_8",e[e.IntlBackslash=97]="IntlBackslash",e[e.Numpad0=98]="Numpad0",e[e.Numpad1=99]="Numpad1",e[e.Numpad2=100]="Numpad2",e[e.Numpad3=101]="Numpad3",e[e.Numpad4=102]="Numpad4",e[e.Numpad5=103]="Numpad5",e[e.Numpad6=104]="Numpad6",e[e.Numpad7=105]="Numpad7",e[e.Numpad8=106]="Numpad8",e[e.Numpad9=107]="Numpad9",e[e.NumpadMultiply=108]="NumpadMultiply",e[e.NumpadAdd=109]="NumpadAdd",e[e.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",e[e.NumpadSubtract=111]="NumpadSubtract",e[e.NumpadDecimal=112]="NumpadDecimal",e[e.NumpadDivide=113]="NumpadDivide",e[e.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",e[e.ABNT_C1=115]="ABNT_C1",e[e.ABNT_C2=116]="ABNT_C2",e[e.AudioVolumeMute=117]="AudioVolumeMute",e[e.AudioVolumeUp=118]="AudioVolumeUp",e[e.AudioVolumeDown=119]="AudioVolumeDown",e[e.BrowserSearch=120]="BrowserSearch",e[e.BrowserHome=121]="BrowserHome",e[e.BrowserBack=122]="BrowserBack",e[e.BrowserForward=123]="BrowserForward",e[e.MediaTrackNext=124]="MediaTrackNext",e[e.MediaTrackPrevious=125]="MediaTrackPrevious",e[e.MediaStop=126]="MediaStop",e[e.MediaPlayPause=127]="MediaPlayPause",e[e.LaunchMediaPlayer=128]="LaunchMediaPlayer",e[e.LaunchMail=129]="LaunchMail",e[e.LaunchApp2=130]="LaunchApp2",e[e.Clear=131]="Clear",e[e.MAX_VALUE=132]="MAX_VALUE"})(Zt||(Zt={}));var Kt;(function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"})(Kt||(Kt={}));var en;(function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"})(en||(en={}));var D1;(function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"})(D1||(D1={}));var P1;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(P1||(P1={}));var I1;(function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"})(I1||(I1={}));var T1;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(T1||(T1={}));var B1;(function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.None=2]="None",e[e.LeftOfInjectedText=3]="LeftOfInjectedText",e[e.RightOfInjectedText=4]="RightOfInjectedText"})(B1||(B1={}));var V1;(function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"})(V1||(V1={}));var q1;(function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"})(q1||(q1={}));var U1;(function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"})(U1||(U1={}));var z1;(function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"})(z1||(z1={}));var tn;(function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"})(tn||(tn={}));var W1;(function(e){e.Off="off",e.OnCode="onCode",e.On="on"})(W1||(W1={}));var O1;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(O1||(O1={}));var H1;(function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"})(H1||(H1={}));var $1;(function(e){e[e.Deprecated=1]="Deprecated"})($1||($1={}));var G1;(function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"})(G1||(G1={}));var j1;(function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"})(j1||(j1={}));var Q1;(function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(Q1||(Q1={}));var J1;(function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"})(J1||(J1={}));var Te=class{static chord(t,n){return s1(t,n)}};Te.CtrlCmd=2048;Te.Shift=1024;Te.Alt=512;Te.WinCtrl=256;function X1(){return{editor:void 0,languages:void 0,CancellationTokenSource:jt,Emitter:Y,KeyCode:Zt,KeyMod:Te,Position:Q,Range:V,Selection:Jt,SelectionDirection:tn,MarkerSeverity:Kt,MarkerTag:en,Uri:Ce,Token:Yt}}var nr=class extends Je{constructor(t){super(0);for(let n=0,r=t.length;n(t.hasOwnProperty(n)||(t[n]=e(n)),t[n])}var Fs=Ms(e=>new nr(e));var Y1;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(Y1||(Y1={}));var Z1;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"})(Z1||(Z1={}));var K1;(function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"})(K1||(K1={}));var ei;(function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"})(ei||(ei={}));function ks(e,t,n,r,i){if(r===0)return!0;let s=t.charCodeAt(r-1);if(e.get(s)!==0||s===13||s===10)return!0;if(i>0){let o=t.charCodeAt(r);if(e.get(o)!==0)return!0}return!1}function Ds(e,t,n,r,i){if(r+i===n)return!0;let s=t.charCodeAt(r+i);if(e.get(s)!==0||s===13||s===10)return!0;if(i>0){let o=t.charCodeAt(r+i-1);if(e.get(o)!==0)return!0}return!1}function Ps(e,t,n,r,i){return ks(e,t,n,r,i)&&Ds(e,t,n,r,i)}var nn=class{constructor(t,n){this._wordSeparators=t,this._searchRegex=n,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(t){this._searchRegex.lastIndex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(t){let n=t.length,r;do{if(this._prevMatchStartIndex+this._prevMatchLength===n||(r=this._searchRegex.exec(t),!r))return null;let i=r.index,s=r[0].length;if(i===this._prevMatchStartIndex&&s===this._prevMatchLength){if(s===0){kr(t,n,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=i,this._prevMatchLength=s,!this._wordSeparators||Ps(this._wordSeparators,t,n,i,s))return r}while(r);return null}};function ti(e,t="Unreachable"){throw new Error(t)}function Ze(e){if(!e()){debugger;e(),yt(new ie("Assertion Failed"))}}function rn(e,t){let n=0;for(;n0){let q=S.charCodeAt(L-1);je(q)&&L--}if(_+1=1e3){h=!0;break e}f.push(new V(v,L+1,v,_+1))}}while(d)}return{ranges:f,hasMore:h,ambiguousCharacterCount:g,invisibleCharacterCount:p,nonBasicAsciiCharacterCount:m}}static computeUnicodeHighlightReason(t,n){let r=new on(n);switch(r.shouldHighlightNonBasicASCII(t,null)){case 0:return null;case 2:return{kind:1};case 3:{let s=t.codePointAt(0),o=r.ambiguousCharacters.getPrimaryConfusable(s),l=he.getLocales().filter(u=>!he.getInstance(new Set([...n.allowedLocales,u])).isAmbiguous(s));return{kind:0,confusableWith:String.fromCodePoint(o),notAmbiguousInLocales:l}}case 1:return{kind:2}}}};function Is(e,t){return`[${yr(e.map(r=>String.fromCodePoint(r)).join(""))}]`}var on=class{constructor(t){this.options=t,this.allowedCodePoints=new Set(t.allowedCodePoints),this.ambiguousCharacters=he.getInstance(new Set(t.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";let t=new Set;if(this.options.invisibleCharacters)for(let n of Pe.codePoints)ni(String.fromCodePoint(n))||t.add(n);if(this.options.ambiguousCharacters)for(let n of this.ambiguousCharacters.getConfusableCodePoints())t.add(n);for(let n of this.allowedCodePoints)t.delete(n);return t}shouldHighlightNonBasicASCII(t,n){let r=t.codePointAt(0);if(this.allowedCodePoints.has(r))return 0;if(this.options.nonBasicASCII)return 1;let i=!1,s=!1;if(n)for(let o of n){let l=o.codePointAt(0),u=Dr(o);i=i||u,!u&&!this.ambiguousCharacters.isAmbiguous(l)&&!Pe.isInvisibleCharacter(l)&&(s=!0)}return!i&&s?0:this.options.invisibleCharacters&&!ni(t)&&Pe.isInvisibleCharacter(r)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(r)?3:0}};function ni(e){return e===" "||e===` +`||e===" "}var Re=class{constructor(t,n,r){this.changes=t,this.moves=n,this.hitTimeout=r}},an=class{constructor(t,n){this.lineRangeMapping=t,this.changes=n}};var P=class e{static addRange(t,n){let r=0;for(;rn)throw new ie(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(t){return new e(this.start+t,this.endExclusive+t)}deltaStart(t){return new e(this.start+t,this.endExclusive)}deltaEnd(t){return new e(this.start,this.endExclusive+t)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(t){return this.start<=t&&t=t.endExclusive}slice(t){return t.slice(this.start,this.endExclusive)}clip(t){if(this.isEmpty)throw new ie(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,t))}clipCyclic(t){if(this.isEmpty)throw new ie(`Invalid clipping range: ${this.toString()}`);return t=this.endExclusive?this.start+(t-this.start)%this.length:t}forEach(t){for(let n=this.start;nn)throw new ie(`startLineNumber ${t} cannot be after endLineNumberExclusive ${n}`);this.startLineNumber=t,this.endLineNumberExclusive=n}contains(t){return this.startLineNumber<=t&&ti.endLineNumberExclusive>=t.startLineNumber),r=Be(this._normalizedRanges,i=>i.startLineNumber<=t.endLineNumberExclusive)+1;if(n===r)this._normalizedRanges.splice(n,0,t);else if(n===r-1){let i=this._normalizedRanges[n];this._normalizedRanges[n]=i.join(t)}else{let i=this._normalizedRanges[n].join(this._normalizedRanges[r-1]).join(t);this._normalizedRanges.splice(n,r-n,i)}}contains(t){let n=pe(this._normalizedRanges,r=>r.startLineNumber<=t);return!!n&&n.endLineNumberExclusive>t}intersects(t){let n=pe(this._normalizedRanges,r=>r.startLineNumbert.startLineNumber}getUnion(t){if(this._normalizedRanges.length===0)return t;if(t._normalizedRanges.length===0)return this;let n=[],r=0,i=0,s=null;for(;r=o.startLineNumber?s=new I(s.startLineNumber,Math.max(s.endLineNumberExclusive,o.endLineNumberExclusive)):(n.push(s),s=o)}return s!==null&&n.push(s),new e(n)}subtractFrom(t){let n=ln(this._normalizedRanges,o=>o.endLineNumberExclusive>=t.startLineNumber),r=Be(this._normalizedRanges,o=>o.startLineNumber<=t.endLineNumberExclusive)+1;if(n===r)return new e([t]);let i=[],s=t.startLineNumber;for(let o=n;os&&i.push(new I(s,l.startLineNumber)),s=l.endLineNumberExclusive}return st.toString()).join(", ")}getIntersection(t){let n=[],r=0,i=0;for(;rn.delta(t)))}};var ye=class e{static inverse(t,n,r){let i=[],s=1,o=1;for(let u of t){let c=new e(new I(s,u.original.startLineNumber),new I(o,u.modified.startLineNumber));c.modified.isEmpty||i.push(c),s=u.original.endLineNumberExclusive,o=u.modified.endLineNumberExclusive}let l=new e(new I(s,n+1),new I(o,r+1));return l.modified.isEmpty||i.push(l),i}static clip(t,n,r){let i=[];for(let s of t){let o=s.original.intersect(n),l=s.modified.intersect(r);o&&!o.isEmpty&&l&&!l.isEmpty&&i.push(new e(o,l))}return i}constructor(t,n){this.original=t,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new e(this.modified,this.original)}join(t){return new e(this.original.join(t.original),this.modified.join(t.modified))}},be=class e extends ye{constructor(t,n,r){super(t,n),this.innerChanges=r}flip(){var t;return new e(this.modified,this.original,(t=this.innerChanges)===null||t===void 0?void 0:t.map(n=>n.flip()))}},qe=class e{constructor(t,n){this.originalRange=t,this.modifiedRange=n}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new e(this.modifiedRange,this.originalRange)}};var Ts=3,un=class{computeDiff(t,n,r){var i;let o=new ir(t,n,{maxComputationTime:r.maxComputationTimeMs,shouldIgnoreTrimWhitespace:r.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),l=[],u=null;for(let c of o.changes){let f;c.originalEndLineNumber===0?f=new I(c.originalStartLineNumber+1,c.originalStartLineNumber+1):f=new I(c.originalStartLineNumber,c.originalEndLineNumber+1);let h;c.modifiedEndLineNumber===0?h=new I(c.modifiedStartLineNumber+1,c.modifiedStartLineNumber+1):h=new I(c.modifiedStartLineNumber,c.modifiedEndLineNumber+1);let d=new be(f,h,(i=c.charChanges)===null||i===void 0?void 0:i.map(g=>new qe(new V(g.originalStartLineNumber,g.originalStartColumn,g.originalEndLineNumber,g.originalEndColumn),new V(g.modifiedStartLineNumber,g.modifiedStartColumn,g.modifiedEndLineNumber,g.modifiedEndColumn))));u&&(u.modified.endLineNumberExclusive===d.modified.startLineNumber||u.original.endLineNumberExclusive===d.original.startLineNumber)&&(d=new be(u.original.join(d.original),u.modified.join(d.modified),u.innerChanges&&d.innerChanges?u.innerChanges.concat(d.innerChanges):void 0),l.pop()),l.push(d),u=d}return Ze(()=>rn(l,(c,f)=>f.original.startLineNumber-c.original.endLineNumberExclusive===f.modified.startLineNumber-c.modified.endLineNumberExclusive&&c.original.endLineNumberExclusive(t===10?"\\n":String.fromCharCode(t))+`-(${this._lineNumbers[n]},${this._columns[n]})`).join(", ")+"]"}_assertIndex(t,n){if(t<0||t>=n.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(t){return t>0&&t===this._lineNumbers.length?this.getEndLineNumber(t-1):(this._assertIndex(t,this._lineNumbers),this._lineNumbers[t])}getEndLineNumber(t){return t===-1?this.getStartLineNumber(t+1):(this._assertIndex(t,this._lineNumbers),this._charCodes[t]===10?this._lineNumbers[t]+1:this._lineNumbers[t])}getStartColumn(t){return t>0&&t===this._columns.length?this.getEndColumn(t-1):(this._assertIndex(t,this._columns),this._columns[t])}getEndColumn(t){return t===-1?this.getStartColumn(t+1):(this._assertIndex(t,this._columns),this._charCodes[t]===10?1:this._columns[t]+1)}},et=class e{constructor(t,n,r,i,s,o,l,u){this.originalStartLineNumber=t,this.originalStartColumn=n,this.originalEndLineNumber=r,this.originalEndColumn=i,this.modifiedStartLineNumber=s,this.modifiedStartColumn=o,this.modifiedEndLineNumber=l,this.modifiedEndColumn=u}static createFromDiffChange(t,n,r){let i=n.getStartLineNumber(t.originalStart),s=n.getStartColumn(t.originalStart),o=n.getEndLineNumber(t.originalStart+t.originalLength-1),l=n.getEndColumn(t.originalStart+t.originalLength-1),u=r.getStartLineNumber(t.modifiedStart),c=r.getStartColumn(t.modifiedStart),f=r.getEndLineNumber(t.modifiedStart+t.modifiedLength-1),h=r.getEndColumn(t.modifiedStart+t.modifiedLength-1);return new e(i,s,o,l,u,c,f,h)}};function Bs(e){if(e.length<=1)return e;let t=[e[0]],n=t[0];for(let r=1,i=e.length;r0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&s()){let g=r.createCharSequence(t,n.originalStart,n.originalStart+n.originalLength-1),p=i.createCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);if(g.getElements().length>0&&p.getElements().length>0){let m=si(g,p,s,!0).changes;l&&(m=Bs(m)),d=[];for(let v=0,N=m.length;v1&&m>1;){let v=d.charCodeAt(p-2),N=g.charCodeAt(m-2);if(v!==N)break;p--,m--}(p>1||m>1)&&this._pushTrimWhitespaceCharChange(i,s+1,1,p,o+1,1,m)}{let p=or(d,1),m=or(g,1),v=d.length+1,N=g.length+1;for(;p!0;let t=Date.now();return()=>Date.now()-t{r.push(e.fromOffsetPairs(i?i.getEndExclusives():re.zero,s?s.getStarts():new re(n,(i?i.seq2Range.endExclusive-i.seq1Range.endExclusive:0)+n)))}),r}static fromOffsetPairs(t,n){return new e(new P(t.offset1,n.offset1),new P(t.offset2,n.offset2))}constructor(t,n){this.seq1Range=t,this.seq2Range=n}swap(){return new e(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(t){return new e(this.seq1Range.join(t.seq1Range),this.seq2Range.join(t.seq2Range))}delta(t){return t===0?this:new e(this.seq1Range.delta(t),this.seq2Range.delta(t))}deltaStart(t){return t===0?this:new e(this.seq1Range.deltaStart(t),this.seq2Range.deltaStart(t))}deltaEnd(t){return t===0?this:new e(this.seq1Range.deltaEnd(t),this.seq2Range.deltaEnd(t))}intersect(t){let n=this.seq1Range.intersect(t.seq1Range),r=this.seq2Range.intersect(t.seq2Range);if(!(!n||!r))return new e(n,r)}getStarts(){return new re(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new re(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}},re=class e{constructor(t,n){this.offset1=t,this.offset2=n}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(t){return t===0?this:new e(this.offset1+t,this.offset2+t)}equals(t){return this.offset1===t.offset1&&this.offset2===t.offset2}};re.zero=new re(0,0);re.max=new re(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);var de=class{isValid(){return!0}};de.instance=new de;var hn=class{constructor(t){if(this.timeout=t,this.startTime=Date.now(),this.valid=!0,t<=0)throw new ie("timeout must be positive")}isValid(){if(!(Date.now()-this.startTime0&&m>0&&o.get(p-1,m-1)===3&&(S+=l.get(p-1,m-1)),S+=i?i(p,m):1):S=-1;let b=Math.max(v,N,S);if(b===S){let L=p>0&&m>0?l.get(p-1,m-1):0;l.set(p,m,L+1),o.set(p,m,3)}else b===v?(l.set(p,m,0),o.set(p,m,1)):b===N&&(l.set(p,m,0),o.set(p,m,2));s.set(p,m,b)}let u=[],c=t.length,f=n.length;function h(p,m){(p+1!==c||m+1!==f)&&u.push(new $(new P(p+1,c),new P(m+1,f))),c=p,f=m}let d=t.length-1,g=n.length-1;for(;d>=0&&g>=0;)o.get(d,g)===3?(h(d,g),d--,g--):o.get(d,g)===1?d--:g--;return h(-1,-1),u.reverse(),new fe(u,!1)}};var rt=class{compute(t,n,r=de.instance){if(t.length===0||n.length===0)return fe.trivial(t,n);let i=t,s=n;function o(m,v){for(;mi.length||_>s.length)continue;let A=o(L,_);u.set(f,A);let y=L===S?c.get(f+1):c.get(f-1);if(c.set(f,A!==L?new dn(y,L,_,A-L):y),u.get(f)===i.length&&u.get(f)-f===s.length)break e}}let h=c.get(f),d=[],g=i.length,p=s.length;for(;;){let m=h?h.x+h.length:0,v=h?h.y+h.length:0;if((m!==g||v!==p)&&d.push(new $(new P(m,g),new P(v,p))),!h)break;g=h.x,p=h.y,h=h.prev}return d.reverse(),new fe(d,!1)}},dn=class{constructor(t,n,r,i){this.prev=t,this.x=n,this.y=r,this.length=i}},ar=class{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(t){return t<0?(t=-t-1,this.negativeArr[t]):this.positiveArr[t]}set(t,n){if(t<0){if(t=-t-1,t>=this.negativeArr.length){let r=this.negativeArr;this.negativeArr=new Int32Array(r.length*2),this.negativeArr.set(r)}this.negativeArr[t]=n}else{if(t>=this.positiveArr.length){let r=this.positiveArr;this.positiveArr=new Int32Array(r.length*2),this.positiveArr.set(r)}this.positiveArr[t]=n}}},lr=class{constructor(){this.positiveArr=[],this.negativeArr=[]}get(t){return t<0?(t=-t-1,this.negativeArr[t]):this.positiveArr[t]}set(t,n){t<0?(t=-t-1,this.negativeArr[t]=n):this.positiveArr[t]=n}};var oi,ai,ur=class{constructor(t,n){this.uri=t,this.value=n}};function Vs(e){return Array.isArray(e)}var cr=class e{constructor(t,n){if(this[oi]="ResourceMap",t instanceof e)this.map=new Map(t.map),this.toKey=n??e.defaultToKey;else if(Vs(t)){this.map=new Map,this.toKey=n??e.defaultToKey;for(let[r,i]of t)this.set(r,i)}else this.map=new Map,this.toKey=t??e.defaultToKey}set(t,n){return this.map.set(this.toKey(t),new ur(t,n)),this}get(t){var n;return(n=this.map.get(this.toKey(t)))===null||n===void 0?void 0:n.value}has(t){return this.map.has(this.toKey(t))}get size(){return this.map.size}clear(){this.map.clear()}delete(t){return this.map.delete(this.toKey(t))}forEach(t,n){typeof n<"u"&&(t=t.bind(n));for(let[r,i]of this.map)t(i.value,i.uri,this)}*values(){for(let t of this.map.values())yield t.value}*keys(){for(let t of this.map.values())yield t.uri}*entries(){for(let t of this.map.values())yield[t.uri,t.value]}*[(oi=Symbol.toStringTag,Symbol.iterator)](){for(let[,t]of this.map)yield[t.uri,t.value]}};cr.defaultToKey=e=>e.toString();var li=class{constructor(){this[ai]="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(){var t;return(t=this._head)===null||t===void 0?void 0:t.value}get last(){var t;return(t=this._tail)===null||t===void 0?void 0:t.value}has(t){return this._map.has(t)}get(t,n=0){let r=this._map.get(t);if(r)return n!==0&&this.touch(r,n),r.value}set(t,n,r=0){let i=this._map.get(t);if(i)i.value=n,r!==0&&this.touch(i,r);else{switch(i={key:t,value:n,next:void 0,previous:void 0},r){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(t,i),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,i=this._head;for(;i;){if(n?t.bind(n)(i.value,i.key,this):t(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let t=this,n=this._state,r=this._head,i={[Symbol.iterator](){return i},next(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){let s={value:r.key,done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}values(){let t=this,n=this._state,r=this._head,i={[Symbol.iterator](){return i},next(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){let s={value:r.value,done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}entries(){let t=this,n=this._state,r=this._head,i={[Symbol.iterator](){return i},next(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){let s={value:[r.key,r.value],done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}[(ai=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==1&&n!==2)){if(n===1){if(t===this._head)return;let r=t.next,i=t.previous;t===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===2){if(t===this._tail)return;let r=t.next,i=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}};var mn=class{constructor(){this.map=new Map}add(t,n){let r=this.map.get(t);r||(r=new Set,this.map.set(t,r)),r.add(n)}delete(t,n){let r=this.map.get(t);r&&(r.delete(n),r.size===0&&this.map.delete(t))}forEach(t,n){let r=this.map.get(t);r&&r.forEach(n)}get(t){let n=this.map.get(t);return n||new Set}};var Ee=class{constructor(t,n,r){this.lines=t,this.considerWhitespaceChanges=r,this.elements=[],this.firstCharOffsetByLine=[],this.additionalOffsetByLine=[];let i=!1;n.start>0&&n.endExclusive>=t.length&&(n=new P(n.start-1,n.endExclusive),i=!0),this.lineRange=n,this.firstCharOffsetByLine[0]=0;for(let s=this.lineRange.start;sString.fromCharCode(n)).join("")}getElement(t){return this.elements[t]}get length(){return this.elements.length}getBoundaryScore(t){let n=ci(t>0?this.elements[t-1]:-1),r=ci(tr<=t);return new Q(this.lineRange.start+n+1,t-this.firstCharOffsetByLine[n]+this.additionalOffsetByLine[n]+1)}translateRange(t){return V.fromPositions(this.translateOffset(t.start),this.translateOffset(t.endExclusive))}findWordContaining(t){if(t<0||t>=this.elements.length||!hr(this.elements[t]))return;let n=t;for(;n>0&&hr(this.elements[n-1]);)n--;let r=t;for(;ro<=t.start))!==null&&n!==void 0?n:0,s=(r=ri(this.firstCharOffsetByLine,o=>t.endExclusive<=o))!==null&&r!==void 0?r:this.elements.length;return new P(i,s)}};function hr(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}var qs={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function ui(e){return qs[e]}function ci(e){return e===10?8:e===13?7:wt(e)?6:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:e===-1?3:e===44||e===59?5:4}function fi(e,t,n,r,i,s){let{moves:o,excludedChanges:l}=zs(e,t,n,s);if(!s.isValid())return[];let u=e.filter(f=>!l.has(f)),c=Ws(u,r,i,t,n,s);return Zr(o,c),o=Os(o),o=o.filter(f=>{let h=f.original.toOffsetRange().slice(t).map(g=>g.trim());return h.join(` +`).length>=15&&Us(h,g=>g.length>=2)>=2}),o=Hs(e,o),o}function Us(e,t){let n=0;for(let r of e)t(r)&&n++;return n}function zs(e,t,n,r){let i=[],s=e.filter(u=>u.modified.isEmpty&&u.original.length>=3).map(u=>new nt(u.original,t,u)),o=new Set(e.filter(u=>u.original.isEmpty&&u.modified.length>=3).map(u=>new nt(u.modified,n,u))),l=new Set;for(let u of s){let c=-1,f;for(let h of o){let d=u.computeSimilarity(h);d>c&&(c=d,f=h)}if(c>.9&&f&&(o.delete(f),i.push(new ye(u.range,f.range)),l.add(u.source),l.add(f.source)),!r.isValid())return{moves:i,excludedChanges:l}}return{moves:i,excludedChanges:l}}function Ws(e,t,n,r,i,s){let o=[],l=new mn;for(let d of e)for(let g=d.original.startLineNumber;gd.modified.startLineNumber,bt));for(let d of e){let g=[];for(let p=d.modified.startLineNumber;p{for(let L of g)if(L.originalLineRange.endLineNumberExclusive+1===S.endLineNumberExclusive&&L.modifiedLineRange.endLineNumberExclusive+1===v.endLineNumberExclusive){L.originalLineRange=new I(L.originalLineRange.startLineNumber,S.endLineNumberExclusive),L.modifiedLineRange=new I(L.modifiedLineRange.startLineNumber,v.endLineNumberExclusive),N.push(L);return}let b={modifiedLineRange:v,originalLineRange:S};u.push(b),N.push(b)}),g=N}if(!s.isValid())return[]}u.sort(Kr(pt(d=>d.modifiedLineRange.length,bt)));let c=new Ve,f=new Ve;for(let d of u){let g=d.modifiedLineRange.startLineNumber-d.originalLineRange.startLineNumber,p=c.subtractFrom(d.modifiedLineRange),m=f.subtractFrom(d.originalLineRange).getWithDelta(g),v=p.getIntersection(m);for(let N of v.ranges){if(N.length<3)continue;let S=N,b=N.delta(-g);o.push(new ye(b,S)),c.addRange(S),f.addRange(b)}}o.sort(pt(d=>d.original.startLineNumber,bt));let h=new Ke(e);for(let d=0;dA.original.startLineNumber<=g.original.startLineNumber),m=pe(e,A=>A.modified.startLineNumber<=g.modified.startLineNumber),v=Math.max(g.original.startLineNumber-p.original.startLineNumber,g.modified.startLineNumber-m.modified.startLineNumber),N=h.findLastMonotonous(A=>A.original.startLineNumberA.modified.startLineNumberr.length||y>i.length||c.contains(y)||f.contains(A)||!hi(r[A-1],i[y-1],s))break}L>0&&(f.addRange(new I(g.original.startLineNumber-L,g.original.startLineNumber)),c.addRange(new I(g.modified.startLineNumber-L,g.modified.startLineNumber)));let _;for(_=0;_r.length||y>i.length||c.contains(y)||f.contains(A)||!hi(r[A-1],i[y-1],s))break}_>0&&(f.addRange(new I(g.original.endLineNumberExclusive,g.original.endLineNumberExclusive+_)),c.addRange(new I(g.modified.endLineNumberExclusive,g.modified.endLineNumberExclusive+_))),(L>0||_>0)&&(o[d]=new ye(new I(g.original.startLineNumber-L,g.original.endLineNumberExclusive+_),new I(g.modified.startLineNumber-L,g.modified.endLineNumberExclusive+_)))}return o}function hi(e,t,n){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;let i=new rt().compute(new Ee([e],new P(0,1),!1),new Ee([t],new P(0,1),!1),n),s=0,o=$.invert(i.diffs,e.length);for(let f of o)f.seq1Range.forEach(h=>{wt(e.charCodeAt(h))||s++});function l(f){let h=0;for(let d=0;dt.length?e:t);return s/u>.6&&u>10}function Os(e){if(e.length===0)return e;e.sort(pt(n=>n.original.startLineNumber,bt));let t=[e[0]];for(let n=1;n=0&&o>=0&&s+o<=2){t[t.length-1]=r.join(i);continue}t.push(i)}return t}function Hs(e,t){let n=new Ke(e);return t=t.filter(r=>{let i=n.findLastMonotonous(l=>l.original.startLineNumberl.modified.startLineNumber0&&(l=l.delta(c))}i.push(l)}return r.length>0&&i.push(r[r.length-1]),i}function $s(e,t,n){if(!e.getBoundaryScore||!t.getBoundaryScore)return n;for(let r=0;r0?n[r-1]:void 0,s=n[r],o=r+1=r.start&&e.seq2Range.start-o>=i.start&&n.isStronglyEqual(e.seq2Range.start-o,e.seq2Range.endExclusive-o)&&o<100;)o++;o--;let l=0;for(;e.seq1Range.start+lc&&(c=p,u=f)}return e.delta(u)}function gi(e,t,n){let r=[];for(let i of n){let s=r[r.length-1];if(!s){r.push(i);continue}i.seq1Range.start-s.seq1Range.endExclusive<=2||i.seq2Range.start-s.seq2Range.endExclusive<=2?r[r.length-1]=new $(s.seq1Range.join(i.seq1Range),s.seq2Range.join(i.seq2Range)):r.push(i)}return r}function pi(e,t,n){let r=$.invert(n,e.length),i=[],s=new re(0,0);function o(u,c){if(u.offset10;){let v=r[0];if(!(v.seq1Range.intersects(f)||v.seq2Range.intersects(h)))break;let S=e.findWordContaining(v.seq1Range.start),b=t.findWordContaining(v.seq2Range.start),L=new $(S,b),_=L.intersect(v);if(p+=_.seq1Range.length,m+=_.seq2Range.length,d=d.join(L),d.seq1Range.endExclusive>=v.seq1Range.endExclusive)r.shift();else break}p+m<(d.seq1Range.length+d.seq2Range.length)*2/3&&i.push(d),s=d.getEndExclusives()}for(;r.length>0;){let u=r.shift();u.seq1Range.isEmpty||(o(u.getStarts(),u),o(u.getEndExclusives().delta(-1),u))}return Gs(n,i)}function Gs(e,t){let n=[];for(;e.length>0||t.length>0;){let r=e[0],i=t[0],s;r&&(!i||r.seq1Range.start0&&n[n.length-1].seq1Range.endExclusive>=s.seq1Range.start?n[n.length-1]=n[n.length-1].join(s):n.push(s)}return n}function bi(e,t,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;let o=[r[0]];for(let l=1;l5||g.seq1Range.length+g.seq2Range.length>5)},u=r[l],c=o[o.length-1];f(c,u)?(s=!0,o[o.length-1]=o[o.length-1].join(u)):o.push(u)}r=o}while(i++<10&&s);return r}function xi(e,t,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;let l=[r[0]];for(let u=1;u5||m.length>500)return!1;let N=e.getText(m).trim();if(N.length>20||N.split(/\r\n|\r|\n/).length>1)return!1;let S=e.countLinesIn(g.seq1Range),b=g.seq1Range.length,L=t.countLinesIn(g.seq2Range),_=g.seq2Range.length,A=e.countLinesIn(p.seq1Range),y=p.seq1Range.length,E=t.countLinesIn(p.seq2Range),q=p.seq2Range.length,j=2*40+50;function T(x){return Math.min(x,j)}return Math.pow(Math.pow(T(S*40+b),1.5)+Math.pow(T(L*40+_),1.5),1.5)+Math.pow(Math.pow(T(A*40+y),1.5)+Math.pow(T(E*40+q),1.5),1.5)>(j**1.5)**1.5*1.3},c=r[u],f=l[l.length-1];h(f,c)?(s=!0,l[l.length-1]=l[l.length-1].join(c)):l.push(c)}r=l}while(i++<10&&s);let o=[];return Yr(r,(l,u,c)=>{let f=u;function h(N){return N.length>0&&N.trim().length<=3&&u.seq1Range.length+u.seq2Range.length>100}let d=e.extendToFullLines(u.seq1Range),g=e.getText(new P(d.start,u.seq1Range.start));h(g)&&(f=f.deltaStart(-g.length));let p=e.getText(new P(u.seq1Range.endExclusive,d.endExclusive));h(p)&&(f=f.deltaEnd(p.length));let m=$.fromOffsetPairs(l?l.getEndExclusives():re.zero,c?c.getStarts():re.max),v=f.intersect(m);o.length>0&&v.getStarts().equals(o[o.length-1].getEndExclusives())?o[o.length-1]=o[o.length-1].join(v):o.push(v)}),o}var Nt=class{constructor(t,n){this.trimmedHash=t,this.lines=n}getElement(t){return this.trimmedHash[t]}get length(){return this.trimmedHash.length}getBoundaryScore(t){let n=t===0?0:_i(this.lines[t-1]),r=t===this.lines.length?0:_i(this.lines[t]);return 1e3-(n+r)}getText(t){return this.lines.slice(t.start,t.endExclusive).join(` +`)}isStronglyEqual(t,n){return this.lines[t]===this.lines[n]}};function _i(e){let t=0;for(;t_===A))return new Re([],[],!1);if(t.length===1&&t[0].length===0||n.length===1&&n[0].length===0)return new Re([new be(new I(1,t.length+1),new I(1,n.length+1),[new qe(new V(1,1,t.length,t[0].length+1),new V(1,1,n.length,n[0].length+1))])],[],!1);let i=r.maxComputationTimeMs===0?de.instance:new hn(r.maxComputationTimeMs),s=!r.ignoreTrimWhitespace,o=new Map;function l(_){let A=o.get(_);return A===void 0&&(A=o.size,o.set(_,A)),A}let u=t.map(_=>l(_.trim())),c=n.map(_=>l(_.trim())),f=new Nt(u,t),h=new Nt(c,n),d=f.length+h.length<1700?this.dynamicProgrammingDiffing.compute(f,h,i,(_,A)=>t[_]===n[A]?n[A].length===0?.1:1+Math.log(1+n[A].length):.99):this.myersDiffingAlgorithm.compute(f,h),g=d.diffs,p=d.hitTimeout;g=fr(f,h,g),g=bi(f,h,g);let m=[],v=_=>{if(s)for(let A=0;A<_;A++){let y=N+A,E=S+A;if(t[y]!==n[E]){let q=this.refineDiff(t,n,new $(new P(y,y+1),new P(E,E+1)),i,s);for(let j of q.mappings)m.push(j);q.hitTimeout&&(p=!0)}}},N=0,S=0;for(let _ of g){Ze(()=>_.seq1Range.start-N===_.seq2Range.start-S);let A=_.seq1Range.start-N;v(A),N=_.seq1Range.endExclusive,S=_.seq2Range.endExclusive;let y=this.refineDiff(t,n,_,i,s);y.hitTimeout&&(p=!0);for(let E of y.mappings)m.push(E)}v(t.length-N);let b=vi(m,t,n),L=[];return r.computeMoves&&(L=this.computeMoves(b,t,n,u,c,i,s)),Ze(()=>{function _(y,E){if(y.lineNumber<1||y.lineNumber>E.length)return!1;let q=E[y.lineNumber-1];return!(y.column<1||y.column>q.length+1)}function A(y,E){return!(y.startLineNumber<1||y.startLineNumber>E.length+1||y.endLineNumberExclusive<1||y.endLineNumberExclusive>E.length+1)}for(let y of b){if(!y.innerChanges)return!1;for(let E of y.innerChanges)if(!(_(E.modifiedRange.getStartPosition(),n)&&_(E.modifiedRange.getEndPosition(),n)&&_(E.originalRange.getStartPosition(),t)&&_(E.originalRange.getEndPosition(),t)))return!1;if(!A(y.modified,n)||!A(y.original,t))return!1}return!0}),new Re(b,L,p)}computeMoves(t,n,r,i,s,o,l){return fi(t,n,r,i,s,o).map(f=>{let h=this.refineDiff(n,r,new $(f.original.toOffsetRange(),f.modified.toOffsetRange()),o,l),d=vi(h.mappings,n,r,!0);return new an(f,d)})}refineDiff(t,n,r,i,s){let o=new Ee(t,r.seq1Range,s),l=new Ee(n,r.seq2Range,s),u=o.length+l.length<500?this.dynamicProgrammingDiffing.compute(o,l,i):this.myersDiffingAlgorithm.compute(o,l,i),c=u.diffs;return c=fr(o,l,c),c=pi(o,l,c),c=gi(o,l,c),c=xi(o,l,c),{mappings:c.map(h=>new qe(o.translateRange(h.seq1Range),l.translateRange(h.seq2Range))),hitTimeout:u.hitTimeout}}};function vi(e,t,n,r=!1){let i=[];for(let s of Jr(e.map(o=>js(o,t,n)),(o,l)=>o.original.overlapOrTouch(l.original)||o.modified.overlapOrTouch(l.modified))){let o=s[0],l=s[s.length-1];i.push(new be(o.original.join(l.original),o.modified.join(l.modified),s.map(u=>u.innerChanges[0])))}return Ze(()=>!r&&i.length>0&&i[0].original.startLineNumber!==i[0].modified.startLineNumber?!1:rn(i,(s,o)=>o.original.startLineNumber-s.original.endLineNumberExclusive===o.modified.startLineNumber-s.modified.endLineNumberExclusive&&s.original.endLineNumberExclusive=n[e.modifiedRange.startLineNumber-1].length&&e.originalRange.startColumn-1>=t[e.originalRange.startLineNumber-1].length&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+i&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+i&&(r=1);let s=new I(e.originalRange.startLineNumber+r,e.originalRange.endLineNumber+1+i),o=new I(e.modifiedRange.startLineNumber+r,e.modifiedRange.endLineNumber+1+i);return new be(s,o,[e])}var dr={getLegacy:()=>new un,getDefault:()=>new gn};function Me(e,t){let n=Math.pow(10,t);return Math.round(e*n)/n}var G=class{constructor(t,n,r,i=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,t))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,r))|0,this.a=Me(Math.max(Math.min(1,i),0),3)}static equals(t,n){return t.r===n.r&&t.g===n.g&&t.b===n.b&&t.a===n.a}},me=class e{constructor(t,n,r,i){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=Me(Math.max(Math.min(1,n),0),3),this.l=Me(Math.max(Math.min(1,r),0),3),this.a=Me(Math.max(Math.min(1,i),0),3)}static equals(t,n){return t.h===n.h&&t.s===n.s&&t.l===n.l&&t.a===n.a}static fromRGBA(t){let n=t.r/255,r=t.g/255,i=t.b/255,s=t.a,o=Math.max(n,r,i),l=Math.min(n,r,i),u=0,c=0,f=(l+o)/2,h=o-l;if(h>0){switch(c=Math.min(f<=.5?h/(2*f):h/(2-2*f),1),o){case n:u=(r-i)/h+(r1&&(r-=1),r<1/6?t+(n-t)*6*r:r<1/2?n:r<2/3?t+(n-t)*(2/3-r)*6:t}static toRGBA(t){let n=t.h/360,{s:r,l:i,a:s}=t,o,l,u;if(r===0)o=l=u=i;else{let c=i<.5?i*(1+r):i+r-i*r,f=2*i-c;o=e._hue2rgb(f,c,n+1/3),l=e._hue2rgb(f,c,n),u=e._hue2rgb(f,c,n-1/3)}return new G(Math.round(o*255),Math.round(l*255),Math.round(u*255),s)}},it=class e{constructor(t,n,r,i){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=Me(Math.max(Math.min(1,n),0),3),this.v=Me(Math.max(Math.min(1,r),0),3),this.a=Me(Math.max(Math.min(1,i),0),3)}static equals(t,n){return t.h===n.h&&t.s===n.s&&t.v===n.v&&t.a===n.a}static fromRGBA(t){let n=t.r/255,r=t.g/255,i=t.b/255,s=Math.max(n,r,i),o=Math.min(n,r,i),l=s-o,u=s===0?0:l/s,c;return l===0?c=0:s===n?c=((r-i)/l%6+6)%6:s===r?c=(i-n)/l+2:c=(n-r)/l+4,new e(Math.round(c*60),u,s,t.a)}static toRGBA(t){let{h:n,s:r,v:i,a:s}=t,o=i*r,l=o*(1-Math.abs(n/60%2-1)),u=i-o,[c,f,h]=[0,0,0];return n<60?(c=o,f=l):n<120?(c=l,f=o):n<180?(f=o,h=l):n<240?(f=l,h=o):n<300?(c=l,h=o):n<=360&&(c=o,h=l),c=Math.round((c+u)*255),f=Math.round((f+u)*255),h=Math.round((h+u)*255),new G(c,f,h,s)}},O=class e{static fromHex(t){return e.Format.CSS.parseHex(t)||e.red}static equals(t,n){return!t&&!n?!0:!t||!n?!1:t.equals(n)}get hsla(){return this._hsla?this._hsla:me.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:it.fromRGBA(this.rgba)}constructor(t){if(t)if(t instanceof G)this.rgba=t;else if(t instanceof me)this._hsla=t,this.rgba=me.toRGBA(t);else if(t instanceof it)this._hsva=t,this.rgba=it.toRGBA(t);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(t){return!!t&&G.equals(this.rgba,t.rgba)&&me.equals(this.hsla,t.hsla)&&it.equals(this.hsva,t.hsva)}getRelativeLuminance(){let t=e._relativeLuminanceForComponent(this.rgba.r),n=e._relativeLuminanceForComponent(this.rgba.g),r=e._relativeLuminanceForComponent(this.rgba.b),i=.2126*t+.7152*n+.0722*r;return Me(i,4)}static _relativeLuminanceForComponent(t){let n=t/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(t){let n=this.getRelativeLuminance(),r=t.getRelativeLuminance();return n>r}isDarkerThan(t){let n=this.getRelativeLuminance(),r=t.getRelativeLuminance();return n0)for(let i of r){let s=i.filter(c=>c!==void 0),o=s[1],l=s[2];if(!l)continue;let u;if(o==="rgb"){let c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;u=Li(St(e,i),Ct(l,c),!1)}else if(o==="rgba"){let c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;u=Li(St(e,i),Ct(l,c),!0)}else if(o==="hsl"){let c=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;u=wi(St(e,i),Ct(l,c),!1)}else if(o==="hsla"){let c=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;u=wi(St(e,i),Ct(l,c),!0)}else o==="#"&&(u=Qs(St(e,i),o+l));u&&t.push(u)}return t}function Si(e){return!e||typeof e.getValue!="function"||typeof e.positionAt!="function"?[]:Js(e)}var gr=class extends $t{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(t){let n=[];for(let r=0;rthis._lines.length)n=this._lines.length,r=this._lines[n-1].length+1,i=!0;else{let s=this._lines[n-1].length+1;r<1?(r=1,i=!0):r>s&&(r=s,i=!0)}return i?{lineNumber:n,column:r}:t}},st=class e{constructor(t,n){this._host=t,this._models=Object.create(null),this._foreignModuleFactory=n,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(t){return this._models[t]}_getModels(){let t=[];return Object.keys(this._models).forEach(n=>t.push(this._models[n])),t}acceptNewModel(t){this._models[t.url]=new gr(Ce.parse(t.url),t.lines,t.EOL,t.versionId)}acceptModelChanged(t,n){if(!this._models[t])return;this._models[t].onEvents(n)}acceptRemovedModel(t){this._models[t]&&delete this._models[t]}async computeUnicodeHighlights(t,n,r){let i=this._getModel(t);return i?sn.computeUnicodeHighlights(i,n,r):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async computeDiff(t,n,r,i){let s=this._getModel(t),o=this._getModel(n);return!s||!o?null:e.computeDiff(s,o,r,i)}static computeDiff(t,n,r,i){let s=i==="advanced"?dr.getDefault():dr.getLegacy(),o=t.getLinesContent(),l=n.getLinesContent(),u=s.computeDiff(o,l,r),c=u.changes.length>0?!1:this._modelsAreIdentical(t,n);function f(h){return h.map(d=>{var g;return[d.original.startLineNumber,d.original.endLineNumberExclusive,d.modified.startLineNumber,d.modified.endLineNumberExclusive,(g=d.innerChanges)===null||g===void 0?void 0:g.map(p=>[p.originalRange.startLineNumber,p.originalRange.startColumn,p.originalRange.endLineNumber,p.originalRange.endColumn,p.modifiedRange.startLineNumber,p.modifiedRange.startColumn,p.modifiedRange.endLineNumber,p.modifiedRange.endColumn])]})}return{identical:c,quitEarly:u.hitTimeout,changes:f(u.changes),moves:u.moves.map(h=>[h.lineRangeMapping.original.startLineNumber,h.lineRangeMapping.original.endLineNumberExclusive,h.lineRangeMapping.modified.startLineNumber,h.lineRangeMapping.modified.endLineNumberExclusive,f(h.changes)])}}static _modelsAreIdentical(t,n){let r=t.getLineCount(),i=n.getLineCount();if(r!==i)return!1;for(let s=1;s<=r;s++){let o=t.getLineContent(s),l=n.getLineContent(s);if(o!==l)return!1}return!0}async computeMoreMinimalEdits(t,n,r){let i=this._getModel(t);if(!i)return n;let s=[],o;n=n.slice(0).sort((u,c)=>{if(u.range&&c.range)return V.compareRangesUsingStarts(u.range,c.range);let f=u.range?0:1,h=c.range?0:1;return f-h});let l=0;for(let u=1;ue._diffLimit){s.push({range:u,text:c});continue}let d=qr(h,c,r),g=i.offsetAt(V.lift(u).getStartPosition());for(let p of d){let m=i.positionAt(g+p.originalStart),v=i.positionAt(g+p.originalStart+p.originalLength),N={text:c.substr(p.modifiedStart,p.modifiedLength),range:{startLineNumber:m.lineNumber,startColumn:m.column,endLineNumber:v.lineNumber,endColumn:v.column}};i.getValueInRange(N.range)!==N.text&&s.push(N)}}return typeof o=="number"&&s.push({eol:o,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),s}async computeLinks(t){let n=this._getModel(t);return n?t1(n):null}async computeDefaultDocumentColors(t){let n=this._getModel(t);return n?Si(n):null}async textualSuggest(t,n,r,i){let s=new Oe,o=new RegExp(r,i),l=new Set;e:for(let u of t){let c=this._getModel(u);if(c){for(let f of c.words(o))if(!(f===n||!isNaN(Number(f)))&&(l.add(f),l.size>e._suggestionsLimit))break e}}return{words:Array.from(l),duration:s.elapsed()}}async computeWordRanges(t,n,r,i){let s=this._getModel(t);if(!s)return Object.create(null);let o=new RegExp(r,i),l=Object.create(null);for(let u=n.startLineNumber;uthis._host.fhr(l,u)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(o,n),Promise.resolve(ct(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(t,n){if(!this._foreignModule||typeof this._foreignModule[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._foreignModule[t].apply(this._foreignModule,n))}catch(r){return Promise.reject(r)}}};st._diffLimit=1e5;st._suggestionsLimit=1e4;typeof importScripts=="function"&&(globalThis.monaco=X1());var pr=!1;function Xs(e){if(pr)return;pr=!0;let t=new Bt(n=>{globalThis.postMessage(n)},n=>new st(n,e));globalThis.onmessage=n=>{t.onmessage(n.data)}}globalThis.onmessage=e=>{pr||Xs(null)};})(); diff --git a/src/lib/vs/language/css/css.worker.js b/src/lib/vs/language/css/css.worker.js index 4e16ad8..bd8ebd3 100644 --- a/src/lib/vs/language/css/css.worker.js +++ b/src/lib/vs/language/css/css.worker.js @@ -1,49633 +1,82 @@ -(() => { - // node_modules/monaco-editor/esm/vs/base/common/errors.js - var ErrorHandler = class { - constructor() { - this.listeners = []; - this.unexpectedErrorHandler = function(e) { - setTimeout(() => { - if (e.stack) { - if (ErrorNoTelemetry.isErrorNoTelemetry(e)) { - throw new ErrorNoTelemetry(e.message + "\n\n" + e.stack); - } - throw new Error(e.message + "\n\n" + e.stack); - } - throw e; - }, 0); - }; - } - emit(e) { - this.listeners.forEach((listener) => { - listener(e); - }); - } - onUnexpectedError(e) { - this.unexpectedErrorHandler(e); - this.emit(e); - } - // For external errors, we don't want the listeners to be called - onUnexpectedExternalError(e) { - this.unexpectedErrorHandler(e); - } - }; - var errorHandler = new ErrorHandler(); - function onUnexpectedError(e) { - if (!isCancellationError(e)) { - errorHandler.onUnexpectedError(e); - } - return void 0; - } - function transformErrorForSerialization(error) { - if (error instanceof Error) { - const { name, message } = error; - const stack = error.stacktrace || error.stack; - return { - $isError: true, - name, - message, - stack, - noTelemetry: ErrorNoTelemetry.isErrorNoTelemetry(error) - }; - } - return error; - } - var canceledName = "Canceled"; - function isCancellationError(error) { - if (error instanceof CancellationError) { - return true; - } - return error instanceof Error && error.name === canceledName && error.message === canceledName; - } - var CancellationError = class extends Error { - constructor() { - super(canceledName); - this.name = this.message; - } - }; - var ErrorNoTelemetry = class _ErrorNoTelemetry extends Error { - constructor(msg) { - super(msg); - this.name = "CodeExpectedError"; - } - static fromError(err) { - if (err instanceof _ErrorNoTelemetry) { - return err; - } - const result = new _ErrorNoTelemetry(); - result.message = err.message; - result.stack = err.stack; - return result; - } - static isErrorNoTelemetry(err) { - return err.name === "CodeExpectedError"; - } - }; - var BugIndicatingError = class _BugIndicatingError extends Error { - constructor(message) { - super(message || "An unexpected bug occurred."); - Object.setPrototypeOf(this, _BugIndicatingError.prototype); - } - }; +(()=>{var wi=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?yn.isErrorNoTelemetry(e)?new yn(e.message+` - // node_modules/monaco-editor/esm/vs/base/common/functional.js - function createSingleCallFunction(fn, fnDidRunCallback) { - const _this = this; - let didCall = false; - let result; - return function() { - if (didCall) { - return result; - } - didCall = true; - if (fnDidRunCallback) { - try { - result = fn.apply(_this, arguments); - } finally { - fnDidRunCallback(); - } - } else { - result = fn.apply(_this, arguments); - } - return result; - }; - } +`+e.stack):new Error(e.message+` - // node_modules/monaco-editor/esm/vs/base/common/iterator.js - var Iterable; - (function(Iterable2) { - function is(thing) { - return thing && typeof thing === "object" && typeof thing[Symbol.iterator] === "function"; - } - Iterable2.is = is; - const _empty2 = Object.freeze([]); - function empty() { - return _empty2; - } - Iterable2.empty = empty; - function* single(element) { - yield element; - } - Iterable2.single = single; - function wrap(iterableOrElement) { - if (is(iterableOrElement)) { - return iterableOrElement; - } else { - return single(iterableOrElement); - } - } - Iterable2.wrap = wrap; - function from(iterable) { - return iterable || _empty2; - } - Iterable2.from = from; - function* reverse(array) { - for (let i = array.length - 1; i >= 0; i--) { - yield array[i]; - } - } - Iterable2.reverse = reverse; - function isEmpty(iterable) { - return !iterable || iterable[Symbol.iterator]().next().done === true; - } - Iterable2.isEmpty = isEmpty; - function first(iterable) { - return iterable[Symbol.iterator]().next().value; - } - Iterable2.first = first; - function some(iterable, predicate) { - for (const element of iterable) { - if (predicate(element)) { - return true; - } - } - return false; - } - Iterable2.some = some; - function find(iterable, predicate) { - for (const element of iterable) { - if (predicate(element)) { - return element; - } - } - return void 0; - } - Iterable2.find = find; - function* filter(iterable, predicate) { - for (const element of iterable) { - if (predicate(element)) { - yield element; - } - } - } - Iterable2.filter = filter; - function* map(iterable, fn) { - let index = 0; - for (const element of iterable) { - yield fn(element, index++); - } - } - Iterable2.map = map; - function* concat(...iterables) { - for (const iterable of iterables) { - yield* iterable; - } - } - Iterable2.concat = concat; - function reduce(iterable, reducer, initialValue) { - let value = initialValue; - for (const element of iterable) { - value = reducer(value, element); - } - return value; - } - Iterable2.reduce = reduce; - function* slice(arr, from2, to = arr.length) { - if (from2 < 0) { - from2 += arr.length; - } - if (to < 0) { - to += arr.length; - } else if (to > arr.length) { - to = arr.length; - } - for (; from2 < to; from2++) { - yield arr[from2]; - } - } - Iterable2.slice = slice; - function consume(iterable, atMost = Number.POSITIVE_INFINITY) { - const consumed = []; - if (atMost === 0) { - return [consumed, iterable]; - } - const iterator = iterable[Symbol.iterator](); - for (let i = 0; i < atMost; i++) { - const next = iterator.next(); - if (next.done) { - return [consumed, Iterable2.empty()]; - } - consumed.push(next.value); - } - return [consumed, { [Symbol.iterator]() { - return iterator; - } }]; - } - Iterable2.consume = consume; - async function asyncToArray(iterable) { - const result = []; - for await (const item of iterable) { - result.push(item); - } - return Promise.resolve(result); - } - Iterable2.asyncToArray = asyncToArray; - })(Iterable || (Iterable = {})); +`+e.stack):e},0)}}emit(e){this.listeners.forEach(n=>{n(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},zh=new wi;function lr(t){Ph(t)||zh.onUnexpectedError(t)}function _i(t){if(t instanceof Error){let{name:e,message:n}=t,r=t.stacktrace||t.stack;return{$isError:!0,name:e,message:n,stack:r,noTelemetry:yn.isErrorNoTelemetry(t)}}return t}var xi="Canceled";function Ph(t){return t instanceof Si?!0:t instanceof Error&&t.name===xi&&t.message===xi}var Si=class extends Error{constructor(){super(xi),this.name=this.message}};var yn=class t extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof t)return e;let n=new t;return n.message=e.message,n.stack=e.stack,n}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}},Te=class t extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,t.prototype)}};function Ci(t,e){let n=this,r=!1,i;return function(){if(r)return i;if(r=!0,e)try{i=t.apply(n,arguments)}finally{e()}else i=t.apply(n,arguments);return i}}var Vt;(function(t){function e(w){return w&&typeof w=="object"&&typeof w[Symbol.iterator]=="function"}t.is=e;let n=Object.freeze([]);function r(){return n}t.empty=r;function*i(w){yield w}t.single=i;function s(w){return e(w)?w:i(w)}t.wrap=s;function o(w){return w||n}t.from=o;function*a(w){for(let C=w.length-1;C>=0;C--)yield w[C]}t.reverse=a;function l(w){return!w||w[Symbol.iterator]().next().done===!0}t.isEmpty=l;function c(w){return w[Symbol.iterator]().next().value}t.first=c;function h(w,C){for(let R of w)if(C(R))return!0;return!1}t.some=h;function d(w,C){for(let R of w)if(C(R))return R}t.find=d;function*f(w,C){for(let R of w)C(R)&&(yield R)}t.filter=f;function*m(w,C){let R=0;for(let z of w)yield C(z,R++)}t.map=m;function*b(...w){for(let C of w)yield*C}t.concat=b;function g(w,C,R){let z=R;for(let O of w)z=C(z,O);return z}t.reduce=g;function*y(w,C,R=w.length){for(C<0&&(C+=w.length),R<0?R+=w.length:R>w.length&&(R=w.length);C{e[t]||console.log(n)},3e3)}setParent(e,n){if(e&&e!==We.None)try{e[t]=!0}catch{}}markAsDisposed(e){if(e&&e!==We.None)try{e[t]=!0}catch{}}markAsSingleton(e){}})}function Ei(t){return Oe?.trackDisposable(t),t}function Fi(t){Oe?.markAsDisposed(t)}function ki(t,e){Oe?.setParent(t,e)}function Oh(t,e){if(Oe)for(let n of t)Oe.setParent(n,e)}function _o(t){if(Vt.is(t)){let e=[];for(let n of t)if(n)try{n.dispose()}catch(r){e.push(r)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function Co(...t){let e=qt(()=>_o(t));return Oh(t,e),e}function qt(t){let e=Ei({dispose:Ci(()=>{Fi(e),t()})});return e}var Dt=class t{constructor(){this._toDispose=new Set,this._isDisposed=!1,Ei(this)}dispose(){this._isDisposed||(Fi(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{_o(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return ki(e,this),this._isDisposed?t.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}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),ki(e,null))}};Dt.DISABLE_DISPOSED_WARNING=!1;var We=class{constructor(){this._store=new Dt,Ei(this),ki(this._store,this)}dispose(){Fi(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};We.None=Object.freeze({dispose(){}});var le=class t{constructor(e){this.element=e,this.next=t.Undefined,this.prev=t.Undefined}};le.Undefined=new le(void 0);var wn=class{constructor(){this._first=le.Undefined,this._last=le.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===le.Undefined}clear(){let e=this._first;for(;e!==le.Undefined;){let n=e.next;e.prev=le.Undefined,e.next=le.Undefined,e=n}this._first=le.Undefined,this._last=le.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,n){let r=new le(e);if(this._first===le.Undefined)this._first=r,this._last=r;else if(n){let s=this._last;this._last=r,r.prev=s,s.next=r}else{let s=this._first;this._first=r,r.next=s,s.prev=r}this._size+=1;let i=!1;return()=>{i||(i=!0,this._remove(r))}}shift(){if(this._first!==le.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==le.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==le.Undefined&&e.next!==le.Undefined){let n=e.prev;n.next=e.next,e.next.prev=n}else e.prev===le.Undefined&&e.next===le.Undefined?(this._first=le.Undefined,this._last=le.Undefined):e.next===le.Undefined?(this._last=this._last.prev,this._last.next=le.Undefined):e.prev===le.Undefined&&(this._first=this._first.next,this._first.prev=le.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==le.Undefined;)yield e.element,e=e.next}};var Wh=globalThis.performance&&typeof globalThis.performance.now=="function",jt=class t{static create(e){return new t(e)}constructor(e){this._now=Wh&&e===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}};var ko=!1,Uh=!1,cr;(function(t){t.None=()=>We.None;function e(A){if(Uh){let{onDidAddListener:M}=A,P=Sn.create(),I=0;A.onDidAddListener=()=>{++I===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),P.print()),M?.()}}}function n(A,M){return f(A,()=>{},0,void 0,!0,void 0,M)}t.defer=n;function r(A){return(M,P=null,I)=>{let W=!1,k;return k=A(x=>{if(!W)return k?k.dispose():W=!0,M.call(P,x)},null,I),W&&k.dispose(),k}}t.once=r;function i(A,M,P){return h((I,W=null,k)=>A(x=>I.call(W,M(x)),null,k),P)}t.map=i;function s(A,M,P){return h((I,W=null,k)=>A(x=>{M(x),I.call(W,x)},null,k),P)}t.forEach=s;function o(A,M,P){return h((I,W=null,k)=>A(x=>M(x)&&I.call(W,x),null,k),P)}t.filter=o;function a(A){return A}t.signal=a;function l(...A){return(M,P=null,I)=>{let W=Co(...A.map(k=>k(x=>M.call(P,x))));return d(W,I)}}t.any=l;function c(A,M,P,I){let W=P;return i(A,k=>(W=M(W,k),W),I)}t.reduce=c;function h(A,M){let P,I={onWillAddFirstListener(){P=A(W.fire,W)},onDidRemoveLastListener(){P?.dispose()}};M||e(I);let W=new _e(I);return M?.add(W),W.event}function d(A,M){return M instanceof Array?M.push(A):M&&M.add(A),A}function f(A,M,P=100,I=!1,W=!1,k,x){let D,N,H,X=0,Q,ze={leakWarningThreshold:k,onWillAddFirstListener(){D=A(De=>{X++,N=M(N,De),I&&!H&&(pe.fire(N),N=void 0),Q=()=>{let rt=N;N=void 0,H=void 0,(!I||X>1)&&pe.fire(rt),X=0},typeof P=="number"?(clearTimeout(H),H=setTimeout(Q,P)):H===void 0&&(H=0,queueMicrotask(Q))})},onWillRemoveListener(){W&&X>0&&Q?.()},onDidRemoveLastListener(){Q=void 0,D.dispose()}};x||e(ze);let pe=new _e(ze);return x?.add(pe),pe.event}t.debounce=f;function m(A,M=0,P){return t.debounce(A,(I,W)=>I?(I.push(W),I):[W],M,void 0,!0,void 0,P)}t.accumulate=m;function b(A,M=(I,W)=>I===W,P){let I=!0,W;return o(A,k=>{let x=I||!M(k,W);return I=!1,W=k,x},P)}t.latch=b;function g(A,M,P){return[t.filter(A,M,P),t.filter(A,I=>!M(I),P)]}t.split=g;function y(A,M=!1,P=[],I){let W=P.slice(),k=A(N=>{W?W.push(N):D.fire(N)});I&&I.add(k);let x=()=>{W?.forEach(N=>D.fire(N)),W=null},D=new _e({onWillAddFirstListener(){k||(k=A(N=>D.fire(N)),I&&I.add(k))},onDidAddFirstListener(){W&&(M?setTimeout(x):x())},onDidRemoveLastListener(){k&&k.dispose(),k=null}});return I&&I.add(D),D.event}t.buffer=y;function _(A,M){return(I,W,k)=>{let x=M(new w);return A(function(D){let N=x.evaluate(D);N!==E&&I.call(W,N)},void 0,k)}}t.chain=_;let E=Symbol("HaltChainable");class w{constructor(){this.steps=[]}map(M){return this.steps.push(M),this}forEach(M){return this.steps.push(P=>(M(P),P)),this}filter(M){return this.steps.push(P=>M(P)?P:E),this}reduce(M,P){let I=P;return this.steps.push(W=>(I=M(I,W),I)),this}latch(M=(P,I)=>P===I){let P=!0,I;return this.steps.push(W=>{let k=P||!M(W,I);return P=!1,I=W,k?W:E}),this}evaluate(M){for(let P of this.steps)if(M=P(M),M===E)break;return M}}function C(A,M,P=I=>I){let I=(...D)=>x.fire(P(...D)),W=()=>A.on(M,I),k=()=>A.removeListener(M,I),x=new _e({onWillAddFirstListener:W,onDidRemoveLastListener:k});return x.event}t.fromNodeEventEmitter=C;function R(A,M,P=I=>I){let I=(...D)=>x.fire(P(...D)),W=()=>A.addEventListener(M,I),k=()=>A.removeEventListener(M,I),x=new _e({onWillAddFirstListener:W,onDidRemoveLastListener:k});return x.event}t.fromDOMEventEmitter=R;function z(A){return new Promise(M=>r(A)(M))}t.toPromise=z;function O(A){let M=new _e;return A.then(P=>{M.fire(P)},()=>{M.fire(void 0)}).finally(()=>{M.dispose()}),M.event}t.fromPromise=O;function T(A,M,P){return M(P),A(I=>M(I))}t.runAndSubscribe=T;class G{constructor(M,P){this._observable=M,this._counter=0,this._hasChanged=!1;let I={onWillAddFirstListener:()=>{M.addObserver(this)},onDidRemoveLastListener:()=>{M.removeObserver(this)}};P||e(I),this.emitter=new _e(I),P&&P.add(this.emitter)}beginUpdate(M){this._counter++}handlePossibleChange(M){}handleChange(M,P){this._hasChanged=!0}endUpdate(M){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function re(A,M){return new G(A,M).emitter.event}t.fromObservable=re;function J(A){return(M,P,I)=>{let W=0,k=!1,x={beginUpdate(){W++},endUpdate(){W--,W===0&&(A.reportChanges(),k&&(k=!1,M.call(P)))},handlePossibleChange(){},handleChange(){k=!0}};A.addObserver(x),A.reportChanges();let D={dispose(){A.removeObserver(x)}};return I instanceof Dt?I.add(D):Array.isArray(I)&&I.push(D),D}}t.fromObservableLight=J})(cr||(cr={}));var xn=class t{constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${t._idPool++}`,t.all.add(this)}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}}};xn.all=new Set;xn._idPool=0;var Eo=-1,Ri=class{constructor(e,n=Math.random().toString(18).slice(2,5)){this.threshold=e,this.name=n,this._warnCountdown=0}dispose(){var e;(e=this._stacks)===null||e===void 0||e.clear()}check(e,n){let r=this.threshold;if(r<=0||n{let s=this._stacks.get(e.value)||0;this._stacks.set(e.value,s-1)}}},Sn=class t{static create(){var e;return new t((e=new Error().stack)!==null&&e!==void 0?e:"")}constructor(e){this.value=e}print(){console.warn(this.value.split(` +`).slice(2).join(` +`))}},$t=class{constructor(e){this.value=e}},Bh=2,Vh=(t,e)=>{if(t instanceof $t)e(t);else for(let n=0;n0||!((n=this._options)===null||n===void 0)&&n.leakWarningThreshold?new Ri((i=(r=this._options)===null||r===void 0?void 0:r.leakWarningThreshold)!==null&&i!==void 0?i:Eo):void 0,this._perfMon=!((s=this._options)===null||s===void 0)&&s._profName?new xn(this._options._profName):void 0,this._deliveryQueue=(o=this._options)===null||o===void 0?void 0:o.deliveryQueue}dispose(){var e,n,r,i;if(!this._disposed){if(this._disposed=!0,((e=this._deliveryQueue)===null||e===void 0?void 0:e.current)===this&&this._deliveryQueue.reset(),this._listeners){if(ko){let s=this._listeners;queueMicrotask(()=>{Vh(s,o=>{var a;return(a=o.stack)===null||a===void 0?void 0:a.print()})})}this._listeners=void 0,this._size=0}(r=(n=this._options)===null||n===void 0?void 0:n.onDidRemoveLastListener)===null||r===void 0||r.call(n),(i=this._leakageMon)===null||i===void 0||i.dispose()}}get event(){var e;return(e=this._event)!==null&&e!==void 0||(this._event=(n,r,i)=>{var s,o,a,l,c;if(this._leakageMon&&this._size>this._leakageMon.threshold*3)return console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`),We.None;if(this._disposed)return We.None;r&&(n=n.bind(r));let h=new $t(n),d,f;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(h.stack=Sn.create(),d=this._leakageMon.check(h.stack,this._size+1)),ko&&(h.stack=f??Sn.create()),this._listeners?this._listeners instanceof $t?((c=this._deliveryQueue)!==null&&c!==void 0||(this._deliveryQueue=new Di),this._listeners=[this._listeners,h]):this._listeners.push(h):((o=(s=this._options)===null||s===void 0?void 0:s.onWillAddFirstListener)===null||o===void 0||o.call(s,this),this._listeners=h,(l=(a=this._options)===null||a===void 0?void 0:a.onDidAddFirstListener)===null||l===void 0||l.call(a,this)),this._size++;let m=qt(()=>{d?.(),this._removeListener(h)});return i instanceof Dt?i.add(m):Array.isArray(i)&&i.push(m),m}),this._event}_removeListener(e){var n,r,i,s;if((r=(n=this._options)===null||n===void 0?void 0:n.onWillRemoveListener)===null||r===void 0||r.call(n,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(s=(i=this._options)===null||i===void 0?void 0:i.onDidRemoveLastListener)===null||s===void 0||s.call(i,this),this._size=0;return}let o=this._listeners,a=o.indexOf(e);if(a===-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--,o[a]=void 0;let l=this._deliveryQueue.current===this;if(this._size*Bh<=o.length){let c=0;for(let h=0;h0}};var Di=class{constructor(){this.i=-1,this.end=0}enqueue(e,n,r){this.i=0,this.end=r,this.current=e,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}};function Fo(t){return typeof t=="string"}function qh(t){let e=[];for(;Object.prototype!==t;)e=e.concat(Object.getOwnPropertyNames(t)),t=Object.getPrototypeOf(t);return e}function _n(t){let e=[];for(let n of qh(t))typeof t[n]=="function"&&e.push(n);return e}function Ro(t,e){let n=i=>function(){let s=Array.prototype.slice.call(arguments,0);return e(i,s)},r={};for(let i of t)r[i]=n(i);return r}var jh=typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function $h(t,e){let n;return e.length===0?n=t:n=t.replace(/\{(\d+)\}/g,(r,i)=>{let s=i[0],o=e[s],a=r;return typeof o=="string"?a=o:(typeof o=="number"||typeof o=="boolean"||o===void 0||o===null)&&(a=String(o)),a}),jh&&(n="\uFF3B"+n.replace(/[aouei]/g,"$&$&")+"\uFF3D"),n}function oe(t,e,...n){return $h(e,n)}var Ai,Ht="en",dr=!1,pr=!1,ur=!1,Gh=!1,Jh=!1,Ao=!1,Xh=!1,Yh=!1,Kh=!1,Qh=!1,hr,Mi=Ht,Do=Ht,Zh,je,st=globalThis,Ce;typeof st.vscode<"u"&&typeof st.vscode.process<"u"?Ce=st.vscode.process:typeof process<"u"&&(Ce=process);var Mo=typeof((Ai=Ce?.versions)===null||Ai===void 0?void 0:Ai.electron)=="string",eu=Mo&&Ce?.type==="renderer";if(typeof Ce=="object"){dr=Ce.platform==="win32",pr=Ce.platform==="darwin",ur=Ce.platform==="linux",Gh=ur&&!!Ce.env.SNAP&&!!Ce.env.SNAP_REVISION,Xh=Mo,Kh=!!Ce.env.CI||!!Ce.env.BUILD_ARTIFACTSTAGINGDIRECTORY,hr=Ht,Mi=Ht;let t=Ce.env.VSCODE_NLS_CONFIG;if(t)try{let e=JSON.parse(t),n=e.availableLanguages["*"];hr=e.locale,Do=e.osLocale,Mi=n||Ht,Zh=e._translationsConfigFile}catch{}Jh=!0}else typeof navigator=="object"&&!eu?(je=navigator.userAgent,dr=je.indexOf("Windows")>=0,pr=je.indexOf("Macintosh")>=0,Yh=(je.indexOf("Macintosh")>=0||je.indexOf("iPad")>=0||je.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,ur=je.indexOf("Linux")>=0,Qh=je?.indexOf("Mobi")>=0,Ao=!0,hr=(oe({key:"ensureLoaderPluginIsLoaded",comment:["{Locked}"]},"_"),void 0)||Ht,Mi=hr,Do=navigator.language):console.error("Unable to resolve platform.");var Ni=0;pr?Ni=1:dr?Ni=3:ur&&(Ni=2);var At=dr,No=pr;var tu=Ao&&typeof st.importScripts=="function",ym=tu?st.origin:void 0;var Xe=je;var nu=typeof st.postMessage=="function"&&!st.importScripts,wm=(()=>{if(nu){let t=[];st.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let r=0,i=t.length;r{let r=++e;t.push({id:r,callback:n}),st.postMessage({vscodeScheduleAsyncWork:r},"*")}}return t=>setTimeout(t)})();var ru=!!(Xe&&Xe.indexOf("Chrome")>=0),xm=!!(Xe&&Xe.indexOf("Firefox")>=0),Sm=!!(!ru&&Xe&&Xe.indexOf("Safari")>=0),_m=!!(Xe&&Xe.indexOf("Edg/")>=0),Cm=!!(Xe&&Xe.indexOf("Android")>=0);var fr=class{constructor(e){this.fn=e,this.lastCache=void 0,this.lastArgKey=void 0}get(e){let n=JSON.stringify(e);return this.lastArgKey!==n&&(this.lastArgKey=n,this.lastCache=this.fn(e)),this.lastCache}};var Cn=class{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}};var Gt;function Lo(t){return t.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function zo(t){return t.split(/\r\n|\r|\n/)}function Po(t){for(let e=0,n=t.length;e=0;n--){let r=t.charCodeAt(n);if(r!==32&&r!==9)return n}return-1}function zi(t){return t>=65&&t<=90}function Jt(t){return 55296<=t&&t<=56319}function mr(t){return 56320<=t&&t<=57343}function Pi(t,e){return(t-55296<<10)+(e-56320)+65536}function To(t,e,n){let r=t.charCodeAt(n);if(Jt(r)&&n+1n[3*i+1])i=2*i+1;else return n[3*i+2];return 0}};Li._INSTANCE=null;function su(){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 Ye=class{static getInstance(e){return Gt.cache.get(Array.from(e))}static getLocales(){return Gt._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}};Gt=Ye;Ye.ambiguousCharacterData=new Cn(()=>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,8218,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,8242,96,1370,96,1523,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,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,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,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,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,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,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,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,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,71922,67,71913,67,65315,67,8557,67,8450,67,8493,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,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,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,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,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,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,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,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,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,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,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,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,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,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,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,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,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,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,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,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,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,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,71919,87,71910,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,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,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,66293,90,71909,90,65338,90,8484,90,8488,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,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,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,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,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,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,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,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,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,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,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,65283,35,65292,44,65307,59],"ko":[8211,45,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,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,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,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,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,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,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[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,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,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,65283,35,65307,59]}'));Ye.cache=new fr(t=>{function e(c){let h=new Map;for(let d=0;d!c.startsWith("_")&&c in i);s.length===0&&(s=["_default"]);let o;for(let c of s){let h=e(i[c]);o=r(o,h)}let a=e(i._common),l=n(a,o);return new Gt(l)});Ye._locales=new Cn(()=>Object.keys(Gt.ambiguousCharacterData.value).filter(t=>!t.startsWith("_")));var Mt=class t{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,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,12288,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]")}static getData(){return this._data||(this._data=new Set(t.getRawData())),this._data}static isInvisibleCharacter(e){return t.getData().has(e)}static get codePoints(){return t.getData()}};Mt._data=void 0;var ou="$initialize";var Ii=class{constructor(e,n,r,i){this.vsWorker=e,this.req=n,this.method=r,this.args=i,this.type=0}},gr=class{constructor(e,n,r,i){this.vsWorker=e,this.seq=n,this.res=r,this.err=i,this.type=1}},Ti=class{constructor(e,n,r,i){this.vsWorker=e,this.req=n,this.eventName=r,this.arg=i,this.type=2}},Oi=class{constructor(e,n,r){this.vsWorker=e,this.req=n,this.event=r,this.type=3}},Wi=class{constructor(e,n){this.vsWorker=e,this.req=n,this.type=4}},Ui=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}sendMessage(e,n){let r=String(++this._lastSentReq);return new Promise((i,s)=>{this._pendingReplies[r]={resolve:i,reject:s},this._send(new Ii(this._workerId,r,e,n))})}listen(e,n){let r=null,i=new _e({onWillAddFirstListener:()=>{r=String(++this._lastSentReq),this._pendingEmitters.set(r,i),this._send(new Ti(this._workerId,r,e,n))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(r),this._send(new Wi(this._workerId,r)),r=null}});return i.event}handleMessage(e){!e||!e.vsWorker||this._workerId!==-1&&e.vsWorker!==this._workerId||this._handleMessage(e)}_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 n=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let r=e.err;e.err.$isError&&(r=new Error,r.name=e.err.name,r.message=e.err.message,r.stack=e.err.stack),n.reject(r);return}n.resolve(e.res)}_handleRequestMessage(e){let n=e.req;this._handler.handleMessage(e.method,e.args).then(i=>{this._send(new gr(this._workerId,n,i,void 0))},i=>{i.detail instanceof Error&&(i.detail=_i(i.detail)),this._send(new gr(this._workerId,n,void 0,_i(i)))})}_handleSubscribeEventMessage(e){let n=e.req,r=this._handler.handleEvent(e.eventName,e.arg)(i=>{this._send(new Oi(this._workerId,n,i))});this._pendingEvents.set(n,r)}_handleEventMessage(e){if(!this._pendingEmitters.has(e.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(e.req).fire(e.event)}_handleUnsubscribeEventMessage(e){if(!this._pendingEvents.has(e.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)}_send(e){let n=[];if(e.type===0)for(let r=0;rfunction(){let a=Array.prototype.slice.call(arguments,0);return e(o,a)},i=o=>function(a){return n(o,a)},s={};for(let o of t){if(Uo(o)){s[o]=i(o);continue}if(Wo(o)){s[o]=n(o,void 0);continue}s[o]=r(o)}return s}var br=class{constructor(e,n){this._requestHandlerFactory=n,this._requestHandler=null,this._protocol=new Ui({sendMessage:(r,i)=>{e(r,i)},handleMessage:(r,i)=>this._handleMessage(r,i),handleEvent:(r,i)=>this._handleEvent(r,i)})}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,n){if(e===ou)return this.initialize(n[0],n[1],n[2],n[3]);if(!this._requestHandler||typeof this._requestHandler[e]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._requestHandler[e].apply(this._requestHandler,n))}catch(r){return Promise.reject(r)}}_handleEvent(e,n){if(!this._requestHandler)throw new Error("Missing requestHandler");if(Uo(e)){let r=this._requestHandler[e].call(this._requestHandler,n);if(typeof r!="function")throw new Error(`Missing dynamic event ${e} on request handler.`);return r}if(Wo(e)){let r=this._requestHandler[e];if(typeof r!="function")throw new Error(`Missing event ${e} on request handler.`);return r}throw new Error(`Malformed event name ${e}`)}initialize(e,n,r,i){this._protocol.setWorkerId(e);let a=au(i,(l,c)=>this._protocol.sendMessage(l,c),(l,c)=>this._protocol.listen(l,c));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(a),Promise.resolve(_n(this._requestHandler))):(n&&(typeof n.baseUrl<"u"&&delete n.baseUrl,typeof n.paths<"u"&&typeof n.paths.vs<"u"&&delete n.paths.vs,typeof n.trustedTypesPolicy<"u"&&delete n.trustedTypesPolicy,n.catchError=!0,globalThis.require.config(n)),new Promise((l,c)=>{let h=globalThis.require;h([r],d=>{if(this._requestHandler=d.create(a),!this._requestHandler){c(new Error("No RequestHandler!"));return}l(_n(this._requestHandler))},c)}))}};var $e=class{constructor(e,n,r,i){this.originalStart=e,this.originalLength=n,this.modifiedStart=r,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}};function Bo(t,e){return(e<<5)-e+t|0}function qo(t,e){e=Bo(149417,e);for(let n=0,r=t.length;n>>r)>>>0}function Vo(t,e=0,n=t.byteLength,r=0){for(let i=0;in.toString(16).padStart(2,"0")).join(""):lu((t>>>0).toString(16),e/4)}var Vi=class t{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}update(e){let n=e.length;if(n===0)return;let r=this._buff,i=this._buffLen,s=this._leftoverHighSurrogate,o,a;for(s!==0?(o=s,a=-1,s=0):(o=e.charCodeAt(0),a=0);;){let l=o;if(Jt(o))if(a+1>>6,e[n++]=128|(r&63)>>>0):r<65536?(e[n++]=224|(r&61440)>>>12,e[n++]=128|(r&4032)>>>6,e[n++]=128|(r&63)>>>0):(e[n++]=240|(r&1835008)>>>18,e[n++]=128|(r&258048)>>>12,e[n++]=128|(r&4032)>>>6,e[n++]=128|(r&63)>>>0),n>=64&&(this._step(),n-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),n}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()),En(this._h0)+En(this._h1)+En(this._h2)+En(this._h3)+En(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,Vo(this._buff,this._buffLen),this._buffLen>56&&(this._step(),Vo(this._buff));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=t._bigBlock32,n=this._buffDV;for(let d=0;d<64;d+=4)e.setUint32(d,n.getUint32(d,!1),!1);for(let d=64;d<320;d+=4)e.setUint32(d,Bi(e.getUint32(d-12,!1)^e.getUint32(d-32,!1)^e.getUint32(d-56,!1)^e.getUint32(d-64,!1),1),!1);let r=this._h0,i=this._h1,s=this._h2,o=this._h3,a=this._h4,l,c,h;for(let d=0;d<80;d++)d<20?(l=i&s|~i&o,c=1518500249):d<40?(l=i^s^o,c=1859775393):d<60?(l=i&s|i&o|s&o,c=2400959708):(l=i^s^o,c=3395469782),h=Bi(r,5)+l+a+c+e.getUint32(d*4,!1)&4294967295,a=o,o=s,s=Bi(i,30),i=r,r=h;this._h0=this._h0+r&4294967295,this._h1=this._h1+i&4294967295,this._h2=this._h2+s&4294967295,this._h3=this._h3+o&4294967295,this._h4=this._h4+a&4294967295}};Vi._bigBlock32=new DataView(new ArrayBuffer(320));var vr=class{constructor(e){this.source=e}getElements(){let e=this.source,n=new Int32Array(e.length);for(let r=0,i=e.length;r0||this.m_modifiedCount>0)&&this.m_changes.push(new $e(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,n){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_originalCount++}AddModifiedElement(e,n){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),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}},Fn=class t{constructor(e,n,r=null){this.ContinueProcessingPredicate=r,this._originalSequence=e,this._modifiedSequence=n;let[i,s,o]=t._getElements(e),[a,l,c]=t._getElements(n);this._hasStrings=o&&c,this._originalStringElements=i,this._originalElementsOrHash=s,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 n=e.getElements();if(t._isStringArray(n)){let r=new Int32Array(n.length);for(let i=0,s=n.length;i=e&&i>=r&&this.ElementsAreEqual(n,i);)n--,i--;if(e>n||r>i){let d;return r<=i?(pt.Assert(e===n+1,"originalStart should only be one more than originalEnd"),d=[new $e(e,0,r,i-r+1)]):e<=n?(pt.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),d=[new $e(e,n-e+1,r,0)]):(pt.Assert(e===n+1,"originalStart should only be one more than originalEnd"),pt.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),d=[]),d}let o=[0],a=[0],l=this.ComputeRecursionPoint(e,n,r,i,o,a,s),c=o[0],h=a[0];if(l!==null)return l;if(!s[0]){let d=this.ComputeDiffRecursive(e,c,r,h,s),f=[];return s[0]?f=[new $e(c+1,n-(c+1)+1,h+1,i-(h+1)+1)]:f=this.ComputeDiffRecursive(c+1,n,h+1,i,s),this.ConcatenateChanges(d,f)}return[new $e(e,n-e+1,r,i-r+1)]}WALKTRACE(e,n,r,i,s,o,a,l,c,h,d,f,m,b,g,y,_,E){let w=null,C=null,R=new yr,z=n,O=r,T=m[0]-y[0]-i,G=-1073741824,re=this.m_forwardHistory.length-1;do{let J=T+e;J===z||J=0&&(c=this.m_forwardHistory[re],e=c[0],z=1,O=c.length-1)}while(--re>=-1);if(w=R.getReverseChanges(),E[0]){let J=m[0]+1,A=y[0]+1;if(w!==null&&w.length>0){let M=w[w.length-1];J=Math.max(J,M.getOriginalEnd()),A=Math.max(A,M.getModifiedEnd())}C=[new $e(J,f-J+1,A,g-A+1)]}else{R=new yr,z=o,O=a,T=m[0]-y[0]-l,G=1073741824,re=_?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{let J=T+s;J===z||J=h[J+1]?(d=h[J+1]-1,b=d-T-l,d>G&&R.MarkNextChange(),G=d+1,R.AddOriginalElement(d+1,b+1),T=J+1-s):(d=h[J-1],b=d-T-l,d>G&&R.MarkNextChange(),G=d,R.AddModifiedElement(d+1,b+1),T=J-1-s),re>=0&&(h=this.m_reverseHistory[re],s=h[0],z=1,O=h.length-1)}while(--re>=-1);C=R.getChanges()}return this.ConcatenateChanges(w,C)}ComputeRecursionPoint(e,n,r,i,s,o,a){let l=0,c=0,h=0,d=0,f=0,m=0;e--,r--,s[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];let b=n-e+(i-r),g=b+1,y=new Int32Array(g),_=new Int32Array(g),E=i-r,w=n-e,C=e-r,R=n-i,O=(w-E)%2===0;y[E]=e,_[w]=n,a[0]=!1;for(let T=1;T<=b/2+1;T++){let G=0,re=0;h=this.ClipDiagonalBound(E-T,T,E,g),d=this.ClipDiagonalBound(E+T,T,E,g);for(let A=h;A<=d;A+=2){A===h||AG+re&&(G=l,re=c),!O&&Math.abs(A-w)<=T-1&&l>=_[A])return s[0]=l,o[0]=c,M<=_[A]&&T<=1448?this.WALKTRACE(E,h,d,C,w,f,m,R,y,_,l,n,s,c,i,o,O,a):null}let J=(G-e+(re-r)-T)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(G,J))return a[0]=!0,s[0]=G,o[0]=re,J>0&&T<=1448?this.WALKTRACE(E,h,d,C,w,f,m,R,y,_,l,n,s,c,i,o,O,a):(e++,r++,[new $e(e,n-e+1,r,i-r+1)]);f=this.ClipDiagonalBound(w-T,T,w,g),m=this.ClipDiagonalBound(w+T,T,w,g);for(let A=f;A<=m;A+=2){A===f||A=_[A+1]?l=_[A+1]-1:l=_[A-1],c=l-(A-w)-R;let M=l;for(;l>e&&c>r&&this.ElementsAreEqual(l,c);)l--,c--;if(_[A]=l,O&&Math.abs(A-E)<=T&&l<=y[A])return s[0]=l,o[0]=c,M>=y[A]&&T<=1448?this.WALKTRACE(E,h,d,C,w,f,m,R,y,_,l,n,s,c,i,o,O,a):null}if(T<=1447){let A=new Int32Array(d-h+2);A[0]=E-h+1,ft.Copy2(y,h,A,1,d-h+1),this.m_forwardHistory.push(A),A=new Int32Array(m-f+2),A[0]=w-f+1,ft.Copy2(_,f,A,1,m-f+1),this.m_reverseHistory.push(A)}}return this.WALKTRACE(E,h,d,C,w,f,m,R,y,_,l,n,s,c,i,o,O,a)}PrettifyChanges(e){for(let n=0;n0,a=r.modifiedLength>0;for(;r.originalStart+r.originalLength=0;n--){let r=e[n],i=0,s=0;if(n>0){let d=e[n-1];i=d.originalStart+d.originalLength,s=d.modifiedStart+d.modifiedLength}let o=r.originalLength>0,a=r.modifiedLength>0,l=0,c=this._boundaryScore(r.originalStart,r.originalLength,r.modifiedStart,r.modifiedLength);for(let d=1;;d++){let f=r.originalStart-d,m=r.modifiedStart-d;if(fc&&(c=g,l=d)}r.originalStart-=l,r.modifiedStart-=l;let h=[null];if(n>0&&this.ChangesOverlap(e[n-1],e[n],h)){e[n-1]=h[0],e.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,r=e.length;n0&&m>l&&(l=m,c=d,h=f)}return l>0?[c,h]:null}_contiguousSequenceScore(e,n,r){let i=0;for(let s=0;s=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,n){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(n>0){let r=e+n;if(this._OriginalIsBoundary(r-1)||this._OriginalIsBoundary(r))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,n){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(n>0){let r=e+n;if(this._ModifiedIsBoundary(r-1)||this._ModifiedIsBoundary(r))return!0}return!1}_boundaryScore(e,n,r,i){let s=this._OriginalRegionIsBoundary(e,n)?1:0,o=this._ModifiedRegionIsBoundary(r,i)?1:0;return s+o}ConcatenateChanges(e,n){let r=[];if(e.length===0||n.length===0)return n.length>0?n:e;if(this.ChangesOverlap(e[e.length-1],n[0],r)){let i=new Array(e.length+n.length-1);return ft.Copy(e,0,i,0,e.length-1),i[e.length-1]=r[0],ft.Copy(n,1,i,e.length,n.length-1),i}else{let i=new Array(e.length+n.length);return ft.Copy(e,0,i,0,e.length),ft.Copy(n,0,i,e.length,n.length),i}}ChangesOverlap(e,n,r){if(pt.Assert(e.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),pt.Assert(e.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=n.originalStart||e.modifiedStart+e.modifiedLength>=n.modifiedStart){let i=e.originalStart,s=e.originalLength,o=e.modifiedStart,a=e.modifiedLength;return e.originalStart+e.originalLength>=n.originalStart&&(s=n.originalStart+n.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=n.modifiedStart&&(a=n.modifiedStart+n.modifiedLength-e.modifiedStart),r[0]=new $e(i,s,o,a),!0}else return r[0]=null,!1}ClipDiagonalBound(e,n,r,i){if(e>=0&&e=hu&&t<=du||t>=uu&&t<=pu}function xr(t,e,n,r){let i="",s=0,o=-1,a=0,l=0;for(let c=0;c<=t.length;++c){if(c2){let h=i.lastIndexOf(n);h===-1?(i="",s=0):(i=i.slice(0,h),s=i.length-1-i.lastIndexOf(n)),o=c,a=0;continue}else if(i.length!==0){i="",s=0,o=c,a=0;continue}}e&&(i+=i.length>0?`${n}..`:"..",s=2)}else i.length>0?i+=`${n}${t.slice(o+1,c)}`:i=t.slice(o+1,c),s=c-o-1;o=c,a=0}else l===bt&&a!==-1?++a:a=-1}return i}function Go(t,e){mu(e,"pathObject");let n=e.dir||e.root,r=e.base||`${e.name||""}${e.ext||""}`;return n?n===e.root?`${n}${r}`:`${n}${t}${r}`:r}var Fe={resolve(...t){let e="",n="",r=!1;for(let i=t.length-1;i>=-1;i--){let s;if(i>=0){if(s=t[i],de(s,"path"),s.length===0)continue}else e.length===0?s=Rn():(s=$o[`=${e}`]||Rn(),(s===void 0||s.slice(0,2).toLowerCase()!==e.toLowerCase()&&s.charCodeAt(2)===Ne)&&(s=`${e}\\`));let o=s.length,a=0,l="",c=!1,h=s.charCodeAt(0);if(o===1)Y(h)&&(a=1,c=!0);else if(Y(h))if(c=!0,Y(s.charCodeAt(1))){let d=2,f=d;for(;d2&&Y(s.charCodeAt(2))&&(c=!0,a=3));if(l.length>0)if(e.length>0){if(l.toLowerCase()!==e.toLowerCase())continue}else e=l;if(r){if(e.length>0)break}else if(n=`${s.slice(a)}\\${n}`,r=c,c&&e.length>0)break}return n=xr(n,!r,"\\",Y),r?`${e}\\${n}`:`${e}${n}`||"."},normalize(t){de(t,"path");let e=t.length;if(e===0)return".";let n=0,r,i=!1,s=t.charCodeAt(0);if(e===1)return ji(s)?"\\":t;if(Y(s))if(i=!0,Y(t.charCodeAt(1))){let a=2,l=a;for(;a2&&Y(t.charCodeAt(2))&&(i=!0,n=3));let o=n0&&Y(t.charCodeAt(e-1))&&(o+="\\"),r===void 0?i?`\\${o}`:o:i?`${r}\\${o}`:`${r}${o}`},isAbsolute(t){de(t,"path");let e=t.length;if(e===0)return!1;let n=t.charCodeAt(0);return Y(n)||e>2&>(n)&&t.charCodeAt(1)===mt&&Y(t.charCodeAt(2))},join(...t){if(t.length===0)return".";let e,n;for(let s=0;s0&&(e===void 0?e=n=o:e+=`\\${o}`)}if(e===void 0)return".";let r=!0,i=0;if(typeof n=="string"&&Y(n.charCodeAt(0))){++i;let s=n.length;s>1&&Y(n.charCodeAt(1))&&(++i,s>2&&(Y(n.charCodeAt(2))?++i:r=!1))}if(r){for(;i=2&&(e=`\\${e.slice(i)}`)}return Fe.normalize(e)},relative(t,e){if(de(t,"from"),de(e,"to"),t===e)return"";let n=Fe.resolve(t),r=Fe.resolve(e);if(n===r||(t=n.toLowerCase(),e=r.toLowerCase(),t===e))return"";let i=0;for(;ii&&t.charCodeAt(s-1)===Ne;)s--;let o=s-i,a=0;for(;aa&&e.charCodeAt(l-1)===Ne;)l--;let c=l-a,h=oh){if(e.charCodeAt(a+f)===Ne)return r.slice(a+f+1);if(f===2)return r.slice(a+f)}o>h&&(t.charCodeAt(i+f)===Ne?d=f:f===2&&(d=3)),d===-1&&(d=0)}let m="";for(f=i+d+1;f<=s;++f)(f===s||t.charCodeAt(f)===Ne)&&(m+=m.length===0?"..":"\\..");return a+=d,m.length>0?`${m}${r.slice(a,l)}`:(r.charCodeAt(a)===Ne&&++a,r.slice(a,l))},toNamespacedPath(t){if(typeof t!="string"||t.length===0)return t;let e=Fe.resolve(t);if(e.length<=2)return t;if(e.charCodeAt(0)===Ne){if(e.charCodeAt(1)===Ne){let n=e.charCodeAt(2);if(n!==fu&&n!==bt)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(gt(e.charCodeAt(0))&&e.charCodeAt(1)===mt&&e.charCodeAt(2)===Ne)return`\\\\?\\${e}`;return t},dirname(t){de(t,"path");let e=t.length;if(e===0)return".";let n=-1,r=0,i=t.charCodeAt(0);if(e===1)return Y(i)?t:".";if(Y(i)){if(n=r=1,Y(t.charCodeAt(1))){let a=2,l=a;for(;a2&&Y(t.charCodeAt(2))?3:2,r=n);let s=-1,o=!0;for(let a=e-1;a>=r;--a)if(Y(t.charCodeAt(a))){if(!o){s=a;break}}else o=!1;if(s===-1){if(n===-1)return".";s=n}return t.slice(0,s)},basename(t,e){e!==void 0&&de(e,"ext"),de(t,"path");let n=0,r=-1,i=!0,s;if(t.length>=2&>(t.charCodeAt(0))&&t.charCodeAt(1)===mt&&(n=2),e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let o=e.length-1,a=-1;for(s=t.length-1;s>=n;--s){let l=t.charCodeAt(s);if(Y(l)){if(!i){n=s+1;break}}else a===-1&&(i=!1,a=s+1),o>=0&&(l===e.charCodeAt(o)?--o===-1&&(r=s):(o=-1,r=a))}return n===r?r=a:r===-1&&(r=t.length),t.slice(n,r)}for(s=t.length-1;s>=n;--s)if(Y(t.charCodeAt(s))){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":t.slice(n,r)},extname(t){de(t,"path");let e=0,n=-1,r=0,i=-1,s=!0,o=0;t.length>=2&&t.charCodeAt(1)===mt&>(t.charCodeAt(0))&&(e=r=2);for(let a=t.length-1;a>=e;--a){let l=t.charCodeAt(a);if(Y(l)){if(!s){r=a+1;break}continue}i===-1&&(s=!1,i=a+1),l===bt?n===-1?n=a:o!==1&&(o=1):n!==-1&&(o=-1)}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?"":t.slice(n,i)},format:Go.bind(null,"\\"),parse(t){de(t,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;let n=t.length,r=0,i=t.charCodeAt(0);if(n===1)return Y(i)?(e.root=e.dir=t,e):(e.base=e.name=t,e);if(Y(i)){if(r=1,Y(t.charCodeAt(1))){let d=2,f=d;for(;d0&&(e.root=t.slice(0,r));let s=-1,o=r,a=-1,l=!0,c=t.length-1,h=0;for(;c>=r;--c){if(i=t.charCodeAt(c),Y(i)){if(!l){o=c+1;break}continue}a===-1&&(l=!1,a=c+1),i===bt?s===-1?s=c:h!==1&&(h=1):s!==-1&&(h=-1)}return a!==-1&&(s===-1||h===0||h===1&&s===a-1&&s===o+1?e.base=e.name=t.slice(o,a):(e.name=t.slice(o,s),e.base=t.slice(o,a),e.ext=t.slice(s,a))),o>0&&o!==r?e.dir=t.slice(0,o-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},gu=(()=>{if(vt){let t=/\\/g;return()=>{let e=Rn().replace(t,"/");return e.slice(e.indexOf("/"))}}return()=>Rn()})(),Ae={resolve(...t){let e="",n=!1;for(let r=t.length-1;r>=-1&&!n;r--){let i=r>=0?t[r]:gu();de(i,"path"),i.length!==0&&(e=`${i}/${e}`,n=i.charCodeAt(0)===Se)}return e=xr(e,!n,"/",ji),n?`/${e}`:e.length>0?e:"."},normalize(t){if(de(t,"path"),t.length===0)return".";let e=t.charCodeAt(0)===Se,n=t.charCodeAt(t.length-1)===Se;return t=xr(t,!e,"/",ji),t.length===0?e?"/":n?"./":".":(n&&(t+="/"),e?`/${t}`:t)},isAbsolute(t){return de(t,"path"),t.length>0&&t.charCodeAt(0)===Se},join(...t){if(t.length===0)return".";let e;for(let n=0;n0&&(e===void 0?e=r:e+=`/${r}`)}return e===void 0?".":Ae.normalize(e)},relative(t,e){if(de(t,"from"),de(e,"to"),t===e||(t=Ae.resolve(t),e=Ae.resolve(e),t===e))return"";let n=1,r=t.length,i=r-n,s=1,o=e.length-s,a=ia){if(e.charCodeAt(s+c)===Se)return e.slice(s+c+1);if(c===0)return e.slice(s+c)}else i>a&&(t.charCodeAt(n+c)===Se?l=c:c===0&&(l=0));let h="";for(c=n+l+1;c<=r;++c)(c===r||t.charCodeAt(c)===Se)&&(h+=h.length===0?"..":"/..");return`${h}${e.slice(s+l)}`},toNamespacedPath(t){return t},dirname(t){if(de(t,"path"),t.length===0)return".";let e=t.charCodeAt(0)===Se,n=-1,r=!0;for(let i=t.length-1;i>=1;--i)if(t.charCodeAt(i)===Se){if(!r){n=i;break}}else r=!1;return n===-1?e?"/":".":e&&n===1?"//":t.slice(0,n)},basename(t,e){e!==void 0&&de(e,"ext"),de(t,"path");let n=0,r=-1,i=!0,s;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let o=e.length-1,a=-1;for(s=t.length-1;s>=0;--s){let l=t.charCodeAt(s);if(l===Se){if(!i){n=s+1;break}}else a===-1&&(i=!1,a=s+1),o>=0&&(l===e.charCodeAt(o)?--o===-1&&(r=s):(o=-1,r=a))}return n===r?r=a:r===-1&&(r=t.length),t.slice(n,r)}for(s=t.length-1;s>=0;--s)if(t.charCodeAt(s)===Se){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":t.slice(n,r)},extname(t){de(t,"path");let e=-1,n=0,r=-1,i=!0,s=0;for(let o=t.length-1;o>=0;--o){let a=t.charCodeAt(o);if(a===Se){if(!i){n=o+1;break}continue}r===-1&&(i=!1,r=o+1),a===bt?e===-1?e=o:s!==1&&(s=1):e!==-1&&(s=-1)}return e===-1||r===-1||s===0||s===1&&e===r-1&&e===n+1?"":t.slice(e,r)},format:Go.bind(null,"/"),parse(t){de(t,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;let n=t.charCodeAt(0)===Se,r;n?(e.root="/",r=1):r=0;let i=-1,s=0,o=-1,a=!0,l=t.length-1,c=0;for(;l>=r;--l){let h=t.charCodeAt(l);if(h===Se){if(!a){s=l+1;break}continue}o===-1&&(a=!1,o=l+1),h===bt?i===-1?i=l:c!==1&&(c=1):i!==-1&&(c=-1)}if(o!==-1){let h=s===0&&n?1:s;i===-1||c===0||c===1&&i===o-1&&i===s+1?e.base=e.name=t.slice(h,o):(e.name=t.slice(h,i),e.base=t.slice(h,o),e.ext=t.slice(i,o))}return s>0?e.dir=t.slice(0,s-1):n&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};Ae.win32=Fe.win32=Fe;Ae.posix=Fe.posix=Ae;var qm=vt?Fe.normalize:Ae.normalize,jm=vt?Fe.resolve:Ae.resolve,$m=vt?Fe.relative:Ae.relative,Hm=vt?Fe.dirname:Ae.dirname,Gm=vt?Fe.basename:Ae.basename,Jm=vt?Fe.extname:Ae.extname,Xm=vt?Fe.sep:Ae.sep;var vu=/^\w[\w\d+.-]*$/,yu=/^\//,wu=/^\/\//;function xu(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!vu.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path){if(t.authority){if(!yu.test(t.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(wu.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function Su(t,e){return!t&&!e?"file":t}function _u(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==He&&(e=He+e):e=He;break}return e}var ce="",He="/",Cu=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,wt=class t{static isUri(e){return e instanceof t?!0:e?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":!1}constructor(e,n,r,i,s,o=!1){typeof e=="object"?(this.scheme=e.scheme||ce,this.authority=e.authority||ce,this.path=e.path||ce,this.query=e.query||ce,this.fragment=e.fragment||ce):(this.scheme=Su(e,o),this.authority=n||ce,this.path=_u(this.scheme,r||ce),this.query=i||ce,this.fragment=s||ce,xu(this,o))}get fsPath(){return $i(this,!1)}with(e){if(!e)return this;let{scheme:n,authority:r,path:i,query:s,fragment:o}=e;return n===void 0?n=this.scheme:n===null&&(n=ce),r===void 0?r=this.authority:r===null&&(r=ce),i===void 0?i=this.path:i===null&&(i=ce),s===void 0?s=this.query:s===null&&(s=ce),o===void 0?o=this.fragment:o===null&&(o=ce),n===this.scheme&&r===this.authority&&i===this.path&&s===this.query&&o===this.fragment?this:new yt(n,r,i,s,o)}static parse(e,n=!1){let r=Cu.exec(e);return r?new yt(r[2]||ce,Sr(r[4]||ce),Sr(r[5]||ce),Sr(r[7]||ce),Sr(r[9]||ce),n):new yt(ce,ce,ce,ce,ce)}static file(e){let n=ce;if(At&&(e=e.replace(/\\/g,He)),e[0]===He&&e[1]===He){let r=e.indexOf(He,2);r===-1?(n=e.substring(2),e=He):(n=e.substring(2,r),e=e.substring(r)||He)}return new yt("file",n,e,ce,ce)}static from(e,n){return new yt(e.scheme,e.authority,e.path,e.query,e.fragment,n)}static joinPath(e,...n){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let r;return At&&e.scheme==="file"?r=t.file(Fe.join($i(e,!0),...n)).path:r=Ae.join(e.path,...n),e.with({path:r})}toString(e=!1){return Hi(this,e)}toJSON(){return this}static revive(e){var n,r;if(e){if(e instanceof t)return e;{let i=new yt(e);return i._formatted=(n=e.external)!==null&&n!==void 0?n:null,i._fsPath=e._sep===Yo&&(r=e.fsPath)!==null&&r!==void 0?r:null,i}}else return e}},Yo=At?1:void 0,yt=class extends wt{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=$i(this,!1)),this._fsPath}toString(e=!1){return e?Hi(this,!0):(this._formatted||(this._formatted=Hi(this,!1)),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=Yo),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}},Ko={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 Jo(t,e,n){let r,i=-1;for(let s=0;s=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||e&&o===47||n&&o===91||n&&o===93||n&&o===58)i!==-1&&(r+=encodeURIComponent(t.substring(i,s)),i=-1),r!==void 0&&(r+=t.charAt(s));else{r===void 0&&(r=t.substr(0,s));let a=Ko[o];a!==void 0?(i!==-1&&(r+=encodeURIComponent(t.substring(i,s)),i=-1),r+=a):i===-1&&(i=s)}}return i!==-1&&(r+=encodeURIComponent(t.substring(i))),r!==void 0?r:t}function ku(t){let e;for(let n=0;n1&&t.scheme==="file"?n=`//${t.authority}${t.path}`:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?e?n=t.path.substr(1):n=t.path[1].toLowerCase()+t.path.substr(2):n=t.path,At&&(n=n.replace(/\//g,"\\")),n}function Hi(t,e){let n=e?ku:Jo,r="",{scheme:i,authority:s,path:o,query:a,fragment:l}=t;if(i&&(r+=i,r+=":"),(s||i==="file")&&(r+=He,r+=He),s){let c=s.indexOf("@");if(c!==-1){let h=s.substr(0,c);s=s.substr(c+1),c=h.lastIndexOf(":"),c===-1?r+=n(h,!1,!1):(r+=n(h.substr(0,c),!1,!1),r+=":",r+=n(h.substr(c+1),!1,!0)),r+="@"}s=s.toLowerCase(),c=s.lastIndexOf(":"),c===-1?r+=n(s,!1,!0):(r+=n(s.substr(0,c),!1,!0),r+=s.substr(c))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){let c=o.charCodeAt(1);c>=65&&c<=90&&(o=`/${String.fromCharCode(c+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){let c=o.charCodeAt(0);c>=65&&c<=90&&(o=`${String.fromCharCode(c+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return a&&(r+="?",r+=n(a,!1,!1)),l&&(r+="#",r+=e?l:Jo(l,!1,!1)),r}function Qo(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+Qo(t.substr(3)):t}}var Xo=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Sr(t){return t.match(Xo)?t.replace(Xo,e=>Qo(e)):t}var we=class t{constructor(e,n){this.lineNumber=e,this.column=n}with(e=this.lineNumber,n=this.column){return e===this.lineNumber&&n===this.column?this:new t(e,n)}delta(e=0,n=0){return this.with(this.lineNumber+e,this.column+n)}equals(e){return t.equals(this,e)}static equals(e,n){return!e&&!n?!0:!!e&&!!n&&e.lineNumber===n.lineNumber&&e.column===n.column}isBefore(e){return t.isBefore(this,e)}static isBefore(e,n){return e.lineNumberr||e===r&&n>i?(this.startLineNumber=r,this.startColumn=i,this.endLineNumber=e,this.endColumn=n):(this.startLineNumber=e,this.startColumn=n,this.endLineNumber=r,this.endColumn=i)}isEmpty(){return t.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return t.containsPosition(this,e)}static containsPosition(e,n){return!(n.lineNumbere.endLineNumber||n.lineNumber===e.startLineNumber&&n.columne.endColumn)}static strictContainsPosition(e,n){return!(n.lineNumbere.endLineNumber||n.lineNumber===e.startLineNumber&&n.column<=e.startColumn||n.lineNumber===e.endLineNumber&&n.column>=e.endColumn)}containsRange(e){return t.containsRange(this,e)}static containsRange(e,n){return!(n.startLineNumbere.endLineNumber||n.endLineNumber>e.endLineNumber||n.startLineNumber===e.startLineNumber&&n.startColumne.endColumn)}strictContainsRange(e){return t.strictContainsRange(this,e)}static strictContainsRange(e,n){return!(n.startLineNumbere.endLineNumber||n.endLineNumber>e.endLineNumber||n.startLineNumber===e.startLineNumber&&n.startColumn<=e.startColumn||n.endLineNumber===e.endLineNumber&&n.endColumn>=e.endColumn)}plusRange(e){return t.plusRange(this,e)}static plusRange(e,n){let r,i,s,o;return n.startLineNumbere.endLineNumber?(s=n.endLineNumber,o=n.endColumn):n.endLineNumber===e.endLineNumber?(s=n.endLineNumber,o=Math.max(n.endColumn,e.endColumn)):(s=e.endLineNumber,o=e.endColumn),new t(r,i,s,o)}intersectRanges(e){return t.intersectRanges(this,e)}static intersectRanges(e,n){let r=e.startLineNumber,i=e.startColumn,s=e.endLineNumber,o=e.endColumn,a=n.startLineNumber,l=n.startColumn,c=n.endLineNumber,h=n.endColumn;return rc?(s=c,o=h):s===c&&(o=Math.min(o,h)),r>s||r===s&&i>o?null:new t(r,i,s,o)}equalsRange(e){return t.equalsRange(this,e)}static equalsRange(e,n){return!e&&!n?!0:!!e&&!!n&&e.startLineNumber===n.startLineNumber&&e.startColumn===n.startColumn&&e.endLineNumber===n.endLineNumber&&e.endColumn===n.endColumn}getEndPosition(){return t.getEndPosition(this)}static getEndPosition(e){return new we(e.endLineNumber,e.endColumn)}getStartPosition(){return t.getStartPosition(this)}static getStartPosition(e){return new we(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,n){return new t(this.startLineNumber,this.startColumn,e,n)}setStartPosition(e,n){return new t(e,n,this.endLineNumber,this.endColumn)}collapseToStart(){return t.collapseToStart(this)}static collapseToStart(e){return new t(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return t.collapseToEnd(this)}static collapseToEnd(e){return new t(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new t(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,n=e){return new t(e.lineNumber,e.column,n.lineNumber,n.column)}static lift(e){return e?new t(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,n){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}};function Zo(t,e,n=(r,i)=>r===i){if(t===e)return!0;if(!t||!e||t.length!==e.length)return!1;for(let r=0,i=t.length;r0}t.isGreaterThan=r;function i(s){return s===0}t.isNeitherLessOrGreaterThan=i,t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(Gi||(Gi={}));function Dn(t,e){return(n,r)=>e(t(n),t(r))}var An=(t,e)=>t-e;function ia(t){return(e,n)=>-t(e,n)}var _r=class t{constructor(e){this.iterate=e}toArray(){let e=[];return this.iterate(n=>(e.push(n),!0)),e}filter(e){return new t(n=>this.iterate(r=>e(r)?n(r):!0))}map(e){return new t(n=>this.iterate(r=>n(e(r))))}findLast(e){let n;return this.iterate(r=>(e(r)&&(n=r),!0)),n}findLastMaxBy(e){let n,r=!0;return this.iterate(i=>((r||Gi.isGreaterThan(e(i,n)))&&(r=!1,n=i),!0)),n}};_r.empty=new _r(t=>{});function Ji(t){return t<0?0:t>255?255:t|0}function Nt(t){return t<0?0:t>4294967295?4294967295:t|0}var Cr=class{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,n){e=Nt(e);let r=this.values,i=this.prefixSum,s=n.length;return s===0?!1:(this.values=new Uint32Array(r.length+s),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e),e+s),this.values.set(n,e),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,n){return e=Nt(e),n=Nt(n),this.values[e]===n?!1:(this.values[e]=n,e-1=r.length)return!1;let s=r.length-e;return n>=s&&(n=s),n===0?!1:(this.values=new Uint32Array(r.length-n),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e+n),e),this.prefixSum=new Uint32Array(this.values.length),e-1=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=Nt(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let n=this.prefixSumValidIndex[0]+1;n===0&&(this.prefixSum[0]=this.values[0],n++),e>=this.values.length&&(e=this.values.length-1);for(let r=n;r<=e;r++)this.prefixSum[r]=this.prefixSum[r-1]+this.values[r];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let n=0,r=this.values.length-1,i=0,s=0,o=0;for(;n<=r;)if(i=n+(r-n)/2|0,s=this.prefixSum[i],o=s-this.values[i],e=s)n=i+1;else break;return new Xi(i,e-o)}};var Xi=class{constructor(e,n){this.index=e,this.remainder=n,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=n}};var kr=class{constructor(e,n,r,i){this._uri=e,this._lines=n,this._eol=r,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 n=e.changes;for(let r of n)this._acceptDeleteRange(r.range),this._acceptInsertText(new we(r.range.startLineNumber,r.range.startColumn),r.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){let e=this._eol.length,n=this._lines.length,r=new Uint32Array(n);for(let i=0;i/?";function Fu(t=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(let n of Eu)t.indexOf(n)>=0||(e+="\\"+n);return e+="\\s]+)",new RegExp(e,"g")}var Yi=Fu();function Ki(t){let e=Yi;if(t&&t instanceof RegExp)if(t.global)e=t;else{let n="g";t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),e=new RegExp(t.source,n)}return e.lastIndex=0,e}var sa=new wn;sa.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function Mn(t,e,n,r,i){if(e=Ki(e),i||(i=Vt.first(sa)),n.length>i.maxLen){let c=t-i.maxLen/2;return c<0?c=0:r+=c,n=n.substring(c,t+i.maxLen/2),Mn(t,e,n,r,i)}let s=Date.now(),o=t-1-r,a=-1,l=null;for(let c=1;!(Date.now()-s>=i.timeBudget);c++){let h=o-i.windowSize*c;e.lastIndex=Math.max(0,h);let d=Ru(e,n,o,a);if(!d&&l||(l=d,h<=0))break;a=h}if(l){let c={word:l[0],startColumn:r+1+l.index,endColumn:r+1+l.index+l[0].length};return e.lastIndex=0,c}return null}function Ru(t,e,n,r){let i;for(;i=t.exec(e);){let s=i.index||0;if(s<=n&&t.lastIndex>=n)return i;if(r>0&&s>r)return null}return null}var Yt=class t{constructor(e){let n=Ji(e);this._defaultValue=n,this._asciiMap=t._createAsciiMap(n),this._map=new Map}static _createAsciiMap(e){let n=new Uint8Array(256);return n.fill(e),n}set(e,n){let r=Ji(n);e>=0&&e<256?this._asciiMap[e]=r:this._map.set(e,r)}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 Zi=class{constructor(e,n,r){let i=new Uint8Array(e*n);for(let s=0,o=e*n;sn&&(n=l),a>r&&(r=a),c>r&&(r=c)}n++,r++;let i=new Zi(r,n,0);for(let s=0,o=e.length;s=this._maxCharCode?0:this._states.get(e,n)}},Qi=null;function Du(){return Qi===null&&(Qi=new es([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),Qi}var Nn=null;function Au(){if(Nn===null){Nn=new Yt(0);let t=` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026`;for(let n=0;ni);if(i>0){let a=n.charCodeAt(i-1),l=n.charCodeAt(o);(a===40&&l===41||a===91&&l===93||a===123&&l===125)&&o--}return{range:{startLineNumber:r,startColumn:i+1,endLineNumber:r,endColumn:o+2},url:n.substring(i,o+1)}}static computeLinks(e,n=Du()){let r=Au(),i=[];for(let s=1,o=e.getLineCount();s<=o;s++){let a=e.getLineContent(s),l=a.length,c=0,h=0,d=0,f=1,m=!1,b=!1,g=!1,y=!1;for(;c=0?(i+=r?1:-1,i<0?i=e.length-1:i%=e.length,e[i]):null}};Kt.INSTANCE=new Kt;var aa=Object.freeze(function(t,e){let n=setTimeout(t.bind(e),0);return{dispose(){clearTimeout(n)}}}),Er;(function(t){function e(n){return n===t.None||n===t.Cancelled||n instanceof Qt?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}t.isCancellationToken=e,t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:cr.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:aa})})(Er||(Er={}));var Qt=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?aa:(this._emitter||(this._emitter=new _e),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},Fr=class{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new Qt),this._token}cancel(){this._token?this._token instanceof Qt&&this._token.cancel():this._token=Er.Cancelled}dispose(e=!1){var n;e&&this.cancel(),(n=this._parentListener)===null||n===void 0||n.dispose(),this._token?this._token instanceof Qt&&this._token.dispose():this._token=Er.None}};var Ln=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,n){this._keyCodeToStr[e]=n,this._strToKeyCode[n.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},Rr=new Ln,ns=new Ln,rs=new Ln,Mu=new Array(230),Nu={},Lu=[],zu=Object.create(null),Pu=Object.create(null),ca=[],is=[];for(let t=0;t<=193;t++)ca[t]=-1;for(let t=0;t<=132;t++)is[t]=-1;(function(){let t="",e=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",t,t],[1,1,"Hyper",0,t,0,t,t,t],[1,2,"Super",0,t,0,t,t,t],[1,3,"Fn",0,t,0,t,t,t],[1,4,"FnLock",0,t,0,t,t,t],[1,5,"Suspend",0,t,0,t,t,t],[1,6,"Resume",0,t,0,t,t,t],[1,7,"Turbo",0,t,0,t,t,t],[1,8,"Sleep",0,t,0,"VK_SLEEP",t,t],[1,9,"WakeUp",0,t,0,t,t,t],[0,10,"KeyA",31,"A",65,"VK_A",t,t],[0,11,"KeyB",32,"B",66,"VK_B",t,t],[0,12,"KeyC",33,"C",67,"VK_C",t,t],[0,13,"KeyD",34,"D",68,"VK_D",t,t],[0,14,"KeyE",35,"E",69,"VK_E",t,t],[0,15,"KeyF",36,"F",70,"VK_F",t,t],[0,16,"KeyG",37,"G",71,"VK_G",t,t],[0,17,"KeyH",38,"H",72,"VK_H",t,t],[0,18,"KeyI",39,"I",73,"VK_I",t,t],[0,19,"KeyJ",40,"J",74,"VK_J",t,t],[0,20,"KeyK",41,"K",75,"VK_K",t,t],[0,21,"KeyL",42,"L",76,"VK_L",t,t],[0,22,"KeyM",43,"M",77,"VK_M",t,t],[0,23,"KeyN",44,"N",78,"VK_N",t,t],[0,24,"KeyO",45,"O",79,"VK_O",t,t],[0,25,"KeyP",46,"P",80,"VK_P",t,t],[0,26,"KeyQ",47,"Q",81,"VK_Q",t,t],[0,27,"KeyR",48,"R",82,"VK_R",t,t],[0,28,"KeyS",49,"S",83,"VK_S",t,t],[0,29,"KeyT",50,"T",84,"VK_T",t,t],[0,30,"KeyU",51,"U",85,"VK_U",t,t],[0,31,"KeyV",52,"V",86,"VK_V",t,t],[0,32,"KeyW",53,"W",87,"VK_W",t,t],[0,33,"KeyX",54,"X",88,"VK_X",t,t],[0,34,"KeyY",55,"Y",89,"VK_Y",t,t],[0,35,"KeyZ",56,"Z",90,"VK_Z",t,t],[0,36,"Digit1",22,"1",49,"VK_1",t,t],[0,37,"Digit2",23,"2",50,"VK_2",t,t],[0,38,"Digit3",24,"3",51,"VK_3",t,t],[0,39,"Digit4",25,"4",52,"VK_4",t,t],[0,40,"Digit5",26,"5",53,"VK_5",t,t],[0,41,"Digit6",27,"6",54,"VK_6",t,t],[0,42,"Digit7",28,"7",55,"VK_7",t,t],[0,43,"Digit8",29,"8",56,"VK_8",t,t],[0,44,"Digit9",30,"9",57,"VK_9",t,t],[0,45,"Digit0",21,"0",48,"VK_0",t,t],[1,46,"Enter",3,"Enter",13,"VK_RETURN",t,t],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",t,t],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",t,t],[1,49,"Tab",2,"Tab",9,"VK_TAB",t,t],[1,50,"Space",10,"Space",32,"VK_SPACE",t,t],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,t,0,t,t,t],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",t,t],[1,64,"F1",59,"F1",112,"VK_F1",t,t],[1,65,"F2",60,"F2",113,"VK_F2",t,t],[1,66,"F3",61,"F3",114,"VK_F3",t,t],[1,67,"F4",62,"F4",115,"VK_F4",t,t],[1,68,"F5",63,"F5",116,"VK_F5",t,t],[1,69,"F6",64,"F6",117,"VK_F6",t,t],[1,70,"F7",65,"F7",118,"VK_F7",t,t],[1,71,"F8",66,"F8",119,"VK_F8",t,t],[1,72,"F9",67,"F9",120,"VK_F9",t,t],[1,73,"F10",68,"F10",121,"VK_F10",t,t],[1,74,"F11",69,"F11",122,"VK_F11",t,t],[1,75,"F12",70,"F12",123,"VK_F12",t,t],[1,76,"PrintScreen",0,t,0,t,t,t],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",t,t],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",t,t],[1,79,"Insert",19,"Insert",45,"VK_INSERT",t,t],[1,80,"Home",14,"Home",36,"VK_HOME",t,t],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",t,t],[1,82,"Delete",20,"Delete",46,"VK_DELETE",t,t],[1,83,"End",13,"End",35,"VK_END",t,t],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",t,t],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",t],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",t],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",t],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",t],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",t,t],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",t,t],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",t,t],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",t,t],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",t,t],[1,94,"NumpadEnter",3,t,0,t,t,t],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",t,t],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",t,t],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",t,t],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",t,t],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",t,t],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",t,t],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",t,t],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",t,t],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",t,t],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",t,t],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",t,t],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",t,t],[1,107,"ContextMenu",58,"ContextMenu",93,t,t,t],[1,108,"Power",0,t,0,t,t,t],[1,109,"NumpadEqual",0,t,0,t,t,t],[1,110,"F13",71,"F13",124,"VK_F13",t,t],[1,111,"F14",72,"F14",125,"VK_F14",t,t],[1,112,"F15",73,"F15",126,"VK_F15",t,t],[1,113,"F16",74,"F16",127,"VK_F16",t,t],[1,114,"F17",75,"F17",128,"VK_F17",t,t],[1,115,"F18",76,"F18",129,"VK_F18",t,t],[1,116,"F19",77,"F19",130,"VK_F19",t,t],[1,117,"F20",78,"F20",131,"VK_F20",t,t],[1,118,"F21",79,"F21",132,"VK_F21",t,t],[1,119,"F22",80,"F22",133,"VK_F22",t,t],[1,120,"F23",81,"F23",134,"VK_F23",t,t],[1,121,"F24",82,"F24",135,"VK_F24",t,t],[1,122,"Open",0,t,0,t,t,t],[1,123,"Help",0,t,0,t,t,t],[1,124,"Select",0,t,0,t,t,t],[1,125,"Again",0,t,0,t,t,t],[1,126,"Undo",0,t,0,t,t,t],[1,127,"Cut",0,t,0,t,t,t],[1,128,"Copy",0,t,0,t,t,t],[1,129,"Paste",0,t,0,t,t,t],[1,130,"Find",0,t,0,t,t,t],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",t,t],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",t,t],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",t,t],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",t,t],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",t,t],[1,136,"KanaMode",0,t,0,t,t,t],[0,137,"IntlYen",0,t,0,t,t,t],[1,138,"Convert",0,t,0,t,t,t],[1,139,"NonConvert",0,t,0,t,t,t],[1,140,"Lang1",0,t,0,t,t,t],[1,141,"Lang2",0,t,0,t,t,t],[1,142,"Lang3",0,t,0,t,t,t],[1,143,"Lang4",0,t,0,t,t,t],[1,144,"Lang5",0,t,0,t,t,t],[1,145,"Abort",0,t,0,t,t,t],[1,146,"Props",0,t,0,t,t,t],[1,147,"NumpadParenLeft",0,t,0,t,t,t],[1,148,"NumpadParenRight",0,t,0,t,t,t],[1,149,"NumpadBackspace",0,t,0,t,t,t],[1,150,"NumpadMemoryStore",0,t,0,t,t,t],[1,151,"NumpadMemoryRecall",0,t,0,t,t,t],[1,152,"NumpadMemoryClear",0,t,0,t,t,t],[1,153,"NumpadMemoryAdd",0,t,0,t,t,t],[1,154,"NumpadMemorySubtract",0,t,0,t,t,t],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",t,t],[1,156,"NumpadClearEntry",0,t,0,t,t,t],[1,0,t,5,"Ctrl",17,"VK_CONTROL",t,t],[1,0,t,4,"Shift",16,"VK_SHIFT",t,t],[1,0,t,6,"Alt",18,"VK_MENU",t,t],[1,0,t,57,"Meta",91,"VK_COMMAND",t,t],[1,157,"ControlLeft",5,t,0,"VK_LCONTROL",t,t],[1,158,"ShiftLeft",4,t,0,"VK_LSHIFT",t,t],[1,159,"AltLeft",6,t,0,"VK_LMENU",t,t],[1,160,"MetaLeft",57,t,0,"VK_LWIN",t,t],[1,161,"ControlRight",5,t,0,"VK_RCONTROL",t,t],[1,162,"ShiftRight",4,t,0,"VK_RSHIFT",t,t],[1,163,"AltRight",6,t,0,"VK_RMENU",t,t],[1,164,"MetaRight",57,t,0,"VK_RWIN",t,t],[1,165,"BrightnessUp",0,t,0,t,t,t],[1,166,"BrightnessDown",0,t,0,t,t,t],[1,167,"MediaPlay",0,t,0,t,t,t],[1,168,"MediaRecord",0,t,0,t,t,t],[1,169,"MediaFastForward",0,t,0,t,t,t],[1,170,"MediaRewind",0,t,0,t,t,t],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",t,t],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",t,t],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",t,t],[1,174,"Eject",0,t,0,t,t,t],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",t,t],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",t,t],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",t,t],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",t,t],[1,179,"LaunchApp1",0,t,0,"VK_MEDIA_LAUNCH_APP1",t,t],[1,180,"SelectTask",0,t,0,t,t,t],[1,181,"LaunchScreenSaver",0,t,0,t,t,t],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",t,t],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",t,t],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",t,t],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",t,t],[1,186,"BrowserStop",0,t,0,"VK_BROWSER_STOP",t,t],[1,187,"BrowserRefresh",0,t,0,"VK_BROWSER_REFRESH",t,t],[1,188,"BrowserFavorites",0,t,0,"VK_BROWSER_FAVORITES",t,t],[1,189,"ZoomToggle",0,t,0,t,t,t],[1,190,"MailReply",0,t,0,t,t,t],[1,191,"MailForward",0,t,0,t,t,t],[1,192,"MailSend",0,t,0,t,t,t],[1,0,t,114,"KeyInComposition",229,t,t,t],[1,0,t,116,"ABNT_C2",194,"VK_ABNT_C2",t,t],[1,0,t,96,"OEM_8",223,"VK_OEM_8",t,t],[1,0,t,0,t,0,"VK_KANA",t,t],[1,0,t,0,t,0,"VK_HANGUL",t,t],[1,0,t,0,t,0,"VK_JUNJA",t,t],[1,0,t,0,t,0,"VK_FINAL",t,t],[1,0,t,0,t,0,"VK_HANJA",t,t],[1,0,t,0,t,0,"VK_KANJI",t,t],[1,0,t,0,t,0,"VK_CONVERT",t,t],[1,0,t,0,t,0,"VK_NONCONVERT",t,t],[1,0,t,0,t,0,"VK_ACCEPT",t,t],[1,0,t,0,t,0,"VK_MODECHANGE",t,t],[1,0,t,0,t,0,"VK_SELECT",t,t],[1,0,t,0,t,0,"VK_PRINT",t,t],[1,0,t,0,t,0,"VK_EXECUTE",t,t],[1,0,t,0,t,0,"VK_SNAPSHOT",t,t],[1,0,t,0,t,0,"VK_HELP",t,t],[1,0,t,0,t,0,"VK_APPS",t,t],[1,0,t,0,t,0,"VK_PROCESSKEY",t,t],[1,0,t,0,t,0,"VK_PACKET",t,t],[1,0,t,0,t,0,"VK_DBE_SBCSCHAR",t,t],[1,0,t,0,t,0,"VK_DBE_DBCSCHAR",t,t],[1,0,t,0,t,0,"VK_ATTN",t,t],[1,0,t,0,t,0,"VK_CRSEL",t,t],[1,0,t,0,t,0,"VK_EXSEL",t,t],[1,0,t,0,t,0,"VK_EREOF",t,t],[1,0,t,0,t,0,"VK_PLAY",t,t],[1,0,t,0,t,0,"VK_ZOOM",t,t],[1,0,t,0,t,0,"VK_NONAME",t,t],[1,0,t,0,t,0,"VK_PA1",t,t],[1,0,t,0,t,0,"VK_OEM_CLEAR",t,t]],n=[],r=[];for(let i of e){let[s,o,a,l,c,h,d,f,m]=i;if(r[o]||(r[o]=!0,Lu[o]=a,zu[a]=o,Pu[a.toLowerCase()]=o,s&&(ca[o]=l,l!==0&&l!==3&&l!==5&&l!==4&&l!==6&&l!==57&&(is[l]=o))),!n[l]){if(n[l]=!0,!c)throw new Error(`String representation missing for key code ${l} around scan code ${a}`);Rr.define(l,c),ns.define(l,f||c),rs.define(l,m||f||c)}h&&(Mu[h]=l),d&&(Nu[d]=l)}is[3]=46})();var la;(function(t){function e(a){return Rr.keyCodeToStr(a)}t.toString=e;function n(a){return Rr.strToKeyCode(a)}t.fromString=n;function r(a){return ns.keyCodeToStr(a)}t.toUserSettingsUS=r;function i(a){return rs.keyCodeToStr(a)}t.toUserSettingsGeneral=i;function s(a){return ns.strToKeyCode(a)||rs.strToKeyCode(a)}t.fromUserSettings=s;function o(a){if(a>=98&&a<=113)return null;switch(a){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return Rr.keyCodeToStr(a)}t.toElectronAccelerator=o})(la||(la={}));function ha(t,e){let n=(e&65535)<<16>>>0;return(t|n)>>>0}var Dr=class t extends ie{constructor(e,n,r,i){super(e,n,r,i),this.selectionStartLineNumber=e,this.selectionStartColumn=n,this.positionLineNumber=r,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return t.selectionsEqual(this,e)}static selectionsEqual(e,n){return e.selectionStartLineNumber===n.selectionStartLineNumber&&e.selectionStartColumn===n.selectionStartColumn&&e.positionLineNumber===n.positionLineNumber&&e.positionColumn===n.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,n){return this.getDirection()===0?new t(this.startLineNumber,this.startColumn,e,n):new t(e,n,this.startLineNumber,this.startColumn)}getPosition(){return new we(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new we(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,n){return this.getDirection()===0?new t(e,n,this.endLineNumber,this.endColumn):new t(this.endLineNumber,this.endColumn,e,n)}static fromPositions(e,n=e){return new t(e.lineNumber,e.column,n.lineNumber,n.column)}static fromRange(e,n){return n===0?new t(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new t(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new t(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,n){if(e&&!n||!e&&n)return!1;if(!e&&!n)return!0;if(e.length!==n.length)return!1;for(let r=0,i=e.length;r{this._tokenizationSupports.get(e)===n&&(this._tokenizationSupports.delete(e),this.handleChange([e]))})}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,n){var r;(r=this._factories.get(e))===null||r===void 0||r.dispose();let i=new ss(this,e,n);return this._factories.set(e,i),qt(()=>{let s=this._factories.get(e);!s||s!==i||(this._factories.delete(e),s.dispose())})}async getOrCreate(e){let n=this.get(e);if(n)return n;let r=this._factories.get(e);return!r||r.isResolved?null:(await r.resolve(),this.get(e))}isResolved(e){if(this.get(e))return!0;let r=this._factories.get(e);return!!(!r||r.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}},ss=class extends We{get isResolved(){return this._isResolved}constructor(e,n,r){super(),this._registry=e,this._languageId=n,this._factory=r,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){let e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}};var Mr=class{constructor(e,n,r){this.offset=e,this.type=n,this.language=r,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}};var da;(function(t){let e=new Map;e.set(0,V.symbolMethod),e.set(1,V.symbolFunction),e.set(2,V.symbolConstructor),e.set(3,V.symbolField),e.set(4,V.symbolVariable),e.set(5,V.symbolClass),e.set(6,V.symbolStruct),e.set(7,V.symbolInterface),e.set(8,V.symbolModule),e.set(9,V.symbolProperty),e.set(10,V.symbolEvent),e.set(11,V.symbolOperator),e.set(12,V.symbolUnit),e.set(13,V.symbolValue),e.set(15,V.symbolEnum),e.set(14,V.symbolConstant),e.set(15,V.symbolEnum),e.set(16,V.symbolEnumMember),e.set(17,V.symbolKeyword),e.set(27,V.symbolSnippet),e.set(18,V.symbolText),e.set(19,V.symbolColor),e.set(20,V.symbolFile),e.set(21,V.symbolReference),e.set(22,V.symbolCustomColor),e.set(23,V.symbolFolder),e.set(24,V.symbolTypeParameter),e.set(25,V.account),e.set(26,V.issues);function n(s){let o=e.get(s);return o||(console.info("No codicon found for CompletionItemKind "+s),o=V.symbolProperty),o}t.toIcon=n;let r=new Map;r.set("method",0),r.set("function",1),r.set("constructor",2),r.set("field",3),r.set("variable",4),r.set("class",5),r.set("struct",6),r.set("interface",7),r.set("module",8),r.set("property",9),r.set("event",10),r.set("operator",11),r.set("unit",12),r.set("value",13),r.set("constant",14),r.set("enum",15),r.set("enum-member",16),r.set("enumMember",16),r.set("keyword",17),r.set("snippet",27),r.set("text",18),r.set("color",19),r.set("file",20),r.set("reference",21),r.set("customcolor",22),r.set("folder",23),r.set("type-parameter",24),r.set("typeParameter",24),r.set("account",25),r.set("issue",26);function i(s,o){let a=r.get(s);return typeof a>"u"&&!o&&(a=9),a}t.fromString=i})(da||(da={}));var pa;(function(t){t[t.Automatic=0]="Automatic",t[t.Explicit=1]="Explicit"})(pa||(pa={}));var fa;(function(t){t[t.Invoke=1]="Invoke",t[t.TriggerCharacter=2]="TriggerCharacter",t[t.ContentChange=3]="ContentChange"})(fa||(fa={}));var ma;(function(t){t[t.Text=0]="Text",t[t.Read=1]="Read",t[t.Write=2]="Write"})(ma||(ma={}));var P1={17:oe("Array","array"),16:oe("Boolean","boolean"),4:oe("Class","class"),13:oe("Constant","constant"),8:oe("Constructor","constructor"),9:oe("Enum","enumeration"),21:oe("EnumMember","enumeration member"),23:oe("Event","event"),7:oe("Field","field"),0:oe("File","file"),11:oe("Function","function"),10:oe("Interface","interface"),19:oe("Key","key"),5:oe("Method","method"),1:oe("Module","module"),2:oe("Namespace","namespace"),20:oe("Null","null"),15:oe("Number","number"),18:oe("Object","object"),24:oe("Operator","operator"),3:oe("Package","package"),6:oe("Property","property"),14:oe("String","string"),22:oe("Struct","struct"),25:oe("TypeParameter","type parameter"),12:oe("Variable","variable")};var ga;(function(t){let e=new Map;e.set(0,V.symbolFile),e.set(1,V.symbolModule),e.set(2,V.symbolNamespace),e.set(3,V.symbolPackage),e.set(4,V.symbolClass),e.set(5,V.symbolMethod),e.set(6,V.symbolProperty),e.set(7,V.symbolField),e.set(8,V.symbolConstructor),e.set(9,V.symbolEnum),e.set(10,V.symbolInterface),e.set(11,V.symbolFunction),e.set(12,V.symbolVariable),e.set(13,V.symbolConstant),e.set(14,V.symbolString),e.set(15,V.symbolNumber),e.set(16,V.symbolBoolean),e.set(17,V.symbolArray),e.set(18,V.symbolObject),e.set(19,V.symbolKey),e.set(20,V.symbolNull),e.set(21,V.symbolEnumMember),e.set(22,V.symbolStruct),e.set(23,V.symbolEvent),e.set(24,V.symbolOperator),e.set(25,V.symbolTypeParameter);function n(r){let i=e.get(r);return i||(console.info("No codicon found for SymbolKind "+r),i=V.symbolProperty),i}t.toIcon=n})(ga||(ga={}));var xt=class t{static fromValue(e){switch(e){case"comment":return t.Comment;case"imports":return t.Imports;case"region":return t.Region}return new t(e)}constructor(e){this.value=e}};xt.Comment=new xt("comment");xt.Imports=new xt("imports");xt.Region=new xt("region");var ba;(function(t){function e(n){return!n||typeof n!="object"?!1:typeof n.id=="string"&&typeof n.title=="string"}t.is=e})(ba||(ba={}));var va;(function(t){t[t.Type=1]="Type",t[t.Parameter=2]="Parameter"})(va||(va={}));var I1=new Ar;var ya;(function(t){t[t.Unknown=0]="Unknown",t[t.Disabled=1]="Disabled",t[t.Enabled=2]="Enabled"})(ya||(ya={}));var wa;(function(t){t[t.Invoke=1]="Invoke",t[t.Auto=2]="Auto"})(wa||(wa={}));var xa;(function(t){t[t.None=0]="None",t[t.KeepWhitespace=1]="KeepWhitespace",t[t.InsertAsSnippet=4]="InsertAsSnippet"})(xa||(xa={}));var Sa;(function(t){t[t.Method=0]="Method",t[t.Function=1]="Function",t[t.Constructor=2]="Constructor",t[t.Field=3]="Field",t[t.Variable=4]="Variable",t[t.Class=5]="Class",t[t.Struct=6]="Struct",t[t.Interface=7]="Interface",t[t.Module=8]="Module",t[t.Property=9]="Property",t[t.Event=10]="Event",t[t.Operator=11]="Operator",t[t.Unit=12]="Unit",t[t.Value=13]="Value",t[t.Constant=14]="Constant",t[t.Enum=15]="Enum",t[t.EnumMember=16]="EnumMember",t[t.Keyword=17]="Keyword",t[t.Text=18]="Text",t[t.Color=19]="Color",t[t.File=20]="File",t[t.Reference=21]="Reference",t[t.Customcolor=22]="Customcolor",t[t.Folder=23]="Folder",t[t.TypeParameter=24]="TypeParameter",t[t.User=25]="User",t[t.Issue=26]="Issue",t[t.Snippet=27]="Snippet"})(Sa||(Sa={}));var _a;(function(t){t[t.Deprecated=1]="Deprecated"})(_a||(_a={}));var Ca;(function(t){t[t.Invoke=0]="Invoke",t[t.TriggerCharacter=1]="TriggerCharacter",t[t.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(Ca||(Ca={}));var ka;(function(t){t[t.EXACT=0]="EXACT",t[t.ABOVE=1]="ABOVE",t[t.BELOW=2]="BELOW"})(ka||(ka={}));var Ea;(function(t){t[t.NotSet=0]="NotSet",t[t.ContentFlush=1]="ContentFlush",t[t.RecoverFromMarkers=2]="RecoverFromMarkers",t[t.Explicit=3]="Explicit",t[t.Paste=4]="Paste",t[t.Undo=5]="Undo",t[t.Redo=6]="Redo"})(Ea||(Ea={}));var Fa;(function(t){t[t.LF=1]="LF",t[t.CRLF=2]="CRLF"})(Fa||(Fa={}));var Ra;(function(t){t[t.Text=0]="Text",t[t.Read=1]="Read",t[t.Write=2]="Write"})(Ra||(Ra={}));var Da;(function(t){t[t.None=0]="None",t[t.Keep=1]="Keep",t[t.Brackets=2]="Brackets",t[t.Advanced=3]="Advanced",t[t.Full=4]="Full"})(Da||(Da={}));var Aa;(function(t){t[t.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",t[t.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",t[t.accessibilitySupport=2]="accessibilitySupport",t[t.accessibilityPageSize=3]="accessibilityPageSize",t[t.ariaLabel=4]="ariaLabel",t[t.ariaRequired=5]="ariaRequired",t[t.autoClosingBrackets=6]="autoClosingBrackets",t[t.autoClosingComments=7]="autoClosingComments",t[t.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",t[t.autoClosingDelete=9]="autoClosingDelete",t[t.autoClosingOvertype=10]="autoClosingOvertype",t[t.autoClosingQuotes=11]="autoClosingQuotes",t[t.autoIndent=12]="autoIndent",t[t.automaticLayout=13]="automaticLayout",t[t.autoSurround=14]="autoSurround",t[t.bracketPairColorization=15]="bracketPairColorization",t[t.guides=16]="guides",t[t.codeLens=17]="codeLens",t[t.codeLensFontFamily=18]="codeLensFontFamily",t[t.codeLensFontSize=19]="codeLensFontSize",t[t.colorDecorators=20]="colorDecorators",t[t.colorDecoratorsLimit=21]="colorDecoratorsLimit",t[t.columnSelection=22]="columnSelection",t[t.comments=23]="comments",t[t.contextmenu=24]="contextmenu",t[t.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",t[t.cursorBlinking=26]="cursorBlinking",t[t.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",t[t.cursorStyle=28]="cursorStyle",t[t.cursorSurroundingLines=29]="cursorSurroundingLines",t[t.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",t[t.cursorWidth=31]="cursorWidth",t[t.disableLayerHinting=32]="disableLayerHinting",t[t.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",t[t.domReadOnly=34]="domReadOnly",t[t.dragAndDrop=35]="dragAndDrop",t[t.dropIntoEditor=36]="dropIntoEditor",t[t.emptySelectionClipboard=37]="emptySelectionClipboard",t[t.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",t[t.extraEditorClassName=39]="extraEditorClassName",t[t.fastScrollSensitivity=40]="fastScrollSensitivity",t[t.find=41]="find",t[t.fixedOverflowWidgets=42]="fixedOverflowWidgets",t[t.folding=43]="folding",t[t.foldingStrategy=44]="foldingStrategy",t[t.foldingHighlight=45]="foldingHighlight",t[t.foldingImportsByDefault=46]="foldingImportsByDefault",t[t.foldingMaximumRegions=47]="foldingMaximumRegions",t[t.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",t[t.fontFamily=49]="fontFamily",t[t.fontInfo=50]="fontInfo",t[t.fontLigatures=51]="fontLigatures",t[t.fontSize=52]="fontSize",t[t.fontWeight=53]="fontWeight",t[t.fontVariations=54]="fontVariations",t[t.formatOnPaste=55]="formatOnPaste",t[t.formatOnType=56]="formatOnType",t[t.glyphMargin=57]="glyphMargin",t[t.gotoLocation=58]="gotoLocation",t[t.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",t[t.hover=60]="hover",t[t.inDiffEditor=61]="inDiffEditor",t[t.inlineSuggest=62]="inlineSuggest",t[t.letterSpacing=63]="letterSpacing",t[t.lightbulb=64]="lightbulb",t[t.lineDecorationsWidth=65]="lineDecorationsWidth",t[t.lineHeight=66]="lineHeight",t[t.lineNumbers=67]="lineNumbers",t[t.lineNumbersMinChars=68]="lineNumbersMinChars",t[t.linkedEditing=69]="linkedEditing",t[t.links=70]="links",t[t.matchBrackets=71]="matchBrackets",t[t.minimap=72]="minimap",t[t.mouseStyle=73]="mouseStyle",t[t.mouseWheelScrollSensitivity=74]="mouseWheelScrollSensitivity",t[t.mouseWheelZoom=75]="mouseWheelZoom",t[t.multiCursorMergeOverlapping=76]="multiCursorMergeOverlapping",t[t.multiCursorModifier=77]="multiCursorModifier",t[t.multiCursorPaste=78]="multiCursorPaste",t[t.multiCursorLimit=79]="multiCursorLimit",t[t.occurrencesHighlight=80]="occurrencesHighlight",t[t.overviewRulerBorder=81]="overviewRulerBorder",t[t.overviewRulerLanes=82]="overviewRulerLanes",t[t.padding=83]="padding",t[t.pasteAs=84]="pasteAs",t[t.parameterHints=85]="parameterHints",t[t.peekWidgetDefaultFocus=86]="peekWidgetDefaultFocus",t[t.definitionLinkOpensInPeek=87]="definitionLinkOpensInPeek",t[t.quickSuggestions=88]="quickSuggestions",t[t.quickSuggestionsDelay=89]="quickSuggestionsDelay",t[t.readOnly=90]="readOnly",t[t.readOnlyMessage=91]="readOnlyMessage",t[t.renameOnType=92]="renameOnType",t[t.renderControlCharacters=93]="renderControlCharacters",t[t.renderFinalNewline=94]="renderFinalNewline",t[t.renderLineHighlight=95]="renderLineHighlight",t[t.renderLineHighlightOnlyWhenFocus=96]="renderLineHighlightOnlyWhenFocus",t[t.renderValidationDecorations=97]="renderValidationDecorations",t[t.renderWhitespace=98]="renderWhitespace",t[t.revealHorizontalRightPadding=99]="revealHorizontalRightPadding",t[t.roundedSelection=100]="roundedSelection",t[t.rulers=101]="rulers",t[t.scrollbar=102]="scrollbar",t[t.scrollBeyondLastColumn=103]="scrollBeyondLastColumn",t[t.scrollBeyondLastLine=104]="scrollBeyondLastLine",t[t.scrollPredominantAxis=105]="scrollPredominantAxis",t[t.selectionClipboard=106]="selectionClipboard",t[t.selectionHighlight=107]="selectionHighlight",t[t.selectOnLineNumbers=108]="selectOnLineNumbers",t[t.showFoldingControls=109]="showFoldingControls",t[t.showUnused=110]="showUnused",t[t.snippetSuggestions=111]="snippetSuggestions",t[t.smartSelect=112]="smartSelect",t[t.smoothScrolling=113]="smoothScrolling",t[t.stickyScroll=114]="stickyScroll",t[t.stickyTabStops=115]="stickyTabStops",t[t.stopRenderingLineAfter=116]="stopRenderingLineAfter",t[t.suggest=117]="suggest",t[t.suggestFontSize=118]="suggestFontSize",t[t.suggestLineHeight=119]="suggestLineHeight",t[t.suggestOnTriggerCharacters=120]="suggestOnTriggerCharacters",t[t.suggestSelection=121]="suggestSelection",t[t.tabCompletion=122]="tabCompletion",t[t.tabIndex=123]="tabIndex",t[t.unicodeHighlighting=124]="unicodeHighlighting",t[t.unusualLineTerminators=125]="unusualLineTerminators",t[t.useShadowDOM=126]="useShadowDOM",t[t.useTabStops=127]="useTabStops",t[t.wordBreak=128]="wordBreak",t[t.wordSeparators=129]="wordSeparators",t[t.wordWrap=130]="wordWrap",t[t.wordWrapBreakAfterCharacters=131]="wordWrapBreakAfterCharacters",t[t.wordWrapBreakBeforeCharacters=132]="wordWrapBreakBeforeCharacters",t[t.wordWrapColumn=133]="wordWrapColumn",t[t.wordWrapOverride1=134]="wordWrapOverride1",t[t.wordWrapOverride2=135]="wordWrapOverride2",t[t.wrappingIndent=136]="wrappingIndent",t[t.wrappingStrategy=137]="wrappingStrategy",t[t.showDeprecated=138]="showDeprecated",t[t.inlayHints=139]="inlayHints",t[t.editorClassName=140]="editorClassName",t[t.pixelRatio=141]="pixelRatio",t[t.tabFocusMode=142]="tabFocusMode",t[t.layoutInfo=143]="layoutInfo",t[t.wrappingInfo=144]="wrappingInfo",t[t.defaultColorDecorators=145]="defaultColorDecorators",t[t.colorDecoratorsActivatedOn=146]="colorDecoratorsActivatedOn",t[t.inlineCompletionsAccessibilityVerbose=147]="inlineCompletionsAccessibilityVerbose"})(Aa||(Aa={}));var Ma;(function(t){t[t.TextDefined=0]="TextDefined",t[t.LF=1]="LF",t[t.CRLF=2]="CRLF"})(Ma||(Ma={}));var Na;(function(t){t[t.LF=0]="LF",t[t.CRLF=1]="CRLF"})(Na||(Na={}));var La;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=3]="Right"})(La||(La={}));var za;(function(t){t[t.None=0]="None",t[t.Indent=1]="Indent",t[t.IndentOutdent=2]="IndentOutdent",t[t.Outdent=3]="Outdent"})(za||(za={}));var Pa;(function(t){t[t.Both=0]="Both",t[t.Right=1]="Right",t[t.Left=2]="Left",t[t.None=3]="None"})(Pa||(Pa={}));var Ia;(function(t){t[t.Type=1]="Type",t[t.Parameter=2]="Parameter"})(Ia||(Ia={}));var Ta;(function(t){t[t.Automatic=0]="Automatic",t[t.Explicit=1]="Explicit"})(Ta||(Ta={}));var Nr;(function(t){t[t.DependsOnKbLayout=-1]="DependsOnKbLayout",t[t.Unknown=0]="Unknown",t[t.Backspace=1]="Backspace",t[t.Tab=2]="Tab",t[t.Enter=3]="Enter",t[t.Shift=4]="Shift",t[t.Ctrl=5]="Ctrl",t[t.Alt=6]="Alt",t[t.PauseBreak=7]="PauseBreak",t[t.CapsLock=8]="CapsLock",t[t.Escape=9]="Escape",t[t.Space=10]="Space",t[t.PageUp=11]="PageUp",t[t.PageDown=12]="PageDown",t[t.End=13]="End",t[t.Home=14]="Home",t[t.LeftArrow=15]="LeftArrow",t[t.UpArrow=16]="UpArrow",t[t.RightArrow=17]="RightArrow",t[t.DownArrow=18]="DownArrow",t[t.Insert=19]="Insert",t[t.Delete=20]="Delete",t[t.Digit0=21]="Digit0",t[t.Digit1=22]="Digit1",t[t.Digit2=23]="Digit2",t[t.Digit3=24]="Digit3",t[t.Digit4=25]="Digit4",t[t.Digit5=26]="Digit5",t[t.Digit6=27]="Digit6",t[t.Digit7=28]="Digit7",t[t.Digit8=29]="Digit8",t[t.Digit9=30]="Digit9",t[t.KeyA=31]="KeyA",t[t.KeyB=32]="KeyB",t[t.KeyC=33]="KeyC",t[t.KeyD=34]="KeyD",t[t.KeyE=35]="KeyE",t[t.KeyF=36]="KeyF",t[t.KeyG=37]="KeyG",t[t.KeyH=38]="KeyH",t[t.KeyI=39]="KeyI",t[t.KeyJ=40]="KeyJ",t[t.KeyK=41]="KeyK",t[t.KeyL=42]="KeyL",t[t.KeyM=43]="KeyM",t[t.KeyN=44]="KeyN",t[t.KeyO=45]="KeyO",t[t.KeyP=46]="KeyP",t[t.KeyQ=47]="KeyQ",t[t.KeyR=48]="KeyR",t[t.KeyS=49]="KeyS",t[t.KeyT=50]="KeyT",t[t.KeyU=51]="KeyU",t[t.KeyV=52]="KeyV",t[t.KeyW=53]="KeyW",t[t.KeyX=54]="KeyX",t[t.KeyY=55]="KeyY",t[t.KeyZ=56]="KeyZ",t[t.Meta=57]="Meta",t[t.ContextMenu=58]="ContextMenu",t[t.F1=59]="F1",t[t.F2=60]="F2",t[t.F3=61]="F3",t[t.F4=62]="F4",t[t.F5=63]="F5",t[t.F6=64]="F6",t[t.F7=65]="F7",t[t.F8=66]="F8",t[t.F9=67]="F9",t[t.F10=68]="F10",t[t.F11=69]="F11",t[t.F12=70]="F12",t[t.F13=71]="F13",t[t.F14=72]="F14",t[t.F15=73]="F15",t[t.F16=74]="F16",t[t.F17=75]="F17",t[t.F18=76]="F18",t[t.F19=77]="F19",t[t.F20=78]="F20",t[t.F21=79]="F21",t[t.F22=80]="F22",t[t.F23=81]="F23",t[t.F24=82]="F24",t[t.NumLock=83]="NumLock",t[t.ScrollLock=84]="ScrollLock",t[t.Semicolon=85]="Semicolon",t[t.Equal=86]="Equal",t[t.Comma=87]="Comma",t[t.Minus=88]="Minus",t[t.Period=89]="Period",t[t.Slash=90]="Slash",t[t.Backquote=91]="Backquote",t[t.BracketLeft=92]="BracketLeft",t[t.Backslash=93]="Backslash",t[t.BracketRight=94]="BracketRight",t[t.Quote=95]="Quote",t[t.OEM_8=96]="OEM_8",t[t.IntlBackslash=97]="IntlBackslash",t[t.Numpad0=98]="Numpad0",t[t.Numpad1=99]="Numpad1",t[t.Numpad2=100]="Numpad2",t[t.Numpad3=101]="Numpad3",t[t.Numpad4=102]="Numpad4",t[t.Numpad5=103]="Numpad5",t[t.Numpad6=104]="Numpad6",t[t.Numpad7=105]="Numpad7",t[t.Numpad8=106]="Numpad8",t[t.Numpad9=107]="Numpad9",t[t.NumpadMultiply=108]="NumpadMultiply",t[t.NumpadAdd=109]="NumpadAdd",t[t.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",t[t.NumpadSubtract=111]="NumpadSubtract",t[t.NumpadDecimal=112]="NumpadDecimal",t[t.NumpadDivide=113]="NumpadDivide",t[t.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",t[t.ABNT_C1=115]="ABNT_C1",t[t.ABNT_C2=116]="ABNT_C2",t[t.AudioVolumeMute=117]="AudioVolumeMute",t[t.AudioVolumeUp=118]="AudioVolumeUp",t[t.AudioVolumeDown=119]="AudioVolumeDown",t[t.BrowserSearch=120]="BrowserSearch",t[t.BrowserHome=121]="BrowserHome",t[t.BrowserBack=122]="BrowserBack",t[t.BrowserForward=123]="BrowserForward",t[t.MediaTrackNext=124]="MediaTrackNext",t[t.MediaTrackPrevious=125]="MediaTrackPrevious",t[t.MediaStop=126]="MediaStop",t[t.MediaPlayPause=127]="MediaPlayPause",t[t.LaunchMediaPlayer=128]="LaunchMediaPlayer",t[t.LaunchMail=129]="LaunchMail",t[t.LaunchApp2=130]="LaunchApp2",t[t.Clear=131]="Clear",t[t.MAX_VALUE=132]="MAX_VALUE"})(Nr||(Nr={}));var Lr;(function(t){t[t.Hint=1]="Hint",t[t.Info=2]="Info",t[t.Warning=4]="Warning",t[t.Error=8]="Error"})(Lr||(Lr={}));var zr;(function(t){t[t.Unnecessary=1]="Unnecessary",t[t.Deprecated=2]="Deprecated"})(zr||(zr={}));var Oa;(function(t){t[t.Inline=1]="Inline",t[t.Gutter=2]="Gutter"})(Oa||(Oa={}));var Wa;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.TEXTAREA=1]="TEXTAREA",t[t.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",t[t.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",t[t.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",t[t.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",t[t.CONTENT_TEXT=6]="CONTENT_TEXT",t[t.CONTENT_EMPTY=7]="CONTENT_EMPTY",t[t.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",t[t.CONTENT_WIDGET=9]="CONTENT_WIDGET",t[t.OVERVIEW_RULER=10]="OVERVIEW_RULER",t[t.SCROLLBAR=11]="SCROLLBAR",t[t.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",t[t.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(Wa||(Wa={}));var Ua;(function(t){t[t.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",t[t.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",t[t.TOP_CENTER=2]="TOP_CENTER"})(Ua||(Ua={}));var Ba;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=4]="Right",t[t.Full=7]="Full"})(Ba||(Ba={}));var Va;(function(t){t[t.Left=0]="Left",t[t.Right=1]="Right",t[t.None=2]="None",t[t.LeftOfInjectedText=3]="LeftOfInjectedText",t[t.RightOfInjectedText=4]="RightOfInjectedText"})(Va||(Va={}));var qa;(function(t){t[t.Off=0]="Off",t[t.On=1]="On",t[t.Relative=2]="Relative",t[t.Interval=3]="Interval",t[t.Custom=4]="Custom"})(qa||(qa={}));var ja;(function(t){t[t.None=0]="None",t[t.Text=1]="Text",t[t.Blocks=2]="Blocks"})(ja||(ja={}));var $a;(function(t){t[t.Smooth=0]="Smooth",t[t.Immediate=1]="Immediate"})($a||($a={}));var Ha;(function(t){t[t.Auto=1]="Auto",t[t.Hidden=2]="Hidden",t[t.Visible=3]="Visible"})(Ha||(Ha={}));var Pr;(function(t){t[t.LTR=0]="LTR",t[t.RTL=1]="RTL"})(Pr||(Pr={}));var Ga;(function(t){t.Off="off",t.OnCode="onCode",t.On="on"})(Ga||(Ga={}));var Ja;(function(t){t[t.Invoke=1]="Invoke",t[t.TriggerCharacter=2]="TriggerCharacter",t[t.ContentChange=3]="ContentChange"})(Ja||(Ja={}));var Xa;(function(t){t[t.File=0]="File",t[t.Module=1]="Module",t[t.Namespace=2]="Namespace",t[t.Package=3]="Package",t[t.Class=4]="Class",t[t.Method=5]="Method",t[t.Property=6]="Property",t[t.Field=7]="Field",t[t.Constructor=8]="Constructor",t[t.Enum=9]="Enum",t[t.Interface=10]="Interface",t[t.Function=11]="Function",t[t.Variable=12]="Variable",t[t.Constant=13]="Constant",t[t.String=14]="String",t[t.Number=15]="Number",t[t.Boolean=16]="Boolean",t[t.Array=17]="Array",t[t.Object=18]="Object",t[t.Key=19]="Key",t[t.Null=20]="Null",t[t.EnumMember=21]="EnumMember",t[t.Struct=22]="Struct",t[t.Event=23]="Event",t[t.Operator=24]="Operator",t[t.TypeParameter=25]="TypeParameter"})(Xa||(Xa={}));var Ya;(function(t){t[t.Deprecated=1]="Deprecated"})(Ya||(Ya={}));var Ka;(function(t){t[t.Hidden=0]="Hidden",t[t.Blink=1]="Blink",t[t.Smooth=2]="Smooth",t[t.Phase=3]="Phase",t[t.Expand=4]="Expand",t[t.Solid=5]="Solid"})(Ka||(Ka={}));var Qa;(function(t){t[t.Line=1]="Line",t[t.Block=2]="Block",t[t.Underline=3]="Underline",t[t.LineThin=4]="LineThin",t[t.BlockOutline=5]="BlockOutline",t[t.UnderlineThin=6]="UnderlineThin"})(Qa||(Qa={}));var Za;(function(t){t[t.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",t[t.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",t[t.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",t[t.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(Za||(Za={}));var el;(function(t){t[t.None=0]="None",t[t.Same=1]="Same",t[t.Indent=2]="Indent",t[t.DeepIndent=3]="DeepIndent"})(el||(el={}));var Lt=class{static chord(e,n){return ha(e,n)}};Lt.CtrlCmd=2048;Lt.Shift=1024;Lt.Alt=512;Lt.WinCtrl=256;function tl(){return{editor:void 0,languages:void 0,CancellationTokenSource:Fr,Emitter:_e,KeyCode:Nr,KeyMod:Lt,Position:we,Range:ie,Selection:Dr,SelectionDirection:Pr,MarkerSeverity:Lr,MarkerTag:zr,Uri:wt,Token:Mr}}var os=class extends Yt{constructor(e){super(0);for(let n=0,r=e.length;n(e.hasOwnProperty(n)||(e[n]=t(n)),e[n])}var Ou=Tu(t=>new os(t));var nl;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=4]="Right",t[t.Full=7]="Full"})(nl||(nl={}));var rl;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=3]="Right"})(rl||(rl={}));var il;(function(t){t[t.Inline=1]="Inline",t[t.Gutter=2]="Gutter"})(il||(il={}));var sl;(function(t){t[t.Both=0]="Both",t[t.Right=1]="Right",t[t.Left=2]="Left",t[t.None=3]="None"})(sl||(sl={}));function Wu(t,e,n,r,i){if(r===0)return!0;let s=e.charCodeAt(r-1);if(t.get(s)!==0||s===13||s===10)return!0;if(i>0){let o=e.charCodeAt(r);if(t.get(o)!==0)return!0}return!1}function Uu(t,e,n,r,i){if(r+i===n)return!0;let s=e.charCodeAt(r+i);if(t.get(s)!==0||s===13||s===10)return!0;if(i>0){let o=e.charCodeAt(r+i-1);if(t.get(o)!==0)return!0}return!1}function Bu(t,e,n,r,i){return Wu(t,e,n,r,i)&&Uu(t,e,n,r,i)}var Ir=class{constructor(e,n){this._wordSeparators=e,this._searchRegex=n,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){let n=e.length,r;do{if(this._prevMatchStartIndex+this._prevMatchLength===n||(r=this._searchRegex.exec(e),!r))return null;let i=r.index,s=r[0].length;if(i===this._prevMatchStartIndex&&s===this._prevMatchLength){if(s===0){To(e,n,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=i,this._prevMatchLength=s,!this._wordSeparators||Bu(this._wordSeparators,e,n,i,s))return r}while(r);return null}};function ol(t,e="Unreachable"){throw new Error(e)}function Zt(t){if(!t()){debugger;t(),lr(new Te("Assertion Failed"))}}function Tr(t,e){let n=0;for(;n0){let G=E.charCodeAt(C-1);Jt(G)&&C--}if(R+1=1e3){d=!0;break e}h.push(new ie(y,C+1,y,R+1))}}while(f)}return{ranges:h,hasMore:d,ambiguousCharacterCount:m,invisibleCharacterCount:b,nonBasicAsciiCharacterCount:g}}static computeUnicodeHighlightReason(e,n){let r=new Wr(n);switch(r.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{let s=e.codePointAt(0),o=r.ambiguousCharacters.getPrimaryConfusable(s),a=Ye.getLocales().filter(l=>!Ye.getInstance(new Set([...n.allowedLocales,l])).isAmbiguous(s));return{kind:0,confusableWith:String.fromCodePoint(o),notAmbiguousInLocales:a}}case 1:return{kind:2}}}};function Vu(t,e){return`[${Lo(t.map(r=>String.fromCodePoint(r)).join(""))}]`}var Wr=class{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=Ye.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";let e=new Set;if(this.options.invisibleCharacters)for(let n of Mt.codePoints)al(String.fromCodePoint(n))||e.add(n);if(this.options.ambiguousCharacters)for(let n of this.ambiguousCharacters.getConfusableCodePoints())e.add(n);for(let n of this.allowedCodePoints)e.delete(n);return e}shouldHighlightNonBasicASCII(e,n){let r=e.codePointAt(0);if(this.allowedCodePoints.has(r))return 0;if(this.options.nonBasicASCII)return 1;let i=!1,s=!1;if(n)for(let o of n){let a=o.codePointAt(0),l=Oo(o);i=i||l,!l&&!this.ambiguousCharacters.isAmbiguous(a)&&!Mt.isInvisibleCharacter(a)&&(s=!0)}return!i&&s?0:this.options.invisibleCharacters&&!al(e)&&Mt.isInvisibleCharacter(r)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(r)?3:0}};function al(t){return t===" "||t===` +`||t===" "}var St=class{constructor(e,n,r){this.changes=e,this.moves=n,this.hitTimeout=r}},Ur=class{constructor(e,n){this.lineRangeMapping=e,this.changes=n}};var K=class t{static addRange(e,n){let r=0;for(;rn)throw new Te(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new t(this.start+e,this.endExclusive+e)}deltaStart(e){return new t(this.start+e,this.endExclusive)}deltaEnd(e){return new t(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new Te(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new Te(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let n=this.start;nn)throw new Te(`startLineNumber ${e} cannot be after endLineNumberExclusive ${n}`);this.startLineNumber=e,this.endLineNumberExclusive=n}contains(e){return this.startLineNumber<=e&&ei.endLineNumberExclusive>=e.startLineNumber),r=zt(this._normalizedRanges,i=>i.startLineNumber<=e.endLineNumberExclusive)+1;if(n===r)this._normalizedRanges.splice(n,0,e);else if(n===r-1){let i=this._normalizedRanges[n];this._normalizedRanges[n]=i.join(e)}else{let i=this._normalizedRanges[n].join(this._normalizedRanges[r-1]).join(e);this._normalizedRanges.splice(n,r-n,i)}}contains(e){let n=ot(this._normalizedRanges,r=>r.startLineNumber<=e);return!!n&&n.endLineNumberExclusive>e}intersects(e){let n=ot(this._normalizedRanges,r=>r.startLineNumbere.startLineNumber}getUnion(e){if(this._normalizedRanges.length===0)return e;if(e._normalizedRanges.length===0)return this;let n=[],r=0,i=0,s=null;for(;r=o.startLineNumber?s=new ee(s.startLineNumber,Math.max(s.endLineNumberExclusive,o.endLineNumberExclusive)):(n.push(s),s=o)}return s!==null&&n.push(s),new t(n)}subtractFrom(e){let n=Br(this._normalizedRanges,o=>o.endLineNumberExclusive>=e.startLineNumber),r=zt(this._normalizedRanges,o=>o.startLineNumber<=e.endLineNumberExclusive)+1;if(n===r)return new t([e]);let i=[],s=e.startLineNumber;for(let o=n;os&&i.push(new ee(s,a.startLineNumber)),s=a.endLineNumberExclusive}return se.toString()).join(", ")}getIntersection(e){let n=[],r=0,i=0;for(;rn.delta(e)))}};var _t=class t{static inverse(e,n,r){let i=[],s=1,o=1;for(let l of e){let c=new t(new ee(s,l.original.startLineNumber),new ee(o,l.modified.startLineNumber));c.modified.isEmpty||i.push(c),s=l.original.endLineNumberExclusive,o=l.modified.endLineNumberExclusive}let a=new t(new ee(s,n+1),new ee(o,r+1));return a.modified.isEmpty||i.push(a),i}static clip(e,n,r){let i=[];for(let s of e){let o=s.original.intersect(n),a=s.modified.intersect(r);o&&!o.isEmpty&&a&&!a.isEmpty&&i.push(new t(o,a))}return i}constructor(e,n){this.original=e,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new t(this.modified,this.original)}join(e){return new t(this.original.join(e.original),this.modified.join(e.modified))}},at=class t extends _t{constructor(e,n,r){super(e,n),this.innerChanges=r}flip(){var e;return new t(this.modified,this.original,(e=this.innerChanges)===null||e===void 0?void 0:e.map(n=>n.flip()))}},It=class t{constructor(e,n){this.originalRange=e,this.modifiedRange=n}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new t(this.modifiedRange,this.originalRange)}};var qu=3,Vr=class{computeDiff(e,n,r){var i;let o=new ls(e,n,{maxComputationTime:r.maxComputationTimeMs,shouldIgnoreTrimWhitespace:r.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),a=[],l=null;for(let c of o.changes){let h;c.originalEndLineNumber===0?h=new ee(c.originalStartLineNumber+1,c.originalStartLineNumber+1):h=new ee(c.originalStartLineNumber,c.originalEndLineNumber+1);let d;c.modifiedEndLineNumber===0?d=new ee(c.modifiedStartLineNumber+1,c.modifiedStartLineNumber+1):d=new ee(c.modifiedStartLineNumber,c.modifiedEndLineNumber+1);let f=new at(h,d,(i=c.charChanges)===null||i===void 0?void 0:i.map(m=>new It(new ie(m.originalStartLineNumber,m.originalStartColumn,m.originalEndLineNumber,m.originalEndColumn),new ie(m.modifiedStartLineNumber,m.modifiedStartColumn,m.modifiedEndLineNumber,m.modifiedEndColumn))));l&&(l.modified.endLineNumberExclusive===f.modified.startLineNumber||l.original.endLineNumberExclusive===f.original.startLineNumber)&&(f=new at(l.original.join(f.original),l.modified.join(f.modified),l.innerChanges&&f.innerChanges?l.innerChanges.concat(f.innerChanges):void 0),a.pop()),a.push(f),l=f}return Zt(()=>Tr(a,(c,h)=>h.original.startLineNumber-c.original.endLineNumberExclusive===h.modified.startLineNumber-c.modified.endLineNumberExclusive&&c.original.endLineNumberExclusive(e===10?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[n]},${this._columns[n]})`).join(", ")+"]"}_assertIndex(e,n){if(e<0||e>=n.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return e===-1?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),this._charCodes[e]===10?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return e===-1?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),this._charCodes[e]===10?1:this._columns[e]+1)}},tn=class t{constructor(e,n,r,i,s,o,a,l){this.originalStartLineNumber=e,this.originalStartColumn=n,this.originalEndLineNumber=r,this.originalEndColumn=i,this.modifiedStartLineNumber=s,this.modifiedStartColumn=o,this.modifiedEndLineNumber=a,this.modifiedEndColumn=l}static createFromDiffChange(e,n,r){let i=n.getStartLineNumber(e.originalStart),s=n.getStartColumn(e.originalStart),o=n.getEndLineNumber(e.originalStart+e.originalLength-1),a=n.getEndColumn(e.originalStart+e.originalLength-1),l=r.getStartLineNumber(e.modifiedStart),c=r.getStartColumn(e.modifiedStart),h=r.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),d=r.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new t(i,s,o,a,l,c,h,d)}};function ju(t){if(t.length<=1)return t;let e=[t[0]],n=e[0];for(let r=1,i=t.length;r0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&s()){let m=r.createCharSequence(e,n.originalStart,n.originalStart+n.originalLength-1),b=i.createCharSequence(e,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);if(m.getElements().length>0&&b.getElements().length>0){let g=hl(m,b,s,!0).changes;a&&(g=ju(g)),f=[];for(let y=0,_=g.length;y<_;y++)f.push(tn.createFromDiffChange(g[y],m,b))}}return new t(l,c,h,d,f)}},ls=class{constructor(e,n,r){this.shouldComputeCharChanges=r.shouldComputeCharChanges,this.shouldPostProcessCharChanges=r.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=r.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=r.shouldMakePrettyDiff,this.originalLines=e,this.modifiedLines=n,this.original=new qr(e),this.modified=new qr(n),this.continueLineDiff=cl(r.maxComputationTime),this.continueCharDiff=cl(r.maxComputationTime===0?0:Math.min(r.maxComputationTime,5e3))}computeDiff(){if(this.original.lines.length===1&&this.original.lines[0].length===0)return this.modified.lines.length===1&&this.modified.lines[0].length===0?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:void 0}]};if(this.modified.lines.length===1&&this.modified.lines[0].length===0)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:void 0}]};let e=hl(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),n=e.changes,r=e.quitEarly;if(this.shouldIgnoreTrimWhitespace){let a=[];for(let l=0,c=n.length;l1&&g>1;){let y=f.charCodeAt(b-2),_=m.charCodeAt(g-2);if(y!==_)break;b--,g--}(b>1||g>1)&&this._pushTrimWhitespaceCharChange(i,s+1,1,b,o+1,1,g)}{let b=hs(f,1),g=hs(m,1),y=f.length+1,_=m.length+1;for(;b!0;let e=Date.now();return()=>Date.now()-e{r.push(t.fromOffsetPairs(i?i.getEndExclusives():Le.zero,s?s.getStarts():new Le(n,(i?i.seq2Range.endExclusive-i.seq1Range.endExclusive:0)+n)))}),r}static fromOffsetPairs(e,n){return new t(new K(e.offset1,n.offset1),new K(e.offset2,n.offset2))}constructor(e,n){this.seq1Range=e,this.seq2Range=n}swap(){return new t(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new t(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return e===0?this:new t(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return e===0?this:new t(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return e===0?this:new t(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){let n=this.seq1Range.intersect(e.seq1Range),r=this.seq2Range.intersect(e.seq2Range);if(!(!n||!r))return new t(n,r)}getStarts(){return new Le(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new Le(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}},Le=class t{constructor(e,n){this.offset1=e,this.offset2=n}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return e===0?this:new t(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}};Le.zero=new Le(0,0);Le.max=new Le(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);var Qe=class{isValid(){return!0}};Qe.instance=new Qe;var jr=class{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new Te("timeout must be positive")}isValid(){if(!(Date.now()-this.startTime0&&g>0&&o.get(b-1,g-1)===3&&(E+=a.get(b-1,g-1)),E+=i?i(b,g):1):E=-1;let w=Math.max(y,_,E);if(w===E){let C=b>0&&g>0?a.get(b-1,g-1):0;a.set(b,g,C+1),o.set(b,g,3)}else w===y?(a.set(b,g,0),o.set(b,g,1)):w===_&&(a.set(b,g,0),o.set(b,g,2));s.set(b,g,w)}let l=[],c=e.length,h=n.length;function d(b,g){(b+1!==c||g+1!==h)&&l.push(new fe(new K(b+1,c),new K(g+1,h))),c=b,h=g}let f=e.length-1,m=n.length-1;for(;f>=0&&m>=0;)o.get(f,m)===3?(d(f,m),f--,m--):o.get(f,m)===1?f--:m--;return d(-1,-1),l.reverse(),new Ke(l,!1)}};var sn=class{compute(e,n,r=Qe.instance){if(e.length===0||n.length===0)return Ke.trivial(e,n);let i=e,s=n;function o(g,y){for(;gi.length||R>s.length)continue;let z=o(C,R);l.set(h,z);let O=C===E?c.get(h+1):c.get(h-1);if(c.set(h,z!==C?new Hr(O,C,R,z-C):O),l.get(h)===i.length&&l.get(h)-h===s.length)break e}}let d=c.get(h),f=[],m=i.length,b=s.length;for(;;){let g=d?d.x+d.length:0,y=d?d.y+d.length:0;if((g!==m||y!==b)&&f.push(new fe(new K(g,m),new K(y,b))),!d)break;m=d.x,b=d.y,d=d.prev}return f.reverse(),new Ke(f,!1)}},Hr=class{constructor(e,n,r,i){this.prev=e,this.x=n,this.y=r,this.length=i}},us=class{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){if(e<0){if(e=-e-1,e>=this.negativeArr.length){let r=this.negativeArr;this.negativeArr=new Int32Array(r.length*2),this.negativeArr.set(r)}this.negativeArr[e]=n}else{if(e>=this.positiveArr.length){let r=this.positiveArr;this.positiveArr=new Int32Array(r.length*2),this.positiveArr.set(r)}this.positiveArr[e]=n}}},ds=class{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){e<0?(e=-e-1,this.negativeArr[e]=n):this.positiveArr[e]=n}};var ul,dl,ps=class{constructor(e,n){this.uri=e,this.value=n}};function $u(t){return Array.isArray(t)}var fs=class t{constructor(e,n){if(this[ul]="ResourceMap",e instanceof t)this.map=new Map(e.map),this.toKey=n??t.defaultToKey;else if($u(e)){this.map=new Map,this.toKey=n??t.defaultToKey;for(let[r,i]of e)this.set(r,i)}else this.map=new Map,this.toKey=e??t.defaultToKey}set(e,n){return this.map.set(this.toKey(e),new ps(e,n)),this}get(e){var n;return(n=this.map.get(this.toKey(e)))===null||n===void 0?void 0:n.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,n){typeof n<"u"&&(e=e.bind(n));for(let[r,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]}*[(ul=Symbol.toStringTag,Symbol.iterator)](){for(let[,e]of this.map)yield[e.uri,e.value]}};fs.defaultToKey=t=>t.toString();var pl=class{constructor(){this[dl]="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(){var e;return(e=this._head)===null||e===void 0?void 0:e.value}get last(){var e;return(e=this._tail)===null||e===void 0?void 0:e.value}has(e){return this._map.has(e)}get(e,n=0){let r=this._map.get(e);if(r)return n!==0&&this.touch(r,n),r.value}set(e,n,r=0){let i=this._map.get(e);if(i)i.value=n,r!==0&&this.touch(i,r);else{switch(i={key:e,value:n,next:void 0,previous:void 0},r){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 n=this._map.get(e);if(n)return this._map.delete(e),this.removeItem(n),this._size--,n.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,n){let r=this._state,i=this._head;for(;i;){if(n?e.bind(n)(i.value,i.key,this):e(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let e=this,n=this._state,r=this._head,i={[Symbol.iterator](){return i},next(){if(e._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){let s={value:r.key,done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}values(){let e=this,n=this._state,r=this._head,i={[Symbol.iterator](){return i},next(){if(e._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){let s={value:r.value,done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}entries(){let e=this,n=this._state,r=this._head,i={[Symbol.iterator](){return i},next(){if(e._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){let s={value:[r.key,r.value],done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}[(dl=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>e;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=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 n=e.next,r=e.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}e.next=void 0,e.previous=void 0,this._state++}touch(e,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==1&&n!==2)){if(n===1){if(e===this._head)return;let r=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(n===2){if(e===this._tail)return;let r=e.next,i=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((n,r)=>{e.push([r,n])}),e}fromJSON(e){this.clear();for(let[n,r]of e)this.set(n,r)}};var Gr=class{constructor(){this.map=new Map}add(e,n){let r=this.map.get(e);r||(r=new Set,this.map.set(e,r)),r.add(n)}delete(e,n){let r=this.map.get(e);r&&(r.delete(n),r.size===0&&this.map.delete(e))}forEach(e,n){let r=this.map.get(e);r&&r.forEach(n)}get(e){let n=this.map.get(e);return n||new Set}};var Ct=class{constructor(e,n,r){this.lines=e,this.considerWhitespaceChanges=r,this.elements=[],this.firstCharOffsetByLine=[],this.additionalOffsetByLine=[];let i=!1;n.start>0&&n.endExclusive>=e.length&&(n=new K(n.start-1,n.endExclusive),i=!0),this.lineRange=n,this.firstCharOffsetByLine[0]=0;for(let s=this.lineRange.start;sString.fromCharCode(n)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){let n=ml(e>0?this.elements[e-1]:-1),r=ml(er<=e);return new we(this.lineRange.start+n+1,e-this.firstCharOffsetByLine[n]+this.additionalOffsetByLine[n]+1)}translateRange(e){return ie.fromPositions(this.translateOffset(e.start),this.translateOffset(e.endExclusive))}findWordContaining(e){if(e<0||e>=this.elements.length||!ms(this.elements[e]))return;let n=e;for(;n>0&&ms(this.elements[n-1]);)n--;let r=e;for(;ro<=e.start))!==null&&n!==void 0?n:0,s=(r=ll(this.firstCharOffsetByLine,o=>e.endExclusive<=o))!==null&&r!==void 0?r:this.elements.length;return new K(i,s)}};function ms(t){return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57}var Hu={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function fl(t){return Hu[t]}function ml(t){return t===10?8:t===13?7:Pn(t)?6:t>=97&&t<=122?0:t>=65&&t<=90?1:t>=48&&t<=57?2:t===-1?3:t===44||t===59?5:4}function bl(t,e,n,r,i,s){let{moves:o,excludedChanges:a}=Ju(t,e,n,s);if(!s.isValid())return[];let l=t.filter(h=>!a.has(h)),c=Xu(l,r,i,e,n,s);return ra(o,c),o=Yu(o),o=o.filter(h=>{let d=h.original.toOffsetRange().slice(e).map(m=>m.trim());return d.join(` +`).length>=15&&Gu(d,m=>m.length>=2)>=2}),o=Ku(t,o),o}function Gu(t,e){let n=0;for(let r of t)e(r)&&n++;return n}function Ju(t,e,n,r){let i=[],s=t.filter(l=>l.modified.isEmpty&&l.original.length>=3).map(l=>new rn(l.original,e,l)),o=new Set(t.filter(l=>l.original.isEmpty&&l.modified.length>=3).map(l=>new rn(l.modified,n,l))),a=new Set;for(let l of s){let c=-1,h;for(let d of o){let f=l.computeSimilarity(d);f>c&&(c=f,h=d)}if(c>.9&&h&&(o.delete(h),i.push(new _t(l.range,h.range)),a.add(l.source),a.add(h.source)),!r.isValid())return{moves:i,excludedChanges:a}}return{moves:i,excludedChanges:a}}function Xu(t,e,n,r,i,s){let o=[],a=new Gr;for(let f of t)for(let m=f.original.startLineNumber;mf.modified.startLineNumber,An));for(let f of t){let m=[];for(let b=f.modified.startLineNumber;b{for(let C of m)if(C.originalLineRange.endLineNumberExclusive+1===E.endLineNumberExclusive&&C.modifiedLineRange.endLineNumberExclusive+1===y.endLineNumberExclusive){C.originalLineRange=new ee(C.originalLineRange.startLineNumber,E.endLineNumberExclusive),C.modifiedLineRange=new ee(C.modifiedLineRange.startLineNumber,y.endLineNumberExclusive),_.push(C);return}let w={modifiedLineRange:y,originalLineRange:E};l.push(w),_.push(w)}),m=_}if(!s.isValid())return[]}l.sort(ia(Dn(f=>f.modifiedLineRange.length,An)));let c=new Pt,h=new Pt;for(let f of l){let m=f.modifiedLineRange.startLineNumber-f.originalLineRange.startLineNumber,b=c.subtractFrom(f.modifiedLineRange),g=h.subtractFrom(f.originalLineRange).getWithDelta(m),y=b.getIntersection(g);for(let _ of y.ranges){if(_.length<3)continue;let E=_,w=_.delta(-m);o.push(new _t(w,E)),c.addRange(E),h.addRange(w)}}o.sort(Dn(f=>f.original.startLineNumber,An));let d=new en(t);for(let f=0;fz.original.startLineNumber<=m.original.startLineNumber),g=ot(t,z=>z.modified.startLineNumber<=m.modified.startLineNumber),y=Math.max(m.original.startLineNumber-b.original.startLineNumber,m.modified.startLineNumber-g.modified.startLineNumber),_=d.findLastMonotonous(z=>z.original.startLineNumberz.modified.startLineNumberr.length||O>i.length||c.contains(O)||h.contains(z)||!gl(r[z-1],i[O-1],s))break}C>0&&(h.addRange(new ee(m.original.startLineNumber-C,m.original.startLineNumber)),c.addRange(new ee(m.modified.startLineNumber-C,m.modified.startLineNumber)));let R;for(R=0;Rr.length||O>i.length||c.contains(O)||h.contains(z)||!gl(r[z-1],i[O-1],s))break}R>0&&(h.addRange(new ee(m.original.endLineNumberExclusive,m.original.endLineNumberExclusive+R)),c.addRange(new ee(m.modified.endLineNumberExclusive,m.modified.endLineNumberExclusive+R))),(C>0||R>0)&&(o[f]=new _t(new ee(m.original.startLineNumber-C,m.original.endLineNumberExclusive+R),new ee(m.modified.startLineNumber-C,m.modified.endLineNumberExclusive+R)))}return o}function gl(t,e,n){if(t.trim()===e.trim())return!0;if(t.length>300&&e.length>300)return!1;let i=new sn().compute(new Ct([t],new K(0,1),!1),new Ct([e],new K(0,1),!1),n),s=0,o=fe.invert(i.diffs,t.length);for(let h of o)h.seq1Range.forEach(d=>{Pn(t.charCodeAt(d))||s++});function a(h){let d=0;for(let f=0;fe.length?t:e);return s/l>.6&&l>10}function Yu(t){if(t.length===0)return t;t.sort(Dn(n=>n.original.startLineNumber,An));let e=[t[0]];for(let n=1;n=0&&o>=0&&s+o<=2){e[e.length-1]=r.join(i);continue}e.push(i)}return e}function Ku(t,e){let n=new en(t);return e=e.filter(r=>{let i=n.findLastMonotonous(a=>a.original.startLineNumbera.modified.startLineNumber0&&(a=a.delta(c))}i.push(a)}return r.length>0&&i.push(r[r.length-1]),i}function Qu(t,e,n){if(!t.getBoundaryScore||!e.getBoundaryScore)return n;for(let r=0;r0?n[r-1]:void 0,s=n[r],o=r+1=r.start&&t.seq2Range.start-o>=i.start&&n.isStronglyEqual(t.seq2Range.start-o,t.seq2Range.endExclusive-o)&&o<100;)o++;o--;let a=0;for(;t.seq1Range.start+ac&&(c=b,l=h)}return t.delta(l)}function wl(t,e,n){let r=[];for(let i of n){let s=r[r.length-1];if(!s){r.push(i);continue}i.seq1Range.start-s.seq1Range.endExclusive<=2||i.seq2Range.start-s.seq2Range.endExclusive<=2?r[r.length-1]=new fe(s.seq1Range.join(i.seq1Range),s.seq2Range.join(i.seq2Range)):r.push(i)}return r}function xl(t,e,n){let r=fe.invert(n,t.length),i=[],s=new Le(0,0);function o(l,c){if(l.offset10;){let y=r[0];if(!(y.seq1Range.intersects(h)||y.seq2Range.intersects(d)))break;let E=t.findWordContaining(y.seq1Range.start),w=e.findWordContaining(y.seq2Range.start),C=new fe(E,w),R=C.intersect(y);if(b+=R.seq1Range.length,g+=R.seq2Range.length,f=f.join(C),f.seq1Range.endExclusive>=y.seq1Range.endExclusive)r.shift();else break}b+g<(f.seq1Range.length+f.seq2Range.length)*2/3&&i.push(f),s=f.getEndExclusives()}for(;r.length>0;){let l=r.shift();l.seq1Range.isEmpty||(o(l.getStarts(),l),o(l.getEndExclusives().delta(-1),l))}return Zu(n,i)}function Zu(t,e){let n=[];for(;t.length>0||e.length>0;){let r=t[0],i=e[0],s;r&&(!i||r.seq1Range.start0&&n[n.length-1].seq1Range.endExclusive>=s.seq1Range.start?n[n.length-1]=n[n.length-1].join(s):n.push(s)}return n}function Sl(t,e,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;let o=[r[0]];for(let a=1;a5||m.seq1Range.length+m.seq2Range.length>5)},l=r[a],c=o[o.length-1];h(c,l)?(s=!0,o[o.length-1]=o[o.length-1].join(l)):o.push(l)}r=o}while(i++<10&&s);return r}function _l(t,e,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;let a=[r[0]];for(let l=1;l5||g.length>500)return!1;let _=t.getText(g).trim();if(_.length>20||_.split(/\r\n|\r|\n/).length>1)return!1;let E=t.countLinesIn(m.seq1Range),w=m.seq1Range.length,C=e.countLinesIn(m.seq2Range),R=m.seq2Range.length,z=t.countLinesIn(b.seq1Range),O=b.seq1Range.length,T=e.countLinesIn(b.seq2Range),G=b.seq2Range.length,re=2*40+50;function J(A){return Math.min(A,re)}return Math.pow(Math.pow(J(E*40+w),1.5)+Math.pow(J(C*40+R),1.5),1.5)+Math.pow(Math.pow(J(z*40+O),1.5)+Math.pow(J(T*40+G),1.5),1.5)>(re**1.5)**1.5*1.3},c=r[l],h=a[a.length-1];d(h,c)?(s=!0,a[a.length-1]=a[a.length-1].join(c)):a.push(c)}r=a}while(i++<10&&s);let o=[];return na(r,(a,l,c)=>{let h=l;function d(_){return _.length>0&&_.trim().length<=3&&l.seq1Range.length+l.seq2Range.length>100}let f=t.extendToFullLines(l.seq1Range),m=t.getText(new K(f.start,l.seq1Range.start));d(m)&&(h=h.deltaStart(-m.length));let b=t.getText(new K(l.seq1Range.endExclusive,f.endExclusive));d(b)&&(h=h.deltaEnd(b.length));let g=fe.fromOffsetPairs(a?a.getEndExclusives():Le.zero,c?c.getStarts():Le.max),y=h.intersect(g);o.length>0&&y.getStarts().equals(o[o.length-1].getEndExclusives())?o[o.length-1]=o[o.length-1].join(y):o.push(y)}),o}var In=class{constructor(e,n){this.trimmedHash=e,this.lines=n}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){let n=e===0?0:Cl(this.lines[e-1]),r=e===this.lines.length?0:Cl(this.lines[e]);return 1e3-(n+r)}getText(e){return this.lines.slice(e.start,e.endExclusive).join(` +`)}isStronglyEqual(e,n){return this.lines[e]===this.lines[n]}};function Cl(t){let e=0;for(;eR===z))return new St([],[],!1);if(e.length===1&&e[0].length===0||n.length===1&&n[0].length===0)return new St([new at(new ee(1,e.length+1),new ee(1,n.length+1),[new It(new ie(1,1,e.length,e[0].length+1),new ie(1,1,n.length,n[0].length+1))])],[],!1);let i=r.maxComputationTimeMs===0?Qe.instance:new jr(r.maxComputationTimeMs),s=!r.ignoreTrimWhitespace,o=new Map;function a(R){let z=o.get(R);return z===void 0&&(z=o.size,o.set(R,z)),z}let l=e.map(R=>a(R.trim())),c=n.map(R=>a(R.trim())),h=new In(l,e),d=new In(c,n),f=h.length+d.length<1700?this.dynamicProgrammingDiffing.compute(h,d,i,(R,z)=>e[R]===n[z]?n[z].length===0?.1:1+Math.log(1+n[z].length):.99):this.myersDiffingAlgorithm.compute(h,d),m=f.diffs,b=f.hitTimeout;m=gs(h,d,m),m=Sl(h,d,m);let g=[],y=R=>{if(s)for(let z=0;zR.seq1Range.start-_===R.seq2Range.start-E);let z=R.seq1Range.start-_;y(z),_=R.seq1Range.endExclusive,E=R.seq2Range.endExclusive;let O=this.refineDiff(e,n,R,i,s);O.hitTimeout&&(b=!0);for(let T of O.mappings)g.push(T)}y(e.length-_);let w=kl(g,e,n),C=[];return r.computeMoves&&(C=this.computeMoves(w,e,n,l,c,i,s)),Zt(()=>{function R(O,T){if(O.lineNumber<1||O.lineNumber>T.length)return!1;let G=T[O.lineNumber-1];return!(O.column<1||O.column>G.length+1)}function z(O,T){return!(O.startLineNumber<1||O.startLineNumber>T.length+1||O.endLineNumberExclusive<1||O.endLineNumberExclusive>T.length+1)}for(let O of w){if(!O.innerChanges)return!1;for(let T of O.innerChanges)if(!(R(T.modifiedRange.getStartPosition(),n)&&R(T.modifiedRange.getEndPosition(),n)&&R(T.originalRange.getStartPosition(),e)&&R(T.originalRange.getEndPosition(),e)))return!1;if(!z(O.modified,n)||!z(O.original,e))return!1}return!0}),new St(w,C,b)}computeMoves(e,n,r,i,s,o,a){return bl(e,n,r,i,s,o).map(h=>{let d=this.refineDiff(n,r,new fe(h.original.toOffsetRange(),h.modified.toOffsetRange()),o,a),f=kl(d.mappings,n,r,!0);return new Ur(h,f)})}refineDiff(e,n,r,i,s){let o=new Ct(e,r.seq1Range,s),a=new Ct(n,r.seq2Range,s),l=o.length+a.length<500?this.dynamicProgrammingDiffing.compute(o,a,i):this.myersDiffingAlgorithm.compute(o,a,i),c=l.diffs;return c=gs(o,a,c),c=xl(o,a,c),c=wl(o,a,c),c=_l(o,a,c),{mappings:c.map(d=>new It(o.translateRange(d.seq1Range),a.translateRange(d.seq2Range))),hitTimeout:l.hitTimeout}}};function kl(t,e,n,r=!1){let i=[];for(let s of ea(t.map(o=>ed(o,e,n)),(o,a)=>o.original.overlapOrTouch(a.original)||o.modified.overlapOrTouch(a.modified))){let o=s[0],a=s[s.length-1];i.push(new at(o.original.join(a.original),o.modified.join(a.modified),s.map(l=>l.innerChanges[0])))}return Zt(()=>!r&&i.length>0&&i[0].original.startLineNumber!==i[0].modified.startLineNumber?!1:Tr(i,(s,o)=>o.original.startLineNumber-s.original.endLineNumberExclusive===o.modified.startLineNumber-s.modified.endLineNumberExclusive&&s.original.endLineNumberExclusive=n[t.modifiedRange.startLineNumber-1].length&&t.originalRange.startColumn-1>=e[t.originalRange.startLineNumber-1].length&&t.originalRange.startLineNumber<=t.originalRange.endLineNumber+i&&t.modifiedRange.startLineNumber<=t.modifiedRange.endLineNumber+i&&(r=1);let s=new ee(t.originalRange.startLineNumber+r,t.originalRange.endLineNumber+1+i),o=new ee(t.modifiedRange.startLineNumber+r,t.modifiedRange.endLineNumber+1+i);return new at(s,o,[t])}var bs={getLegacy:()=>new Vr,getDefault:()=>new Jr};function kt(t,e){let n=Math.pow(10,e);return Math.round(t*n)/n}var me=class{constructor(e,n,r,i=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,r))|0,this.a=kt(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.r===n.r&&e.g===n.g&&e.b===n.b&&e.a===n.a}},Ze=class t{constructor(e,n,r,i){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=kt(Math.max(Math.min(1,n),0),3),this.l=kt(Math.max(Math.min(1,r),0),3),this.a=kt(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.l===n.l&&e.a===n.a}static fromRGBA(e){let n=e.r/255,r=e.g/255,i=e.b/255,s=e.a,o=Math.max(n,r,i),a=Math.min(n,r,i),l=0,c=0,h=(a+o)/2,d=o-a;if(d>0){switch(c=Math.min(h<=.5?d/(2*h):d/(2-2*h),1),o){case n:l=(r-i)/d+(r1&&(r-=1),r<1/6?e+(n-e)*6*r:r<1/2?n:r<2/3?e+(n-e)*(2/3-r)*6:e}static toRGBA(e){let n=e.h/360,{s:r,l:i,a:s}=e,o,a,l;if(r===0)o=a=l=i;else{let c=i<.5?i*(1+r):i+r-i*r,h=2*i-c;o=t._hue2rgb(h,c,n+1/3),a=t._hue2rgb(h,c,n),l=t._hue2rgb(h,c,n-1/3)}return new me(Math.round(o*255),Math.round(a*255),Math.round(l*255),s)}},on=class t{constructor(e,n,r,i){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=kt(Math.max(Math.min(1,n),0),3),this.v=kt(Math.max(Math.min(1,r),0),3),this.a=kt(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.v===n.v&&e.a===n.a}static fromRGBA(e){let n=e.r/255,r=e.g/255,i=e.b/255,s=Math.max(n,r,i),o=Math.min(n,r,i),a=s-o,l=s===0?0:a/s,c;return a===0?c=0:s===n?c=((r-i)/a%6+6)%6:s===r?c=(i-n)/a+2:c=(n-r)/a+4,new t(Math.round(c*60),l,s,e.a)}static toRGBA(e){let{h:n,s:r,v:i,a:s}=e,o=i*r,a=o*(1-Math.abs(n/60%2-1)),l=i-o,[c,h,d]=[0,0,0];return n<60?(c=o,h=a):n<120?(c=a,h=o):n<180?(h=o,d=a):n<240?(h=a,d=o):n<300?(c=a,d=o):n<=360&&(c=o,d=a),c=Math.round((c+l)*255),h=Math.round((h+l)*255),d=Math.round((d+l)*255),new me(c,h,d,s)}},he=class t{static fromHex(e){return t.Format.CSS.parseHex(e)||t.red}static equals(e,n){return!e&&!n?!0:!e||!n?!1:e.equals(n)}get hsla(){return this._hsla?this._hsla:Ze.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:on.fromRGBA(this.rgba)}constructor(e){if(e)if(e instanceof me)this.rgba=e;else if(e instanceof Ze)this._hsla=e,this.rgba=Ze.toRGBA(e);else if(e instanceof on)this._hsva=e,this.rgba=on.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(e){return!!e&&me.equals(this.rgba,e.rgba)&&Ze.equals(this.hsla,e.hsla)&&on.equals(this.hsva,e.hsva)}getRelativeLuminance(){let e=t._relativeLuminanceForComponent(this.rgba.r),n=t._relativeLuminanceForComponent(this.rgba.g),r=t._relativeLuminanceForComponent(this.rgba.b),i=.2126*e+.7152*n+.0722*r;return kt(i,4)}static _relativeLuminanceForComponent(e){let n=e/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){let n=this.getRelativeLuminance(),r=e.getRelativeLuminance();return n>r}isDarkerThan(e){let n=this.getRelativeLuminance(),r=e.getRelativeLuminance();return n0)for(let i of r){let s=i.filter(c=>c!==void 0),o=s[1],a=s[2];if(!a)continue;let l;if(o==="rgb"){let c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;l=El(Tn(t,i),On(a,c),!1)}else if(o==="rgba"){let c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;l=El(Tn(t,i),On(a,c),!0)}else if(o==="hsl"){let c=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;l=Fl(Tn(t,i),On(a,c),!1)}else if(o==="hsla"){let c=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;l=Fl(Tn(t,i),On(a,c),!0)}else o==="#"&&(l=td(Tn(t,i),o+a));l&&e.push(l)}return e}function Dl(t){return!t||typeof t.getValue!="function"||typeof t.positionAt!="function"?[]:nd(t)}var ys=class extends kr{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){let n=[];for(let r=0;rthis._lines.length)n=this._lines.length,r=this._lines[n-1].length+1,i=!0;else{let s=this._lines[n-1].length+1;r<1?(r=1,i=!0):r>s&&(r=s,i=!0)}return i?{lineNumber:n,column:r}:e}},an=class t{constructor(e,n){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=n,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){let e=[];return Object.keys(this._models).forEach(n=>e.push(this._models[n])),e}acceptNewModel(e){this._models[e.url]=new ys(wt.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,n){if(!this._models[e])return;this._models[e].onEvents(n)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}async computeUnicodeHighlights(e,n,r){let i=this._getModel(e);return i?Or.computeUnicodeHighlights(i,n,r):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async computeDiff(e,n,r,i){let s=this._getModel(e),o=this._getModel(n);return!s||!o?null:t.computeDiff(s,o,r,i)}static computeDiff(e,n,r,i){let s=i==="advanced"?bs.getDefault():bs.getLegacy(),o=e.getLinesContent(),a=n.getLinesContent(),l=s.computeDiff(o,a,r),c=l.changes.length>0?!1:this._modelsAreIdentical(e,n);function h(d){return d.map(f=>{var m;return[f.original.startLineNumber,f.original.endLineNumberExclusive,f.modified.startLineNumber,f.modified.endLineNumberExclusive,(m=f.innerChanges)===null||m===void 0?void 0:m.map(b=>[b.originalRange.startLineNumber,b.originalRange.startColumn,b.originalRange.endLineNumber,b.originalRange.endColumn,b.modifiedRange.startLineNumber,b.modifiedRange.startColumn,b.modifiedRange.endLineNumber,b.modifiedRange.endColumn])]})}return{identical:c,quitEarly:l.hitTimeout,changes:h(l.changes),moves:l.moves.map(d=>[d.lineRangeMapping.original.startLineNumber,d.lineRangeMapping.original.endLineNumberExclusive,d.lineRangeMapping.modified.startLineNumber,d.lineRangeMapping.modified.endLineNumberExclusive,h(d.changes)])}}static _modelsAreIdentical(e,n){let r=e.getLineCount(),i=n.getLineCount();if(r!==i)return!1;for(let s=1;s<=r;s++){let o=e.getLineContent(s),a=n.getLineContent(s);if(o!==a)return!1}return!0}async computeMoreMinimalEdits(e,n,r){let i=this._getModel(e);if(!i)return n;let s=[],o;n=n.slice(0).sort((l,c)=>{if(l.range&&c.range)return ie.compareRangesUsingStarts(l.range,c.range);let h=l.range?0:1,d=c.range?0:1;return h-d});let a=0;for(let l=1;lt._diffLimit){s.push({range:l,text:c});continue}let f=jo(d,c,r),m=i.offsetAt(ie.lift(l).getStartPosition());for(let b of f){let g=i.positionAt(m+b.originalStart),y=i.positionAt(m+b.originalStart+b.originalLength),_={text:c.substr(b.modifiedStart,b.modifiedLength),range:{startLineNumber:g.lineNumber,startColumn:g.column,endLineNumber:y.lineNumber,endColumn:y.column}};i.getValueInRange(_.range)!==_.text&&s.push(_)}}return typeof o=="number"&&s.push({eol:o,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),s}async computeLinks(e){let n=this._getModel(e);return n?oa(n):null}async computeDefaultDocumentColors(e){let n=this._getModel(e);return n?Dl(n):null}async textualSuggest(e,n,r,i){let s=new jt,o=new RegExp(r,i),a=new Set;e:for(let l of e){let c=this._getModel(l);if(c){for(let h of c.words(o))if(!(h===n||!isNaN(Number(h)))&&(a.add(h),a.size>t._suggestionsLimit))break e}}return{words:Array.from(a),duration:s.elapsed()}}async computeWordRanges(e,n,r,i){let s=this._getModel(e);if(!s)return Object.create(null);let o=new RegExp(r,i),a=Object.create(null);for(let l=n.startLineNumber;lthis._host.fhr(a,l)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(o,n),Promise.resolve(_n(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,n){if(!this._foreignModule||typeof this._foreignModule[e]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,n))}catch(r){return Promise.reject(r)}}};an._diffLimit=1e5;an._suggestionsLimit=1e4;typeof importScripts=="function"&&(globalThis.monaco=tl());var ws=!1;function xs(t){if(ws)return;ws=!0;let e=new br(n=>{globalThis.postMessage(n)},n=>new an(n,t));globalThis.onmessage=n=>{e.onmessage(n.data)}}globalThis.onmessage=t=>{ws||xs(null)};var p;(function(t){t[t.Ident=0]="Ident",t[t.AtKeyword=1]="AtKeyword",t[t.String=2]="String",t[t.BadString=3]="BadString",t[t.UnquotedString=4]="UnquotedString",t[t.Hash=5]="Hash",t[t.Num=6]="Num",t[t.Percentage=7]="Percentage",t[t.Dimension=8]="Dimension",t[t.UnicodeRange=9]="UnicodeRange",t[t.CDO=10]="CDO",t[t.CDC=11]="CDC",t[t.Colon=12]="Colon",t[t.SemiColon=13]="SemiColon",t[t.CurlyL=14]="CurlyL",t[t.CurlyR=15]="CurlyR",t[t.ParenthesisL=16]="ParenthesisL",t[t.ParenthesisR=17]="ParenthesisR",t[t.BracketL=18]="BracketL",t[t.BracketR=19]="BracketR",t[t.Whitespace=20]="Whitespace",t[t.Includes=21]="Includes",t[t.Dashmatch=22]="Dashmatch",t[t.SubstringOperator=23]="SubstringOperator",t[t.PrefixOperator=24]="PrefixOperator",t[t.SuffixOperator=25]="SuffixOperator",t[t.Delim=26]="Delim",t[t.EMS=27]="EMS",t[t.EXS=28]="EXS",t[t.Length=29]="Length",t[t.Angle=30]="Angle",t[t.Time=31]="Time",t[t.Freq=32]="Freq",t[t.Exclamation=33]="Exclamation",t[t.Resolution=34]="Resolution",t[t.Comma=35]="Comma",t[t.Charset=36]="Charset",t[t.EscapedJavaScript=37]="EscapedJavaScript",t[t.BadEscapedJavaScript=38]="BadEscapedJavaScript",t[t.Comment=39]="Comment",t[t.SingleLineComment=40]="SingleLineComment",t[t.EOF=41]="EOF",t[t.CustomToken=42]="CustomToken"})(p||(p={}));var Al=function(){function t(e){this.source=e,this.len=e.length,this.position=0}return t.prototype.substring=function(e,n){return n===void 0&&(n=this.position),this.source.substring(e,n)},t.prototype.eos=function(){return this.len<=this.position},t.prototype.pos=function(){return this.position},t.prototype.goBackTo=function(e){this.position=e},t.prototype.goBack=function(e){this.position-=e},t.prototype.advance=function(e){this.position+=e},t.prototype.nextChar=function(){return this.source.charCodeAt(this.position++)||0},t.prototype.peekChar=function(e){return e===void 0&&(e=0),this.source.charCodeAt(this.position+e)||0},t.prototype.lookbackChar=function(e){return e===void 0&&(e=0),this.source.charCodeAt(this.position-e)||0},t.prototype.advanceIfChar=function(e){return e===this.source.charCodeAt(this.position)?(this.position++,!0):!1},t.prototype.advanceIfChars=function(e){if(this.position+e.length>this.source.length)return!1;for(var n=0;n=Wn&&n<=Un?(this.stream.advance(e+1),this.stream.advanceWhileChar(function(r){return r>=Wn&&r<=Un||e===0&&r===Wl}),!0):!1},t.prototype._newline=function(e){var n=this.stream.peekChar();switch(n){case cn:case Vn:case ln:return this.stream.advance(1),e.push(String.fromCharCode(n)),n===cn&&this.stream.advanceIfChar(ln)&&e.push(` +`),!0}return!1},t.prototype._escape=function(e,n){var r=this.stream.peekChar();if(r===_s){this.stream.advance(1),r=this.stream.peekChar();for(var i=0;i<6&&(r>=Wn&&r<=Un||r>=Xr&&r<=Ml||r>=Yr&&r<=Ll);)this.stream.advance(1),r=this.stream.peekChar(),i++;if(i>0){try{var s=parseInt(this.stream.substring(this.stream.pos()-i),16);s&&e.push(String.fromCharCode(s))}catch{}return r===Cs||r===ks?this.stream.advance(1):this._newline([]),!0}if(r!==cn&&r!==Vn&&r!==ln)return this.stream.advance(1),e.push(String.fromCharCode(r)),!0;if(n)return this._newline(e)}return!1},t.prototype._stringChar=function(e,n){var r=this.stream.peekChar();return r!==0&&r!==e&&r!==_s&&r!==cn&&r!==Vn&&r!==ln?(this.stream.advance(1),n.push(String.fromCharCode(r)),!0):!1},t.prototype._string=function(e){if(this.stream.peekChar()===Ol||this.stream.peekChar()===Tl){var n=this.stream.nextChar();for(e.push(String.fromCharCode(n));this._stringChar(n,e)||this._escape(e,!0););return this.stream.peekChar()===n?(this.stream.nextChar(),e.push(String.fromCharCode(n)),p.String):p.BadString}return null},t.prototype._unquotedChar=function(e){var n=this.stream.peekChar();return n!==0&&n!==_s&&n!==Ol&&n!==Tl&&n!==rh&&n!==ih&&n!==Cs&&n!==ks&&n!==ln&&n!==Vn&&n!==cn?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1},t.prototype._unquotedString=function(e){for(var n=!1;this._unquotedChar(e)||this._escape(e);)n=!0;return n},t.prototype._whitespace=function(){var e=this.stream.advanceWhileChar(function(n){return n===Cs||n===ks||n===ln||n===Vn||n===cn});return e>0},t.prototype._name=function(e){for(var n=!1;this._identChar(e)||this._escape(e);)n=!0;return n},t.prototype.ident=function(e){var n=this.stream.pos(),r=this._minus(e);if(r){if(this._minus(e)||this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}}else if(this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}return this.stream.goBackTo(n),!1},t.prototype._identFirstChar=function(e){var n=this.stream.peekChar();return n===Pl||n>=Xr&&n<=Nl||n>=Yr&&n<=zl||n>=128&&n<=65535?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1},t.prototype._minus=function(e){var n=this.stream.peekChar();return n===Tt?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1},t.prototype._identChar=function(e){var n=this.stream.peekChar();return n===Pl||n===Tt||n>=Xr&&n<=Nl||n>=Yr&&n<=zl||n>=Wn&&n<=Un||n>=128&&n<=65535?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1},t.prototype._unicodeRange=function(){if(this.stream.advanceIfChar(xd)){var e=function(i){return i>=Wn&&i<=Un||i>=Xr&&i<=Ml||i>=Yr&&i<=Ll},n=this.stream.advanceWhileChar(e)+this.stream.advanceWhileChar(function(i){return i===wd});if(n>=1&&n<=6)if(this.stream.advanceIfChar(Tt)){var r=this.stream.advanceWhileChar(e);if(r>=1&&r<=6)return!0}else return!0}return!1},t}();function ve(t,e){if(t.length0?t.lastIndexOf(e)===n:n===0?t===e:!1}function Sd(t,e,n){n===void 0&&(n=4);var r=Math.abs(t.length-e.length);if(r>n)return 0;var i=[],s=[],o,a;for(o=0;o0;)(e&1)===1&&(n+=t),t+=t,e=e>>>1;return n}var U=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),v;(function(t){t[t.Undefined=0]="Undefined",t[t.Identifier=1]="Identifier",t[t.Stylesheet=2]="Stylesheet",t[t.Ruleset=3]="Ruleset",t[t.Selector=4]="Selector",t[t.SimpleSelector=5]="SimpleSelector",t[t.SelectorInterpolation=6]="SelectorInterpolation",t[t.SelectorCombinator=7]="SelectorCombinator",t[t.SelectorCombinatorParent=8]="SelectorCombinatorParent",t[t.SelectorCombinatorSibling=9]="SelectorCombinatorSibling",t[t.SelectorCombinatorAllSiblings=10]="SelectorCombinatorAllSiblings",t[t.SelectorCombinatorShadowPiercingDescendant=11]="SelectorCombinatorShadowPiercingDescendant",t[t.Page=12]="Page",t[t.PageBoxMarginBox=13]="PageBoxMarginBox",t[t.ClassSelector=14]="ClassSelector",t[t.IdentifierSelector=15]="IdentifierSelector",t[t.ElementNameSelector=16]="ElementNameSelector",t[t.PseudoSelector=17]="PseudoSelector",t[t.AttributeSelector=18]="AttributeSelector",t[t.Declaration=19]="Declaration",t[t.Declarations=20]="Declarations",t[t.Property=21]="Property",t[t.Expression=22]="Expression",t[t.BinaryExpression=23]="BinaryExpression",t[t.Term=24]="Term",t[t.Operator=25]="Operator",t[t.Value=26]="Value",t[t.StringLiteral=27]="StringLiteral",t[t.URILiteral=28]="URILiteral",t[t.EscapedValue=29]="EscapedValue",t[t.Function=30]="Function",t[t.NumericValue=31]="NumericValue",t[t.HexColorValue=32]="HexColorValue",t[t.RatioValue=33]="RatioValue",t[t.MixinDeclaration=34]="MixinDeclaration",t[t.MixinReference=35]="MixinReference",t[t.VariableName=36]="VariableName",t[t.VariableDeclaration=37]="VariableDeclaration",t[t.Prio=38]="Prio",t[t.Interpolation=39]="Interpolation",t[t.NestedProperties=40]="NestedProperties",t[t.ExtendsReference=41]="ExtendsReference",t[t.SelectorPlaceholder=42]="SelectorPlaceholder",t[t.Debug=43]="Debug",t[t.If=44]="If",t[t.Else=45]="Else",t[t.For=46]="For",t[t.Each=47]="Each",t[t.While=48]="While",t[t.MixinContentReference=49]="MixinContentReference",t[t.MixinContentDeclaration=50]="MixinContentDeclaration",t[t.Media=51]="Media",t[t.Keyframe=52]="Keyframe",t[t.FontFace=53]="FontFace",t[t.Import=54]="Import",t[t.Namespace=55]="Namespace",t[t.Invocation=56]="Invocation",t[t.FunctionDeclaration=57]="FunctionDeclaration",t[t.ReturnStatement=58]="ReturnStatement",t[t.MediaQuery=59]="MediaQuery",t[t.MediaCondition=60]="MediaCondition",t[t.MediaFeature=61]="MediaFeature",t[t.FunctionParameter=62]="FunctionParameter",t[t.FunctionArgument=63]="FunctionArgument",t[t.KeyframeSelector=64]="KeyframeSelector",t[t.ViewPort=65]="ViewPort",t[t.Document=66]="Document",t[t.AtApplyRule=67]="AtApplyRule",t[t.CustomPropertyDeclaration=68]="CustomPropertyDeclaration",t[t.CustomPropertySet=69]="CustomPropertySet",t[t.ListEntry=70]="ListEntry",t[t.Supports=71]="Supports",t[t.SupportsCondition=72]="SupportsCondition",t[t.NamespacePrefix=73]="NamespacePrefix",t[t.GridLine=74]="GridLine",t[t.Plugin=75]="Plugin",t[t.UnknownAtRule=76]="UnknownAtRule",t[t.Use=77]="Use",t[t.ModuleConfiguration=78]="ModuleConfiguration",t[t.Forward=79]="Forward",t[t.ForwardVisibility=80]="ForwardVisibility",t[t.Module=81]="Module",t[t.UnicodeRange=82]="UnicodeRange"})(v||(v={}));var Z;(function(t){t[t.Mixin=0]="Mixin",t[t.Rule=1]="Rule",t[t.Variable=2]="Variable",t[t.Function=3]="Function",t[t.Keyframe=4]="Keyframe",t[t.Unknown=5]="Unknown",t[t.Module=6]="Module",t[t.Forward=7]="Forward",t[t.ForwardVisibility=8]="ForwardVisibility"})(Z||(Z={}));function Ps(t,e){var n=null;return!t||et.end?null:(t.accept(function(r){return r.offset===-1&&r.length===-1?!0:r.offset<=e&&r.end>=e?(n?r.length<=n.length&&(n=r):n=r,!0):!1}),n)}function no(t,e){for(var n=Ps(t,e),r=[];n;)r.unshift(n),n=n.parent;return r}function Cd(t){var e=t.findParent(v.Declaration),n=e&&e.getValue();return n&&n.encloses(t)?e:null}var B=function(){function t(e,n,r){e===void 0&&(e=-1),n===void 0&&(n=-1),this.parent=null,this.offset=e,this.length=n,r&&(this.nodeType=r)}return Object.defineProperty(t.prototype,"end",{get:function(){return this.offset+this.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this.nodeType||v.Undefined},set:function(e){this.nodeType=e},enumerable:!1,configurable:!0}),t.prototype.getTextProvider=function(){for(var e=this;e&&!e.textProvider;)e=e.parent;return e?e.textProvider:function(){return"unknown"}},t.prototype.getText=function(){return this.getTextProvider()(this.offset,this.length)},t.prototype.matches=function(e){return this.length===e.length&&this.getTextProvider()(this.offset,this.length)===e},t.prototype.startsWith=function(e){return this.length>=e.length&&this.getTextProvider()(this.offset,e.length)===e},t.prototype.endsWith=function(e){return this.length>=e.length&&this.getTextProvider()(this.end-e.length,e.length)===e},t.prototype.accept=function(e){if(e(this)&&this.children)for(var n=0,r=this.children;n=0&&e.parent.children.splice(r,1)}e.parent=this;var i=this.children;return i||(i=this.children=[]),n!==-1?i.splice(n,0,e):i.push(e),e},t.prototype.attachTo=function(e,n){return n===void 0&&(n=-1),e&&e.adoptChild(this,n),this},t.prototype.collectIssues=function(e){this.issues&&e.push.apply(e,this.issues)},t.prototype.addIssue=function(e){this.issues||(this.issues=[]),this.issues.push(e)},t.prototype.hasIssue=function(e){return Array.isArray(this.issues)&&this.issues.some(function(n){return n.getRule()===e})},t.prototype.isErroneous=function(e){return e===void 0&&(e=!1),this.issues&&this.issues.length>0?!0:e&&Array.isArray(this.children)&&this.children.some(function(n){return n.isErroneous(!0)})},t.prototype.setNode=function(e,n,r){return r===void 0&&(r=-1),n?(n.attachTo(this,r),this[e]=n,!0):!1},t.prototype.addChild=function(e){return e?(this.children||(this.children=[]),e.attachTo(this),this.updateOffsetAndLength(e),!0):!1},t.prototype.updateOffsetAndLength=function(e){(e.offsetthis.end||this.length===-1)&&(this.length=n-this.offset)},t.prototype.hasChildren=function(){return!!this.children&&this.children.length>0},t.prototype.getChildren=function(){return this.children?this.children.slice(0):[]},t.prototype.getChild=function(e){return this.children&&e=0;r--)if(n=this.children[r],n.offset<=e)return n}return null},t.prototype.findChildAtOffset=function(e,n){var r=this.findFirstChildBeforeOffset(e);return r&&r.end>=e?n&&r.findChildAtOffset(e,!0)||r:null},t.prototype.encloses=function(e){return this.offset<=e.offset&&this.offset+this.length>=e.offset+e.length},t.prototype.getParent=function(){for(var e=this.parent;e instanceof Ee;)e=e.parent;return e},t.prototype.findParent=function(e){for(var n=this;n&&n.type!==e;)n=n.parent;return n},t.prototype.findAParent=function(){for(var e=[],n=0;n{let s=i[0];return typeof e[s]<"u"?e[s]:r}),n}function sp(t,e,...n){return ip(e,n)}function Je(t){return sp}var te=Je(),ne=function(){function t(e,n){this.id=e,this.message=n}return t}(),S={NumberExpected:new ne("css-numberexpected",te("expected.number","number expected")),ConditionExpected:new ne("css-conditionexpected",te("expected.condt","condition expected")),RuleOrSelectorExpected:new ne("css-ruleorselectorexpected",te("expected.ruleorselector","at-rule or selector expected")),DotExpected:new ne("css-dotexpected",te("expected.dot","dot expected")),ColonExpected:new ne("css-colonexpected",te("expected.colon","colon expected")),SemiColonExpected:new ne("css-semicolonexpected",te("expected.semicolon","semi-colon expected")),TermExpected:new ne("css-termexpected",te("expected.term","term expected")),ExpressionExpected:new ne("css-expressionexpected",te("expected.expression","expression expected")),OperatorExpected:new ne("css-operatorexpected",te("expected.operator","operator expected")),IdentifierExpected:new ne("css-identifierexpected",te("expected.ident","identifier expected")),PercentageExpected:new ne("css-percentageexpected",te("expected.percentage","percentage expected")),URIOrStringExpected:new ne("css-uriorstringexpected",te("expected.uriorstring","uri or string expected")),URIExpected:new ne("css-uriexpected",te("expected.uri","URI expected")),VariableNameExpected:new ne("css-varnameexpected",te("expected.varname","variable name expected")),VariableValueExpected:new ne("css-varvalueexpected",te("expected.varvalue","variable value expected")),PropertyValueExpected:new ne("css-propertyvalueexpected",te("expected.propvalue","property value expected")),LeftCurlyExpected:new ne("css-lcurlyexpected",te("expected.lcurly","{ expected")),RightCurlyExpected:new ne("css-rcurlyexpected",te("expected.rcurly","} expected")),LeftSquareBracketExpected:new ne("css-rbracketexpected",te("expected.lsquare","[ expected")),RightSquareBracketExpected:new ne("css-lbracketexpected",te("expected.rsquare","] expected")),LeftParenthesisExpected:new ne("css-lparentexpected",te("expected.lparen","( expected")),RightParenthesisExpected:new ne("css-rparentexpected",te("expected.rparent",") expected")),CommaExpected:new ne("css-commaexpected",te("expected.comma","comma expected")),PageDirectiveOrDeclarationExpected:new ne("css-pagedirordeclexpected",te("expected.pagedirordecl","page directive or declaraton expected")),UnknownAtRule:new ne("css-unknownatrule",te("unknown.atrule","at-rule unknown")),UnknownKeyword:new ne("css-unknownkeyword",te("unknown.keyword","unknown keyword")),SelectorExpected:new ne("css-selectorexpected",te("expected.selector","selector expected")),StringLiteralExpected:new ne("css-stringliteralexpected",te("expected.stringliteral","string literal expected")),WhitespaceExpected:new ne("css-whitespaceexpected",te("expected.whitespace","whitespace expected")),MediaQueryExpected:new ne("css-mediaqueryexpected",te("expected.mediaquery","media query expected")),IdentifierOrWildcardExpected:new ne("css-idorwildcardexpected",te("expected.idorwildcard","identifier or wildcard expected")),WildcardExpected:new ne("css-wildcardexpected",te("expected.wildcard","wildcard expected")),IdentifierOrVariableExpected:new ne("css-idorvarexpected",te("expected.idorvar","identifier or variable expected"))},$l;(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647})($l||($l={}));var ai;(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647})(ai||(ai={}));var Me;(function(t){function e(r,i){return r===Number.MAX_VALUE&&(r=ai.MAX_VALUE),i===Number.MAX_VALUE&&(i=ai.MAX_VALUE),{line:r,character:i}}t.create=e;function n(r){var i=r;return F.objectLiteral(i)&&F.uinteger(i.line)&&F.uinteger(i.character)}t.is=n})(Me||(Me={}));var se;(function(t){function e(r,i,s,o){if(F.uinteger(r)&&F.uinteger(i)&&F.uinteger(s)&&F.uinteger(o))return{start:Me.create(r,i),end:Me.create(s,o)};if(Me.is(r)&&Me.is(i))return{start:r,end:i};throw new Error("Range#create called with invalid arguments["+r+", "+i+", "+s+", "+o+"]")}t.create=e;function n(r){var i=r;return F.objectLiteral(i)&&Me.is(i.start)&&Me.is(i.end)}t.is=n})(se||(se={}));var Qn;(function(t){function e(r,i){return{uri:r,range:i}}t.create=e;function n(r){var i=r;return F.defined(i)&&se.is(i.range)&&(F.string(i.uri)||F.undefined(i.uri))}t.is=n})(Qn||(Qn={}));var Hl;(function(t){function e(r,i,s,o){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:o}}t.create=e;function n(r){var i=r;return F.defined(i)&&se.is(i.targetRange)&&F.string(i.targetUri)&&(se.is(i.targetSelectionRange)||F.undefined(i.targetSelectionRange))&&(se.is(i.originSelectionRange)||F.undefined(i.originSelectionRange))}t.is=n})(Hl||(Hl={}));var Os;(function(t){function e(r,i,s,o){return{red:r,green:i,blue:s,alpha:o}}t.create=e;function n(r){var i=r;return F.numberRange(i.red,0,1)&&F.numberRange(i.green,0,1)&&F.numberRange(i.blue,0,1)&&F.numberRange(i.alpha,0,1)}t.is=n})(Os||(Os={}));var Gl;(function(t){function e(r,i){return{range:r,color:i}}t.create=e;function n(r){var i=r;return se.is(i.range)&&Os.is(i.color)}t.is=n})(Gl||(Gl={}));var Jl;(function(t){function e(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}t.create=e;function n(r){var i=r;return F.string(i.label)&&(F.undefined(i.textEdit)||$.is(i))&&(F.undefined(i.additionalTextEdits)||F.typedArray(i.additionalTextEdits,$.is))}t.is=n})(Jl||(Jl={}));var Xl;(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(Xl||(Xl={}));var Yl;(function(t){function e(r,i,s,o,a){var l={startLine:r,endLine:i};return F.defined(s)&&(l.startCharacter=s),F.defined(o)&&(l.endCharacter=o),F.defined(a)&&(l.kind=a),l}t.create=e;function n(r){var i=r;return F.uinteger(i.startLine)&&F.uinteger(i.startLine)&&(F.undefined(i.startCharacter)||F.uinteger(i.startCharacter))&&(F.undefined(i.endCharacter)||F.uinteger(i.endCharacter))&&(F.undefined(i.kind)||F.string(i.kind))}t.is=n})(Yl||(Yl={}));var Ws;(function(t){function e(r,i){return{location:r,message:i}}t.create=e;function n(r){var i=r;return F.defined(i)&&Qn.is(i.location)&&F.string(i.message)}t.is=n})(Ws||(Ws={}));var li;(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(li||(li={}));var Kl;(function(t){t.Unnecessary=1,t.Deprecated=2})(Kl||(Kl={}));var Ql;(function(t){function e(n){var r=n;return r!=null&&F.string(r.href)}t.is=e})(Ql||(Ql={}));var ci;(function(t){function e(r,i,s,o,a,l){var c={range:r,message:i};return F.defined(s)&&(c.severity=s),F.defined(o)&&(c.code=o),F.defined(a)&&(c.source=a),F.defined(l)&&(c.relatedInformation=l),c}t.create=e;function n(r){var i,s=r;return F.defined(s)&&se.is(s.range)&&F.string(s.message)&&(F.number(s.severity)||F.undefined(s.severity))&&(F.integer(s.code)||F.string(s.code)||F.undefined(s.code))&&(F.undefined(s.codeDescription)||F.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(F.string(s.source)||F.undefined(s.source))&&(F.undefined(s.relatedInformation)||F.typedArray(s.relatedInformation,Ws.is))}t.is=n})(ci||(ci={}));var bn;(function(t){function e(r,i){for(var s=[],o=2;o0&&(a.arguments=s),a}t.create=e;function n(r){var i=r;return F.defined(i)&&F.string(i.title)&&F.string(i.command)}t.is=n})(bn||(bn={}));var $;(function(t){function e(s,o){return{range:s,newText:o}}t.replace=e;function n(s,o){return{range:{start:s,end:s},newText:o}}t.insert=n;function r(s){return{range:s,newText:""}}t.del=r;function i(s){var o=s;return F.objectLiteral(o)&&F.string(o.newText)&&se.is(o.range)}t.is=i})($||($={}));var mn;(function(t){function e(r,i,s){var o={label:r};return i!==void 0&&(o.needsConfirmation=i),s!==void 0&&(o.description=s),o}t.create=e;function n(r){var i=r;return i!==void 0&&F.objectLiteral(i)&&F.string(i.label)&&(F.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(F.string(i.description)||i.description===void 0)}t.is=n})(mn||(mn={}));var Re;(function(t){function e(n){var r=n;return typeof r=="string"}t.is=e})(Re||(Re={}));var Ft;(function(t){function e(s,o,a){return{range:s,newText:o,annotationId:a}}t.replace=e;function n(s,o,a){return{range:{start:s,end:s},newText:o,annotationId:a}}t.insert=n;function r(s,o){return{range:s,newText:"",annotationId:o}}t.del=r;function i(s){var o=s;return $.is(o)&&(mn.is(o.annotationId)||Re.is(o.annotationId))}t.is=i})(Ft||(Ft={}));var Zn;(function(t){function e(r,i){return{textDocument:r,edits:i}}t.create=e;function n(r){var i=r;return F.defined(i)&&hi.is(i.textDocument)&&Array.isArray(i.edits)}t.is=n})(Zn||(Zn={}));var er;(function(t){function e(r,i,s){var o={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}t.create=e;function n(r){var i=r;return i&&i.kind==="create"&&F.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||F.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||F.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Re.is(i.annotationId))}t.is=n})(er||(er={}));var tr;(function(t){function e(r,i,s,o){var a={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(a.options=s),o!==void 0&&(a.annotationId=o),a}t.create=e;function n(r){var i=r;return i&&i.kind==="rename"&&F.string(i.oldUri)&&F.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||F.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||F.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Re.is(i.annotationId))}t.is=n})(tr||(tr={}));var nr;(function(t){function e(r,i,s){var o={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}t.create=e;function n(r){var i=r;return i&&i.kind==="delete"&&F.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||F.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||F.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Re.is(i.annotationId))}t.is=n})(nr||(nr={}));var Us;(function(t){function e(n){var r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(function(i){return F.string(i.kind)?er.is(i)||tr.is(i)||nr.is(i):Zn.is(i)}))}t.is=e})(Us||(Us={}));var Kr=function(){function t(e,n){this.edits=e,this.changeAnnotations=n}return t.prototype.insert=function(e,n,r){var i,s;if(r===void 0?i=$.insert(e,n):Re.is(r)?(s=r,i=Ft.insert(e,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=Ft.insert(e,n,s)),this.edits.push(i),s!==void 0)return s},t.prototype.replace=function(e,n,r){var i,s;if(r===void 0?i=$.replace(e,n):Re.is(r)?(s=r,i=Ft.replace(e,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=Ft.replace(e,n,s)),this.edits.push(i),s!==void 0)return s},t.prototype.delete=function(e,n){var r,i;if(n===void 0?r=$.del(e):Re.is(n)?(i=n,r=Ft.del(e,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=Ft.del(e,i)),this.edits.push(r),i!==void 0)return i},t.prototype.add=function(e){this.edits.push(e)},t.prototype.all=function(){return this.edits},t.prototype.clear=function(){this.edits.splice(0,this.edits.length)},t.prototype.assertChangeAnnotations=function(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},t}(),Zl=function(){function t(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}return t.prototype.all=function(){return this._annotations},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),t.prototype.manage=function(e,n){var r;if(Re.is(e)?r=e:(r=this.nextId(),n=e),this._annotations[r]!==void 0)throw new Error("Id "+r+" is already in use.");if(n===void 0)throw new Error("No annotation provided for id "+r);return this._annotations[r]=n,this._size++,r},t.prototype.nextId=function(){return this._counter++,this._counter.toString()},t}(),Q0=function(){function t(e){var n=this;this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Zl(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(function(r){if(Zn.is(r)){var i=new Kr(r.edits,n._changeAnnotations);n._textEditChanges[r.textDocument.uri]=i}})):e.changes&&Object.keys(e.changes).forEach(function(r){var i=new Kr(e.changes[r]);n._textEditChanges[r]=i})):this._workspaceEdit={}}return Object.defineProperty(t.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),t.prototype.getTextEditChange=function(e){if(hi.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n={uri:e.uri,version:e.version},r=this._textEditChanges[n.uri];if(!r){var i=[],s={textDocument:n,edits:i};this._workspaceEdit.documentChanges.push(s),r=new Kr(i,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var r=this._textEditChanges[e];if(!r){var i=[];this._workspaceEdit.changes[e]=i,r=new Kr(i),this._textEditChanges[e]=r}return r}},t.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Zl,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},t.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},t.prototype.createFile=function(e,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;mn.is(n)||Re.is(n)?i=n:r=n;var s,o;if(i===void 0?s=er.create(e,r):(o=Re.is(i)?i:this._changeAnnotations.manage(i),s=er.create(e,r,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o},t.prototype.renameFile=function(e,n,r,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var s;mn.is(r)||Re.is(r)?s=r:i=r;var o,a;if(s===void 0?o=tr.create(e,n,i):(a=Re.is(s)?s:this._changeAnnotations.manage(s),o=tr.create(e,n,i,a)),this._workspaceEdit.documentChanges.push(o),a!==void 0)return a},t.prototype.deleteFile=function(e,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;mn.is(n)||Re.is(n)?i=n:r=n;var s,o;if(i===void 0?s=nr.create(e,r):(o=Re.is(i)?i:this._changeAnnotations.manage(i),s=nr.create(e,r,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o},t}(),ec;(function(t){function e(r){return{uri:r}}t.create=e;function n(r){var i=r;return F.defined(i)&&F.string(i.uri)}t.is=n})(ec||(ec={}));var Bs;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){var i=r;return F.defined(i)&&F.string(i.uri)&&F.integer(i.version)}t.is=n})(Bs||(Bs={}));var hi;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){var i=r;return F.defined(i)&&F.string(i.uri)&&(i.version===null||F.integer(i.version))}t.is=n})(hi||(hi={}));var tc;(function(t){function e(r,i,s,o){return{uri:r,languageId:i,version:s,text:o}}t.create=e;function n(r){var i=r;return F.defined(i)&&F.string(i.uri)&&F.string(i.languageId)&&F.integer(i.version)&&F.string(i.text)}t.is=n})(tc||(tc={}));var qe;(function(t){t.PlainText="plaintext",t.Markdown="markdown"})(qe||(qe={}));(function(t){function e(n){var r=n;return r===t.PlainText||r===t.Markdown}t.is=e})(qe||(qe={}));var Vs;(function(t){function e(n){var r=n;return F.objectLiteral(n)&&qe.is(r.kind)&&F.string(r.value)}t.is=e})(Vs||(Vs={}));var j;(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(j||(j={}));var Pe;(function(t){t.PlainText=1,t.Snippet=2})(Pe||(Pe={}));var Ut;(function(t){t.Deprecated=1})(Ut||(Ut={}));var nc;(function(t){function e(r,i,s){return{newText:r,insert:i,replace:s}}t.create=e;function n(r){var i=r;return i&&F.string(i.newText)&&se.is(i.insert)&&se.is(i.replace)}t.is=n})(nc||(nc={}));var rc;(function(t){t.asIs=1,t.adjustIndentation=2})(rc||(rc={}));var ic;(function(t){function e(n){return{label:n}}t.create=e})(ic||(ic={}));var sc;(function(t){function e(n,r){return{items:n||[],isIncomplete:!!r}}t.create=e})(sc||(sc={}));var ui;(function(t){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=e;function n(r){var i=r;return F.string(i)||F.objectLiteral(i)&&F.string(i.language)&&F.string(i.value)}t.is=n})(ui||(ui={}));var oc;(function(t){function e(n){var r=n;return!!r&&F.objectLiteral(r)&&(Vs.is(r.contents)||ui.is(r.contents)||F.typedArray(r.contents,ui.is))&&(n.range===void 0||se.is(n.range))}t.is=e})(oc||(oc={}));var ac;(function(t){function e(n,r){return r?{label:n,documentation:r}:{label:n}}t.create=e})(ac||(ac={}));var lc;(function(t){function e(n,r){for(var i=[],s=2;s=0;h--){var d=l[h],f=s.offsetAt(d.range.start),m=s.offsetAt(d.range.end);if(m<=c)a=a.substring(0,f)+d.newText+a.substring(m,a.length);else throw new Error("Overlapping edit");c=f}return a}t.applyEdits=r;function i(s,o){if(s.length<=1)return s;var a=s.length/2|0,l=s.slice(0,a),c=s.slice(a);i(l,o),i(c,o);for(var h=0,d=0,f=0;h0&&e.push(n.length),this._lineOffsets=e}return this._lineOffsets},t.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return Me.create(0,e);for(;re?i=s:r=s+1}var o=r-1;return Me.create(o,e-n[o])},t.prototype.offsetAt=function(e){var n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;var r=n[e.line],i=e.line+1"u"}t.undefined=r;function i(m){return m===!0||m===!1}t.boolean=i;function s(m){return e.call(m)==="[object String]"}t.string=s;function o(m){return e.call(m)==="[object Number]"}t.number=o;function a(m,b,g){return e.call(m)==="[object Number]"&&b<=m&&m<=g}t.numberRange=a;function l(m){return e.call(m)==="[object Number]"&&-2147483648<=m&&m<=2147483647}t.integer=l;function c(m){return e.call(m)==="[object Number]"&&0<=m&&m<=2147483647}t.uinteger=c;function h(m){return e.call(m)==="[object Function]"}t.func=h;function d(m){return m!==null&&typeof m=="object"}t.objectLiteral=d;function f(m,b){return Array.isArray(m)&&m.every(b)}t.typedArray=f})(F||(F={}));var vc=class $s{constructor(e,n,r,i){this._uri=e,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let n=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(n,r)}return this._content}update(e,n){for(let r of e)if($s.isIncremental(r)){let i=mh(r.range),s=this.offsetAt(i.start),o=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(o,this._content.length);let a=Math.max(i.start.line,0),l=Math.max(i.end.line,0),c=this._lineOffsets,h=yc(r.text,!1,s);if(l-a===h.length)for(let f=0,m=h.length;fe?i=o:r=o+1}let s=r-1;return{line:s,character:e-n[s]}}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line],i=e.line+1{let f=h.range.start.line-d.range.start.line;return f===0?h.range.start.character-d.range.start.character:f}),l=0,c=[];for(let h of a){let d=i.offsetAt(h.range.start);if(dl&&c.push(o.substring(l,d)),h.newText.length&&c.push(h.newText),l=i.offsetAt(h.range.end)}return c.push(o.substr(l)),c.join("")}t.applyEdits=r})(Hs||(Hs={}));function Gs(t,e){if(t.length<=1)return t;let n=t.length/2|0,r=t.slice(0,n),i=t.slice(n);Gs(r,e),Gs(i,e);let s=0,o=0,a=0;for(;sn.line||e.line===n.line&&e.character>n.character?{start:n,end:e}:t}function ap(t){let e=mh(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var wc;(function(t){t.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[qe.Markdown,qe.PlainText]}},hover:{contentFormat:[qe.Markdown,qe.PlainText]}}}})(wc||(wc={}));var rr;(function(t){t[t.Unknown=0]="Unknown",t[t.File=1]="File",t[t.Directory=2]="Directory",t[t.SymbolicLink=64]="SymbolicLink"})(rr||(rr={}));var xc={E:"Edge",FF:"Firefox",S:"Safari",C:"Chrome",IE:"IE",O:"Opera"};function gh(t){switch(t){case"experimental":return`\u26A0\uFE0F Property is experimental. Be cautious when using it.\uFE0F - // node_modules/monaco-editor/esm/vs/base/common/lifecycle.js - var TRACK_DISPOSABLES = false; - var disposableTracker = null; - function setDisposableTracker(tracker) { - disposableTracker = tracker; - } - if (TRACK_DISPOSABLES) { - const __is_disposable_tracked__ = "__is_disposable_tracked__"; - setDisposableTracker(new class { - trackDisposable(x) { - const stack = new Error("Potentially leaked disposable").stack; - setTimeout(() => { - if (!x[__is_disposable_tracked__]) { - console.log(stack); - } - }, 3e3); - } - setParent(child, parent) { - if (child && child !== Disposable.None) { - try { - child[__is_disposable_tracked__] = true; - } catch (_a5) { - } - } - } - markAsDisposed(disposable) { - if (disposable && disposable !== Disposable.None) { - try { - disposable[__is_disposable_tracked__] = true; - } catch (_a5) { - } - } - } - markAsSingleton(disposable) { - } - }()); - } - function trackDisposable(x) { - disposableTracker === null || disposableTracker === void 0 ? void 0 : disposableTracker.trackDisposable(x); - return x; - } - function markAsDisposed(disposable) { - disposableTracker === null || disposableTracker === void 0 ? void 0 : disposableTracker.markAsDisposed(disposable); - } - function setParentOfDisposable(child, parent) { - disposableTracker === null || disposableTracker === void 0 ? void 0 : disposableTracker.setParent(child, parent); - } - function setParentOfDisposables(children, parent) { - if (!disposableTracker) { - return; - } - for (const child of children) { - disposableTracker.setParent(child, parent); - } - } - function dispose(arg) { - if (Iterable.is(arg)) { - const errors = []; - for (const d of arg) { - if (d) { - try { - d.dispose(); - } catch (e) { - errors.push(e); - } - } - } - if (errors.length === 1) { - throw errors[0]; - } else if (errors.length > 1) { - throw new AggregateError(errors, "Encountered errors while disposing of store"); - } - return Array.isArray(arg) ? [] : arg; - } else if (arg) { - arg.dispose(); - return arg; - } - } - function combinedDisposable(...disposables) { - const parent = toDisposable(() => dispose(disposables)); - setParentOfDisposables(disposables, parent); - return parent; - } - function toDisposable(fn) { - const self2 = trackDisposable({ - dispose: createSingleCallFunction(() => { - markAsDisposed(self2); - fn(); - }) - }); - return self2; - } - var DisposableStore = class _DisposableStore { - constructor() { - this._toDispose = /* @__PURE__ */ new Set(); - this._isDisposed = false; - trackDisposable(this); - } - /** - * Dispose of all registered disposables and mark this object as disposed. - * - * Any future disposables added to this object will be disposed of on `add`. - */ - dispose() { - if (this._isDisposed) { - return; - } - markAsDisposed(this); - this._isDisposed = true; - this.clear(); - } - /** - * @return `true` if this object has been disposed of. - */ - get isDisposed() { - return this._isDisposed; - } - /** - * Dispose of all registered disposables but do not mark this object as disposed. - */ - clear() { - if (this._toDispose.size === 0) { - return; - } - try { - dispose(this._toDispose); - } finally { - this._toDispose.clear(); - } - } - /** - * Add a new {@link IDisposable disposable} to the collection. - */ - add(o) { - if (!o) { - return o; - } - if (o === this) { - throw new Error("Cannot register a disposable on itself!"); - } - setParentOfDisposable(o, this); - if (this._isDisposed) { - if (!_DisposableStore.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); - } - } else { - this._toDispose.add(o); - } - return o; - } - /** - * Deletes the value from the store, but does not dispose it. - */ - deleteAndLeak(o) { - if (!o) { - return; - } - if (this._toDispose.has(o)) { - this._toDispose.delete(o); - setParentOfDisposable(o, null); - } - } - }; - DisposableStore.DISABLE_DISPOSED_WARNING = false; - var Disposable = class { - constructor() { - this._store = new DisposableStore(); - trackDisposable(this); - setParentOfDisposable(this._store, this); - } - dispose() { - markAsDisposed(this); - this._store.dispose(); - } - /** - * Adds `o` to the collection of disposables managed by this object. - */ - _register(o) { - if (o === this) { - throw new Error("Cannot register a disposable on itself!"); - } - return this._store.add(o); - } - }; - Disposable.None = Object.freeze({ dispose() { - } }); +`;case"nonstandard":return`\u{1F6A8}\uFE0F Property is nonstandard. Avoid using it. - // node_modules/monaco-editor/esm/vs/base/common/linkedList.js - var Node = class _Node { - constructor(element) { - this.element = element; - this.next = _Node.Undefined; - this.prev = _Node.Undefined; - } - }; - Node.Undefined = new Node(void 0); - var LinkedList = class { - constructor() { - this._first = Node.Undefined; - this._last = Node.Undefined; - this._size = 0; - } - get size() { - return this._size; - } - isEmpty() { - return this._first === Node.Undefined; - } - clear() { - let node = this._first; - while (node !== Node.Undefined) { - const next = node.next; - node.prev = Node.Undefined; - node.next = Node.Undefined; - node = next; - } - this._first = Node.Undefined; - this._last = Node.Undefined; - this._size = 0; - } - unshift(element) { - return this._insert(element, false); - } - push(element) { - return this._insert(element, true); - } - _insert(element, atTheEnd) { - const newNode = new Node(element); - if (this._first === Node.Undefined) { - this._first = newNode; - this._last = newNode; - } else if (atTheEnd) { - const oldLast = this._last; - this._last = newNode; - newNode.prev = oldLast; - oldLast.next = newNode; - } else { - const oldFirst = this._first; - this._first = newNode; - newNode.next = oldFirst; - oldFirst.prev = newNode; - } - this._size += 1; - let didRemove = false; - return () => { - if (!didRemove) { - didRemove = true; - this._remove(newNode); - } - }; - } - shift() { - if (this._first === Node.Undefined) { - return void 0; - } else { - const res = this._first.element; - this._remove(this._first); - return res; - } - } - pop() { - if (this._last === Node.Undefined) { - return void 0; - } else { - const res = this._last.element; - this._remove(this._last); - return res; - } - } - _remove(node) { - if (node.prev !== Node.Undefined && node.next !== Node.Undefined) { - const anchor = node.prev; - anchor.next = node.next; - node.next.prev = anchor; - } else if (node.prev === Node.Undefined && node.next === Node.Undefined) { - this._first = Node.Undefined; - this._last = Node.Undefined; - } else if (node.next === Node.Undefined) { - this._last = this._last.prev; - this._last.next = Node.Undefined; - } else if (node.prev === Node.Undefined) { - this._first = this._first.next; - this._first.prev = Node.Undefined; - } - this._size -= 1; - } - *[Symbol.iterator]() { - let node = this._first; - while (node !== Node.Undefined) { - yield node.element; - node = node.next; - } - } - }; +`;case"obsolete":return`\u{1F6A8}\uFE0F\uFE0F\uFE0F Property is obsolete. Avoid using it. - // node_modules/monaco-editor/esm/vs/base/common/stopwatch.js - var hasPerformanceNow = globalThis.performance && typeof globalThis.performance.now === "function"; - var StopWatch = class _StopWatch { - static create(highResolution) { - return new _StopWatch(highResolution); - } - constructor(highResolution) { - this._now = hasPerformanceNow && highResolution === false ? Date.now : globalThis.performance.now.bind(globalThis.performance); - this._startTime = this._now(); - this._stopTime = -1; - } - stop() { - this._stopTime = this._now(); - } - elapsed() { - if (this._stopTime !== -1) { - return this._stopTime - this._startTime; - } - return this._now() - this._startTime; - } - }; +`;default:return""}}function Rt(t,e,n){var r;if(e?r={kind:"markdown",value:cp(t,n)}:r={kind:"plaintext",value:lp(t,n)},r.value!=="")return r}function Qr(t){return t=t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&"),t.replace(//g,">")}function lp(t,e){if(!t.description||t.description==="")return"";if(typeof t.description!="string")return t.description.value;var n="";if(e?.documentation!==!1){t.status&&(n+=gh(t.status)),n+=t.description;var r=bh(t.browsers);r&&(n+=` +(`+r+")"),"syntax"in t&&(n+=` - // node_modules/monaco-editor/esm/vs/base/common/event.js - var _enableDisposeWithListenerWarning = false; - var _enableSnapshotPotentialLeakWarning = false; - var Event; - (function(Event2) { - Event2.None = () => Disposable.None; - function _addLeakageTraceLogic(options) { - if (_enableSnapshotPotentialLeakWarning) { - const { onDidAddListener: origListenerDidAdd } = options; - const stack = Stacktrace.create(); - let count = 0; - options.onDidAddListener = () => { - if (++count === 2) { - console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"); - stack.print(); - } - origListenerDidAdd === null || origListenerDidAdd === void 0 ? void 0 : origListenerDidAdd(); - }; - } - } - function defer(event, disposable) { - return debounce(event, () => void 0, 0, void 0, true, void 0, disposable); - } - Event2.defer = defer; - function once2(event) { - return (listener, thisArgs = null, disposables) => { - let didFire = false; - let result = void 0; - result = event((e) => { - if (didFire) { - return; - } else if (result) { - result.dispose(); - } else { - didFire = true; - } - return listener.call(thisArgs, e); - }, null, disposables); - if (didFire) { - result.dispose(); - } - return result; - }; - } - Event2.once = once2; - function map(event, map2, disposable) { - return snapshot((listener, thisArgs = null, disposables) => event((i) => listener.call(thisArgs, map2(i)), null, disposables), disposable); - } - Event2.map = map; - function forEach(event, each, disposable) { - return snapshot((listener, thisArgs = null, disposables) => event((i) => { - each(i); - listener.call(thisArgs, i); - }, null, disposables), disposable); - } - Event2.forEach = forEach; - function filter(event, filter2, disposable) { - return snapshot((listener, thisArgs = null, disposables) => event((e) => filter2(e) && listener.call(thisArgs, e), null, disposables), disposable); - } - Event2.filter = filter; - function signal(event) { - return event; - } - Event2.signal = signal; - function any(...events) { - return (listener, thisArgs = null, disposables) => { - const disposable = combinedDisposable(...events.map((event) => event((e) => listener.call(thisArgs, e)))); - return addAndReturnDisposable(disposable, disposables); - }; - } - Event2.any = any; - function reduce(event, merge, initial, disposable) { - let output = initial; - return map(event, (e) => { - output = merge(output, e); - return output; - }, disposable); - } - Event2.reduce = reduce; - function snapshot(event, disposable) { - let listener; - const options = { - onWillAddFirstListener() { - listener = event(emitter.fire, emitter); - }, - onDidRemoveLastListener() { - listener === null || listener === void 0 ? void 0 : listener.dispose(); - } - }; - if (!disposable) { - _addLeakageTraceLogic(options); - } - const emitter = new Emitter(options); - disposable === null || disposable === void 0 ? void 0 : disposable.add(emitter); - return emitter.event; - } - function addAndReturnDisposable(d, store) { - if (store instanceof Array) { - store.push(d); - } else if (store) { - store.add(d); - } - return d; - } - function debounce(event, merge, delay = 100, leading = false, flushOnListenerRemove = false, leakWarningThreshold, disposable) { - let subscription; - let output = void 0; - let handle = void 0; - let numDebouncedCalls = 0; - let doFire; - const options = { - leakWarningThreshold, - onWillAddFirstListener() { - subscription = event((cur) => { - numDebouncedCalls++; - output = merge(output, cur); - if (leading && !handle) { - emitter.fire(output); - output = void 0; - } - doFire = () => { - const _output = output; - output = void 0; - handle = void 0; - if (!leading || numDebouncedCalls > 1) { - emitter.fire(_output); - } - numDebouncedCalls = 0; - }; - if (typeof delay === "number") { - clearTimeout(handle); - handle = setTimeout(doFire, delay); - } else { - if (handle === void 0) { - handle = 0; - queueMicrotask(doFire); - } - } - }); - }, - onWillRemoveListener() { - if (flushOnListenerRemove && numDebouncedCalls > 0) { - doFire === null || doFire === void 0 ? void 0 : doFire(); - } - }, - onDidRemoveLastListener() { - doFire = void 0; - subscription.dispose(); - } - }; - if (!disposable) { - _addLeakageTraceLogic(options); - } - const emitter = new Emitter(options); - disposable === null || disposable === void 0 ? void 0 : disposable.add(emitter); - return emitter.event; - } - Event2.debounce = debounce; - function accumulate(event, delay = 0, disposable) { - return Event2.debounce(event, (last, e) => { - if (!last) { - return [e]; - } - last.push(e); - return last; - }, delay, void 0, true, void 0, disposable); - } - Event2.accumulate = accumulate; - function latch(event, equals3 = (a2, b) => a2 === b, disposable) { - let firstCall = true; - let cache; - return filter(event, (value) => { - const shouldEmit = firstCall || !equals3(value, cache); - firstCall = false; - cache = value; - return shouldEmit; - }, disposable); - } - Event2.latch = latch; - function split(event, isT, disposable) { - return [ - Event2.filter(event, isT, disposable), - Event2.filter(event, (e) => !isT(e), disposable) - ]; - } - Event2.split = split; - function buffer(event, flushAfterTimeout = false, _buffer = [], disposable) { - let buffer2 = _buffer.slice(); - let listener = event((e) => { - if (buffer2) { - buffer2.push(e); - } else { - emitter.fire(e); - } - }); - if (disposable) { - disposable.add(listener); - } - const flush = () => { - buffer2 === null || buffer2 === void 0 ? void 0 : buffer2.forEach((e) => emitter.fire(e)); - buffer2 = null; - }; - const emitter = new Emitter({ - onWillAddFirstListener() { - if (!listener) { - listener = event((e) => emitter.fire(e)); - if (disposable) { - disposable.add(listener); - } - } - }, - onDidAddFirstListener() { - if (buffer2) { - if (flushAfterTimeout) { - setTimeout(flush); - } else { - flush(); - } - } - }, - onDidRemoveLastListener() { - if (listener) { - listener.dispose(); - } - listener = null; - } - }); - if (disposable) { - disposable.add(emitter); - } - return emitter.event; - } - Event2.buffer = buffer; - function chain(event, sythensize) { - const fn = (listener, thisArgs, disposables) => { - const cs = sythensize(new ChainableSynthesis()); - return event(function(value) { - const result = cs.evaluate(value); - if (result !== HaltChainable) { - listener.call(thisArgs, result); - } - }, void 0, disposables); - }; - return fn; - } - Event2.chain = chain; - const HaltChainable = Symbol("HaltChainable"); - class ChainableSynthesis { - constructor() { - this.steps = []; - } - map(fn) { - this.steps.push(fn); - return this; - } - forEach(fn) { - this.steps.push((v) => { - fn(v); - return v; - }); - return this; - } - filter(fn) { - this.steps.push((v) => fn(v) ? v : HaltChainable); - return this; - } - reduce(merge, initial) { - let last = initial; - this.steps.push((v) => { - last = merge(last, v); - return last; - }); - return this; - } - latch(equals3 = (a2, b) => a2 === b) { - let firstCall = true; - let cache; - this.steps.push((value) => { - const shouldEmit = firstCall || !equals3(value, cache); - firstCall = false; - cache = value; - return shouldEmit ? value : HaltChainable; - }); - return this; - } - evaluate(value) { - for (const step of this.steps) { - value = step(value); - if (value === HaltChainable) { - break; - } - } - return value; - } - } - function fromNodeEventEmitter(emitter, eventName, map2 = (id) => id) { - const fn = (...args) => result.fire(map2(...args)); - const onFirstListenerAdd = () => emitter.on(eventName, fn); - const onLastListenerRemove = () => emitter.removeListener(eventName, fn); - const result = new Emitter({ onWillAddFirstListener: onFirstListenerAdd, onDidRemoveLastListener: onLastListenerRemove }); - return result.event; - } - Event2.fromNodeEventEmitter = fromNodeEventEmitter; - function fromDOMEventEmitter(emitter, eventName, map2 = (id) => id) { - const fn = (...args) => result.fire(map2(...args)); - const onFirstListenerAdd = () => emitter.addEventListener(eventName, fn); - const onLastListenerRemove = () => emitter.removeEventListener(eventName, fn); - const result = new Emitter({ onWillAddFirstListener: onFirstListenerAdd, onDidRemoveLastListener: onLastListenerRemove }); - return result.event; - } - Event2.fromDOMEventEmitter = fromDOMEventEmitter; - function toPromise(event) { - return new Promise((resolve2) => once2(event)(resolve2)); - } - Event2.toPromise = toPromise; - function fromPromise(promise) { - const result = new Emitter(); - promise.then((res) => { - result.fire(res); - }, () => { - result.fire(void 0); - }).finally(() => { - result.dispose(); - }); - return result.event; - } - Event2.fromPromise = fromPromise; - function runAndSubscribe(event, handler, initial) { - handler(initial); - return event((e) => handler(e)); - } - Event2.runAndSubscribe = runAndSubscribe; - class EmitterObserver { - constructor(_observable, store) { - this._observable = _observable; - this._counter = 0; - this._hasChanged = false; - const options = { - onWillAddFirstListener: () => { - _observable.addObserver(this); - }, - onDidRemoveLastListener: () => { - _observable.removeObserver(this); - } - }; - if (!store) { - _addLeakageTraceLogic(options); - } - this.emitter = new Emitter(options); - if (store) { - store.add(this.emitter); - } - } - beginUpdate(_observable) { - this._counter++; - } - handlePossibleChange(_observable) { - } - handleChange(_observable, _change) { - this._hasChanged = true; - } - endUpdate(_observable) { - this._counter--; - if (this._counter === 0) { - this._observable.reportChanges(); - if (this._hasChanged) { - this._hasChanged = false; - this.emitter.fire(this._observable.get()); - } - } - } - } - function fromObservable(obs, store) { - const observer = new EmitterObserver(obs, store); - return observer.emitter.event; - } - Event2.fromObservable = fromObservable; - function fromObservableLight(observable) { - return (listener, thisArgs, disposables) => { - let count = 0; - let didChange = false; - const observer = { - beginUpdate() { - count++; - }, - endUpdate() { - count--; - if (count === 0) { - observable.reportChanges(); - if (didChange) { - didChange = false; - listener.call(thisArgs); - } - } - }, - handlePossibleChange() { - }, - handleChange() { - didChange = true; - } - }; - observable.addObserver(observer); - observable.reportChanges(); - const disposable = { - dispose() { - observable.removeObserver(observer); - } - }; - if (disposables instanceof DisposableStore) { - disposables.add(disposable); - } else if (Array.isArray(disposables)) { - disposables.push(disposable); - } - return disposable; - }; - } - Event2.fromObservableLight = fromObservableLight; - })(Event || (Event = {})); - var EventProfiling = class _EventProfiling { - constructor(name) { - this.listenerCount = 0; - this.invocationCount = 0; - this.elapsedOverall = 0; - this.durations = []; - this.name = `${name}_${_EventProfiling._idPool++}`; - _EventProfiling.all.add(this); - } - start(listenerCount) { - this._stopWatch = new StopWatch(); - this.listenerCount = listenerCount; - } - stop() { - if (this._stopWatch) { - const elapsed = this._stopWatch.elapsed(); - this.durations.push(elapsed); - this.elapsedOverall += elapsed; - this.invocationCount += 1; - this._stopWatch = void 0; - } - } - }; - EventProfiling.all = /* @__PURE__ */ new Set(); - EventProfiling._idPool = 0; - var _globalLeakWarningThreshold = -1; - var LeakageMonitor = class { - constructor(threshold, name = Math.random().toString(18).slice(2, 5)) { - this.threshold = threshold; - this.name = name; - this._warnCountdown = 0; - } - dispose() { - var _a5; - (_a5 = this._stacks) === null || _a5 === void 0 ? void 0 : _a5.clear(); - } - check(stack, listenerCount) { - const threshold = this.threshold; - if (threshold <= 0 || listenerCount < threshold) { - return void 0; - } - if (!this._stacks) { - this._stacks = /* @__PURE__ */ new Map(); - } - const count = this._stacks.get(stack.value) || 0; - this._stacks.set(stack.value, count + 1); - this._warnCountdown -= 1; - if (this._warnCountdown <= 0) { - this._warnCountdown = threshold * 0.5; - let topStack; - let topCount = 0; - for (const [stack2, count2] of this._stacks) { - if (!topStack || topCount < count2) { - topStack = stack2; - topCount = count2; - } - } - console.warn(`[${this.name}] potential listener LEAK detected, having ${listenerCount} listeners already. MOST frequent listener (${topCount}):`); - console.warn(topStack); - } - return () => { - const count2 = this._stacks.get(stack.value) || 0; - this._stacks.set(stack.value, count2 - 1); - }; - } - }; - var Stacktrace = class _Stacktrace { - static create() { - var _a5; - return new _Stacktrace((_a5 = new Error().stack) !== null && _a5 !== void 0 ? _a5 : ""); - } - constructor(value) { - this.value = value; - } - print() { - console.warn(this.value.split("\n").slice(2).join("\n")); - } - }; - var UniqueContainer = class { - constructor(value) { - this.value = value; - } - }; - var compactionThreshold = 2; - var forEachListener = (listeners, fn) => { - if (listeners instanceof UniqueContainer) { - fn(listeners); - } else { - for (let i = 0; i < listeners.length; i++) { - const l = listeners[i]; - if (l) { - fn(l); - } - } - } - }; - var Emitter = class { - constructor(options) { - var _a5, _b2, _c, _d, _e; - this._size = 0; - this._options = options; - this._leakageMon = _globalLeakWarningThreshold > 0 || ((_a5 = this._options) === null || _a5 === void 0 ? void 0 : _a5.leakWarningThreshold) ? new LeakageMonitor((_c = (_b2 = this._options) === null || _b2 === void 0 ? void 0 : _b2.leakWarningThreshold) !== null && _c !== void 0 ? _c : _globalLeakWarningThreshold) : void 0; - this._perfMon = ((_d = this._options) === null || _d === void 0 ? void 0 : _d._profName) ? new EventProfiling(this._options._profName) : void 0; - this._deliveryQueue = (_e = this._options) === null || _e === void 0 ? void 0 : _e.deliveryQueue; - } - dispose() { - var _a5, _b2, _c, _d; - if (!this._disposed) { - this._disposed = true; - if (((_a5 = this._deliveryQueue) === null || _a5 === void 0 ? void 0 : _a5.current) === this) { - this._deliveryQueue.reset(); - } - if (this._listeners) { - if (_enableDisposeWithListenerWarning) { - const listeners = this._listeners; - queueMicrotask(() => { - forEachListener(listeners, (l) => { - var _a6; - return (_a6 = l.stack) === null || _a6 === void 0 ? void 0 : _a6.print(); - }); - }); - } - this._listeners = void 0; - this._size = 0; - } - (_c = (_b2 = this._options) === null || _b2 === void 0 ? void 0 : _b2.onDidRemoveLastListener) === null || _c === void 0 ? void 0 : _c.call(_b2); - (_d = this._leakageMon) === null || _d === void 0 ? void 0 : _d.dispose(); - } - } - /** - * For the public to allow to subscribe - * to events from this Emitter - */ - get event() { - var _a5; - (_a5 = this._event) !== null && _a5 !== void 0 ? _a5 : this._event = (callback, thisArgs, disposables) => { - var _a6, _b2, _c, _d, _e; - if (this._leakageMon && this._size > this._leakageMon.threshold * 3) { - console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`); - return Disposable.None; - } - if (this._disposed) { - return Disposable.None; - } - if (thisArgs) { - callback = callback.bind(thisArgs); - } - const contained = new UniqueContainer(callback); - let removeMonitor; - let stack; - if (this._leakageMon && this._size >= Math.ceil(this._leakageMon.threshold * 0.2)) { - contained.stack = Stacktrace.create(); - removeMonitor = this._leakageMon.check(contained.stack, this._size + 1); - } - if (_enableDisposeWithListenerWarning) { - contained.stack = stack !== null && stack !== void 0 ? stack : Stacktrace.create(); - } - if (!this._listeners) { - (_b2 = (_a6 = this._options) === null || _a6 === void 0 ? void 0 : _a6.onWillAddFirstListener) === null || _b2 === void 0 ? void 0 : _b2.call(_a6, this); - this._listeners = contained; - (_d = (_c = this._options) === null || _c === void 0 ? void 0 : _c.onDidAddFirstListener) === null || _d === void 0 ? void 0 : _d.call(_c, this); - } else if (this._listeners instanceof UniqueContainer) { - (_e = this._deliveryQueue) !== null && _e !== void 0 ? _e : this._deliveryQueue = new EventDeliveryQueuePrivate(); - this._listeners = [this._listeners, contained]; - } else { - this._listeners.push(contained); - } - this._size++; - const result = toDisposable(() => { - removeMonitor === null || removeMonitor === void 0 ? void 0 : removeMonitor(); - this._removeListener(contained); - }); - if (disposables instanceof DisposableStore) { - disposables.add(result); - } else if (Array.isArray(disposables)) { - disposables.push(result); - } - return result; - }; - return this._event; - } - _removeListener(listener) { - var _a5, _b2, _c, _d; - (_b2 = (_a5 = this._options) === null || _a5 === void 0 ? void 0 : _a5.onWillRemoveListener) === null || _b2 === void 0 ? void 0 : _b2.call(_a5, this); - if (!this._listeners) { - return; - } - if (this._size === 1) { - this._listeners = void 0; - (_d = (_c = this._options) === null || _c === void 0 ? void 0 : _c.onDidRemoveLastListener) === null || _d === void 0 ? void 0 : _d.call(_c, this); - this._size = 0; - return; - } - const listeners = this._listeners; - const index = listeners.indexOf(listener); - if (index === -1) { - console.log("disposed?", this._disposed); - console.log("size?", this._size); - console.log("arr?", JSON.stringify(this._listeners)); - throw new Error("Attempted to dispose unknown listener"); - } - this._size--; - listeners[index] = void 0; - const adjustDeliveryQueue = this._deliveryQueue.current === this; - if (this._size * compactionThreshold <= listeners.length) { - let n = 0; - for (let i = 0; i < listeners.length; i++) { - if (listeners[i]) { - listeners[n++] = listeners[i]; - } else if (adjustDeliveryQueue) { - this._deliveryQueue.end--; - if (n < this._deliveryQueue.i) { - this._deliveryQueue.i--; - } - } - } - listeners.length = n; - } - } - _deliver(listener, value) { - var _a5; - if (!listener) { - return; - } - const errorHandler2 = ((_a5 = this._options) === null || _a5 === void 0 ? void 0 : _a5.onListenerError) || onUnexpectedError; - if (!errorHandler2) { - listener.value(value); - return; - } - try { - listener.value(value); - } catch (e) { - errorHandler2(e); - } - } - /** Delivers items in the queue. Assumes the queue is ready to go. */ - _deliverQueue(dq) { - const listeners = dq.current._listeners; - while (dq.i < dq.end) { - this._deliver(listeners[dq.i++], dq.value); - } - dq.reset(); - } - /** - * To be kept private to fire an event to - * subscribers - */ - fire(event) { - var _a5, _b2, _c, _d; - if ((_a5 = this._deliveryQueue) === null || _a5 === void 0 ? void 0 : _a5.current) { - this._deliverQueue(this._deliveryQueue); - (_b2 = this._perfMon) === null || _b2 === void 0 ? void 0 : _b2.stop(); - } - (_c = this._perfMon) === null || _c === void 0 ? void 0 : _c.start(this._size); - if (!this._listeners) { - } else if (this._listeners instanceof UniqueContainer) { - this._deliver(this._listeners, event); - } else { - const dq = this._deliveryQueue; - dq.enqueue(this, event, this._listeners.length); - this._deliverQueue(dq); - } - (_d = this._perfMon) === null || _d === void 0 ? void 0 : _d.stop(); - } - hasListeners() { - return this._size > 0; - } - }; - var EventDeliveryQueuePrivate = class { - constructor() { - this.i = -1; - this.end = 0; - } - enqueue(emitter, value, end) { - this.i = 0; - this.end = end; - this.current = emitter; - this.value = value; - } - reset() { - this.i = this.end; - this.current = void 0; - this.value = void 0; - } - }; +Syntax: `.concat(t.syntax))}return t.references&&t.references.length>0&&e?.references!==!1&&(n.length>0&&(n+=` - // node_modules/monaco-editor/esm/vs/base/common/types.js - function isString(str) { - return typeof str === "string"; - } +`),n+=t.references.map(function(i){return"".concat(i.name,": ").concat(i.url)}).join(" | ")),n}function cp(t,e){if(!t.description||t.description==="")return"";var n="";if(e?.documentation!==!1){t.status&&(n+=gh(t.status)),typeof t.description=="string"?n+=Qr(t.description):n+=t.description.kind===qe.Markdown?t.description.value:Qr(t.description.value);var r=bh(t.browsers);r&&(n+=` - // node_modules/monaco-editor/esm/vs/base/common/objects.js - function getAllPropertyNames(obj) { - let res = []; - while (Object.prototype !== obj) { - res = res.concat(Object.getOwnPropertyNames(obj)); - obj = Object.getPrototypeOf(obj); - } - return res; - } - function getAllMethodNames(obj) { - const methods = []; - for (const prop of getAllPropertyNames(obj)) { - if (typeof obj[prop] === "function") { - methods.push(prop); - } - } - return methods; - } - function createProxyObject(methodNames, invoke) { - const createProxyMethod = (method) => { - return function() { - const args = Array.prototype.slice.call(arguments, 0); - return invoke(method, args); - }; - }; - const result = {}; - for (const methodName of methodNames) { - result[methodName] = createProxyMethod(methodName); - } - return result; - } +(`+Qr(r)+")"),"syntax"in t&&t.syntax&&(n+=` - // node_modules/monaco-editor/esm/vs/nls.js - var isPseudo = typeof document !== "undefined" && document.location && document.location.hash.indexOf("pseudo=true") >= 0; - function _format(message, args) { - let result; - if (args.length === 0) { - result = message; - } else { - result = message.replace(/\{(\d+)\}/g, (match, rest) => { - const index = rest[0]; - const arg = args[index]; - let result2 = match; - if (typeof arg === "string") { - result2 = arg; - } else if (typeof arg === "number" || typeof arg === "boolean" || arg === void 0 || arg === null) { - result2 = String(arg); - } - return result2; - }); - } - if (isPseudo) { - result = "\uFF3B" + result.replace(/[aouei]/g, "$&$&") + "\uFF3D"; - } - return result; - } - function localize(data, message, ...args) { - return _format(message, args); - } - function getConfiguredDefaultLocale(_) { - return void 0; - } +Syntax: `.concat(Qr(t.syntax)))}return t.references&&t.references.length>0&&e?.references!==!1&&(n.length>0&&(n+=` - // node_modules/monaco-editor/esm/vs/base/common/platform.js - var _a; - var LANGUAGE_DEFAULT = "en"; - var _isWindows = false; - var _isMacintosh = false; - var _isLinux = false; - var _isLinuxSnap = false; - var _isNative = false; - var _isWeb = false; - var _isElectron = false; - var _isIOS = false; - var _isCI = false; - var _isMobile = false; - var _locale = void 0; - var _language = LANGUAGE_DEFAULT; - var _platformLocale = LANGUAGE_DEFAULT; - var _translationsConfigFile = void 0; - var _userAgent = void 0; - var $globalThis = globalThis; - var nodeProcess = void 0; - if (typeof $globalThis.vscode !== "undefined" && typeof $globalThis.vscode.process !== "undefined") { - nodeProcess = $globalThis.vscode.process; - } else if (typeof process !== "undefined") { - nodeProcess = process; - } - var isElectronProcess = typeof ((_a = nodeProcess === null || nodeProcess === void 0 ? void 0 : nodeProcess.versions) === null || _a === void 0 ? void 0 : _a.electron) === "string"; - var isElectronRenderer = isElectronProcess && (nodeProcess === null || nodeProcess === void 0 ? void 0 : nodeProcess.type) === "renderer"; - if (typeof nodeProcess === "object") { - _isWindows = nodeProcess.platform === "win32"; - _isMacintosh = nodeProcess.platform === "darwin"; - _isLinux = nodeProcess.platform === "linux"; - _isLinuxSnap = _isLinux && !!nodeProcess.env["SNAP"] && !!nodeProcess.env["SNAP_REVISION"]; - _isElectron = isElectronProcess; - _isCI = !!nodeProcess.env["CI"] || !!nodeProcess.env["BUILD_ARTIFACTSTAGINGDIRECTORY"]; - _locale = LANGUAGE_DEFAULT; - _language = LANGUAGE_DEFAULT; - const rawNlsConfig = nodeProcess.env["VSCODE_NLS_CONFIG"]; - if (rawNlsConfig) { - try { - const nlsConfig = JSON.parse(rawNlsConfig); - const resolved = nlsConfig.availableLanguages["*"]; - _locale = nlsConfig.locale; - _platformLocale = nlsConfig.osLocale; - _language = resolved ? resolved : LANGUAGE_DEFAULT; - _translationsConfigFile = nlsConfig._translationsConfigFile; - } catch (e) { - } - } - _isNative = true; - } else if (typeof navigator === "object" && !isElectronRenderer) { - _userAgent = navigator.userAgent; - _isWindows = _userAgent.indexOf("Windows") >= 0; - _isMacintosh = _userAgent.indexOf("Macintosh") >= 0; - _isIOS = (_userAgent.indexOf("Macintosh") >= 0 || _userAgent.indexOf("iPad") >= 0 || _userAgent.indexOf("iPhone") >= 0) && !!navigator.maxTouchPoints && navigator.maxTouchPoints > 0; - _isLinux = _userAgent.indexOf("Linux") >= 0; - _isMobile = (_userAgent === null || _userAgent === void 0 ? void 0 : _userAgent.indexOf("Mobi")) >= 0; - _isWeb = true; - const configuredLocale = getConfiguredDefaultLocale( - // This call _must_ be done in the file that calls `nls.getConfiguredDefaultLocale` - // to ensure that the NLS AMD Loader plugin has been loaded and configured. - // This is because the loader plugin decides what the default locale is based on - // how it's able to resolve the strings. - localize({ key: "ensureLoaderPluginIsLoaded", comment: ["{Locked}"] }, "_") - ); - _locale = configuredLocale || LANGUAGE_DEFAULT; - _language = _locale; - _platformLocale = navigator.language; - } else { - console.error("Unable to resolve platform."); - } - var _platform = 0; - if (_isMacintosh) { - _platform = 1; - } else if (_isWindows) { - _platform = 3; - } else if (_isLinux) { - _platform = 2; - } - var isWindows = _isWindows; - var isMacintosh = _isMacintosh; - var isWebWorker = _isWeb && typeof $globalThis.importScripts === "function"; - var webWorkerOrigin = isWebWorker ? $globalThis.origin : void 0; - var userAgent = _userAgent; - var setTimeout0IsFaster = typeof $globalThis.postMessage === "function" && !$globalThis.importScripts; - var setTimeout0 = (() => { - if (setTimeout0IsFaster) { - const pending = []; - $globalThis.addEventListener("message", (e) => { - if (e.data && e.data.vscodeScheduleAsyncWork) { - for (let i = 0, len = pending.length; i < len; i++) { - const candidate = pending[i]; - if (candidate.id === e.data.vscodeScheduleAsyncWork) { - pending.splice(i, 1); - candidate.callback(); - return; - } - } - } - }); - let lastId = 0; - return (callback) => { - const myId = ++lastId; - pending.push({ - id: myId, - callback - }); - $globalThis.postMessage({ vscodeScheduleAsyncWork: myId }, "*"); - }; - } - return (callback) => setTimeout(callback); - })(); - var isChrome = !!(userAgent && userAgent.indexOf("Chrome") >= 0); - var isFirefox = !!(userAgent && userAgent.indexOf("Firefox") >= 0); - var isSafari = !!(!isChrome && (userAgent && userAgent.indexOf("Safari") >= 0)); - var isEdge = !!(userAgent && userAgent.indexOf("Edg/") >= 0); - var isAndroid = !!(userAgent && userAgent.indexOf("Android") >= 0); +`),n+=t.references.map(function(i){return"[".concat(i.name,"](").concat(i.url,")")}).join(" | ")),n}function bh(t){return t===void 0&&(t=[]),t.length===0?null:t.map(function(e){var n="",r=e.match(/([A-Z]+)(\d+)?/),i=r[1],s=r[2];return i in xc&&(n+=xc[i]),s&&(n+=" "+s),n}).join(", ")}var qn=Je(),hp=[{func:"rgb($red, $green, $blue)",desc:qn("css.builtin.rgb","Creates a Color from red, green, and blue values.")},{func:"rgba($red, $green, $blue, $alpha)",desc:qn("css.builtin.rgba","Creates a Color from red, green, blue, and alpha values.")},{func:"hsl($hue, $saturation, $lightness)",desc:qn("css.builtin.hsl","Creates a Color from hue, saturation, and lightness values.")},{func:"hsla($hue, $saturation, $lightness, $alpha)",desc:qn("css.builtin.hsla","Creates a Color from hue, saturation, lightness, and alpha values.")},{func:"hwb($hue $white $black)",desc:qn("css.builtin.hwb","Creates a Color from hue, white and black.")}],pi={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rebeccapurple:"#663399",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Sc={currentColor:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time.",transparent:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."};function Et(t,e){var n=t.getText(),r=n.match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/);if(r){r[2]&&(e=100);var i=parseFloat(r[1])/e;if(i>=0&&i<=1)return i}throw new Error}function _c(t){var e=t.getText(),n=e.match(/^([-+]?[0-9]*\.?[0-9]+)(deg|rad|grad|turn)?$/);if(n)switch(n[2]){case"deg":return parseFloat(e)%360;case"rad":return parseFloat(e)*180/Math.PI%360;case"grad":return parseFloat(e)*.9%360;case"turn":return parseFloat(e)*360%360;default:if(typeof n[2]>"u")return parseFloat(e)%360}throw new Error}function up(t){var e=t.getName();return e?/^(rgb|rgba|hsl|hsla|hwb)$/gi.test(e):!1}var Cc=48,dp=57,pp=65,Zr=97,fp=102;function ge(t){return t=Zr&&t<=fp?t-Zr+10:0)}function kc(t){if(t[0]!=="#")return null;switch(t.length){case 4:return{red:ge(t.charCodeAt(1))*17/255,green:ge(t.charCodeAt(2))*17/255,blue:ge(t.charCodeAt(3))*17/255,alpha:1};case 5:return{red:ge(t.charCodeAt(1))*17/255,green:ge(t.charCodeAt(2))*17/255,blue:ge(t.charCodeAt(3))*17/255,alpha:ge(t.charCodeAt(4))*17/255};case 7:return{red:(ge(t.charCodeAt(1))*16+ge(t.charCodeAt(2)))/255,green:(ge(t.charCodeAt(3))*16+ge(t.charCodeAt(4)))/255,blue:(ge(t.charCodeAt(5))*16+ge(t.charCodeAt(6)))/255,alpha:1};case 9:return{red:(ge(t.charCodeAt(1))*16+ge(t.charCodeAt(2)))/255,green:(ge(t.charCodeAt(3))*16+ge(t.charCodeAt(4)))/255,blue:(ge(t.charCodeAt(5))*16+ge(t.charCodeAt(6)))/255,alpha:(ge(t.charCodeAt(7))*16+ge(t.charCodeAt(8)))/255}}return null}function vh(t,e,n,r){if(r===void 0&&(r=1),t=t/60,e===0)return{red:n,green:n,blue:n,alpha:r};var i=function(a,l,c){for(;c<0;)c+=6;for(;c>=6;)c-=6;return c<1?(l-a)*c+a:c<3?l:c<4?(l-a)*(4-c)+a:a},s=n<=.5?n*(e+1):n+e-n*e,o=n*2-s;return{red:i(o,s,t+2),green:i(o,s,t),blue:i(o,s,t-2),alpha:r}}function yh(t){var e=t.red,n=t.green,r=t.blue,i=t.alpha,s=Math.max(e,n,r),o=Math.min(e,n,r),a=0,l=0,c=(o+s)/2,h=s-o;if(h>0){switch(l=Math.min(c<=.5?h/(2*c):h/(2-2*c),1),s){case e:a=(n-r)/h+(n=1){var i=e/(e+n);return{red:i,green:i,blue:i,alpha:r}}var s=vh(t,1,.5,r),o=s.red;o*=1-e-n,o+=e;var a=s.green;a*=1-e-n,a+=e;var l=s.blue;return l*=1-e-n,l+=e,{red:o,green:a,blue:l,alpha:r}}function gp(t){var e=yh(t),n=Math.min(t.red,t.green,t.blue),r=1-Math.max(t.red,t.green,t.blue);return{h:e.h,w:n,b:r,a:e.a}}function bp(t){if(t.type===v.HexColorValue){var e=t.getText();return kc(e)}else if(t.type===v.Function){var n=t,r=n.getName(),i=n.getArguments().getChildren();if(i.length===1){var s=i[0].getChildren();if(s.length===1&&s[0].type===v.Expression&&(i=s[0].getChildren(),i.length===3)){var o=i[2];if(o instanceof ao){var a=o.getLeft(),l=o.getRight(),c=o.getOperator();a&&l&&c&&c.matches("/")&&(i=[i[0],i[1],a,l])}}}if(!r||i.length<3||i.length>4)return null;try{var h=i.length===4?Et(i[3],1):1;if(r==="rgb"||r==="rgba")return{red:Et(i[0],255),green:Et(i[1],255),blue:Et(i[2],255),alpha:h};if(r==="hsl"||r==="hsla"){var d=_c(i[0]),f=Et(i[1],100),m=Et(i[2],100);return vh(d,f,m,h)}else if(r==="hwb"){var d=_c(i[0]),b=Et(i[1],100),g=Et(i[2],100);return mp(d,b,g,h)}}catch{return null}}else if(t.type===v.Identifier){if(t.parent&&t.parent.type!==v.Term)return null;var y=t.parent;if(y&&y.parent&&y.parent.type===v.BinaryExpression){var _=y.parent;if(_.parent&&_.parent.type===v.ListEntry&&_.parent.key===_)return null}var E=t.getText().toLowerCase();if(E==="none")return null;var w=pi[E];if(w)return kc(w)}return null}var Ec={bottom:"Computes to \u2018100%\u2019 for the vertical position if one or two values are given, otherwise specifies the bottom edge as the origin for the next offset.",center:"Computes to \u201850%\u2019 (\u2018left 50%\u2019) for the horizontal position if the horizontal position is not otherwise specified, or \u201850%\u2019 (\u2018top 50%\u2019) for the vertical position if it is.",left:"Computes to \u20180%\u2019 for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset.",right:"Computes to \u2018100%\u2019 for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset.",top:"Computes to \u20180%\u2019 for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset."},Fc={"no-repeat":"Placed once and not repeated in this direction.",repeat:"Repeated in this direction as often as needed to cover the background painting area.","repeat-x":"Computes to \u2018repeat no-repeat\u2019.","repeat-y":"Computes to \u2018no-repeat repeat\u2019.",round:"Repeated as often as will fit within the background positioning area. If it doesn\u2019t fit a whole number of times, it is rescaled so that it does.",space:"Repeated as often as will fit within the background positioning area without being clipped and then the images are spaced out to fill the area."},Rc={dashed:"A series of square-ended dashes.",dotted:"A series of round dots.",double:"Two parallel solid lines with some space between them.",groove:"Looks as if it were carved in the canvas.",hidden:"Same as \u2018none\u2019, but has different behavior in the border conflict resolution rules for border-collapsed tables.",inset:"Looks as if the content on the inside of the border is sunken into the canvas.",none:"No border. Color and width are ignored.",outset:"Looks as if the content on the inside of the border is coming out of the canvas.",ridge:"Looks as if it were coming out of the canvas.",solid:"A single line segment."},vp=["medium","thick","thin"],Dc={"border-box":"The background is painted within (clipped to) the border box.","content-box":"The background is painted within (clipped to) the content box.","padding-box":"The background is painted within (clipped to) the padding box."},Ac={"margin-box":"Uses the margin box as reference box.","fill-box":"Uses the object bounding box as reference box.","stroke-box":"Uses the stroke bounding box as reference box.","view-box":"Uses the nearest SVG viewport as reference box."},Mc={initial:"Represents the value specified as the property\u2019s initial value.",inherit:"Represents the computed value of the property on the element\u2019s parent.",unset:"Acts as either `inherit` or `initial`, depending on whether the property is inherited or not."},Nc={"var()":"Evaluates the value of a custom variable.","calc()":"Evaluates an mathematical expression. The following operators can be used: + - * /."},Lc={"url()":"Reference an image file by URL","image()":"Provide image fallbacks and annotations.","-webkit-image-set()":"Provide multiple resolutions. Remember to use unprefixed image-set() in addition.","image-set()":"Provide multiple resolutions of an image and const the UA decide which is most appropriate in a given situation.","-moz-element()":"Use an element in the document as an image. Remember to use unprefixed element() in addition.","element()":"Use an element in the document as an image.","cross-fade()":"Indicates the two images to be combined and how far along in the transition the combination is.","-webkit-gradient()":"Deprecated. Use modern linear-gradient() or radial-gradient() instead.","-webkit-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-moz-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-o-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","linear-gradient()":"A linear gradient is created by specifying a straight gradient line, and then several colors placed along that line.","-webkit-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-moz-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-o-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","repeating-linear-gradient()":"Same as linear-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop\u2019s position and the first specified color-stop\u2019s position.","-webkit-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","-moz-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","radial-gradient()":"Colors emerge from a single point and smoothly spread outward in a circular or elliptical shape.","-webkit-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","-moz-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","repeating-radial-gradient()":"Same as radial-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop\u2019s position and the first specified color-stop\u2019s position."},zc={ease:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0).","ease-in":"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0).","ease-in-out":"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0).","ease-out":"Equivalent to cubic-bezier(0, 0, 0.58, 1.0).",linear:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0).","step-end":"Equivalent to steps(1, end).","step-start":"Equivalent to steps(1, start).","steps()":"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value \u201Cstart\u201D or \u201Cend\u201D.","cubic-bezier()":"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2).","cubic-bezier(0.6, -0.28, 0.735, 0.045)":"Ease-in Back. Overshoots.","cubic-bezier(0.68, -0.55, 0.265, 1.55)":"Ease-in-out Back. Overshoots.","cubic-bezier(0.175, 0.885, 0.32, 1.275)":"Ease-out Back. Overshoots.","cubic-bezier(0.6, 0.04, 0.98, 0.335)":"Ease-in Circular. Based on half circle.","cubic-bezier(0.785, 0.135, 0.15, 0.86)":"Ease-in-out Circular. Based on half circle.","cubic-bezier(0.075, 0.82, 0.165, 1)":"Ease-out Circular. Based on half circle.","cubic-bezier(0.55, 0.055, 0.675, 0.19)":"Ease-in Cubic. Based on power of three.","cubic-bezier(0.645, 0.045, 0.355, 1)":"Ease-in-out Cubic. Based on power of three.","cubic-bezier(0.215, 0.610, 0.355, 1)":"Ease-out Cubic. Based on power of three.","cubic-bezier(0.95, 0.05, 0.795, 0.035)":"Ease-in Exponential. Based on two to the power ten.","cubic-bezier(1, 0, 0, 1)":"Ease-in-out Exponential. Based on two to the power ten.","cubic-bezier(0.19, 1, 0.22, 1)":"Ease-out Exponential. Based on two to the power ten.","cubic-bezier(0.47, 0, 0.745, 0.715)":"Ease-in Sine.","cubic-bezier(0.445, 0.05, 0.55, 0.95)":"Ease-in-out Sine.","cubic-bezier(0.39, 0.575, 0.565, 1)":"Ease-out Sine.","cubic-bezier(0.55, 0.085, 0.68, 0.53)":"Ease-in Quadratic. Based on power of two.","cubic-bezier(0.455, 0.03, 0.515, 0.955)":"Ease-in-out Quadratic. Based on power of two.","cubic-bezier(0.25, 0.46, 0.45, 0.94)":"Ease-out Quadratic. Based on power of two.","cubic-bezier(0.895, 0.03, 0.685, 0.22)":"Ease-in Quartic. Based on power of four.","cubic-bezier(0.77, 0, 0.175, 1)":"Ease-in-out Quartic. Based on power of four.","cubic-bezier(0.165, 0.84, 0.44, 1)":"Ease-out Quartic. Based on power of four.","cubic-bezier(0.755, 0.05, 0.855, 0.06)":"Ease-in Quintic. Based on power of five.","cubic-bezier(0.86, 0, 0.07, 1)":"Ease-in-out Quintic. Based on power of five.","cubic-bezier(0.23, 1, 0.320, 1)":"Ease-out Quintic. Based on power of five."},Pc={"circle()":"Defines a circle.","ellipse()":"Defines an ellipse.","inset()":"Defines an inset rectangle.","polygon()":"Defines a polygon."},wh={length:["em","rem","ex","px","cm","mm","in","pt","pc","ch","vw","vh","vmin","vmax"],angle:["deg","rad","grad","turn"],time:["ms","s"],frequency:["Hz","kHz"],resolution:["dpi","dpcm","dppx"],percentage:["%","fr"]},yp=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","const","video","wbr"],wp=["circle","clipPath","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","hatch","hatchpath","image","line","linearGradient","marker","mask","mesh","meshpatch","meshrow","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidcolor","stop","svg","switch","symbol","text","textPath","tspan","use","view"],xp=["@bottom-center","@bottom-left","@bottom-left-corner","@bottom-right","@bottom-right-corner","@left-bottom","@left-middle","@left-top","@right-bottom","@right-middle","@right-top","@top-center","@top-left","@top-left-corner","@top-right","@top-right-corner"];function ei(t){return Object.keys(t).map(function(e){return t[e]})}function Be(t){return typeof t<"u"}var Ic=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,s;re.offset?s-e.offset:0}return e},t.prototype.markError=function(e,n,r,i){this.token!==this.lastErrorToken&&(e.addIssue(new fh(e,n,Ie.Error,void 0,this.token.offset,this.token.len)),this.lastErrorToken=this.token),(r||i)&&this.resync(r,i)},t.prototype.parseStylesheet=function(e){var n=e.version,r=e.getText(),i=function(s,o){if(e.version!==n)throw new Error("Underlying model has changed, AST is no longer valid");return r.substr(s,o)};return this.internalParse(r,this._parseStylesheet,i)},t.prototype.internalParse=function(e,n,r){this.scanner.setSource(e),this.token=this.scanner.scan();var i=n.bind(this)();return i&&(r?i.textProvider=r:i.textProvider=function(s,o){return e.substr(s,o)}),i},t.prototype._parseStylesheet=function(){for(var e=this.create(Ed);e.addChild(this._parseStylesheetStart()););var n=!1;do{var r=!1;do{r=!1;var i=this._parseStylesheetStatement();for(i&&(e.addChild(i),r=!0,n=!1,!this.peek(p.EOF)&&this._needsSemicolonAfter(i)&&!this.accept(p.SemiColon)&&this.markError(e,S.SemiColonExpected));this.accept(p.SemiColon)||this.accept(p.CDO)||this.accept(p.CDC);)r=!0,n=!1}while(r);if(this.peek(p.EOF))break;n||(this.peek(p.AtKeyword)?this.markError(e,S.UnknownAtRule):this.markError(e,S.RuleOrSelectorExpected),n=!0),this.consumeToken()}while(!this.peek(p.EOF));return this.finish(e)},t.prototype._parseStylesheetStart=function(){return this._parseCharset()},t.prototype._parseStylesheetStatement=function(e){return e===void 0&&(e=!1),this.peek(p.AtKeyword)?this._parseStylesheetAtStatement(e):this._parseRuleset(e)},t.prototype._parseStylesheetAtStatement=function(e){return e===void 0&&(e=!1),this._parseImport()||this._parseMedia(e)||this._parsePage()||this._parseFontFace()||this._parseKeyframe()||this._parseSupports(e)||this._parseViewPort()||this._parseNamespace()||this._parseDocument()||this._parseUnknownAtRule()},t.prototype._tryParseRuleset=function(e){var n=this.mark();if(this._parseSelector(e)){for(;this.accept(p.Comma)&&this._parseSelector(e););if(this.accept(p.CurlyL))return this.restoreAtMark(n),this._parseRuleset(e)}return this.restoreAtMark(n),null},t.prototype._parseRuleset=function(e){e===void 0&&(e=!1);var n=this.create(pn),r=n.getSelectors();if(!r.addChild(this._parseSelector(e)))return null;for(;this.accept(p.Comma);)if(!r.addChild(this._parseSelector(e)))return this.finish(n,S.SelectorExpected);return this._parseBody(n,this._parseRuleSetDeclaration.bind(this))},t.prototype._parseRuleSetDeclarationAtStatement=function(){return this._parseUnknownAtRule()},t.prototype._parseRuleSetDeclaration=function(){return this.peek(p.AtKeyword)?this._parseRuleSetDeclarationAtStatement():this._parseDeclaration()},t.prototype._needsSemicolonAfter=function(e){switch(e.type){case v.Keyframe:case v.ViewPort:case v.Media:case v.Ruleset:case v.Namespace:case v.If:case v.For:case v.Each:case v.While:case v.MixinDeclaration:case v.FunctionDeclaration:case v.MixinContentDeclaration:return!1;case v.ExtendsReference:case v.MixinContentReference:case v.ReturnStatement:case v.MediaQuery:case v.Debug:case v.Import:case v.AtApplyRule:case v.CustomPropertyDeclaration:return!0;case v.VariableDeclaration:return e.needsSemicolon;case v.MixinReference:return!e.getContent();case v.Declaration:return!e.getNestedProperties()}return!1},t.prototype._parseDeclarations=function(e){var n=this.create(ro);if(!this.accept(p.CurlyL))return null;for(var r=e();n.addChild(r)&&!this.peek(p.CurlyR);){if(this._needsSemicolonAfter(r)&&!this.accept(p.SemiColon))return this.finish(n,S.SemiColonExpected,[p.SemiColon,p.CurlyR]);for(r&&this.prevToken&&this.prevToken.type===p.SemiColon&&(r.semicolonPosition=this.prevToken.offset);this.accept(p.SemiColon););r=e()}return this.accept(p.CurlyR)?this.finish(n):this.finish(n,S.RightCurlyExpected,[p.CurlyR,p.SemiColon])},t.prototype._parseBody=function(e,n){return e.setDeclarations(this._parseDeclarations(n))?this.finish(e):this.finish(e,S.LeftCurlyExpected,[p.CurlyR,p.SemiColon])},t.prototype._parseSelector=function(e){var n=this.create(or),r=!1;for(e&&(r=n.addChild(this._parseCombinator()));n.addChild(this._parseSimpleSelector());)r=!0,n.addChild(this._parseCombinator());return r?this.finish(n):null},t.prototype._parseDeclaration=function(e){var n=this._tryParseCustomPropertyDeclaration(e);if(n)return n;var r=this.create(tt);return r.setProperty(this._parseProperty())?this.accept(p.Colon)?(this.prevToken&&(r.colonPosition=this.prevToken.offset),r.setValue(this._parseExpr())?(r.addChild(this._parsePrio()),this.peek(p.SemiColon)&&(r.semicolonPosition=this.token.offset),this.finish(r)):this.finish(r,S.PropertyValueExpected)):this.finish(r,S.ColonExpected,[p.Colon],e||[p.SemiColon]):null},t.prototype._tryParseCustomPropertyDeclaration=function(e){if(!this.peekRegExp(p.Ident,/^--/))return null;var n=this.create(Rd);if(!n.setProperty(this._parseProperty()))return null;if(!this.accept(p.Colon))return this.finish(n,S.ColonExpected,[p.Colon]);this.prevToken&&(n.colonPosition=this.prevToken.offset);var r=this.mark();if(this.peek(p.CurlyL)){var i=this.create(Fd),s=this._parseDeclarations(this._parseRuleSetDeclaration.bind(this));if(i.setDeclarations(s)&&!s.isErroneous(!0)&&(i.addChild(this._parsePrio()),this.peek(p.SemiColon)))return this.finish(i),n.setPropertySet(i),n.semicolonPosition=this.token.offset,this.finish(n);this.restoreAtMark(r)}var o=this._parseExpr();return o&&!o.isErroneous(!0)&&(this._parsePrio(),this.peekOne.apply(this,Ic(Ic([],e||[],!1),[p.SemiColon,p.EOF],!1)))?(n.setValue(o),this.peek(p.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)):(this.restoreAtMark(r),n.addChild(this._parseCustomPropertyValue(e)),n.addChild(this._parsePrio()),Be(n.colonPosition)&&this.token.offset===n.colonPosition+1?this.finish(n,S.PropertyValueExpected):this.finish(n))},t.prototype._parseCustomPropertyValue=function(e){var n=this;e===void 0&&(e=[p.CurlyR]);var r=this.create(B),i=function(){return o===0&&a===0&&l===0},s=function(){return e.indexOf(n.token.type)!==-1},o=0,a=0,l=0;e:for(;;){switch(this.token.type){case p.SemiColon:if(i())break e;break;case p.Exclamation:if(i())break e;break;case p.CurlyL:o++;break;case p.CurlyR:if(o--,o<0){if(s()&&a===0&&l===0)break e;return this.finish(r,S.LeftCurlyExpected)}break;case p.ParenthesisL:a++;break;case p.ParenthesisR:if(a--,a<0){if(s()&&l===0&&o===0)break e;return this.finish(r,S.LeftParenthesisExpected)}break;case p.BracketL:l++;break;case p.BracketR:if(l--,l<0)return this.finish(r,S.LeftSquareBracketExpected);break;case p.BadString:break e;case p.EOF:var c=S.RightCurlyExpected;return l>0?c=S.RightSquareBracketExpected:a>0&&(c=S.RightParenthesisExpected),this.finish(r,c)}this.consumeToken()}return this.finish(r)},t.prototype._tryToParseDeclaration=function(e){var n=this.mark();return this._parseProperty()&&this.accept(p.Colon)?(this.restoreAtMark(n),this._parseDeclaration(e)):(this.restoreAtMark(n),null)},t.prototype._parseProperty=function(){var e=this.create(so),n=this.mark();return(this.acceptDelim("*")||this.acceptDelim("_"))&&this.hasWhitespace()?(this.restoreAtMark(n),null):e.setIdentifier(this._parsePropertyIdentifier())?this.finish(e):null},t.prototype._parsePropertyIdentifier=function(){return this._parseIdent()},t.prototype._parseCharset=function(){if(!this.peek(p.Charset))return null;var e=this.create(B);return this.consumeToken(),this.accept(p.String)?this.accept(p.SemiColon)?this.finish(e):this.finish(e,S.SemiColonExpected):this.finish(e,S.IdentifierExpected)},t.prototype._parseImport=function(){if(!this.peekKeyword("@import"))return null;var e=this.create(oo);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral())?this.finish(e,S.URIOrStringExpected):(!this.peek(p.SemiColon)&&!this.peek(p.EOF)&&e.setMedialist(this._parseMediaQueryList()),this.finish(e))},t.prototype._parseNamespace=function(){if(!this.peekKeyword("@namespace"))return null;var e=this.create(Ud);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&(e.addChild(this._parseIdent()),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))?this.finish(e,S.URIExpected,[p.SemiColon]):this.accept(p.SemiColon)?this.finish(e):this.finish(e,S.SemiColonExpected)},t.prototype._parseFontFace=function(){if(!this.peekKeyword("@font-face"))return null;var e=this.create(oh);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},t.prototype._parseViewPort=function(){if(!this.peekKeyword("@-ms-viewport")&&!this.peekKeyword("@-o-viewport")&&!this.peekKeyword("@viewport"))return null;var e=this.create(Pd);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},t.prototype._parseKeyframe=function(){if(!this.peekRegExp(p.AtKeyword,this.keyframeRegex))return null;var e=this.create(lh),n=this.create(B);return this.consumeToken(),e.setKeyword(this.finish(n)),n.matches("@-ms-keyframes")&&this.markError(n,S.UnknownKeyword),e.setIdentifier(this._parseKeyframeIdent())?this._parseBody(e,this._parseKeyframeSelector.bind(this)):this.finish(e,S.IdentifierExpected,[p.CurlyR])},t.prototype._parseKeyframeIdent=function(){return this._parseIdent([Z.Keyframe])},t.prototype._parseKeyframeSelector=function(){var e=this.create(ql);if(!e.addChild(this._parseIdent())&&!this.accept(p.Percentage))return null;for(;this.accept(p.Comma);)if(!e.addChild(this._parseIdent())&&!this.accept(p.Percentage))return this.finish(e,S.PercentageExpected);return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},t.prototype._tryParseKeyframeSelector=function(){var e=this.create(ql),n=this.mark();if(!e.addChild(this._parseIdent())&&!this.accept(p.Percentage))return null;for(;this.accept(p.Comma);)if(!e.addChild(this._parseIdent())&&!this.accept(p.Percentage))return this.restoreAtMark(n),null;return this.peek(p.CurlyL)?this._parseBody(e,this._parseRuleSetDeclaration.bind(this)):(this.restoreAtMark(n),null)},t.prototype._parseSupports=function(e){if(e===void 0&&(e=!1),!this.peekKeyword("@supports"))return null;var n=this.create(Is);return this.consumeToken(),n.addChild(this._parseSupportsCondition()),this._parseBody(n,this._parseSupportsDeclaration.bind(this,e))},t.prototype._parseSupportsDeclaration=function(e){return e===void 0&&(e=!1),e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)},t.prototype._parseSupportsCondition=function(){var e=this.create(Xn);if(this.acceptIdent("not"))e.addChild(this._parseSupportsConditionInParens());else if(e.addChild(this._parseSupportsConditionInParens()),this.peekRegExp(p.Ident,/^(and|or)$/i))for(var n=this.token.text.toLowerCase();this.acceptIdent(n);)e.addChild(this._parseSupportsConditionInParens());return this.finish(e)},t.prototype._parseSupportsConditionInParens=function(){var e=this.create(Xn);if(this.accept(p.ParenthesisL))return this.prevToken&&(e.lParent=this.prevToken.offset),!e.addChild(this._tryToParseDeclaration([p.ParenthesisR]))&&!this._parseSupportsCondition()?this.finish(e,S.ConditionExpected):this.accept(p.ParenthesisR)?(this.prevToken&&(e.rParent=this.prevToken.offset),this.finish(e)):this.finish(e,S.RightParenthesisExpected,[p.ParenthesisR],[]);if(this.peek(p.Ident)){var n=this.mark();if(this.consumeToken(),!this.hasWhitespace()&&this.accept(p.ParenthesisL)){for(var r=1;this.token.type!==p.EOF&&r!==0;)this.token.type===p.ParenthesisL?r++:this.token.type===p.ParenthesisR&&r--,this.consumeToken();return this.finish(e)}else this.restoreAtMark(n)}return this.finish(e,S.LeftParenthesisExpected,[],[p.ParenthesisL])},t.prototype._parseMediaDeclaration=function(e){return e===void 0&&(e=!1),e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)},t.prototype._parseMedia=function(e){if(e===void 0&&(e=!1),!this.peekKeyword("@media"))return null;var n=this.create(ch);return this.consumeToken(),n.addChild(this._parseMediaQueryList())?this._parseBody(n,this._parseMediaDeclaration.bind(this,e)):this.finish(n,S.MediaQueryExpected)},t.prototype._parseMediaQueryList=function(){var e=this.create(hh);if(!e.addChild(this._parseMediaQuery()))return this.finish(e,S.MediaQueryExpected);for(;this.accept(p.Comma);)if(!e.addChild(this._parseMediaQuery()))return this.finish(e,S.MediaQueryExpected);return this.finish(e)},t.prototype._parseMediaQuery=function(){var e=this.create(uh),n=this.mark();if(this.acceptIdent("not"),this.peek(p.ParenthesisL))this.restoreAtMark(n),e.addChild(this._parseMediaCondition());else{if(this.acceptIdent("only"),!e.addChild(this._parseIdent()))return null;this.acceptIdent("and")&&e.addChild(this._parseMediaCondition())}return this.finish(e)},t.prototype._parseRatio=function(){var e=this.mark(),n=this.create(Jd);return this._parseNumeric()?this.acceptDelim("/")?this._parseNumeric()?this.finish(n):this.finish(n,S.NumberExpected):(this.restoreAtMark(e),null):null},t.prototype._parseMediaCondition=function(){var e=this.create(Vd);this.acceptIdent("not");for(var n=!0;n;){if(!this.accept(p.ParenthesisL))return this.finish(e,S.LeftParenthesisExpected,[],[p.CurlyL]);if(this.peek(p.ParenthesisL)||this.peekIdent("not")?e.addChild(this._parseMediaCondition()):e.addChild(this._parseMediaFeature()),!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[],[p.CurlyL]);n=this.acceptIdent("and")||this.acceptIdent("or")}return this.finish(e)},t.prototype._parseMediaFeature=function(){var e=this,n=[p.ParenthesisR],r=this.create(qd),i=function(){return e.acceptDelim("<")||e.acceptDelim(">")?(e.hasWhitespace()||e.acceptDelim("="),!0):!!e.acceptDelim("=")};if(r.addChild(this._parseMediaFeatureName())){if(this.accept(p.Colon)){if(!r.addChild(this._parseMediaFeatureValue()))return this.finish(r,S.TermExpected,[],n)}else if(i()){if(!r.addChild(this._parseMediaFeatureValue()))return this.finish(r,S.TermExpected,[],n);if(i()&&!r.addChild(this._parseMediaFeatureValue()))return this.finish(r,S.TermExpected,[],n)}}else if(r.addChild(this._parseMediaFeatureValue())){if(!i())return this.finish(r,S.OperatorExpected,[],n);if(!r.addChild(this._parseMediaFeatureName()))return this.finish(r,S.IdentifierExpected,[],n);if(i()&&!r.addChild(this._parseMediaFeatureValue()))return this.finish(r,S.TermExpected,[],n)}else return this.finish(r,S.IdentifierExpected,[],n);return this.finish(r)},t.prototype._parseMediaFeatureName=function(){return this._parseIdent()},t.prototype._parseMediaFeatureValue=function(){return this._parseRatio()||this._parseTermExpression()},t.prototype._parseMedium=function(){var e=this.create(B);return e.addChild(this._parseIdent())?this.finish(e):null},t.prototype._parsePageDeclaration=function(){return this._parsePageMarginBox()||this._parseRuleSetDeclaration()},t.prototype._parsePage=function(){if(!this.peekKeyword("@page"))return null;var e=this.create(jd);if(this.consumeToken(),e.addChild(this._parsePageSelector())){for(;this.accept(p.Comma);)if(!e.addChild(this._parsePageSelector()))return this.finish(e,S.IdentifierExpected)}return this._parseBody(e,this._parsePageDeclaration.bind(this))},t.prototype._parsePageMarginBox=function(){if(!this.peek(p.AtKeyword))return null;var e=this.create($d);return this.acceptOneKeyword(xp)||this.markError(e,S.UnknownAtRule,[],[p.CurlyL]),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},t.prototype._parsePageSelector=function(){if(!this.peek(p.Ident)&&!this.peek(p.Colon))return null;var e=this.create(B);return e.addChild(this._parseIdent()),this.accept(p.Colon)&&!e.addChild(this._parseIdent())?this.finish(e,S.IdentifierExpected):this.finish(e)},t.prototype._parseDocument=function(){if(!this.peekKeyword("@-moz-document"))return null;var e=this.create(Bd);return this.consumeToken(),this.resync([],[p.CurlyL]),this._parseBody(e,this._parseStylesheetStatement.bind(this))},t.prototype._parseUnknownAtRule=function(){if(!this.peek(p.AtKeyword))return null;var e=this.create(ph);e.addChild(this._parseUnknownAtRuleName());var n=function(){return i===0&&s===0&&o===0},r=0,i=0,s=0,o=0;e:for(;;){switch(this.token.type){case p.SemiColon:if(n())break e;break;case p.EOF:return i>0?this.finish(e,S.RightCurlyExpected):o>0?this.finish(e,S.RightSquareBracketExpected):s>0?this.finish(e,S.RightParenthesisExpected):this.finish(e);case p.CurlyL:r++,i++;break;case p.CurlyR:if(i--,r>0&&i===0){if(this.consumeToken(),o>0)return this.finish(e,S.RightSquareBracketExpected);if(s>0)return this.finish(e,S.RightParenthesisExpected);break e}if(i<0){if(s===0&&o===0)break e;return this.finish(e,S.LeftCurlyExpected)}break;case p.ParenthesisL:s++;break;case p.ParenthesisR:if(s--,s<0)return this.finish(e,S.LeftParenthesisExpected);break;case p.BracketL:o++;break;case p.BracketR:if(o--,o<0)return this.finish(e,S.LeftSquareBracketExpected);break}this.consumeToken()}return e},t.prototype._parseUnknownAtRuleName=function(){var e=this.create(B);return this.accept(p.AtKeyword)?this.finish(e):e},t.prototype._parseOperator=function(){if(this.peekDelim("/")||this.peekDelim("*")||this.peekDelim("+")||this.peekDelim("-")||this.peek(p.Dashmatch)||this.peek(p.Includes)||this.peek(p.SubstringOperator)||this.peek(p.PrefixOperator)||this.peek(p.SuffixOperator)||this.peekDelim("=")){var e=this.createNode(v.Operator);return this.consumeToken(),this.finish(e)}else return null},t.prototype._parseUnaryOperator=function(){if(!this.peekDelim("+")&&!this.peekDelim("-"))return null;var e=this.create(B);return this.consumeToken(),this.finish(e)},t.prototype._parseCombinator=function(){if(this.peekDelim(">")){var e=this.create(B);this.consumeToken();var n=this.mark();if(!this.hasWhitespace()&&this.acceptDelim(">")){if(!this.hasWhitespace()&&this.acceptDelim(">"))return e.type=v.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(n)}return e.type=v.SelectorCombinatorParent,this.finish(e)}else if(this.peekDelim("+")){var e=this.create(B);return this.consumeToken(),e.type=v.SelectorCombinatorSibling,this.finish(e)}else if(this.peekDelim("~")){var e=this.create(B);return this.consumeToken(),e.type=v.SelectorCombinatorAllSiblings,this.finish(e)}else if(this.peekDelim("/")){var e=this.create(B);this.consumeToken();var n=this.mark();if(!this.hasWhitespace()&&this.acceptIdent("deep")&&!this.hasWhitespace()&&this.acceptDelim("/"))return e.type=v.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(n)}return null},t.prototype._parseSimpleSelector=function(){var e=this.create(fn),n=0;for(e.addChild(this._parseElementName())&&n++;(n===0||!this.hasWhitespace())&&e.addChild(this._parseSimpleSelectorBody());)n++;return n>0?this.finish(e):null},t.prototype._parseSimpleSelectorBody=function(){return this._parsePseudo()||this._parseHash()||this._parseClass()||this._parseAttrib()},t.prototype._parseSelectorIdent=function(){return this._parseIdent()},t.prototype._parseHash=function(){if(!this.peek(p.Hash)&&!this.peekDelim("#"))return null;var e=this.createNode(v.IdentifierSelector);if(this.acceptDelim("#")){if(this.hasWhitespace()||!e.addChild(this._parseSelectorIdent()))return this.finish(e,S.IdentifierExpected)}else this.consumeToken();return this.finish(e)},t.prototype._parseClass=function(){if(!this.peekDelim("."))return null;var e=this.createNode(v.ClassSelector);return this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseSelectorIdent())?this.finish(e,S.IdentifierExpected):this.finish(e)},t.prototype._parseElementName=function(){var e=this.mark(),n=this.createNode(v.ElementNameSelector);return n.addChild(this._parseNamespacePrefix()),!n.addChild(this._parseSelectorIdent())&&!this.acceptDelim("*")?(this.restoreAtMark(e),null):this.finish(n)},t.prototype._parseNamespacePrefix=function(){var e=this.mark(),n=this.createNode(v.NamespacePrefix);return!n.addChild(this._parseIdent())&&this.acceptDelim("*"),this.acceptDelim("|")?this.finish(n):(this.restoreAtMark(e),null)},t.prototype._parseAttrib=function(){if(!this.peek(p.BracketL))return null;var e=this.create(Gd);return this.consumeToken(),e.setNamespacePrefix(this._parseNamespacePrefix()),e.setIdentifier(this._parseIdent())?(e.setOperator(this._parseOperator())&&(e.setValue(this._parseBinaryExpr()),this.acceptIdent("i"),this.acceptIdent("s")),this.accept(p.BracketR)?this.finish(e):this.finish(e,S.RightSquareBracketExpected)):this.finish(e,S.IdentifierExpected)},t.prototype._parsePseudo=function(){var e=this,n=this._tryParsePseudoIdentifier();if(n){if(!this.hasWhitespace()&&this.accept(p.ParenthesisL)){var r=function(){var i=e.create(B);if(!i.addChild(e._parseSelector(!1)))return null;for(;e.accept(p.Comma)&&i.addChild(e._parseSelector(!1)););return e.peek(p.ParenthesisR)?e.finish(i):null};if(n.addChild(this.try(r)||this._parseBinaryExpr()),!this.accept(p.ParenthesisR))return this.finish(n,S.RightParenthesisExpected)}return this.finish(n)}return null},t.prototype._tryParsePseudoIdentifier=function(){if(!this.peek(p.Colon))return null;var e=this.mark(),n=this.createNode(v.PseudoSelector);return this.consumeToken(),this.hasWhitespace()?(this.restoreAtMark(e),null):(this.accept(p.Colon),this.hasWhitespace()||!n.addChild(this._parseIdent())?this.finish(n,S.IdentifierExpected):this.finish(n))},t.prototype._tryParsePrio=function(){var e=this.mark(),n=this._parsePrio();return n||(this.restoreAtMark(e),null)},t.prototype._parsePrio=function(){if(!this.peek(p.Exclamation))return null;var e=this.createNode(v.Prio);return this.accept(p.Exclamation)&&this.acceptIdent("important")?this.finish(e):null},t.prototype._parseExpr=function(e){e===void 0&&(e=!1);var n=this.create(dh);if(!n.addChild(this._parseBinaryExpr()))return null;for(;;){if(this.peek(p.Comma)){if(e)return this.finish(n);this.consumeToken()}else if(!this.hasWhitespace())break;if(!n.addChild(this._parseBinaryExpr()))break}return this.finish(n)},t.prototype._parseUnicodeRange=function(){if(!this.peekIdent("u"))return null;var e=this.create(kd);return this.acceptUnicodeRange()?this.finish(e):null},t.prototype._parseNamedLine=function(){if(!this.peek(p.BracketL))return null;var e=this.createNode(v.GridLine);for(this.consumeToken();e.addChild(this._parseIdent()););return this.accept(p.BracketR)?this.finish(e):this.finish(e,S.RightSquareBracketExpected)},t.prototype._parseBinaryExpr=function(e,n){var r=this.create(ao);if(!r.setLeft(e||this._parseTerm()))return null;if(!r.setOperator(n||this._parseOperator()))return this.finish(r);if(!r.setRight(this._parseTerm()))return this.finish(r,S.TermExpected);r=this.finish(r);var i=this._parseOperator();return i&&(r=this._parseBinaryExpr(r,i)),this.finish(r)},t.prototype._parseTerm=function(){var e=this.create(Hd);return e.setOperator(this._parseUnaryOperator()),e.setExpression(this._parseTermExpression())?this.finish(e):null},t.prototype._parseTermExpression=function(){return this._parseURILiteral()||this._parseUnicodeRange()||this._parseFunction()||this._parseIdent()||this._parseStringLiteral()||this._parseNumeric()||this._parseHexColor()||this._parseOperation()||this._parseNamedLine()},t.prototype._parseOperation=function(){if(!this.peek(p.ParenthesisL))return null;var e=this.create(B);return this.consumeToken(),e.addChild(this._parseExpr()),this.accept(p.ParenthesisR)?this.finish(e):this.finish(e,S.RightParenthesisExpected)},t.prototype._parseNumeric=function(){if(this.peek(p.Num)||this.peek(p.Percentage)||this.peek(p.Resolution)||this.peek(p.Length)||this.peek(p.EMS)||this.peek(p.EXS)||this.peek(p.Angle)||this.peek(p.Time)||this.peek(p.Dimension)||this.peek(p.Freq)){var e=this.create(co);return this.consumeToken(),this.finish(e)}return null},t.prototype._parseStringLiteral=function(){if(!this.peek(p.String)&&!this.peek(p.BadString))return null;var e=this.createNode(v.StringLiteral);return this.consumeToken(),this.finish(e)},t.prototype._parseURILiteral=function(){if(!this.peekRegExp(p.Ident,/^url(-prefix)?$/i))return null;var e=this.mark(),n=this.createNode(v.URILiteral);return this.accept(p.Ident),this.hasWhitespace()||!this.peek(p.ParenthesisL)?(this.restoreAtMark(e),null):(this.scanner.inURL=!0,this.consumeToken(),n.addChild(this._parseURLArgument()),this.scanner.inURL=!1,this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,S.RightParenthesisExpected))},t.prototype._parseURLArgument=function(){var e=this.create(B);return!this.accept(p.String)&&!this.accept(p.BadString)&&!this.acceptUnquotedString()?null:this.finish(e)},t.prototype._parseIdent=function(e){if(!this.peek(p.Ident))return null;var n=this.create(Ve);return e&&(n.referenceTypes=e),n.isCustomProperty=this.peekRegExp(p.Ident,/^--/),this.consumeToken(),this.finish(n)},t.prototype._parseFunction=function(){var e=this.mark(),n=this.create(ar);if(!n.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(p.ParenthesisL))return this.restoreAtMark(e),null;if(n.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)n.getArguments().addChild(this._parseFunctionArgument())||this.markError(n,S.ExpressionExpected);return this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,S.RightParenthesisExpected)},t.prototype._parseFunctionIdentifier=function(){if(!this.peek(p.Ident))return null;var e=this.create(Ve);if(e.referenceTypes=[Z.Function],this.acceptIdent("progid")){if(this.accept(p.Colon))for(;this.accept(p.Ident)&&this.acceptDelim("."););return this.finish(e)}return this.consumeToken(),this.finish(e)},t.prototype._parseFunctionArgument=function(){var e=this.create(gn);return e.setValue(this._parseExpr(!0))?this.finish(e):null},t.prototype._parseHexColor=function(){if(this.peekRegExp(p.Hash,/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/g)){var e=this.create(lo);return this.consumeToken(),this.finish(e)}else return null},t}();function Sp(t,e){var n=0,r=t.length;if(r===0)return 0;for(;ne+n||this.offset===e&&this.length===n?this.findInScope(e,n):null},t.prototype.findInScope=function(e,n){n===void 0&&(n=0);var r=e+n,i=Sp(this.children,function(o){return o.offset>r});if(i===0)return this;var s=this.children[i-1];return s.offset<=e&&s.offset+s.length>=e+n?s.findInScope(e,n):this},t.prototype.addSymbol=function(e){this.symbols.push(e)},t.prototype.getSymbol=function(e,n){for(var r=0;r{"use strict";var t={470:r=>{function i(a){if(typeof a!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(a))}function s(a,l){for(var c,h="",d=0,f=-1,m=0,b=0;b<=a.length;++b){if(b2){var g=h.lastIndexOf("/");if(g!==h.length-1){g===-1?(h="",d=0):d=(h=h.slice(0,g)).length-1-h.lastIndexOf("/"),f=b,m=0;continue}}else if(h.length===2||h.length===1){h="",d=0,f=b,m=0;continue}}l&&(h.length>0?h+="/..":h="..",d=2)}else h.length>0?h+="/"+a.slice(f+1,b):h=a.slice(f+1,b),d=b-f-1;f=b,m=0}else c===46&&m!==-1?++m:m=-1}return h}var o={resolve:function(){for(var a,l="",c=!1,h=arguments.length-1;h>=-1&&!c;h--){var d;h>=0?d=arguments[h]:(a===void 0&&(a=process.cwd()),d=a),i(d),d.length!==0&&(l=d+"/"+l,c=d.charCodeAt(0)===47)}return l=s(l,!c),c?l.length>0?"/"+l:"/":l.length>0?l:"."},normalize:function(a){if(i(a),a.length===0)return".";var l=a.charCodeAt(0)===47,c=a.charCodeAt(a.length-1)===47;return(a=s(a,!l)).length!==0||l||(a="."),a.length>0&&c&&(a+="/"),l?"/"+a:a},isAbsolute:function(a){return i(a),a.length>0&&a.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var a,l=0;l0&&(a===void 0?a=c:a+="/"+c)}return a===void 0?".":o.normalize(a)},relative:function(a,l){if(i(a),i(l),a===l||(a=o.resolve(a))===(l=o.resolve(l)))return"";for(var c=1;cb){if(l.charCodeAt(f+y)===47)return l.slice(f+y+1);if(y===0)return l.slice(f+y)}else d>b&&(a.charCodeAt(c+y)===47?g=y:y===0&&(g=0));break}var _=a.charCodeAt(c+y);if(_!==l.charCodeAt(f+y))break;_===47&&(g=y)}var E="";for(y=c+g+1;y<=h;++y)y!==h&&a.charCodeAt(y)!==47||(E.length===0?E+="..":E+="/..");return E.length>0?E+l.slice(f+g):(f+=g,l.charCodeAt(f)===47&&++f,l.slice(f))},_makeLong:function(a){return a},dirname:function(a){if(i(a),a.length===0)return".";for(var l=a.charCodeAt(0),c=l===47,h=-1,d=!0,f=a.length-1;f>=1;--f)if((l=a.charCodeAt(f))===47){if(!d){h=f;break}}else d=!1;return h===-1?c?"/":".":c&&h===1?"//":a.slice(0,h)},basename:function(a,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');i(a);var c,h=0,d=-1,f=!0;if(l!==void 0&&l.length>0&&l.length<=a.length){if(l.length===a.length&&l===a)return"";var m=l.length-1,b=-1;for(c=a.length-1;c>=0;--c){var g=a.charCodeAt(c);if(g===47){if(!f){h=c+1;break}}else b===-1&&(f=!1,b=c+1),m>=0&&(g===l.charCodeAt(m)?--m==-1&&(d=c):(m=-1,d=b))}return h===d?d=b:d===-1&&(d=a.length),a.slice(h,d)}for(c=a.length-1;c>=0;--c)if(a.charCodeAt(c)===47){if(!f){h=c+1;break}}else d===-1&&(f=!1,d=c+1);return d===-1?"":a.slice(h,d)},extname:function(a){i(a);for(var l=-1,c=0,h=-1,d=!0,f=0,m=a.length-1;m>=0;--m){var b=a.charCodeAt(m);if(b!==47)h===-1&&(d=!1,h=m+1),b===46?l===-1?l=m:f!==1&&(f=1):l!==-1&&(f=-1);else if(!d){c=m+1;break}}return l===-1||h===-1||f===0||f===1&&l===h-1&&l===c+1?"":a.slice(l,h)},format:function(a){if(a===null||typeof a!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof a);return function(l,c){var h=c.dir||c.root,d=c.base||(c.name||"")+(c.ext||"");return h?h===c.root?h+d:h+"/"+d:d}(0,a)},parse:function(a){i(a);var l={root:"",dir:"",base:"",ext:"",name:""};if(a.length===0)return l;var c,h=a.charCodeAt(0),d=h===47;d?(l.root="/",c=1):c=0;for(var f=-1,m=0,b=-1,g=!0,y=a.length-1,_=0;y>=c;--y)if((h=a.charCodeAt(y))!==47)b===-1&&(g=!1,b=y+1),h===46?f===-1?f=y:_!==1&&(_=1):f!==-1&&(_=-1);else if(!g){m=y+1;break}return f===-1||b===-1||_===0||_===1&&f===b-1&&f===m+1?b!==-1&&(l.base=l.name=m===0&&d?a.slice(1,b):a.slice(m,b)):(m===0&&d?(l.name=a.slice(1,f),l.base=a.slice(1,b)):(l.name=a.slice(m,f),l.base=a.slice(m,b)),l.ext=a.slice(f,b)),m>0?l.dir=a.slice(0,m-1):d&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,r.exports=o},447:(r,i,s)=>{var o;if(s.r(i),s.d(i,{URI:()=>E,Utils:()=>M}),typeof process=="object")o=process.platform==="win32";else if(typeof navigator=="object"){var a=navigator.userAgent;o=a.indexOf("Windows")>=0}var l,c,h=(l=function(k,x){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,N){D.__proto__=N}||function(D,N){for(var H in N)Object.prototype.hasOwnProperty.call(N,H)&&(D[H]=N[H])})(k,x)},function(k,x){if(typeof x!="function"&&x!==null)throw new TypeError("Class extends value "+String(x)+" is not a constructor or null");function D(){this.constructor=k}l(k,x),k.prototype=x===null?Object.create(x):(D.prototype=x.prototype,new D)}),d=/^\w[\w\d+.-]*$/,f=/^\//,m=/^\/\//;function b(k,x){if(!k.scheme&&x)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(k.authority,'", path: "').concat(k.path,'", query: "').concat(k.query,'", fragment: "').concat(k.fragment,'"}'));if(k.scheme&&!d.test(k.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(k.path){if(k.authority){if(!f.test(k.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(m.test(k.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}var g="",y="/",_=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,E=function(){function k(x,D,N,H,X,Q){Q===void 0&&(Q=!1),typeof x=="object"?(this.scheme=x.scheme||g,this.authority=x.authority||g,this.path=x.path||g,this.query=x.query||g,this.fragment=x.fragment||g):(this.scheme=function(ze,pe){return ze||pe?ze:"file"}(x,Q),this.authority=D||g,this.path=function(ze,pe){switch(ze){case"https":case"http":case"file":pe?pe[0]!==y&&(pe=y+pe):pe=y}return pe}(this.scheme,N||g),this.query=H||g,this.fragment=X||g,b(this,Q))}return k.isUri=function(x){return x instanceof k||!!x&&typeof x.authority=="string"&&typeof x.fragment=="string"&&typeof x.path=="string"&&typeof x.query=="string"&&typeof x.scheme=="string"&&typeof x.fsPath=="string"&&typeof x.with=="function"&&typeof x.toString=="function"},Object.defineProperty(k.prototype,"fsPath",{get:function(){return T(this,!1)},enumerable:!1,configurable:!0}),k.prototype.with=function(x){if(!x)return this;var D=x.scheme,N=x.authority,H=x.path,X=x.query,Q=x.fragment;return D===void 0?D=this.scheme:D===null&&(D=g),N===void 0?N=this.authority:N===null&&(N=g),H===void 0?H=this.path:H===null&&(H=g),X===void 0?X=this.query:X===null&&(X=g),Q===void 0?Q=this.fragment:Q===null&&(Q=g),D===this.scheme&&N===this.authority&&H===this.path&&X===this.query&&Q===this.fragment?this:new C(D,N,H,X,Q)},k.parse=function(x,D){D===void 0&&(D=!1);var N=_.exec(x);return N?new C(N[2]||g,A(N[4]||g),A(N[5]||g),A(N[7]||g),A(N[9]||g),D):new C(g,g,g,g,g)},k.file=function(x){var D=g;if(o&&(x=x.replace(/\\/g,y)),x[0]===y&&x[1]===y){var N=x.indexOf(y,2);N===-1?(D=x.substring(2),x=y):(D=x.substring(2,N),x=x.substring(N)||y)}return new C("file",D,x,g,g)},k.from=function(x){var D=new C(x.scheme,x.authority,x.path,x.query,x.fragment);return b(D,!0),D},k.prototype.toString=function(x){return x===void 0&&(x=!1),G(this,x)},k.prototype.toJSON=function(){return this},k.revive=function(x){if(x){if(x instanceof k)return x;var D=new C(x);return D._formatted=x.external,D._fsPath=x._sep===w?x.fsPath:null,D}return x},k}(),w=o?1:void 0,C=function(k){function x(){var D=k!==null&&k.apply(this,arguments)||this;return D._formatted=null,D._fsPath=null,D}return h(x,k),Object.defineProperty(x.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=T(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),x.prototype.toString=function(D){return D===void 0&&(D=!1),D?G(this,!0):(this._formatted||(this._formatted=G(this,!1)),this._formatted)},x.prototype.toJSON=function(){var D={$mid:1};return this._fsPath&&(D.fsPath=this._fsPath,D._sep=w),this._formatted&&(D.external=this._formatted),this.path&&(D.path=this.path),this.scheme&&(D.scheme=this.scheme),this.authority&&(D.authority=this.authority),this.query&&(D.query=this.query),this.fragment&&(D.fragment=this.fragment),D},x}(E),R=((c={})[58]="%3A",c[47]="%2F",c[63]="%3F",c[35]="%23",c[91]="%5B",c[93]="%5D",c[64]="%40",c[33]="%21",c[36]="%24",c[38]="%26",c[39]="%27",c[40]="%28",c[41]="%29",c[42]="%2A",c[43]="%2B",c[44]="%2C",c[59]="%3B",c[61]="%3D",c[32]="%20",c);function z(k,x){for(var D=void 0,N=-1,H=0;H=97&&X<=122||X>=65&&X<=90||X>=48&&X<=57||X===45||X===46||X===95||X===126||x&&X===47)N!==-1&&(D+=encodeURIComponent(k.substring(N,H)),N=-1),D!==void 0&&(D+=k.charAt(H));else{D===void 0&&(D=k.substr(0,H));var Q=R[X];Q!==void 0?(N!==-1&&(D+=encodeURIComponent(k.substring(N,H)),N=-1),D+=Q):N===-1&&(N=H)}}return N!==-1&&(D+=encodeURIComponent(k.substring(N))),D!==void 0?D:k}function O(k){for(var x=void 0,D=0;D1&&k.scheme==="file"?"//".concat(k.authority).concat(k.path):k.path.charCodeAt(0)===47&&(k.path.charCodeAt(1)>=65&&k.path.charCodeAt(1)<=90||k.path.charCodeAt(1)>=97&&k.path.charCodeAt(1)<=122)&&k.path.charCodeAt(2)===58?x?k.path.substr(1):k.path[1].toLowerCase()+k.path.substr(2):k.path,o&&(D=D.replace(/\//g,"\\")),D}function G(k,x){var D=x?O:z,N="",H=k.scheme,X=k.authority,Q=k.path,ze=k.query,pe=k.fragment;if(H&&(N+=H,N+=":"),(X||H==="file")&&(N+=y,N+=y),X){var De=X.indexOf("@");if(De!==-1){var rt=X.substr(0,De);X=X.substr(De+1),(De=rt.indexOf(":"))===-1?N+=D(rt,!1):(N+=D(rt.substr(0,De),!1),N+=":",N+=D(rt.substr(De+1),!1)),N+="@"}(De=(X=X.toLowerCase()).indexOf(":"))===-1?N+=D(X,!1):(N+=D(X.substr(0,De),!1),N+=X.substr(De))}if(Q){if(Q.length>=3&&Q.charCodeAt(0)===47&&Q.charCodeAt(2)===58)(it=Q.charCodeAt(1))>=65&&it<=90&&(Q="/".concat(String.fromCharCode(it+32),":").concat(Q.substr(3)));else if(Q.length>=2&&Q.charCodeAt(1)===58){var it;(it=Q.charCodeAt(0))>=65&&it<=90&&(Q="".concat(String.fromCharCode(it+32),":").concat(Q.substr(2)))}N+=D(Q,!0)}return ze&&(N+="?",N+=D(ze,!1)),pe&&(N+="#",N+=x?pe:z(pe,!1)),N}function re(k){try{return decodeURIComponent(k)}catch{return k.length>3?k.substr(0,3)+re(k.substr(3)):k}}var J=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function A(k){return k.match(J)?k.replace(J,function(x){return re(x)}):k}var M,P=s(470),I=function(k,x,D){if(D||arguments.length===2)for(var N,H=0,X=x.length;H{for(var s in i)n.o(i,s)&&!n.o(r,s)&&Object.defineProperty(r,s,{enumerable:!0,get:i[s]})},n.o=(r,i)=>Object.prototype.hasOwnProperty.call(r,i),n.r=r=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n(447)})();var{URI:po,Utils:Xs}=_h,Ep=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,s;r0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]=0;o--){var a=this.nodePath[o];if(a instanceof so)this.getCompletionsForDeclarationProperty(a.getParent(),s);else if(a instanceof dh)a.parent instanceof Ts?this.getVariableProposals(null,s):this.getCompletionsForExpression(a,s);else if(a instanceof fn){var l=a.findAParent(v.ExtendsReference,v.Ruleset);if(l)if(l.type===v.ExtendsReference)this.getCompletionsForExtendsReference(l,a,s);else{var c=l;this.getCompletionsForSelector(c,c&&c.isNested(),s)}}else if(a instanceof gn)this.getCompletionsForFunctionArgument(a,a.getParent(),s);else if(a instanceof ro)this.getCompletionsForDeclarations(a,s);else if(a instanceof vi)this.getCompletionsForVariableDeclaration(a,s);else if(a instanceof pn)this.getCompletionsForRuleSet(a,s);else if(a instanceof Ts)this.getCompletionsForInterpolation(a,s);else if(a instanceof si)this.getCompletionsForFunctionDeclaration(a,s);else if(a instanceof oi)this.getCompletionsForMixinReference(a,s);else if(a instanceof ar)this.getCompletionsForFunctionArgument(null,a,s);else if(a instanceof Is)this.getCompletionsForSupports(a,s);else if(a instanceof Xn)this.getCompletionsForSupportsCondition(a,s);else if(a instanceof Yn)this.getCompletionsForExtendsReference(a,null,s);else if(a.type===v.URILiteral)this.getCompletionForUriLiteralValue(a,s);else if(a.parent===null)this.getCompletionForTopLevel(s);else if(a.type===v.StringLiteral&&this.isImportPathParent(a.parent.type))this.getCompletionForImportPath(a,s);else continue;if(s.items.length>0||this.offset>a.offset)return this.finalize(s)}return this.getCompletionsForStylesheet(s),s.items.length===0&&this.variablePrefix&&this.currentWord.indexOf(this.variablePrefix)===0&&this.getVariableProposals(null,s),this.finalize(s)}finally{this.position=null,this.currentWord=null,this.textDocument=null,this.styleSheet=null,this.symbolContext=null,this.defaultReplaceRange=null,this.nodePath=null}},t.prototype.isImportPathParent=function(e){return e===v.Import},t.prototype.finalize=function(e){return e},t.prototype.findInNodePath=function(){for(var e=[],n=0;n=0;r--){var i=this.nodePath[r];if(e.indexOf(i.type)!==-1)return i}return null},t.prototype.getCompletionsForDeclarationProperty=function(e,n){return this.getPropertyProposals(e,n)},t.prototype.getPropertyProposals=function(e,n){var r=this,i=this.isTriggerPropertyValueCompletionEnabled,s=this.isCompletePropertyWithSemicolonEnabled,o=this.cssDataManager.getProperties();return o.forEach(function(a){var l,c,h=!1;e?(l=r.getCompletionRange(e.getProperty()),c=a.name,Be(e.colonPosition)||(c+=": ",h=!0)):(l=r.getCompletionRange(null),c=a.name+": ",h=!0),!e&&s&&(c+="$0;"),e&&!e.semicolonPosition&&s&&r.offset>=r.textDocument.offsetAt(l.end)&&(c+="$0;");var d={label:a.name,documentation:Rt(a,r.doesSupportMarkdown()),tags:jn(a)?[Ut.Deprecated]:[],textEdit:$.replace(l,c),insertTextFormat:Pe.Snippet,kind:j.Property};a.restrictions||(h=!1),i&&h&&(d.command=Wc);var f=typeof a.relevance=="number"?Math.min(Math.max(a.relevance,0),99):50,m=(255-f).toString(16),b=ve(a.name,"-")?et.VendorPrefixed:et.Normal;d.sortText=b+"_"+m,n.items.push(d)}),this.completionParticipants.forEach(function(a){a.onCssProperty&&a.onCssProperty({propertyName:r.currentWord,range:r.defaultReplaceRange})}),n},Object.defineProperty(t.prototype,"isTriggerPropertyValueCompletionEnabled",{get:function(){var e,n;return(n=(e=this.documentSettings)===null||e===void 0?void 0:e.triggerPropertyValueCompletion)!==null&&n!==void 0?n:!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCompletePropertyWithSemicolonEnabled",{get:function(){var e,n;return(n=(e=this.documentSettings)===null||e===void 0?void 0:e.completePropertyWithSemicolon)!==null&&n!==void 0?n:!0},enumerable:!1,configurable:!0}),t.prototype.getCompletionsForDeclarationValue=function(e,n){for(var r=this,i=e.getFullPropertyName(),s=this.cssDataManager.getProperty(i),o=e.getValue()||null;o&&o.hasChildren();)o=o.findChildAtOffset(this.offset,!1);if(this.completionParticipants.forEach(function(b){b.onCssPropertyValue&&b.onCssPropertyValue({propertyName:i,propertyValue:r.currentWord,range:r.getCompletionRange(o)})}),s){if(s.restrictions)for(var a=0,l=s.restrictions;a=e.offset+2&&this.getVariableProposals(null,n),n},t.prototype.getVariableProposals=function(e,n){for(var r=this.getSymbolContext().findSymbolsAtOffset(this.offset,Z.Variable),i=0,s=r;i0){var s=this.currentWord.match(/^-?\d[\.\d+]*/);s&&(i=s[0],r.isIncomplete=i.length===this.currentWord.length)}else this.currentWord.length===0&&(r.isIncomplete=!0);if(n&&n.parent&&n.parent.type===v.Term&&(n=n.getParent()),e.restrictions)for(var o=0,a=e.restrictions;o=r.end;if(i)return this.getCompletionForTopLevel(n);var s=!r||this.offset<=r.offset;return s?this.getCompletionsForSelector(e,e.isNested(),n):this.getCompletionsForDeclarations(e.getDeclarations(),n)},t.prototype.getCompletionsForSelector=function(e,n,r){var i=this,s=this.findInNodePath(v.PseudoSelector,v.IdentifierSelector,v.ClassSelector,v.ElementNameSelector);!s&&this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord,this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord),this.defaultReplaceRange=se.create(Me.create(this.position.line,this.position.character-this.currentWord.length),this.position));var o=this.cssDataManager.getPseudoClasses();o.forEach(function(y){var _=hn(y.name),E={label:y.name,textEdit:$.replace(i.getCompletionRange(s),_),documentation:Rt(y,i.doesSupportMarkdown()),tags:jn(y)?[Ut.Deprecated]:[],kind:j.Function,insertTextFormat:y.name!==_?lt:void 0};ve(y.name,":-")&&(E.sortText=et.VendorPrefixed),r.items.push(E)});var a=this.cssDataManager.getPseudoElements();if(a.forEach(function(y){var _=hn(y.name),E={label:y.name,textEdit:$.replace(i.getCompletionRange(s),_),documentation:Rt(y,i.doesSupportMarkdown()),tags:jn(y)?[Ut.Deprecated]:[],kind:j.Function,insertTextFormat:y.name!==_?lt:void 0};ve(y.name,"::-")&&(E.sortText=et.VendorPrefixed),r.items.push(E)}),!n){for(var l=0,c=yp;l0){var _=b.substr(y.offset,y.length);return _.charAt(0)==="."&&!m[_]&&(m[_]=!0,r.items.push({label:_,textEdit:$.replace(i.getCompletionRange(s),_),kind:j.Keyword})),!1}return!0}),e&&e.isNested()){var g=e.getSelectors().findFirstChildBeforeOffset(this.offset);g&&e.getSelectors().getChildren().indexOf(g)===0&&this.getPropertyProposals(null,r)}return r},t.prototype.getCompletionsForDeclarations=function(e,n){if(!e||this.offset===e.offset)return n;var r=e.findFirstChildBeforeOffset(this.offset);if(!r)return this.getCompletionsForDeclarationProperty(null,n);if(r instanceof io){var i=r;if(!Be(i.colonPosition)||this.offset<=i.colonPosition)return this.getCompletionsForDeclarationProperty(i,n);if(Be(i.semicolonPosition)&&i.semicolonPositione.colonPosition&&this.getVariableProposals(e.getValue(),n),n},t.prototype.getCompletionsForExpression=function(e,n){var r=e.getParent();if(r instanceof gn)return this.getCompletionsForFunctionArgument(r,r.getParent(),n),n;var i=e.findParent(v.Declaration);if(!i)return this.getTermProposals(void 0,null,n),n;var s=e.findChildAtOffset(this.offset,!0);return s?s instanceof co||s instanceof Ve?this.getCompletionsForDeclarationValue(i,n):n:this.getCompletionsForDeclarationValue(i,n)},t.prototype.getCompletionsForFunctionArgument=function(e,n,r){var i=n.getIdentifier();return i&&i.matches("var")&&(!n.getArguments().hasChildren()||n.getArguments().getChild(0)===e)&&this.getVariableProposalsForCSSVarFunction(r),r},t.prototype.getCompletionsForFunctionDeclaration=function(e,n){var r=e.getDeclarations();return r&&this.offset>r.offset&&this.offsete.lParent&&(!Be(e.rParent)||this.offset<=e.rParent)?this.getCompletionsForDeclarationProperty(null,n):n},t.prototype.getCompletionsForSupports=function(e,n){var r=e.getDeclarations(),i=!r||this.offset<=r.offset;if(i){var s=e.findFirstChildBeforeOffset(this.offset);return s instanceof Xn?this.getCompletionsForSupportsCondition(s,n):n}return this.getCompletionForTopLevel(n)},t.prototype.getCompletionsForExtendsReference=function(e,n,r){return r},t.prototype.getCompletionForUriLiteralValue=function(e,n){var r,i,s;if(e.hasChildren()){var a=e.getChild(0);r=a.getText(),i=this.position,s=this.getCompletionRange(a)}else{r="",i=this.position;var o=this.textDocument.positionAt(e.offset+4);s=se.create(o,o)}return this.completionParticipants.forEach(function(l){l.onCssURILiteralValue&&l.onCssURILiteralValue({uriValue:r,position:i,range:s})}),n},t.prototype.getCompletionForImportPath=function(e,n){var r=this;return this.completionParticipants.forEach(function(i){i.onCssImportPath&&i.onCssImportPath({pathValue:e.getText(),position:r.position,range:r.getCompletionRange(e)})}),n},t.prototype.hasCharacterAtPosition=function(e,n){var r=this.textDocument.getText();return e>=0&&e=0&&` +\r":{[()]},*>+`.indexOf(r.charAt(n))===-1;)n--;return r.substring(n+1,e)}function Uc(t){return t.toLowerCase()in pi||/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)}var Ch=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wp=Je(),mo=function(){function t(){this.parent=null,this.children=null,this.attributes=null}return t.prototype.findAttribute=function(e){if(this.attributes)for(var n=0,r=this.attributes;n"),this.writeLine(n,i.join(""))},t}(),ut;(function(t){function e(r,i){return i+n(r)+i}t.ensure=e;function n(r){var i=r.match(/^['"](.*)["']$/);return i?i[1]:r}t.remove=n})(ut||(ut={}));var Vc=function(){function t(){this.id=0,this.attr=0,this.tag=0}return t}();function kh(t,e){for(var n=new mo,r=0,i=t.getChildren();r1){var c=e.cloneWithParent();n.addChild(c.findRoot()),n=c}n.append(o[l])}}break;case v.SelectorPlaceholder:if(s.matches("@at-root"))return n;case v.ElementNameSelector:var h=s.getText();n.addAttr("name",h==="*"?"element":Ue(h));break;case v.ClassSelector:n.addAttr("class",Ue(s.getText().substring(1)));break;case v.IdentifierSelector:n.addAttr("id",Ue(s.getText().substring(1)));break;case v.MixinDeclaration:n.addAttr("class",s.getName());break;case v.PseudoSelector:n.addAttr(Ue(s.getText()),"");break;case v.AttributeSelector:var d=s,f=d.getIdentifier();if(f){var m=d.getValue(),b=d.getOperator(),g=void 0;if(m&&b)switch(Ue(b.getText())){case"|=":g="".concat(ut.remove(Ue(m.getText())),"-\u2026");break;case"^=":g="".concat(ut.remove(Ue(m.getText())),"\u2026");break;case"$=":g="\u2026".concat(ut.remove(Ue(m.getText())));break;case"~=":g=" \u2026 ".concat(ut.remove(Ue(m.getText()))," \u2026 ");break;case"*=":g="\u2026".concat(ut.remove(Ue(m.getText())),"\u2026");break;default:g=ut.remove(Ue(m.getText()));break}n.addAttr(Ue(f.getText()),g)}break}}return n}function Ue(t){var e=new sr;e.setSource(t);var n=e.scanUnquotedString();return n?n.text:t}var Up=function(){function t(e){this.cssDataManager=e}return t.prototype.selectorToMarkedString=function(e){var n=qp(e);if(n){var r=new Bc('"').print(n);return r.push(this.selectorToSpecificityMarkedString(e)),r}else return[]},t.prototype.simpleSelectorToMarkedString=function(e){var n=kh(e),r=new Bc('"').print(n);return r.push(this.selectorToSpecificityMarkedString(e)),r},t.prototype.isPseudoElementIdentifier=function(e){var n=e.match(/^::?([\w-]+)/);return n?!!this.cssDataManager.getPseudoElement("::"+n[1]):!1},t.prototype.selectorToSpecificityMarkedString=function(e){var n=this,r=function(s){var o=new Vc;e:for(var a=0,l=s.getChildren();a0){for(var d=new Vc,f=0,m=c.getChildren();fd.id){d=w;continue}else if(w.idd.attr){d=w;continue}else if(w.attrd.tag){d=w;continue}}}o.id+=d.id,o.attr+=d.attr,o.tag+=d.tag;continue e}o.attr++;break}if(c.getChildren().length>0){var w=r(c);o.id+=w.id,o.attr+=w.attr,o.tag+=w.tag}}return o},i=r(e);return Wp("specificity","[Selector Specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity): ({0}, {1}, {2})",i.id,i.attr,i.tag)},t}(),Bp=function(){function t(e){this.prev=null,this.element=e}return t.prototype.processSelector=function(e){var n=null;if(!(this.element instanceof vn)&&e.getChildren().some(function(h){return h.hasChildren()&&h.getChild(0).type===v.SelectorCombinator})){var r=this.element.findRoot();r.parent instanceof vn&&(n=this.element,this.element=r.parent,this.element.removeChild(r),this.prev=null)}for(var i=0,s=e.getChildren();i=0;o--){var a=n[o].getSelectors().getChild(0);a&&s.processSelector(a)}return s.processSelector(t),e}var go=function(){function t(e,n){this.clientCapabilities=e,this.cssDataManager=n,this.selectorPrinting=new Up(n)}return t.prototype.configure=function(e){this.defaultSettings=e},t.prototype.doHover=function(e,n,r,i){i===void 0&&(i=this.defaultSettings);function s(y){return se.create(e.positionAt(y.offset),e.positionAt(y.end))}for(var o=e.offsetAt(n),a=no(r,o),l=null,c=0;c0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]=s.length/2&&o.push({property:_.name,score:E})}),o.sort(function(_,E){return E.score-_.score||_.property.localeCompare(E.property)});for(var a=3,l=0,c=o;l=0;l--){var c=a[l];if(c instanceof tt){var h=c.getProperty();if(h&&h.offset===s&&h.end===o){this.getFixesForUnknownProperty(e,h,r,i);return}}}},t}(),Kp=function(){function t(e){this.fullPropertyName=e.getFullPropertyName().toLowerCase(),this.node=e}return t}();function Jn(t,e,n,r){var i=t[e];i.value=n,n&&(xh(i.properties,r)||i.properties.push(r))}function Qp(t,e,n){Jn(t,"top",e,n),Jn(t,"right",e,n),Jn(t,"bottom",e,n),Jn(t,"left",e,n)}function ke(t,e,n,r){e==="top"||e==="right"||e==="bottom"||e==="left"?Jn(t,e,n,r):Qp(t,n,r)}function Rs(t,e,n){switch(e.length){case 1:ke(t,void 0,e[0],n);break;case 2:ke(t,"top",e[0],n),ke(t,"bottom",e[0],n),ke(t,"right",e[1],n),ke(t,"left",e[1],n);break;case 3:ke(t,"top",e[0],n),ke(t,"right",e[1],n),ke(t,"left",e[1],n),ke(t,"bottom",e[2],n);break;case 4:ke(t,"top",e[0],n),ke(t,"right",e[1],n),ke(t,"bottom",e[2],n),ke(t,"left",e[3],n);break}}function Zs(t,e){for(var n=0,r=e;n"u"))switch(i.fullPropertyName){case"box-sizing":return{top:{value:!1,properties:[]},right:{value:!1,properties:[]},bottom:{value:!1,properties:[]},left:{value:!1,properties:[]}};case"width":e.width=i;break;case"height":e.height=i;break;default:var o=i.fullPropertyName.split("-");switch(o[0]){case"border":switch(o[1]){case void 0:case"top":case"right":case"bottom":case"left":switch(o[2]){case void 0:ke(e,o[1],ef(s),i);break;case"width":ke(e,o[1],ir(s,!1),i);break;case"style":ke(e,o[1],mi(s,!0),i);break}break;case"width":Rs(e,Jc(s.getChildren(),!1),i);break;case"style":Rs(e,Zp(s.getChildren(),!0),i);break}break;case"padding":o.length===1?Rs(e,Jc(s.getChildren(),!0),i):ke(e,o[1],ir(s,!0),i);break}break}}return e}var ct=Je(),Xc=function(){function t(){this.data={}}return t.prototype.add=function(e,n,r){var i=this.data[e];i||(i={nodes:[],names:[]},this.data[e]=i),i.names.push(n),r&&i.nodes.push(r)},t}(),nf=function(){function t(e,n,r){var i=this;this.cssDataManager=r,this.warnings=[],this.settings=n,this.documentText=e.getText(),this.keyframes=new Xc,this.validProperties={};var s=n.getSetting(Gp.ValidProperties);Array.isArray(s)&&s.forEach(function(o){if(typeof o=="string"){var a=o.trim().toLowerCase();a.length&&(i.validProperties[a]=!0)}})}return t.entries=function(e,n,r,i,s){var o=new t(n,r,i);return e.acceptVisitor(o),o.completeValidations(),o.getEntries(s)},t.prototype.isValidPropertyDeclaration=function(e){var n=e.fullPropertyName;return this.validProperties[n]},t.prototype.fetch=function(e,n){for(var r=[],i=0,s=e;i0)for(var g=this.fetch(r,"float"),y=0;y0)for(var g=this.fetch(r,"vertical-align"),y=0;y1)for(var z=0;z")||this.peekDelim("<")||this.peekIdent("and")||this.peekIdent("or")||this.peekDelim("%")){var n=this.createNode(v.Operator);return this.consumeToken(),this.finish(n)}return t.prototype._parseOperator.call(this)},e.prototype._parseUnaryOperator=function(){if(this.peekIdent("not")){var n=this.create(B);return this.consumeToken(),this.finish(n)}return t.prototype._parseUnaryOperator.call(this)},e.prototype._parseRuleSetDeclaration=function(){return this.peek(p.AtKeyword)?this._parseKeyframe()||this._parseImport()||this._parseMedia(!0)||this._parseFontFace()||this._parseWarnAndDebug()||this._parseControlStatement()||this._parseFunctionDeclaration()||this._parseExtends()||this._parseMixinReference()||this._parseMixinContent()||this._parseMixinDeclaration()||this._parseRuleset(!0)||this._parseSupports(!0)||t.prototype._parseRuleSetDeclarationAtStatement.call(this):this._parseVariableDeclaration()||this._tryParseRuleset(!0)||t.prototype._parseRuleSetDeclaration.call(this)},e.prototype._parseDeclaration=function(n){var r=this._tryParseCustomPropertyDeclaration(n);if(r)return r;var i=this.create(tt);if(!i.setProperty(this._parseProperty()))return null;if(!this.accept(p.Colon))return this.finish(i,S.ColonExpected,[p.Colon],n||[p.SemiColon]);this.prevToken&&(i.colonPosition=this.prevToken.offset);var s=!1;if(i.setValue(this._parseExpr())&&(s=!0,i.addChild(this._parsePrio())),this.peek(p.CurlyL))i.setNestedProperties(this._parseNestedProperties());else if(!s)return this.finish(i,S.PropertyValueExpected);return this.peek(p.SemiColon)&&(i.semicolonPosition=this.token.offset),this.finish(i)},e.prototype._parseNestedProperties=function(){var n=this.create(ah);return this._parseBody(n,this._parseDeclaration.bind(this))},e.prototype._parseExtends=function(){if(this.peekKeyword("@extend")){var n=this.create(Yn);if(this.consumeToken(),!n.getSelectors().addChild(this._parseSimpleSelector()))return this.finish(n,S.SelectorExpected);for(;this.accept(p.Comma);)n.getSelectors().addChild(this._parseSimpleSelector());return this.accept(p.Exclamation)&&!this.acceptIdent("optional")?this.finish(n,S.UnknownKeyword):this.finish(n)}return null},e.prototype._parseSimpleSelectorBody=function(){return this._parseSelectorCombinator()||this._parseSelectorPlaceholder()||t.prototype._parseSimpleSelectorBody.call(this)},e.prototype._parseSelectorCombinator=function(){if(this.peekDelim("&")){var n=this.createNode(v.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(p.Num)||this.accept(p.Dimension)||n.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(n)}return null},e.prototype._parseSelectorPlaceholder=function(){if(this.peekDelim("%")){var n=this.createNode(v.SelectorPlaceholder);return this.consumeToken(),this._parseIdent(),this.finish(n)}else if(this.peekKeyword("@at-root")){var n=this.createNode(v.SelectorPlaceholder);return this.consumeToken(),this.finish(n)}return null},e.prototype._parseElementName=function(){var n=this.mark(),r=t.prototype._parseElementName.call(this);return r&&!this.hasWhitespace()&&this.peek(p.ParenthesisL)?(this.restoreAtMark(n),null):r},e.prototype._tryParsePseudoIdentifier=function(){return this._parseInterpolation()||t.prototype._tryParsePseudoIdentifier.call(this)},e.prototype._parseWarnAndDebug=function(){if(!this.peekKeyword("@debug")&&!this.peekKeyword("@warn")&&!this.peekKeyword("@error"))return null;var n=this.createNode(v.Debug);return this.consumeToken(),n.addChild(this._parseExpr()),this.finish(n)},e.prototype._parseControlStatement=function(n){return n===void 0&&(n=this._parseRuleSetDeclaration.bind(this)),this.peek(p.AtKeyword)?this._parseIfStatement(n)||this._parseForStatement(n)||this._parseEachStatement(n)||this._parseWhileStatement(n):null},e.prototype._parseIfStatement=function(n){return this.peekKeyword("@if")?this._internalParseIfStatement(n):null},e.prototype._internalParseIfStatement=function(n){var r=this.create(Ad);if(this.consumeToken(),!r.setExpression(this._parseExpr(!0)))return this.finish(r,S.ExpressionExpected);if(this._parseBody(r,n),this.acceptKeyword("@else")){if(this.peekIdent("if"))r.setElseClause(this._internalParseIfStatement(n));else if(this.peek(p.CurlyL)){var i=this.create(zd);this._parseBody(i,n),r.setElseClause(i)}}return this.finish(r)},e.prototype._parseForStatement=function(n){if(!this.peekKeyword("@for"))return null;var r=this.create(Md);return this.consumeToken(),r.setVariable(this._parseVariable())?this.acceptIdent("from")?r.addChild(this._parseBinaryExpr())?!this.acceptIdent("to")&&!this.acceptIdent("through")?this.finish(r,Ns.ThroughOrToExpected,[p.CurlyR]):r.addChild(this._parseBinaryExpr())?this._parseBody(r,n):this.finish(r,S.ExpressionExpected,[p.CurlyR]):this.finish(r,S.ExpressionExpected,[p.CurlyR]):this.finish(r,Ns.FromExpected,[p.CurlyR]):this.finish(r,S.VariableNameExpected,[p.CurlyR])},e.prototype._parseEachStatement=function(n){if(!this.peekKeyword("@each"))return null;var r=this.create(Nd);this.consumeToken();var i=r.getVariables();if(!i.addChild(this._parseVariable()))return this.finish(r,S.VariableNameExpected,[p.CurlyR]);for(;this.accept(p.Comma);)if(!i.addChild(this._parseVariable()))return this.finish(r,S.VariableNameExpected,[p.CurlyR]);return this.finish(i),this.acceptIdent("in")?r.addChild(this._parseExpr())?this._parseBody(r,n):this.finish(r,S.ExpressionExpected,[p.CurlyR]):this.finish(r,Ns.InExpected,[p.CurlyR])},e.prototype._parseWhileStatement=function(n){if(!this.peekKeyword("@while"))return null;var r=this.create(Ld);return this.consumeToken(),r.addChild(this._parseBinaryExpr())?this._parseBody(r,n):this.finish(r,S.ExpressionExpected,[p.CurlyR])},e.prototype._parseFunctionBodyDeclaration=function(){return this._parseVariableDeclaration()||this._parseReturnStatement()||this._parseWarnAndDebug()||this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this))},e.prototype._parseFunctionDeclaration=function(){if(!this.peekKeyword("@function"))return null;var n=this.create(si);if(this.consumeToken(),!n.setIdentifier(this._parseIdent([Z.Function])))return this.finish(n,S.IdentifierExpected,[p.CurlyR]);if(!this.accept(p.ParenthesisL))return this.finish(n,S.LeftParenthesisExpected,[p.CurlyR]);if(n.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!n.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(n,S.VariableNameExpected)}return this.accept(p.ParenthesisR)?this._parseBody(n,this._parseFunctionBodyDeclaration.bind(this)):this.finish(n,S.RightParenthesisExpected,[p.CurlyR])},e.prototype._parseReturnStatement=function(){if(!this.peekKeyword("@return"))return null;var n=this.createNode(v.ReturnStatement);return this.consumeToken(),n.addChild(this._parseExpr())?this.finish(n):this.finish(n,S.ExpressionExpected)},e.prototype._parseMixinDeclaration=function(){if(!this.peekKeyword("@mixin"))return null;var n=this.create(Kn);if(this.consumeToken(),!n.setIdentifier(this._parseIdent([Z.Mixin])))return this.finish(n,S.IdentifierExpected,[p.CurlyR]);if(this.accept(p.ParenthesisL)){if(n.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!n.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(n,S.VariableNameExpected)}if(!this.accept(p.ParenthesisR))return this.finish(n,S.RightParenthesisExpected,[p.CurlyR])}return this._parseBody(n,this._parseRuleSetDeclaration.bind(this))},e.prototype._parseParameterDeclaration=function(){var n=this.create(bi);return n.setIdentifier(this._parseVariable())?(this.accept(ii),this.accept(p.Colon)&&!n.setDefaultValue(this._parseExpr(!0))?this.finish(n,S.VariableValueExpected,[],[p.Comma,p.ParenthesisR]):this.finish(n)):null},e.prototype._parseMixinContent=function(){if(!this.peekKeyword("@content"))return null;var n=this.create(Qd);if(this.consumeToken(),this.accept(p.ParenthesisL)){if(n.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!n.getArguments().addChild(this._parseFunctionArgument()))return this.finish(n,S.ExpressionExpected)}if(!this.accept(p.ParenthesisR))return this.finish(n,S.RightParenthesisExpected)}return this.finish(n)},e.prototype._parseMixinReference=function(){if(!this.peekKeyword("@include"))return null;var n=this.create(oi);this.consumeToken();var r=this._parseIdent([Z.Mixin]);if(!n.setIdentifier(r))return this.finish(n,S.IdentifierExpected,[p.CurlyR]);if(!this.hasWhitespace()&&this.acceptDelim(".")&&!this.hasWhitespace()){var i=this._parseIdent([Z.Mixin]);if(!i)return this.finish(n,S.IdentifierExpected,[p.CurlyR]);var s=this.create(jl);r.referenceTypes=[Z.Module],s.setIdentifier(r),n.setIdentifier(i),n.addChild(s)}if(this.accept(p.ParenthesisL)){if(n.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!n.getArguments().addChild(this._parseFunctionArgument()))return this.finish(n,S.ExpressionExpected)}if(!this.accept(p.ParenthesisR))return this.finish(n,S.RightParenthesisExpected)}return(this.peekIdent("using")||this.peek(p.CurlyL))&&n.setContent(this._parseMixinContentDeclaration()),this.finish(n)},e.prototype._parseMixinContentDeclaration=function(){var n=this.create(Zd);if(this.acceptIdent("using")){if(!this.accept(p.ParenthesisL))return this.finish(n,S.LeftParenthesisExpected,[p.CurlyL]);if(n.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!n.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(n,S.VariableNameExpected)}if(!this.accept(p.ParenthesisR))return this.finish(n,S.RightParenthesisExpected,[p.CurlyL])}return this.peek(p.CurlyL)&&this._parseBody(n,this._parseMixinReferenceBodyStatement.bind(this)),this.finish(n)},e.prototype._parseMixinReferenceBodyStatement=function(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()},e.prototype._parseFunctionArgument=function(){var n=this.create(gn),r=this.mark(),i=this._parseVariable();if(i)if(this.accept(p.Colon))n.setIdentifier(i);else{if(this.accept(ii))return n.setValue(i),this.finish(n);this.restoreAtMark(r)}return n.setValue(this._parseExpr(!0))?(this.accept(ii),n.addChild(this._parsePrio()),this.finish(n)):n.setValue(this._tryParsePrio())?this.finish(n):null},e.prototype._parseURLArgument=function(){var n=this.mark(),r=t.prototype._parseURLArgument.call(this);if(!r||!this.peek(p.ParenthesisR)){this.restoreAtMark(n);var i=this.create(B);return i.addChild(this._parseBinaryExpr()),this.finish(i)}return r},e.prototype._parseOperation=function(){if(!this.peek(p.ParenthesisL))return null;var n=this.create(B);for(this.consumeToken();n.addChild(this._parseListElement());)this.accept(p.Comma);return this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,S.RightParenthesisExpected)},e.prototype._parseListElement=function(){var n=this.create(ep),r=this._parseBinaryExpr();if(!r)return null;if(this.accept(p.Colon)){if(n.setKey(r),!n.setValue(this._parseBinaryExpr()))return this.finish(n,S.ExpressionExpected)}else n.setValue(r);return this.finish(n)},e.prototype._parseUse=function(){if(!this.peekKeyword("@use"))return null;var n=this.create(Id);if(this.consumeToken(),!n.addChild(this._parseStringLiteral()))return this.finish(n,S.StringLiteralExpected);if(!this.peek(p.SemiColon)&&!this.peek(p.EOF)){if(!this.peekRegExp(p.Ident,/as|with/))return this.finish(n,S.UnknownKeyword);if(this.acceptIdent("as")&&!n.setIdentifier(this._parseIdent([Z.Module]))&&!this.acceptDelim("*"))return this.finish(n,S.IdentifierOrWildcardExpected);if(this.acceptIdent("with")){if(!this.accept(p.ParenthesisL))return this.finish(n,S.LeftParenthesisExpected,[p.ParenthesisR]);if(!n.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(n,S.VariableNameExpected);for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!n.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(n,S.VariableNameExpected);if(!this.accept(p.ParenthesisR))return this.finish(n,S.RightParenthesisExpected)}}return!this.accept(p.SemiColon)&&!this.accept(p.EOF)?this.finish(n,S.SemiColonExpected):this.finish(n)},e.prototype._parseModuleConfigDeclaration=function(){var n=this.create(Td);return n.setIdentifier(this._parseVariable())?!this.accept(p.Colon)||!n.setValue(this._parseExpr(!0))?this.finish(n,S.VariableValueExpected,[],[p.Comma,p.ParenthesisR]):this.accept(p.Exclamation)&&(this.hasWhitespace()||!this.acceptIdent("default"))?this.finish(n,S.UnknownKeyword):this.finish(n):null},e.prototype._parseForward=function(){if(!this.peekKeyword("@forward"))return null;var n=this.create(Od);if(this.consumeToken(),!n.addChild(this._parseStringLiteral()))return this.finish(n,S.StringLiteralExpected);if(this.acceptIdent("with")){if(!this.accept(p.ParenthesisL))return this.finish(n,S.LeftParenthesisExpected,[p.ParenthesisR]);if(!n.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(n,S.VariableNameExpected);for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!n.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(n,S.VariableNameExpected);if(!this.accept(p.ParenthesisR))return this.finish(n,S.RightParenthesisExpected)}if(!this.peek(p.SemiColon)&&!this.peek(p.EOF)){if(!this.peekRegExp(p.Ident,/as|hide|show/))return this.finish(n,S.UnknownKeyword);if(this.acceptIdent("as")){var r=this._parseIdent([Z.Forward]);if(!n.setIdentifier(r))return this.finish(n,S.IdentifierExpected);if(this.hasWhitespace()||!this.acceptDelim("*"))return this.finish(n,S.WildcardExpected)}if((this.peekIdent("hide")||this.peekIdent("show"))&&!n.addChild(this._parseForwardVisibility()))return this.finish(n,S.IdentifierOrVariableExpected)}return!this.accept(p.SemiColon)&&!this.accept(p.EOF)?this.finish(n,S.SemiColonExpected):this.finish(n)},e.prototype._parseForwardVisibility=function(){var n=this.create(Wd);for(n.setIdentifier(this._parseIdent());n.addChild(this._parseVariable()||this._parseIdent());)this.accept(p.Comma);return n.getChildren().length>1?n:null},e.prototype._parseSupportsCondition=function(){return this._parseInterpolation()||t.prototype._parseSupportsCondition.call(this)},e}(uo),gf=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),L=Je(),bf=function(t){gf(e,t);function e(n,r){var i=t.call(this,"$",n,r)||this;return Kc(e.scssModuleLoaders),Kc(e.scssModuleBuiltIns),i}return e.prototype.isImportPathParent=function(n){return n===v.Forward||n===v.Use||t.prototype.isImportPathParent.call(this,n)},e.prototype.getCompletionForImportPath=function(n,r){var i=n.getParent().type;if(i===v.Forward||i===v.Use)for(var s=0,o=e.scssModuleBuiltIns;s0){var n=typeof e.documentation=="string"?{kind:"markdown",value:e.documentation}:{kind:"markdown",value:e.documentation.value};n.value+=` - // node_modules/monaco-editor/esm/vs/base/common/cache.js - var LRUCachedFunction = class { - constructor(fn) { - this.fn = fn; - this.lastCache = void 0; - this.lastArgKey = void 0; - } - get(arg) { - const key = JSON.stringify(arg); - if (this.lastArgKey !== key) { - this.lastArgKey = key; - this.lastCache = this.fn(arg); - } - return this.lastCache; - } - }; +`,n.value+=e.references.map(function(r){return"[".concat(r.name,"](").concat(r.url,")")}).join(" | "),e.documentation=n}})}var vf=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qc=47,yf=10,wf=13,xf=12,Ls=96,zs=46,Sf=p.CustomToken,to=Sf++,Mh=function(t){vf(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.scanNext=function(n){var r=this.escapedJavaScript();return r!==null?this.finishToken(n,r):this.stream.advanceIfChars([zs,zs,zs])?this.finishToken(n,to):t.prototype.scanNext.call(this,n)},e.prototype.comment=function(){return t.prototype.comment.call(this)?!0:!this.inURL&&this.stream.advanceIfChars([Qc,Qc])?(this.stream.advanceWhileChar(function(n){switch(n){case yf:case wf:case xf:return!1;default:return!0}}),!0):!1},e.prototype.escapedJavaScript=function(){var n=this.stream.peekChar();return n===Ls?(this.stream.advance(1),this.stream.advanceWhileChar(function(r){return r!==Ls}),this.stream.advanceIfChar(Ls)?p.EscapedJavaScript:p.BadEscapedJavaScript):null},e}(sr),_f=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Cf=function(t){_f(e,t);function e(){return t.call(this,new Mh)||this}return e.prototype._parseStylesheetStatement=function(n){return n===void 0&&(n=!1),this.peek(p.AtKeyword)?this._parseVariableDeclaration()||this._parsePlugin()||t.prototype._parseStylesheetAtStatement.call(this,n):this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseFunction()||this._parseRuleset(!0)},e.prototype._parseImport=function(){if(!this.peekKeyword("@import")&&!this.peekKeyword("@import-once"))return null;var n=this.create(oo);if(this.consumeToken(),this.accept(p.ParenthesisL)){if(!this.accept(p.Ident))return this.finish(n,S.IdentifierExpected,[p.SemiColon]);do if(!this.accept(p.Comma))break;while(this.accept(p.Ident));if(!this.accept(p.ParenthesisR))return this.finish(n,S.RightParenthesisExpected,[p.SemiColon])}return!n.addChild(this._parseURILiteral())&&!n.addChild(this._parseStringLiteral())?this.finish(n,S.URIOrStringExpected,[p.SemiColon]):(!this.peek(p.SemiColon)&&!this.peek(p.EOF)&&n.setMedialist(this._parseMediaQueryList()),this.finish(n))},e.prototype._parsePlugin=function(){if(!this.peekKeyword("@plugin"))return null;var n=this.createNode(v.Plugin);return this.consumeToken(),n.addChild(this._parseStringLiteral())?this.accept(p.SemiColon)?this.finish(n):this.finish(n,S.SemiColonExpected):this.finish(n,S.StringLiteralExpected)},e.prototype._parseMediaQuery=function(){var n=t.prototype._parseMediaQuery.call(this);if(!n){var r=this.create(uh);return r.addChild(this._parseVariable())?this.finish(r):null}return n},e.prototype._parseMediaDeclaration=function(n){return n===void 0&&(n=!1),this._tryParseRuleset(n)||this._tryToParseDeclaration()||this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseDetachedRuleSetMixin()||this._parseStylesheetStatement(n)},e.prototype._parseMediaFeatureName=function(){return this._parseIdent()||this._parseVariable()},e.prototype._parseVariableDeclaration=function(n){n===void 0&&(n=[]);var r=this.create(vi),i=this.mark();if(!r.setVariable(this._parseVariable(!0)))return null;if(this.accept(p.Colon)){if(this.prevToken&&(r.colonPosition=this.prevToken.offset),r.setValue(this._parseDetachedRuleSet()))r.needsSemicolon=!1;else if(!r.setValue(this._parseExpr()))return this.finish(r,S.VariableValueExpected,[],n);r.addChild(this._parsePrio())}else return this.restoreAtMark(i),null;return this.peek(p.SemiColon)&&(r.semicolonPosition=this.token.offset),this.finish(r)},e.prototype._parseDetachedRuleSet=function(){var n=this.mark();if(this.peekDelim("#")||this.peekDelim("."))if(this.consumeToken(),!this.hasWhitespace()&&this.accept(p.ParenthesisL)){var r=this.create(Kn);if(r.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)r.getParameters().addChild(this._parseMixinParameter())||this.markError(r,S.IdentifierExpected,[],[p.ParenthesisR]);if(!this.accept(p.ParenthesisR))return this.restoreAtMark(n),null}else return this.restoreAtMark(n),null;if(!this.peek(p.CurlyL))return null;var i=this.create(ue);return this._parseBody(i,this._parseDetachedRuleSetBody.bind(this)),this.finish(i)},e.prototype._parseDetachedRuleSetBody=function(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()},e.prototype._addLookupChildren=function(n){if(!n.addChild(this._parseLookupValue()))return!1;for(var r=!1;this.peek(p.BracketL)&&(r=!0),!!n.addChild(this._parseLookupValue());)r=!1;return!r},e.prototype._parseLookupValue=function(){var n=this.create(B),r=this.mark();return this.accept(p.BracketL)?(n.addChild(this._parseVariable(!1,!0))||n.addChild(this._parsePropertyIdentifier()))&&this.accept(p.BracketR)||this.accept(p.BracketR)?n:(this.restoreAtMark(r),null):(this.restoreAtMark(r),null)},e.prototype._parseVariable=function(n,r){n===void 0&&(n=!1),r===void 0&&(r=!1);var i=!n&&this.peekDelim("$");if(!this.peekDelim("@")&&!i&&!this.peek(p.AtKeyword))return null;for(var s=this.create(ho),o=this.mark();this.acceptDelim("@")||!n&&this.acceptDelim("$");)if(this.hasWhitespace())return this.restoreAtMark(o),null;return!this.accept(p.AtKeyword)&&!this.accept(p.Ident)?(this.restoreAtMark(o),null):!r&&this.peek(p.BracketL)&&!this._addLookupChildren(s)?(this.restoreAtMark(o),null):s},e.prototype._parseTermExpression=function(){return this._parseVariable()||this._parseEscaped()||t.prototype._parseTermExpression.call(this)||this._tryParseMixinReference(!1)},e.prototype._parseEscaped=function(){if(this.peek(p.EscapedJavaScript)||this.peek(p.BadEscapedJavaScript)){var n=this.createNode(v.EscapedValue);return this.consumeToken(),this.finish(n)}if(this.peekDelim("~")){var n=this.createNode(v.EscapedValue);return this.consumeToken(),this.accept(p.String)||this.accept(p.EscapedJavaScript)?this.finish(n):this.finish(n,S.TermExpected)}return null},e.prototype._parseOperator=function(){var n=this._parseGuardOperator();return n||t.prototype._parseOperator.call(this)},e.prototype._parseGuardOperator=function(){if(this.peekDelim(">")){var n=this.createNode(v.Operator);return this.consumeToken(),this.acceptDelim("="),n}else if(this.peekDelim("=")){var n=this.createNode(v.Operator);return this.consumeToken(),this.acceptDelim("<"),n}else if(this.peekDelim("<")){var n=this.createNode(v.Operator);return this.consumeToken(),this.acceptDelim("="),n}return null},e.prototype._parseRuleSetDeclaration=function(){return this.peek(p.AtKeyword)?this._parseKeyframe()||this._parseMedia(!0)||this._parseImport()||this._parseSupports(!0)||this._parseDetachedRuleSetMixin()||this._parseVariableDeclaration()||t.prototype._parseRuleSetDeclarationAtStatement.call(this):this._tryParseMixinDeclaration()||this._tryParseRuleset(!0)||this._tryParseMixinReference()||this._parseFunction()||this._parseExtend()||t.prototype._parseRuleSetDeclaration.call(this)},e.prototype._parseKeyframeIdent=function(){return this._parseIdent([Z.Keyframe])||this._parseVariable()},e.prototype._parseKeyframeSelector=function(){return this._parseDetachedRuleSetMixin()||t.prototype._parseKeyframeSelector.call(this)},e.prototype._parseSimpleSelectorBody=function(){return this._parseSelectorCombinator()||t.prototype._parseSimpleSelectorBody.call(this)},e.prototype._parseSelector=function(n){var r=this.create(or),i=!1;for(n&&(i=r.addChild(this._parseCombinator()));r.addChild(this._parseSimpleSelector());){i=!0;var s=this.mark();if(r.addChild(this._parseGuard())&&this.peek(p.CurlyL))break;this.restoreAtMark(s),r.addChild(this._parseCombinator())}return i?this.finish(r):null},e.prototype._parseSelectorCombinator=function(){if(this.peekDelim("&")){var n=this.createNode(v.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(p.Num)||this.accept(p.Dimension)||n.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(n)}return null},e.prototype._parseSelectorIdent=function(){if(!this.peekInterpolatedIdent())return null;var n=this.createNode(v.SelectorInterpolation),r=this._acceptInterpolatedIdent(n);return r?this.finish(n):null},e.prototype._parsePropertyIdentifier=function(n){n===void 0&&(n=!1);var r=/^[\w-]+/;if(!this.peekInterpolatedIdent()&&!this.peekRegExp(this.token.type,r))return null;var i=this.mark(),s=this.create(Ve);s.isCustomProperty=this.acceptDelim("-")&&this.acceptDelim("-");var o=!1;return n?s.isCustomProperty?o=s.addChild(this._parseIdent()):o=s.addChild(this._parseRegexp(r)):s.isCustomProperty?o=this._acceptInterpolatedIdent(s):o=this._acceptInterpolatedIdent(s,r),o?(!n&&!this.hasWhitespace()&&(this.acceptDelim("+"),this.hasWhitespace()||this.acceptIdent("_")),this.finish(s)):(this.restoreAtMark(i),null)},e.prototype.peekInterpolatedIdent=function(){return this.peek(p.Ident)||this.peekDelim("@")||this.peekDelim("$")||this.peekDelim("-")},e.prototype._acceptInterpolatedIdent=function(n,r){for(var i=this,s=!1,o=function(){var l=i.mark();return i.acceptDelim("-")&&(i.hasWhitespace()||i.acceptDelim("-"),i.hasWhitespace())?(i.restoreAtMark(l),null):i._parseInterpolation()},a=r?function(){return i.acceptRegexp(r)}:function(){return i.accept(p.Ident)};(a()||n.addChild(this._parseInterpolation()||this.try(o)))&&(s=!0,!this.hasWhitespace()););return s},e.prototype._parseInterpolation=function(){var n=this.mark();if(this.peekDelim("@")||this.peekDelim("$")){var r=this.createNode(v.Interpolation);return this.consumeToken(),this.hasWhitespace()||!this.accept(p.CurlyL)?(this.restoreAtMark(n),null):r.addChild(this._parseIdent())?this.accept(p.CurlyR)?this.finish(r):this.finish(r,S.RightCurlyExpected):this.finish(r,S.IdentifierExpected)}return null},e.prototype._tryParseMixinDeclaration=function(){var n=this.mark(),r=this.create(Kn);if(!r.setIdentifier(this._parseMixinDeclarationIdentifier())||!this.accept(p.ParenthesisL))return this.restoreAtMark(n),null;if(r.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)r.getParameters().addChild(this._parseMixinParameter())||this.markError(r,S.IdentifierExpected,[],[p.ParenthesisR]);return this.accept(p.ParenthesisR)?(r.setGuard(this._parseGuard()),this.peek(p.CurlyL)?this._parseBody(r,this._parseMixInBodyDeclaration.bind(this)):(this.restoreAtMark(n),null)):(this.restoreAtMark(n),null)},e.prototype._parseMixInBodyDeclaration=function(){return this._parseFontFace()||this._parseRuleSetDeclaration()},e.prototype._parseMixinDeclarationIdentifier=function(){var n;if(this.peekDelim("#")||this.peekDelim(".")){if(n=this.create(Ve),this.consumeToken(),this.hasWhitespace()||!n.addChild(this._parseIdent()))return null}else if(this.peek(p.Hash))n=this.create(Ve),this.consumeToken();else return null;return n.referenceTypes=[Z.Mixin],this.finish(n)},e.prototype._parsePseudo=function(){if(!this.peek(p.Colon))return null;var n=this.mark(),r=this.create(Yn);return this.consumeToken(),this.acceptIdent("extend")?this._completeExtends(r):(this.restoreAtMark(n),t.prototype._parsePseudo.call(this))},e.prototype._parseExtend=function(){if(!this.peekDelim("&"))return null;var n=this.mark(),r=this.create(Yn);return this.consumeToken(),this.hasWhitespace()||!this.accept(p.Colon)||!this.acceptIdent("extend")?(this.restoreAtMark(n),null):this._completeExtends(r)},e.prototype._completeExtends=function(n){if(!this.accept(p.ParenthesisL))return this.finish(n,S.LeftParenthesisExpected);var r=n.getSelectors();if(!r.addChild(this._parseSelector(!0)))return this.finish(n,S.SelectorExpected);for(;this.accept(p.Comma);)if(!r.addChild(this._parseSelector(!0)))return this.finish(n,S.SelectorExpected);return this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,S.RightParenthesisExpected)},e.prototype._parseDetachedRuleSetMixin=function(){if(!this.peek(p.AtKeyword))return null;var n=this.mark(),r=this.create(oi);return r.addChild(this._parseVariable(!0))&&(this.hasWhitespace()||!this.accept(p.ParenthesisL))?(this.restoreAtMark(n),null):this.accept(p.ParenthesisR)?this.finish(r):this.finish(r,S.RightParenthesisExpected)},e.prototype._tryParseMixinReference=function(n){n===void 0&&(n=!0);for(var r=this.mark(),i=this.create(oi),s=this._parseMixinDeclarationIdentifier();s;){this.acceptDelim(">");var o=this._parseMixinDeclarationIdentifier();if(o)i.getNamespaces().addChild(s),s=o;else break}if(!i.setIdentifier(s))return this.restoreAtMark(r),null;var a=!1;if(this.accept(p.ParenthesisL)){if(a=!0,i.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)if(!i.getArguments().addChild(this._parseMixinArgument()))return this.finish(i,S.ExpressionExpected)}if(!this.accept(p.ParenthesisR))return this.finish(i,S.RightParenthesisExpected);s.referenceTypes=[Z.Mixin]}else s.referenceTypes=[Z.Mixin,Z.Rule];return this.peek(p.BracketL)?n||this._addLookupChildren(i):i.addChild(this._parsePrio()),!a&&!this.peek(p.SemiColon)&&!this.peek(p.CurlyR)&&!this.peek(p.EOF)?(this.restoreAtMark(r),null):this.finish(i)},e.prototype._parseMixinArgument=function(){var n=this.create(gn),r=this.mark(),i=this._parseVariable();return i&&(this.accept(p.Colon)?n.setIdentifier(i):this.restoreAtMark(r)),n.setValue(this._parseDetachedRuleSet()||this._parseExpr(!0))?this.finish(n):(this.restoreAtMark(r),null)},e.prototype._parseMixinParameter=function(){var n=this.create(bi);if(this.peekKeyword("@rest")){var r=this.create(B);return this.consumeToken(),this.accept(to)?(n.setIdentifier(this.finish(r)),this.finish(n)):this.finish(n,S.DotExpected,[],[p.Comma,p.ParenthesisR])}if(this.peek(to)){var i=this.create(B);return this.consumeToken(),n.setIdentifier(this.finish(i)),this.finish(n)}var s=!1;return n.setIdentifier(this._parseVariable())&&(this.accept(p.Colon),s=!0),!n.setDefaultValue(this._parseDetachedRuleSet()||this._parseExpr(!0))&&!s?null:this.finish(n)},e.prototype._parseGuard=function(){if(!this.peekIdent("when"))return null;var n=this.create(tp);if(this.consumeToken(),n.isNegated=this.acceptIdent("not"),!n.getConditions().addChild(this._parseGuardCondition()))return this.finish(n,S.ConditionExpected);for(;this.acceptIdent("and")||this.accept(p.Comma);)if(!n.getConditions().addChild(this._parseGuardCondition()))return this.finish(n,S.ConditionExpected);return this.finish(n)},e.prototype._parseGuardCondition=function(){if(!this.peek(p.ParenthesisL))return null;var n=this.create(np);return this.consumeToken(),n.addChild(this._parseExpr()),this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,S.RightParenthesisExpected)},e.prototype._parseFunction=function(){var n=this.mark(),r=this.create(ar);if(!r.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(p.ParenthesisL))return this.restoreAtMark(n),null;if(r.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)if(!r.getArguments().addChild(this._parseMixinArgument()))return this.finish(r,S.ExpressionExpected)}return this.accept(p.ParenthesisR)?this.finish(r):this.finish(r,S.RightParenthesisExpected)},e.prototype._parseFunctionIdentifier=function(){if(this.peekDelim("%")){var n=this.create(Ve);return n.referenceTypes=[Z.Function],this.consumeToken(),this.finish(n)}return t.prototype._parseFunctionIdentifier.call(this)},e.prototype._parseURLArgument=function(){var n=this.mark(),r=t.prototype._parseURLArgument.call(this);if(!r||!this.peek(p.ParenthesisR)){this.restoreAtMark(n);var i=this.create(B);return i.addChild(this._parseBinaryExpr()),this.finish(i)}return r},e}(uo),kf=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),q=Je(),Ef=function(t){kf(e,t);function e(n,r){return t.call(this,"@",n,r)||this}return e.prototype.createFunctionProposals=function(n,r,i,s){for(var o=0,a=n;o 50%"),example:"percentage(@number);",type:"percentage"},{name:"round",description:q("less.builtin.round","rounds a number to a number of places"),example:"round(number, [places: 0]);"},{name:"sqrt",description:q("less.builtin.sqrt","calculates square root of a number"),example:"sqrt(number);"},{name:"sin",description:q("less.builtin.sin","sine function"),example:"sin(number);"},{name:"tan",description:q("less.builtin.tan","tangent function"),example:"tan(number);"},{name:"atan",description:q("less.builtin.atan","arctangent - inverse of tangent function"),example:"atan(number);"},{name:"pi",description:q("less.builtin.pi","returns pi"),example:"pi();"},{name:"pow",description:q("less.builtin.pow","first argument raised to the power of the second argument"),example:"pow(@base, @exponent);"},{name:"mod",description:q("less.builtin.mod","first argument modulus second argument"),example:"mod(number, number);"},{name:"min",description:q("less.builtin.min","returns the lowest of one or more values"),example:"min(@x, @y);"},{name:"max",description:q("less.builtin.max","returns the lowest of one or more values"),example:"max(@x, @y);"}],e.colorProposals=[{name:"argb",example:"argb(@color);",description:q("less.builtin.argb","creates a #AARRGGBB")},{name:"hsl",example:"hsl(@hue, @saturation, @lightness);",description:q("less.builtin.hsl","creates a color")},{name:"hsla",example:"hsla(@hue, @saturation, @lightness, @alpha);",description:q("less.builtin.hsla","creates a color")},{name:"hsv",example:"hsv(@hue, @saturation, @value);",description:q("less.builtin.hsv","creates a color")},{name:"hsva",example:"hsva(@hue, @saturation, @value, @alpha);",description:q("less.builtin.hsva","creates a color")},{name:"hue",example:"hue(@color);",description:q("less.builtin.hue","returns the `hue` channel of `@color` in the HSL space")},{name:"saturation",example:"saturation(@color);",description:q("less.builtin.saturation","returns the `saturation` channel of `@color` in the HSL space")},{name:"lightness",example:"lightness(@color);",description:q("less.builtin.lightness","returns the `lightness` channel of `@color` in the HSL space")},{name:"hsvhue",example:"hsvhue(@color);",description:q("less.builtin.hsvhue","returns the `hue` channel of `@color` in the HSV space")},{name:"hsvsaturation",example:"hsvsaturation(@color);",description:q("less.builtin.hsvsaturation","returns the `saturation` channel of `@color` in the HSV space")},{name:"hsvvalue",example:"hsvvalue(@color);",description:q("less.builtin.hsvvalue","returns the `value` channel of `@color` in the HSV space")},{name:"red",example:"red(@color);",description:q("less.builtin.red","returns the `red` channel of `@color`")},{name:"green",example:"green(@color);",description:q("less.builtin.green","returns the `green` channel of `@color`")},{name:"blue",example:"blue(@color);",description:q("less.builtin.blue","returns the `blue` channel of `@color`")},{name:"alpha",example:"alpha(@color);",description:q("less.builtin.alpha","returns the `alpha` channel of `@color`")},{name:"luma",example:"luma(@color);",description:q("less.builtin.luma","returns the `luma` value (perceptual brightness) of `@color`")},{name:"saturate",example:"saturate(@color, 10%);",description:q("less.builtin.saturate","return `@color` 10% points more saturated")},{name:"desaturate",example:"desaturate(@color, 10%);",description:q("less.builtin.desaturate","return `@color` 10% points less saturated")},{name:"lighten",example:"lighten(@color, 10%);",description:q("less.builtin.lighten","return `@color` 10% points lighter")},{name:"darken",example:"darken(@color, 10%);",description:q("less.builtin.darken","return `@color` 10% points darker")},{name:"fadein",example:"fadein(@color, 10%);",description:q("less.builtin.fadein","return `@color` 10% points less transparent")},{name:"fadeout",example:"fadeout(@color, 10%);",description:q("less.builtin.fadeout","return `@color` 10% points more transparent")},{name:"fade",example:"fade(@color, 50%);",description:q("less.builtin.fade","return `@color` with 50% transparency")},{name:"spin",example:"spin(@color, 10);",description:q("less.builtin.spin","return `@color` with a 10 degree larger in hue")},{name:"mix",example:"mix(@color1, @color2, [@weight: 50%]);",description:q("less.builtin.mix","return a mix of `@color1` and `@color2`")},{name:"greyscale",example:"greyscale(@color);",description:q("less.builtin.greyscale","returns a grey, 100% desaturated color")},{name:"contrast",example:"contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);",description:q("less.builtin.contrast","return `@darkcolor` if `@color1 is> 43% luma` otherwise return `@lightcolor`, see notes")},{name:"multiply",example:"multiply(@color1, @color2);"},{name:"screen",example:"screen(@color1, @color2);"},{name:"overlay",example:"overlay(@color1, @color2);"},{name:"softlight",example:"softlight(@color1, @color2);"},{name:"hardlight",example:"hardlight(@color1, @color2);"},{name:"difference",example:"difference(@color1, @color2);"},{name:"exclusion",example:"exclusion(@color1, @color2);"},{name:"average",example:"average(@color1, @color2);"},{name:"negation",example:"negation(@color1, @color2);"}],e}(fo);function Ff(t,e){var n=Rf(t);return Df(n,e)}function Rf(t){function e(d){return t.positionAt(d.offset).line}function n(d){return t.positionAt(d.offset+d.len).line}function r(){switch(t.languageId){case"scss":return new Ah;case"less":return new Mh;default:return new sr}}function i(d,f){var m=e(d),b=n(d);return m!==b?{startLine:m,endLine:b,kind:f}:null}var s=[],o=[],a=r();a.ignoreComment=!1,a.setSource(t.getText());for(var l=a.scan(),c=null,h=function(){switch(l.type){case p.CurlyL:case gi:{o.push({line:e(l),type:"brace",isStart:!0});break}case p.CurlyR:{if(o.length!==0){var d=Zc(o,"brace");if(!d)break;var f=n(l);d.type==="brace"&&(c&&n(c)!==f&&f--,d.line!==f&&s.push({startLine:d.line,endLine:f,kind:void 0}))}break}case p.Comment:{var m=function(_){return _==="#region"?{line:e(l),type:"comment",isStart:!0}:{line:n(l),type:"comment",isStart:!1}},b=function(_){var E=_.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//);if(E)return m(E[1]);if(t.languageId==="scss"||t.languageId==="less"){var w=_.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/);if(w)return m(w[1])}return null},g=b(l);if(g)if(g.isStart)o.push(g);else{var d=Zc(o,"comment");if(!d)break;d.type==="comment"&&d.line!==g.line&&s.push({startLine:d.line,endLine:g.line,kind:"region"})}else{var y=i(l,"comment");y&&s.push(y)}break}}c=l,l=a.scan()};l.type!==p.EOF;)h();return s}function Zc(t,e){if(t.length===0)return null;for(var n=t.length-1;n>=0;n--)if(t[n].type===e&&t[n].isStart)return t.splice(n,1)[0];return null}function Df(t,e){var n=e&&e.rangeLimit||Number.MAX_VALUE,r=t.sort(function(o,a){var l=o.startLine-a.startLine;return l===0&&(l=o.endLine-a.endLine),l}),i=[],s=-1;return r.forEach(function(o){o.startLine=0;c--)if(this.__items[c].match(l))return!0;return!1},s.prototype.set_indent=function(l,c){this.is_empty()&&(this.__indent_count=l||0,this.__alignment_count=c||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},s.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},s.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},s.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var l=this.__parent.current_line;return l.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),l.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),l.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,l.__items[0]===" "&&(l.__items.splice(0,1),l.__character_count-=1),!0}return!1},s.prototype.is_empty=function(){return this.__items.length===0},s.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},s.prototype.push=function(l){this.__items.push(l);var c=l.lastIndexOf(` +`);c!==-1?this.__character_count=l.length-c:this.__character_count+=l.length},s.prototype.pop=function(){var l=null;return this.is_empty()||(l=this.__items.pop(),this.__character_count-=l.length),l},s.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},s.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},s.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},s.prototype.toString=function(){var l="";return this.is_empty()?this.__parent.indent_empty_lines&&(l=this.__parent.get_indent_string(this.__indent_count)):(l=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),l+=this.__items.join("")),l};function o(l,c){this.__cache=[""],this.__indent_size=l.indent_size,this.__indent_string=l.indent_char,l.indent_with_tabs||(this.__indent_string=new Array(l.indent_size+1).join(l.indent_char)),c=c||"",l.indent_level>0&&(c=new Array(l.indent_level+1).join(this.__indent_string)),this.__base_string=c,this.__base_string_length=c.length}o.prototype.get_indent_size=function(l,c){var h=this.__base_string_length;return c=c||0,l<0&&(h=0),h+=l*this.__indent_size,h+=c,h},o.prototype.get_indent_string=function(l,c){var h=this.__base_string;return c=c||0,l<0&&(l=0,h=""),c+=l*this.__indent_size,this.__ensure_cache(c),h+=this.__cache[c],h},o.prototype.__ensure_cache=function(l){for(;l>=this.__cache.length;)this.__add_column()},o.prototype.__add_column=function(){var l=this.__cache.length,c=0,h="";this.__indent_size&&l>=this.__indent_size&&(c=Math.floor(l/this.__indent_size),l-=c*this.__indent_size,h=new Array(c+1).join(this.__indent_string)),l&&(h+=new Array(l+1).join(" ")),this.__cache.push(h)};function a(l,c){this.__indent_cache=new o(l,c),this.raw=!1,this._end_with_newline=l.end_with_newline,this.indent_size=l.indent_size,this.wrap_line_length=l.wrap_line_length,this.indent_empty_lines=l.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new s(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}a.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},a.prototype.get_line_number=function(){return this.__lines.length},a.prototype.get_indent_string=function(l,c){return this.__indent_cache.get_indent_string(l,c)},a.prototype.get_indent_size=function(l,c){return this.__indent_cache.get_indent_size(l,c)},a.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},a.prototype.add_new_line=function(l){return this.is_empty()||!l&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},a.prototype.get_code=function(l){this.trim(!0);var c=this.current_line.pop();c&&(c[c.length-1]===` +`&&(c=c.replace(/\n+$/g,"")),this.current_line.push(c)),this._end_with_newline&&this.__add_outputline();var h=this.__lines.join(` +`);return l!==` +`&&(h=h.replace(/[\n]/g,l)),h},a.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},a.prototype.set_indent=function(l,c){return l=l||0,c=c||0,this.next_line.set_indent(l,c),this.__lines.length>1?(this.current_line.set_indent(l,c),!0):(this.current_line.set_indent(),!1)},a.prototype.add_raw_token=function(l){for(var c=0;c1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},a.prototype.just_added_newline=function(){return this.current_line.is_empty()},a.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},a.prototype.ensure_empty_line_above=function(l,c){for(var h=this.__lines.length-2;h>=0;){var d=this.__lines[h];if(d.is_empty())break;if(d.item(0).indexOf(l)!==0&&d.item(-1)!==c){this.__lines.splice(h+1,0,new s(this)),this.previous_line=this.__lines[this.__lines.length-2];break}h--}},i.exports.Output=a},,,,function(i){function s(l,c){this.raw_options=o(l,c),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}s.prototype._get_array=function(l,c){var h=this.raw_options[l],d=c||[];return typeof h=="object"?h!==null&&typeof h.concat=="function"&&(d=h.concat()):typeof h=="string"&&(d=h.split(/[^a-zA-Z0-9_\/\-]+/)),d},s.prototype._get_boolean=function(l,c){var h=this.raw_options[l],d=h===void 0?!!c:!!h;return d},s.prototype._get_characters=function(l,c){var h=this.raw_options[l],d=c||"";return typeof h=="string"&&(d=h.replace(/\\r/,"\r").replace(/\\n/,` +`).replace(/\\t/," ")),d},s.prototype._get_number=function(l,c){var h=this.raw_options[l];c=parseInt(c,10),isNaN(c)&&(c=0);var d=parseInt(h,10);return isNaN(d)&&(d=c),d},s.prototype._get_selection=function(l,c,h){var d=this._get_selection_list(l,c,h);if(d.length!==1)throw new Error("Invalid Option Value: The option '"+l+`' can only be one of the following values: +`+c+` +You passed in: '`+this.raw_options[l]+"'");return d[0]},s.prototype._get_selection_list=function(l,c,h){if(!c||c.length===0)throw new Error("Selection list cannot be empty.");if(h=h||[c[0]],!this._is_valid_selection(h,c))throw new Error("Invalid Default Value!");var d=this._get_array(l,h);if(!this._is_valid_selection(d,c))throw new Error("Invalid Option Value: The option '"+l+`' can contain only the following values: +`+c+` +You passed in: '`+this.raw_options[l]+"'");return d},s.prototype._is_valid_selection=function(l,c){return l.length&&c.length&&!l.some(function(h){return c.indexOf(h)===-1})};function o(l,c){var h={};l=a(l);var d;for(d in l)d!==c&&(h[d]=l[d]);if(c&&l[c])for(d in l[c])h[d]=l[c][d];return h}function a(l){var c={},h;for(h in l){var d=h.replace(/-/g,"_");c[d]=l[h]}return c}i.exports.Options=s,i.exports.normalizeOpts=a,i.exports.mergeOpts=o},,function(i){var s=RegExp.prototype.hasOwnProperty("sticky");function o(a){this.__input=a||"",this.__input_length=this.__input.length,this.__position=0}o.prototype.restart=function(){this.__position=0},o.prototype.back=function(){this.__position>0&&(this.__position-=1)},o.prototype.hasNext=function(){return this.__position=0&&a=0&&l=a.length&&this.__input.substring(l-a.length,l).toLowerCase()===a},i.exports.InputScanner=o},,,,,function(i){function s(o,a){o=typeof o=="string"?o:o.source,a=typeof a=="string"?a:a.source,this.__directives_block_pattern=new RegExp(o+/ beautify( \w+[:]\w+)+ /.source+a,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(o+/\sbeautify\signore:end\s/.source+a,"g")}s.prototype.get_directives=function(o){if(!o.match(this.__directives_block_pattern))return null;var a={};this.__directive_pattern.lastIndex=0;for(var l=this.__directive_pattern.exec(o);l;)a[l[1]]=l[2],l=this.__directive_pattern.exec(o);return a},s.prototype.readIgnored=function(o){return o.readUntilAfter(this.__directives_end_ignore_pattern)},i.exports.Directives=s},,function(i,s,o){var a=o(16).Beautifier,l=o(17).Options;function c(h,d){var f=new a(h,d);return f.beautify()}i.exports=c,i.exports.defaultOptions=function(){return new l}},function(i,s,o){var a=o(17).Options,l=o(2).Output,c=o(8).InputScanner,h=o(13).Directives,d=new h(/\/\*/,/\*\//),f=/\r\n|[\r\n]/,m=/\r\n|[\r\n]/g,b=/\s/,g=/(?:\s|\n)+/g,y=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,_=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function E(w,C){this._source_text=w||"",this._options=new a(C),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0}}E.prototype.eatString=function(w){var C="";for(this._ch=this._input.next();this._ch;){if(C+=this._ch,this._ch==="\\")C+=this._input.next();else if(w.indexOf(this._ch)!==-1||this._ch===` +`)break;this._ch=this._input.next()}return C},E.prototype.eatWhitespace=function(w){for(var C=b.test(this._input.peek()),R=0;b.test(this._input.peek());)this._ch=this._input.next(),w&&this._ch===` +`&&(R===0||R0&&this._indentLevel--},E.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var w=this._source_text,C=this._options.eol;C==="auto"&&(C=` +`,w&&f.test(w||"")&&(C=w.match(f)[0])),w=w.replace(m,` +`);var R=w.match(/^[\t ]*/)[0];this._output=new l(this._options,R),this._input=new c(w),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var z=0,O=!1,T=!1,G=!1,re=!1,J=!1,A=this._ch,M,P,I;M=this._input.read(g),P=M!=="",I=A,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),A=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var W=this._input.read(y),k=d.get_directives(W);k&&k.ignore==="start"&&(W+=d.readIgnored(this._input)),this.print_string(W),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(_)),this.eatWhitespace(!0);else if(this._ch==="@")if(this.preserveSingleSpace(P),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var x=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);x.match(/[ :]$/)&&(x=this.eatString(": ").replace(/\s$/,""),this.print_string(x),this._output.space_before_token=!0),x=x.replace(/\s$/,""),x==="extend"?re=!0:x==="import"&&(J=!0),x in this.NESTED_AT_RULE?(this._nestedLevel+=1,x in this.CONDITIONAL_GROUP_RULE&&(G=!0)):!O&&z===0&&x.indexOf(":")!==-1&&(T=!0,this.indent())}else this._ch==="#"&&this._input.peek()==="{"?(this.preserveSingleSpace(P),this.print_string(this._ch+this.eatString("}"))):this._ch==="{"?(T&&(T=!1,this.outdent()),G?(G=!1,O=this._indentLevel>=this._nestedLevel):O=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&O&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line()):this._ch==="}"?(this.outdent(),this._output.add_new_line(),I==="{"&&this._output.trim(!0),J=!1,re=!1,T&&(this.outdent(),T=!1),this.print_string(this._ch),O=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0)):this._ch===":"?(O||G)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!re&&z===0?(this.print_string(":"),T||(T=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":")):this._ch==='"'||this._ch==="'"?(this.preserveSingleSpace(P),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)):this._ch===";"?z===0?(T&&(this.outdent(),T=!1),re=!1,J=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0):this._ch==="("?this._input.lookBack("url")?(this.print_string(this._ch),this.eatWhitespace(),z++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),z&&(z--,this.outdent()))):(this.preserveSingleSpace(P),this.print_string(this._ch),this.eatWhitespace(),z++,this.indent()):this._ch===")"?(z&&(z--,this.outdent()),this.print_string(this._ch)):this._ch===","?(this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&!T&&z===0&&!J&&!re?this._output.add_new_line():this._output.space_before_token=!0):(this._ch===">"||this._ch==="+"||this._ch==="~")&&!T&&z===0?this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&b.test(this._ch)&&(this._ch="")):this._ch==="]"?this.print_string(this._ch):this._ch==="["?(this.preserveSingleSpace(P),this.print_string(this._ch)):this._ch==="="?(this.eatWhitespace(),this.print_string("="),b.test(this._ch)&&(this._ch="")):this._ch==="!"&&!this._input.lookBack("\\")?(this.print_string(" "),this.print_string(this._ch)):(this.preserveSingleSpace(P),this.print_string(this._ch));var D=this._output.get_code(C);return D},i.exports.Beautifier=E},function(i,s,o){var a=o(6).Options;function l(c){a.call(this,c,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var h=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||h;var d=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var f=0;f0&&nh(r,c-1);)c--;c===0||th(r,c-1)?l=c:c0){var g=n.insertSpaces?Vl(" ",a*s):Vl(" ",s);b=b.split(` +`).join(` +`+g),e.start.character===0&&(b=g+b)}return[{range:e,newText:b}]}function eh(t){return t.replace(/^\s+/,"")}var Nf=123,Lf=125;function zf(t,e){for(;e>=0;){var n=t.charCodeAt(e);if(n===Nf)return!0;if(n===Lf)return!1;e--}return!1}function ht(t,e,n){if(t&&t.hasOwnProperty(e)){var r=t[e];if(r!==null)return r}return n}function Pf(t,e,n){for(var r=e,i=0,s=n.tabSize||4;r && ]#",relevance:50,description:"@counter-style descriptor. Specifies the symbols used by the marker-construction algorithm specified by the system descriptor. Needs to be specified if the counter system is 'additive'.",restrictions:["integer","string","image","identifier"]},{name:"align-content",values:[{name:"center",description:"Lines are packed toward the center of the flex container."},{name:"flex-end",description:"Lines are packed toward the end of the flex container."},{name:"flex-start",description:"Lines are packed toward the start of the flex container."},{name:"space-around",description:"Lines are evenly distributed in the flex container, with half-size spaces on either end."},{name:"space-between",description:"Lines are evenly distributed in the flex container."},{name:"stretch",description:"Lines stretch to take up the remaining space."}],syntax:"normal | | | ? ",relevance:62,description:"Aligns a flex container\u2019s lines within the flex container when there is extra space in the cross-axis, similar to how 'justify-content' aligns individual items within the main-axis.",restrictions:["enum"]},{name:"align-items",values:[{name:"baseline",description:"If the flex item\u2019s inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."},{name:"center",description:"The flex item\u2019s margin box is centered in the cross axis within the line."},{name:"flex-end",description:"The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."},{name:"flex-start",description:"The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."}],syntax:"normal | stretch | | [ ? ]",relevance:85,description:"Aligns flex items along the cross axis of the current line of the flex container.",restrictions:["enum"]},{name:"justify-items",values:[{name:"auto"},{name:"normal"},{name:"end"},{name:"start"},{name:"flex-end",description:'"Flex items are packed toward the end of the line."'},{name:"flex-start",description:'"Flex items are packed toward the start of the line."'},{name:"self-end",description:"The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."},{name:"self-start",description:"The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."},{name:"center",description:"The items are packed flush to each other toward the center of the of the alignment container."},{name:"left"},{name:"right"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"save"},{name:"unsave"},{name:"legacy"}],syntax:"normal | stretch | | ? [ | left | right ] | legacy | legacy && [ left | right | center ]",relevance:53,description:"Defines the default justify-self for all items of the box, giving them the default way of justifying each box along the appropriate axis",restrictions:["enum"]},{name:"justify-self",values:[{name:"auto"},{name:"normal"},{name:"end"},{name:"start"},{name:"flex-end",description:'"Flex items are packed toward the end of the line."'},{name:"flex-start",description:'"Flex items are packed toward the start of the line."'},{name:"self-end",description:"The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."},{name:"self-start",description:"The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."},{name:"center",description:"The items are packed flush to each other toward the center of the of the alignment container."},{name:"left"},{name:"right"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"save"},{name:"unsave"}],syntax:"auto | normal | stretch | | ? [ | left | right ]",relevance:53,description:"Defines the way of justifying a box inside its container along the appropriate axis.",restrictions:["enum"]},{name:"align-self",values:[{name:"auto",description:"Computes to the value of 'align-items' on the element\u2019s parent, or 'stretch' if the element has no parent. On absolutely positioned elements, it computes to itself."},{name:"baseline",description:"If the flex item\u2019s inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."},{name:"center",description:"The flex item\u2019s margin box is centered in the cross axis within the line."},{name:"flex-end",description:"The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."},{name:"flex-start",description:"The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."}],syntax:"auto | normal | stretch | | ? ",relevance:72,description:"Allows the default alignment along the cross axis to be overridden for individual flex items.",restrictions:["enum"]},{name:"all",browsers:["E79","FF27","S9.1","C37","O24"],values:[],syntax:"initial | inherit | unset | revert",relevance:53,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/all"}],description:"Shorthand that resets all properties except 'direction' and 'unicode-bidi'.",restrictions:["enum"]},{name:"alt",browsers:["S9"],values:[],relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/alt"}],description:"Provides alternative text for assistive technology to replace the generated content of a ::before or ::after element.",restrictions:["string","enum"]},{name:"animation",values:[{name:"alternate",description:"The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."},{name:"alternate-reverse",description:"The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."},{name:"backwards",description:"The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."},{name:"both",description:"Both forwards and backwards fill modes are applied."},{name:"forwards",description:"The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."},{name:"infinite",description:"Causes the animation to repeat forever."},{name:"none",description:"No animation is performed"},{name:"normal",description:"Normal playback."},{name:"reverse",description:"All iterations of the animation are played in the reverse direction from the way they were specified."}],syntax:"#",relevance:82,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/animation"}],description:"Shorthand property combines six of the animation properties into a single property.",restrictions:["time","timing-function","enum","identifier","number"]},{name:"animation-delay",syntax:"